diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5074637 --- /dev/null +++ b/.gitignore @@ -0,0 +1,59 @@ +# 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 +# Compiled Object files, Static and Dynamic libs (Shared Objects) +*.o +*.a +*.so + +# Folders +_obj +_test + +# Architecture specific extensions/prefixes +*.[568vq] +[568vq].out + +# CGO +*.cgo1.go +*.cgo2.c +_cgo_defun.c +_cgo_gotypes.go +_cgo_export.* + +# Other +_testmain.go +*.exe +*.test +*.prof +.DS_Store + +# IDE +.vscode + +# Generator +.openapi-generator-ignore +.openapi-generator +.travis.yml +git_push.sh diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..34d69e3 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,66 @@ +# Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, gender identity and expression, level of experience, +nationality, personal appearance, race, religion, or sexual identity and +orientation. + +## Standards + +Examples of behavior that contributes to creating a positive environment +include: + +- Using welcoming and inclusive language +- Being respectful of differing viewpoints and experiences +- Gracefully accepting constructive criticism +- Focusing on what is best for the community +- Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +- The use of sexualized language or imagery and unwelcome sexual attention or + advances +- Trolling, insulting/derogatory comments, and personal or political attacks +- Public or private harassment +- Publishing others' private information, such as a physical or electronic + address, without explicit permission +- Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or +reject comments, commits, code, wiki edits, issues, and other contributions +that are not aligned to this Code of Conduct, or to ban temporarily or +permanently any contributor for other behaviors that they deem inappropriate, +threatening, offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Examples of +representing a project or community include using an official project e-mail +address, posting via an official social media account, or acting as an appointed +representative at an online or offline event. Representation of a project may be +further defined and clarified by project maintainers. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported by contacting the project team at [cdn@arvancloud.ir](mailto:cdn@arvancloud.ir). All +complaints will be reviewed and investigated and will result in a response that +is deemed necessary and appropriate to the circumstances. The project team is +obligated to maintain confidentiality with regard to the reporter of an incident. +Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good +faith may face temporary or permanent repercussions as determined by other +members of the project's leadership. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..1d37a80 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,15 @@ +# Contributing + +When contributing to this repository, please first discuss the change you wish to make via issue, +email, or any other method with the owners of this repository before making a change. + +Please note we have a [code of conduct](https://github.com/arvancloud/cdn-go/blob/main/CODE_OF_CONDUCT.md), please follow it in all your interactions with the project. + +## Pull Request Process + +1. Ensure any install or build dependencies are removed before the end of the layer when doing a + build. +2. Update the `README.md` with details of changes to the interface, this includes new environment + variables, exposed ports, useful file locations and container parameters. +3. The versioning scheme we use is [SemVer](https://semver.org/lang/fa/). +4. You should request a reviewer to merge it for you. diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..63c4760 --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2023 ArvanCloud + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..89ee3c2 --- /dev/null +++ b/README.md @@ -0,0 +1,21 @@ +# ArvanCloud CDN Go + +[![Release](https://github.com/arvancloud/cdn-go/actions/workflows/release.yaml/badge.svg)](https://github.com/arvancloud/cdn-go/actions/workflows/release.yaml) [![CodeQL](https://github.com/arvancloud/cdn-go/actions/workflows/codeql.yaml/badge.svg)](https://github.com/arvancloud/cdn-go/actions/workflows/codeql.yaml) ![Docker Image Size (latest semver)](https://img.shields.io/docker/image-size/r1cloud/cdn?sort=semver) ![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/arvancloud/cdn-go) ![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/arvancloud/cdn-go?display_name=tag&label=version&sort=semver) + +![logo](.github/logo.svg) + +It's a Go library for interacting with the ArvanCloud CDN API. + +## Installation + +```bash +go get github.com/arvancloud/cdn-go +``` + +## Usage + +Check the [HOW-TO.md](docs/HOW-TO.md) file for more information. + +## Contributing + +We welcome contributions from the community. Please report any issues you find in the [Issues page](https://github.com/arvancloud/cdn-go/issues) or send us an email at [cdn@arvancloud.ir](mailto:cdn@arvancloud.ir). diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000..e03d194 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,26 @@ +# Security Policy + +## Reporting Potential Security Issues + +If you have encountered a potential security vulnerability in this project, please report it to us at [cdn@arvancloud.ir](mailto:cdn@arvancloud.ir). We will work with you to verify the vulnerability and patch it. + +When reporting issues, please provide the following information: + +- Component(s) affected +- A description indicating how to reproduce the issue +- A summary of the security vulnerability and impact + +We request that you contact us via the email address above and give the project contributors a chance to resolve the vulnerability and issue a new release prior to any public exposure; this helps protect the project's users, and provides them with a chance to upgrade and/or update in order to protect their applications. + +## Policy + +If we verify a reported security vulnerability, our policy is: + +- We will patch the current release branch, as well as the immediate prior minor release branch. +- After patching the release branches, we will immediately issue new security fix releases for each patched release branch. + +## Supported Versions + +| Version | Supported | +| ------- | ------------------ | +| 0.1.x | :white_check_mark: | diff --git a/api/openapi.yaml b/api/openapi.yaml new file mode 100644 index 0000000..e0d9ce2 --- /dev/null +++ b/api/openapi.yaml @@ -0,0 +1,21528 @@ +openapi: 3.0.0 +info: + title: ArvanCloud CDN Services + version: 4.99.2 + x-logo: + url: /images/other/arvan-api-docs-logo.svg + backgroundColor: white + altText: ArvanCloud +servers: +- description: Production server (uses live data) + url: https://napi.arvancloud.ir/cdn/4.0 +security: +- UserToken: [] +- ApiKey: [] +paths: + /domains: + get: + description: "Leaving the 'search' empty, will return all domains. Otherwise,\ + \ it will filter domains containing the search keyword." + operationId: domains.index + parameters: + - description: Search term + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + - description: Set how many items returned per page + explode: true + in: query + name: per_page + required: false + schema: + type: integer + style: form + - description: Set the desired page number + explode: true + in: query + name: page + required: false + schema: + default: 1 + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_index_200_response' + description: Lists all domains belongs to the account + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + summary: Get the list of domains + tags: + - Domain + /domains/dns-service: + post: + operationId: domains.store + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DomainStore' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/DomainResponse' + description: Successfully created the new domain + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_store_422_response' + description: The given data was invalid + summary: Create new domain + tags: + - Domain + /domains/{domain}: + delete: + operationId: domains.destroy + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + - explode: true + in: query + name: id + required: true + schema: + format: uuid + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Successful + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_store_422_response' + description: The given data was invalid + summary: Remove the domain + tags: + - Domain + get: + operationId: domains.show + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DomainResponse' + description: Detailed information of the domain + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Get information of the domain + tags: + - Domain + /domains/{domain}/ns-keys: + delete: + operationId: domains.nameservers.reset + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/NsKeysResponse' + description: Successfully reset to deafult NS values + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Failed + summary: Reset custom Nameserver keys to the default values for the domain + tags: + - Domain + put: + operationId: domains.nameservers.set + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/NsKeys' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/NsKeysResponse' + description: Successfully set custom NS values + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Failed + summary: Set custom NS records for the domain + tags: + - Domain + /domains/{domain}/ns-keys/check: + get: + operationId: domains.nameservers.check + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_nameservers_check_200_response' + description: Successfully retrieve list of NS values + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Check NS to find whether domain is activated + tags: + - Domain + /domains/{domain}/dns-service/check-ns: + put: + deprecated: true + operationId: domains.nameservers.deprecated-check + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_nameservers_deprecated_check_200_response' + description: Successfully queued checking domain's NS + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Deprecated in favor /ns-keys/check + tags: + - Domain + /domains/{domain}/ns-keys/use-optional-keys: + post: + operationId: domains.nameservers.optional + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/NsKeysResponse' + description: Optional keys are set + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Use optional NS keys + tags: + - Domain + /domains/{domain}/cname-setup/custom: + delete: + operationId: domains.cname-setup.reset + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DomainResponse' + description: Successfully updated the custom cname record of the domain + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_store_422_response' + description: The given data was invalid + summary: Reset the custom record of CNAME Setup to the default value + tags: + - Domain + put: + operationId: domains.cname-setup.set + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CustomCname' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DomainResponse' + description: Successfully updated the custom cname record of the domain + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_store_422_response' + description: The given data was invalid + summary: Set a custom record for using CNAME Setup + tags: + - Domain + /domains/{domain}/cname-setup/convert: + post: + operationId: domains.cname-setup.convert + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DomainResponse' + description: Successfully converted the domain to use CNAME Setup + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_store_422_response' + description: The given data was invalid + summary: Convert domain setup to cname + tags: + - Domain + /domains/{domain}/cname-setup/check: + get: + operationId: domains.cname-setup.check + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DomainResponse' + description: Successfully converted the domain to use CNAME Setup + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Check Cname Setup to find whether domain is activated + tags: + - Domain + /domains/{domain}/clone: + post: + operationId: domains.clone + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CloneDomain' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Successful + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Failed + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Clone a domain config from another one + tags: + - Domain + /domains/{domain}/regenerate: + post: + operationId: domains.regenerate + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + responses: + "202": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Successful + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Regenerate domain settings for edge servers + tags: + - Domain + /domains/transfer: + get: + operationId: domains.transfer.index + parameters: + - description: Set how many items returned per page + explode: true + in: query + name: per_page + required: false + schema: + type: integer + style: form + - description: Set the desired page number + explode: true + in: query + name: page + required: false + schema: + default: 1 + type: integer + style: form + - explode: true + in: query + name: type + required: false + schema: + enum: + - all + - incoming + - outgoing + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_transfer_index_200_response' + description: Lists all pending transfers + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + summary: Get the list of pending transfers + tags: + - Domain Transfer + /domains/{domain}/transfer: + post: + operationId: domains.transfer.store + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TransferDomain' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DomainTransferData' + description: the transfer request sent + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Transfer domain to another account + tags: + - Domain Transfer + /domains/transfer/change-status: + post: + operationId: domains.transfer.update + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TransferDomainChangeStatus' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Successful + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Accept or cancel transferring a domain + tags: + - Domain Transfer + /plans: + get: + operationId: plans.index + parameters: + - description: Domain name or id + explode: true + in: query + name: domain + required: false + schema: + $ref: '#/components/schemas/plans_index_domain_parameter' + style: form + - description: Comma separaterd plan levels to ignore + example: "0,1" + explode: true + in: query + name: ignored_plans + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/PlanResponse' + description: List of feature defintions for plans based on different sets + summary: Get the list of feature defintions for plans based on different sets + tags: + - Plan + /domains/{domain}/plans: + get: + operationId: domains.plans + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + - description: Comma separaterd plan levels to ignore + example: "0,1" + explode: true + in: query + name: ignored_plans + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/PlanResponse' + description: List of feature defintions for plans based on different sets + summary: Get the list of feature defintions for plans based on different sets + tags: + - Plan + /domains/{domain}/plan: + put: + operationId: domains.plans.update + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PlanUpdate' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Successful + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_store_422_response' + description: The given data was invalid + summary: Update the domain's plan + tags: + - Plan + /domains/{domain}/plan/violations: + get: + operationId: domains.plans.violations + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_plans_violations_200_response' + description: List of feature definitions and violations + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Get violations based on plans + tags: + - Plan + /domains/{domain}/plan/usages: + get: + operationId: domains.plans.usages + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + - explode: true + in: query + name: target_plan + required: false + schema: + $ref: '#/components/schemas/Plan' + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_plans_usages_200_response' + description: List of features with usages and total estimated cost + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Get usages based on features and an estimated cost + tags: + - Plan + /domains/{domain}/dns-records: + get: + operationId: dns-records.index + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + - description: Search term + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + - description: Type of a dns record. To filter multiple types separate them + using a comma + example: "a,cname,txt" + explode: true + in: query + name: type + required: false + schema: + type: string + style: form + - description: Set the desired page number + explode: true + in: query + name: page + required: false + schema: + default: 1 + type: integer + style: form + - description: Set how many items returned per page + explode: true + in: query + name: per_page + required: false + schema: + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/dns_records_index_200_response' + description: Successfully retrieved list of DNS records + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Get list of DNS records + tags: + - DNS Management + post: + operationId: dns-records.store + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DnsRecord' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/DnsRecordResponse' + description: Successfully created new DNS record + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_store_422_response' + description: The given data was invalid + summary: Create new DNS record + tags: + - DNS Management + /domains/{domain}/dns-records/{id}: + delete: + operationId: dns-records.destroy + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + - description: ID of the DNS record + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Successful + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Remove a DNS record + tags: + - DNS Management + get: + operationId: dns-records.show + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + - description: ID of the DNS record + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DnsRecordData' + description: Successfully retrieved the record's information + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Get information of a record + tags: + - DNS Management + put: + operationId: dns-records.update + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + - description: ID of the DNS record + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DnsRecord' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DnsRecordResponse' + description: Successfully updated the record + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_store_422_response' + description: The given data was invalid + summary: Update a DNS record + tags: + - DNS Management + /domains/{domain}/dns-records/{id}/cloud: + put: + operationId: dns-records.cloud + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + - description: ID of the DNS record + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DnsRecordCloud' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DnsRecordResponse' + description: Successfully updated cloud status + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_store_422_response' + description: The given data was invalid + summary: "Toggle cloud status (To proxy or not proxy, that's the question!)" + tags: + - DNS Management + /domains/{domain}/dns-records/import: + post: + operationId: dns-records.import + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + requestBody: + content: + multipart/form-data: + schema: + $ref: '#/components/schemas/DnsRecordImport' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Successful + summary: Import DNS records using BIND file + tags: + - DNS Management + /domains/{domain}/dns-records/dnssec: + get: + operationId: dns-records.dns-sec.show + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DnsSecData' + description: Status and configuration of DNSSEC + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Get status of DNSSEC + tags: + - DNS Management + /domains/{domain}/dns-records/dnssec/actions: + put: + operationId: dns-records.dns-sec.update + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DnsSecStatus' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DnsSecData' + description: Successfully updated DNSSEC status + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_store_422_response' + description: The given data was invalid + summary: Update DNSSEC status + tags: + - DNS Management + /domains/{domain}/caching: + delete: + deprecated: true + description: | + Purge CDN cache, either by URLs, tags, or the whole site. + Purge by tag is only available for domains with Professional plan or higher. + operationId: caching.deprecated_purge + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + - explode: true + in: query + name: purge + required: true + schema: + description: tags is deprecated + enum: + - all + - individual + - tags + type: string + style: form + - description: URLs to be purged from cache. Required if purge value is set + to individual. + explode: true + in: query + name: purge_urls + required: false + schema: + items: + format: url + type: string + maxItems: 50 + minItems: 1 + type: array + style: form + - deprecated: true + description: | + Tags to be purged from cache. Required if purge value is set to tags. + Each tag must be 32 characters or less. Only ASCII characters are acceptable. + explode: true + in: query + name: purge_tags + required: false + schema: + items: + type: string + maxItems: 100 + minItems: 1 + type: array + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Successful + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_store_422_response' + description: The given data was invalid + summary: Purge CDN Cache + tags: + - Caching + get: + operationId: caching.index + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/CacheSettingsData' + description: Successfully retrieved caching settings + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Get caching settings + tags: + - Caching + patch: + operationId: caching.update + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CacheSettings' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Successful + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_store_422_response' + description: The given data was invalid + summary: Update caching settings + tags: + - Caching + /domains/{domain}/caching/purge: + post: + description: | + Purge CDN cache, either by URLs, tags, or the whole site. + Purge by tag is only available for domains with Professional plan or higher. + operationId: caching.purge + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CachingPurge' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Successful + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_store_422_response' + description: The given data was invalid + summary: Purge CDN Cache + tags: + - Caching + /domains/{domain}/purge-tags: + delete: + deprecated: true + operationId: purge_tags.destroy + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + - explode: true + in: query + name: tag + required: true + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Successful + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Delete a Domain's Purge tag + tags: + - Caching + get: + deprecated: true + description: Returns last 100 purged tags sorted by recency. + operationId: purge_tags.index + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/purge_tags_index_200_response' + description: Successfully retrieved Domain's Purge Tags + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Get domain's Purge tags + tags: + - Caching + /load-balancers/regions: + get: + operationId: load-balancers.regions.index + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/load_balancers_regions_index_200_response' + description: Successfully retrieved list of regions for load balancers + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Get list of regions for load balancers + tags: + - Load Balancing + /domains/{domain}/load-balancers/settings: + get: + operationId: load-balancers.settings.show + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/LoadBalancerSettingsData' + description: Successfully retrieved list of settings + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Get list of domain load balancer global settings + tags: + - Load Balancing + patch: + operationId: load-balancers.settings.update + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/LoadBalancerSetting' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/load_balancers_settings_update_200_response' + description: Successfully updated settings + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_store_422_response' + description: The given data was invalid + summary: Update domain's global load balancer settings + tags: + - Load Balancing + /domains/{domain}/load-balancers: + get: + operationId: load-balancers.index + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/load_balancers_index_200_response' + description: Successfully retrieved list of load balancers + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Get list of load balancers + tags: + - Load Balancing + post: + operationId: load-balancers.store + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/LoadBalancerStore' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/LoadBalancerResponse' + description: Successfully created load balancer + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_store_422_response' + description: The given data was invalid + summary: Create a new load balancer + tags: + - Load Balancing + /domains/{domain}/load-balancers/{loadBalancerId}: + delete: + operationId: load-balancers.destroy + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + - description: ID of the load balancer + explode: false + in: path + name: loadBalancerId + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Successful + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_store_422_response' + description: The given data was invalid + summary: Remove a load balancer + tags: + - Load Balancing + get: + operationId: load-balancers.show + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + - description: ID of the load balancer + explode: false + in: path + name: loadBalancerId + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/LoadBalancerData' + description: Successfully retrieved load balancer data + summary: Get load balancer information + tags: + - Load Balancing + patch: + operationId: load-balancers.update + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + - description: ID of the load balancer + explode: false + in: path + name: loadBalancerId + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/LoadBalancer' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/LoadBalancerResponse' + description: Successfully updated a load balancer + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_store_422_response' + description: The given data was invalid + summary: Update a load balancer + tags: + - Load Balancing + /domains/{domain}/load-balancers/{loadBalancerId}/pools: + get: + operationId: load-balancers.pools.index + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + - description: ID of the load balancer + explode: false + in: path + name: loadBalancerId + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/load_balancers_pools_index_200_response' + description: Successfully retrieved list of pools of the load balancers + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Get the list of pools of a load balancers + tags: + - Load Balancing + post: + operationId: load-balancers.pools.store + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + - description: ID of the load balancer + explode: false + in: path + name: loadBalancerId + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/LoadBalancerPoolStore' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/LoadBalancerPoolResponse' + description: Successfully created pool of the load balancer + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_store_422_response' + description: The given data was invalid + summary: Create a new pool for the load balancer + tags: + - Load Balancing + /domains/{domain}/load-balancers/{loadBalancerId}/prioritize: + post: + operationId: load-balancers.prioritize_pool + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + - description: ID of the load balancer + explode: false + in: path + name: loadBalancerId + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PrioritizePool' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/LoadBalancerResponse' + description: Successfully prioritized pools in the load balancer + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_store_422_response' + description: The given data was invalid + summary: Reorder the priority of load balancer pools + tags: + - Load Balancing + /domains/{domain}/load-balancers/{loadBalancerId}/pools/{loadBalancerPoolId}: + delete: + operationId: load-balancers.pools.destroy + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + - description: ID of the load balancer + explode: false + in: path + name: loadBalancerId + required: true + schema: + format: uuid + type: string + style: simple + - description: ID of a pool of the load balancer + explode: false + in: path + name: loadBalancerPoolId + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Successful + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_store_422_response' + description: The given data was invalid + summary: Remove a load balancer pool + tags: + - Load Balancing + get: + operationId: load-balancers.pools.show + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + - description: ID of the load balancer + explode: false + in: path + name: loadBalancerId + required: true + schema: + format: uuid + type: string + style: simple + - description: ID of a pool of the load balancer + explode: false + in: path + name: loadBalancerPoolId + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/LoadBalancerPoolData' + description: Successfully retrieved load balancer pool data + summary: Get load balancer pool information + tags: + - Load Balancing + patch: + operationId: load-balancers.pools.updatePool + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + - description: ID of the load balancer + explode: false + in: path + name: loadBalancerId + required: true + schema: + format: uuid + type: string + style: simple + - description: ID of a pool of the load balancer + explode: false + in: path + name: loadBalancerPoolId + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/LoadBalancerPool' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/LoadBalancerPoolResponse' + description: Successfully updated a load balancer + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_store_422_response' + description: The given data was invalid + summary: Update an existing load balancer pool + tags: + - Load Balancing + put: + operationId: load-balancers.pools.update + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + - description: ID of the load balancer + explode: false + in: path + name: loadBalancerId + required: true + schema: + format: uuid + type: string + style: simple + - description: ID of a pool of the load balancer + explode: false + in: path + name: loadBalancerPoolId + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/LoadBalancerPoolStore' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/LoadBalancerPoolResponse' + description: Successfully updated a load balancer + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_store_422_response' + description: The given data was invalid + summary: Update an existing load balancer pool with origins + tags: + - Load Balancing + /domains/{domain}/load-balancers/{loadBalancerId}/pools/{loadBalancerPoolId}/origins: + get: + operationId: load-balancers.pools.origins.index + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + - description: ID of the load balancer + explode: false + in: path + name: loadBalancerId + required: true + schema: + format: uuid + type: string + style: simple + - description: ID of a pool of the load balancer + explode: false + in: path + name: loadBalancerPoolId + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/load_balancers_pools_origins_index_200_response' + description: Successfully retrieved list of origins of a pool + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Get list of origins of a pool + tags: + - Load Balancing + post: + operationId: load-balancers.pools.origins.store + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + - description: ID of the load balancer + explode: false + in: path + name: loadBalancerId + required: true + schema: + format: uuid + type: string + style: simple + - description: ID of a pool of the load balancer + explode: false + in: path + name: loadBalancerPoolId + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/LoadBalancerOriginStore' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/LoadBalancerOriginResponse' + description: Successfully created load balancer + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_store_422_response' + description: The given data was invalid + summary: Create a new origin in the pool of the load balancer + tags: + - Load Balancing + /domains/{domain}/load-balancers/{loadBalancerId}/pools/{loadBalancerPoolId}/origins/{loadBalancerPoolOriginId}: + delete: + operationId: load-balancers.pools.origins.destroy + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + - description: ID of the load balancer + explode: false + in: path + name: loadBalancerId + required: true + schema: + format: uuid + type: string + style: simple + - description: ID of a pool of the load balancer + explode: false + in: path + name: loadBalancerPoolId + required: true + schema: + format: uuid + type: string + style: simple + - description: ID of an origin of the pool in the load balancer + explode: false + in: path + name: loadBalancerPoolOriginId + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Successful + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_store_422_response' + description: The given data was invalid + summary: Remove an origin from the pool of the load balancer + tags: + - Load Balancing + get: + operationId: load-balancers.pools.origins.show + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + - description: ID of the load balancer + explode: false + in: path + name: loadBalancerId + required: true + schema: + format: uuid + type: string + style: simple + - description: ID of a pool of the load balancer + explode: false + in: path + name: loadBalancerPoolId + required: true + schema: + format: uuid + type: string + style: simple + - description: ID of an origin of the pool in the load balancer + explode: false + in: path + name: loadBalancerPoolOriginId + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/LoadBalancerOriginData' + description: Successfully retrieved the origin data + summary: Get load balancer origin information + tags: + - Load Balancing + patch: + operationId: load-balancers.pools.origins.update + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + - description: ID of the load balancer + explode: false + in: path + name: loadBalancerId + required: true + schema: + format: uuid + type: string + style: simple + - description: ID of a pool of the load balancer + explode: false + in: path + name: loadBalancerPoolId + required: true + schema: + format: uuid + type: string + style: simple + - description: ID of an origin of the pool in the load balancer + explode: false + in: path + name: loadBalancerPoolOriginId + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/LoadBalancerOrigin' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/LoadBalancerOriginResponse' + description: Successfully updated the origin of the pool + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_store_422_response' + description: The given data was invalid + summary: Update an existing origin of the pool + tags: + - Load Balancing + /domains/{domain}/page-rules: + get: + operationId: page-rules.index + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + - description: Search term + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + - description: Set how many items returned per page + explode: true + in: query + name: per_page + required: false + schema: + type: integer + style: form + - description: Set the desired page number + explode: true + in: query + name: page + required: false + schema: + default: 1 + type: integer + style: form + - description: Sort page rules in ascending or descending order base on seq + explode: true + in: query + name: order + required: false + schema: + default: desc + enum: + - desc + - asc + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/page_rules_index_200_response' + description: Successfully retrieved list of page-rules + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Get list of page-rules + tags: + - Page Rule + post: + operationId: page-rules.store + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PageRule' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/PageRuleResponse' + description: Successfully created new page-rule + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_store_422_response' + description: The given data was invalid + summary: Create new page-rule + tags: + - Page Rule + /domains/{domain}/page-rules/{id}: + delete: + operationId: page-rules.destroy + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + - explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Successful + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Delete the page-rule + tags: + - Page Rule + get: + operationId: page-rules.show + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + - explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/PageRuleData' + description: Successfully retrieved page-rule information + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Get the page-rule's information + tags: + - Page Rule + patch: + operationId: page-rules.status.update + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + - explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateBooleanStatus' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Successful + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_store_422_response' + description: The given data was invalid + summary: Toggle status of the page-rule + tags: + - Page Rule + put: + operationId: page-rules.update + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + - explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PageRule' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/PageRuleResponse' + description: Successfully updated page-rule information + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_store_422_response' + description: The given data was invalid + summary: Update the page-rule + tags: + - Page Rule + /domains/{domain}/page-rules/{id}/purge: + delete: + operationId: page-rules.purge + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + - explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Successful + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_store_422_response' + description: The given data was invalid + summary: Purge the page-rule + tags: + - Page Rule + /domains/{domain}/page-rules/{id}/diff: + get: + operationId: page-rules.diff.show + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + - explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/PageRuleDiffData' + description: Successfully retrieved page-rule information + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Get the page-rule's exceptions + tags: + - Page Rule + patch: + operationId: page-rules.diff.update + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + - explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PageRule' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/page_rules_diff_update_200_response' + description: Successfully updated page-rule + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_store_422_response' + description: The given data was invalid + summary: Update the page-rule's exceptions + tags: + - Page Rule + /domains/{domain}/image-resize: + get: + operationId: image-resize.get + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ImageResizeResponse' + description: Successful + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Get the content of image resize settings + tags: + - Acceleration + patch: + operationId: image-resize.update + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ImageResize' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ImageResizeResponse' + description: Successful + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_store_422_response' + description: The given data was invalid + summary: Update the content of image resize settings + tags: + - Acceleration + /domains/{domain}/acceleration: + get: + operationId: acceleration.index + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/AccelerationResponse' + description: Successful + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Get the content of acceleration settings + tags: + - Acceleration + patch: + operationId: acceleration.update + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AccelerationUpdate' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/AccelerationResponse' + description: Successful + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_store_422_response' + description: The given data was invalid + summary: Update the content of acceleration settings + tags: + - Acceleration + /domains/{domain}/custom-pages: + get: + operationId: custom-pages.get + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/CustomPagesData' + description: Successful + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Get list of custom pages + tags: + - Custom Pages + post: + operationId: custom-pages.update + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + requestBody: + content: + multipart/form-data: + schema: + $ref: '#/components/schemas/CustomPageUpdate' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Successful + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_store_422_response' + description: The given data was invalid + summary: Update custom page + tags: + - Custom Pages + /domains/{domain}/settings/www-redirect: + get: + operationId: redirect.show + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/RedirectData' + description: Success + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Get redirect settings + tags: + - Redirect + put: + operationId: redirect.update + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Redirect' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Successful + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_store_422_response' + description: The given data was invalid + summary: Update redirect settings + tags: + - Redirect + /domains/{domain}/log-forwarders: + get: + operationId: log-forwarders.index + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + - description: Set how many items returned per page + explode: true + in: query + name: per_page + required: false + schema: + type: integer + style: form + - description: Set the desired page number + explode: true + in: query + name: page + required: false + schema: + default: 1 + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/log_forwarders_index_200_response' + description: List of log forwarders + summary: Show list of log forwarders for given domain + tags: + - Log Forwarders + post: + operationId: log-forwarders.store + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/LogForwarder' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/LogForwarderResponse' + description: Successfully created a new log forwarder + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_store_422_response' + description: The given data was invalid + summary: Create new log forwarder + tags: + - Log Forwarders + /domains/{domain}/log-forwarders/{logForwarderId}: + delete: + operationId: log-forwarders.destroy + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + - description: Log Forwarder Id + explode: false + in: path + name: logForwarderId + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Successful + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access denied + summary: delete a log forwarder + tags: + - Log Forwarders + get: + operationId: log-forwarders.show + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + - description: Log Forwarder Id + explode: false + in: path + name: logForwarderId + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/LogForwarderResponse' + description: Details of a log forwarder + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access denied + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Show a log forwarder's details based on given id + tags: + - Log Forwarders + put: + operationId: log-forwarders.update + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + - description: Log Forwarder Id + explode: false + in: path + name: logForwarderId + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/LogForwarder' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/LogForwarderResponse' + description: Update log forwarder successfully + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access denied + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_store_422_response' + description: The given data was invalid + summary: Update a log forwarder + tags: + - Log Forwarders + /domains/{domain}/log-forwarders/{logForwarderId}/status: + patch: + operationId: log-forwarders.update.status + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + - description: Log Forwarder Id + explode: false + in: path + name: logForwarderId + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateBooleanStatus' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/LogForwarderResponse' + description: Update log forwarder successfully + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access denied + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_store_422_response' + description: The given data was invalid + summary: Update a log forwarder's status + tags: + - Log Forwarders + /domains/{domain}/transport-layer-proxies: + get: + operationId: transport-layer-proxies.index + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + - description: Set how many items returned per page + explode: true + in: query + name: per_page + required: false + schema: + type: integer + style: form + - description: Set the desired page number + explode: true + in: query + name: page + required: false + schema: + default: 1 + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/transport_layer_proxies_index_200_response' + description: List of transport layer proxies + summary: Show list of transport layer proxies for given domain + tags: + - Transport Layer Proxy + post: + operationId: transport-layer-proxies.store + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TransportLayerProxyStore' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/TransportLayerProxyResponse' + description: Successfully created a new transport layer proxy + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_store_422_response' + description: The given data was invalid + summary: Create new transport layer proxy + tags: + - Transport Layer Proxy + /domains/{domain}/transport-layer-proxies/{transportLayerProxyId}: + delete: + operationId: transport-layer-proxies.destroy + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + - description: Transport layer proxy id + explode: false + in: path + name: transportLayerProxyId + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Successful + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access denied + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: delete a transport layer proxy + tags: + - Transport Layer Proxy + get: + operationId: transport-layer-proxies.show + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + - description: Transport layer proxy id + explode: false + in: path + name: transportLayerProxyId + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/TransportLayerProxyResponse' + description: Show details of a transport layer proxy + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access denied + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Show a transport layer proxy's details based on given id + tags: + - Transport Layer Proxy + put: + operationId: transport-layer-proxies.update + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + - description: Transport layer proxy id + explode: false + in: path + name: transportLayerProxyId + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TransportLayerProxyUpdate' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/TransportLayerProxyResponse' + description: Update transport layer proxy successfully + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access denied + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_store_422_response' + description: The given data was invalid + summary: Update a transport layer proxy + tags: + - Transport Layer Proxy + /domains/{domain}/email-forwardings/stats: + get: + operationId: email-forwardings.stats + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/EmailForwardingStatsData' + description: Stats of domain's email forwarding + summary: Show stats of domain's email forwarding + tags: + - Email Forwarding + /domains/{domain}/email-forwardings/activate: + post: + operationId: email-forwardings.activate + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Successful + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Coflict + summary: Activate email forwarding + tags: + - Email Forwarding + /domains/{domain}/email-forwardings/deactivate: + post: + operationId: email-forwardings.deactivate + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Successful + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Coflict + summary: Deactivate email forwarding + tags: + - Email Forwarding + /domains/{domain}/email-forwardings/catch-all/activate: + post: + operationId: email-forwardings.catch_all.activate + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Successful + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Coflict + summary: Activate email forwarding catch all + tags: + - Email Forwarding + /domains/{domain}/email-forwardings/catch-all/deactivate: + post: + operationId: email-forwardings.catch_all.deactivate + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Successful + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Coflict + summary: Deactivate email forwarding catch all + tags: + - Email Forwarding + /domains/{domain}/email-forwardings/{emailForwardingId}/recipients: + get: + operationId: email-forwardings.recipients.index + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + - description: Email forwarding id + explode: false + in: path + name: emailForwardingId + required: true + schema: + format: uuid + type: string + style: simple + - description: Set how many items returned per page + explode: true + in: query + name: per_page + required: false + schema: + type: integer + style: form + - description: Set the desired page number + explode: true + in: query + name: page + required: false + schema: + default: 1 + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/EmailForwardingRecipientsListData' + description: List recipients of an email forwarding + summary: List recipients of an email forwarding + tags: + - Email Forwarding + post: + operationId: email-forwardings.recipients.store + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + - description: Email forwarding id + explode: false + in: path + name: emailForwardingId + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/EmailForwardingRecipientsStore' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/email_forwardings_recipients_store_201_response' + description: Recipient created successfully + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Coflict + summary: Create new recipient + tags: + - Email Forwarding + /domains/{domain}/email-forwardings/{emailForwardingId}/recipients/{emailForwardingRecipientId}: + delete: + operationId: email-forwardings.recipients.destroy + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + - description: Email forwarding id + explode: false + in: path + name: emailForwardingId + required: true + schema: + format: uuid + type: string + style: simple + - description: Email forwarding recipient id + explode: false + in: path + name: emailForwardingRecipientId + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Successful + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Failed + summary: Delete a recipient + tags: + - Email Forwarding + /domains/{domain}/email-forwardings/{emailForwardingId}/recipients/{emailForwardingRecipientId}/set-default: + patch: + operationId: email-forwardings.recipients.set_default + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + - description: Email forwarding id + explode: false + in: path + name: emailForwardingId + required: true + schema: + format: uuid + type: string + style: simple + - description: Email forwarding recipient id + explode: false + in: path + name: emailForwardingRecipientId + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Successful + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access denied + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Coflict + summary: Set default recipient + tags: + - Email Forwarding + /domains/{domain}/email-forwardings/{emailForwardingId}/recipients/{emailForwardingRecipientId}/verify: + post: + operationId: email-forwardings.recipients.verify + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + - description: Email forwarding id + explode: false + in: path + name: emailForwardingId + required: true + schema: + format: uuid + type: string + style: simple + - description: Email forwarding recipient id + explode: false + in: path + name: emailForwardingRecipientId + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/EmailForwardingRecipientsVerify' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Successful + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Coflict + summary: Verify recipient + tags: + - Email Forwarding + /domains/{domain}/email-forwardings/{emailForwardingId}/recipients/{emailForwardingRecipientId}/resend-verification: + post: + operationId: email-forwardings.recipients.resend_verification + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + - description: Email forwarding id + explode: false + in: path + name: emailForwardingId + required: true + schema: + format: uuid + type: string + style: simple + - description: Email forwarding recipient id + explode: false + in: path + name: emailForwardingRecipientId + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Successful + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Coflict + summary: Resend Verification + tags: + - Email Forwarding + /domains/{domain}/email-forwardings/{emailForwardingId}/aliases: + get: + operationId: email-forwardings.aliases.index + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + - description: Email forwarding id + explode: false + in: path + name: emailForwardingId + required: true + schema: + format: uuid + type: string + style: simple + - description: Set how many items returned per page + explode: true + in: query + name: per_page + required: false + schema: + type: integer + style: form + - description: Set the desired page number + explode: true + in: query + name: page + required: false + schema: + default: 1 + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/EmailForwardingAliasesListData' + description: List recipients of an email forwarding + summary: List of email forwarding aliases for given domain + tags: + - Email Forwarding + post: + operationId: email-forwardings.aliases.store + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + - description: Email forwarding id + explode: false + in: path + name: emailForwardingId + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/EmailForwardingAliasesStore' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/email_forwardings_aliases_store_201_response' + description: Alias created successfully + summary: Create new alias + tags: + - Email Forwarding + /domains/{domain}/email-forwardings/{emailForwardingId}/aliases/{emailForwardingAliasId}: + delete: + operationId: email-forwardings.aliases.destroy + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + - description: Email forwarding id + explode: false + in: path + name: emailForwardingId + required: true + schema: + format: uuid + type: string + style: simple + - description: Email forwarding alias id + explode: false + in: path + name: emailForwardingAliasId + required: true + schema: + format: uuid + type: string + style: simple + responses: + "204": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Successful + summary: Delete an alias + tags: + - Email Forwarding + /domains/{domain}/email-forwardings/{emailForwardingId}/aliases/{emailForwardingAliasId}/toggle-activation: + patch: + operationId: email-forwardings.aliases.toggle_activation + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + - description: Email forwarding id + explode: false + in: path + name: emailForwardingId + required: true + schema: + format: uuid + type: string + style: simple + - description: Email forwarding alias id + explode: false + in: path + name: emailForwardingAliasId + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/EmailForwardingAliasesToggleActivation' + responses: + "204": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Successful + summary: Toggle alias activation + tags: + - Email Forwarding + /domains/{domain}/email-forwardings/{emailForwardingId}/aliases/{emailForwardingAliasId}/recipients: + patch: + operationId: email-forwardings.aliases.update_recipients + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + - description: Email forwarding id + explode: false + in: path + name: emailForwardingId + required: true + schema: + format: uuid + type: string + style: simple + - description: Email forwarding alias id + explode: false + in: path + name: emailForwardingAliasId + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/EmailForwardingAliasesRecipients' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Successful + summary: Update alias recipients + tags: + - Email Forwarding + /domains/{domain}/troubleshoots: + get: + operationId: troubleshoots.index + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + - description: Set how many items returned per page + explode: true + in: query + name: per_page + required: false + schema: + type: integer + style: form + - description: Set the desired page number + explode: true + in: query + name: page + required: false + schema: + default: 1 + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/troubleshoots_index_200_response' + description: List of troubleshoots + summary: Show list of troubleshoots for given domain + tags: + - Troubleshoot + post: + operationId: troubleshoots.store + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/troubleshoots_store_201_response' + description: Successfully created a new troubleshoot + "429": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Too many requests + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Create new troubleshoot + tags: + - Troubleshoot + /domains/{domain}/troubleshoots/latest: + get: + operationId: troubleshoots.latest + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/troubleshoots_store_201_response' + description: Details of a troubleshoot + summary: Show the latest troubleshoot for given domain + tags: + - Troubleshoot + /domains/{domain}/reports/traffics: + get: + operationId: reports.traffics.total + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + - description: Select period -ending now- for report + explode: true + in: query + name: period + required: false + schema: + enum: + - 1h + - 3h + - 6h + - 12h + - 24h + - 7d + - 30d + type: string + style: form + - explode: true + in: query + name: since + required: false + schema: + format: date-time + type: string + style: form + - explode: true + in: query + name: until + required: false + schema: + format: date-time + type: string + style: form + - explode: true + in: query + name: "filter[subdomain]" + required: false + schema: + description: Select subdomain for report. @ means the root domain. + nullable: true + pattern: "^[\\w@-]+$" + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/TrafficsData' + description: Success + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_store_422_response' + description: The given data was invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Get traffic report for domain + tags: + - Reports + /domains/{domain}/reports/traffics/saved: + get: + operationId: reports.traffics.saved + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + - description: Select period -ending now- for report + explode: true + in: query + name: period + required: false + schema: + enum: + - 1h + - 3h + - 6h + - 12h + - 24h + - 7d + - 30d + type: string + style: form + - explode: true + in: query + name: since + required: false + schema: + format: date-time + type: string + style: form + - explode: true + in: query + name: until + required: false + schema: + format: date-time + type: string + style: form + - explode: true + in: query + name: "filter[subdomain]" + required: false + schema: + description: Select subdomain for report. @ means the root domain. + nullable: true + pattern: "^[\\w@-]+$" + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/SavedTrafficsData' + description: Success + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_store_422_response' + description: The given data was invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Get traffic saved to total pie chart + tags: + - Reports + /domains/{domain}/reports/traffics/map: + get: + operationId: reports.traffics.map + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + - description: Select period -ending now- for report + explode: true + in: query + name: period + required: false + schema: + enum: + - 1h + - 3h + - 6h + - 12h + - 24h + - 7d + - 30d + type: string + style: form + - explode: true + in: query + name: since + required: false + schema: + format: date-time + type: string + style: form + - explode: true + in: query + name: until + required: false + schema: + format: date-time + type: string + style: form + - explode: true + in: query + name: "filter[subdomain]" + required: false + schema: + description: Select subdomain for report. @ means the root domain. + nullable: true + pattern: "^[\\w@-]+$" + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/MapTrafficsData' + description: Success + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_store_422_response' + description: The given data was invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Get traffic as geo-map + tags: + - Reports + /domains/{domain}/reports/visitors: + get: + operationId: reports.visitors.index + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + - description: Select period -ending now- for report + explode: true + in: query + name: period + required: false + schema: + enum: + - 1h + - 3h + - 6h + - 12h + - 24h + - 7d + - 30d + type: string + style: form + - explode: true + in: query + name: since + required: false + schema: + format: date-time + type: string + style: form + - explode: true + in: query + name: until + required: false + schema: + format: date-time + type: string + style: form + - explode: true + in: query + name: "filter[subdomain]" + required: false + schema: + description: Select subdomain for report. @ means the root domain. + nullable: true + pattern: "^[\\w@-]+$" + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/VisitorsData' + description: Success + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_store_422_response' + description: The given data was invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Get report of visitors for domain + tags: + - Reports + /domains/{domain}/reports/high-request-ips: + get: + operationId: reports.visitors.high-request-ips + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + - description: Select period -ending now- for report + explode: true + in: query + name: period + required: false + schema: + enum: + - 1h + - 3h + - 6h + - 12h + - 24h + - 7d + - 30d + type: string + style: form + - explode: true + in: query + name: since + required: false + schema: + format: date-time + type: string + style: form + - explode: true + in: query + name: until + required: false + schema: + format: date-time + type: string + style: form + - description: Set how many items returned per page + explode: true + in: query + name: per_page + required: false + schema: + type: integer + style: form + - description: Set the desired page number + explode: true + in: query + name: page + required: false + schema: + default: 1 + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/reports_visitors_high_request_ips_200_response' + description: Success + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_store_422_response' + description: The given data was invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Get report of IPs with highest number of requests + tags: + - Reports + /domains/{domain}/reports/response-time: + get: + operationId: reports.response-time.index + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + - description: Select period -ending now- for report + explode: true + in: query + name: period + required: false + schema: + enum: + - 1h + - 3h + - 6h + - 12h + - 24h + - 7d + - 30d + type: string + style: form + - explode: true + in: query + name: since + required: false + schema: + format: date-time + type: string + style: form + - explode: true + in: query + name: until + required: false + schema: + format: date-time + type: string + style: form + - explode: true + in: query + name: "filter[subdomain]" + required: false + schema: + description: Select subdomain for report. @ means the root domain. + nullable: true + pattern: "^[\\w@-]+$" + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ResponseTimeData' + description: Success + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_store_422_response' + description: The given data was invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Get response time report + tags: + - Reports + /domains/{domain}/reports/status: + get: + operationId: reports.status.index + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + - description: Select period -ending now- for report + explode: true + in: query + name: period + required: false + schema: + enum: + - 1h + - 3h + - 6h + - 12h + - 24h + - 7d + - 30d + type: string + style: form + - explode: true + in: query + name: since + required: false + schema: + format: date-time + type: string + style: form + - explode: true + in: query + name: until + required: false + schema: + format: date-time + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/StatusCodeReportData' + description: Success + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_store_422_response' + description: The given data was invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Get status codes pie chart + tags: + - Reports + /domains/{domain}/reports/status/summary: + get: + operationId: reports.status.summary + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + - description: Select period -ending now- for report + explode: true + in: query + name: period + required: false + schema: + enum: + - 1h + - 3h + - 6h + - 12h + - 24h + - 7d + - 30d + type: string + style: form + - explode: true + in: query + name: since + required: false + schema: + format: date-time + type: string + style: form + - explode: true + in: query + name: until + required: false + schema: + format: date-time + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/StatusCodeSummaryData' + description: Success + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_store_422_response' + description: The given data was invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Get an overview of status codes pie chart + tags: + - Reports + /domains/{domain}/reports/error-logs: + get: + operationId: reports.error-logs + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + - description: Select period -ending now- for report + explode: true + in: query + name: period + required: false + schema: + enum: + - 1h + - 3h + - 6h + - 12h + - 24h + - 7d + - 30d + type: string + style: form + - explode: true + in: query + name: since + required: false + schema: + format: date-time + type: string + style: form + - explode: true + in: query + name: until + required: false + schema: + format: date-time + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorLogsData' + description: Success + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_store_422_response' + description: The given data was invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Get list of errors + tags: + - Reports + /domains/{domain}/reports/error-logs/chart: + get: + operationId: reports.error-logs.chart + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + - description: Select period -ending now- for report + explode: true + in: query + name: period + required: false + schema: + enum: + - 1h + - 3h + - 6h + - 12h + - 24h + - 7d + - 30d + type: string + style: form + - explode: true + in: query + name: since + required: false + schema: + format: date-time + type: string + style: form + - explode: true + in: query + name: until + required: false + schema: + format: date-time + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorLogChartData' + description: Success + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_store_422_response' + description: The given data was invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Get chart view of errors + tags: + - Reports + /domains/{domain}/reports/error-log-details: + get: + deprecated: true + operationId: reports.error-log-details + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + - description: Select period -ending now- for report + explode: true + in: query + name: period + required: false + schema: + enum: + - 1h + - 3h + - 6h + - 12h + - 24h + - 7d + - 30d + type: string + style: form + - explode: true + in: query + name: since + required: false + schema: + format: date-time + type: string + style: form + - explode: true + in: query + name: until + required: false + schema: + format: date-time + type: string + style: form + - description: Error message to search for + explode: true + in: query + name: error + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/reports_error_log_details_200_response' + description: Success + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_store_422_response' + description: The given data was invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Get detail of an error + tags: + - Reports + /domains/{domain}/reports/dns-requests: + get: + operationId: reports.dns.requests + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + - description: Select period -ending now- for report + explode: true + in: query + name: period + required: false + schema: + enum: + - 1h + - 3h + - 6h + - 12h + - 24h + - 7d + - 30d + type: string + style: form + - explode: true + in: query + name: since + required: false + schema: + format: date-time + type: string + style: form + - explode: true + in: query + name: until + required: false + schema: + format: date-time + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DnsRequestReportData' + description: Success + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_store_422_response' + description: The given data was invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Get response time report + tags: + - Reports + /domains/{domain}/reports/dns-geo: + get: + operationId: reports.dns.geo + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + - description: Select period -ending now- for report + explode: true + in: query + name: period + required: false + schema: + enum: + - 1h + - 3h + - 6h + - 12h + - 24h + - 7d + - 30d + type: string + style: form + - explode: true + in: query + name: since + required: false + schema: + format: date-time + type: string + style: form + - explode: true + in: query + name: until + required: false + schema: + format: date-time + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DnsGeoReportData' + description: Success + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_store_422_response' + description: The given data was invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Get DNS requests as geo-map + tags: + - Reports + /domains/{domain}/reports/attacks: + get: + operationId: reports.attacks.show + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + - description: Select period -ending now- for report + explode: true + in: query + name: period + required: false + schema: + enum: + - 1h + - 3h + - 6h + - 12h + - 24h + - 7d + - 30d + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/reports_attacks_show_200_response' + description: Success + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_store_422_response' + description: The given data was invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Get report of attacks + tags: + - Reports + /domains/{domain}/reports/attacks/list: + get: + operationId: reports.attacks.index + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + - description: Select period -ending now- for report + explode: true + in: query + name: period + required: false + schema: + enum: + - 1h + - 3h + - 6h + - 12h + - 24h + - 7d + - 30d + type: string + style: form + - description: Set how many items returned per page + explode: true + in: query + name: per_page + required: false + schema: + type: integer + style: form + - description: Set the desired page number + explode: true + in: query + name: page + required: false + schema: + default: 1 + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/reports_attacks_index_200_response' + description: Success + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_store_422_response' + description: The given data was invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Get list of attacks details + tags: + - Reports + /domains/{domain}/reports/attacks/attackers: + get: + operationId: reports.attacks.attackers + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + - description: Select period -ending now- for report + explode: true + in: query + name: period + required: false + schema: + enum: + - 1h + - 3h + - 6h + - 12h + - 24h + - 7d + - 30d + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/reports_attacks_attackers_200_response' + description: Success + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_store_422_response' + description: The given data was invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Get list of attackers information + tags: + - Reports + /domains/{domain}/reports/attacks/map: + get: + operationId: reports.attacks.map + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + - description: Select period -ending now- for report + explode: true + in: query + name: period + required: false + schema: + enum: + - 1h + - 3h + - 6h + - 12h + - 24h + - 7d + - 30d + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/AttackReportMapData' + description: Success + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_store_422_response' + description: The given data was invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Get geo-map of attacks + tags: + - Reports + /domains/{domain}/reports/attacks/uri: + get: + operationId: reports.attacks.uri + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + - description: Select period -ending now- for report + explode: true + in: query + name: period + required: false + schema: + enum: + - 1h + - 3h + - 6h + - 12h + - 24h + - 7d + - 30d + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/AttackReportUriData' + description: Success + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_store_422_response' + description: The given data was invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Get list of URLs under attack + tags: + - Reports + /bulk/reports/traffics: + post: + operationId: bulk-reports.traffics.total + parameters: + - description: Select period -ending now- for report + explode: true + in: query + name: period + required: false + schema: + enum: + - 1h + - 3h + - 6h + - 12h + - 24h + - 7d + - 30d + type: string + style: form + - explode: true + in: query + name: since + required: false + schema: + format: date-time + type: string + style: form + - explode: true + in: query + name: until + required: false + schema: + format: date-time + type: string + style: form + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/bulk_reports_traffics_total_request' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/BulkTrafficReportData' + description: "Bulk operation was successful, see items for status of each\ + \ item." + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_store_422_response' + description: The given data was invalid + summary: Get traffic report for multiple domains + tags: + - Reports + /bulk/reports/visitors: + post: + operationId: bulk-reports.visitors.total + parameters: + - description: Select period -ending now- for report + explode: true + in: query + name: period + required: false + schema: + enum: + - 1h + - 3h + - 6h + - 12h + - 24h + - 7d + - 30d + type: string + style: form + - explode: true + in: query + name: since + required: false + schema: + format: date-time + type: string + style: form + - explode: true + in: query + name: until + required: false + schema: + format: date-time + type: string + style: form + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/bulk_reports_visitors_total_request' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/BulkVisitorReportData' + description: "Bulk operation was successful, see items for status of each\ + \ item." + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_store_422_response' + description: The given data was invalid + summary: Get visitor report for multiple domains + tags: + - Reports + /domains/{domain}/firewall: + get: + deprecated: true + operationId: firewall.index + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/firewall_index_200_response' + description: Successful + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Get domain's firewall configuration + tags: + - Firewall + patch: + deprecated: true + operationId: firewall.update + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Firewall' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Successful + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Update domain's firewall configuration + tags: + - Firewall + /domains/{domain}/firewall/settings: + get: + operationId: firewall.settings.index + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/firewall_settings_index_200_response' + description: Successful + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Get domain's firewall configuration + tags: + - Firewall + patch: + operationId: firewall.settings.update + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/FirewallSettings' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Successful + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Update domain's firewall configuration + tags: + - Firewall + /domains/{domain}/firewall/rules: + get: + operationId: firewall.rules.index + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + - explode: true + in: query + name: per_page + required: false + schema: + minimum: 1 + type: integer + style: form + - explode: true + in: query + name: order_by + required: false + schema: + enum: + - priority + - created_at + type: string + style: form + - explode: true + in: query + name: order_type + required: false + schema: + enum: + - desc + - asc + type: string + style: form + - explode: true + in: query + name: search + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/firewall_rules_index_200_response' + description: "" + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Get domain's firewall rules + tags: + - Firewall + post: + operationId: firewall.rules.store + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/FirewallRule' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/FirewallRuleResponse' + description: Successfully created firewall rule + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Create new firewall rule + tags: + - Firewall + /domains/{domain}/firewall/rules/{id}: + delete: + operationId: firewall.rules.destroy + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + - explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Successful + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Delete firewall rule + tags: + - Firewall + get: + operationId: firewall.rules.show + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + - explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/FirewallRuleResponse' + description: Successful + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Get firewall rule information + tags: + - Firewall + patch: + operationId: firewall.rules.update + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + - explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/FirewallRule' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/FirewallRuleResponse' + description: Successfully updated the rule. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Update the firewall rule + tags: + - Firewall + /domains/{domain}/firewall/actions/reprioritize: + post: + description: | + You can choose a firewall rule and request to put it after or before another rule. + You should only provide either after_rule_id or before_rule_id (and not both of them). + operationId: firewall.reprioritize + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ReprioritizeRuleRequest' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Successful + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Change priority of firewall rules + tags: + - Firewall + /waf: + get: + operationId: global.waf.index + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/WafPresetsData' + description: Found list of presets + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Get WAF presets + tags: + - WAF + /waf/packages/{packageId}: + get: + operationId: global.waf.show_package + parameters: + - explode: false + in: path + name: packageId + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/WafPackageDetailsData' + description: Retrieved detail of package + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Get WAF package details + tags: + - WAF + /domains/{domain}/waf: + get: + deprecated: true + operationId: waf.index + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DomainWafData' + description: Successfully retrieved list of WAF settings + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Get WAF configuration + tags: + - WAF + patch: + deprecated: true + operationId: waf.update + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Waf' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DomainWafData' + description: Successfully retrieved list of WAF settings + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_store_422_response' + description: The given data was invalid + summary: Configure WAF module of the domain + tags: + - WAF + /domains/{domain}/waf/settings: + get: + operationId: waf.settings.index + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/WafSettingsData' + description: Successfully retrieved list of WAF settings + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Get WAF configuration + tags: + - WAF + patch: + operationId: waf.settings.update + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/WafSettings' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/WafSettingsData' + description: Successfully retrieved list of WAF settings + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_store_422_response' + description: The given data was invalid + summary: Configure WAF module of the domain + tags: + - WAF + /domains/{domain}/waf/actions/reconfigure: + post: + description: | + It remove all existing WAF packages and configures packages as defined in the preset + operationId: waf.reconfigure + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/WafReconfigure' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Successful + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Reconfigure WAF module using a preset + tags: + - WAF + /domains/{domain}/waf/actions/reprioritize: + post: + description: | + You can choose a WAF rule and request to put it after or before another rule. + You should only provide either after_rule_id or before_rule_id (and not both of them). + operationId: waf.reprioritize + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ReprioritizeRuleRequest' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Successful + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Change priority of WAF rules + tags: + - WAF + /domains/{domain}/waf/actions/reprioritize-package: + post: + description: | + You can choose a WAF package and request to put it after or before another one. + You should only provide either after_package_id or before_package_id (and not both of them). + operationId: waf.package.reprioritize + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/WafReprioritize' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Successful + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Change priority of WAF packages + tags: + - WAF + /domains/{domain}/waf/rules: + get: + operationId: waf.rules.index + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + - explode: true + in: query + name: per_page + required: false + schema: + minimum: 1 + type: integer + style: form + - explode: true + in: query + name: order_by + required: false + schema: + enum: + - priority + - created_at + type: string + style: form + - explode: true + in: query + name: order_type + required: false + schema: + enum: + - desc + - asc + type: string + style: form + - explode: true + in: query + name: search + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/waf_rules_index_200_response' + description: Successfully created WAF rule + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Get WAF Rules + tags: + - WAF + post: + operationId: waf.rules.store + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/WafRule' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/WafRuleResponse' + description: Successfully created WAF rule + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Create new WAF rule + tags: + - WAF + /domains/{domain}/waf/rules/{id}: + delete: + operationId: waf.rules.destroy + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + - explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Successful + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Delete WAF rule + tags: + - WAF + get: + operationId: waf.rules.show + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + - explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/WafRuleResponse' + description: Successful + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Get WAF rule information + tags: + - WAF + patch: + operationId: waf.rules.update + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + - explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/WafRule' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/WafRuleResponse' + description: Successfully updated the rule. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Update the WAF rule + tags: + - WAF + /domains/{domain}/waf/packages: + get: + description: | + By passing `available` parameter in query string, it will return available packages for this domain. + Otherwise it lists currently added packages. + operationId: waf.packages.index + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + - explode: true + in: query + name: available + required: false + schema: + default: false + type: boolean + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DomainWafPackagesData' + description: Retrieved list of WAF packages + summary: Get WAF packages + tags: + - WAF + post: + operationId: waf.packages.store + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DomainWafPackageStore' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/waf_packages_store_200_response' + description: Successfully added WAF package + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Add new WAF package to domain + tags: + - WAF + /domains/{domain}/waf/packages/{id}: + delete: + operationId: waf.packages.destroy + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Successful + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Delete WAF package from domain + tags: + - WAF + get: + operationId: waf.packages.show + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DomainWafPackageDetailsData' + description: Successful + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Get WAF package information + tags: + - WAF + patch: + operationId: waf.packages.update + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DomainWafPackage' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/waf_packages_update_200_response' + description: Successfully updated the package. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Update the WAF package + tags: + - WAF + /domains/{domain}/ddos: + get: + deprecated: true + operationId: ddos.index + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DdosData' + description: Successfully retrieved DDoS settings + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Get DDoS protection settings + tags: + - DDoS + patch: + deprecated: true + operationId: ddos.update + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Ddos' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ddos_update_200_response' + description: Successful + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Update domain's DDoS protection configuration + tags: + - DDoS + /domains/{domain}/ddos/settings: + get: + operationId: ddos.settings.index + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DdosSettingsData' + description: Successfully retrieved DDoS settings + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Get DDoS protection settings + tags: + - DDoS + patch: + operationId: ddos.settings.update + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DdosSettings' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ddos_settings_update_200_response' + description: Successful + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Update domain's DDoS protection configuration + tags: + - DDoS + /domains/{domain}/ddos/rules: + get: + operationId: ddos.rules.index + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + - explode: true + in: query + name: per_page + required: false + schema: + minimum: 1 + type: integer + style: form + - explode: true + in: query + name: order_by + required: false + schema: + enum: + - priority + - created_at + type: string + style: form + - explode: true + in: query + name: order_type + required: false + schema: + enum: + - desc + - asc + type: string + style: form + - explode: true + in: query + name: search + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ddos_rules_index_200_response' + description: Successful + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Get DDoS Protection Rules + tags: + - DDoS + post: + operationId: ddos.rules.store + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DdosRule' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/DdosRuleResponse' + description: Successfully created DDoS rule + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Create new DDoS protection rule + tags: + - DDoS + /domains/{domain}/ddos/rules/{id}: + delete: + operationId: ddos.rules.destroy + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + - explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Successful + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Delete DDoS protection rule + tags: + - DDoS + get: + operationId: ddos.rules.show + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + - explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DdosRuleData' + description: Successful + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Get DDoS protection's rule information + tags: + - DDoS + patch: + operationId: ddos.rules.update + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + - explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DdosRule' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DdosRuleResponse' + description: Successfully updated the rule. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Update the DDoS protection rule + tags: + - DDoS + /domains/{domain}/ddos/actions/reprioritize: + post: + description: | + You can choose a DDoS rule and request to put it after or before another rule. + You should only provide either after_rule_id or before_rule_id (and not both of them). + operationId: ddos.reprioritize + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ReprioritizeRuleRequest' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Successful + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Change priority of ddos rules + tags: + - DDoS + /domains/{domain}/rate-limit: + get: + deprecated: true + operationId: rate-limiting.index + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/RateLimitData' + description: Successfully retrieved Rate-Limit settings + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Get Rate-Limit settings + tags: + - Rate Limiting + patch: + deprecated: true + operationId: rate-limiting.update + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RateLimit' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/rate_limiting_update_200_response' + description: Successful + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Update domain's Rate limiting configuration + tags: + - Rate Limiting + /domains/{domain}/rate-limit/settings: + get: + operationId: rate-limiting.settings.index + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/RateLimitSettingsData' + description: Successfully retrieved Rate-Limit settings + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Get Rate limiting settings + tags: + - Rate Limiting + patch: + operationId: rate-limiting.settings.update + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RateLimitSettings' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/rate_limiting_settings_update_200_response' + description: Successful + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Update domain's Rate limiting configuration + tags: + - Rate Limiting + /domains/{domain}/rate-limit/rules: + get: + operationId: rate-limiting.rules.index + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + - explode: true + in: query + name: per_page + required: false + schema: + minimum: 1 + type: integer + style: form + - explode: true + in: query + name: order_by + required: false + schema: + enum: + - priority + - created_at + type: string + style: form + - explode: true + in: query + name: order_type + required: false + schema: + enum: + - desc + - asc + type: string + style: form + - explode: true + in: query + name: search + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/rate_limiting_rules_index_200_response' + description: Successful + summary: Get Rate limiting rules + tags: + - Rate Limiting + post: + operationId: rate-limiting.rules.store + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RateLimitRule' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/RateLimitRuleData' + description: Successfully created Rate-Limit rule + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Store new Rate limiting rule + tags: + - Rate Limiting + /domains/{domain}/rate-limit/rules/{id}: + delete: + operationId: rate-limiting.rules.destroy + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + - explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Successful + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Delete Rate limiting's rule + tags: + - Rate Limiting + get: + operationId: rate-limiting.rules.show + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + - explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/RateLimitRuleData' + description: Successful + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Get Rate limiting's rule information + tags: + - Rate Limiting + patch: + operationId: rate-limiting.rules.update + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + - explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RateLimitRule' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/rate_limiting_rules_update_200_response' + description: Successfully updated the rule. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Update the Rate limiting's rule + tags: + - Rate Limiting + /domains/{domain}/rate-limit/actions/reprioritize: + post: + description: | + You can choose a rule and request to put it after or before another rule. + You should only provide either after_rule_id or before_rule_id (and not both of them). + operationId: rate-limiting.reprioritize + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ReprioritizeRuleRequest' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Successful + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Change priority of Rate limiting's rules + tags: + - Rate Limiting + /apps: + get: + operationId: apps.index + parameters: + - description: Filter apps by category + explode: true + in: query + name: category_id + required: false + schema: + format: uuid + type: string + style: form + - description: Search term + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + - description: Set how many items returned per page + explode: true + in: query + name: per_page + required: false + schema: + type: integer + style: form + - description: Set the desired page number + explode: true + in: query + name: page + required: false + schema: + default: 1 + type: integer + style: form + - explode: true + in: query + name: sort_by + required: false + schema: + enum: + - rank + - likes + type: string + style: form + - description: Set the direction of sorting + explode: true + in: query + name: direction + required: false + schema: + enum: + - asc + - desc + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/apps_index_200_response' + description: Successful + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + summary: Get list of all available cdn-apps + tags: + - CDN Apps + /apps/{id}: + get: + operationId: apps.show + parameters: + - explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/CdnAppData' + description: Successful + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Get a single cdn-app + tags: + - CDN Apps + post: + operationId: apps.like + parameters: + - explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CdnAppLike' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/CdnAppLikeStatsData' + description: Successful + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Expressing like and dislike about a single cdn-app + tags: + - CDN Apps + /domains/{domain}/apps: + get: + operationId: domains.apps.index + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/apps_index_200_response' + description: Successful + summary: Get list of all applications installed on a domain + tags: + - CDN Apps + /domains/{domain}/apps/{id}: + delete: + operationId: domains.apps.destroy + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + - explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Successful + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Uninstall the application from domain + tags: + - CDN Apps + get: + operationId: domains.apps.installed + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + - explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/CdnAppInstall' + description: Successfully retrieved. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_store_422_response' + description: The given data was invalid + summary: Check the application is installed on the domain + tags: + - CDN Apps + post: + operationId: domains.apps.store + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + - explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AppOptions' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_apps_store_200_response' + description: Successfully installed the application. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_store_422_response' + description: The given data was invalid + summary: Install the application on the domain + tags: + - CDN Apps + /domains/{domain}/apps/{id}/actions/trigger_webhook: + post: + operationId: domains.apps.trigger-webhook + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + - explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CdnAppTriggerWebhook' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Successful + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_store_422_response' + description: The given data was invalid + summary: trigger webhook event + tags: + - CDN Apps + /apps/category: + get: + operationId: apps.category.index + parameters: + - explode: true + in: query + name: categories + required: false + schema: + items: + type: string + nullable: true + type: array + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/apps_category_index_200_response' + description: Successful + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Get the list of application categories + tags: + - CDN Apps + /apps/category/{application-category}: + get: + operationId: apps.category.show + parameters: + - description: The id of the category + explode: false + in: path + name: application-category + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/apps_category_show_200_response' + description: Successful + summary: Get an existing application category + tags: + - CDN Apps + /domains/{domain}/ssl: + get: + operationId: ssl.index + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/SslResponse' + description: Successfully retrieved SSL settings + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Get SSL settings + tags: + - SSL/TLS + patch: + operationId: ssl.update + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SslUpdate' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/SslResponse' + description: Successful + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Update domain's SSL configuration + tags: + - SSL/TLS + /domains/{domain}/ssl/certificates: + post: + operationId: ssl.cert.store + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + requestBody: + content: + multipart/form-data: + schema: + $ref: '#/components/schemas/CertificateStore' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Successful + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_store_422_response' + description: The given data was invalid + summary: Upload Certificate + tags: + - SSL/TLS + /domains/{domain}/ssl/certificates/{id}: + delete: + operationId: ssl.cert.destroy + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + - explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Successful + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_store_422_response' + description: The given data was invalid + summary: Delete an unused customer certificate + tags: + - SSL/TLS + /domains/{domain}/ssl/orders: + get: + operationId: ssl.cert.order.index + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ssl_cert_order_index_200_response' + description: Successfully retrieved Managed SSL orders info + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Get All Managed certificate orders history + tags: + - SSL/TLS + /domains/{domain}/ssl/orders/action/retry: + post: + operationId: ssl.cert.order.retry + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Successful + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_store_422_response' + description: The given data was invalid + summary: Retry a previously `killed` order + tags: + - SSL/TLS + /domains/{domain}/health-checks: + get: + operationId: active-health-check.index + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/active_health_check_index_200_response' + description: Successfully retrieved HealthCheck settings + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Get Defined HealthCheck + tags: + - Active Health Check + post: + operationId: active-health-check.store + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/HealthCheck' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/HealthCheckResponse' + description: Successfully + summary: Store a new HealthCheck + tags: + - Active Health Check + /domains/{domain}/health-checks/{healthcheck}: + delete: + operationId: active-health-check.destroy + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + - explode: false + in: path + name: healthcheck + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Successful + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Delete healthcheck + tags: + - Active Health Check + get: + operationId: active-health-check.show + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + - explode: false + in: path + name: healthcheck + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/HealthCheckResponse' + description: Successfully + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Get a single healthcheck + tags: + - Active Health Check + patch: + operationId: active-health-check.update + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + - explode: false + in: path + name: healthcheck + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/HealthCheck' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/HealthCheckResponse' + description: Successfully updated. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_store_422_response' + description: The given data was invalid + summary: Update Health check + tags: + - Active Health Check + /domains/{domain}/health-checks/reports/summary: + get: + operationId: active-health-check.reports.summary + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + - description: Name of the health-check + explode: true + in: query + name: name + required: true + schema: + type: string + style: form + - description: Upstream of the health-check monitoring + explode: true + in: query + name: upstream + required: true + schema: + type: string + style: form + - description: Select period -ending now- for report + explode: true + in: query + name: period + required: false + schema: + enum: + - 1h + - 3h + - 6h + - 12h + - 24h + - 7d + - 30d + type: string + style: form + - explode: true + in: query + name: since + required: false + schema: + format: date-time + type: string + style: form + - explode: true + in: query + name: until + required: false + schema: + format: date-time + type: string + style: form + - description: Set the direction of sorting + explode: true + in: query + name: direction + required: false + schema: + enum: + - asc + - desc + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/active_health_check_reports_summary_200_response' + description: Successfully + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Get summary reports of a single healthcheck monitoring + tags: + - Active Health Check + /domains/{domain}/health-checks/reports/details: + get: + operationId: active-health-check.reports.details + parameters: + - description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + - description: Name of the health-check + explode: true + in: query + name: name + required: true + schema: + type: string + style: form + - description: Upstream of the health-check monitoring + explode: true + in: query + name: upstream + required: true + schema: + type: string + style: form + - description: Type of reports for the health check + explode: true + in: query + name: type + required: false + schema: + default: all + enum: + - all + - success + - error + type: string + style: form + - description: Select period -ending now- for report + explode: true + in: query + name: period + required: false + schema: + enum: + - 1h + - 3h + - 6h + - 12h + - 24h + - 7d + - 30d + type: string + style: form + - explode: true + in: query + name: since + required: false + schema: + format: date-time + type: string + style: form + - explode: true + in: query + name: until + required: false + schema: + format: date-time + type: string + style: form + - description: Set the direction of sorting + explode: true + in: query + name: direction + required: false + schema: + enum: + - asc + - desc + type: string + style: form + - description: Set how many items returned per page + explode: true + in: query + name: per_page + required: false + schema: + type: integer + style: form + - description: Set the desired page number + explode: true + in: query + name: page + required: false + schema: + default: 1 + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/active_health_check_reports_details_200_response' + description: Successfully + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Get reports of a single healthcheck monitoring + tags: + - Active Health Check + /health-checks/zones: + get: + operationId: health-checks.zones.index + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/health_checks_zones_index_200_response' + description: Successful + summary: Get list of all health-check zones + tags: + - Active Health Check + /dynamic-fields: + get: + operationId: lists.index + parameters: + - description: Set how many items returned per page + explode: true + in: query + name: per_page + required: false + schema: + type: integer + style: form + - description: Set the desired page number + explode: true + in: query + name: page + required: false + schema: + default: 1 + type: integer + style: form + - explode: true + in: query + name: scope + required: false + schema: + enum: + - private + - public + type: string + style: form + - explode: true + in: query + name: type + required: false + schema: + enum: + - ip + - bytes + - number + type: string + style: form + - explode: true + in: query + name: name + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/lists_index_200_response' + description: Successfully + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Get the list of Lists + tags: + - List + post: + operationId: lists.store + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DynamicField' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/DynamicFieldResponse' + description: Successfully created List + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_store_422_response' + description: The given data was invalid + summary: Store new List + tags: + - List + /dynamic-fields/{id}: + delete: + operationId: lists.destroy + parameters: + - explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Successful + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + summary: Delete List + tags: + - List + get: + operationId: lists.show + parameters: + - explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DynamicFieldData' + description: Successful + summary: Get an existing List + tags: + - List + patch: + operationId: lists.update + parameters: + - explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DynamicField' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DynamicFieldResponse' + description: Successful + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/domains_store_422_response' + description: The given data was invalid + summary: Update an existing List + tags: + - List +components: + parameters: + Domain: + description: Domain name + example: example.com + explode: false + in: path + name: domain + required: true + schema: + format: hostname + type: string + style: simple + DomainQuery: + description: Domain name or id + explode: true + in: query + name: domain + required: false + schema: + $ref: '#/components/schemas/plans_index_domain_parameter' + style: form + EmailForwarding: + description: Email forwarding id + explode: false + in: path + name: emailForwardingId + required: true + schema: + format: uuid + type: string + style: simple + EmailForwardingRecipient: + description: Email forwarding recipient id + explode: false + in: path + name: emailForwardingRecipientId + required: true + schema: + format: uuid + type: string + style: simple + EmailForwardingAlias: + description: Email forwarding alias id + explode: false + in: path + name: emailForwardingAliasId + required: true + schema: + format: uuid + type: string + style: simple + IgnoredPlans: + description: Comma separaterd plan levels to ignore + example: "0,1" + explode: true + in: query + name: ignored_plans + required: false + schema: + type: string + style: form + TransportLayerProxyId: + description: Transport layer proxy id + explode: false + in: path + name: transportLayerProxyId + required: true + schema: + format: uuid + type: string + style: simple + WafPackageId: + description: Id of a WAF package + example: comodo + explode: false + in: path + name: wafPackageId + required: true + schema: + type: string + style: simple + Id: + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + LoadBalancerId: + description: ID of the load balancer + explode: false + in: path + name: loadBalancerId + required: true + schema: + format: uuid + type: string + style: simple + LoadBalancerPoolId: + description: ID of a pool of the load balancer + explode: false + in: path + name: loadBalancerPoolId + required: true + schema: + format: uuid + type: string + style: simple + LoadBalancerPoolOriginId: + description: ID of an origin of the pool in the load balancer + explode: false + in: path + name: loadBalancerPoolOriginId + required: true + schema: + format: uuid + type: string + style: simple + PackageId: + explode: false + in: path + name: packageId + required: true + schema: + type: string + style: simple + DnsRecordId: + description: ID of the DNS record + explode: false + in: path + name: id + required: true + schema: + format: uuid + type: string + style: simple + HealthCheckName: + description: Name of the health-check + explode: true + in: query + name: name + required: true + schema: + type: string + style: form + HealthCheckUpstream: + description: Upstream of the health-check monitoring + explode: true + in: query + name: upstream + required: true + schema: + type: string + style: form + HealthCheckReportType: + description: Type of reports for the health check + explode: true + in: query + name: type + required: false + schema: + default: all + enum: + - all + - success + - error + type: string + style: form + Search: + description: Search term + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + Direction: + description: Set the direction of sorting + explode: true + in: query + name: direction + required: false + schema: + enum: + - asc + - desc + type: string + style: form + CdnAppSortBy: + explode: true + in: query + name: sort_by + required: false + schema: + enum: + - rank + - likes + type: string + style: form + PerPage: + description: Set how many items returned per page + explode: true + in: query + name: per_page + required: false + schema: + type: integer + style: form + Page: + description: Set the desired page number + explode: true + in: query + name: page + required: false + schema: + default: 1 + type: integer + style: form + DynamicFieldScope: + explode: true + in: query + name: scope + required: false + schema: + enum: + - private + - public + type: string + style: form + DynamicFieldType: + explode: true + in: query + name: type + required: false + schema: + enum: + - ip + - bytes + - number + type: string + style: form + DynamicFieldName: + explode: true + in: query + name: name + required: false + schema: + type: string + style: form + ReportPeriod: + description: Select period -ending now- for report + explode: true + in: query + name: period + required: false + schema: + enum: + - 1h + - 3h + - 6h + - 12h + - 24h + - 7d + - 30d + type: string + style: form + ReportSince: + explode: true + in: query + name: since + required: false + schema: + format: date-time + type: string + style: form + ReportUntil: + explode: true + in: query + name: until + required: false + schema: + format: date-time + type: string + style: form + FilterSubdomain: + explode: true + in: query + name: "filter[subdomain]" + required: false + schema: + description: Select subdomain for report. @ means the root domain. + nullable: true + pattern: "^[\\w@-]+$" + type: string + style: form + type: + description: Set the desired log + explode: true + in: query + name: type + required: false + schema: + enum: + - cdn + - waf + type: string + style: form + CategoryId: + description: Filter apps by category + explode: true + in: query + name: category_id + required: false + schema: + format: uuid + type: string + style: form + ApplicationCategory: + description: The id of the category + explode: false + in: path + name: application-category + required: true + schema: + type: string + style: simple + ApplicationCategories: + explode: true + in: query + name: categories + required: false + schema: + items: + type: string + nullable: true + type: array + style: form + HealthCheck: + explode: false + in: path + name: healthcheck + required: true + schema: + format: uuid + type: string + style: simple + DnsRecordType: + description: Type of a dns record. To filter multiple types separate them using + a comma + example: "a,cname,txt" + explode: true + in: query + name: type + required: false + schema: + type: string + style: form + responses: + UnprocessableEntityError: + content: + application/json: + schema: + $ref: '#/components/schemas/domains_store_422_response' + description: The given data was invalid + OK: + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Successful + Conflict: + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Coflict + Error: + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Failed + UnauthorizedError: + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access token is missing or invalid + AccessDenied: + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Access denied + TrottleRequests: + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + description: Too many requests + NotFoundError: + content: + application/json: + schema: + $ref: '#/components/schemas/domains_show_404_response' + description: Resource not found + schemas: + SavedTrafficsCharts: + properties: + request: + items: + $ref: '#/components/schemas/SavedTrafficsCharts_request_inner' + type: array + traffic: + items: + $ref: '#/components/schemas/SavedTrafficsCharts_traffic_inner' + type: array + type: object + SavedTrafficsStatistics: + properties: + traffic: + $ref: '#/components/schemas/SavedTrafficsStatistics_traffic' + request: + $ref: '#/components/schemas/SavedTrafficsStatistics_traffic' + type: object + SavedTrafficsData: + allOf: + - $ref: '#/components/schemas/DataResponse' + example: + data: "{}" + properties: + data: + properties: + statistics: + $ref: '#/components/schemas/SavedTrafficsStatistics' + charts: + $ref: '#/components/schemas/SavedTrafficsCharts' + type: object + TrafficCharts: + properties: + requests: + $ref: '#/components/schemas/TrafficCharts_requests' + traffics: + $ref: '#/components/schemas/TrafficCharts_traffics' + type: object + TrafficStatistics: + properties: + traffics: + $ref: '#/components/schemas/TrafficStatistics_traffics' + requests: + $ref: '#/components/schemas/TrafficStatistics_traffics' + type: object + TrafficsData: + allOf: + - $ref: '#/components/schemas/DataResponse' + example: + data: "{}" + properties: + data: + properties: + statistics: + $ref: '#/components/schemas/TrafficStatistics' + charts: + $ref: '#/components/schemas/TrafficCharts' + type: object + CountryStatistics: + properties: + country: + description: The name of the country + type: string + requests: + description: The number of requests from the country + type: integer + traffics: + description: The amount of traffic from the country + type: integer + type: object + CountryRequestChart: + example: + IRN: + fillKey: 4 + name: Iran (Islamic Republic of) + value: 12456789 + description: A dictionay which maps country codes to fill and value + properties: + fillKey: + description: The fill key for the country + type: integer + name: + description: The name of the country + type: string + value: + description: The number of requests from the country + type: integer + type: object + CountryTrafficChart: + properties: + fillKey: + description: The fill key for the country + type: integer + name: + description: The name of the country + type: string + value: + description: The amount of traffic from the country + type: integer + type: object + CountryList: + example: + country: country + code: code + traffics: 6 + requests: 0 + properties: + country: + description: The name of the country + type: string + code: + description: The 2-letter country code + type: string + requests: + description: The number of requests from the country + type: integer + traffics: + description: The amount of traffic from the country + type: integer + type: object + MapTrafficsData: + allOf: + - $ref: '#/components/schemas/DataResponse' + example: + data: "{}" + lists: + - country: country + code: code + traffics: 6 + requests: 0 + - country: country + code: code + traffics: 6 + requests: 0 + properties: + data: + properties: + statistics: + deprecated: true + items: + $ref: '#/components/schemas/CountryStatistics' + type: array + charts: + properties: + requests: + additionalProperties: + $ref: '#/components/schemas/CountryRequestChart' + type: object + traffics: + additionalProperties: + $ref: '#/components/schemas/CountryTrafficChart' + type: object + type: object + type: object + lists: + items: + $ref: '#/components/schemas/CountryList' + type: array + VisitorsStatistics: + example: + visitors: + total_visitors: 0 + top_visitors: 2000-01-23T04:56:07.000+00:00 + properties: + visitors: + $ref: '#/components/schemas/VisitorsStatistics_visitors' + type: object + VisitorsCharts: + example: + visitors: + series: + - data: + - 6 + - 6 + name: reports.visitor.visitors + - data: + - 6 + - 6 + name: reports.visitor.visitors + categories: + - 2000-01-23T04:56:07.000+00:00 + - 2000-01-23T04:56:07.000+00:00 + title: reports.visitor + properties: + visitors: + $ref: '#/components/schemas/VisitorsCharts_visitors' + type: object + Visitors: + example: + charts: + visitors: + series: + - data: + - 6 + - 6 + name: reports.visitor.visitors + - data: + - 6 + - 6 + name: reports.visitor.visitors + categories: + - 2000-01-23T04:56:07.000+00:00 + - 2000-01-23T04:56:07.000+00:00 + title: reports.visitor + statistics: + visitors: + total_visitors: 0 + top_visitors: 2000-01-23T04:56:07.000+00:00 + properties: + statistics: + $ref: '#/components/schemas/VisitorsStatistics' + charts: + $ref: '#/components/schemas/VisitorsCharts' + type: object + VisitorsData: + allOf: + - $ref: '#/components/schemas/DataResponse' + example: + data: + charts: + visitors: + series: + - data: + - 6 + - 6 + name: reports.visitor.visitors + - data: + - 6 + - 6 + name: reports.visitor.visitors + categories: + - 2000-01-23T04:56:07.000+00:00 + - 2000-01-23T04:56:07.000+00:00 + title: reports.visitor + statistics: + visitors: + total_visitors: 0 + top_visitors: 2000-01-23T04:56:07.000+00:00 + properties: + data: + $ref: '#/components/schemas/Visitors' + HighRequestedIp: + example: + ip: null + request_count: 0 + properties: + ip: + $ref: '#/components/schemas/HighRequestedIp_ip' + request_count: + type: integer + type: object + ResponseTime: + example: + charts: + ir: + series: + - data: + - 0 + - 0 + name: reports.response_time.Server + - data: + - 0 + - 0 + name: reports.response_time.Server + categories: + - 2000-01-23T04:56:07.000+00:00 + - 2000-01-23T04:56:07.000+00:00 + title: reports.response_time + statistics: + response_time: "" + properties: + statistics: + $ref: '#/components/schemas/ResponseTime_statistics' + charts: + $ref: '#/components/schemas/ResponseTime_charts' + type: object + ResponseTimeData: + allOf: + - $ref: '#/components/schemas/DataResponse' + example: + data: + charts: + ir: + series: + - data: + - 0 + - 0 + name: reports.response_time.Server + - data: + - 0 + - 0 + name: reports.response_time.Server + categories: + - 2000-01-23T04:56:07.000+00:00 + - 2000-01-23T04:56:07.000+00:00 + title: reports.response_time + statistics: + response_time: "" + properties: + data: + $ref: '#/components/schemas/ResponseTime' + StatusCodeReport: + example: + charts: + status_code: + series: + - data: + - 5.637376656633329 + - 5.637376656633329 + name: report.status_code.2xx + - data: + - 5.637376656633329 + - 5.637376656633329 + name: report.status_code.2xx + name: status_code + categories: + - 2000-01-23T04:56:07.000+00:00 + - 2000-01-23T04:56:07.000+00:00 + statistics: + status_codes: + "4xx_sum": 1 + "3xx_sum": 6 + "5xx_sum": 5 + "2xx_sum": 0 + properties: + statistics: + $ref: '#/components/schemas/StatusCodeReport_statistics' + charts: + $ref: '#/components/schemas/StatusCodeReport_charts' + type: object + StatusCodeReportData: + allOf: + - $ref: '#/components/schemas/DataResponse' + example: + data: + charts: + status_code: + series: + - data: + - 5.637376656633329 + - 5.637376656633329 + name: report.status_code.2xx + - data: + - 5.637376656633329 + - 5.637376656633329 + name: report.status_code.2xx + name: status_code + categories: + - 2000-01-23T04:56:07.000+00:00 + - 2000-01-23T04:56:07.000+00:00 + statistics: + status_codes: + "4xx_sum": 1 + "3xx_sum": 6 + "5xx_sum": 5 + "2xx_sum": 0 + properties: + data: + $ref: '#/components/schemas/StatusCodeReport' + StatusCodeSummary: + example: + charts: + status_code: + - name: name + "y": 0 + - name: name + "y": 0 + statistics: "{}" + properties: + statistics: + deprecated: true + type: object + charts: + $ref: '#/components/schemas/StatusCodeSummary_charts' + type: object + StatusCodeSummaryData: + allOf: + - $ref: '#/components/schemas/DataResponse' + example: + data: + charts: + status_code: + - name: name + "y": 0 + - name: name + "y": 0 + statistics: "{}" + properties: + data: + $ref: '#/components/schemas/StatusCodeSummary' + ErrorLog: + example: + upstreams: + - address: address + count: 6 + - address: address + count: 6 + name: name + count: 0 + properties: + name: + description: The error message + type: string + count: + description: The error's count + type: integer + upstreams: + items: + $ref: '#/components/schemas/ErrorLog_upstreams_inner' + type: array + type: object + ErrorLogsData: + allOf: + - $ref: '#/components/schemas/DataResponse' + example: + data: + - upstreams: + - address: address + count: 6 + - address: address + count: 6 + name: name + count: 0 + - upstreams: + - address: address + count: 6 + - address: address + count: 6 + name: name + count: 0 + properties: + data: + items: + $ref: '#/components/schemas/ErrorLog' + type: array + ErrorLogChart: + example: + charts: + status_code: + series: + - data: + - 0 + - 0 + name: name + - data: + - 0 + - 0 + name: name + categories: + - 2000-01-23T04:56:07.000+00:00 + - 2000-01-23T04:56:07.000+00:00 + title: reports.status_code + statistics: + status_codes: + key: "" + properties: + statistics: + $ref: '#/components/schemas/ErrorLogChart_statistics' + charts: + $ref: '#/components/schemas/ErrorLogChart_charts' + type: object + ErrorLogChartData: + allOf: + - $ref: '#/components/schemas/DataResponse' + example: + data: + charts: + status_code: + series: + - data: + - 0 + - 0 + name: name + - data: + - 0 + - 0 + name: name + categories: + - 2000-01-23T04:56:07.000+00:00 + - 2000-01-23T04:56:07.000+00:00 + title: reports.status_code + statistics: + status_codes: + key: "" + properties: + data: + $ref: '#/components/schemas/ErrorLogChart' + DnsRequestReport: + example: + charts: + requests: + series: + - data: + - 6 + - 6 + name: reports.requests.request + - data: + - 6 + - 6 + name: reports.requests.request + categories: + - 2000-01-23T04:56:07.000+00:00 + - 2000-01-23T04:56:07.000+00:00 + title: reports.requests + statistics: + total: 0 + top: 2000-01-23T04:56:07.000+00:00 + properties: + statistics: + $ref: '#/components/schemas/DnsRequestReport_statistics' + charts: + $ref: '#/components/schemas/DnsRequestReport_charts' + type: object + DnsRequestReportData: + allOf: + - $ref: '#/components/schemas/DataResponse' + example: + data: + charts: + requests: + series: + - data: + - 6 + - 6 + name: reports.requests.request + - data: + - 6 + - 6 + name: reports.requests.request + categories: + - 2000-01-23T04:56:07.000+00:00 + - 2000-01-23T04:56:07.000+00:00 + title: reports.requests + statistics: + total: 0 + top: 2000-01-23T04:56:07.000+00:00 + properties: + data: + $ref: '#/components/schemas/DnsRequestReport' + DnsGeoReport: + example: + charts: + requests: + IRN: + fillKey: 4 + name: Iran (Islamic Republic of) + value: 12456789 + lists: + - country: country + code: code + name: name + requests: 0 + - country: country + code: code + name: name + requests: 0 + statistics: + - "" + - "" + properties: + statistics: + deprecated: true + items: {} + type: array + charts: + $ref: '#/components/schemas/DnsGeoReport_charts' + lists: + items: + $ref: '#/components/schemas/DnsGeoReport_lists_inner' + type: array + type: object + DnsGeoReportData: + allOf: + - $ref: '#/components/schemas/DataResponse' + example: + data: + charts: + requests: + IRN: + fillKey: 4 + name: Iran (Islamic Republic of) + value: 12456789 + lists: + - country: country + code: code + name: name + requests: 0 + - country: country + code: code + name: name + requests: 0 + statistics: + - "" + - "" + properties: + data: + $ref: '#/components/schemas/DnsGeoReport' + AttackReport: + example: + charts: + attacks: + series: + - data: + - 0 + - 0 + name: reports.attack.attacks + - data: + - 0 + - 0 + name: reports.attack.attacks + categories: + - 2000-01-23T04:56:07.000+00:00 + - 2000-01-23T04:56:07.000+00:00 + title: reports.attack + statistics: + attacks: + total: 0 + top: 2000-01-23T04:56:07.000+00:00 + properties: + statistics: + $ref: '#/components/schemas/AttackReport_statistics' + charts: + $ref: '#/components/schemas/AttackReport_charts' + type: object + AttackReportItem: + example: + alerts: + - alerts + - alerts + method: GET + cookie: + - cookie + - cookie + attacker_country: attacker_country + uri_args: uri_args + attacker_ip: attacker_ip + host: + - host + - host + uri: https://openapi-generator.tech + user_agent: + - user_agent + - user_agent + timestamp: 2000-01-23T04:56:07.000+00:00 + properties: + attacker_ip: + format: ipv4 + type: string + attacker_country: + type: string + method: + enum: + - GET + - POST + - PUT + - PATCH + - DELETE + - HEAD + - OPTION + type: string + uri: + format: uri + type: string + host: + items: + format: hostname + type: string + type: array + timestamp: + format: date-time + type: string + uri_args: + type: string + cookie: + items: + type: string + type: array + alerts: + items: + type: string + type: array + user_agent: + items: + type: string + type: array + type: object + AttackReportMap: + example: + charts: + attacks: + key: + fillKey: 6 + name: name + value: 1 + lists: + - country: country + code: code + attack: 0 + name: name + - country: country + code: code + attack: 0 + name: name + statistics: + - country: country + code: code + attack: 0 + name: name + - country: country + code: code + attack: 0 + name: name + properties: + statistics: + deprecated: true + items: + $ref: '#/components/schemas/AttackReportMap_statistics_inner' + type: array + charts: + $ref: '#/components/schemas/AttackReportMap_charts' + lists: + items: + $ref: '#/components/schemas/AttackReportMap_statistics_inner' + type: array + type: object + AttackReportMapData: + allOf: + - $ref: '#/components/schemas/DataResponse' + example: + data: + charts: + attacks: + key: + fillKey: 6 + name: name + value: 1 + lists: + - country: country + code: code + attack: 0 + name: name + - country: country + code: code + attack: 0 + name: name + statistics: + - country: country + code: code + attack: 0 + name: name + - country: country + code: code + attack: 0 + name: name + properties: + data: + $ref: '#/components/schemas/AttackReportMap' + AttackReportUri: + example: + count: 0 + uri: https://openapi-generator.tech + properties: + uri: + format: uri + type: string + count: + type: integer + type: object + AttackReportUriData: + allOf: + - $ref: '#/components/schemas/DataResponse' + example: + data: + - count: 0 + uri: https://openapi-generator.tech + - count: 0 + uri: https://openapi-generator.tech + properties: + data: + items: + $ref: '#/components/schemas/AttackReportUri' + type: array + BulkTrafficReport: + example: + data: + ingress_bytes: 6 + requests: 0 + egress_bytes: + iran: 1 + europe_americas: 5 + others: 5 + resource: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + success: true + message: message + properties: + resource: + description: Domain's ID + format: uuid + type: string + success: + type: boolean + message: + description: The error message + nullable: true + type: string + data: + $ref: '#/components/schemas/BulkTrafficReport_data' + type: object + BulkTrafficReportData: + allOf: + - $ref: '#/components/schemas/DataResponse' + example: + data: + - data: + ingress_bytes: 6 + requests: 0 + egress_bytes: + iran: 1 + europe_americas: 5 + others: 5 + resource: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + success: true + message: message + - data: + ingress_bytes: 6 + requests: 0 + egress_bytes: + iran: 1 + europe_americas: 5 + others: 5 + resource: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + success: true + message: message + properties: + data: + items: + $ref: '#/components/schemas/BulkTrafficReport' + type: array + BulkVisitorReport: + example: + data: + visitors: 0 + resource: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + success: true + message: message + properties: + resource: + description: Domain's ID + format: uuid + type: string + success: + type: boolean + message: + description: The error message + nullable: true + type: string + data: + $ref: '#/components/schemas/BulkVisitorReport_data' + type: object + BulkVisitorReportData: + allOf: + - $ref: '#/components/schemas/DataResponse' + example: + data: + - data: + visitors: 0 + resource: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + success: true + message: message + - data: + visitors: 0 + resource: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + success: true + message: message + properties: + data: + items: + $ref: '#/components/schemas/BulkVisitorReport' + type: array + EmailForwardingStats: + example: + recipients_count: 0 + aliases_count: 6 + is_active: true + emails_forwarded: 1 + dns_activation: true + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + is_configured: true + emails_replied: 5 + emails_blocked: 5 + properties: + id: + format: uuid + type: string + dns_activation: + type: boolean + recipients_count: + type: integer + aliases_count: + type: integer + is_active: + type: boolean + is_configured: + type: boolean + emails_forwarded: + type: integer + emails_blocked: + type: integer + emails_replied: + type: integer + type: object + EmailForwardingStatsData: + allOf: + - $ref: '#/components/schemas/DataResponse' + example: + data: + recipients_count: 0 + aliases_count: 6 + is_active: true + emails_forwarded: 1 + dns_activation: true + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + is_configured: true + emails_replied: 5 + emails_blocked: 5 + properties: + data: + $ref: '#/components/schemas/EmailForwardingStats' + EmailForwardingRecipientsList: + items: + $ref: '#/components/schemas/EmailForwardingRecipientsList_inner' + type: array + EmailForwardingRecipientsListData: + allOf: + - $ref: '#/components/schemas/DataResponse' + example: + data: + - id: id + is_default: true + is_verified: true + email: email + - id: id + is_default: true + is_verified: true + email: email + properties: + data: + items: + $ref: '#/components/schemas/EmailForwardingRecipientsList_inner' + type: array + EmailForwardingRecipientsStore: + example: + email: email + properties: + email: + format: email + type: string + required: + - email + type: object + EmailForwardingRecipient: + example: + id: id + is_default: true + is_verified: true + email: email + properties: + id: + type: string + email: + format: email + type: string + is_verified: + type: boolean + is_default: + type: boolean + type: object + EmailForwardingRecipientsVerify: + example: + code: code + properties: + code: + type: string + required: + - code + type: object + EmailForwardingAliasesList: + items: + $ref: '#/components/schemas/EmailForwardingAliasesList_inner' + type: array + EmailForwardingAliasesListData: + allOf: + - $ref: '#/components/schemas/DataResponse' + example: + data: + - is_active: true + local_part: local_part + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + email: email + - is_active: true + local_part: local_part + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + email: email + properties: + data: + items: + $ref: '#/components/schemas/EmailForwardingAliasesList_inner' + type: array + EmailForwardingAliasesStore: + example: + local_part: local_part + recipients: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + local_part: + type: string + recipients: + items: + format: uuid + type: string + type: array + required: + - local_part + - recipients + type: object + EmailForwardingAlias: + example: + is_active: true + local_part: local_part + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + email: email + properties: + id: + format: uuid + type: string + local_part: + type: string + email: + format: email + type: string + is_active: + type: boolean + type: object + EmailForwardingAliasesToggleActivation: + example: + is_active: true + properties: + is_active: + type: boolean + required: + - is_active + type: object + EmailForwardingAliasesRecipients: + example: + recipients: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + recipients: + items: + format: uuid + type: string + type: array + required: + - recipients + type: object + DataWithMessageResponse: + properties: + message: + nullable: true + type: string + data: + nullable: true + type: object + type: object + DataResponse: + properties: + data: + nullable: true + type: object + type: object + PaginatedResponse: + properties: + data: + items: + type: object + type: array + links: + $ref: '#/components/schemas/PaginatedResponseLinks' + meta: + $ref: '#/components/schemas/PaginatedResponseMeta' + type: object + PaginatedResponseMeta: + properties: + current_page: + type: integer + from: + type: integer + last_page: + type: integer + path: + format: url + type: string + per_page: + type: integer + to: + type: integer + total: + type: integer + type: object + PaginatedResponseLinks: + properties: + first: + format: url + type: string + last: + format: url + nullable: true + type: string + prev: + format: url + nullable: true + type: string + next: + format: url + nullable: true + type: string + required: + - first + - next + - prev + type: object + CustomCname: + example: + address: address + properties: + address: + format: hostname + type: string + required: + - address + type: object + DomainTransferData: + example: + incoming: true + account_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + owner_name: owner_name + owner_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + domain: domain + account_name: account_name + time: 2000-01-23T04:56:07.000+00:00 + properties: + domain: + format: hostname + type: string + account_id: + format: uuid + type: string + account_name: + type: string + owner_name: + type: string + owner_id: + format: uuid + type: string + time: + format: date-time + type: string + incoming: + type: boolean + readOnly: true + type: object + Domain: + example: + custom_cname: custom_cname + created_at: 2000-01-23T04:56:07.000+00:00 + type: full + target_cname: target_cname + plan_level: 0 + transfer: + incoming: true + account_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + owner_name: owner_name + owner_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + domain: domain + account_name: account_name + time: 2000-01-23T04:56:07.000+00:00 + dns_cloud: false + updated_at: 2000-01-23T04:56:07.000+00:00 + user_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + domain: domain + name: name + restriction: + - paused + - paused + ns_keys: + - ns_keys + - ns_keys + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + current_ns: + - current_ns + - current_ns + status: initializing + properties: + id: + format: uuid + readOnly: true + type: string + user_id: + format: uuid + type: string + domain: + deprecated: true + description: Deprecated in favor of name attribute + format: hostname + type: string + name: + format: hostname + type: string + plan_level: + description: | + - `0` - Traffic + - `1` - Basic + - `2` - Growth + - `3` - Professional + - `4` - Enterprise + maximum: 4 + minimum: 0 + type: integer + ns_keys: + description: Desired NS values for the domain + items: + format: hostname + type: string + maxItems: 2 + minItems: 2 + type: array + current_ns: + description: Current NS values for the domain + items: + format: hostname + type: string + maxItems: 2 + minItems: 2 + type: array + target_cname: + description: Current record for CNAME Setup of the domain + format: hostname + nullable: true + type: string + custom_cname: + description: Domain's custom record for CNAME Setup + format: hostname + nullable: true + type: string + type: + description: Partial domain is using CNAME Setup and full domain is using + NS Setup + enum: + - full + - partial + type: string + status: + enum: + - initializing + - pending + - active + - moved + type: string + dns_cloud: + default: false + type: boolean + restriction: + items: + enum: + - paused + - suspended + - unfair + - charged + type: string + type: array + transfer: + $ref: '#/components/schemas/DomainTransferData' + created_at: + format: date-time + readOnly: true + type: string + updated_at: + format: date-time + readOnly: true + type: string + type: object + DomainStore: + example: + domain_type: full + plan_level: 0 + domain: domain + properties: + domain: + description: Name of the domain + format: hostname + type: string + domain_type: + default: full + description: "If you want to register a subdomain, you can use cname setup\ + \ by sending partial type" + enum: + - full + - partial + type: string + plan_level: + description: | + - `0` - Traffic + - `1` - Basic + - `2` - Growth + - `3` - Professional + - `4` - Enterprise + maximum: 4 + minimum: 0 + type: integer + required: + - domain + type: object + DomainResponse: + allOf: + - $ref: '#/components/schemas/DataWithMessageResponse' + example: + data: + custom_cname: custom_cname + created_at: 2000-01-23T04:56:07.000+00:00 + type: full + target_cname: target_cname + plan_level: 0 + transfer: + incoming: true + account_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + owner_name: owner_name + owner_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + domain: domain + account_name: account_name + time: 2000-01-23T04:56:07.000+00:00 + dns_cloud: false + updated_at: 2000-01-23T04:56:07.000+00:00 + user_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + domain: domain + name: name + restriction: + - paused + - paused + ns_keys: + - ns_keys + - ns_keys + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + current_ns: + - current_ns + - current_ns + status: initializing + properties: + data: + $ref: '#/components/schemas/Domain' + TransferDomain: + example: + account_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + account_id: + format: uuid + type: string + required: + - account_id + type: object + TransferDomainChangeStatus: + example: + preserve_state: false + domain: example.com + status: accept + properties: + domain: + example: example.com + format: hostname + type: string + status: + enum: + - accept + - cancel + type: string + preserve_state: + default: false + type: boolean + required: + - domain + - status + type: object + NsKeys: + example: + ns_keys: + - ns_keys + - ns_keys + properties: + ns_keys: + description: Desired NS values for the domain + items: + format: hostname + type: string + type: array + type: object + NsKeysResponse: + allOf: + - $ref: '#/components/schemas/DataWithMessageResponse' + example: + data: "{}" + properties: + data: + properties: + ns_keys: + description: Desired NS values for the domain + items: + format: hostname + type: string + type: array + type: object + NsDomain: + example: + ns_keys: + - ns_keys + - ns_keys + ns_domain: + - ns_domain + - ns_domain + properties: + ns_domain: + description: Current NS records of the domain + items: + format: hostname + type: string + type: array + ns_keys: + description: Desired NS values for the domain + items: + format: hostname + type: string + type: array + type: object + DeprecatedNs: + example: + ns_status: true + ns_keys: + - ns_keys + - ns_keys + ns_domain: + - ns_domain + - ns_domain + properties: + ns_domain: + description: Current NS records of the domain + items: + format: hostname + type: string + type: array + ns_keys: + description: Desired NS values for the domain + items: + format: hostname + type: string + type: array + ns_status: + type: boolean + type: object + Plan: + description: | + - `0` - Traffic + - `1` - Basic + - `2` - Growth + - `3` - Professional + - `4` - Enterprise + maximum: 4 + minimum: 0 + type: integer + PlanUpdate: + example: + plan_level: 0 + properties: + plan_level: + description: | + - `0` - Traffic + - `1` - Basic + - `2` - Growth + - `3` - Professional + - `4` - Enterprise + maximum: 4 + minimum: 0 + type: integer + required: + - plan_level + type: object + A-RecordValue: + properties: + ip: + format: ipv4 + type: string + port: + maximum: 65535 + minimum: 1 + nullable: true + type: integer + weight: + maximum: 1000 + minimum: 0 + nullable: true + type: integer + original_weight: + description: This key shows itself here if the weight have been changed + by Health Check. + example: 100 + readOnly: true + type: integer + country: + description: ISO 3166 alpha-2 country code + example: US + nullable: true + type: string + type: object + A-RecordValues: + items: + $ref: '#/components/schemas/A-RecordValue' + type: array + AAAA-RecordValues: + items: + $ref: '#/components/schemas/AAAA-RecordValue' + type: array + AAAA-RecordValue: + properties: + ip: + format: ipv6 + type: string + port: + maximum: 65535 + minimum: 1 + nullable: true + type: integer + weight: + maximum: 1000 + minimum: 0 + nullable: true + type: integer + original_weight: + description: This key shows itself here if the weights have been changed + by Health Check. + example: 100 + readOnly: true + type: integer + country: + description: ISO 3166 alpha-2 country code + example: US + nullable: true + type: string + required: + - ip + type: object + MX-RecordValue: + properties: + host: + example: cdn.example.com + format: hostname + maxLength: 500 + pattern: "^([a-zA-Z0-9._-])+$" + type: string + priority: + maximum: 9999 + minimum: 0 + nullable: true + type: integer + required: + - host + - priority + type: object + NS-RecordValue: + properties: + host: + example: cdn.example.com + format: hostname + maxLength: 500 + pattern: "^([a-zA-Z0-9._-])+$" + type: string + required: + - host + type: object + SRV-RecordValue: + properties: + target: + example: cdn.example.com + format: hostname + maxLength: 500 + pattern: "^([a-zA-Z0-9._-])+$" + type: string + port: + maximum: 65535 + minimum: 1 + nullable: true + type: integer + weight: + maximum: 1000 + minimum: 0 + nullable: true + type: integer + priority: + maximum: 9999 + minimum: 0 + nullable: true + type: integer + required: + - port + - target + type: object + TXT-RecordValue: + properties: + text: + maxLength: 500 + type: string + required: + - text + type: object + SPF-RecordValue: + $ref: '#/components/schemas/TXT-RecordValue' + DKIM-RecordValue: + $ref: '#/components/schemas/TXT-RecordValue' + ANAME-RecordValue: + properties: + location: + description: A fully-qualified domain name (FQDN) + example: cdn.example.com + format: hostname + type: string + host_header: + enum: + - source + - dest + nullable: true + type: string + port: + maximum: 65535 + minimum: 1 + nullable: true + type: integer + required: + - host_header + - location + type: object + CNAME-RecordValue: + properties: + host: + description: A fully-qualified domain name (FQDN) + example: cdn.example.com + format: hostname + type: string + host_header: + enum: + - source + - dest + nullable: true + type: string + port: + maximum: 65535 + minimum: 1 + nullable: true + type: integer + required: + - host + - host_header + type: object + PTR-RecordValue: + properties: + domain: + example: cdn.example.com + format: hostname + maxLength: 500 + pattern: "^([a-zA-Z0-9._-])+$" + type: string + type: object + TLSA-RecordValue: + properties: + usage: + maxLength: 255 + minLength: 0 + type: string + selector: + maxLength: 255 + minLength: 0 + type: string + matching_type: + maxLength: 255 + minLength: 0 + type: string + certificate: + example: 1SKJND4KSID7OS9KJ21LSJ + type: string + required: + - certificate + - matching_type + - selector + - usage + type: object + CAA-RecordValue: + properties: + value: + description: Should be a valid domain + example: example.com + type: string + tag: + enum: + - issuewild + - issue + - iodef + type: string + required: + - tag + - value + type: object + Fqdn: + description: A fully-qualified domain name (FQDN) + example: cdn.example.com + format: hostname + type: string + HostName: + example: cdn.example.com + format: hostname + maxLength: 500 + pattern: "^([a-zA-Z0-9._-])+$" + type: string + DnsRecord: + oneOf: + - $ref: '#/components/schemas/A-Record' + - $ref: '#/components/schemas/AAAA-Record' + - $ref: '#/components/schemas/NS-Record' + - $ref: '#/components/schemas/TXT-Record' + - $ref: '#/components/schemas/CNAME-Record' + - $ref: '#/components/schemas/ANAME-Record' + - $ref: '#/components/schemas/MX-Record' + - $ref: '#/components/schemas/SRV-Record' + - $ref: '#/components/schemas/SPF-Record' + - $ref: '#/components/schemas/DKIM-Record' + - $ref: '#/components/schemas/PTR-Record' + - $ref: '#/components/schemas/TLSA-Record' + - $ref: '#/components/schemas/CAA-Record' + DnsRecordGeneric: + anyOf: + - $ref: '#/components/schemas/DnsRecordGenericArrayValue' + - $ref: '#/components/schemas/DnsRecordGenericObjectValue' + DnsRecordGenericObjectValue: + allOf: + - $ref: '#/components/schemas/BaseDnsRecord' + properties: + value: + example: + text: example + type: object + type: + example: cname + type: string + DnsRecordGenericArrayValue: + allOf: + - $ref: '#/components/schemas/BaseDnsRecord' + properties: + value: + example: + - ip: 198.51.100.42 + port: 65535 + weight: 1000 + country: US + items: {} + type: array + type: + example: a + type: string + CAA-Record: + allOf: + - $ref: '#/components/schemas/BaseDnsRecord' + properties: + value: + $ref: '#/components/schemas/CAA-RecordValue' + type: + default: caa + enum: + - caa + type: string + TLSA-Record: + allOf: + - $ref: '#/components/schemas/BaseDnsRecord' + properties: + value: + $ref: '#/components/schemas/TLSA-RecordValue' + type: + default: tlsa + enum: + - tlsa + type: string + PTR-Record: + allOf: + - $ref: '#/components/schemas/BaseDnsRecord' + properties: + value: + $ref: '#/components/schemas/PTR-RecordValue' + type: + default: ptr + enum: + - ptr + type: string + DKIM-Record: + allOf: + - $ref: '#/components/schemas/BaseDnsRecord' + properties: + value: + $ref: '#/components/schemas/TXT-RecordValue' + type: + default: dkim + enum: + - dkim + type: string + SPF-Record: + allOf: + - $ref: '#/components/schemas/BaseDnsRecord' + properties: + value: + $ref: '#/components/schemas/TXT-RecordValue' + type: + default: spf + enum: + - spf + type: string + SRV-Record: + allOf: + - $ref: '#/components/schemas/BaseDnsRecord' + properties: + value: + $ref: '#/components/schemas/SRV-RecordValue' + type: + default: srv + enum: + - srv + type: string + TXT-Record: + allOf: + - $ref: '#/components/schemas/BaseDnsRecord' + properties: + value: + $ref: '#/components/schemas/TXT-RecordValue' + type: + default: txt + enum: + - txt + type: string + MX-Record: + allOf: + - $ref: '#/components/schemas/BaseDnsRecord' + properties: + value: + $ref: '#/components/schemas/MX-RecordValue' + type: + default: mx + enum: + - mx + type: string + ANAME-Record: + allOf: + - $ref: '#/components/schemas/BaseDnsRecord' + properties: + value: + $ref: '#/components/schemas/ANAME-RecordValue' + type: + default: aname + enum: + - aname + type: string + CNAME-Record: + allOf: + - $ref: '#/components/schemas/BaseDnsRecord' + properties: + value: + $ref: '#/components/schemas/CNAME-RecordValue' + type: + default: cname + enum: + - cname + type: string + NS-Record: + allOf: + - $ref: '#/components/schemas/BaseDnsRecord' + properties: + value: + $ref: '#/components/schemas/NS-RecordValue' + type: + default: ns + enum: + - ns + type: string + A-Record: + allOf: + - $ref: '#/components/schemas/BaseDnsRecord' + properties: + value: + items: + $ref: '#/components/schemas/A-RecordValue' + type: array + type: + default: a + enum: + - a + type: string + AAAA-Record: + allOf: + - $ref: '#/components/schemas/BaseDnsRecord' + properties: + value: + items: + $ref: '#/components/schemas/AAAA-RecordValue' + type: array + type: + default: aaaa + enum: + - aaaa + type: string + BaseDnsRecord: + properties: + id: + format: uuid + readOnly: true + type: string + name: + maxLength: 250 + type: string + ttl: + enum: + - 120 + - 180 + - 300 + - 600 + - 900 + - 1800 + - 3600 + - 7200 + - 18000 + - 43200 + - 86400 + - 172800 + - 432000 + type: integer + cloud: + default: false + type: boolean + upstream_https: + enum: + - default + - auto + - http + - https + type: string + ip_filter_mode: + $ref: '#/components/schemas/DnsRecordIpFilterMode' + is_protected: + default: false + description: Protected records cannot be modified or deleted by user. + readOnly: true + type: boolean + usage: + default: [] + items: + enum: + - transport-layer-proxy + - certificate-issuance + type: string + readOnly: true + type: array + created_at: + format: date-time + readOnly: true + type: string + updated_at: + format: date-time + readOnly: true + type: string + type: object + DnsRecordIpFilterMode: + properties: + count: + enum: + - single + - multi + type: string + order: + enum: + - none + - weighted + - rr + type: string + geo_filter: + enum: + - none + - location + - country + type: string + type: object + DnsRecordResponse: + allOf: + - $ref: '#/components/schemas/DataWithMessageResponse' + example: + data: null + properties: + data: + $ref: '#/components/schemas/DnsRecordGeneric' + DnsRecordData: + allOf: + - $ref: '#/components/schemas/DataResponse' + example: + data: null + properties: + data: + $ref: '#/components/schemas/DnsRecordGeneric' + DnsRecordCloud: + example: + cloud: true + properties: + cloud: + type: boolean + required: + - cloud + type: object + DnsRecordImport: + properties: + f_zone_file: + format: binary + type: string + type: object + DnsSec: + example: + enabled: false + ds: ds + properties: + enabled: + default: false + type: boolean + ds: + nullable: true + type: string + type: object + DnsSecData: + allOf: + - $ref: '#/components/schemas/DataResponse' + example: + data: + enabled: false + ds: ds + properties: + data: + $ref: '#/components/schemas/DnsSec' + DnsSecStatus: + example: + enable: true + properties: + enable: + type: boolean + required: + - enable + type: object + PageRuleSummary: + example: + url_type: default + created_at: 2000-01-23T04:56:07.000+00:00 + is_protected: false + fw_status: true + url: url + cache_level: query_string + slink_status: false + domain_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + acceleration: + extensions: + - css + - js + status: inherit + waf_status: true + updated_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + seq: 0 + status: true + properties: + id: + format: uuid + readOnly: true + type: string + domain_id: + format: uuid + type: string + seq: + description: Order of the page-rule + minimum: 0 + type: integer + url_type: + default: default + deprecated: true + description: This flag is deprecated in favor of is_protected flag + enum: + - default + - index + - directory + - extension + - page + - regex + type: string + is_protected: + default: false + description: Protected records cannot be modified or deleted by user. + readOnly: true + type: boolean + url: + description: URL pattern of target pages + type: string + cache_level: + default: query_string + enum: + - "false" + - uri + - query_string + type: string + waf_status: + default: true + type: boolean + fw_status: + default: true + deprecated: true + description: Shows whether firewall is enabled or not + type: boolean + acceleration: + $ref: '#/components/schemas/Acceleration' + slink_status: + default: false + description: Secure link is enabled or not + type: boolean + status: + default: true + description: Is the page-rule enabled? + type: boolean + created_at: + format: date-time + readOnly: true + type: string + updated_at: + format: date-time + readOnly: true + type: string + type: object + PageRule: + allOf: + - $ref: '#/components/schemas/PageRuleSummary' + example: + load_balancer: load_balancer + res_custom_headers: + - "{}" + - "{}" + upstream_timeout: + connect_timeout: 0 + send_timeout: 1 + read_timeout: 6 + cache_args: true + cache_ignore_sc: false + cors_header: "-" + cluster_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + cache_cookie: cache_cookie + cluster_status: false + cache_device_type: false + slink_secret: slink_secret + cache_arg: filter&sort + slink_md5: + - remote_addr + - remote_addr + cache_ignore_cc: true + req_hide_headers: + - req_hide_headers + - req_hide_headers + redirect: + status_code: 5 + enable: false + url: http://example.com/aeiou + cache_any: 0s + req_custom_headers: + - "{}" + - "{}" + res_hide_headers: + - res_hide_headers + - res_hide_headers + cache_200: 30m + cache_scheme: true + image_resize: + status: "on" + custom_host_header: custom_host_header + cache_browser: default + cache_ignore_vary: true + rewrite_url: "-" + properties: + cache_200: + default: 30m + enum: + - 0s + - 1s + - 2s + - 3s + - 4s + - 5s + - 6s + - 7s + - 8s + - 9s + - 10s + - 30s + - 1m + - 3m + - 5m + - 10m + - 30m + - 45m + - 1h + - 3h + - 5h + - 10h + - 12h + - 24h + - 3d + - 7d + - 10d + - 15d + - 30d + type: string + cache_any: + default: 0s + enum: + - 0s + - 1s + - 2s + - 3s + - 4s + - 5s + - 6s + - 7s + - 8s + - 9s + - 10s + - 30s + - 1m + - 3m + - 5m + - 10m + - 30m + - 45m + - 1h + - 3h + - 5h + - 10h + - 12h + - 24h + - 3d + - 7d + - 10d + - 15d + - 30d + type: string + cache_cookie: + default: "" + description: Cookie variables to consider in cache (comma separaterd values) + type: string + cache_device_type: + default: false + type: boolean + cache_args: + default: true + type: boolean + cache_arg: + default: "" + description: Query string arguments to consider in cache (& seperated values) + example: filter&sort + type: string + cache_scheme: + default: true + deprecated: true + type: boolean + cache_browser: + default: default + enum: + - default + - 0s + - 1s + - 2s + - 3s + - 4s + - 5s + - 6s + - 7s + - 8s + - 9s + - 10s + - 30s + - 1m + - 3m + - 5m + - 10m + - 30m + - 45m + - 1h + - 3h + - 5h + - 10h + - 12h + - 24h + - 3d + - 7d + - 10d + - 15d + - 30d + type: string + cache_ignore_sc: + default: false + description: Ignore default behavior in caching set-cookie header + type: boolean + cache_ignore_vary: + default: true + description: Ignore default behavior in caching vary header + type: boolean + cache_ignore_cc: + default: true + type: boolean + cors_header: + default: "-" + type: string + rewrite_url: + default: "-" + type: string + slink_secret: + default: "" + type: string + slink_md5: + default: + - remote_addr + - file + - expires + items: + enum: + - remote_addr + - file + - expires + - url + - uri + type: string + nullable: true + type: array + load_balancer: + description: Name or ID of the load balancer + nullable: true + type: string + cluster_status: + default: false + deprecated: true + type: boolean + image_resize: + $ref: '#/components/schemas/PageRuleImageResize' + cluster_id: + deprecated: true + format: uuid + nullable: true + type: string + upstream_timeout: + $ref: '#/components/schemas/UpstreamTimeout' + req_custom_headers: + default: [] + items: + properties: + name: + type: string + value: + type: string + type: object + type: array + res_custom_headers: + default: [] + items: + properties: + name: + type: string + value: + type: string + type: object + type: array + req_hide_headers: + default: [] + items: + pattern: "[\\w-]+" + type: string + type: array + res_hide_headers: + default: [] + items: + type: string + type: array + custom_host_header: + default: "" + format: hostname + type: string + redirect: + $ref: '#/components/schemas/PageRuleRedirect' + UpstreamTimeout: + example: + connect_timeout: 0 + send_timeout: 1 + read_timeout: 6 + properties: + connect_timeout: + default: 30 + description: Seconds to timeout + type: integer + read_timeout: + default: 100 + description: Seconds to timeout + type: integer + send_timeout: + default: 300 + description: Seconds to timeout + type: integer + type: object + PageRuleRedirect: + example: + status_code: 5 + enable: false + url: http://example.com/aeiou + properties: + enable: + default: false + type: boolean + status_code: + default: 301 + enum: + - 301 + - 302 + - 307 + type: integer + url: + format: url + nullable: true + type: string + type: object + PageRuleResponse: + allOf: + - $ref: '#/components/schemas/DataWithMessageResponse' + example: + data: + load_balancer: load_balancer + res_custom_headers: + - "{}" + - "{}" + upstream_timeout: + connect_timeout: 0 + send_timeout: 1 + read_timeout: 6 + cache_args: true + cache_ignore_sc: false + cors_header: "-" + cluster_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + cache_cookie: cache_cookie + cluster_status: false + cache_device_type: false + slink_secret: slink_secret + cache_arg: filter&sort + slink_md5: + - remote_addr + - remote_addr + cache_ignore_cc: true + req_hide_headers: + - req_hide_headers + - req_hide_headers + redirect: + status_code: 5 + enable: false + url: http://example.com/aeiou + cache_any: 0s + req_custom_headers: + - "{}" + - "{}" + res_hide_headers: + - res_hide_headers + - res_hide_headers + cache_200: 30m + cache_scheme: true + image_resize: + status: "on" + custom_host_header: custom_host_header + cache_browser: default + cache_ignore_vary: true + rewrite_url: "-" + properties: + data: + $ref: '#/components/schemas/PageRule' + PageRuleData: + allOf: + - $ref: '#/components/schemas/DataResponse' + example: + data: + load_balancer: load_balancer + res_custom_headers: + - "{}" + - "{}" + upstream_timeout: + connect_timeout: 0 + send_timeout: 1 + read_timeout: 6 + cache_args: true + cache_ignore_sc: false + cors_header: "-" + cluster_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + cache_cookie: cache_cookie + cluster_status: false + cache_device_type: false + slink_secret: slink_secret + cache_arg: filter&sort + slink_md5: + - remote_addr + - remote_addr + cache_ignore_cc: true + req_hide_headers: + - req_hide_headers + - req_hide_headers + redirect: + status_code: 5 + enable: false + url: http://example.com/aeiou + cache_any: 0s + req_custom_headers: + - "{}" + - "{}" + res_hide_headers: + - res_hide_headers + - res_hide_headers + cache_200: 30m + cache_scheme: true + image_resize: + status: "on" + custom_host_header: custom_host_header + cache_browser: default + cache_ignore_vary: true + rewrite_url: "-" + properties: + data: + $ref: '#/components/schemas/PageRule' + PageRuleDiff: + example: + res_custom_headers: + - name: name + is_var: true + value: value + - name: name + is_var: true + value: value + upstream_timeout: + connect_timeout: 0 + send_timeout: 1 + read_timeout: 6 + cache_args: true + fw_status: true + cache_ignore_sc: true + cache_level: "off" + acceleration: + extensions: + - css + - js + status: inherit + cors_header: cors_header + cluster_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + cache_cookie: cache_cookie + cluster_status: true + slink_secret: slink_secret + cache_arg: filter&sort + slink_md5: + - remote_addr + - remote_addr + cache_ignore_cc: true + req_hide_headers: + - req_hide_headers + - req_hide_headers + redirect: + status_code: 0 + enable: true + url: http://example.com/aeiou + cache_any: 0s + req_custom_headers: + - name: name + is_var: true + value: value + - name: name + is_var: true + value: value + url: url + res_hide_headers: + - res_hide_headers + - res_hide_headers + slink_status: true + cache_200: 0s + waf_status: true + cache_scheme: true + custom_host_header: custom_host_header + cache_browser: default + status: true + cache_ignore_vary: true + rewrite_url: rewrite_url + properties: + url: + description: URL pattern of target pages + type: string + cache_level: + enum: + - "off" + - uri + - query_string + type: string + waf_status: + type: boolean + fw_status: + deprecated: true + description: Shows whether firewall is enabled or not + type: boolean + acceleration: + $ref: '#/components/schemas/Acceleration' + slink_status: + description: Secure link is enabled or not + type: boolean + status: + description: Is the page-rule enabled? + type: boolean + cache_200: + enum: + - 0s + - 1s + - 2s + - 3s + - 4s + - 5s + - 6s + - 7s + - 8s + - 9s + - 10s + - 30s + - 1m + - 3m + - 5m + - 10m + - 30m + - 45m + - 1h + - 3h + - 5h + - 10h + - 12h + - 24h + - 3d + - 7d + - 10d + - 15d + - 30d + type: string + cache_any: + enum: + - 0s + - 1s + - 2s + - 3s + - 4s + - 5s + - 6s + - 7s + - 8s + - 9s + - 10s + - 30s + - 1m + - 3m + - 5m + - 10m + - 30m + - 45m + - 1h + - 3h + - 5h + - 10h + - 12h + - 24h + - 3d + - 7d + - 10d + - 15d + - 30d + type: string + cache_cookie: + description: Cookie variables to consider in cache (comma separaterd values) + type: string + cache_args: + type: boolean + cache_arg: + default: "" + description: Query string arguments to consider in cache (& seperated values) + example: filter&sort + type: string + cache_scheme: + deprecated: true + type: boolean + cache_browser: + enum: + - default + - 0s + - 1s + - 2s + - 3s + - 4s + - 5s + - 6s + - 7s + - 8s + - 9s + - 10s + - 30s + - 1m + - 3m + - 5m + - 10m + - 30m + - 45m + - 1h + - 3h + - 5h + - 10h + - 12h + - 24h + - 3d + - 7d + - 10d + - 15d + - 30d + type: string + cache_ignore_sc: + description: Ignore default behavior in caching set-cookie header + type: boolean + cache_ignore_vary: + description: Ignore default behavior in caching vary header + type: boolean + cache_ignore_cc: + type: boolean + cors_header: + type: string + rewrite_url: + type: string + slink_secret: + type: string + slink_md5: + items: + enum: + - remote_addr + - file + - expires + - url + - uri + type: string + nullable: true + type: array + cluster_status: + type: boolean + cluster_id: + format: uuid + nullable: true + type: string + upstream_timeout: + $ref: '#/components/schemas/UpstreamTimeout' + req_custom_headers: + default: [] + items: + $ref: '#/components/schemas/PageRuleDiff_req_custom_headers_inner' + type: array + res_custom_headers: + default: [] + items: + $ref: '#/components/schemas/PageRuleDiff_req_custom_headers_inner' + type: array + req_hide_headers: + default: [] + items: + pattern: "[\\w-]+" + type: string + type: array + res_hide_headers: + items: + type: string + type: array + custom_host_header: + format: hostname + type: string + redirect: + $ref: '#/components/schemas/PageRuleDiff_redirect' + type: object + PageRuleDiffData: + allOf: + - $ref: '#/components/schemas/DataResponse' + example: + data: + res_custom_headers: + - name: name + is_var: true + value: value + - name: name + is_var: true + value: value + upstream_timeout: + connect_timeout: 0 + send_timeout: 1 + read_timeout: 6 + cache_args: true + fw_status: true + cache_ignore_sc: true + cache_level: "off" + acceleration: + extensions: + - css + - js + status: inherit + cors_header: cors_header + cluster_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + cache_cookie: cache_cookie + cluster_status: true + slink_secret: slink_secret + cache_arg: filter&sort + slink_md5: + - remote_addr + - remote_addr + cache_ignore_cc: true + req_hide_headers: + - req_hide_headers + - req_hide_headers + redirect: + status_code: 0 + enable: true + url: http://example.com/aeiou + cache_any: 0s + req_custom_headers: + - name: name + is_var: true + value: value + - name: name + is_var: true + value: value + url: url + res_hide_headers: + - res_hide_headers + - res_hide_headers + slink_status: true + cache_200: 0s + waf_status: true + cache_scheme: true + custom_host_header: custom_host_header + cache_browser: default + status: true + cache_ignore_vary: true + rewrite_url: rewrite_url + properties: + data: + $ref: '#/components/schemas/PageRuleDiff' + LoadBalancerRegion: + example: + name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + region: LAH + properties: + id: + format: uuid + type: string + region: + example: LAH + type: string + name: + readOnly: true + type: string + type: object + LoadBalancerSetting: + example: + protocol: auto + max_fails: 800.8281904610114 + method: cluster_rr + next_upstream_tcp: "off" + keepalive: "off" + fail_timeout: 45s + properties: + method: + enum: + - cluster_rr + - cluster_chash + type: string + next_upstream_tcp: + default: "off" + enum: + - "true" + - "false" + type: string + protocol: + enum: + - auto + - http + - https + type: string + keepalive: + default: "off" + enum: + - "true" + - "false" + type: string + max_fails: + default: 0 + description: Zero will disable failing strategy. + maximum: 10000 + minimum: 0 + type: number + fail_timeout: + default: 10s + description: Human friendly time duration. + example: 45s + type: string + type: object + LoadBalancerSettingsData: + allOf: + - $ref: '#/components/schemas/DataResponse' + example: + data: + protocol: auto + max_fails: 800.8281904610114 + method: cluster_rr + next_upstream_tcp: "off" + keepalive: "off" + fail_timeout: 45s + properties: + data: + $ref: '#/components/schemas/LoadBalancerSetting' + LoadBalancer: + example: + method: failover + updated_at: 2000-01-23T04:56:07.000+00:00 + name: lb1 + description: description + pools: + - regions: + - regions + - regions + method: cluster_rr + monitoring_status: null + keepalive: "off" + next_upstream_tcp: "off" + description: description + created_at: 2000-01-23T04:56:07.000+00:00 + priority: 0 + updated_at: 2000-01-23T04:56:07.000+00:00 + name: name + origins: + - protocol: auto + address: address + updated_at: 2000-01-23T04:56:07.000+00:00 + port: 39500 + name: name + weight: 147 + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + status: true + host_header: host_header + - protocol: auto + address: address + updated_at: 2000-01-23T04:56:07.000+00:00 + port: 39500 + name: name + weight: 147 + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + status: true + host_header: host_header + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + status: true + - regions: + - regions + - regions + method: cluster_rr + monitoring_status: null + keepalive: "off" + next_upstream_tcp: "off" + description: description + created_at: 2000-01-23T04:56:07.000+00:00 + priority: 0 + updated_at: 2000-01-23T04:56:07.000+00:00 + name: name + origins: + - protocol: auto + address: address + updated_at: 2000-01-23T04:56:07.000+00:00 + port: 39500 + name: name + weight: 147 + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + status: true + host_header: host_header + - protocol: auto + address: address + updated_at: 2000-01-23T04:56:07.000+00:00 + port: 39500 + name: name + weight: 147 + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + status: true + host_header: host_header + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + status: true + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + status: true + properties: + id: + format: uuid + readOnly: true + type: string + name: + example: lb1 + pattern: "^[A-Za-z0-9-]+$" + type: string + description: + type: string + status: + type: boolean + method: + enum: + - failover + - cluster_rr + - cluster_chash + type: string + pools: + items: + $ref: '#/components/schemas/LoadBalancerPool' + readOnly: true + type: array + created_at: + format: date-time + readOnly: true + type: string + updated_at: + format: date-time + readOnly: true + type: string + type: object + LoadBalancerResponse: + allOf: + - $ref: '#/components/schemas/DataWithMessageResponse' + example: + data: + method: failover + updated_at: 2000-01-23T04:56:07.000+00:00 + name: lb1 + description: description + pools: + - regions: + - regions + - regions + method: cluster_rr + monitoring_status: null + keepalive: "off" + next_upstream_tcp: "off" + description: description + created_at: 2000-01-23T04:56:07.000+00:00 + priority: 0 + updated_at: 2000-01-23T04:56:07.000+00:00 + name: name + origins: + - protocol: auto + address: address + updated_at: 2000-01-23T04:56:07.000+00:00 + port: 39500 + name: name + weight: 147 + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + status: true + host_header: host_header + - protocol: auto + address: address + updated_at: 2000-01-23T04:56:07.000+00:00 + port: 39500 + name: name + weight: 147 + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + status: true + host_header: host_header + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + status: true + - regions: + - regions + - regions + method: cluster_rr + monitoring_status: null + keepalive: "off" + next_upstream_tcp: "off" + description: description + created_at: 2000-01-23T04:56:07.000+00:00 + priority: 0 + updated_at: 2000-01-23T04:56:07.000+00:00 + name: name + origins: + - protocol: auto + address: address + updated_at: 2000-01-23T04:56:07.000+00:00 + port: 39500 + name: name + weight: 147 + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + status: true + host_header: host_header + - protocol: auto + address: address + updated_at: 2000-01-23T04:56:07.000+00:00 + port: 39500 + name: name + weight: 147 + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + status: true + host_header: host_header + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + status: true + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + status: true + properties: + data: + $ref: '#/components/schemas/LoadBalancer' + LoadBalancerData: + allOf: + - $ref: '#/components/schemas/DataResponse' + example: + data: + method: failover + updated_at: 2000-01-23T04:56:07.000+00:00 + name: lb1 + description: description + pools: + - regions: + - regions + - regions + method: cluster_rr + monitoring_status: null + keepalive: "off" + next_upstream_tcp: "off" + description: description + created_at: 2000-01-23T04:56:07.000+00:00 + priority: 0 + updated_at: 2000-01-23T04:56:07.000+00:00 + name: name + origins: + - protocol: auto + address: address + updated_at: 2000-01-23T04:56:07.000+00:00 + port: 39500 + name: name + weight: 147 + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + status: true + host_header: host_header + - protocol: auto + address: address + updated_at: 2000-01-23T04:56:07.000+00:00 + port: 39500 + name: name + weight: 147 + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + status: true + host_header: host_header + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + status: true + - regions: + - regions + - regions + method: cluster_rr + monitoring_status: null + keepalive: "off" + next_upstream_tcp: "off" + description: description + created_at: 2000-01-23T04:56:07.000+00:00 + priority: 0 + updated_at: 2000-01-23T04:56:07.000+00:00 + name: name + origins: + - protocol: auto + address: address + updated_at: 2000-01-23T04:56:07.000+00:00 + port: 39500 + name: name + weight: 147 + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + status: true + host_header: host_header + - protocol: auto + address: address + updated_at: 2000-01-23T04:56:07.000+00:00 + port: 39500 + name: name + weight: 147 + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + status: true + host_header: host_header + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + status: true + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + status: true + properties: + data: + $ref: '#/components/schemas/LoadBalancer' + LoadBalancerPool: + example: + regions: + - regions + - regions + method: cluster_rr + monitoring_status: null + keepalive: "off" + next_upstream_tcp: "off" + description: description + created_at: 2000-01-23T04:56:07.000+00:00 + priority: 0 + updated_at: 2000-01-23T04:56:07.000+00:00 + name: name + origins: + - protocol: auto + address: address + updated_at: 2000-01-23T04:56:07.000+00:00 + port: 39500 + name: name + weight: 147 + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + status: true + host_header: host_header + - protocol: auto + address: address + updated_at: 2000-01-23T04:56:07.000+00:00 + port: 39500 + name: name + weight: 147 + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + status: true + host_header: host_header + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + status: true + properties: + id: + format: uuid + readOnly: true + type: string + name: + type: string + description: + type: string + status: + type: boolean + priority: + description: Zero means the default pool + type: integer + method: + enum: + - cluster_rr + - cluster_chash + type: string + keepalive: + default: "off" + enum: + - "true" + - "false" + type: string + next_upstream_tcp: + default: "off" + enum: + - "true" + - "false" + type: string + regions: + items: + pattern: "^[A-Z]{3}$" + type: string + type: array + origins: + items: + $ref: '#/components/schemas/LoadBalancerOrigin' + readOnly: true + type: array + monitoring_status: + $ref: '#/components/schemas/MonitoringStatus' + created_at: + format: date-time + readOnly: true + type: string + updated_at: + format: date-time + readOnly: true + type: string + type: object + LoadBalancerPoolData: + allOf: + - $ref: '#/components/schemas/DataResponse' + example: + data: + regions: + - regions + - regions + method: cluster_rr + monitoring_status: null + keepalive: "off" + next_upstream_tcp: "off" + description: description + created_at: 2000-01-23T04:56:07.000+00:00 + priority: 0 + updated_at: 2000-01-23T04:56:07.000+00:00 + name: name + origins: + - protocol: auto + address: address + updated_at: 2000-01-23T04:56:07.000+00:00 + port: 39500 + name: name + weight: 147 + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + status: true + host_header: host_header + - protocol: auto + address: address + updated_at: 2000-01-23T04:56:07.000+00:00 + port: 39500 + name: name + weight: 147 + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + status: true + host_header: host_header + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + status: true + properties: + data: + $ref: '#/components/schemas/LoadBalancerPool' + LoadBalancerPoolResponse: + allOf: + - $ref: '#/components/schemas/DataWithMessageResponse' + example: + data: + - regions: + - regions + - regions + method: cluster_rr + monitoring_status: null + keepalive: "off" + next_upstream_tcp: "off" + description: description + created_at: 2000-01-23T04:56:07.000+00:00 + priority: 0 + updated_at: 2000-01-23T04:56:07.000+00:00 + name: name + origins: + - protocol: auto + address: address + updated_at: 2000-01-23T04:56:07.000+00:00 + port: 39500 + name: name + weight: 147 + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + status: true + host_header: host_header + - protocol: auto + address: address + updated_at: 2000-01-23T04:56:07.000+00:00 + port: 39500 + name: name + weight: 147 + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + status: true + host_header: host_header + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + status: true + - regions: + - regions + - regions + method: cluster_rr + monitoring_status: null + keepalive: "off" + next_upstream_tcp: "off" + description: description + created_at: 2000-01-23T04:56:07.000+00:00 + priority: 0 + updated_at: 2000-01-23T04:56:07.000+00:00 + name: name + origins: + - protocol: auto + address: address + updated_at: 2000-01-23T04:56:07.000+00:00 + port: 39500 + name: name + weight: 147 + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + status: true + host_header: host_header + - protocol: auto + address: address + updated_at: 2000-01-23T04:56:07.000+00:00 + port: 39500 + name: name + weight: 147 + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + status: true + host_header: host_header + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + status: true + properties: + data: + items: + $ref: '#/components/schemas/LoadBalancerPool' + type: array + LoadBalancerOrigin: + example: + protocol: auto + address: address + updated_at: 2000-01-23T04:56:07.000+00:00 + port: 39500 + name: name + weight: 147 + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + status: true + host_header: host_header + properties: + id: + format: uuid + readOnly: true + type: string + name: + type: string + status: + type: boolean + address: + type: string + port: + maximum: 65535 + minimum: -1 + type: integer + weight: + maximum: 1000 + minimum: 1 + type: integer + protocol: + default: auto + enum: + - auto + - http + - https + type: string + host_header: + type: string + created_at: + format: date-time + readOnly: true + type: string + updated_at: + format: date-time + readOnly: true + type: string + type: object + LoadBalancerOriginData: + allOf: + - $ref: '#/components/schemas/DataResponse' + example: + data: + protocol: auto + address: address + updated_at: 2000-01-23T04:56:07.000+00:00 + port: 39500 + name: name + weight: 147 + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + status: true + host_header: host_header + properties: + data: + $ref: '#/components/schemas/LoadBalancerOrigin' + LoadBalancerOriginResponse: + allOf: + - $ref: '#/components/schemas/DataWithMessageResponse' + example: + data: + protocol: auto + address: address + updated_at: 2000-01-23T04:56:07.000+00:00 + port: 39500 + name: name + weight: 147 + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + status: true + host_header: host_header + properties: + data: + $ref: '#/components/schemas/LoadBalancerOrigin' + LoadBalancerStore: + example: + method: failover + name: lb1 + description: description + status: true + properties: + name: + example: lb1 + pattern: "^[A-Za-z0-9-]+$" + type: string + description: + type: string + status: + type: boolean + method: + enum: + - failover + - cluster_rr + - cluster_chash + type: string + required: + - method + - name + - status + type: object + LoadBalancerPoolStore: + example: + regions: + - regions + - regions + method: cluster_rr + keepalive: "off" + next_upstream_tcp: "off" + name: name + description: description + origins: + - protocol: auto + address: address + port: 39500 + name: name + weight: 147 + status: true + host_header: host_header + - protocol: auto + address: address + port: 39500 + name: name + weight: 147 + status: true + host_header: host_header + priority: 0 + status: true + properties: + name: + type: string + description: + type: string + status: + type: boolean + priority: + description: Zero means the default pool + type: integer + method: + enum: + - cluster_rr + - cluster_chash + type: string + keepalive: + default: "off" + enum: + - "true" + - "false" + type: string + next_upstream_tcp: + default: "off" + enum: + - "true" + - "false" + type: string + regions: + items: + pattern: "^[A-Z]{3}$" + type: string + type: array + origins: + items: + $ref: '#/components/schemas/LoadBalancerOriginStore' + readOnly: false + type: array + required: + - keepalive + - method + - name + - next_upstream_tcp + - status + type: object + LoadBalancerOriginStore: + example: + protocol: auto + address: address + port: 39500 + name: name + weight: 147 + status: true + host_header: host_header + properties: + name: + type: string + status: + type: boolean + address: + type: string + port: + maximum: 65535 + minimum: -1 + type: integer + weight: + maximum: 1000 + minimum: 1 + type: integer + protocol: + default: auto + enum: + - auto + - http + - https + type: string + host_header: + type: string + required: + - address + - port + - protocol + - status + - weight + type: object + CacheSettings: + example: + cache_scheme: true + cache_cookie: cache_cookie + cache_developer_mode: true + cache_consistent_uptime: true + cache_args: true + cache_browser: default + cache_status: "false" + cache_page_200: 0s + cache_arg: filter&sort + cache_page_any: 0s + cache_ignore_sc: true + properties: + cache_developer_mode: + type: boolean + cache_consistent_uptime: + type: boolean + cache_status: + enum: + - "false" + - uri + - query_string + type: string + cache_page_200: + enum: + - 0s + - 1s + - 2s + - 3s + - 4s + - 5s + - 6s + - 7s + - 8s + - 9s + - 10s + - 30s + - 1m + - 3m + - 5m + - 10m + - 30m + - 45m + - 1h + - 3h + - 5h + - 10h + - 12h + - 24h + - 3d + - 7d + - 10d + - 15d + - 30d + type: string + cache_page_any: + enum: + - 0s + - 1s + - 2s + - 3s + - 4s + - 5s + - 6s + - 7s + - 8s + - 9s + - 10s + - 30s + - 1m + - 3m + - 5m + - 10m + - 30m + - 45m + - 1h + - 3h + - 5h + - 10h + - 12h + - 24h + - 3d + - 7d + - 10d + - 15d + - 30d + type: string + cache_browser: + enum: + - default + - 0s + - 1s + - 2s + - 3s + - 4s + - 5s + - 6s + - 7s + - 8s + - 9s + - 10s + - 30s + - 1m + - 3m + - 5m + - 10m + - 30m + - 45m + - 1h + - 3h + - 5h + - 10h + - 12h + - 24h + - 3d + - 7d + - 10d + - 15d + - 30d + type: string + cache_scheme: + deprecated: true + description: To consider scheme (HTTP/HTTPs) in cache + type: boolean + cache_ignore_sc: + description: Ignore default behavior in caching set-cookie header + type: boolean + cache_cookie: + description: Cookie variables to consider in cache (comma separaterd values) + type: string + cache_args: + description: To consider query args or not + type: boolean + cache_arg: + default: "" + description: Query string arguments to consider in cache (& seperated values) + example: filter&sort + type: string + type: object + CacheSettingsData: + allOf: + - $ref: '#/components/schemas/DataResponse' + example: + data: + cache_scheme: true + cache_cookie: cache_cookie + cache_developer_mode: true + cache_consistent_uptime: true + cache_args: true + cache_browser: default + cache_status: "false" + cache_page_200: 0s + cache_arg: filter&sort + cache_page_any: 0s + cache_ignore_sc: true + properties: + data: + $ref: '#/components/schemas/CacheSettings' + ImageResize: + example: + width_by: width + height_by: height + status: "off" + properties: + status: + default: "off" + enum: + - "on" + - "off" + type: string + height_by: + default: height + type: string + width_by: + default: width + type: string + type: object + ImageResizeResponse: + allOf: + - $ref: '#/components/schemas/DataWithMessageResponse' + example: + data: + width_by: width + height_by: height + status: "off" + properties: + data: + $ref: '#/components/schemas/ImageResize' + PageRuleImageResize: + allOf: + - $ref: '#/components/schemas/ImageResize' + example: + status: "on" + properties: + status: + enum: + - "on" + - "off" + - inherit + type: string + Acceleration: + example: + extensions: + - css + - js + status: inherit + properties: + status: + enum: + - inherit + - "on" + - "off" + type: string + extensions: + default: [] + example: + - css + - js + items: + enum: + - css + - gif + - jpeg + - js + - png + type: string + minItems: 0 + type: array + uniqueItems: true + type: object + AccelerationResponse: + allOf: + - $ref: '#/components/schemas/DataWithMessageResponse' + example: + data: + extensions: + - css + - js + status: inherit + properties: + data: + $ref: '#/components/schemas/Acceleration' + AccelerationUpdate: + allOf: + - $ref: '#/components/schemas/Acceleration' + example: + status: "on" + properties: + status: + enum: + - "on" + - "off" + type: string + CustomPage: + example: + status_code: 0 + type: "false" + url: http://example.com/aeiou + properties: + status_code: + enum: + - 200 + - 302 + - 481 + - 403 + - 482 + - 483 + - 484 + - 500 + type: integer + type: + enum: + - "false" + - url + - file + type: string + url: + format: url + type: string + type: object + CustomPages: + example: + ddos_captcha: + status_code: 0 + type: "false" + url: http://example.com/aeiou + ddos_js: + status_code: 0 + type: "false" + url: http://example.com/aeiou + rate_limit_exceeded: + status_code: 0 + type: "false" + url: http://example.com/aeiou + error_500: + status_code: 0 + type: "false" + url: http://example.com/aeiou + under_construction: + status_code: 0 + type: "false" + url: http://example.com/aeiou + secure_link_invalid: + status_code: 0 + type: "false" + url: http://example.com/aeiou + waf_protection: + status_code: 0 + type: "false" + url: http://example.com/aeiou + firewall_error: + status_code: 0 + type: "false" + url: http://example.com/aeiou + secure_link_expired: + status_code: 0 + type: "false" + url: http://example.com/aeiou + properties: + under_construction: + $ref: '#/components/schemas/CustomPage' + firewall_error: + $ref: '#/components/schemas/CustomPage' + waf_protection: + $ref: '#/components/schemas/CustomPage' + rate_limit_exceeded: + $ref: '#/components/schemas/CustomPage' + secure_link_expired: + $ref: '#/components/schemas/CustomPage' + secure_link_invalid: + $ref: '#/components/schemas/CustomPage' + error_500: + $ref: '#/components/schemas/CustomPage' + ddos_js: + $ref: '#/components/schemas/CustomPage' + ddos_captcha: + $ref: '#/components/schemas/CustomPage' + type: object + CustomPagesData: + allOf: + - $ref: '#/components/schemas/DataResponse' + example: + data: + ddos_captcha: + status_code: 0 + type: "false" + url: http://example.com/aeiou + ddos_js: + status_code: 0 + type: "false" + url: http://example.com/aeiou + rate_limit_exceeded: + status_code: 0 + type: "false" + url: http://example.com/aeiou + error_500: + status_code: 0 + type: "false" + url: http://example.com/aeiou + under_construction: + status_code: 0 + type: "false" + url: http://example.com/aeiou + secure_link_invalid: + status_code: 0 + type: "false" + url: http://example.com/aeiou + waf_protection: + status_code: 0 + type: "false" + url: http://example.com/aeiou + firewall_error: + status_code: 0 + type: "false" + url: http://example.com/aeiou + secure_link_expired: + status_code: 0 + type: "false" + url: http://example.com/aeiou + properties: + data: + $ref: '#/components/schemas/CustomPages' + CustomPageUpdate: + properties: + type: + enum: + - "false" + - url + - file + type: string + page: + description: ddos_js and ddos_captcha can only be used with file type + enum: + - under_construction + - firewall_error + - waf_protection + - rate_limit_exceeded + - secure_link_expired + - secure_link_invalid + - error_500 + - ddos_js + - ddos_captcha + type: string + url: + format: url + type: string + file: + format: binary + type: string + type: object + Redirect: + example: + f_redirect_to_www: "false" + properties: + f_redirect_to_www: + enum: + - "false" + - www + - root + type: string + type: object + RedirectData: + allOf: + - $ref: '#/components/schemas/DataResponse' + example: + data: + f_redirect_to_www: "false" + properties: + data: + $ref: '#/components/schemas/Redirect' + UpdateBooleanStatus: + example: + status: true + properties: + status: + type: boolean + type: object + LogForwarder: + example: + data_format: null + settings: null + connection_type: arvan_s3 + name: name + description: description + type: access + status: true + properties: + name: + type: string + description: + type: string + type: + enum: + - access + - waf + - dns + - error + type: string + connection_type: + enum: + - arvan_s3 + - alibaba_s3 + - amazon_s3 + - custom_s3 + - loggly + - datadog + - syslog + - kafka + type: string + data_format: + $ref: '#/components/schemas/LogForwarderDataFormat' + settings: + $ref: '#/components/schemas/LogForwarderSetting' + status: + type: boolean + required: + - connection_type + - data_format + - description + - name + - settings + - status + - type + type: object + LogForwarderGeneric: + example: + data_format: "{}" + settings: "{}" + connection_type: arvan_s3 + name: name + description: description + type: access + status: true + properties: + name: + type: string + description: + type: string + type: + enum: + - access + - waf + - dns + - error + type: string + connection_type: + enum: + - arvan_s3 + - alibaba_s3 + - amazon_s3 + - custom_s3 + - loggly + - datadog + - syslog + - kafka + type: string + data_format: + type: object + settings: + type: object + status: + type: boolean + type: object + LogForwarderResponse: + allOf: + - $ref: '#/components/schemas/DataWithMessageResponse' + example: + data: + data_format: "{}" + settings: "{}" + connection_type: arvan_s3 + name: name + description: description + type: access + status: true + properties: + data: + $ref: '#/components/schemas/LogForwarderGeneric' + LogForwarderDataFormat: + oneOf: + - $ref: '#/components/schemas/LogForwarderAccessLogType' + - $ref: '#/components/schemas/LogForwarderWAFType' + - $ref: '#/components/schemas/LogForwarderDNSType' + - $ref: '#/components/schemas/LogForwarderErrorType' + LogForwarderAccessLogType: + description: Access log type + properties: + method: + type: boolean + scheme: + type: boolean + domain: + type: boolean + uri: + type: boolean + query_string: + type: boolean + referer: + type: boolean + ip: + type: boolean + ua: + type: boolean + country: + type: boolean + asn: + type: boolean + content_type: + type: boolean + status: + type: boolean + server_port: + type: boolean + bytes_sent: + type: boolean + bytes_received: + type: boolean + upstream_time: + type: boolean + cache: + type: boolean + request_id: + type: boolean + type: object + LogForwarderWAFType: + description: Waf log type + properties: + product: + type: boolean + timestamp: + type: boolean + remote_address: + type: boolean + domain: + type: boolean + data: + type: boolean + type: object + LogForwarderDNSType: + description: Dns log type + properties: + timestamp: + type: boolean + uuid: + type: boolean + record: + type: boolean + type: + type: boolean + ip: + type: boolean + country: + type: boolean + asn: + type: boolean + response_code: + type: boolean + process_time: + type: boolean + type: object + LogForwarderErrorType: + description: Error log type + properties: + client_ip: + type: boolean + upstream_proto: + type: boolean + upstream_uri: + type: boolean + upstream_port: + type: boolean + upstream_ip: + type: boolean + domain_name: + type: boolean + http_version: + type: boolean + request_method: + type: boolean + request_uri: + type: boolean + real_timestamp: + type: boolean + error_message: + type: boolean + pop_site: + type: boolean + request_id: + type: boolean + type: object + LogForwarderSetting: + oneOf: + - $ref: '#/components/schemas/LogForwarderS3ConnectionType' + - $ref: '#/components/schemas/LogForwarderDatadogConnectionType' + - $ref: '#/components/schemas/LogForwarderKafkaConnectionType' + - $ref: '#/components/schemas/LogForwarderLogglyConnectionType' + - $ref: '#/components/schemas/LogForwarderSyslogConnectionType' + LogForwarderS3ConnectionType: + description: "ArvanS3, AmazonS3, AlibabaS3 and Custom S3 connections" + properties: + sample_rate: + type: integer + s3_endpoint: + format: hostname + type: string + access_key: + type: string + secret_key: + type: string + bucket_name: + type: string + object_size: + type: integer + flush_interval: + type: integer + type: object + LogForwarderDatadogConnectionType: + description: Datadog connection + properties: + sample_rate: + type: integer + url: + format: url + type: string + api_key: + type: string + app_key: + type: string + flush_interval: + type: integer + buffer_size: + type: integer + type: object + LogForwarderKafkaConnectionType: + description: Kafka connection + properties: + sample_rate: + type: integer + kafka_version: + type: string + kafka_brokers: + items: + description: Host and port of the broker separated by a colon + example: example.com:9092 + type: string + type: array + kafka_topic_to_write: + type: string + kafka_producer_batch_size: + type: integer + kafka_producer_flush_frequency_ms: + type: integer + type: object + LogForwarderLogglyConnectionType: + description: Loggly connection + properties: + sample_rate: + type: integer + token: + type: string + url: + format: url + type: string + flush_interval: + type: integer + buffer_size: + type: integer + type: object + LogForwarderSyslogConnectionType: + description: Syslog connection + properties: + sample_rate: + type: integer + logtype: + enum: + - syslogudp + - syslogtcp + type: string + host: + format: "hostname, ip" + type: string + port: + type: integer + tls: + type: boolean + cert: + type: string + retry_time: + type: integer + type: object + Troubleshoot: + example: + created_at: created_at + details: + - details: details + id: root_dns_record + status: safe + - details: details + id: root_dns_record + status: safe + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + id: + format: uuid + type: string + details: + items: + $ref: '#/components/schemas/Troubleshoot_details_inner' + type: array + created_at: + type: string + type: object + FirewallSettings: + allOf: + - $ref: '#/components/schemas/BaseFirewallSettings' + example: + default_action_details: null + properties: + default_action_details: + $ref: '#/components/schemas/FirewallActionDetails' + FirewallSettingsView: + allOf: + - $ref: '#/components/schemas/BaseFirewallSettings' + example: + default_action_details: "{}" + properties: + default_action_details: + nullable: true + type: object + BaseFirewallSettings: + properties: + is_enabled: + nullable: false + readOnly: true + type: boolean + default_action: + enum: + - allow + - deny + - bypass + - challenge + type: string + verify_sni: + default: false + description: True to verify that SNI and hostname are equal + nullable: false + type: boolean + type: object + FirewallActionDetails: + description: Details of bypass or challenge actions + nullable: true + oneOf: + - $ref: '#/components/schemas/BypassAction' + - $ref: '#/components/schemas/ChallengeAction' + Firewall: + deprecated: true + example: + is_enabled: true + default_action_details: "{}" + verify_sni: false + rules: + - action_details: "{}" + - action_details: "{}" + default_action: allow + properties: + is_enabled: + readOnly: true + type: boolean + default_action: + enum: + - allow + - deny + - bypass + - challenge + type: string + default_action_details: + nullable: true + type: object + verify_sni: + default: false + description: True to verify that SNI and hostname are equal + type: boolean + rules: + items: + $ref: '#/components/schemas/FirewallRuleView' + readOnly: true + type: array + type: object + FirewallRule: + allOf: + - $ref: '#/components/schemas/BaseFirewallRule' + example: + action_details: null + properties: + action_details: + $ref: '#/components/schemas/FirewallActionDetails' + required: + - action + - filter_expr + - name + FirewallRuleView: + allOf: + - $ref: '#/components/schemas/BaseFirewallRule' + example: + action_details: "{}" + properties: + action_details: + type: object + BaseFirewallRule: + properties: + id: + format: uuid + readOnly: true + type: string + name: + type: string + filter_expr: + description: Wireshark-like filter expression + example: "ip.geoip.country in {\"IR\" \"TH\" \"US\"} and ssl" + maxLength: 5000 + minLength: 3 + type: string + action: + enum: + - allow + - deny + - bypass + - challenge + type: string + is_enabled: + type: boolean + note: + type: string + type: object + FirewallRuleResponse: + allOf: + - $ref: '#/components/schemas/DataWithMessageResponse' + example: + data: + action_details: "{}" + properties: + data: + $ref: '#/components/schemas/FirewallRuleView' + WafPreset: + example: + name: name + description: description + id: id + packages: + - provider: + name: name + logo: http://example.com/aeiou + name: name + - provider: + name: name + logo: http://example.com/aeiou + name: name + properties: + id: + type: string + name: + type: string + description: + type: string + packages: + items: + $ref: '#/components/schemas/WafPreset_packages_inner' + type: array + type: object + WafPresets: + example: + presets: + - name: name + description: description + id: id + packages: + - provider: + name: name + logo: http://example.com/aeiou + name: name + - provider: + name: name + logo: http://example.com/aeiou + name: name + - name: name + description: description + id: id + packages: + - provider: + name: name + logo: http://example.com/aeiou + name: name + - provider: + name: name + logo: http://example.com/aeiou + name: name + packages: + - disabled_rulesets: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + params_schema: "{}" + provider: + name: name + logo: http://example.com/aeiou + disabled_rules: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + id: id + - disabled_rulesets: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + params_schema: "{}" + provider: + name: name + logo: http://example.com/aeiou + disabled_rules: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + id: id + properties: + presets: + items: + $ref: '#/components/schemas/WafPreset' + type: array + packages: + items: + $ref: '#/components/schemas/WafPackage' + type: array + type: object + WafPresetsData: + allOf: + - $ref: '#/components/schemas/DataResponse' + example: + data: + presets: + - name: name + description: description + id: id + packages: + - provider: + name: name + logo: http://example.com/aeiou + name: name + - provider: + name: name + logo: http://example.com/aeiou + name: name + - name: name + description: description + id: id + packages: + - provider: + name: name + logo: http://example.com/aeiou + name: name + - provider: + name: name + logo: http://example.com/aeiou + name: name + packages: + - disabled_rulesets: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + params_schema: "{}" + provider: + name: name + logo: http://example.com/aeiou + disabled_rules: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + id: id + - disabled_rulesets: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + params_schema: "{}" + provider: + name: name + logo: http://example.com/aeiou + disabled_rules: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + id: id + properties: + data: + $ref: '#/components/schemas/WafPresets' + DeprecatedWafSettings: + deprecated: true + properties: + f_waf_status: + enum: + - "false" + - detection + - "true" + type: string + f_threshold: + pattern: "^\\d{1,2}$" + type: string + f_provider: + enum: + - LUA + type: string + type: object + WafSettings: + example: + is_enabled: true + mode: "false" + packages: + - is_enabled: true + params: "{}" + - is_enabled: true + params: "{}" + properties: + is_enabled: + readOnly: true + type: boolean + mode: + enum: + - "false" + - detect + - protect + type: string + packages: + description: Pacakges and their configurations that are used to configure + WAF. + items: + $ref: '#/components/schemas/DomainWafPackage' + readOnly: true + type: array + type: object + Waf: + example: + is_enabled: true + mode: "false" + rules: + - is_enabled: true + url_pattern: url_pattern + sources: + - 1.2.3.4/32 + - 1.2.3.4/32 + - 1.2.3.4/32 + - 1.2.3.4/32 + - 1.2.3.4/32 + action: protect + description: description + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - is_enabled: true + url_pattern: url_pattern + sources: + - 1.2.3.4/32 + - 1.2.3.4/32 + - 1.2.3.4/32 + - 1.2.3.4/32 + - 1.2.3.4/32 + action: protect + description: description + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + packages: + - is_enabled: true + params: "{}" + - is_enabled: true + params: "{}" + properties: + is_enabled: + readOnly: true + type: boolean + mode: + enum: + - "false" + - detect + - protect + type: string + packages: + description: Pacakges and their configurations that are used to configure + WAF. + items: + $ref: '#/components/schemas/DomainWafPackage' + readOnly: true + type: array + rules: + items: + $ref: '#/components/schemas/WafRule' + readOnly: true + type: array + type: object + WafRule: + example: + is_enabled: true + url_pattern: url_pattern + sources: + - 1.2.3.4/32 + - 1.2.3.4/32 + - 1.2.3.4/32 + - 1.2.3.4/32 + - 1.2.3.4/32 + action: protect + description: description + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + id: + format: uuid + readOnly: true + type: string + url_pattern: + description: | + - `?` matches any single character. + - `*` matches any (possibly empty) sequence of characters. + - `**` matches the current directory and arbitrary subdirectories. This sequence must form a single path component, so both `**a` and `b**` are invalid and will result in an error. A sequence of more than two consecutive `*` characters is also invalid. + - `[...]` matches any character inside the brackets. Character sequences can also specify ranges of characters, as ordered by Unicode, so e.g. `[0-9]` specifies any character between 0 and 9 inclusive. An unclosed bracket is invalid. + - `[!...]` is the negation of `[...]`, i.e. it matches any characters not in the brackets. + - The metacharacters `?`, `*`, `[`, `] `can be matched by using brackets (e.g. `[?]`). When a `]` occurs immediately following `[` or `[!` then it is interpreted as being part of, rather then ending, the character set, so `]` and NOT `]` can be matched by `[]]` and `[!]]` respectively. The - character can be specified inside a character sequence pattern by placing it at the start or the end, e.g. `[abc-]`. + format: glob pattern + type: string + sources: + items: + $ref: '#/components/schemas/CIDR' + maxItems: 20 + type: array + action: + enum: + - protect + - passthrough + type: string + description: + type: string + is_enabled: + type: boolean + type: object + WafPackage: + example: + disabled_rulesets: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + params_schema: "{}" + provider: + name: name + logo: http://example.com/aeiou + disabled_rules: + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + id: id + properties: + id: + readOnly: true + type: string + name: + readOnly: true + type: string + provider: + $ref: '#/components/schemas/WafPackage_provider' + params_schema: + description: JSON-schema of parameters of the package + type: object + disabled_rules: + description: It will be filled by default disabled rules when it's not provided + items: + format: uuid + type: string + type: array + disabled_rulesets: + description: It will be filled by default disabled rulesets when it's not + provided + items: + format: uuid + type: string + type: array + type: object + WafRuleset: + properties: + id: + type: string + name: + type: string + rules: + items: + $ref: '#/components/schemas/WafRuleset_rules_inner' + type: array + type: object + WafRulesets: + properties: + rulesets: + items: + $ref: '#/components/schemas/WafRuleset' + type: array + type: object + WafPackageDetails: + allOf: + - $ref: '#/components/schemas/WafPackage' + - $ref: '#/components/schemas/WafRulesets' + WafPackageDetailsData: + allOf: + - $ref: '#/components/schemas/DataResponse' + example: + data: null + properties: + data: + $ref: '#/components/schemas/WafPackageDetails' + DomainWafPackage: + allOf: + - $ref: '#/components/schemas/WafPackage' + example: + is_enabled: true + params: "{}" + properties: + params: + description: parameters of the package + type: object + is_enabled: + default: true + type: boolean + DomainWaf: + anyOf: + - $ref: '#/components/schemas/Waf' + - $ref: '#/components/schemas/DeprecatedWafSettings' + type: object + DomainWafData: + allOf: + - $ref: '#/components/schemas/DataResponse' + example: + data: null + properties: + data: + $ref: '#/components/schemas/DomainWaf' + DomainWafPackageStore: + example: + id: id + properties: + id: + type: string + required: + - id + type: object + DomainWafPackageDetails: + allOf: + - $ref: '#/components/schemas/DomainWafPackage' + - $ref: '#/components/schemas/WafRulesets' + DomainWafPackageDetailsData: + allOf: + - $ref: '#/components/schemas/DataResponse' + example: + data: null + properties: + data: + $ref: '#/components/schemas/DomainWafPackageDetails' + WafSettingsData: + allOf: + - $ref: '#/components/schemas/DataResponse' + example: + data: + is_enabled: true + mode: "false" + packages: + - is_enabled: true + params: "{}" + - is_enabled: true + params: "{}" + properties: + data: + $ref: '#/components/schemas/WafSettings' + WafReconfigure: + example: + preset_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + preset_id: + format: uuid + type: string + type: object + WafReprioritize: + example: + before_package_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + package_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + after_package_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + package_id: + description: ID of the package you want to move + format: uuid + type: string + after_package_id: + description: ID of the package you want to be prior to the selected package + format: uuid + type: string + before_package_id: + description: ID of the package you want to follow the selected package + format: uuid + type: string + required: + - package_id + type: object + WafRuleResponse: + allOf: + - $ref: '#/components/schemas/DataWithMessageResponse' + example: + data: + is_enabled: true + url_pattern: url_pattern + sources: + - 1.2.3.4/32 + - 1.2.3.4/32 + - 1.2.3.4/32 + - 1.2.3.4/32 + - 1.2.3.4/32 + action: protect + description: description + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + data: + $ref: '#/components/schemas/WafRule' + DomainWafPackagesData: + allOf: + - $ref: '#/components/schemas/DataResponse' + example: + data: + - is_enabled: true + params: "{}" + - is_enabled: true + params: "{}" + properties: + data: + items: + $ref: '#/components/schemas/DomainWafPackage' + type: array + DdosSettings: + example: + is_enabled: true + https_only: true + captcha_service: recaptcha + ttl: 0 + preflight: + access_credentials: access_credentials + access_methods: + - GET + - GET + access_expose_headers: access_expose_headers + access_origin: access_origin + access_headers: access_headers + protection_mode: "false" + properties: + is_enabled: + readOnly: true + type: boolean + protection_mode: + enum: + - "false" + - cookie + - javascript + - captcha + type: string + captcha_service: + enum: + - recaptcha + - arcaptcha + - hcaptcha + type: string + ttl: + description: Time in seconds for cookie max-age + type: integer + https_only: + description: Adds "SameSite=None; Secure" to set-cookie header + type: boolean + preflight: + $ref: '#/components/schemas/DdosPreflight' + type: object + DdosSettingsData: + allOf: + - $ref: '#/components/schemas/DataWithMessageResponse' + example: + data: + is_enabled: true + https_only: true + captcha_service: recaptcha + ttl: 0 + preflight: + access_credentials: access_credentials + access_methods: + - GET + - GET + access_expose_headers: access_expose_headers + access_origin: access_origin + access_headers: access_headers + protection_mode: "false" + properties: + data: + $ref: '#/components/schemas/DdosSettings' + Ddos: + deprecated: true + example: + is_enabled: true + https_only: true + rules: + - is_enabled: true + url_pattern: url_pattern + sources: + - 1.2.3.4/32 + - 1.2.3.4/32 + - 1.2.3.4/32 + - 1.2.3.4/32 + - 1.2.3.4/32 + description: description + action: passthrough + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - is_enabled: true + url_pattern: url_pattern + sources: + - 1.2.3.4/32 + - 1.2.3.4/32 + - 1.2.3.4/32 + - 1.2.3.4/32 + - 1.2.3.4/32 + description: description + action: passthrough + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + captcha_service: recaptcha + ttl: 0 + preflight: + access_credentials: access_credentials + access_methods: + - GET + - GET + access_expose_headers: access_expose_headers + access_origin: access_origin + access_headers: access_headers + protection_mode: "false" + properties: + is_enabled: + readOnly: true + type: boolean + protection_mode: + enum: + - "false" + - cookie + - javascript + - captcha + type: string + captcha_service: + enum: + - recaptcha + - arcaptcha + - hcaptcha + type: string + ttl: + description: Time in seconds for cookie max-age + type: integer + https_only: + description: Adds "SameSite=None; Secure" to set-cookie header + type: boolean + preflight: + $ref: '#/components/schemas/DdosPreflight' + rules: + items: + $ref: '#/components/schemas/DdosRule' + readOnly: true + type: array + type: object + DdosData: + allOf: + - $ref: '#/components/schemas/DataWithMessageResponse' + example: + data: + is_enabled: true + https_only: true + rules: + - is_enabled: true + url_pattern: url_pattern + sources: + - 1.2.3.4/32 + - 1.2.3.4/32 + - 1.2.3.4/32 + - 1.2.3.4/32 + - 1.2.3.4/32 + description: description + action: passthrough + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - is_enabled: true + url_pattern: url_pattern + sources: + - 1.2.3.4/32 + - 1.2.3.4/32 + - 1.2.3.4/32 + - 1.2.3.4/32 + - 1.2.3.4/32 + description: description + action: passthrough + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + captcha_service: recaptcha + ttl: 0 + preflight: + access_credentials: access_credentials + access_methods: + - GET + - GET + access_expose_headers: access_expose_headers + access_origin: access_origin + access_headers: access_headers + protection_mode: "false" + properties: + data: + $ref: '#/components/schemas/Ddos' + DdosPreflight: + example: + access_credentials: access_credentials + access_methods: + - GET + - GET + access_expose_headers: access_expose_headers + access_origin: access_origin + access_headers: access_headers + properties: + access_origin: + type: string + access_credentials: + type: string + access_methods: + items: + enum: + - GET + - HEAD + - POST + - PUT + - DELETE + - CONNECT + - OPTIONS + - TRACE + - PATCH + type: string + type: array + access_headers: + type: string + access_expose_headers: + type: string + type: object + DdosRule: + example: + is_enabled: true + url_pattern: url_pattern + sources: + - 1.2.3.4/32 + - 1.2.3.4/32 + - 1.2.3.4/32 + - 1.2.3.4/32 + - 1.2.3.4/32 + description: description + action: passthrough + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + id: + format: uuid + readOnly: true + type: string + url_pattern: + description: | + - `?` matches any single character. + - `*` matches any (possibly empty) sequence of characters. + - `**` matches the current directory and arbitrary subdirectories. This sequence must form a single path component, so both `**a` and `b**` are invalid and will result in an error. A sequence of more than two consecutive `*` characters is also invalid. + - `[...]` matches any character inside the brackets. Character sequences can also specify ranges of characters, as ordered by Unicode, so e.g. `[0-9]` specifies any character between 0 and 9 inclusive. An unclosed bracket is invalid. + - `[!...]` is the negation of `[...]`, i.e. it matches any characters not in the brackets. + - The metacharacters `?`, `*`, `[`, `] `can be matched by using brackets (e.g. `[?]`). When a `]` occurs immediately following `[` or `[!` then it is interpreted as being part of, rather then ending, the character set, so `]` and NOT `]` can be matched by `[]]` and `[!]]` respectively. The - character can be specified inside a character sequence pattern by placing it at the start or the end, e.g. `[abc-]`. + format: glob pattern + type: string + sources: + items: + $ref: '#/components/schemas/CIDR' + maxItems: 20 + type: array + description: + type: string + action: + enum: + - passthrough + - protect + type: string + is_enabled: + type: boolean + type: object + DdosRuleResponse: + allOf: + - $ref: '#/components/schemas/DataWithMessageResponse' + example: + data: + is_enabled: true + url_pattern: url_pattern + sources: + - 1.2.3.4/32 + - 1.2.3.4/32 + - 1.2.3.4/32 + - 1.2.3.4/32 + - 1.2.3.4/32 + description: description + action: passthrough + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + data: + $ref: '#/components/schemas/DdosRule' + DdosRuleData: + allOf: + - $ref: '#/components/schemas/DataResponse' + example: + data: + is_enabled: true + url_pattern: url_pattern + sources: + - 1.2.3.4/32 + - 1.2.3.4/32 + - 1.2.3.4/32 + - 1.2.3.4/32 + - 1.2.3.4/32 + description: description + action: passthrough + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + data: + $ref: '#/components/schemas/DdosRule' + RateLimitSettings: + example: + exclude_sources: + - 1.2.3.4/32 + - 1.2.3.4/32 + ddos_detection: true + properties: + ddos_detection: + type: boolean + exclude_sources: + items: + $ref: '#/components/schemas/CIDR' + type: array + type: object + RateLimitSettingsData: + allOf: + - $ref: '#/components/schemas/DataResponse' + example: + data: + exclude_sources: + - 1.2.3.4/32 + - 1.2.3.4/32 + ddos_detection: true + properties: + data: + $ref: '#/components/schemas/RateLimitSettings' + RateLimit: + example: + exclude_sources: + - 1.2.3.4/32 + - 1.2.3.4/32 + ddos_detection: true + rules: + - action_details: "{}" + - action_details: "{}" + properties: + ddos_detection: + type: boolean + exclude_sources: + items: + $ref: '#/components/schemas/CIDR' + type: array + rules: + items: + $ref: '#/components/schemas/RateLimitRuleView' + readOnly: true + type: array + type: object + RateLimitData: + allOf: + - $ref: '#/components/schemas/DataResponse' + example: + data: + exclude_sources: + - 1.2.3.4/32 + - 1.2.3.4/32 + ddos_detection: true + rules: + - action_details: "{}" + - action_details: "{}" + properties: + data: + $ref: '#/components/schemas/RateLimit' + RateLimitRule: + allOf: + - $ref: '#/components/schemas/BaseRateLimitRule' + example: + action_details: + mode: 0 + https_only: true + ttl: 19008189 + properties: + action_details: + $ref: '#/components/schemas/ChallengeAction' + RateLimitRuleView: + allOf: + - $ref: '#/components/schemas/BaseRateLimitRule' + example: + action_details: "{}" + properties: + action_details: + type: object + BaseRateLimitRule: + properties: + id: + format: uuid + readOnly: true + type: string + action: + default: block + enum: + - challenge + - block + type: string + is_enabled: + type: boolean + url_pattern: + description: | + - `?` matches any single character. + - `*` matches any (possibly empty) sequence of characters. + - `**` matches the current directory and arbitrary subdirectories. This sequence must form a single path component, so both `**a` and `b**` are invalid and will result in an error. A sequence of more than two consecutive `*` characters is also invalid. + - `[...]` matches any character inside the brackets. Character sequences can also specify ranges of characters, as ordered by Unicode, so e.g. `[0-9]` specifies any character between 0 and 9 inclusive. An unclosed bracket is invalid. + - `[!...]` is the negation of `[...]`, i.e. it matches any characters not in the brackets. + - The metacharacters `?`, `*`, `[`, `] `can be matched by using brackets (e.g. `[?]`). When a `]` occurs immediately following `[` or `[!` then it is interpreted as being part of, rather then ending, the character set, so `]` and NOT `]` can be matched by `[]]` and `[!]]` respectively. The - character can be specified inside a character sequence pattern by placing it at the start or the end, e.g. `[abc-]`. + format: glob pattern + type: string + description: + nullable: true + type: string + exclude_sources: + items: + $ref: '#/components/schemas/CIDR' + type: array + rate: + maximum: 4000000 + minimum: 1 + type: integer + burst: + maximum: 4000000 + minimum: 1 + type: integer + block_duration: + maximum: 86400 + minimum: 0 + type: integer + time_duration: + maximum: 2592000 + minimum: 1 + type: integer + allowed_methods: + items: + enum: + - POST + - GET + - PUT + - HEAD + - DELETE + type: string + type: array + required: + - rate + - time_duration + - url_pattern + type: object + RateLimitRuleData: + allOf: + - $ref: '#/components/schemas/DataResponse' + example: + data: + action_details: "{}" + properties: + data: + $ref: '#/components/schemas/RateLimitRuleView' + CIDR: + example: 1.2.3.4/32 + format: CIDR + type: string + GlobPattern: + description: | + - `?` matches any single character. + - `*` matches any (possibly empty) sequence of characters. + - `**` matches the current directory and arbitrary subdirectories. This sequence must form a single path component, so both `**a` and `b**` are invalid and will result in an error. A sequence of more than two consecutive `*` characters is also invalid. + - `[...]` matches any character inside the brackets. Character sequences can also specify ranges of characters, as ordered by Unicode, so e.g. `[0-9]` specifies any character between 0 and 9 inclusive. An unclosed bracket is invalid. + - `[!...]` is the negation of `[...]`, i.e. it matches any characters not in the brackets. + - The metacharacters `?`, `*`, `[`, `] `can be matched by using brackets (e.g. `[?]`). When a `]` occurs immediately following `[` or `[!` then it is interpreted as being part of, rather then ending, the character set, so `]` and NOT `]` can be matched by `[]]` and `[!]]` respectively. The - character can be specified inside a character sequence pattern by placing it at the start or the end, e.g. `[abc-]`. + format: glob pattern + type: string + ReprioritizeRuleRequest: + example: + rule_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + before_rule_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + after_rule_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + rule_id: + description: ID of the rule you want to move + format: uuid + type: string + after_rule_id: + description: ID of the rule you want to be prior to the selected rule + format: uuid + type: string + before_rule_id: + description: ID of the rule you want to follow the selected rule + format: uuid + type: string + required: + - rule_id + type: object + PrioritizePoolAfter: + properties: + pool_id: + description: ID of the pool you want to move + format: uuid + type: string + after_pool_id: + description: ID of the pool you want to be prior to the selected pool + format: uuid + type: string + required: + - after_pool_id + - pool_id + type: object + PrioritizePoolBefore: + properties: + pool_id: + description: ID of the pool you want to move + format: uuid + type: string + before_pool_id: + description: ID of the pool you want to follow the selected pool + format: uuid + type: string + required: + - before_pool_id + - pool_id + type: object + PrioritizePool: + anyOf: + - $ref: '#/components/schemas/PrioritizePoolAfter' + - $ref: '#/components/schemas/PrioritizePoolBefore' + CdnAppLikeStats: + example: + likes_count: 6 + dislikes_count: 1 + properties: + likes_count: + type: integer + dislikes_count: + type: integer + readOnly: true + type: object + CdnAppLikeStatsData: + allOf: + - $ref: '#/components/schemas/DataResponse' + example: + data: + likes_count: 6 + dislikes_count: 1 + properties: + data: + $ref: '#/components/schemas/CdnAppLikeStats' + CdnAppLike: + example: + like: true + properties: + like: + description: "True means she likes, False means she dislikes, null means\ + \ she wants to get her vote back." + nullable: true + type: boolean + type: object + CdnApp: + example: + install_json: "{}" + short_description: short_description + like_by_user: true + description: description + created_at: 2000-01-23T04:56:07.000+00:00 + pictures: + - http://example.com/aeiou + - http://example.com/aeiou + like_stats: + likes_count: 6 + dislikes_count: 1 + support_email: support_email + updated_at: 2000-01-23T04:56:07.000+00:00 + vendor: vendor + name: name + rank: 5 + logo: logo + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + categories: + - name: name + active: true + name_translation: + en: + name: name + fa: + name: name + id: id + order: 0 + applications: + - name: name + description: description + logo: logo + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + slug: slug + - name: name + description: description + logo: logo + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + slug: slug + - name: name + description: description + logo: logo + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + slug: slug + - name: name + description: description + logo: logo + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + slug: slug + - name: name + description: description + logo: logo + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + slug: slug + - name: name + active: true + name_translation: + en: + name: name + fa: + name: name + id: id + order: 0 + applications: + - name: name + description: description + logo: logo + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + slug: slug + - name: name + description: description + logo: logo + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + slug: slug + - name: name + description: description + logo: logo + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + slug: slug + - name: name + description: description + logo: logo + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + slug: slug + - name: name + description: description + logo: logo + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + slug: slug + slug: slug + status: published + properties: + id: + format: uuid + readOnly: true + type: string + categories: + items: + $ref: '#/components/schemas/ApplicationCategory' + type: array + rank: + example: 5 + type: number + name: + type: string + slug: + type: string + short_description: + type: string + description: + type: string + logo: + description: absolute link to logo image + type: string + pictures: + items: + format: url + type: string + type: array + vendor: + type: string + support_email: + format: email + type: string + install_json: + type: object + status: + enum: + - published + - draft + type: string + like_stats: + $ref: '#/components/schemas/CdnAppLikeStats' + like_by_user: + description: "True means she likes, False means she dislikes. null means\ + \ she did not vote." + type: boolean + created_at: + format: date-time + readOnly: true + type: string + updated_at: + format: date-time + readOnly: true + type: string + type: object + CdnAppInstall: + example: + is_install: true + properties: + is_install: + type: boolean + type: object + CdnAppData: + allOf: + - $ref: '#/components/schemas/DataResponse' + example: + data: + install_json: "{}" + short_description: short_description + like_by_user: true + description: description + created_at: 2000-01-23T04:56:07.000+00:00 + pictures: + - http://example.com/aeiou + - http://example.com/aeiou + like_stats: + likes_count: 6 + dislikes_count: 1 + support_email: support_email + updated_at: 2000-01-23T04:56:07.000+00:00 + vendor: vendor + name: name + rank: 5 + logo: logo + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + categories: + - name: name + active: true + name_translation: + en: + name: name + fa: + name: name + id: id + order: 0 + applications: + - name: name + description: description + logo: logo + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + slug: slug + - name: name + description: description + logo: logo + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + slug: slug + - name: name + description: description + logo: logo + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + slug: slug + - name: name + description: description + logo: logo + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + slug: slug + - name: name + description: description + logo: logo + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + slug: slug + - name: name + active: true + name_translation: + en: + name: name + fa: + name: name + id: id + order: 0 + applications: + - name: name + description: description + logo: logo + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + slug: slug + - name: name + description: description + logo: logo + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + slug: slug + - name: name + description: description + logo: logo + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + slug: slug + - name: name + description: description + logo: logo + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + slug: slug + - name: name + description: description + logo: logo + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + slug: slug + slug: slug + status: published + properties: + data: + $ref: '#/components/schemas/CdnApp' + DomainCdnApp: + example: + domain_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + updated_at: 2000-01-23T04:56:07.000+00:00 + options: "{}" + active: true + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + application_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + id: + format: uuid + readOnly: true + type: string + domain_id: + format: uuid + readOnly: true + type: string + application_id: + format: uuid + readOnly: true + type: string + active: + type: boolean + options: + type: object + created_at: + format: date-time + readOnly: true + type: string + updated_at: + format: date-time + readOnly: true + type: string + type: object + CdnAppTriggerWebhook: + example: + options: "{}" + event: before-new-install + properties: + event: + enum: + - before-new-install + - new-install + type: string + options: + type: object + required: + - event + - options + type: object + InstallJson: + type: object + AppOptions: + type: object + Certificate: + example: + key_type: ec + updated_at: 2000-01-23T04:56:07.000+00:00 + expiry_date: 2000-01-23T04:56:07.000+00:00 + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + type: arvan + issuer: issuer + domain_names: + - domain_names + - domain_names + properties: + id: + format: uuid + readOnly: true + type: string + type: + enum: + - arvan + - user + readOnly: true + type: string + key_type: + enum: + - ec + - rsa + nullable: true + readOnly: true + type: string + domain_names: + items: + type: string + readOnly: true + type: array + issuer: + readOnly: true + type: string + expiry_date: + format: date-time + readOnly: true + type: string + created_at: + format: date-time + readOnly: true + type: string + updated_at: + format: date-time + readOnly: true + type: string + type: object + CertificateOrder: + example: + updated_at: 2000-01-23T04:56:07.000+00:00 + expiry_date: 2000-01-23T04:56:07.000+00:00 + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + order_id: order_id + errors: + - "{}" + - "{}" + status: unprocessed + domain_names: + - domain_names + - domain_names + properties: + id: + format: uuid + readOnly: true + type: string + order_id: + format: int32 + readOnly: true + type: string + status: + description: | + - `unprocessed` - Order is in the process queue + - `canceled` - Order is canceled in favor of a new one with updated subject names + - `pending` - Authorization Challenges are set, Validating authorization challenges... + - `ready` - Challenges are validated, ready to issue the certificate + - `processing` - Issuing Certificate... + - `valid` - Certificate is issued successfully, this is the final stage + - `invalid` - An Error Occurred, this order cannot proceed anymore, a new order will be created automatically + - `terminated` - An Unknown Error occurred, this order cannot proceed anymore, a new order will be created automatically + - `killed` - Order failed despite many retries, will not proceed anymore nor retry, needs manual intervention + enum: + - unprocessed + - pending + - processing + - ready + - valid + - invalid + - canceled + - terminated + - killed + readOnly: true + type: string + domain_names: + items: + type: string + readOnly: true + type: array + errors: + items: + type: object + readOnly: true + type: array + expiry_date: + description: Expired order is treated as invalid order + format: date-time + readOnly: true + type: string + created_at: + format: date-time + readOnly: true + type: string + updated_at: + format: date-time + readOnly: true + type: string + type: object + Ssl: + example: + certificate_mode: managed + hsts_subdomain: true + hsts_preload: true + certificates: + - key_type: ec + updated_at: 2000-01-23T04:56:07.000+00:00 + expiry_date: 2000-01-23T04:56:07.000+00:00 + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + type: arvan + issuer: issuer + domain_names: + - domain_names + - domain_names + - key_type: ec + updated_at: 2000-01-23T04:56:07.000+00:00 + expiry_date: 2000-01-23T04:56:07.000+00:00 + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + type: arvan + issuer: issuer + domain_names: + - domain_names + - domain_names + https_redirect: true + replace_http: true + hsts_status: true + orders: + - updated_at: 2000-01-23T04:56:07.000+00:00 + expiry_date: 2000-01-23T04:56:07.000+00:00 + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + order_id: order_id + errors: + - "{}" + - "{}" + status: unprocessed + domain_names: + - domain_names + - domain_names + - updated_at: 2000-01-23T04:56:07.000+00:00 + expiry_date: 2000-01-23T04:56:07.000+00:00 + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + order_id: order_id + errors: + - "{}" + - "{}" + status: unprocessed + domain_names: + - domain_names + - domain_names + tls_version: "" + ssl_status: true + hsts_max_age: 1mo + properties: + ssl_status: + description: Whether Domain is using ssl module or not + type: boolean + certificate_mode: + description: "Indicates certificate is managed by arvan, or its up to the\ + \ user" + enum: + - managed + - custom + readOnly: true + type: string + tls_version: + description: Minimum version of TLS. Empty ('') means default. + enum: + - "" + - TLSv1 + - TLSv1.1 + - TLSv1.2 + - TLSv1.3 + type: string + hsts_status: + description: Whether HSTS is enabled + type: boolean + hsts_max_age: + description: HSTS max age directive + enum: + - 1mo + - 2mo + - 3mo + - 4mo + - 5mo + - 6mo + - 12mo + - 24mo + type: string + hsts_subdomain: + type: boolean + hsts_preload: + type: boolean + https_redirect: + type: boolean + replace_http: + description: Replace HTTP with HTTPs in HTML and JS sources + type: boolean + certificates: + items: + $ref: '#/components/schemas/Certificate' + readOnly: true + type: array + orders: + description: returns all "certificate orders" since the last invalid or + canceled order + items: + $ref: '#/components/schemas/CertificateOrder' + nullable: true + readOnly: true + type: array + type: object + SslResponse: + allOf: + - $ref: '#/components/schemas/DataWithMessageResponse' + example: + data: + certificate_mode: managed + hsts_subdomain: true + hsts_preload: true + certificates: + - key_type: ec + updated_at: 2000-01-23T04:56:07.000+00:00 + expiry_date: 2000-01-23T04:56:07.000+00:00 + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + type: arvan + issuer: issuer + domain_names: + - domain_names + - domain_names + - key_type: ec + updated_at: 2000-01-23T04:56:07.000+00:00 + expiry_date: 2000-01-23T04:56:07.000+00:00 + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + type: arvan + issuer: issuer + domain_names: + - domain_names + - domain_names + https_redirect: true + replace_http: true + hsts_status: true + orders: + - updated_at: 2000-01-23T04:56:07.000+00:00 + expiry_date: 2000-01-23T04:56:07.000+00:00 + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + order_id: order_id + errors: + - "{}" + - "{}" + status: unprocessed + domain_names: + - domain_names + - domain_names + - updated_at: 2000-01-23T04:56:07.000+00:00 + expiry_date: 2000-01-23T04:56:07.000+00:00 + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + order_id: order_id + errors: + - "{}" + - "{}" + status: unprocessed + domain_names: + - domain_names + - domain_names + tls_version: "" + ssl_status: true + hsts_max_age: 1mo + properties: + data: + $ref: '#/components/schemas/Ssl' + CertificateStore: + properties: + certificate: + format: binary + type: string + private_key: + format: binary + type: string + type: object + LogForwarderSummary: + example: + connection_type: connection_type + name: name + description: description + id: id + type: type + status: true + properties: + id: + type: string + type: + type: string + connection_type: + type: string + name: + type: string + description: + type: string + status: + type: boolean + type: object + TransportLayerProxy: + example: + ip: ip + proxy_protocol: "false" + created_at: 2000-01-23T04:56:07.000+00:00 + description: description + firewalls: + - access: allow + name: name + match: null + description: description + active: true + type: geo + - access: allow + name: name + match: null + description: description + active: true + type: geo + app_name: app_name + servers: + - address: address + fall: 1 + port: 6 + inter: 5 + weight: 15 + check: enabled + rise: 1 + - address: address + fall: 1 + port: 6 + inter: 5 + weight: 15 + check: enabled + rise: 1 + port: 5248 + domain: sub.example.com + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + firewall_default_action: allow + balance_algorithm: roundrobin + status: healthy + properties: + id: + format: uuid + readOnly: true + type: string + created_at: + format: date-time + readOnly: true + type: string + status: + enum: + - healthy + - initializing + - failed + readOnly: true + type: string + app_name: + type: string + description: + type: string + domain: + example: sub.example.com + type: string + port: + maximum: 65535 + type: integer + ip: + nullable: true + type: string + proxy_protocol: + enum: + - "false" + - send-proxy + - send-proxy-v2 + type: string + balance_algorithm: + enum: + - roundrobin + - leastconn + - source + type: string + servers: + items: + $ref: '#/components/schemas/TransportLayerProxy_servers_inner' + type: array + firewall_default_action: + enum: + - allow + - deny + type: string + firewalls: + items: + $ref: '#/components/schemas/TransportLayerProxy_firewalls_inner' + type: array + type: object + TransportLayerProxyMatch: + oneOf: + - $ref: '#/components/schemas/TransportLayerProxyMatchCountry' + - $ref: '#/components/schemas/TransportLayerProxyMatchIp' + type: object + TransportLayerProxyMatchCountry: + description: when type is geo + example: IR + pattern: "^[A-Za-z]{2}$" + type: string + TransportLayerProxyMatchIp: + description: when type is ip_range + items: + format: ip range + type: string + type: array + TransportLayerProxyResponse: + allOf: + - $ref: '#/components/schemas/DataWithMessageResponse' + example: + data: + ip: ip + proxy_protocol: "false" + created_at: 2000-01-23T04:56:07.000+00:00 + description: description + firewalls: + - access: allow + name: name + match: null + description: description + active: true + type: geo + - access: allow + name: name + match: null + description: description + active: true + type: geo + app_name: app_name + servers: + - address: address + fall: 1 + port: 6 + inter: 5 + weight: 15 + check: enabled + rise: 1 + - address: address + fall: 1 + port: 6 + inter: 5 + weight: 15 + check: enabled + rise: 1 + port: 5248 + domain: sub.example.com + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + firewall_default_action: allow + balance_algorithm: roundrobin + status: healthy + properties: + data: + $ref: '#/components/schemas/TransportLayerProxy' + TransportLayerProxyStore: + example: + app_name: app_name + servers: + - address: address + fall: 1 + port: 6 + inter: 5 + weight: 15 + check: enabled + rise: 1 + - address: address + fall: 1 + port: 6 + inter: 5 + weight: 15 + check: enabled + rise: 1 + port: 5248 + domain: sub.example.com + proxy_protocol: "false" + description: description + firewalls: + - access: allow + name: name + match: null + description: description + active: true + type: geo + - access: allow + name: name + match: null + description: description + active: true + type: geo + firewall_default_action: allow + balance_algorithm: roundrobin + properties: + app_name: + type: string + description: + type: string + domain: + example: sub.example.com + type: string + port: + maximum: 65535 + type: integer + proxy_protocol: + enum: + - "false" + - send-proxy + - send-proxy-v2 + type: string + balance_algorithm: + enum: + - roundrobin + - leastconn + - source + type: string + servers: + items: + $ref: '#/components/schemas/TransportLayerProxyServer' + type: array + firewall_default_action: + enum: + - allow + - deny + type: string + firewalls: + items: + $ref: '#/components/schemas/TransportLayerProxyFirewall' + type: array + required: + - app_name + - balance_algorithm + - domain + - firewall_default_action + - port + - proxy_protocol + type: object + TransportLayerProxyUpdate: + example: + app_name: app_name + servers: + - address: address + fall: 1 + port: 6 + inter: 5 + weight: 15 + check: enabled + rise: 1 + - address: address + fall: 1 + port: 6 + inter: 5 + weight: 15 + check: enabled + rise: 1 + port: 5248 + domain: sub.example.com + proxy_protocol: "false" + description: description + firewalls: + - access: allow + name: name + match: null + description: description + active: true + type: geo + - access: allow + name: name + match: null + description: description + active: true + type: geo + firewall_default_action: allow + balance_algorithm: roundrobin + properties: + app_name: + type: string + description: + type: string + domain: + example: sub.example.com + type: string + port: + maximum: 65535 + type: integer + proxy_protocol: + enum: + - "false" + - send-proxy + - send-proxy-v2 + type: string + balance_algorithm: + enum: + - roundrobin + - leastconn + - source + type: string + servers: + items: + $ref: '#/components/schemas/TransportLayerProxyServer' + type: array + firewall_default_action: + enum: + - allow + - deny + type: string + firewalls: + items: + $ref: '#/components/schemas/TransportLayerProxyFirewall' + type: array + required: + - app_name + - balance_algorithm + - proxy_protocol + type: object + TransportLayerProxyFirewall: + example: + access: allow + name: name + match: null + description: description + active: true + type: geo + properties: + access: + enum: + - allow + - deny + type: string + name: + maxLength: 100 + minLength: 3 + type: string + description: + maxLength: 500 + minLength: 3 + type: string + type: + enum: + - geo + - ip_range + type: string + match: + $ref: '#/components/schemas/TransportLayerProxyMatch' + active: + type: boolean + type: object + TransportLayerProxyServer: + example: + address: address + fall: 1 + port: 6 + inter: 5 + weight: 15 + check: enabled + rise: 1 + properties: + address: + format: hostname + type: string + port: + type: integer + weight: + maximum: 100 + minimum: 1 + type: integer + check: + enum: + - enabled + - disabled + type: string + fall: + minimum: 1 + type: integer + inter: + minimum: 5 + type: integer + rise: + minimum: 1 + type: integer + required: + - address + - check + - port + - weight + type: object + SslUpdate: + allOf: + - $ref: '#/components/schemas/Ssl' + example: + certificate: "[\"managed\",\"4e0de55d-96f5-471b-8ee5-f2667738320e\"]" + certificate_key_type: rsa + properties: + certificate: + description: a user uploaded certificate's uuid or `managed` + example: "[\"managed\",\"4e0de55d-96f5-471b-8ee5-f2667738320e\"]" + type: string + certificate_key_type: + enum: + - rsa + - ec + type: string + HealthCheckReportDetail: + example: + date: date + upstream: upstream + zone: zone + message: message + status: true + properties: + date: + format: datetime + type: string + zone: + type: string + upstream: + type: string + status: + type: boolean + message: + type: string + type: object + HealthCheckReportSummaryDetail: + example: + date: date + status: true + properties: + date: + format: datetime + type: string + status: + type: boolean + type: object + HealthCheckReportSummary: + example: + total: 0 + zone: zone + details: + - date: date + status: true + - date: date + status: true + failed: 6 + status: true + properties: + zone: + type: string + status: + type: boolean + total: + type: integer + failed: + type: integer + details: + items: + $ref: '#/components/schemas/HealthCheckReportSummaryDetail' + type: array + type: object + HealthCheckRequestConfig: + oneOf: + - $ref: '#/components/schemas/HttpConfig' + - $ref: '#/components/schemas/TcpConfig' + HealthCheckView: + allOf: + - $ref: '#/components/schemas/BaseHealthCheck' + example: + request_config: "{}" + properties: + request_config: + type: object + HealthCheck: + allOf: + - $ref: '#/components/schemas/BaseHealthCheck' + example: + request_config: null + properties: + request_config: + $ref: '#/components/schemas/HealthCheckRequestConfig' + BaseHealthCheck: + properties: + id: + format: uuid + readOnly: true + type: string + name: + type: string + description: + type: string + origin: + description: "can be IP/Host when type is `upstream`, otherwise it must\ + \ be a valid record ID" + type: string + origin_type: + enum: + - upstream + - dns + - pool + type: string + upstreams: + items: + example: 1.1.1.1 + type: string + type: array + interval: + description: In milliseconds + minimum: 15000 + type: integer + threshold: + minimum: 1 + type: integer + type: + enum: + - TCP + - HTTP + - HTTPS + type: string + status: + default: true + description: The health-check is off or on + type: boolean + retries: + description: Number of immediate retries in case of a timeout + maximum: 10 + minimum: 0 + type: integer + zones: + items: + $ref: '#/components/schemas/HealthCheckZone' + type: array + monitoring_updated_at: + format: date-time + nullable: true + type: string + type: object + HttpConfig: + properties: + method: + enum: + - HEAD + - GET + - POST + - PUT + type: string + port: + maximum: 65535 + minimum: 1 + type: integer + path: + description: path for test + type: string + allow_insecure: + type: boolean + expected_response: + $ref: '#/components/schemas/ExpectedResponse' + headers: + additionalProperties: + type: string + type: object + follow_redirects: + readOnly: true + type: boolean + timeout: + description: In milliseconds + maximum: 30000 + minimum: 1 + type: integer + required: + - allow_insecure + - expected_response + - headers + - method + - path + - port + - timeout + type: object + TcpConfig: + properties: + port: + maximum: 65535 + minimum: 1 + type: integer + timeout: + description: In milliseconds + maximum: 10000 + minimum: 1 + type: integer + required: + - port + - timeout + type: object + HealthCheckZone: + properties: + id: + type: string + monitoring_level: + enum: + - critical + - non-critical + - "false" + type: string + type: object + HealthCheckZoneName: + example: + name: name + id: id + properties: + id: + type: string + name: + type: string + type: object + ExpectedResponse: + properties: + codes: + description: List of expected http status code + items: + type: integer + type: array + headers: + additionalProperties: + items: + type: string + type: array + type: object + body: + type: string + type: object + Headers: + additionalProperties: + items: + type: string + type: array + type: object + MonitoringStatus: + enum: + - "off" + - no-data + - healthy + - unhealthy + nullable: true + type: string + HealthCheckResponse: + allOf: + - $ref: '#/components/schemas/DataWithMessageResponse' + example: + data: + request_config: "{}" + properties: + data: + $ref: '#/components/schemas/HealthCheckView' + FeaturePrice: + example: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + nullable: true + properties: + metric_key: + type: string + currency: + type: string + value: + type: number + type: object + UsageLimit: + example: + min: 5 + max: 5 + nullable: true + properties: + min: + type: integer + max: + type: integer + type: object + FeaturePricing: + example: + per_unit: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + flat: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + free_tier: 2 + nullable: true + properties: + free_tier: + type: integer + flat: + $ref: '#/components/schemas/FeaturePrice' + per_unit: + $ref: '#/components/schemas/FeaturePrice' + type: object + Currency: + example: + label: label + key: irr + properties: + key: + enum: + - irr + - eur + type: string + label: + type: string + type: object + PlanInfo: + example: + monthly_cost: 0.8008281904610115 + needed_balance: 1.4658129805029452 + name: name + discount: 6.027456183070403 + properties: + name: + type: string + monthly_cost: + type: number + discount: + description: between 0 to 100 is the percentage of the discount + type: number + needed_balance: + description: How much balance the account needs for selected plan + type: number + type: object + Plans: + items: + $ref: '#/components/schemas/PlanInfo' + type: array + FeaturePlanDefinition: + example: + usage_limit: + min: 5 + max: 5 + meta: + tip: tip + labels: + - null + - null + pricing: + per_unit: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + flat: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + free_tier: 2 + nullable: true + properties: + meta: + $ref: '#/components/schemas/FeaturePlanDefinition_meta' + usage_limit: + $ref: '#/components/schemas/UsageLimit' + pricing: + $ref: '#/components/schemas/FeaturePricing' + type: object + FeatureDefinition: + example: + plans: + "0": + usage_limit: + min: 5 + max: 5 + meta: + tip: tip + labels: + - null + - null + pricing: + per_unit: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + flat: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + free_tier: 2 + "1": + usage_limit: + min: 5 + max: 5 + meta: + tip: tip + labels: + - null + - null + pricing: + per_unit: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + flat: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + free_tier: 2 + "2": + usage_limit: + min: 5 + max: 5 + meta: + tip: tip + labels: + - null + - null + pricing: + per_unit: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + flat: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + free_tier: 2 + "3": + usage_limit: + min: 5 + max: 5 + meta: + tip: tip + labels: + - null + - null + pricing: + per_unit: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + flat: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + free_tier: 2 + "4": + usage_limit: + min: 5 + max: 5 + meta: + tip: tip + labels: + - null + - null + pricing: + per_unit: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + flat: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + free_tier: 2 + meta: + description: description + label: label + id: id + properties: + id: + type: string + plans: + $ref: '#/components/schemas/FeatureDefinition_plans' + meta: + $ref: '#/components/schemas/FeatureDefinition_meta' + type: object + FeatureSet: + example: + features: + - plans: + "0": + usage_limit: + min: 5 + max: 5 + meta: + tip: tip + labels: + - null + - null + pricing: + per_unit: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + flat: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + free_tier: 2 + "1": + usage_limit: + min: 5 + max: 5 + meta: + tip: tip + labels: + - null + - null + pricing: + per_unit: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + flat: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + free_tier: 2 + "2": + usage_limit: + min: 5 + max: 5 + meta: + tip: tip + labels: + - null + - null + pricing: + per_unit: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + flat: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + free_tier: 2 + "3": + usage_limit: + min: 5 + max: 5 + meta: + tip: tip + labels: + - null + - null + pricing: + per_unit: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + flat: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + free_tier: 2 + "4": + usage_limit: + min: 5 + max: 5 + meta: + tip: tip + labels: + - null + - null + pricing: + per_unit: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + flat: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + free_tier: 2 + meta: + description: description + label: label + id: id + - plans: + "0": + usage_limit: + min: 5 + max: 5 + meta: + tip: tip + labels: + - null + - null + pricing: + per_unit: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + flat: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + free_tier: 2 + "1": + usage_limit: + min: 5 + max: 5 + meta: + tip: tip + labels: + - null + - null + pricing: + per_unit: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + flat: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + free_tier: 2 + "2": + usage_limit: + min: 5 + max: 5 + meta: + tip: tip + labels: + - null + - null + pricing: + per_unit: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + flat: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + free_tier: 2 + "3": + usage_limit: + min: 5 + max: 5 + meta: + tip: tip + labels: + - null + - null + pricing: + per_unit: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + flat: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + free_tier: 2 + "4": + usage_limit: + min: 5 + max: 5 + meta: + tip: tip + labels: + - null + - null + pricing: + per_unit: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + flat: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + free_tier: 2 + meta: + description: description + label: label + id: id + id: id + label: label + properties: + id: + type: string + label: + type: string + features: + items: + $ref: '#/components/schemas/FeatureDefinition' + type: array + type: object + EstimatedCost: + example: + period: monthly + currency: IRT + value: 0.8008281904610115 + properties: + period: + enum: + - monthly + - dayly + - hourly + type: string + currency: + enum: + - IRT + - EUR + type: string + value: + type: number + type: object + FeatureUsage: + example: + feature_id: feature_id + estimated_cost: + period: monthly + currency: IRT + value: 0.8008281904610115 + usage: 6.027456183070403 + pricing: + per_unit: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + flat: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + free_tier: 2 + properties: + feature_id: + type: string + pricing: + $ref: '#/components/schemas/FeaturePricing' + estimated_cost: + $ref: '#/components/schemas/EstimatedCost' + usage: + type: number + type: object + Violations: + example: + violations: + enterprise: + - enterprise + - enterprise + paygo: + - paygo + - paygo + growth: + - growth + - growth + basic: + - basic + - basic + professional: + - professional + - professional + properties: + violations: + $ref: '#/components/schemas/Violations_violations' + type: object + Usages: + example: + feature_usages: + - feature_id: feature_id + estimated_cost: + period: monthly + currency: IRT + value: 0.8008281904610115 + usage: 6.027456183070403 + pricing: + per_unit: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + flat: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + free_tier: 2 + - feature_id: feature_id + estimated_cost: + period: monthly + currency: IRT + value: 0.8008281904610115 + usage: 6.027456183070403 + pricing: + per_unit: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + flat: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + free_tier: 2 + estimated_cost: + period: monthly + currency: IRT + value: 0.8008281904610115 + properties: + feature_usages: + items: + $ref: '#/components/schemas/FeatureUsage' + type: array + estimated_cost: + $ref: '#/components/schemas/EstimatedCost' + type: object + FeatureSets: + example: + plans: + - monthly_cost: 0.8008281904610115 + needed_balance: 1.4658129805029452 + name: name + discount: 6.027456183070403 + - monthly_cost: 0.8008281904610115 + needed_balance: 1.4658129805029452 + name: name + discount: 6.027456183070403 + feature_sets: + - features: + - plans: + "0": + usage_limit: + min: 5 + max: 5 + meta: + tip: tip + labels: + - null + - null + pricing: + per_unit: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + flat: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + free_tier: 2 + "1": + usage_limit: + min: 5 + max: 5 + meta: + tip: tip + labels: + - null + - null + pricing: + per_unit: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + flat: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + free_tier: 2 + "2": + usage_limit: + min: 5 + max: 5 + meta: + tip: tip + labels: + - null + - null + pricing: + per_unit: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + flat: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + free_tier: 2 + "3": + usage_limit: + min: 5 + max: 5 + meta: + tip: tip + labels: + - null + - null + pricing: + per_unit: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + flat: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + free_tier: 2 + "4": + usage_limit: + min: 5 + max: 5 + meta: + tip: tip + labels: + - null + - null + pricing: + per_unit: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + flat: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + free_tier: 2 + meta: + description: description + label: label + id: id + - plans: + "0": + usage_limit: + min: 5 + max: 5 + meta: + tip: tip + labels: + - null + - null + pricing: + per_unit: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + flat: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + free_tier: 2 + "1": + usage_limit: + min: 5 + max: 5 + meta: + tip: tip + labels: + - null + - null + pricing: + per_unit: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + flat: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + free_tier: 2 + "2": + usage_limit: + min: 5 + max: 5 + meta: + tip: tip + labels: + - null + - null + pricing: + per_unit: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + flat: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + free_tier: 2 + "3": + usage_limit: + min: 5 + max: 5 + meta: + tip: tip + labels: + - null + - null + pricing: + per_unit: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + flat: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + free_tier: 2 + "4": + usage_limit: + min: 5 + max: 5 + meta: + tip: tip + labels: + - null + - null + pricing: + per_unit: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + flat: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + free_tier: 2 + meta: + description: description + label: label + id: id + id: id + label: label + - features: + - plans: + "0": + usage_limit: + min: 5 + max: 5 + meta: + tip: tip + labels: + - null + - null + pricing: + per_unit: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + flat: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + free_tier: 2 + "1": + usage_limit: + min: 5 + max: 5 + meta: + tip: tip + labels: + - null + - null + pricing: + per_unit: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + flat: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + free_tier: 2 + "2": + usage_limit: + min: 5 + max: 5 + meta: + tip: tip + labels: + - null + - null + pricing: + per_unit: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + flat: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + free_tier: 2 + "3": + usage_limit: + min: 5 + max: 5 + meta: + tip: tip + labels: + - null + - null + pricing: + per_unit: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + flat: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + free_tier: 2 + "4": + usage_limit: + min: 5 + max: 5 + meta: + tip: tip + labels: + - null + - null + pricing: + per_unit: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + flat: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + free_tier: 2 + meta: + description: description + label: label + id: id + - plans: + "0": + usage_limit: + min: 5 + max: 5 + meta: + tip: tip + labels: + - null + - null + pricing: + per_unit: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + flat: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + free_tier: 2 + "1": + usage_limit: + min: 5 + max: 5 + meta: + tip: tip + labels: + - null + - null + pricing: + per_unit: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + flat: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + free_tier: 2 + "2": + usage_limit: + min: 5 + max: 5 + meta: + tip: tip + labels: + - null + - null + pricing: + per_unit: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + flat: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + free_tier: 2 + "3": + usage_limit: + min: 5 + max: 5 + meta: + tip: tip + labels: + - null + - null + pricing: + per_unit: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + flat: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + free_tier: 2 + "4": + usage_limit: + min: 5 + max: 5 + meta: + tip: tip + labels: + - null + - null + pricing: + per_unit: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + flat: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + free_tier: 2 + meta: + description: description + label: label + id: id + id: id + label: label + currency: + label: label + key: irr + properties: + currency: + $ref: '#/components/schemas/Currency' + plans: + items: + $ref: '#/components/schemas/PlanInfo' + type: array + feature_sets: + items: + $ref: '#/components/schemas/FeatureSet' + type: array + type: object + PlanResponse: + allOf: + - $ref: '#/components/schemas/DataWithMessageResponse' + example: + data: + plans: + - monthly_cost: 0.8008281904610115 + needed_balance: 1.4658129805029452 + name: name + discount: 6.027456183070403 + - monthly_cost: 0.8008281904610115 + needed_balance: 1.4658129805029452 + name: name + discount: 6.027456183070403 + feature_sets: + - features: + - plans: + "0": + usage_limit: + min: 5 + max: 5 + meta: + tip: tip + labels: + - null + - null + pricing: + per_unit: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + flat: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + free_tier: 2 + "1": + usage_limit: + min: 5 + max: 5 + meta: + tip: tip + labels: + - null + - null + pricing: + per_unit: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + flat: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + free_tier: 2 + "2": + usage_limit: + min: 5 + max: 5 + meta: + tip: tip + labels: + - null + - null + pricing: + per_unit: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + flat: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + free_tier: 2 + "3": + usage_limit: + min: 5 + max: 5 + meta: + tip: tip + labels: + - null + - null + pricing: + per_unit: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + flat: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + free_tier: 2 + "4": + usage_limit: + min: 5 + max: 5 + meta: + tip: tip + labels: + - null + - null + pricing: + per_unit: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + flat: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + free_tier: 2 + meta: + description: description + label: label + id: id + - plans: + "0": + usage_limit: + min: 5 + max: 5 + meta: + tip: tip + labels: + - null + - null + pricing: + per_unit: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + flat: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + free_tier: 2 + "1": + usage_limit: + min: 5 + max: 5 + meta: + tip: tip + labels: + - null + - null + pricing: + per_unit: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + flat: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + free_tier: 2 + "2": + usage_limit: + min: 5 + max: 5 + meta: + tip: tip + labels: + - null + - null + pricing: + per_unit: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + flat: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + free_tier: 2 + "3": + usage_limit: + min: 5 + max: 5 + meta: + tip: tip + labels: + - null + - null + pricing: + per_unit: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + flat: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + free_tier: 2 + "4": + usage_limit: + min: 5 + max: 5 + meta: + tip: tip + labels: + - null + - null + pricing: + per_unit: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + flat: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + free_tier: 2 + meta: + description: description + label: label + id: id + id: id + label: label + - features: + - plans: + "0": + usage_limit: + min: 5 + max: 5 + meta: + tip: tip + labels: + - null + - null + pricing: + per_unit: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + flat: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + free_tier: 2 + "1": + usage_limit: + min: 5 + max: 5 + meta: + tip: tip + labels: + - null + - null + pricing: + per_unit: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + flat: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + free_tier: 2 + "2": + usage_limit: + min: 5 + max: 5 + meta: + tip: tip + labels: + - null + - null + pricing: + per_unit: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + flat: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + free_tier: 2 + "3": + usage_limit: + min: 5 + max: 5 + meta: + tip: tip + labels: + - null + - null + pricing: + per_unit: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + flat: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + free_tier: 2 + "4": + usage_limit: + min: 5 + max: 5 + meta: + tip: tip + labels: + - null + - null + pricing: + per_unit: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + flat: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + free_tier: 2 + meta: + description: description + label: label + id: id + - plans: + "0": + usage_limit: + min: 5 + max: 5 + meta: + tip: tip + labels: + - null + - null + pricing: + per_unit: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + flat: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + free_tier: 2 + "1": + usage_limit: + min: 5 + max: 5 + meta: + tip: tip + labels: + - null + - null + pricing: + per_unit: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + flat: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + free_tier: 2 + "2": + usage_limit: + min: 5 + max: 5 + meta: + tip: tip + labels: + - null + - null + pricing: + per_unit: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + flat: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + free_tier: 2 + "3": + usage_limit: + min: 5 + max: 5 + meta: + tip: tip + labels: + - null + - null + pricing: + per_unit: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + flat: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + free_tier: 2 + "4": + usage_limit: + min: 5 + max: 5 + meta: + tip: tip + labels: + - null + - null + pricing: + per_unit: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + flat: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + free_tier: 2 + meta: + description: description + label: label + id: id + id: id + label: label + currency: + label: label + key: irr + properties: + data: + $ref: '#/components/schemas/FeatureSets' + CachingPurge: + example: + purge_urls: + - http://example.com/aeiou + - http://example.com/aeiou + - http://example.com/aeiou + - http://example.com/aeiou + - http://example.com/aeiou + purge_tags: + - purge_tags + - purge_tags + - purge_tags + - purge_tags + - purge_tags + purge: all + properties: + purge: + description: tags is deprecated + enum: + - all + - individual + - tags + type: string + purge_urls: + description: URLs to be purged from cache. Required if purge value is set + to individual. + items: + format: url + type: string + maxItems: 50 + minItems: 1 + type: array + purge_tags: + deprecated: true + description: | + Tags to be purged from cache. Required if purge value is set to tags. + Each tag must be 32 characters or less. Only ASCII characters are acceptable. + items: + type: string + maxItems: 100 + minItems: 1 + type: array + required: + - purge + type: object + DomainPurgeTags: + example: + domain_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + updated_at: 2000-01-23T04:56:07.000+00:00 + created_at: 2000-01-23T04:56:07.000+00:00 + tags: + - tags + - tags + properties: + domain_id: + format: uuid + type: string + tags: + items: + type: string + type: array + created_at: + format: date-time + type: string + updated_at: + format: date-time + type: string + type: object + ApplicationCategory: + example: + name: name + active: true + name_translation: + en: + name: name + fa: + name: name + id: id + order: 0 + applications: + - name: name + description: description + logo: logo + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + slug: slug + - name: name + description: description + logo: logo + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + slug: slug + - name: name + description: description + logo: logo + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + slug: slug + - name: name + description: description + logo: logo + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + slug: slug + - name: name + description: description + logo: logo + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + slug: slug + properties: + id: + type: string + name: + type: string + active: + type: boolean + order: + type: integer + name_translation: + $ref: '#/components/schemas/ApplicationCategory_name_translation' + applications: + items: + $ref: '#/components/schemas/ApplicationCategory_applications_inner' + maxItems: 10 + type: array + type: object + CloneDomain: + example: + from: from + properties: + from: + format: hostname + type: string + required: + - from + type: object + BypassAction: + properties: + rlimit: + type: boolean + challenge: + type: boolean + waf: + type: boolean + type: object + ChallengeAction: + example: + mode: 0 + https_only: true + ttl: 19008189 + properties: + mode: + description: "The mode of mitigation (1: Cookie, 2: Javascript, 3: Captcha)" + enum: + - 1 + - 2 + - 3 + type: integer + ttl: + maximum: 31536000 + minimum: 10 + type: integer + https_only: + type: boolean + type: object + DynamicField: + example: + updated_at: 2000-01-23T04:56:07.000+00:00 + scope: public + values: + - created_at: created_at + value: null + desc: desc + - created_at: created_at + value: null + desc: desc + name: name + namespace: namespace + description: description + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + type: ip + properties: + id: + format: uuid + readOnly: true + type: string + name: + type: string + description: + nullable: true + type: string + namespace: + readOnly: true + type: string + type: + enum: + - ip + - number + - byte + type: string + scope: + enum: + - public + - private + readOnly: true + type: string + values: + items: + $ref: '#/components/schemas/DynamicFieldValue' + type: array + created_at: + format: date-time + readOnly: true + type: string + updated_at: + format: date-time + readOnly: true + type: string + required: + - name + - type + - values + type: object + DynamicFieldResponse: + allOf: + - $ref: '#/components/schemas/DataWithMessageResponse' + example: + data: + updated_at: 2000-01-23T04:56:07.000+00:00 + scope: public + values: + - created_at: created_at + value: null + desc: desc + - created_at: created_at + value: null + desc: desc + name: name + namespace: namespace + description: description + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + type: ip + properties: + data: + $ref: '#/components/schemas/DynamicField' + DynamicFieldData: + allOf: + - $ref: '#/components/schemas/DataResponse' + example: + data: + updated_at: 2000-01-23T04:56:07.000+00:00 + scope: public + values: + - created_at: created_at + value: null + desc: desc + - created_at: created_at + value: null + desc: desc + name: name + namespace: namespace + description: description + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + type: ip + properties: + data: + $ref: '#/components/schemas/DynamicField' + DynamicFieldValues: + items: + $ref: '#/components/schemas/DynamicFieldValue' + type: array + DynamicFieldValue: + example: + created_at: created_at + value: null + desc: desc + properties: + value: + $ref: '#/components/schemas/DynamicFieldType' + desc: + type: string + created_at: + readOnly: true + type: string + type: object + DynamicFieldType: + oneOf: + - $ref: '#/components/schemas/DynamicFieldIpType' + - $ref: '#/components/schemas/DynamicFieldByteType' + - $ref: '#/components/schemas/DynamicFieldNumberType' + DynamicFieldIpType: + description: IPv4 or IPv6 + title: IP + type: string + DynamicFieldNumberType: + title: Number + type: number + DynamicFieldByteType: + format: byte + title: Byte + type: string + MessageResponse: + example: + message: message + properties: + message: + type: string + type: object + domains_index_200_response: + allOf: + - $ref: '#/components/schemas/PaginatedResponse' + example: + data: + - custom_cname: custom_cname + created_at: 2000-01-23T04:56:07.000+00:00 + type: full + target_cname: target_cname + plan_level: 0 + transfer: + incoming: true + account_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + owner_name: owner_name + owner_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + domain: domain + account_name: account_name + time: 2000-01-23T04:56:07.000+00:00 + dns_cloud: false + updated_at: 2000-01-23T04:56:07.000+00:00 + user_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + domain: domain + name: name + restriction: + - paused + - paused + ns_keys: + - ns_keys + - ns_keys + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + current_ns: + - current_ns + - current_ns + status: initializing + - custom_cname: custom_cname + created_at: 2000-01-23T04:56:07.000+00:00 + type: full + target_cname: target_cname + plan_level: 0 + transfer: + incoming: true + account_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + owner_name: owner_name + owner_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + domain: domain + account_name: account_name + time: 2000-01-23T04:56:07.000+00:00 + dns_cloud: false + updated_at: 2000-01-23T04:56:07.000+00:00 + user_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + domain: domain + name: name + restriction: + - paused + - paused + ns_keys: + - ns_keys + - ns_keys + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + current_ns: + - current_ns + - current_ns + status: initializing + properties: + data: + items: + $ref: '#/components/schemas/Domain' + type: array + domains_store_422_response: + properties: + status: + default: false + type: boolean + message: + type: string + errors: + additionalProperties: true + description: List of parameters and related errors + nullable: true + type: object + type: object + domains_show_404_response: + allOf: + - $ref: '#/components/schemas/MessageResponse' + properties: + status: + default: false + type: boolean + domains_nameservers_check_200_response: + allOf: + - $ref: '#/components/schemas/DataWithMessageResponse' + example: + data: + ns_keys: + - ns_keys + - ns_keys + ns_domain: + - ns_domain + - ns_domain + properties: + data: + $ref: '#/components/schemas/NsDomain' + domains_nameservers_deprecated_check_200_response: + allOf: + - $ref: '#/components/schemas/DataWithMessageResponse' + example: + data: + ns_status: true + ns_keys: + - ns_keys + - ns_keys + ns_domain: + - ns_domain + - ns_domain + properties: + data: + $ref: '#/components/schemas/DeprecatedNs' + domains_transfer_index_200_response: + allOf: + - $ref: '#/components/schemas/PaginatedResponse' + example: + data: + - incoming: true + account_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + owner_name: owner_name + owner_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + domain: domain + account_name: account_name + time: 2000-01-23T04:56:07.000+00:00 + - incoming: true + account_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + owner_name: owner_name + owner_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + domain: domain + account_name: account_name + time: 2000-01-23T04:56:07.000+00:00 + properties: + data: + items: + $ref: '#/components/schemas/DomainTransferData' + type: array + plans_index_domain_parameter: + anyOf: + - example: example.com + format: hostname + type: string + - format: uuid + type: string + domains_plans_violations_200_response: + allOf: + - $ref: '#/components/schemas/DataWithMessageResponse' + example: + data: + violations: + enterprise: + - enterprise + - enterprise + paygo: + - paygo + - paygo + growth: + - growth + - growth + basic: + - basic + - basic + professional: + - professional + - professional + properties: + data: + $ref: '#/components/schemas/Violations' + domains_plans_usages_200_response: + allOf: + - $ref: '#/components/schemas/DataWithMessageResponse' + example: + data: + feature_usages: + - feature_id: feature_id + estimated_cost: + period: monthly + currency: IRT + value: 0.8008281904610115 + usage: 6.027456183070403 + pricing: + per_unit: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + flat: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + free_tier: 2 + - feature_id: feature_id + estimated_cost: + period: monthly + currency: IRT + value: 0.8008281904610115 + usage: 6.027456183070403 + pricing: + per_unit: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + flat: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + free_tier: 2 + estimated_cost: + period: monthly + currency: IRT + value: 0.8008281904610115 + properties: + data: + $ref: '#/components/schemas/Usages' + dns_records_index_200_response: + allOf: + - $ref: '#/components/schemas/PaginatedResponse' + example: + data: + - null + - null + properties: + data: + items: + $ref: '#/components/schemas/DnsRecordGeneric' + type: array + purge_tags_index_200_response: + allOf: + - $ref: '#/components/schemas/DataResponse' + example: + data: + domain_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + updated_at: 2000-01-23T04:56:07.000+00:00 + created_at: 2000-01-23T04:56:07.000+00:00 + tags: + - tags + - tags + properties: + data: + $ref: '#/components/schemas/DomainPurgeTags' + load_balancers_regions_index_200_response: + allOf: + - $ref: '#/components/schemas/DataResponse' + example: + data: + - name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + region: LAH + - name: name + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + region: LAH + properties: + data: + items: + $ref: '#/components/schemas/LoadBalancerRegion' + type: array + load_balancers_settings_update_200_response: + allOf: + - $ref: '#/components/schemas/DataWithMessageResponse' + example: + data: + protocol: auto + max_fails: 800.8281904610114 + method: cluster_rr + next_upstream_tcp: "off" + keepalive: "off" + fail_timeout: 45s + properties: + data: + $ref: '#/components/schemas/LoadBalancerSetting' + load_balancers_index_200_response: + allOf: + - $ref: '#/components/schemas/DataResponse' + example: + data: + - method: failover + updated_at: 2000-01-23T04:56:07.000+00:00 + name: lb1 + description: description + pools: + - regions: + - regions + - regions + method: cluster_rr + monitoring_status: null + keepalive: "off" + next_upstream_tcp: "off" + description: description + created_at: 2000-01-23T04:56:07.000+00:00 + priority: 0 + updated_at: 2000-01-23T04:56:07.000+00:00 + name: name + origins: + - protocol: auto + address: address + updated_at: 2000-01-23T04:56:07.000+00:00 + port: 39500 + name: name + weight: 147 + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + status: true + host_header: host_header + - protocol: auto + address: address + updated_at: 2000-01-23T04:56:07.000+00:00 + port: 39500 + name: name + weight: 147 + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + status: true + host_header: host_header + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + status: true + - regions: + - regions + - regions + method: cluster_rr + monitoring_status: null + keepalive: "off" + next_upstream_tcp: "off" + description: description + created_at: 2000-01-23T04:56:07.000+00:00 + priority: 0 + updated_at: 2000-01-23T04:56:07.000+00:00 + name: name + origins: + - protocol: auto + address: address + updated_at: 2000-01-23T04:56:07.000+00:00 + port: 39500 + name: name + weight: 147 + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + status: true + host_header: host_header + - protocol: auto + address: address + updated_at: 2000-01-23T04:56:07.000+00:00 + port: 39500 + name: name + weight: 147 + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + status: true + host_header: host_header + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + status: true + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + status: true + - method: failover + updated_at: 2000-01-23T04:56:07.000+00:00 + name: lb1 + description: description + pools: + - regions: + - regions + - regions + method: cluster_rr + monitoring_status: null + keepalive: "off" + next_upstream_tcp: "off" + description: description + created_at: 2000-01-23T04:56:07.000+00:00 + priority: 0 + updated_at: 2000-01-23T04:56:07.000+00:00 + name: name + origins: + - protocol: auto + address: address + updated_at: 2000-01-23T04:56:07.000+00:00 + port: 39500 + name: name + weight: 147 + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + status: true + host_header: host_header + - protocol: auto + address: address + updated_at: 2000-01-23T04:56:07.000+00:00 + port: 39500 + name: name + weight: 147 + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + status: true + host_header: host_header + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + status: true + - regions: + - regions + - regions + method: cluster_rr + monitoring_status: null + keepalive: "off" + next_upstream_tcp: "off" + description: description + created_at: 2000-01-23T04:56:07.000+00:00 + priority: 0 + updated_at: 2000-01-23T04:56:07.000+00:00 + name: name + origins: + - protocol: auto + address: address + updated_at: 2000-01-23T04:56:07.000+00:00 + port: 39500 + name: name + weight: 147 + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + status: true + host_header: host_header + - protocol: auto + address: address + updated_at: 2000-01-23T04:56:07.000+00:00 + port: 39500 + name: name + weight: 147 + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + status: true + host_header: host_header + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + status: true + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + status: true + properties: + data: + items: + $ref: '#/components/schemas/LoadBalancer' + type: array + load_balancers_pools_index_200_response: + allOf: + - $ref: '#/components/schemas/DataResponse' + example: + data: + - regions: + - regions + - regions + method: cluster_rr + monitoring_status: null + keepalive: "off" + next_upstream_tcp: "off" + description: description + created_at: 2000-01-23T04:56:07.000+00:00 + priority: 0 + updated_at: 2000-01-23T04:56:07.000+00:00 + name: name + origins: + - protocol: auto + address: address + updated_at: 2000-01-23T04:56:07.000+00:00 + port: 39500 + name: name + weight: 147 + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + status: true + host_header: host_header + - protocol: auto + address: address + updated_at: 2000-01-23T04:56:07.000+00:00 + port: 39500 + name: name + weight: 147 + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + status: true + host_header: host_header + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + status: true + - regions: + - regions + - regions + method: cluster_rr + monitoring_status: null + keepalive: "off" + next_upstream_tcp: "off" + description: description + created_at: 2000-01-23T04:56:07.000+00:00 + priority: 0 + updated_at: 2000-01-23T04:56:07.000+00:00 + name: name + origins: + - protocol: auto + address: address + updated_at: 2000-01-23T04:56:07.000+00:00 + port: 39500 + name: name + weight: 147 + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + status: true + host_header: host_header + - protocol: auto + address: address + updated_at: 2000-01-23T04:56:07.000+00:00 + port: 39500 + name: name + weight: 147 + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + status: true + host_header: host_header + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + status: true + properties: + data: + items: + $ref: '#/components/schemas/LoadBalancerPool' + type: array + load_balancers_pools_origins_index_200_response: + allOf: + - $ref: '#/components/schemas/DataResponse' + example: + data: + - protocol: auto + address: address + updated_at: 2000-01-23T04:56:07.000+00:00 + port: 39500 + name: name + weight: 147 + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + status: true + host_header: host_header + - protocol: auto + address: address + updated_at: 2000-01-23T04:56:07.000+00:00 + port: 39500 + name: name + weight: 147 + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + status: true + host_header: host_header + properties: + data: + items: + $ref: '#/components/schemas/LoadBalancerOrigin' + type: array + page_rules_index_200_response: + allOf: + - $ref: '#/components/schemas/PaginatedResponse' + example: + data: + - url_type: default + created_at: 2000-01-23T04:56:07.000+00:00 + is_protected: false + fw_status: true + url: url + cache_level: query_string + slink_status: false + domain_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + acceleration: + extensions: + - css + - js + status: inherit + waf_status: true + updated_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + seq: 0 + status: true + - url_type: default + created_at: 2000-01-23T04:56:07.000+00:00 + is_protected: false + fw_status: true + url: url + cache_level: query_string + slink_status: false + domain_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + acceleration: + extensions: + - css + - js + status: inherit + waf_status: true + updated_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + seq: 0 + status: true + properties: + data: + items: + $ref: '#/components/schemas/PageRuleSummary' + type: array + page_rules_diff_update_200_response: + allOf: + - $ref: '#/components/schemas/DataWithMessageResponse' + example: + data: + res_custom_headers: + - name: name + is_var: true + value: value + - name: name + is_var: true + value: value + upstream_timeout: + connect_timeout: 0 + send_timeout: 1 + read_timeout: 6 + cache_args: true + fw_status: true + cache_ignore_sc: true + cache_level: "off" + acceleration: + extensions: + - css + - js + status: inherit + cors_header: cors_header + cluster_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + cache_cookie: cache_cookie + cluster_status: true + slink_secret: slink_secret + cache_arg: filter&sort + slink_md5: + - remote_addr + - remote_addr + cache_ignore_cc: true + req_hide_headers: + - req_hide_headers + - req_hide_headers + redirect: + status_code: 0 + enable: true + url: http://example.com/aeiou + cache_any: 0s + req_custom_headers: + - name: name + is_var: true + value: value + - name: name + is_var: true + value: value + url: url + res_hide_headers: + - res_hide_headers + - res_hide_headers + slink_status: true + cache_200: 0s + waf_status: true + cache_scheme: true + custom_host_header: custom_host_header + cache_browser: default + status: true + cache_ignore_vary: true + rewrite_url: rewrite_url + properties: + data: + $ref: '#/components/schemas/PageRuleDiff' + log_forwarders_index_200_response: + allOf: + - $ref: '#/components/schemas/PaginatedResponse' + example: + data: + - connection_type: connection_type + name: name + description: description + id: id + type: type + status: true + - connection_type: connection_type + name: name + description: description + id: id + type: type + status: true + properties: + data: + items: + $ref: '#/components/schemas/LogForwarderSummary' + type: array + transport_layer_proxies_index_200_response: + allOf: + - $ref: '#/components/schemas/PaginatedResponse' + example: + data: + - ip: ip + proxy_protocol: "false" + created_at: 2000-01-23T04:56:07.000+00:00 + description: description + firewalls: + - access: allow + name: name + match: null + description: description + active: true + type: geo + - access: allow + name: name + match: null + description: description + active: true + type: geo + app_name: app_name + servers: + - address: address + fall: 1 + port: 6 + inter: 5 + weight: 15 + check: enabled + rise: 1 + - address: address + fall: 1 + port: 6 + inter: 5 + weight: 15 + check: enabled + rise: 1 + port: 5248 + domain: sub.example.com + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + firewall_default_action: allow + balance_algorithm: roundrobin + status: healthy + - ip: ip + proxy_protocol: "false" + created_at: 2000-01-23T04:56:07.000+00:00 + description: description + firewalls: + - access: allow + name: name + match: null + description: description + active: true + type: geo + - access: allow + name: name + match: null + description: description + active: true + type: geo + app_name: app_name + servers: + - address: address + fall: 1 + port: 6 + inter: 5 + weight: 15 + check: enabled + rise: 1 + - address: address + fall: 1 + port: 6 + inter: 5 + weight: 15 + check: enabled + rise: 1 + port: 5248 + domain: sub.example.com + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + firewall_default_action: allow + balance_algorithm: roundrobin + status: healthy + properties: + data: + items: + $ref: '#/components/schemas/TransportLayerProxy' + type: array + email_forwardings_recipients_store_201_response: + allOf: + - $ref: '#/components/schemas/DataWithMessageResponse' + example: + data: + id: id + is_default: true + is_verified: true + email: email + properties: + data: + $ref: '#/components/schemas/EmailForwardingRecipient' + email_forwardings_aliases_store_201_response: + allOf: + - $ref: '#/components/schemas/DataWithMessageResponse' + example: + data: + is_active: true + local_part: local_part + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + email: email + properties: + data: + $ref: '#/components/schemas/EmailForwardingAlias' + troubleshoots_index_200_response: + allOf: + - $ref: '#/components/schemas/DataResponse' + example: + data: + - created_at: created_at + details: + - details: details + id: root_dns_record + status: safe + - details: details + id: root_dns_record + status: safe + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - created_at: created_at + details: + - details: details + id: root_dns_record + status: safe + - details: details + id: root_dns_record + status: safe + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + data: + items: + $ref: '#/components/schemas/Troubleshoot' + type: array + troubleshoots_store_201_response: + allOf: + - $ref: '#/components/schemas/DataResponse' + example: + data: + created_at: created_at + details: + - details: details + id: root_dns_record + status: safe + - details: details + id: root_dns_record + status: safe + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + data: + $ref: '#/components/schemas/Troubleshoot' + reports_visitors_high_request_ips_200_response: + allOf: + - $ref: '#/components/schemas/PaginatedResponse' + example: + data: + - ip: null + request_count: 0 + - ip: null + request_count: 0 + properties: + data: + items: + $ref: '#/components/schemas/HighRequestedIp' + type: array + reports_error_log_details_200_response: + example: + data: "{}" + properties: + data: + type: object + type: object + reports_attacks_show_200_response: + allOf: + - $ref: '#/components/schemas/DataResponse' + example: + data: + charts: + attacks: + series: + - data: + - 0 + - 0 + name: reports.attack.attacks + - data: + - 0 + - 0 + name: reports.attack.attacks + categories: + - 2000-01-23T04:56:07.000+00:00 + - 2000-01-23T04:56:07.000+00:00 + title: reports.attack + statistics: + attacks: + total: 0 + top: 2000-01-23T04:56:07.000+00:00 + properties: + data: + $ref: '#/components/schemas/AttackReport' + reports_attacks_index_200_response: + allOf: + - $ref: '#/components/schemas/PaginatedResponse' + example: + data: + - alerts: + - alerts + - alerts + method: GET + cookie: + - cookie + - cookie + attacker_country: attacker_country + uri_args: uri_args + attacker_ip: attacker_ip + host: + - host + - host + uri: https://openapi-generator.tech + user_agent: + - user_agent + - user_agent + timestamp: 2000-01-23T04:56:07.000+00:00 + - alerts: + - alerts + - alerts + method: GET + cookie: + - cookie + - cookie + attacker_country: attacker_country + uri_args: uri_args + attacker_ip: attacker_ip + host: + - host + - host + uri: https://openapi-generator.tech + user_agent: + - user_agent + - user_agent + timestamp: 2000-01-23T04:56:07.000+00:00 + properties: + data: + items: + $ref: '#/components/schemas/AttackReportItem' + type: array + reports_attacks_attackers_200_response_data_inner: + example: + ip: ip + count: 0 + properties: + ip: + format: ipv4 + type: string + count: + type: integer + type: object + reports_attacks_attackers_200_response: + allOf: + - $ref: '#/components/schemas/DataResponse' + example: + data: + - ip: ip + count: 0 + - ip: ip + count: 0 + properties: + data: + items: + $ref: '#/components/schemas/reports_attacks_attackers_200_response_data_inner' + type: array + bulk_reports_traffics_total_request: + properties: + domains: + description: List of domains' IDs + items: + format: uuid + type: string + type: array + excludeSubdomains: + description: Whether to include sub-domains or report only root domain traffic + type: boolean + type: object + bulk_reports_visitors_total_request: + properties: + domains: + description: List of domains' IDs + items: + format: uuid + type: string + type: array + excludeSubdomains: + description: Whether to include sub-domains or report only root domain traffic + type: object + firewall_index_200_response: + allOf: + - $ref: '#/components/schemas/DataWithMessageResponse' + example: + data: + is_enabled: true + default_action_details: "{}" + verify_sni: false + rules: + - action_details: "{}" + - action_details: "{}" + default_action: allow + properties: + data: + $ref: '#/components/schemas/Firewall' + firewall_settings_index_200_response: + allOf: + - $ref: '#/components/schemas/DataWithMessageResponse' + example: + data: + default_action_details: "{}" + properties: + data: + $ref: '#/components/schemas/FirewallSettingsView' + firewall_rules_index_200_response: + allOf: + - $ref: '#/components/schemas/PaginatedResponse' + example: + data: + - action_details: "{}" + - action_details: "{}" + properties: + data: + items: + $ref: '#/components/schemas/FirewallRuleView' + type: array + waf_rules_index_200_response: + allOf: + - $ref: '#/components/schemas/PaginatedResponse' + example: + data: + - is_enabled: true + url_pattern: url_pattern + sources: + - 1.2.3.4/32 + - 1.2.3.4/32 + - 1.2.3.4/32 + - 1.2.3.4/32 + - 1.2.3.4/32 + action: protect + description: description + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - is_enabled: true + url_pattern: url_pattern + sources: + - 1.2.3.4/32 + - 1.2.3.4/32 + - 1.2.3.4/32 + - 1.2.3.4/32 + - 1.2.3.4/32 + action: protect + description: description + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + data: + items: + $ref: '#/components/schemas/WafRule' + type: array + waf_packages_store_200_response: + allOf: + - $ref: '#/components/schemas/DataWithMessageResponse' + example: + data: + is_enabled: true + params: "{}" + properties: + data: + $ref: '#/components/schemas/DomainWafPackage' + waf_packages_update_200_response: + allOf: + - $ref: '#/components/schemas/DataWithMessageResponse' + example: + data: null + properties: + data: + $ref: '#/components/schemas/DomainWafPackageDetails' + ddos_update_200_response: + allOf: + - $ref: '#/components/schemas/DataWithMessageResponse' + example: + data: + is_enabled: true + https_only: true + rules: + - is_enabled: true + url_pattern: url_pattern + sources: + - 1.2.3.4/32 + - 1.2.3.4/32 + - 1.2.3.4/32 + - 1.2.3.4/32 + - 1.2.3.4/32 + description: description + action: passthrough + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - is_enabled: true + url_pattern: url_pattern + sources: + - 1.2.3.4/32 + - 1.2.3.4/32 + - 1.2.3.4/32 + - 1.2.3.4/32 + - 1.2.3.4/32 + description: description + action: passthrough + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + captcha_service: recaptcha + ttl: 0 + preflight: + access_credentials: access_credentials + access_methods: + - GET + - GET + access_expose_headers: access_expose_headers + access_origin: access_origin + access_headers: access_headers + protection_mode: "false" + properties: + data: + $ref: '#/components/schemas/Ddos' + ddos_settings_update_200_response: + allOf: + - $ref: '#/components/schemas/DataWithMessageResponse' + example: + data: + is_enabled: true + https_only: true + captcha_service: recaptcha + ttl: 0 + preflight: + access_credentials: access_credentials + access_methods: + - GET + - GET + access_expose_headers: access_expose_headers + access_origin: access_origin + access_headers: access_headers + protection_mode: "false" + properties: + data: + $ref: '#/components/schemas/DdosSettings' + ddos_rules_index_200_response: + allOf: + - $ref: '#/components/schemas/PaginatedResponse' + example: + data: + - is_enabled: true + url_pattern: url_pattern + sources: + - 1.2.3.4/32 + - 1.2.3.4/32 + - 1.2.3.4/32 + - 1.2.3.4/32 + - 1.2.3.4/32 + description: description + action: passthrough + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - is_enabled: true + url_pattern: url_pattern + sources: + - 1.2.3.4/32 + - 1.2.3.4/32 + - 1.2.3.4/32 + - 1.2.3.4/32 + - 1.2.3.4/32 + description: description + action: passthrough + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + data: + items: + $ref: '#/components/schemas/DdosRule' + type: array + rate_limiting_update_200_response: + allOf: + - $ref: '#/components/schemas/DataWithMessageResponse' + example: + data: + exclude_sources: + - 1.2.3.4/32 + - 1.2.3.4/32 + ddos_detection: true + rules: + - action_details: "{}" + - action_details: "{}" + properties: + data: + $ref: '#/components/schemas/RateLimit' + rate_limiting_settings_update_200_response: + allOf: + - $ref: '#/components/schemas/DataWithMessageResponse' + example: + data: + exclude_sources: + - 1.2.3.4/32 + - 1.2.3.4/32 + ddos_detection: true + properties: + data: + $ref: '#/components/schemas/RateLimitSettings' + rate_limiting_rules_index_200_response: + allOf: + - $ref: '#/components/schemas/PaginatedResponse' + example: + data: + - action_details: "{}" + - action_details: "{}" + properties: + data: + items: + $ref: '#/components/schemas/RateLimitRuleView' + type: array + rate_limiting_rules_update_200_response: + allOf: + - $ref: '#/components/schemas/DataWithMessageResponse' + example: + data: + action_details: "{}" + properties: + data: + $ref: '#/components/schemas/RateLimitRuleView' + apps_index_200_response: + allOf: + - $ref: '#/components/schemas/PaginatedResponse' + example: + data: + - install_json: "{}" + short_description: short_description + like_by_user: true + description: description + created_at: 2000-01-23T04:56:07.000+00:00 + pictures: + - http://example.com/aeiou + - http://example.com/aeiou + like_stats: + likes_count: 6 + dislikes_count: 1 + support_email: support_email + updated_at: 2000-01-23T04:56:07.000+00:00 + vendor: vendor + name: name + rank: 5 + logo: logo + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + categories: + - name: name + active: true + name_translation: + en: + name: name + fa: + name: name + id: id + order: 0 + applications: + - name: name + description: description + logo: logo + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + slug: slug + - name: name + description: description + logo: logo + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + slug: slug + - name: name + description: description + logo: logo + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + slug: slug + - name: name + description: description + logo: logo + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + slug: slug + - name: name + description: description + logo: logo + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + slug: slug + - name: name + active: true + name_translation: + en: + name: name + fa: + name: name + id: id + order: 0 + applications: + - name: name + description: description + logo: logo + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + slug: slug + - name: name + description: description + logo: logo + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + slug: slug + - name: name + description: description + logo: logo + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + slug: slug + - name: name + description: description + logo: logo + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + slug: slug + - name: name + description: description + logo: logo + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + slug: slug + slug: slug + status: published + - install_json: "{}" + short_description: short_description + like_by_user: true + description: description + created_at: 2000-01-23T04:56:07.000+00:00 + pictures: + - http://example.com/aeiou + - http://example.com/aeiou + like_stats: + likes_count: 6 + dislikes_count: 1 + support_email: support_email + updated_at: 2000-01-23T04:56:07.000+00:00 + vendor: vendor + name: name + rank: 5 + logo: logo + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + categories: + - name: name + active: true + name_translation: + en: + name: name + fa: + name: name + id: id + order: 0 + applications: + - name: name + description: description + logo: logo + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + slug: slug + - name: name + description: description + logo: logo + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + slug: slug + - name: name + description: description + logo: logo + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + slug: slug + - name: name + description: description + logo: logo + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + slug: slug + - name: name + description: description + logo: logo + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + slug: slug + - name: name + active: true + name_translation: + en: + name: name + fa: + name: name + id: id + order: 0 + applications: + - name: name + description: description + logo: logo + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + slug: slug + - name: name + description: description + logo: logo + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + slug: slug + - name: name + description: description + logo: logo + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + slug: slug + - name: name + description: description + logo: logo + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + slug: slug + - name: name + description: description + logo: logo + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + slug: slug + slug: slug + status: published + properties: + data: + items: + $ref: '#/components/schemas/CdnApp' + type: array + domains_apps_store_200_response: + allOf: + - $ref: '#/components/schemas/DataWithMessageResponse' + example: + data: + domain_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + updated_at: 2000-01-23T04:56:07.000+00:00 + options: "{}" + active: true + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + application_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + data: + $ref: '#/components/schemas/DomainCdnApp' + apps_category_index_200_response: + allOf: + - $ref: '#/components/schemas/PaginatedResponse' + example: + data: + - name: name + active: true + name_translation: + en: + name: name + fa: + name: name + id: id + order: 0 + applications: + - name: name + description: description + logo: logo + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + slug: slug + - name: name + description: description + logo: logo + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + slug: slug + - name: name + description: description + logo: logo + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + slug: slug + - name: name + description: description + logo: logo + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + slug: slug + - name: name + description: description + logo: logo + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + slug: slug + - name: name + active: true + name_translation: + en: + name: name + fa: + name: name + id: id + order: 0 + applications: + - name: name + description: description + logo: logo + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + slug: slug + - name: name + description: description + logo: logo + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + slug: slug + - name: name + description: description + logo: logo + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + slug: slug + - name: name + description: description + logo: logo + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + slug: slug + - name: name + description: description + logo: logo + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + slug: slug + properties: + data: + items: + $ref: '#/components/schemas/ApplicationCategory' + type: array + apps_category_show_200_response: + allOf: + - $ref: '#/components/schemas/DataWithMessageResponse' + example: + data: + name: name + active: true + name_translation: + en: + name: name + fa: + name: name + id: id + order: 0 + applications: + - name: name + description: description + logo: logo + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + slug: slug + - name: name + description: description + logo: logo + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + slug: slug + - name: name + description: description + logo: logo + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + slug: slug + - name: name + description: description + logo: logo + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + slug: slug + - name: name + description: description + logo: logo + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + slug: slug + properties: + data: + $ref: '#/components/schemas/ApplicationCategory' + ssl_cert_order_index_200_response: + allOf: + - $ref: '#/components/schemas/DataWithMessageResponse' + example: + data: + - updated_at: 2000-01-23T04:56:07.000+00:00 + expiry_date: 2000-01-23T04:56:07.000+00:00 + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + order_id: order_id + errors: + - "{}" + - "{}" + status: unprocessed + domain_names: + - domain_names + - domain_names + - updated_at: 2000-01-23T04:56:07.000+00:00 + expiry_date: 2000-01-23T04:56:07.000+00:00 + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + order_id: order_id + errors: + - "{}" + - "{}" + status: unprocessed + domain_names: + - domain_names + - domain_names + properties: + data: + items: + $ref: '#/components/schemas/CertificateOrder' + type: array + active_health_check_index_200_response: + allOf: + - $ref: '#/components/schemas/DataWithMessageResponse' + example: + data: + - request_config: "{}" + - request_config: "{}" + properties: + data: + items: + $ref: '#/components/schemas/HealthCheckView' + type: array + active_health_check_reports_summary_200_response: + allOf: + - $ref: '#/components/schemas/DataWithMessageResponse' + example: + data: + - total: 0 + zone: zone + details: + - date: date + status: true + - date: date + status: true + failed: 6 + status: true + - total: 0 + zone: zone + details: + - date: date + status: true + - date: date + status: true + failed: 6 + status: true + properties: + data: + items: + $ref: '#/components/schemas/HealthCheckReportSummary' + type: array + active_health_check_reports_details_200_response: + allOf: + - $ref: '#/components/schemas/PaginatedResponse' + example: + data: + - date: date + upstream: upstream + zone: zone + message: message + status: true + - date: date + upstream: upstream + zone: zone + message: message + status: true + properties: + data: + items: + $ref: '#/components/schemas/HealthCheckReportDetail' + type: array + health_checks_zones_index_200_response: + allOf: + - $ref: '#/components/schemas/DataWithMessageResponse' + example: + data: + - name: name + id: id + - name: name + id: id + properties: + data: + items: + $ref: '#/components/schemas/HealthCheckZoneName' + type: array + lists_index_200_response: + allOf: + - $ref: '#/components/schemas/PaginatedResponse' + example: + data: + - updated_at: 2000-01-23T04:56:07.000+00:00 + scope: public + values: + - created_at: created_at + value: null + desc: desc + - created_at: created_at + value: null + desc: desc + name: name + namespace: namespace + description: description + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + type: ip + - updated_at: 2000-01-23T04:56:07.000+00:00 + scope: public + values: + - created_at: created_at + value: null + desc: desc + - created_at: created_at + value: null + desc: desc + name: name + namespace: namespace + description: description + created_at: 2000-01-23T04:56:07.000+00:00 + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + type: ip + properties: + data: + items: + $ref: '#/components/schemas/DynamicField' + type: array + SavedTrafficsCharts_request_inner: + properties: + name: + enum: + - reports.request.hit + - reports.request.miss + type: string + "y": + type: integer + type: object + SavedTrafficsCharts_traffic_inner: + properties: + name: + enum: + - reports.traffic.hit + - reports.traffic.miss + type: string + "y": + type: integer + type: object + SavedTrafficsStatistics_traffic: + properties: + saved: + type: integer + total: + type: integer + type: object + TrafficCharts_requests_series_inner: + properties: + name: + enum: + - reports.requests.total + - reports.requests.saved + type: string + data: + items: + type: integer + type: array + type: object + TrafficCharts_requests: + properties: + title: + enum: + - reports.requests + type: string + categories: + items: + format: date-time + type: string + type: array + series: + items: + $ref: '#/components/schemas/TrafficCharts_requests_series_inner' + type: array + type: object + TrafficCharts_traffics_series_inner: + properties: + name: + enum: + - reports.traffics.total + - reports.traffics.saved + type: string + data: + items: + type: integer + type: array + type: object + TrafficCharts_traffics: + properties: + title: + enum: + - reports.traffics + type: string + categories: + items: + format: date-time + type: string + type: array + series: + items: + $ref: '#/components/schemas/TrafficCharts_traffics_series_inner' + type: array + type: object + TrafficStatistics_traffics: + properties: + saved: + type: integer + top: + format: date-time + type: string + total: + type: integer + required: + - saved + - top + - total + type: object + VisitorsStatistics_visitors: + example: + total_visitors: 0 + top_visitors: 2000-01-23T04:56:07.000+00:00 + properties: + top_visitors: + format: date-time + type: string + total_visitors: + type: integer + required: + - top_visitors + - total_visitors + type: object + VisitorsCharts_visitors_series_inner: + example: + data: + - 6 + - 6 + name: reports.visitor.visitors + properties: + name: + enum: + - reports.visitor.visitors + type: string + data: + items: + type: integer + type: array + type: object + VisitorsCharts_visitors: + example: + series: + - data: + - 6 + - 6 + name: reports.visitor.visitors + - data: + - 6 + - 6 + name: reports.visitor.visitors + categories: + - 2000-01-23T04:56:07.000+00:00 + - 2000-01-23T04:56:07.000+00:00 + title: reports.visitor + properties: + title: + enum: + - reports.visitor + type: string + categories: + items: + format: date-time + type: string + type: array + series: + items: + $ref: '#/components/schemas/VisitorsCharts_visitors_series_inner' + type: array + type: object + HighRequestedIp_ip: + anyOf: + - format: ipv4 + type: string + - format: ipv6 + type: string + ResponseTime_statistics: + example: + response_time: "" + properties: + response_time: + nullable: true + type: object + ResponseTime_charts_ir_series_inner: + example: + data: + - 0 + - 0 + name: reports.response_time.Server + properties: + name: + enum: + - reports.response_time.Server + type: string + data: + items: + type: integer + type: array + type: object + ResponseTime_charts_ir: + example: + series: + - data: + - 0 + - 0 + name: reports.response_time.Server + - data: + - 0 + - 0 + name: reports.response_time.Server + categories: + - 2000-01-23T04:56:07.000+00:00 + - 2000-01-23T04:56:07.000+00:00 + title: reports.response_time + properties: + title: + enum: + - reports.response_time + type: string + categories: + items: + format: date-time + type: string + type: array + series: + items: + $ref: '#/components/schemas/ResponseTime_charts_ir_series_inner' + type: array + type: object + ResponseTime_charts: + example: + ir: + series: + - data: + - 0 + - 0 + name: reports.response_time.Server + - data: + - 0 + - 0 + name: reports.response_time.Server + categories: + - 2000-01-23T04:56:07.000+00:00 + - 2000-01-23T04:56:07.000+00:00 + title: reports.response_time + properties: + ir: + $ref: '#/components/schemas/ResponseTime_charts_ir' + type: object + StatusCodeReport_statistics_status_codes: + example: + "4xx_sum": 1 + "3xx_sum": 6 + "5xx_sum": 5 + "2xx_sum": 0 + properties: + "2xx_sum": + type: integer + "3xx_sum": + type: integer + "4xx_sum": + type: integer + "5xx_sum": + type: integer + type: object + StatusCodeReport_statistics: + example: + status_codes: + "4xx_sum": 1 + "3xx_sum": 6 + "5xx_sum": 5 + "2xx_sum": 0 + properties: + status_codes: + $ref: '#/components/schemas/StatusCodeReport_statistics_status_codes' + type: object + StatusCodeReport_charts_status_code_series_inner: + example: + data: + - 5.637376656633329 + - 5.637376656633329 + name: report.status_code.2xx + properties: + name: + enum: + - report.status_code.2xx + - report.status_code.3xx + - report.status_code.4xx + - report.status_code.4xx + type: string + data: + items: + format: double + type: number + type: array + type: object + StatusCodeReport_charts_status_code: + example: + series: + - data: + - 5.637376656633329 + - 5.637376656633329 + name: report.status_code.2xx + - data: + - 5.637376656633329 + - 5.637376656633329 + name: report.status_code.2xx + name: status_code + categories: + - 2000-01-23T04:56:07.000+00:00 + - 2000-01-23T04:56:07.000+00:00 + properties: + name: + enum: + - status_code + type: string + categories: + items: + format: date-time + type: string + type: array + series: + items: + $ref: '#/components/schemas/StatusCodeReport_charts_status_code_series_inner' + type: array + type: object + StatusCodeReport_charts: + example: + status_code: + series: + - data: + - 5.637376656633329 + - 5.637376656633329 + name: report.status_code.2xx + - data: + - 5.637376656633329 + - 5.637376656633329 + name: report.status_code.2xx + name: status_code + categories: + - 2000-01-23T04:56:07.000+00:00 + - 2000-01-23T04:56:07.000+00:00 + properties: + status_code: + $ref: '#/components/schemas/StatusCodeReport_charts_status_code' + type: object + StatusCodeSummary_charts_status_code_inner: + example: + name: name + "y": 0 + properties: + name: + type: string + "y": + type: integer + type: object + StatusCodeSummary_charts: + example: + status_code: + - name: name + "y": 0 + - name: name + "y": 0 + properties: + status_code: + items: + $ref: '#/components/schemas/StatusCodeSummary_charts_status_code_inner' + type: array + type: object + ErrorLog_upstreams_inner: + example: + address: address + count: 6 + properties: + address: + description: The upstream's address + type: string + count: + description: Error count per upstream + type: integer + type: object + ErrorLogChart_statistics: + example: + status_codes: + key: "" + properties: + status_codes: + additionalProperties: true + description: " where key is error and value is its count" + type: object + type: object + ErrorLogChart_charts_status_code_series_inner: + example: + data: + - 0 + - 0 + name: name + properties: + name: + description: The error message + type: string + data: + items: + type: integer + type: array + type: object + ErrorLogChart_charts_status_code: + example: + series: + - data: + - 0 + - 0 + name: name + - data: + - 0 + - 0 + name: name + categories: + - 2000-01-23T04:56:07.000+00:00 + - 2000-01-23T04:56:07.000+00:00 + title: reports.status_code + properties: + title: + enum: + - reports.status_code + type: string + categories: + items: + format: date-time + type: string + type: array + series: + items: + $ref: '#/components/schemas/ErrorLogChart_charts_status_code_series_inner' + type: array + type: object + ErrorLogChart_charts: + example: + status_code: + series: + - data: + - 0 + - 0 + name: name + - data: + - 0 + - 0 + name: name + categories: + - 2000-01-23T04:56:07.000+00:00 + - 2000-01-23T04:56:07.000+00:00 + title: reports.status_code + properties: + status_code: + $ref: '#/components/schemas/ErrorLogChart_charts_status_code' + type: object + DnsRequestReport_statistics: + example: + total: 0 + top: 2000-01-23T04:56:07.000+00:00 + properties: + total: + type: integer + top: + format: date-time + type: string + type: object + DnsRequestReport_charts_requests_series_inner: + example: + data: + - 6 + - 6 + name: reports.requests.request + properties: + name: + enum: + - reports.requests.request + type: string + data: + items: + type: integer + type: array + type: object + DnsRequestReport_charts_requests: + example: + series: + - data: + - 6 + - 6 + name: reports.requests.request + - data: + - 6 + - 6 + name: reports.requests.request + categories: + - 2000-01-23T04:56:07.000+00:00 + - 2000-01-23T04:56:07.000+00:00 + title: reports.requests + properties: + title: + enum: + - reports.requests + type: string + categories: + items: + format: date-time + type: string + type: array + series: + items: + $ref: '#/components/schemas/DnsRequestReport_charts_requests_series_inner' + type: array + type: object + DnsRequestReport_charts: + example: + requests: + series: + - data: + - 6 + - 6 + name: reports.requests.request + - data: + - 6 + - 6 + name: reports.requests.request + categories: + - 2000-01-23T04:56:07.000+00:00 + - 2000-01-23T04:56:07.000+00:00 + title: reports.requests + properties: + requests: + $ref: '#/components/schemas/DnsRequestReport_charts_requests' + type: object + DnsGeoReport_charts_requests_value: + properties: + fillKey: + type: integer + name: + type: string + value: + type: integer + type: object + DnsGeoReport_charts: + example: + requests: + IRN: + fillKey: 4 + name: Iran (Islamic Republic of) + value: 12456789 + properties: + requests: + additionalProperties: + $ref: '#/components/schemas/DnsGeoReport_charts_requests_value' + description: A dictionay which maps country codes to fill and value + example: + IRN: + fillKey: 4 + name: Iran (Islamic Republic of) + value: 12456789 + type: object + type: object + DnsGeoReport_lists_inner: + example: + country: country + code: code + name: name + requests: 0 + properties: + country: + type: string + name: + type: string + code: + type: string + requests: + type: integer + type: object + AttackReport_statistics: + example: + attacks: + total: 0 + top: 2000-01-23T04:56:07.000+00:00 + properties: + attacks: + $ref: '#/components/schemas/DnsRequestReport_statistics' + type: object + AttackReport_charts_attacks_series_inner: + example: + data: + - 0 + - 0 + name: reports.attack.attacks + properties: + name: + enum: + - reports.attack.attacks + type: string + data: + items: + type: integer + type: array + type: object + AttackReport_charts_attacks: + example: + series: + - data: + - 0 + - 0 + name: reports.attack.attacks + - data: + - 0 + - 0 + name: reports.attack.attacks + categories: + - 2000-01-23T04:56:07.000+00:00 + - 2000-01-23T04:56:07.000+00:00 + title: reports.attack + properties: + title: + enum: + - reports.attack + type: string + categories: + items: + format: date-time + type: string + type: array + series: + items: + $ref: '#/components/schemas/AttackReport_charts_attacks_series_inner' + type: array + type: object + AttackReport_charts: + example: + attacks: + series: + - data: + - 0 + - 0 + name: reports.attack.attacks + - data: + - 0 + - 0 + name: reports.attack.attacks + categories: + - 2000-01-23T04:56:07.000+00:00 + - 2000-01-23T04:56:07.000+00:00 + title: reports.attack + properties: + attacks: + $ref: '#/components/schemas/AttackReport_charts_attacks' + type: object + AttackReportMap_statistics_inner: + example: + country: country + code: code + attack: 0 + name: name + properties: + country: + description: The 2-letter country code + type: string + name: + description: The name of the country + type: string + code: + description: The 3-letter country code + type: string + attack: + description: The number of attacks + type: integer + type: object + AttackReportMap_charts_attacks_value: + example: + fillKey: 6 + name: name + value: 1 + properties: + fillKey: + description: A numerical key used for coloring the map + type: integer + name: + description: The name of the country + type: string + value: + description: The number of attacks + type: integer + type: object + AttackReportMap_charts: + example: + attacks: + key: + fillKey: 6 + name: name + value: 1 + properties: + attacks: + additionalProperties: + $ref: '#/components/schemas/AttackReportMap_charts_attacks_value' + type: object + type: object + BulkTrafficReport_data_egress_bytes: + example: + iran: 1 + europe_americas: 5 + others: 5 + properties: + iran: + type: integer + europe_americas: + type: integer + others: + type: integer + type: object + BulkTrafficReport_data: + example: + ingress_bytes: 6 + requests: 0 + egress_bytes: + iran: 1 + europe_americas: 5 + others: 5 + properties: + requests: + type: integer + ingress_bytes: + type: integer + egress_bytes: + $ref: '#/components/schemas/BulkTrafficReport_data_egress_bytes' + type: object + BulkVisitorReport_data: + example: + visitors: 0 + properties: + visitors: + type: integer + type: object + EmailForwardingRecipientsList_inner: + example: + id: id + is_default: true + is_verified: true + email: email + properties: + id: + type: string + email: + format: email + type: string + is_verified: + type: boolean + is_default: + type: boolean + type: object + EmailForwardingAliasesList_inner: + example: + is_active: true + local_part: local_part + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + email: email + properties: + id: + format: uuid + type: string + local_part: + type: string + email: + format: email + type: string + is_active: + type: boolean + type: object + PageRuleDiff_req_custom_headers_inner: + example: + name: name + is_var: true + value: value + properties: + name: + type: string + value: + type: string + is_var: + type: boolean + type: object + PageRuleDiff_redirect: + example: + status_code: 0 + enable: true + url: http://example.com/aeiou + properties: + enable: + type: boolean + status_code: + enum: + - 301 + - 302 + - 307 + type: integer + url: + format: url + nullable: true + type: string + type: object + Troubleshoot_details_inner: + example: + details: details + id: root_dns_record + status: safe + properties: + id: + enum: + - root_dns_record + - www_dns_record + - mx_dns_record + - https_redirection + - domain_active_status + - active_certificate + - cloud_icon + - domain_expiration_days + - origin_ssl_port + type: string + status: + enum: + - safe + - troubled + type: string + details: + type: string + type: object + WafPreset_packages_inner_provider: + example: + name: name + logo: http://example.com/aeiou + properties: + name: + type: string + logo: + format: url + type: string + type: object + WafPreset_packages_inner: + example: + provider: + name: name + logo: http://example.com/aeiou + name: name + properties: + name: + type: string + provider: + $ref: '#/components/schemas/WafPreset_packages_inner_provider' + type: object + WafPackage_provider: + example: + name: name + logo: http://example.com/aeiou + properties: + name: + type: string + logo: + format: url + type: string + readOnly: true + type: object + WafRuleset_rules_inner: + properties: + id: + type: string + name: + type: string + params: + example: + score: 8 + severity: 7 + type: object + type: object + TransportLayerProxy_servers_inner: + example: + address: address + fall: 1 + port: 6 + inter: 5 + weight: 15 + check: enabled + rise: 1 + properties: + address: + format: hostname + type: string + port: + type: integer + weight: + maximum: 100 + minimum: 1 + type: integer + check: + enum: + - enabled + - disabled + type: string + fall: + minimum: 1 + type: integer + inter: + minimum: 5 + type: integer + rise: + minimum: 1 + type: integer + type: object + TransportLayerProxy_firewalls_inner: + example: + access: allow + name: name + match: null + description: description + active: true + type: geo + properties: + access: + enum: + - allow + - deny + type: string + name: + maxLength: 100 + minLength: 3 + type: string + description: + maxLength: 500 + minLength: 3 + type: string + type: + enum: + - geo + - ip_range + type: string + match: + $ref: '#/components/schemas/TransportLayerProxyMatch' + active: + type: boolean + type: object + FeaturePlanDefinition_meta_labels_inner: + anyOf: + - type: string + - type: boolean + FeaturePlanDefinition_meta: + example: + tip: tip + labels: + - null + - null + properties: + labels: + items: + $ref: '#/components/schemas/FeaturePlanDefinition_meta_labels_inner' + type: array + tip: + type: string + type: object + FeatureDefinition_plans: + example: + "0": + usage_limit: + min: 5 + max: 5 + meta: + tip: tip + labels: + - null + - null + pricing: + per_unit: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + flat: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + free_tier: 2 + "1": + usage_limit: + min: 5 + max: 5 + meta: + tip: tip + labels: + - null + - null + pricing: + per_unit: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + flat: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + free_tier: 2 + "2": + usage_limit: + min: 5 + max: 5 + meta: + tip: tip + labels: + - null + - null + pricing: + per_unit: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + flat: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + free_tier: 2 + "3": + usage_limit: + min: 5 + max: 5 + meta: + tip: tip + labels: + - null + - null + pricing: + per_unit: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + flat: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + free_tier: 2 + "4": + usage_limit: + min: 5 + max: 5 + meta: + tip: tip + labels: + - null + - null + pricing: + per_unit: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + flat: + metric_key: metric_key + currency: currency + value: 7.061401241503109 + free_tier: 2 + properties: + "0": + $ref: '#/components/schemas/FeaturePlanDefinition' + "1": + $ref: '#/components/schemas/FeaturePlanDefinition' + "2": + $ref: '#/components/schemas/FeaturePlanDefinition' + "3": + $ref: '#/components/schemas/FeaturePlanDefinition' + "4": + $ref: '#/components/schemas/FeaturePlanDefinition' + type: object + FeatureDefinition_meta: + example: + description: description + label: label + properties: + label: + type: string + description: + type: string + type: object + Violations_violations: + example: + enterprise: + - enterprise + - enterprise + paygo: + - paygo + - paygo + growth: + - growth + - growth + basic: + - basic + - basic + professional: + - professional + - professional + properties: + paygo: + items: + type: string + type: array + basic: + items: + type: string + type: array + growth: + items: + type: string + type: array + professional: + items: + type: string + type: array + enterprise: + items: + type: string + type: array + type: object + ApplicationCategory_name_translation_en: + example: + name: name + properties: + name: + type: string + type: object + ApplicationCategory_name_translation: + example: + en: + name: name + fa: + name: name + nullable: true + properties: + en: + $ref: '#/components/schemas/ApplicationCategory_name_translation_en' + fa: + $ref: '#/components/schemas/ApplicationCategory_name_translation_en' + type: object + ApplicationCategory_applications_inner: + example: + name: name + description: description + logo: logo + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + slug: slug + properties: + id: + format: uuid + readOnly: true + type: string + slug: + type: string + name: + type: string + description: + type: string + logo: + type: string + type: object + securitySchemes: + UserToken: + bearerFormat: JWT + scheme: bearer + type: http + ApiKey: + in: header + name: Authorization + type: apiKey diff --git a/api_acceleration.go b/api_acceleration.go new file mode 100644 index 0000000..8fe3615 --- /dev/null +++ b/api_acceleration.go @@ -0,0 +1,606 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + + +// AccelerationApiService AccelerationApi service +type AccelerationApiService service + +type ApiAccelerationIndexRequest struct { + ctx context.Context + ApiService *AccelerationApiService + domain string +} + +func (r ApiAccelerationIndexRequest) Execute() (*AccelerationResponse, *http.Response, error) { + return r.ApiService.AccelerationIndexExecute(r) +} + +/* +AccelerationIndex Get the content of acceleration settings + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiAccelerationIndexRequest +*/ +func (a *AccelerationApiService) AccelerationIndex(ctx context.Context, domain string) ApiAccelerationIndexRequest { + return ApiAccelerationIndexRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return AccelerationResponse +func (a *AccelerationApiService) AccelerationIndexExecute(r ApiAccelerationIndexRequest) (*AccelerationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AccelerationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AccelerationApiService.AccelerationIndex") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/acceleration" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -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 + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 ApiAccelerationUpdateRequest struct { + ctx context.Context + ApiService *AccelerationApiService + domain string + accelerationUpdate *AccelerationUpdate +} + +func (r ApiAccelerationUpdateRequest) AccelerationUpdate(accelerationUpdate AccelerationUpdate) ApiAccelerationUpdateRequest { + r.accelerationUpdate = &accelerationUpdate + return r +} + +func (r ApiAccelerationUpdateRequest) Execute() (*AccelerationResponse, *http.Response, error) { + return r.ApiService.AccelerationUpdateExecute(r) +} + +/* +AccelerationUpdate Update the content of acceleration settings + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiAccelerationUpdateRequest +*/ +func (a *AccelerationApiService) AccelerationUpdate(ctx context.Context, domain string) ApiAccelerationUpdateRequest { + return ApiAccelerationUpdateRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return AccelerationResponse +func (a *AccelerationApiService) AccelerationUpdateExecute(r ApiAccelerationUpdateRequest) (*AccelerationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AccelerationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AccelerationApiService.AccelerationUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/acceleration" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -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.accelerationUpdate + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 + } + if localVarHTTPResponse.StatusCode == 422 { + var v DomainsStore422Response + 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 ApiImageResizeGetRequest struct { + ctx context.Context + ApiService *AccelerationApiService + domain string +} + +func (r ApiImageResizeGetRequest) Execute() (*ImageResizeResponse, *http.Response, error) { + return r.ApiService.ImageResizeGetExecute(r) +} + +/* +ImageResizeGet Get the content of image resize settings + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiImageResizeGetRequest +*/ +func (a *AccelerationApiService) ImageResizeGet(ctx context.Context, domain string) ApiImageResizeGetRequest { + return ApiImageResizeGetRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return ImageResizeResponse +func (a *AccelerationApiService) ImageResizeGetExecute(r ApiImageResizeGetRequest) (*ImageResizeResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ImageResizeResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AccelerationApiService.ImageResizeGet") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/image-resize" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -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 + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 ApiImageResizeUpdateRequest struct { + ctx context.Context + ApiService *AccelerationApiService + domain string + imageResize *ImageResize +} + +func (r ApiImageResizeUpdateRequest) ImageResize(imageResize ImageResize) ApiImageResizeUpdateRequest { + r.imageResize = &imageResize + return r +} + +func (r ApiImageResizeUpdateRequest) Execute() (*ImageResizeResponse, *http.Response, error) { + return r.ApiService.ImageResizeUpdateExecute(r) +} + +/* +ImageResizeUpdate Update the content of image resize settings + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiImageResizeUpdateRequest +*/ +func (a *AccelerationApiService) ImageResizeUpdate(ctx context.Context, domain string) ApiImageResizeUpdateRequest { + return ApiImageResizeUpdateRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return ImageResizeResponse +func (a *AccelerationApiService) ImageResizeUpdateExecute(r ApiImageResizeUpdateRequest) (*ImageResizeResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ImageResizeResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AccelerationApiService.ImageResizeUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/image-resize" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -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.imageResize + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 + } + if localVarHTTPResponse.StatusCode == 422 { + var v DomainsStore422Response + 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_active_health_check.go b/api_active_health_check.go new file mode 100644 index 0000000..70ffa66 --- /dev/null +++ b/api_active_health_check.go @@ -0,0 +1,1256 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "time" +) + + +// ActiveHealthCheckApiService ActiveHealthCheckApi service +type ActiveHealthCheckApiService service + +type ApiActiveHealthCheckDestroyRequest struct { + ctx context.Context + ApiService *ActiveHealthCheckApiService + domain string + healthcheck string +} + +func (r ApiActiveHealthCheckDestroyRequest) Execute() (*MessageResponse, *http.Response, error) { + return r.ApiService.ActiveHealthCheckDestroyExecute(r) +} + +/* +ActiveHealthCheckDestroy Delete healthcheck + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @param healthcheck + @return ApiActiveHealthCheckDestroyRequest +*/ +func (a *ActiveHealthCheckApiService) ActiveHealthCheckDestroy(ctx context.Context, domain string, healthcheck string) ApiActiveHealthCheckDestroyRequest { + return ApiActiveHealthCheckDestroyRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + healthcheck: healthcheck, + } +} + +// Execute executes the request +// @return MessageResponse +func (a *ActiveHealthCheckApiService) ActiveHealthCheckDestroyExecute(r ApiActiveHealthCheckDestroyRequest) (*MessageResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MessageResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ActiveHealthCheckApiService.ActiveHealthCheckDestroy") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/health-checks/{healthcheck}" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"healthcheck"+"}", url.PathEscape(parameterValueToString(r.healthcheck, "healthcheck")), -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 + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 ApiActiveHealthCheckIndexRequest struct { + ctx context.Context + ApiService *ActiveHealthCheckApiService + domain string +} + +func (r ApiActiveHealthCheckIndexRequest) Execute() (*ActiveHealthCheckIndex200Response, *http.Response, error) { + return r.ApiService.ActiveHealthCheckIndexExecute(r) +} + +/* +ActiveHealthCheckIndex Get Defined HealthCheck + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiActiveHealthCheckIndexRequest +*/ +func (a *ActiveHealthCheckApiService) ActiveHealthCheckIndex(ctx context.Context, domain string) ApiActiveHealthCheckIndexRequest { + return ApiActiveHealthCheckIndexRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return ActiveHealthCheckIndex200Response +func (a *ActiveHealthCheckApiService) ActiveHealthCheckIndexExecute(r ApiActiveHealthCheckIndexRequest) (*ActiveHealthCheckIndex200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ActiveHealthCheckIndex200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ActiveHealthCheckApiService.ActiveHealthCheckIndex") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/health-checks" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -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 + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 ApiActiveHealthCheckReportsDetailsRequest struct { + ctx context.Context + ApiService *ActiveHealthCheckApiService + domain string + name *string + upstream *string + type_ *string + period *string + since *time.Time + until *time.Time + direction *string + perPage *int32 + page *int32 +} + +// Name of the health-check +func (r ApiActiveHealthCheckReportsDetailsRequest) Name(name string) ApiActiveHealthCheckReportsDetailsRequest { + r.name = &name + return r +} + +// Upstream of the health-check monitoring +func (r ApiActiveHealthCheckReportsDetailsRequest) Upstream(upstream string) ApiActiveHealthCheckReportsDetailsRequest { + r.upstream = &upstream + return r +} + +// Type of reports for the health check +func (r ApiActiveHealthCheckReportsDetailsRequest) Type_(type_ string) ApiActiveHealthCheckReportsDetailsRequest { + r.type_ = &type_ + return r +} + +// Select period -ending now- for report +func (r ApiActiveHealthCheckReportsDetailsRequest) Period(period string) ApiActiveHealthCheckReportsDetailsRequest { + r.period = &period + return r +} + +func (r ApiActiveHealthCheckReportsDetailsRequest) Since(since time.Time) ApiActiveHealthCheckReportsDetailsRequest { + r.since = &since + return r +} + +func (r ApiActiveHealthCheckReportsDetailsRequest) Until(until time.Time) ApiActiveHealthCheckReportsDetailsRequest { + r.until = &until + return r +} + +// Set the direction of sorting +func (r ApiActiveHealthCheckReportsDetailsRequest) Direction(direction string) ApiActiveHealthCheckReportsDetailsRequest { + r.direction = &direction + return r +} + +// Set how many items returned per page +func (r ApiActiveHealthCheckReportsDetailsRequest) PerPage(perPage int32) ApiActiveHealthCheckReportsDetailsRequest { + r.perPage = &perPage + return r +} + +// Set the desired page number +func (r ApiActiveHealthCheckReportsDetailsRequest) Page(page int32) ApiActiveHealthCheckReportsDetailsRequest { + r.page = &page + return r +} + +func (r ApiActiveHealthCheckReportsDetailsRequest) Execute() (*ActiveHealthCheckReportsDetails200Response, *http.Response, error) { + return r.ApiService.ActiveHealthCheckReportsDetailsExecute(r) +} + +/* +ActiveHealthCheckReportsDetails Get reports of a single healthcheck monitoring + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiActiveHealthCheckReportsDetailsRequest +*/ +func (a *ActiveHealthCheckApiService) ActiveHealthCheckReportsDetails(ctx context.Context, domain string) ApiActiveHealthCheckReportsDetailsRequest { + return ApiActiveHealthCheckReportsDetailsRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return ActiveHealthCheckReportsDetails200Response +func (a *ActiveHealthCheckApiService) ActiveHealthCheckReportsDetailsExecute(r ApiActiveHealthCheckReportsDetailsRequest) (*ActiveHealthCheckReportsDetails200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ActiveHealthCheckReportsDetails200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ActiveHealthCheckApiService.ActiveHealthCheckReportsDetails") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/health-checks/reports/details" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.name == nil { + return localVarReturnValue, nil, reportError("name is required and must be specified") + } + if r.upstream == nil { + return localVarReturnValue, nil, reportError("upstream is required and must be specified") + } + + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "upstream", r.upstream, "") + if r.type_ != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "type", r.type_, "") + } + if r.period != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "period", r.period, "") + } + if r.since != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "since", r.since, "") + } + if r.until != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "until", r.until, "") + } + if r.direction != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "direction", r.direction, "") + } + if r.perPage != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "per_page", r.perPage, "") + } + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") + } + // 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["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 ApiActiveHealthCheckReportsSummaryRequest struct { + ctx context.Context + ApiService *ActiveHealthCheckApiService + domain string + name *string + upstream *string + period *string + since *time.Time + until *time.Time + direction *string +} + +// Name of the health-check +func (r ApiActiveHealthCheckReportsSummaryRequest) Name(name string) ApiActiveHealthCheckReportsSummaryRequest { + r.name = &name + return r +} + +// Upstream of the health-check monitoring +func (r ApiActiveHealthCheckReportsSummaryRequest) Upstream(upstream string) ApiActiveHealthCheckReportsSummaryRequest { + r.upstream = &upstream + return r +} + +// Select period -ending now- for report +func (r ApiActiveHealthCheckReportsSummaryRequest) Period(period string) ApiActiveHealthCheckReportsSummaryRequest { + r.period = &period + return r +} + +func (r ApiActiveHealthCheckReportsSummaryRequest) Since(since time.Time) ApiActiveHealthCheckReportsSummaryRequest { + r.since = &since + return r +} + +func (r ApiActiveHealthCheckReportsSummaryRequest) Until(until time.Time) ApiActiveHealthCheckReportsSummaryRequest { + r.until = &until + return r +} + +// Set the direction of sorting +func (r ApiActiveHealthCheckReportsSummaryRequest) Direction(direction string) ApiActiveHealthCheckReportsSummaryRequest { + r.direction = &direction + return r +} + +func (r ApiActiveHealthCheckReportsSummaryRequest) Execute() (*ActiveHealthCheckReportsSummary200Response, *http.Response, error) { + return r.ApiService.ActiveHealthCheckReportsSummaryExecute(r) +} + +/* +ActiveHealthCheckReportsSummary Get summary reports of a single healthcheck monitoring + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiActiveHealthCheckReportsSummaryRequest +*/ +func (a *ActiveHealthCheckApiService) ActiveHealthCheckReportsSummary(ctx context.Context, domain string) ApiActiveHealthCheckReportsSummaryRequest { + return ApiActiveHealthCheckReportsSummaryRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return ActiveHealthCheckReportsSummary200Response +func (a *ActiveHealthCheckApiService) ActiveHealthCheckReportsSummaryExecute(r ApiActiveHealthCheckReportsSummaryRequest) (*ActiveHealthCheckReportsSummary200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ActiveHealthCheckReportsSummary200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ActiveHealthCheckApiService.ActiveHealthCheckReportsSummary") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/health-checks/reports/summary" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.name == nil { + return localVarReturnValue, nil, reportError("name is required and must be specified") + } + if r.upstream == nil { + return localVarReturnValue, nil, reportError("upstream is required and must be specified") + } + + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") + parameterAddToHeaderOrQuery(localVarQueryParams, "upstream", r.upstream, "") + if r.period != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "period", r.period, "") + } + if r.since != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "since", r.since, "") + } + if r.until != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "until", r.until, "") + } + if r.direction != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "direction", r.direction, "") + } + // 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["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 ApiActiveHealthCheckShowRequest struct { + ctx context.Context + ApiService *ActiveHealthCheckApiService + domain string + healthcheck string +} + +func (r ApiActiveHealthCheckShowRequest) Execute() (*HealthCheckResponse, *http.Response, error) { + return r.ApiService.ActiveHealthCheckShowExecute(r) +} + +/* +ActiveHealthCheckShow Get a single healthcheck + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @param healthcheck + @return ApiActiveHealthCheckShowRequest +*/ +func (a *ActiveHealthCheckApiService) ActiveHealthCheckShow(ctx context.Context, domain string, healthcheck string) ApiActiveHealthCheckShowRequest { + return ApiActiveHealthCheckShowRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + healthcheck: healthcheck, + } +} + +// Execute executes the request +// @return HealthCheckResponse +func (a *ActiveHealthCheckApiService) ActiveHealthCheckShowExecute(r ApiActiveHealthCheckShowRequest) (*HealthCheckResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *HealthCheckResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ActiveHealthCheckApiService.ActiveHealthCheckShow") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/health-checks/{healthcheck}" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"healthcheck"+"}", url.PathEscape(parameterValueToString(r.healthcheck, "healthcheck")), -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 + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 ApiActiveHealthCheckStoreRequest struct { + ctx context.Context + ApiService *ActiveHealthCheckApiService + domain string + healthCheck *HealthCheck +} + +func (r ApiActiveHealthCheckStoreRequest) HealthCheck(healthCheck HealthCheck) ApiActiveHealthCheckStoreRequest { + r.healthCheck = &healthCheck + return r +} + +func (r ApiActiveHealthCheckStoreRequest) Execute() (*HealthCheckResponse, *http.Response, error) { + return r.ApiService.ActiveHealthCheckStoreExecute(r) +} + +/* +ActiveHealthCheckStore Store a new HealthCheck + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiActiveHealthCheckStoreRequest +*/ +func (a *ActiveHealthCheckApiService) ActiveHealthCheckStore(ctx context.Context, domain string) ApiActiveHealthCheckStoreRequest { + return ApiActiveHealthCheckStoreRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return HealthCheckResponse +func (a *ActiveHealthCheckApiService) ActiveHealthCheckStoreExecute(r ApiActiveHealthCheckStoreRequest) (*HealthCheckResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *HealthCheckResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ActiveHealthCheckApiService.ActiveHealthCheckStore") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/health-checks" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -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.healthCheck + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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 ApiActiveHealthCheckUpdateRequest struct { + ctx context.Context + ApiService *ActiveHealthCheckApiService + domain string + healthcheck string + healthCheck *HealthCheck +} + +func (r ApiActiveHealthCheckUpdateRequest) HealthCheck(healthCheck HealthCheck) ApiActiveHealthCheckUpdateRequest { + r.healthCheck = &healthCheck + return r +} + +func (r ApiActiveHealthCheckUpdateRequest) Execute() (*HealthCheckResponse, *http.Response, error) { + return r.ApiService.ActiveHealthCheckUpdateExecute(r) +} + +/* +ActiveHealthCheckUpdate Update Health check + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @param healthcheck + @return ApiActiveHealthCheckUpdateRequest +*/ +func (a *ActiveHealthCheckApiService) ActiveHealthCheckUpdate(ctx context.Context, domain string, healthcheck string) ApiActiveHealthCheckUpdateRequest { + return ApiActiveHealthCheckUpdateRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + healthcheck: healthcheck, + } +} + +// Execute executes the request +// @return HealthCheckResponse +func (a *ActiveHealthCheckApiService) ActiveHealthCheckUpdateExecute(r ApiActiveHealthCheckUpdateRequest) (*HealthCheckResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *HealthCheckResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ActiveHealthCheckApiService.ActiveHealthCheckUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/health-checks/{healthcheck}" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"healthcheck"+"}", url.PathEscape(parameterValueToString(r.healthcheck, "healthcheck")), -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.healthCheck + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 + } + if localVarHTTPResponse.StatusCode == 422 { + var v DomainsStore422Response + 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 ApiHealthChecksZonesIndexRequest struct { + ctx context.Context + ApiService *ActiveHealthCheckApiService +} + +func (r ApiHealthChecksZonesIndexRequest) Execute() (*HealthChecksZonesIndex200Response, *http.Response, error) { + return r.ApiService.HealthChecksZonesIndexExecute(r) +} + +/* +HealthChecksZonesIndex Get list of all health-check zones + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiHealthChecksZonesIndexRequest +*/ +func (a *ActiveHealthCheckApiService) HealthChecksZonesIndex(ctx context.Context) ApiHealthChecksZonesIndexRequest { + return ApiHealthChecksZonesIndexRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return HealthChecksZonesIndex200Response +func (a *ActiveHealthCheckApiService) HealthChecksZonesIndexExecute(r ApiHealthChecksZonesIndexRequest) (*HealthChecksZonesIndex200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *HealthChecksZonesIndex200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ActiveHealthCheckApiService.HealthChecksZonesIndex") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/health-checks/zones" + + 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["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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 +} diff --git a/api_caching.go b/api_caching.go new file mode 100644 index 0000000..1af0ddc --- /dev/null +++ b/api_caching.go @@ -0,0 +1,966 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// CachingApiService CachingApi service +type CachingApiService service + +type ApiCachingDeprecatedPurgeRequest struct { + ctx context.Context + ApiService *CachingApiService + domain string + purge *string + purgeUrls *[]string + purgeTags *[]string +} + +func (r ApiCachingDeprecatedPurgeRequest) Purge(purge string) ApiCachingDeprecatedPurgeRequest { + r.purge = &purge + return r +} + +// URLs to be purged from cache. Required if purge value is set to individual. +func (r ApiCachingDeprecatedPurgeRequest) PurgeUrls(purgeUrls []string) ApiCachingDeprecatedPurgeRequest { + r.purgeUrls = &purgeUrls + return r +} + +// Tags to be purged from cache. Required if purge value is set to tags. Each tag must be 32 characters or less. Only ASCII characters are acceptable. +// Deprecated +func (r ApiCachingDeprecatedPurgeRequest) PurgeTags(purgeTags []string) ApiCachingDeprecatedPurgeRequest { + r.purgeTags = &purgeTags + return r +} + +func (r ApiCachingDeprecatedPurgeRequest) Execute() (*MessageResponse, *http.Response, error) { + return r.ApiService.CachingDeprecatedPurgeExecute(r) +} + +/* +CachingDeprecatedPurge Purge CDN Cache + +Purge CDN cache, either by URLs, tags, or the whole site. +Purge by tag is only available for domains with Professional plan or higher. + + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiCachingDeprecatedPurgeRequest + +Deprecated +*/ +func (a *CachingApiService) CachingDeprecatedPurge(ctx context.Context, domain string) ApiCachingDeprecatedPurgeRequest { + return ApiCachingDeprecatedPurgeRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return MessageResponse +// Deprecated +func (a *CachingApiService) CachingDeprecatedPurgeExecute(r ApiCachingDeprecatedPurgeRequest) (*MessageResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MessageResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "CachingApiService.CachingDeprecatedPurge") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/caching" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.purge == nil { + return localVarReturnValue, nil, reportError("purge is required and must be specified") + } + + parameterAddToHeaderOrQuery(localVarQueryParams, "purge", r.purge, "") + if r.purgeUrls != nil { + t := *r.purgeUrls + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "purge_urls", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "purge_urls", t, "multi") + } + } + if r.purgeTags != nil { + t := *r.purgeTags + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "purge_tags", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "purge_tags", t, "multi") + } + } + // 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["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 + } + if localVarHTTPResponse.StatusCode == 422 { + var v DomainsStore422Response + 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 ApiCachingIndexRequest struct { + ctx context.Context + ApiService *CachingApiService + domain string +} + +func (r ApiCachingIndexRequest) Execute() (*CacheSettingsData, *http.Response, error) { + return r.ApiService.CachingIndexExecute(r) +} + +/* +CachingIndex Get caching settings + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiCachingIndexRequest +*/ +func (a *CachingApiService) CachingIndex(ctx context.Context, domain string) ApiCachingIndexRequest { + return ApiCachingIndexRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return CacheSettingsData +func (a *CachingApiService) CachingIndexExecute(r ApiCachingIndexRequest) (*CacheSettingsData, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CacheSettingsData + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "CachingApiService.CachingIndex") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/caching" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -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 + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 ApiCachingPurgeRequest struct { + ctx context.Context + ApiService *CachingApiService + domain string + cachingPurge *CachingPurge +} + +func (r ApiCachingPurgeRequest) CachingPurge(cachingPurge CachingPurge) ApiCachingPurgeRequest { + r.cachingPurge = &cachingPurge + return r +} + +func (r ApiCachingPurgeRequest) Execute() (*MessageResponse, *http.Response, error) { + return r.ApiService.CachingPurgeExecute(r) +} + +/* +CachingPurge Purge CDN Cache + +Purge CDN cache, either by URLs, tags, or the whole site. +Purge by tag is only available for domains with Professional plan or higher. + + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiCachingPurgeRequest +*/ +func (a *CachingApiService) CachingPurge(ctx context.Context, domain string) ApiCachingPurgeRequest { + return ApiCachingPurgeRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return MessageResponse +func (a *CachingApiService) CachingPurgeExecute(r ApiCachingPurgeRequest) (*MessageResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MessageResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "CachingApiService.CachingPurge") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/caching/purge" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -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.cachingPurge + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 + } + if localVarHTTPResponse.StatusCode == 422 { + var v DomainsStore422Response + 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 ApiCachingUpdateRequest struct { + ctx context.Context + ApiService *CachingApiService + domain string + cacheSettings *CacheSettings +} + +func (r ApiCachingUpdateRequest) CacheSettings(cacheSettings CacheSettings) ApiCachingUpdateRequest { + r.cacheSettings = &cacheSettings + return r +} + +func (r ApiCachingUpdateRequest) Execute() (*MessageResponse, *http.Response, error) { + return r.ApiService.CachingUpdateExecute(r) +} + +/* +CachingUpdate Update caching settings + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiCachingUpdateRequest +*/ +func (a *CachingApiService) CachingUpdate(ctx context.Context, domain string) ApiCachingUpdateRequest { + return ApiCachingUpdateRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return MessageResponse +func (a *CachingApiService) CachingUpdateExecute(r ApiCachingUpdateRequest) (*MessageResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MessageResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "CachingApiService.CachingUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/caching" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -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.cacheSettings + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 + } + if localVarHTTPResponse.StatusCode == 422 { + var v DomainsStore422Response + 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 ApiPurgeTagsDestroyRequest struct { + ctx context.Context + ApiService *CachingApiService + domain string + tag *string +} + +func (r ApiPurgeTagsDestroyRequest) Tag(tag string) ApiPurgeTagsDestroyRequest { + r.tag = &tag + return r +} + +func (r ApiPurgeTagsDestroyRequest) Execute() (*MessageResponse, *http.Response, error) { + return r.ApiService.PurgeTagsDestroyExecute(r) +} + +/* +PurgeTagsDestroy Delete a Domain's Purge tag + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiPurgeTagsDestroyRequest + +Deprecated +*/ +func (a *CachingApiService) PurgeTagsDestroy(ctx context.Context, domain string) ApiPurgeTagsDestroyRequest { + return ApiPurgeTagsDestroyRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return MessageResponse +// Deprecated +func (a *CachingApiService) PurgeTagsDestroyExecute(r ApiPurgeTagsDestroyRequest) (*MessageResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MessageResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "CachingApiService.PurgeTagsDestroy") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/purge-tags" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.tag == nil { + return localVarReturnValue, nil, reportError("tag is required and must be specified") + } + + parameterAddToHeaderOrQuery(localVarQueryParams, "tag", r.tag, "") + // 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["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 ApiPurgeTagsIndexRequest struct { + ctx context.Context + ApiService *CachingApiService + domain string +} + +func (r ApiPurgeTagsIndexRequest) Execute() (*PurgeTagsIndex200Response, *http.Response, error) { + return r.ApiService.PurgeTagsIndexExecute(r) +} + +/* +PurgeTagsIndex Get domain's Purge tags + +Returns last 100 purged tags sorted by recency. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiPurgeTagsIndexRequest + +Deprecated +*/ +func (a *CachingApiService) PurgeTagsIndex(ctx context.Context, domain string) ApiPurgeTagsIndexRequest { + return ApiPurgeTagsIndexRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return PurgeTagsIndex200Response +// Deprecated +func (a *CachingApiService) PurgeTagsIndexExecute(r ApiPurgeTagsIndexRequest) (*PurgeTagsIndex200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PurgeTagsIndex200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "CachingApiService.PurgeTagsIndex") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/purge-tags" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -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 + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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_cdn_apps.go b/api_cdn_apps.go new file mode 100644 index 0000000..891abfc --- /dev/null +++ b/api_cdn_apps.go @@ -0,0 +1,1473 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// CDNAppsApiService CDNAppsApi service +type CDNAppsApiService service + +type ApiAppsCategoryIndexRequest struct { + ctx context.Context + ApiService *CDNAppsApiService + categories *[]string +} + +func (r ApiAppsCategoryIndexRequest) Categories(categories []string) ApiAppsCategoryIndexRequest { + r.categories = &categories + return r +} + +func (r ApiAppsCategoryIndexRequest) Execute() (*AppsCategoryIndex200Response, *http.Response, error) { + return r.ApiService.AppsCategoryIndexExecute(r) +} + +/* +AppsCategoryIndex Get the list of application categories + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiAppsCategoryIndexRequest +*/ +func (a *CDNAppsApiService) AppsCategoryIndex(ctx context.Context) ApiAppsCategoryIndexRequest { + return ApiAppsCategoryIndexRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return AppsCategoryIndex200Response +func (a *CDNAppsApiService) AppsCategoryIndexExecute(r ApiAppsCategoryIndexRequest) (*AppsCategoryIndex200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AppsCategoryIndex200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "CDNAppsApiService.AppsCategoryIndex") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/apps/category" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.categories != nil { + t := *r.categories + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "categories", s.Index(i), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "categories", t, "multi") + } + } + // 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["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 ApiAppsCategoryShowRequest struct { + ctx context.Context + ApiService *CDNAppsApiService + applicationCategory string +} + +func (r ApiAppsCategoryShowRequest) Execute() (*AppsCategoryShow200Response, *http.Response, error) { + return r.ApiService.AppsCategoryShowExecute(r) +} + +/* +AppsCategoryShow Get an existing application category + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param applicationCategory The id of the category + @return ApiAppsCategoryShowRequest +*/ +func (a *CDNAppsApiService) AppsCategoryShow(ctx context.Context, applicationCategory string) ApiAppsCategoryShowRequest { + return ApiAppsCategoryShowRequest{ + ApiService: a, + ctx: ctx, + applicationCategory: applicationCategory, + } +} + +// Execute executes the request +// @return AppsCategoryShow200Response +func (a *CDNAppsApiService) AppsCategoryShowExecute(r ApiAppsCategoryShowRequest) (*AppsCategoryShow200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AppsCategoryShow200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "CDNAppsApiService.AppsCategoryShow") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/apps/category/{application-category}" + localVarPath = strings.Replace(localVarPath, "{"+"application-category"+"}", url.PathEscape(parameterValueToString(r.applicationCategory, "applicationCategory")), -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 + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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 ApiAppsIndexRequest struct { + ctx context.Context + ApiService *CDNAppsApiService + categoryId *string + search *string + perPage *int32 + page *int32 + sortBy *string + direction *string +} + +// Filter apps by category +func (r ApiAppsIndexRequest) CategoryId(categoryId string) ApiAppsIndexRequest { + r.categoryId = &categoryId + return r +} + +// Search term +func (r ApiAppsIndexRequest) Search(search string) ApiAppsIndexRequest { + r.search = &search + return r +} + +// Set how many items returned per page +func (r ApiAppsIndexRequest) PerPage(perPage int32) ApiAppsIndexRequest { + r.perPage = &perPage + return r +} + +// Set the desired page number +func (r ApiAppsIndexRequest) Page(page int32) ApiAppsIndexRequest { + r.page = &page + return r +} + +func (r ApiAppsIndexRequest) SortBy(sortBy string) ApiAppsIndexRequest { + r.sortBy = &sortBy + return r +} + +// Set the direction of sorting +func (r ApiAppsIndexRequest) Direction(direction string) ApiAppsIndexRequest { + r.direction = &direction + return r +} + +func (r ApiAppsIndexRequest) Execute() (*AppsIndex200Response, *http.Response, error) { + return r.ApiService.AppsIndexExecute(r) +} + +/* +AppsIndex Get list of all available cdn-apps + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiAppsIndexRequest +*/ +func (a *CDNAppsApiService) AppsIndex(ctx context.Context) ApiAppsIndexRequest { + return ApiAppsIndexRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return AppsIndex200Response +func (a *CDNAppsApiService) AppsIndexExecute(r ApiAppsIndexRequest) (*AppsIndex200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AppsIndex200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "CDNAppsApiService.AppsIndex") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/apps" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.categoryId != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "category_id", r.categoryId, "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") + } + if r.perPage != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "per_page", r.perPage, "") + } + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") + } + if r.sortBy != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "sort_by", r.sortBy, "") + } + if r.direction != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "direction", r.direction, "") + } + // 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["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 ApiAppsLikeRequest struct { + ctx context.Context + ApiService *CDNAppsApiService + id string + cdnAppLike *CdnAppLike +} + +func (r ApiAppsLikeRequest) CdnAppLike(cdnAppLike CdnAppLike) ApiAppsLikeRequest { + r.cdnAppLike = &cdnAppLike + return r +} + +func (r ApiAppsLikeRequest) Execute() (*CdnAppLikeStatsData, *http.Response, error) { + return r.ApiService.AppsLikeExecute(r) +} + +/* +AppsLike Expressing like and dislike about a single cdn-app + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id + @return ApiAppsLikeRequest +*/ +func (a *CDNAppsApiService) AppsLike(ctx context.Context, id string) ApiAppsLikeRequest { + return ApiAppsLikeRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// @return CdnAppLikeStatsData +func (a *CDNAppsApiService) AppsLikeExecute(r ApiAppsLikeRequest) (*CdnAppLikeStatsData, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CdnAppLikeStatsData + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "CDNAppsApiService.AppsLike") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/apps/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -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.cdnAppLike + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 ApiAppsShowRequest struct { + ctx context.Context + ApiService *CDNAppsApiService + id string +} + +func (r ApiAppsShowRequest) Execute() (*CdnAppData, *http.Response, error) { + return r.ApiService.AppsShowExecute(r) +} + +/* +AppsShow Get a single cdn-app + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id + @return ApiAppsShowRequest +*/ +func (a *CDNAppsApiService) AppsShow(ctx context.Context, id string) ApiAppsShowRequest { + return ApiAppsShowRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// @return CdnAppData +func (a *CDNAppsApiService) AppsShowExecute(r ApiAppsShowRequest) (*CdnAppData, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CdnAppData + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "CDNAppsApiService.AppsShow") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/apps/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -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 + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 ApiDomainsAppsDestroyRequest struct { + ctx context.Context + ApiService *CDNAppsApiService + domain string + id string +} + +func (r ApiDomainsAppsDestroyRequest) Execute() (*MessageResponse, *http.Response, error) { + return r.ApiService.DomainsAppsDestroyExecute(r) +} + +/* +DomainsAppsDestroy Uninstall the application from domain + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @param id + @return ApiDomainsAppsDestroyRequest +*/ +func (a *CDNAppsApiService) DomainsAppsDestroy(ctx context.Context, domain string, id string) ApiDomainsAppsDestroyRequest { + return ApiDomainsAppsDestroyRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + id: id, + } +} + +// Execute executes the request +// @return MessageResponse +func (a *CDNAppsApiService) DomainsAppsDestroyExecute(r ApiDomainsAppsDestroyRequest) (*MessageResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MessageResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "CDNAppsApiService.DomainsAppsDestroy") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/apps/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -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 + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 ApiDomainsAppsIndexRequest struct { + ctx context.Context + ApiService *CDNAppsApiService + domain string +} + +func (r ApiDomainsAppsIndexRequest) Execute() (*AppsIndex200Response, *http.Response, error) { + return r.ApiService.DomainsAppsIndexExecute(r) +} + +/* +DomainsAppsIndex Get list of all applications installed on a domain + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiDomainsAppsIndexRequest +*/ +func (a *CDNAppsApiService) DomainsAppsIndex(ctx context.Context, domain string) ApiDomainsAppsIndexRequest { + return ApiDomainsAppsIndexRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return AppsIndex200Response +func (a *CDNAppsApiService) DomainsAppsIndexExecute(r ApiDomainsAppsIndexRequest) (*AppsIndex200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AppsIndex200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "CDNAppsApiService.DomainsAppsIndex") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/apps" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -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 + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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 ApiDomainsAppsInstalledRequest struct { + ctx context.Context + ApiService *CDNAppsApiService + domain string + id string +} + +func (r ApiDomainsAppsInstalledRequest) Execute() (*CdnAppInstall, *http.Response, error) { + return r.ApiService.DomainsAppsInstalledExecute(r) +} + +/* +DomainsAppsInstalled Check the application is installed on the domain + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @param id + @return ApiDomainsAppsInstalledRequest +*/ +func (a *CDNAppsApiService) DomainsAppsInstalled(ctx context.Context, domain string, id string) ApiDomainsAppsInstalledRequest { + return ApiDomainsAppsInstalledRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + id: id, + } +} + +// Execute executes the request +// @return CdnAppInstall +func (a *CDNAppsApiService) DomainsAppsInstalledExecute(r ApiDomainsAppsInstalledRequest) (*CdnAppInstall, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CdnAppInstall + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "CDNAppsApiService.DomainsAppsInstalled") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/apps/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -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 + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 + } + if localVarHTTPResponse.StatusCode == 422 { + var v DomainsStore422Response + 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 ApiDomainsAppsStoreRequest struct { + ctx context.Context + ApiService *CDNAppsApiService + domain string + id string + body *map[string]interface{} +} + +func (r ApiDomainsAppsStoreRequest) Body(body map[string]interface{}) ApiDomainsAppsStoreRequest { + r.body = &body + return r +} + +func (r ApiDomainsAppsStoreRequest) Execute() (*DomainsAppsStore200Response, *http.Response, error) { + return r.ApiService.DomainsAppsStoreExecute(r) +} + +/* +DomainsAppsStore Install the application on the domain + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @param id + @return ApiDomainsAppsStoreRequest +*/ +func (a *CDNAppsApiService) DomainsAppsStore(ctx context.Context, domain string, id string) ApiDomainsAppsStoreRequest { + return ApiDomainsAppsStoreRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + id: id, + } +} + +// Execute executes the request +// @return DomainsAppsStore200Response +func (a *CDNAppsApiService) DomainsAppsStoreExecute(r ApiDomainsAppsStoreRequest) (*DomainsAppsStore200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DomainsAppsStore200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "CDNAppsApiService.DomainsAppsStore") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/apps/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -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.body + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 + } + if localVarHTTPResponse.StatusCode == 422 { + var v DomainsStore422Response + 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 ApiDomainsAppsTriggerWebhookRequest struct { + ctx context.Context + ApiService *CDNAppsApiService + domain string + id string + cdnAppTriggerWebhook *CdnAppTriggerWebhook +} + +func (r ApiDomainsAppsTriggerWebhookRequest) CdnAppTriggerWebhook(cdnAppTriggerWebhook CdnAppTriggerWebhook) ApiDomainsAppsTriggerWebhookRequest { + r.cdnAppTriggerWebhook = &cdnAppTriggerWebhook + return r +} + +func (r ApiDomainsAppsTriggerWebhookRequest) Execute() (*MessageResponse, *http.Response, error) { + return r.ApiService.DomainsAppsTriggerWebhookExecute(r) +} + +/* +DomainsAppsTriggerWebhook trigger webhook event + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @param id + @return ApiDomainsAppsTriggerWebhookRequest +*/ +func (a *CDNAppsApiService) DomainsAppsTriggerWebhook(ctx context.Context, domain string, id string) ApiDomainsAppsTriggerWebhookRequest { + return ApiDomainsAppsTriggerWebhookRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + id: id, + } +} + +// Execute executes the request +// @return MessageResponse +func (a *CDNAppsApiService) DomainsAppsTriggerWebhookExecute(r ApiDomainsAppsTriggerWebhookRequest) (*MessageResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MessageResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "CDNAppsApiService.DomainsAppsTriggerWebhook") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/apps/{id}/actions/trigger_webhook" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -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.cdnAppTriggerWebhook + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 + } + if localVarHTTPResponse.StatusCode == 422 { + var v DomainsStore422Response + 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_custom_pages.go b/api_custom_pages.go new file mode 100644 index 0000000..994bf71 --- /dev/null +++ b/api_custom_pages.go @@ -0,0 +1,359 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "os" +) + + +// CustomPagesApiService CustomPagesApi service +type CustomPagesApiService service + +type ApiCustomPagesGetRequest struct { + ctx context.Context + ApiService *CustomPagesApiService + domain string +} + +func (r ApiCustomPagesGetRequest) Execute() (*CustomPagesData, *http.Response, error) { + return r.ApiService.CustomPagesGetExecute(r) +} + +/* +CustomPagesGet Get list of custom pages + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiCustomPagesGetRequest +*/ +func (a *CustomPagesApiService) CustomPagesGet(ctx context.Context, domain string) ApiCustomPagesGetRequest { + return ApiCustomPagesGetRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return CustomPagesData +func (a *CustomPagesApiService) CustomPagesGetExecute(r ApiCustomPagesGetRequest) (*CustomPagesData, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CustomPagesData + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "CustomPagesApiService.CustomPagesGet") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/custom-pages" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -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 + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 ApiCustomPagesUpdateRequest struct { + ctx context.Context + ApiService *CustomPagesApiService + domain string + type_ *string + page *string + url *string + file *os.File +} + +func (r ApiCustomPagesUpdateRequest) Type_(type_ string) ApiCustomPagesUpdateRequest { + r.type_ = &type_ + return r +} + +// ddos_js and ddos_captcha can only be used with file type +func (r ApiCustomPagesUpdateRequest) Page(page string) ApiCustomPagesUpdateRequest { + r.page = &page + return r +} + +func (r ApiCustomPagesUpdateRequest) Url(url string) ApiCustomPagesUpdateRequest { + r.url = &url + return r +} + +func (r ApiCustomPagesUpdateRequest) File(file *os.File) ApiCustomPagesUpdateRequest { + r.file = file + return r +} + +func (r ApiCustomPagesUpdateRequest) Execute() (*MessageResponse, *http.Response, error) { + return r.ApiService.CustomPagesUpdateExecute(r) +} + +/* +CustomPagesUpdate Update custom page + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiCustomPagesUpdateRequest +*/ +func (a *CustomPagesApiService) CustomPagesUpdate(ctx context.Context, domain string) ApiCustomPagesUpdateRequest { + return ApiCustomPagesUpdateRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return MessageResponse +func (a *CustomPagesApiService) CustomPagesUpdateExecute(r ApiCustomPagesUpdateRequest) (*MessageResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MessageResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "CustomPagesApiService.CustomPagesUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/custom-pages" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // 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 + } + if r.type_ != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "type", r.type_, "") + } + if r.page != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "page", r.page, "") + } + if r.url != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "url", r.url, "") + } + var fileLocalVarFormFileName string + var fileLocalVarFileName string + var fileLocalVarFileBytes []byte + + fileLocalVarFormFileName = "file" + + + fileLocalVarFile := r.file + + if fileLocalVarFile != nil { + fbs, _ := io.ReadAll(fileLocalVarFile) + + fileLocalVarFileBytes = fbs + fileLocalVarFileName = fileLocalVarFile.Name() + fileLocalVarFile.Close() + formFiles = append(formFiles, formFile{fileBytes: fileLocalVarFileBytes, fileName: fileLocalVarFileName, formFileName: fileLocalVarFormFileName}) + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 + } + if localVarHTTPResponse.StatusCode == 422 { + var v DomainsStore422Response + 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_ddo_s.go b/api_ddo_s.go new file mode 100644 index 0000000..cd73137 --- /dev/null +++ b/api_ddo_s.go @@ -0,0 +1,1482 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + + +// DDoSApiService DDoSApi service +type DDoSApiService service + +type ApiDdosIndexRequest struct { + ctx context.Context + ApiService *DDoSApiService + domain string +} + +func (r ApiDdosIndexRequest) Execute() (*DdosData, *http.Response, error) { + return r.ApiService.DdosIndexExecute(r) +} + +/* +DdosIndex Get DDoS protection settings + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiDdosIndexRequest + +Deprecated +*/ +func (a *DDoSApiService) DdosIndex(ctx context.Context, domain string) ApiDdosIndexRequest { + return ApiDdosIndexRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return DdosData +// Deprecated +func (a *DDoSApiService) DdosIndexExecute(r ApiDdosIndexRequest) (*DdosData, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DdosData + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DDoSApiService.DdosIndex") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/ddos" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -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 + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 ApiDdosReprioritizeRequest struct { + ctx context.Context + ApiService *DDoSApiService + domain string + reprioritizeRuleRequest *ReprioritizeRuleRequest +} + +func (r ApiDdosReprioritizeRequest) ReprioritizeRuleRequest(reprioritizeRuleRequest ReprioritizeRuleRequest) ApiDdosReprioritizeRequest { + r.reprioritizeRuleRequest = &reprioritizeRuleRequest + return r +} + +func (r ApiDdosReprioritizeRequest) Execute() (*MessageResponse, *http.Response, error) { + return r.ApiService.DdosReprioritizeExecute(r) +} + +/* +DdosReprioritize Change priority of ddos rules + +You can choose a DDoS rule and request to put it after or before another rule. +You should only provide either after_rule_id or before_rule_id (and not both of them). + + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiDdosReprioritizeRequest +*/ +func (a *DDoSApiService) DdosReprioritize(ctx context.Context, domain string) ApiDdosReprioritizeRequest { + return ApiDdosReprioritizeRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return MessageResponse +func (a *DDoSApiService) DdosReprioritizeExecute(r ApiDdosReprioritizeRequest) (*MessageResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MessageResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DDoSApiService.DdosReprioritize") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/ddos/actions/reprioritize" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -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.reprioritizeRuleRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 ApiDdosRulesDestroyRequest struct { + ctx context.Context + ApiService *DDoSApiService + domain string + id string +} + +func (r ApiDdosRulesDestroyRequest) Execute() (*MessageResponse, *http.Response, error) { + return r.ApiService.DdosRulesDestroyExecute(r) +} + +/* +DdosRulesDestroy Delete DDoS protection rule + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @param id + @return ApiDdosRulesDestroyRequest +*/ +func (a *DDoSApiService) DdosRulesDestroy(ctx context.Context, domain string, id string) ApiDdosRulesDestroyRequest { + return ApiDdosRulesDestroyRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + id: id, + } +} + +// Execute executes the request +// @return MessageResponse +func (a *DDoSApiService) DdosRulesDestroyExecute(r ApiDdosRulesDestroyRequest) (*MessageResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MessageResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DDoSApiService.DdosRulesDestroy") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/ddos/rules/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -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 + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 ApiDdosRulesIndexRequest struct { + ctx context.Context + ApiService *DDoSApiService + domain string + perPage *int32 + orderBy *string + orderType *string + search *string +} + +func (r ApiDdosRulesIndexRequest) PerPage(perPage int32) ApiDdosRulesIndexRequest { + r.perPage = &perPage + return r +} + +func (r ApiDdosRulesIndexRequest) OrderBy(orderBy string) ApiDdosRulesIndexRequest { + r.orderBy = &orderBy + return r +} + +func (r ApiDdosRulesIndexRequest) OrderType(orderType string) ApiDdosRulesIndexRequest { + r.orderType = &orderType + return r +} + +func (r ApiDdosRulesIndexRequest) Search(search string) ApiDdosRulesIndexRequest { + r.search = &search + return r +} + +func (r ApiDdosRulesIndexRequest) Execute() (*DdosRulesIndex200Response, *http.Response, error) { + return r.ApiService.DdosRulesIndexExecute(r) +} + +/* +DdosRulesIndex Get DDoS Protection Rules + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiDdosRulesIndexRequest +*/ +func (a *DDoSApiService) DdosRulesIndex(ctx context.Context, domain string) ApiDdosRulesIndexRequest { + return ApiDdosRulesIndexRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return DdosRulesIndex200Response +func (a *DDoSApiService) DdosRulesIndexExecute(r ApiDdosRulesIndexRequest) (*DdosRulesIndex200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DdosRulesIndex200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DDoSApiService.DdosRulesIndex") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/ddos/rules" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.perPage != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "per_page", r.perPage, "") + } + if r.orderBy != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "order_by", r.orderBy, "") + } + if r.orderType != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "order_type", r.orderType, "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") + } + // 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["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 ApiDdosRulesShowRequest struct { + ctx context.Context + ApiService *DDoSApiService + domain string + id string +} + +func (r ApiDdosRulesShowRequest) Execute() (*DdosRuleData, *http.Response, error) { + return r.ApiService.DdosRulesShowExecute(r) +} + +/* +DdosRulesShow Get DDoS protection's rule information + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @param id + @return ApiDdosRulesShowRequest +*/ +func (a *DDoSApiService) DdosRulesShow(ctx context.Context, domain string, id string) ApiDdosRulesShowRequest { + return ApiDdosRulesShowRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + id: id, + } +} + +// Execute executes the request +// @return DdosRuleData +func (a *DDoSApiService) DdosRulesShowExecute(r ApiDdosRulesShowRequest) (*DdosRuleData, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DdosRuleData + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DDoSApiService.DdosRulesShow") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/ddos/rules/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -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 + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 ApiDdosRulesStoreRequest struct { + ctx context.Context + ApiService *DDoSApiService + domain string + ddosRule *DdosRule +} + +func (r ApiDdosRulesStoreRequest) DdosRule(ddosRule DdosRule) ApiDdosRulesStoreRequest { + r.ddosRule = &ddosRule + return r +} + +func (r ApiDdosRulesStoreRequest) Execute() (*DdosRuleResponse, *http.Response, error) { + return r.ApiService.DdosRulesStoreExecute(r) +} + +/* +DdosRulesStore Create new DDoS protection rule + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiDdosRulesStoreRequest +*/ +func (a *DDoSApiService) DdosRulesStore(ctx context.Context, domain string) ApiDdosRulesStoreRequest { + return ApiDdosRulesStoreRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return DdosRuleResponse +func (a *DDoSApiService) DdosRulesStoreExecute(r ApiDdosRulesStoreRequest) (*DdosRuleResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DdosRuleResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DDoSApiService.DdosRulesStore") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/ddos/rules" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -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.ddosRule + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 ApiDdosRulesUpdateRequest struct { + ctx context.Context + ApiService *DDoSApiService + domain string + id string + ddosRule *DdosRule +} + +func (r ApiDdosRulesUpdateRequest) DdosRule(ddosRule DdosRule) ApiDdosRulesUpdateRequest { + r.ddosRule = &ddosRule + return r +} + +func (r ApiDdosRulesUpdateRequest) Execute() (*DdosRuleResponse, *http.Response, error) { + return r.ApiService.DdosRulesUpdateExecute(r) +} + +/* +DdosRulesUpdate Update the DDoS protection rule + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @param id + @return ApiDdosRulesUpdateRequest +*/ +func (a *DDoSApiService) DdosRulesUpdate(ctx context.Context, domain string, id string) ApiDdosRulesUpdateRequest { + return ApiDdosRulesUpdateRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + id: id, + } +} + +// Execute executes the request +// @return DdosRuleResponse +func (a *DDoSApiService) DdosRulesUpdateExecute(r ApiDdosRulesUpdateRequest) (*DdosRuleResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DdosRuleResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DDoSApiService.DdosRulesUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/ddos/rules/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -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.ddosRule + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 ApiDdosSettingsIndexRequest struct { + ctx context.Context + ApiService *DDoSApiService + domain string +} + +func (r ApiDdosSettingsIndexRequest) Execute() (*DdosSettingsData, *http.Response, error) { + return r.ApiService.DdosSettingsIndexExecute(r) +} + +/* +DdosSettingsIndex Get DDoS protection settings + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiDdosSettingsIndexRequest +*/ +func (a *DDoSApiService) DdosSettingsIndex(ctx context.Context, domain string) ApiDdosSettingsIndexRequest { + return ApiDdosSettingsIndexRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return DdosSettingsData +func (a *DDoSApiService) DdosSettingsIndexExecute(r ApiDdosSettingsIndexRequest) (*DdosSettingsData, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DdosSettingsData + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DDoSApiService.DdosSettingsIndex") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/ddos/settings" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -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 + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 ApiDdosSettingsUpdateRequest struct { + ctx context.Context + ApiService *DDoSApiService + domain string + ddosSettings *DdosSettings +} + +func (r ApiDdosSettingsUpdateRequest) DdosSettings(ddosSettings DdosSettings) ApiDdosSettingsUpdateRequest { + r.ddosSettings = &ddosSettings + return r +} + +func (r ApiDdosSettingsUpdateRequest) Execute() (*DdosSettingsUpdate200Response, *http.Response, error) { + return r.ApiService.DdosSettingsUpdateExecute(r) +} + +/* +DdosSettingsUpdate Update domain's DDoS protection configuration + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiDdosSettingsUpdateRequest +*/ +func (a *DDoSApiService) DdosSettingsUpdate(ctx context.Context, domain string) ApiDdosSettingsUpdateRequest { + return ApiDdosSettingsUpdateRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return DdosSettingsUpdate200Response +func (a *DDoSApiService) DdosSettingsUpdateExecute(r ApiDdosSettingsUpdateRequest) (*DdosSettingsUpdate200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DdosSettingsUpdate200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DDoSApiService.DdosSettingsUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/ddos/settings" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -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.ddosSettings + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 ApiDdosUpdateRequest struct { + ctx context.Context + ApiService *DDoSApiService + domain string + ddos *Ddos +} + +func (r ApiDdosUpdateRequest) Ddos(ddos Ddos) ApiDdosUpdateRequest { + r.ddos = &ddos + return r +} + +func (r ApiDdosUpdateRequest) Execute() (*DdosUpdate200Response, *http.Response, error) { + return r.ApiService.DdosUpdateExecute(r) +} + +/* +DdosUpdate Update domain's DDoS protection configuration + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiDdosUpdateRequest + +Deprecated +*/ +func (a *DDoSApiService) DdosUpdate(ctx context.Context, domain string) ApiDdosUpdateRequest { + return ApiDdosUpdateRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return DdosUpdate200Response +// Deprecated +func (a *DDoSApiService) DdosUpdateExecute(r ApiDdosUpdateRequest) (*DdosUpdate200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DdosUpdate200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DDoSApiService.DdosUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/ddos" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -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.ddos + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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_dns_management.go b/api_dns_management.go new file mode 100644 index 0000000..76c352e --- /dev/null +++ b/api_dns_management.go @@ -0,0 +1,1383 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "os" +) + + +// DNSManagementApiService DNSManagementApi service +type DNSManagementApiService service + +type ApiDnsRecordsCloudRequest struct { + ctx context.Context + ApiService *DNSManagementApiService + domain string + id string + dnsRecordCloud *DnsRecordCloud +} + +func (r ApiDnsRecordsCloudRequest) DnsRecordCloud(dnsRecordCloud DnsRecordCloud) ApiDnsRecordsCloudRequest { + r.dnsRecordCloud = &dnsRecordCloud + return r +} + +func (r ApiDnsRecordsCloudRequest) Execute() (*DnsRecordResponse, *http.Response, error) { + return r.ApiService.DnsRecordsCloudExecute(r) +} + +/* +DnsRecordsCloud Toggle cloud status (To proxy or not proxy, that's the question!) + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @param id ID of the DNS record + @return ApiDnsRecordsCloudRequest +*/ +func (a *DNSManagementApiService) DnsRecordsCloud(ctx context.Context, domain string, id string) ApiDnsRecordsCloudRequest { + return ApiDnsRecordsCloudRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + id: id, + } +} + +// Execute executes the request +// @return DnsRecordResponse +func (a *DNSManagementApiService) DnsRecordsCloudExecute(r ApiDnsRecordsCloudRequest) (*DnsRecordResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DnsRecordResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DNSManagementApiService.DnsRecordsCloud") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/dns-records/{id}/cloud" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -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.dnsRecordCloud + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 + } + if localVarHTTPResponse.StatusCode == 422 { + var v DomainsStore422Response + 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 ApiDnsRecordsDestroyRequest struct { + ctx context.Context + ApiService *DNSManagementApiService + domain string + id string +} + +func (r ApiDnsRecordsDestroyRequest) Execute() (*MessageResponse, *http.Response, error) { + return r.ApiService.DnsRecordsDestroyExecute(r) +} + +/* +DnsRecordsDestroy Remove a DNS record + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @param id ID of the DNS record + @return ApiDnsRecordsDestroyRequest +*/ +func (a *DNSManagementApiService) DnsRecordsDestroy(ctx context.Context, domain string, id string) ApiDnsRecordsDestroyRequest { + return ApiDnsRecordsDestroyRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + id: id, + } +} + +// Execute executes the request +// @return MessageResponse +func (a *DNSManagementApiService) DnsRecordsDestroyExecute(r ApiDnsRecordsDestroyRequest) (*MessageResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MessageResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DNSManagementApiService.DnsRecordsDestroy") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/dns-records/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -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 + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 ApiDnsRecordsDnsSecShowRequest struct { + ctx context.Context + ApiService *DNSManagementApiService + domain string +} + +func (r ApiDnsRecordsDnsSecShowRequest) Execute() (*DnsSecData, *http.Response, error) { + return r.ApiService.DnsRecordsDnsSecShowExecute(r) +} + +/* +DnsRecordsDnsSecShow Get status of DNSSEC + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiDnsRecordsDnsSecShowRequest +*/ +func (a *DNSManagementApiService) DnsRecordsDnsSecShow(ctx context.Context, domain string) ApiDnsRecordsDnsSecShowRequest { + return ApiDnsRecordsDnsSecShowRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return DnsSecData +func (a *DNSManagementApiService) DnsRecordsDnsSecShowExecute(r ApiDnsRecordsDnsSecShowRequest) (*DnsSecData, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DnsSecData + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DNSManagementApiService.DnsRecordsDnsSecShow") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/dns-records/dnssec" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -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 + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 ApiDnsRecordsDnsSecUpdateRequest struct { + ctx context.Context + ApiService *DNSManagementApiService + domain string + dnsSecStatus *DnsSecStatus +} + +func (r ApiDnsRecordsDnsSecUpdateRequest) DnsSecStatus(dnsSecStatus DnsSecStatus) ApiDnsRecordsDnsSecUpdateRequest { + r.dnsSecStatus = &dnsSecStatus + return r +} + +func (r ApiDnsRecordsDnsSecUpdateRequest) Execute() (*DnsSecData, *http.Response, error) { + return r.ApiService.DnsRecordsDnsSecUpdateExecute(r) +} + +/* +DnsRecordsDnsSecUpdate Update DNSSEC status + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiDnsRecordsDnsSecUpdateRequest +*/ +func (a *DNSManagementApiService) DnsRecordsDnsSecUpdate(ctx context.Context, domain string) ApiDnsRecordsDnsSecUpdateRequest { + return ApiDnsRecordsDnsSecUpdateRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return DnsSecData +func (a *DNSManagementApiService) DnsRecordsDnsSecUpdateExecute(r ApiDnsRecordsDnsSecUpdateRequest) (*DnsSecData, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DnsSecData + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DNSManagementApiService.DnsRecordsDnsSecUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/dns-records/dnssec/actions" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -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.dnsSecStatus + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 + } + if localVarHTTPResponse.StatusCode == 422 { + var v DomainsStore422Response + 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 ApiDnsRecordsImportRequest struct { + ctx context.Context + ApiService *DNSManagementApiService + domain string + fZoneFile *os.File +} + +func (r ApiDnsRecordsImportRequest) FZoneFile(fZoneFile *os.File) ApiDnsRecordsImportRequest { + r.fZoneFile = fZoneFile + return r +} + +func (r ApiDnsRecordsImportRequest) Execute() (*MessageResponse, *http.Response, error) { + return r.ApiService.DnsRecordsImportExecute(r) +} + +/* +DnsRecordsImport Import DNS records using BIND file + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiDnsRecordsImportRequest +*/ +func (a *DNSManagementApiService) DnsRecordsImport(ctx context.Context, domain string) ApiDnsRecordsImportRequest { + return ApiDnsRecordsImportRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return MessageResponse +func (a *DNSManagementApiService) DnsRecordsImportExecute(r ApiDnsRecordsImportRequest) (*MessageResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MessageResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DNSManagementApiService.DnsRecordsImport") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/dns-records/import" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // 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 fZoneFileLocalVarFormFileName string + var fZoneFileLocalVarFileName string + var fZoneFileLocalVarFileBytes []byte + + fZoneFileLocalVarFormFileName = "f_zone_file" + + + fZoneFileLocalVarFile := r.fZoneFile + + if fZoneFileLocalVarFile != nil { + fbs, _ := io.ReadAll(fZoneFileLocalVarFile) + + fZoneFileLocalVarFileBytes = fbs + fZoneFileLocalVarFileName = fZoneFileLocalVarFile.Name() + fZoneFileLocalVarFile.Close() + formFiles = append(formFiles, formFile{fileBytes: fZoneFileLocalVarFileBytes, fileName: fZoneFileLocalVarFileName, formFileName: fZoneFileLocalVarFormFileName}) + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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 ApiDnsRecordsIndexRequest struct { + ctx context.Context + ApiService *DNSManagementApiService + domain string + search *string + type_ *string + page *int32 + perPage *int32 +} + +// Search term +func (r ApiDnsRecordsIndexRequest) Search(search string) ApiDnsRecordsIndexRequest { + r.search = &search + return r +} + +// Type of a dns record. To filter multiple types separate them using a comma +func (r ApiDnsRecordsIndexRequest) Type_(type_ string) ApiDnsRecordsIndexRequest { + r.type_ = &type_ + return r +} + +// Set the desired page number +func (r ApiDnsRecordsIndexRequest) Page(page int32) ApiDnsRecordsIndexRequest { + r.page = &page + return r +} + +// Set how many items returned per page +func (r ApiDnsRecordsIndexRequest) PerPage(perPage int32) ApiDnsRecordsIndexRequest { + r.perPage = &perPage + return r +} + +func (r ApiDnsRecordsIndexRequest) Execute() (*DnsRecordsIndex200Response, *http.Response, error) { + return r.ApiService.DnsRecordsIndexExecute(r) +} + +/* +DnsRecordsIndex Get list of DNS records + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiDnsRecordsIndexRequest +*/ +func (a *DNSManagementApiService) DnsRecordsIndex(ctx context.Context, domain string) ApiDnsRecordsIndexRequest { + return ApiDnsRecordsIndexRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return DnsRecordsIndex200Response +func (a *DNSManagementApiService) DnsRecordsIndexExecute(r ApiDnsRecordsIndexRequest) (*DnsRecordsIndex200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DnsRecordsIndex200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DNSManagementApiService.DnsRecordsIndex") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/dns-records" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") + } + if r.type_ != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "type", r.type_, "") + } + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") + } + if r.perPage != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "per_page", r.perPage, "") + } + // 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["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 ApiDnsRecordsShowRequest struct { + ctx context.Context + ApiService *DNSManagementApiService + domain string + id string +} + +func (r ApiDnsRecordsShowRequest) Execute() (*DnsRecordData, *http.Response, error) { + return r.ApiService.DnsRecordsShowExecute(r) +} + +/* +DnsRecordsShow Get information of a record + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @param id ID of the DNS record + @return ApiDnsRecordsShowRequest +*/ +func (a *DNSManagementApiService) DnsRecordsShow(ctx context.Context, domain string, id string) ApiDnsRecordsShowRequest { + return ApiDnsRecordsShowRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + id: id, + } +} + +// Execute executes the request +// @return DnsRecordData +func (a *DNSManagementApiService) DnsRecordsShowExecute(r ApiDnsRecordsShowRequest) (*DnsRecordData, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DnsRecordData + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DNSManagementApiService.DnsRecordsShow") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/dns-records/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -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 + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 ApiDnsRecordsStoreRequest struct { + ctx context.Context + ApiService *DNSManagementApiService + domain string + dnsRecord *DnsRecord +} + +func (r ApiDnsRecordsStoreRequest) DnsRecord(dnsRecord DnsRecord) ApiDnsRecordsStoreRequest { + r.dnsRecord = &dnsRecord + return r +} + +func (r ApiDnsRecordsStoreRequest) Execute() (*DnsRecordResponse, *http.Response, error) { + return r.ApiService.DnsRecordsStoreExecute(r) +} + +/* +DnsRecordsStore Create new DNS record + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiDnsRecordsStoreRequest +*/ +func (a *DNSManagementApiService) DnsRecordsStore(ctx context.Context, domain string) ApiDnsRecordsStoreRequest { + return ApiDnsRecordsStoreRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return DnsRecordResponse +func (a *DNSManagementApiService) DnsRecordsStoreExecute(r ApiDnsRecordsStoreRequest) (*DnsRecordResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DnsRecordResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DNSManagementApiService.DnsRecordsStore") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/dns-records" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -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.dnsRecord + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 + } + if localVarHTTPResponse.StatusCode == 422 { + var v DomainsStore422Response + 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 ApiDnsRecordsUpdateRequest struct { + ctx context.Context + ApiService *DNSManagementApiService + domain string + id string + dnsRecord *DnsRecord +} + +func (r ApiDnsRecordsUpdateRequest) DnsRecord(dnsRecord DnsRecord) ApiDnsRecordsUpdateRequest { + r.dnsRecord = &dnsRecord + return r +} + +func (r ApiDnsRecordsUpdateRequest) Execute() (*DnsRecordResponse, *http.Response, error) { + return r.ApiService.DnsRecordsUpdateExecute(r) +} + +/* +DnsRecordsUpdate Update a DNS record + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @param id ID of the DNS record + @return ApiDnsRecordsUpdateRequest +*/ +func (a *DNSManagementApiService) DnsRecordsUpdate(ctx context.Context, domain string, id string) ApiDnsRecordsUpdateRequest { + return ApiDnsRecordsUpdateRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + id: id, + } +} + +// Execute executes the request +// @return DnsRecordResponse +func (a *DNSManagementApiService) DnsRecordsUpdateExecute(r ApiDnsRecordsUpdateRequest) (*DnsRecordResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DnsRecordResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DNSManagementApiService.DnsRecordsUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/dns-records/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -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.dnsRecord + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 + } + if localVarHTTPResponse.StatusCode == 422 { + var v DomainsStore422Response + 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_domain.go b/api_domain.go new file mode 100644 index 0000000..8454a2f --- /dev/null +++ b/api_domain.go @@ -0,0 +1,2166 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + + +// DomainApiService DomainApi service +type DomainApiService service + +type ApiDomainsCloneRequest struct { + ctx context.Context + ApiService *DomainApiService + domain string + cloneDomain *CloneDomain +} + +func (r ApiDomainsCloneRequest) CloneDomain(cloneDomain CloneDomain) ApiDomainsCloneRequest { + r.cloneDomain = &cloneDomain + return r +} + +func (r ApiDomainsCloneRequest) Execute() (*MessageResponse, *http.Response, error) { + return r.ApiService.DomainsCloneExecute(r) +} + +/* +DomainsClone Clone a domain config from another one + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiDomainsCloneRequest +*/ +func (a *DomainApiService) DomainsClone(ctx context.Context, domain string) ApiDomainsCloneRequest { + return ApiDomainsCloneRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return MessageResponse +func (a *DomainApiService) DomainsCloneExecute(r ApiDomainsCloneRequest) (*MessageResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MessageResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DomainApiService.DomainsClone") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/clone" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -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.cloneDomain + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 400 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 ApiDomainsCnameSetupCheckRequest struct { + ctx context.Context + ApiService *DomainApiService + domain string +} + +func (r ApiDomainsCnameSetupCheckRequest) Execute() (*DomainResponse, *http.Response, error) { + return r.ApiService.DomainsCnameSetupCheckExecute(r) +} + +/* +DomainsCnameSetupCheck Check Cname Setup to find whether domain is activated + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiDomainsCnameSetupCheckRequest +*/ +func (a *DomainApiService) DomainsCnameSetupCheck(ctx context.Context, domain string) ApiDomainsCnameSetupCheckRequest { + return ApiDomainsCnameSetupCheckRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return DomainResponse +func (a *DomainApiService) DomainsCnameSetupCheckExecute(r ApiDomainsCnameSetupCheckRequest) (*DomainResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DomainResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DomainApiService.DomainsCnameSetupCheck") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/cname-setup/check" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -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 + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 ApiDomainsCnameSetupConvertRequest struct { + ctx context.Context + ApiService *DomainApiService + domain string +} + +func (r ApiDomainsCnameSetupConvertRequest) Execute() (*DomainResponse, *http.Response, error) { + return r.ApiService.DomainsCnameSetupConvertExecute(r) +} + +/* +DomainsCnameSetupConvert Convert domain setup to cname + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiDomainsCnameSetupConvertRequest +*/ +func (a *DomainApiService) DomainsCnameSetupConvert(ctx context.Context, domain string) ApiDomainsCnameSetupConvertRequest { + return ApiDomainsCnameSetupConvertRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return DomainResponse +func (a *DomainApiService) DomainsCnameSetupConvertExecute(r ApiDomainsCnameSetupConvertRequest) (*DomainResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DomainResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DomainApiService.DomainsCnameSetupConvert") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/cname-setup/convert" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -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 + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 422 { + var v DomainsStore422Response + 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 ApiDomainsCnameSetupResetRequest struct { + ctx context.Context + ApiService *DomainApiService + domain string +} + +func (r ApiDomainsCnameSetupResetRequest) Execute() (*DomainResponse, *http.Response, error) { + return r.ApiService.DomainsCnameSetupResetExecute(r) +} + +/* +DomainsCnameSetupReset Reset the custom record of CNAME Setup to the default value + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiDomainsCnameSetupResetRequest +*/ +func (a *DomainApiService) DomainsCnameSetupReset(ctx context.Context, domain string) ApiDomainsCnameSetupResetRequest { + return ApiDomainsCnameSetupResetRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return DomainResponse +func (a *DomainApiService) DomainsCnameSetupResetExecute(r ApiDomainsCnameSetupResetRequest) (*DomainResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DomainResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DomainApiService.DomainsCnameSetupReset") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/cname-setup/custom" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -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 + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 422 { + var v DomainsStore422Response + 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 ApiDomainsCnameSetupSetRequest struct { + ctx context.Context + ApiService *DomainApiService + domain string + customCname *CustomCname +} + +func (r ApiDomainsCnameSetupSetRequest) CustomCname(customCname CustomCname) ApiDomainsCnameSetupSetRequest { + r.customCname = &customCname + return r +} + +func (r ApiDomainsCnameSetupSetRequest) Execute() (*DomainResponse, *http.Response, error) { + return r.ApiService.DomainsCnameSetupSetExecute(r) +} + +/* +DomainsCnameSetupSet Set a custom record for using CNAME Setup + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiDomainsCnameSetupSetRequest +*/ +func (a *DomainApiService) DomainsCnameSetupSet(ctx context.Context, domain string) ApiDomainsCnameSetupSetRequest { + return ApiDomainsCnameSetupSetRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return DomainResponse +func (a *DomainApiService) DomainsCnameSetupSetExecute(r ApiDomainsCnameSetupSetRequest) (*DomainResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DomainResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DomainApiService.DomainsCnameSetupSet") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/cname-setup/custom" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -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.customCname + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 422 { + var v DomainsStore422Response + 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 ApiDomainsDestroyRequest struct { + ctx context.Context + ApiService *DomainApiService + domain string + id *string +} + +func (r ApiDomainsDestroyRequest) Id(id string) ApiDomainsDestroyRequest { + r.id = &id + return r +} + +func (r ApiDomainsDestroyRequest) Execute() (*MessageResponse, *http.Response, error) { + return r.ApiService.DomainsDestroyExecute(r) +} + +/* +DomainsDestroy Remove the domain + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiDomainsDestroyRequest +*/ +func (a *DomainApiService) DomainsDestroy(ctx context.Context, domain string) ApiDomainsDestroyRequest { + return ApiDomainsDestroyRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return MessageResponse +func (a *DomainApiService) DomainsDestroyExecute(r ApiDomainsDestroyRequest) (*MessageResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MessageResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DomainApiService.DomainsDestroy") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.id == nil { + return localVarReturnValue, nil, reportError("id is required and must be specified") + } + + parameterAddToHeaderOrQuery(localVarQueryParams, "id", r.id, "") + // 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["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 + } + if localVarHTTPResponse.StatusCode == 422 { + var v DomainsStore422Response + 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 ApiDomainsIndexRequest struct { + ctx context.Context + ApiService *DomainApiService + search *string + perPage *int32 + page *int32 +} + +// Search term +func (r ApiDomainsIndexRequest) Search(search string) ApiDomainsIndexRequest { + r.search = &search + return r +} + +// Set how many items returned per page +func (r ApiDomainsIndexRequest) PerPage(perPage int32) ApiDomainsIndexRequest { + r.perPage = &perPage + return r +} + +// Set the desired page number +func (r ApiDomainsIndexRequest) Page(page int32) ApiDomainsIndexRequest { + r.page = &page + return r +} + +func (r ApiDomainsIndexRequest) Execute() (*DomainsIndex200Response, *http.Response, error) { + return r.ApiService.DomainsIndexExecute(r) +} + +/* +DomainsIndex Get the list of domains + +Leaving the 'search' empty, will return all domains. Otherwise, it will filter domains containing the search keyword. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiDomainsIndexRequest +*/ +func (a *DomainApiService) DomainsIndex(ctx context.Context) ApiDomainsIndexRequest { + return ApiDomainsIndexRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return DomainsIndex200Response +func (a *DomainApiService) DomainsIndexExecute(r ApiDomainsIndexRequest) (*DomainsIndex200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DomainsIndex200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DomainApiService.DomainsIndex") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") + } + if r.perPage != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "per_page", r.perPage, "") + } + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") + } + // 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["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 ApiDomainsNameserversCheckRequest struct { + ctx context.Context + ApiService *DomainApiService + domain string +} + +func (r ApiDomainsNameserversCheckRequest) Execute() (*DomainsNameserversCheck200Response, *http.Response, error) { + return r.ApiService.DomainsNameserversCheckExecute(r) +} + +/* +DomainsNameserversCheck Check NS to find whether domain is activated + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiDomainsNameserversCheckRequest +*/ +func (a *DomainApiService) DomainsNameserversCheck(ctx context.Context, domain string) ApiDomainsNameserversCheckRequest { + return ApiDomainsNameserversCheckRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return DomainsNameserversCheck200Response +func (a *DomainApiService) DomainsNameserversCheckExecute(r ApiDomainsNameserversCheckRequest) (*DomainsNameserversCheck200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DomainsNameserversCheck200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DomainApiService.DomainsNameserversCheck") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/ns-keys/check" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -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 + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 ApiDomainsNameserversDeprecatedCheckRequest struct { + ctx context.Context + ApiService *DomainApiService + domain string +} + +func (r ApiDomainsNameserversDeprecatedCheckRequest) Execute() (*DomainsNameserversDeprecatedCheck200Response, *http.Response, error) { + return r.ApiService.DomainsNameserversDeprecatedCheckExecute(r) +} + +/* +DomainsNameserversDeprecatedCheck Deprecated in favor /ns-keys/check + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiDomainsNameserversDeprecatedCheckRequest + +Deprecated +*/ +func (a *DomainApiService) DomainsNameserversDeprecatedCheck(ctx context.Context, domain string) ApiDomainsNameserversDeprecatedCheckRequest { + return ApiDomainsNameserversDeprecatedCheckRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return DomainsNameserversDeprecatedCheck200Response +// Deprecated +func (a *DomainApiService) DomainsNameserversDeprecatedCheckExecute(r ApiDomainsNameserversDeprecatedCheckRequest) (*DomainsNameserversDeprecatedCheck200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DomainsNameserversDeprecatedCheck200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DomainApiService.DomainsNameserversDeprecatedCheck") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/dns-service/check-ns" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -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 + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 ApiDomainsNameserversOptionalRequest struct { + ctx context.Context + ApiService *DomainApiService + domain string +} + +func (r ApiDomainsNameserversOptionalRequest) Execute() (*NsKeysResponse, *http.Response, error) { + return r.ApiService.DomainsNameserversOptionalExecute(r) +} + +/* +DomainsNameserversOptional Use optional NS keys + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiDomainsNameserversOptionalRequest +*/ +func (a *DomainApiService) DomainsNameserversOptional(ctx context.Context, domain string) ApiDomainsNameserversOptionalRequest { + return ApiDomainsNameserversOptionalRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return NsKeysResponse +func (a *DomainApiService) DomainsNameserversOptionalExecute(r ApiDomainsNameserversOptionalRequest) (*NsKeysResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *NsKeysResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DomainApiService.DomainsNameserversOptional") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/ns-keys/use-optional-keys" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -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 + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 ApiDomainsNameserversResetRequest struct { + ctx context.Context + ApiService *DomainApiService + domain string +} + +func (r ApiDomainsNameserversResetRequest) Execute() (*NsKeysResponse, *http.Response, error) { + return r.ApiService.DomainsNameserversResetExecute(r) +} + +/* +DomainsNameserversReset Reset custom Nameserver keys to the default values for the domain + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiDomainsNameserversResetRequest +*/ +func (a *DomainApiService) DomainsNameserversReset(ctx context.Context, domain string) ApiDomainsNameserversResetRequest { + return ApiDomainsNameserversResetRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return NsKeysResponse +func (a *DomainApiService) DomainsNameserversResetExecute(r ApiDomainsNameserversResetRequest) (*NsKeysResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *NsKeysResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DomainApiService.DomainsNameserversReset") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/ns-keys" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -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 + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 + } + if localVarHTTPResponse.StatusCode == 422 { + var v MessageResponse + 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 ApiDomainsNameserversSetRequest struct { + ctx context.Context + ApiService *DomainApiService + domain string + nsKeys *NsKeys +} + +func (r ApiDomainsNameserversSetRequest) NsKeys(nsKeys NsKeys) ApiDomainsNameserversSetRequest { + r.nsKeys = &nsKeys + return r +} + +func (r ApiDomainsNameserversSetRequest) Execute() (*NsKeysResponse, *http.Response, error) { + return r.ApiService.DomainsNameserversSetExecute(r) +} + +/* +DomainsNameserversSet Set custom NS records for the domain + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiDomainsNameserversSetRequest +*/ +func (a *DomainApiService) DomainsNameserversSet(ctx context.Context, domain string) ApiDomainsNameserversSetRequest { + return ApiDomainsNameserversSetRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return NsKeysResponse +func (a *DomainApiService) DomainsNameserversSetExecute(r ApiDomainsNameserversSetRequest) (*NsKeysResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *NsKeysResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DomainApiService.DomainsNameserversSet") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/ns-keys" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -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.nsKeys + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 + } + if localVarHTTPResponse.StatusCode == 422 { + var v MessageResponse + 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 ApiDomainsRegenerateRequest struct { + ctx context.Context + ApiService *DomainApiService + domain string +} + +func (r ApiDomainsRegenerateRequest) Execute() (*MessageResponse, *http.Response, error) { + return r.ApiService.DomainsRegenerateExecute(r) +} + +/* +DomainsRegenerate Regenerate domain settings for edge servers + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiDomainsRegenerateRequest +*/ +func (a *DomainApiService) DomainsRegenerate(ctx context.Context, domain string) ApiDomainsRegenerateRequest { + return ApiDomainsRegenerateRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return MessageResponse +func (a *DomainApiService) DomainsRegenerateExecute(r ApiDomainsRegenerateRequest) (*MessageResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MessageResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DomainApiService.DomainsRegenerate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/regenerate" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -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 + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 ApiDomainsShowRequest struct { + ctx context.Context + ApiService *DomainApiService + domain string +} + +func (r ApiDomainsShowRequest) Execute() (*DomainResponse, *http.Response, error) { + return r.ApiService.DomainsShowExecute(r) +} + +/* +DomainsShow Get information of the domain + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiDomainsShowRequest +*/ +func (a *DomainApiService) DomainsShow(ctx context.Context, domain string) ApiDomainsShowRequest { + return ApiDomainsShowRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return DomainResponse +func (a *DomainApiService) DomainsShowExecute(r ApiDomainsShowRequest) (*DomainResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DomainResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DomainApiService.DomainsShow") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -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 + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 ApiDomainsStoreRequest struct { + ctx context.Context + ApiService *DomainApiService + domainStore *DomainStore +} + +func (r ApiDomainsStoreRequest) DomainStore(domainStore DomainStore) ApiDomainsStoreRequest { + r.domainStore = &domainStore + return r +} + +func (r ApiDomainsStoreRequest) Execute() (*DomainResponse, *http.Response, error) { + return r.ApiService.DomainsStoreExecute(r) +} + +/* +DomainsStore Create new domain + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiDomainsStoreRequest +*/ +func (a *DomainApiService) DomainsStore(ctx context.Context) ApiDomainsStoreRequest { + return ApiDomainsStoreRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return DomainResponse +func (a *DomainApiService) DomainsStoreExecute(r ApiDomainsStoreRequest) (*DomainResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DomainResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DomainApiService.DomainsStore") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/dns-service" + + 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.domainStore + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 422 { + var v DomainsStore422Response + 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_domain_transfer.go b/api_domain_transfer.go new file mode 100644 index 0000000..35491c8 --- /dev/null +++ b/api_domain_transfer.go @@ -0,0 +1,458 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + + +// DomainTransferApiService DomainTransferApi service +type DomainTransferApiService service + +type ApiDomainsTransferIndexRequest struct { + ctx context.Context + ApiService *DomainTransferApiService + perPage *int32 + page *int32 + type_ *string +} + +// Set how many items returned per page +func (r ApiDomainsTransferIndexRequest) PerPage(perPage int32) ApiDomainsTransferIndexRequest { + r.perPage = &perPage + return r +} + +// Set the desired page number +func (r ApiDomainsTransferIndexRequest) Page(page int32) ApiDomainsTransferIndexRequest { + r.page = &page + return r +} + +func (r ApiDomainsTransferIndexRequest) Type_(type_ string) ApiDomainsTransferIndexRequest { + r.type_ = &type_ + return r +} + +func (r ApiDomainsTransferIndexRequest) Execute() (*DomainsTransferIndex200Response, *http.Response, error) { + return r.ApiService.DomainsTransferIndexExecute(r) +} + +/* +DomainsTransferIndex Get the list of pending transfers + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiDomainsTransferIndexRequest +*/ +func (a *DomainTransferApiService) DomainsTransferIndex(ctx context.Context) ApiDomainsTransferIndexRequest { + return ApiDomainsTransferIndexRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return DomainsTransferIndex200Response +func (a *DomainTransferApiService) DomainsTransferIndexExecute(r ApiDomainsTransferIndexRequest) (*DomainsTransferIndex200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DomainsTransferIndex200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DomainTransferApiService.DomainsTransferIndex") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/transfer" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.perPage != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "per_page", r.perPage, "") + } + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") + } + if r.type_ != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "type", r.type_, "") + } + // 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["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 ApiDomainsTransferStoreRequest struct { + ctx context.Context + ApiService *DomainTransferApiService + domain string + transferDomain *TransferDomain +} + +func (r ApiDomainsTransferStoreRequest) TransferDomain(transferDomain TransferDomain) ApiDomainsTransferStoreRequest { + r.transferDomain = &transferDomain + return r +} + +func (r ApiDomainsTransferStoreRequest) Execute() (*DomainTransferData, *http.Response, error) { + return r.ApiService.DomainsTransferStoreExecute(r) +} + +/* +DomainsTransferStore Transfer domain to another account + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiDomainsTransferStoreRequest +*/ +func (a *DomainTransferApiService) DomainsTransferStore(ctx context.Context, domain string) ApiDomainsTransferStoreRequest { + return ApiDomainsTransferStoreRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return DomainTransferData +func (a *DomainTransferApiService) DomainsTransferStoreExecute(r ApiDomainsTransferStoreRequest) (*DomainTransferData, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DomainTransferData + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DomainTransferApiService.DomainsTransferStore") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/transfer" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -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.transferDomain + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 ApiDomainsTransferUpdateRequest struct { + ctx context.Context + ApiService *DomainTransferApiService + transferDomainChangeStatus *TransferDomainChangeStatus +} + +func (r ApiDomainsTransferUpdateRequest) TransferDomainChangeStatus(transferDomainChangeStatus TransferDomainChangeStatus) ApiDomainsTransferUpdateRequest { + r.transferDomainChangeStatus = &transferDomainChangeStatus + return r +} + +func (r ApiDomainsTransferUpdateRequest) Execute() (*MessageResponse, *http.Response, error) { + return r.ApiService.DomainsTransferUpdateExecute(r) +} + +/* +DomainsTransferUpdate Accept or cancel transferring a domain + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiDomainsTransferUpdateRequest +*/ +func (a *DomainTransferApiService) DomainsTransferUpdate(ctx context.Context) ApiDomainsTransferUpdateRequest { + return ApiDomainsTransferUpdateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return MessageResponse +func (a *DomainTransferApiService) DomainsTransferUpdateExecute(r ApiDomainsTransferUpdateRequest) (*MessageResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MessageResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DomainTransferApiService.DomainsTransferUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/transfer/change-status" + + 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.transferDomainChangeStatus + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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_email_forwarding.go b/api_email_forwarding.go new file mode 100644 index 0000000..4fddeea --- /dev/null +++ b/api_email_forwarding.go @@ -0,0 +1,2117 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + + +// EmailForwardingApiService EmailForwardingApi service +type EmailForwardingApiService service + +type ApiEmailForwardingsActivateRequest struct { + ctx context.Context + ApiService *EmailForwardingApiService + domain string +} + +func (r ApiEmailForwardingsActivateRequest) Execute() (*MessageResponse, *http.Response, error) { + return r.ApiService.EmailForwardingsActivateExecute(r) +} + +/* +EmailForwardingsActivate Activate email forwarding + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiEmailForwardingsActivateRequest +*/ +func (a *EmailForwardingApiService) EmailForwardingsActivate(ctx context.Context, domain string) ApiEmailForwardingsActivateRequest { + return ApiEmailForwardingsActivateRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return MessageResponse +func (a *EmailForwardingApiService) EmailForwardingsActivateExecute(r ApiEmailForwardingsActivateRequest) (*MessageResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MessageResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EmailForwardingApiService.EmailForwardingsActivate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/email-forwardings/activate" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -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 + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 409 { + var v MessageResponse + 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 ApiEmailForwardingsAliasesDestroyRequest struct { + ctx context.Context + ApiService *EmailForwardingApiService + domain string + emailForwardingId string + emailForwardingAliasId string +} + +func (r ApiEmailForwardingsAliasesDestroyRequest) Execute() (*MessageResponse, *http.Response, error) { + return r.ApiService.EmailForwardingsAliasesDestroyExecute(r) +} + +/* +EmailForwardingsAliasesDestroy Delete an alias + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @param emailForwardingId Email forwarding id + @param emailForwardingAliasId Email forwarding alias id + @return ApiEmailForwardingsAliasesDestroyRequest +*/ +func (a *EmailForwardingApiService) EmailForwardingsAliasesDestroy(ctx context.Context, domain string, emailForwardingId string, emailForwardingAliasId string) ApiEmailForwardingsAliasesDestroyRequest { + return ApiEmailForwardingsAliasesDestroyRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + emailForwardingId: emailForwardingId, + emailForwardingAliasId: emailForwardingAliasId, + } +} + +// Execute executes the request +// @return MessageResponse +func (a *EmailForwardingApiService) EmailForwardingsAliasesDestroyExecute(r ApiEmailForwardingsAliasesDestroyRequest) (*MessageResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MessageResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EmailForwardingApiService.EmailForwardingsAliasesDestroy") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/email-forwardings/{emailForwardingId}/aliases/{emailForwardingAliasId}" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"emailForwardingId"+"}", url.PathEscape(parameterValueToString(r.emailForwardingId, "emailForwardingId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"emailForwardingAliasId"+"}", url.PathEscape(parameterValueToString(r.emailForwardingAliasId, "emailForwardingAliasId")), -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 + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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 ApiEmailForwardingsAliasesIndexRequest struct { + ctx context.Context + ApiService *EmailForwardingApiService + domain string + emailForwardingId string + perPage *int32 + page *int32 +} + +// Set how many items returned per page +func (r ApiEmailForwardingsAliasesIndexRequest) PerPage(perPage int32) ApiEmailForwardingsAliasesIndexRequest { + r.perPage = &perPage + return r +} + +// Set the desired page number +func (r ApiEmailForwardingsAliasesIndexRequest) Page(page int32) ApiEmailForwardingsAliasesIndexRequest { + r.page = &page + return r +} + +func (r ApiEmailForwardingsAliasesIndexRequest) Execute() (*EmailForwardingAliasesListData, *http.Response, error) { + return r.ApiService.EmailForwardingsAliasesIndexExecute(r) +} + +/* +EmailForwardingsAliasesIndex List of email forwarding aliases for given domain + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @param emailForwardingId Email forwarding id + @return ApiEmailForwardingsAliasesIndexRequest +*/ +func (a *EmailForwardingApiService) EmailForwardingsAliasesIndex(ctx context.Context, domain string, emailForwardingId string) ApiEmailForwardingsAliasesIndexRequest { + return ApiEmailForwardingsAliasesIndexRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + emailForwardingId: emailForwardingId, + } +} + +// Execute executes the request +// @return EmailForwardingAliasesListData +func (a *EmailForwardingApiService) EmailForwardingsAliasesIndexExecute(r ApiEmailForwardingsAliasesIndexRequest) (*EmailForwardingAliasesListData, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *EmailForwardingAliasesListData + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EmailForwardingApiService.EmailForwardingsAliasesIndex") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/email-forwardings/{emailForwardingId}/aliases" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"emailForwardingId"+"}", url.PathEscape(parameterValueToString(r.emailForwardingId, "emailForwardingId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.perPage != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "per_page", r.perPage, "") + } + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") + } + // 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["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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 ApiEmailForwardingsAliasesStoreRequest struct { + ctx context.Context + ApiService *EmailForwardingApiService + domain string + emailForwardingId string + emailForwardingAliasesStore *EmailForwardingAliasesStore +} + +func (r ApiEmailForwardingsAliasesStoreRequest) EmailForwardingAliasesStore(emailForwardingAliasesStore EmailForwardingAliasesStore) ApiEmailForwardingsAliasesStoreRequest { + r.emailForwardingAliasesStore = &emailForwardingAliasesStore + return r +} + +func (r ApiEmailForwardingsAliasesStoreRequest) Execute() (*EmailForwardingsAliasesStore201Response, *http.Response, error) { + return r.ApiService.EmailForwardingsAliasesStoreExecute(r) +} + +/* +EmailForwardingsAliasesStore Create new alias + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @param emailForwardingId Email forwarding id + @return ApiEmailForwardingsAliasesStoreRequest +*/ +func (a *EmailForwardingApiService) EmailForwardingsAliasesStore(ctx context.Context, domain string, emailForwardingId string) ApiEmailForwardingsAliasesStoreRequest { + return ApiEmailForwardingsAliasesStoreRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + emailForwardingId: emailForwardingId, + } +} + +// Execute executes the request +// @return EmailForwardingsAliasesStore201Response +func (a *EmailForwardingApiService) EmailForwardingsAliasesStoreExecute(r ApiEmailForwardingsAliasesStoreRequest) (*EmailForwardingsAliasesStore201Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *EmailForwardingsAliasesStore201Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EmailForwardingApiService.EmailForwardingsAliasesStore") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/email-forwardings/{emailForwardingId}/aliases" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"emailForwardingId"+"}", url.PathEscape(parameterValueToString(r.emailForwardingId, "emailForwardingId")), -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.emailForwardingAliasesStore + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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 ApiEmailForwardingsAliasesToggleActivationRequest struct { + ctx context.Context + ApiService *EmailForwardingApiService + domain string + emailForwardingId string + emailForwardingAliasId string + emailForwardingAliasesToggleActivation *EmailForwardingAliasesToggleActivation +} + +func (r ApiEmailForwardingsAliasesToggleActivationRequest) EmailForwardingAliasesToggleActivation(emailForwardingAliasesToggleActivation EmailForwardingAliasesToggleActivation) ApiEmailForwardingsAliasesToggleActivationRequest { + r.emailForwardingAliasesToggleActivation = &emailForwardingAliasesToggleActivation + return r +} + +func (r ApiEmailForwardingsAliasesToggleActivationRequest) Execute() (*MessageResponse, *http.Response, error) { + return r.ApiService.EmailForwardingsAliasesToggleActivationExecute(r) +} + +/* +EmailForwardingsAliasesToggleActivation Toggle alias activation + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @param emailForwardingId Email forwarding id + @param emailForwardingAliasId Email forwarding alias id + @return ApiEmailForwardingsAliasesToggleActivationRequest +*/ +func (a *EmailForwardingApiService) EmailForwardingsAliasesToggleActivation(ctx context.Context, domain string, emailForwardingId string, emailForwardingAliasId string) ApiEmailForwardingsAliasesToggleActivationRequest { + return ApiEmailForwardingsAliasesToggleActivationRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + emailForwardingId: emailForwardingId, + emailForwardingAliasId: emailForwardingAliasId, + } +} + +// Execute executes the request +// @return MessageResponse +func (a *EmailForwardingApiService) EmailForwardingsAliasesToggleActivationExecute(r ApiEmailForwardingsAliasesToggleActivationRequest) (*MessageResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MessageResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EmailForwardingApiService.EmailForwardingsAliasesToggleActivation") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/email-forwardings/{emailForwardingId}/aliases/{emailForwardingAliasId}/toggle-activation" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"emailForwardingId"+"}", url.PathEscape(parameterValueToString(r.emailForwardingId, "emailForwardingId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"emailForwardingAliasId"+"}", url.PathEscape(parameterValueToString(r.emailForwardingAliasId, "emailForwardingAliasId")), -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.emailForwardingAliasesToggleActivation + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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 ApiEmailForwardingsAliasesUpdateRecipientsRequest struct { + ctx context.Context + ApiService *EmailForwardingApiService + domain string + emailForwardingId string + emailForwardingAliasId string + emailForwardingAliasesRecipients *EmailForwardingAliasesRecipients +} + +func (r ApiEmailForwardingsAliasesUpdateRecipientsRequest) EmailForwardingAliasesRecipients(emailForwardingAliasesRecipients EmailForwardingAliasesRecipients) ApiEmailForwardingsAliasesUpdateRecipientsRequest { + r.emailForwardingAliasesRecipients = &emailForwardingAliasesRecipients + return r +} + +func (r ApiEmailForwardingsAliasesUpdateRecipientsRequest) Execute() (*MessageResponse, *http.Response, error) { + return r.ApiService.EmailForwardingsAliasesUpdateRecipientsExecute(r) +} + +/* +EmailForwardingsAliasesUpdateRecipients Update alias recipients + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @param emailForwardingId Email forwarding id + @param emailForwardingAliasId Email forwarding alias id + @return ApiEmailForwardingsAliasesUpdateRecipientsRequest +*/ +func (a *EmailForwardingApiService) EmailForwardingsAliasesUpdateRecipients(ctx context.Context, domain string, emailForwardingId string, emailForwardingAliasId string) ApiEmailForwardingsAliasesUpdateRecipientsRequest { + return ApiEmailForwardingsAliasesUpdateRecipientsRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + emailForwardingId: emailForwardingId, + emailForwardingAliasId: emailForwardingAliasId, + } +} + +// Execute executes the request +// @return MessageResponse +func (a *EmailForwardingApiService) EmailForwardingsAliasesUpdateRecipientsExecute(r ApiEmailForwardingsAliasesUpdateRecipientsRequest) (*MessageResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MessageResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EmailForwardingApiService.EmailForwardingsAliasesUpdateRecipients") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/email-forwardings/{emailForwardingId}/aliases/{emailForwardingAliasId}/recipients" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"emailForwardingId"+"}", url.PathEscape(parameterValueToString(r.emailForwardingId, "emailForwardingId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"emailForwardingAliasId"+"}", url.PathEscape(parameterValueToString(r.emailForwardingAliasId, "emailForwardingAliasId")), -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.emailForwardingAliasesRecipients + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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 ApiEmailForwardingsCatchAllActivateRequest struct { + ctx context.Context + ApiService *EmailForwardingApiService + domain string +} + +func (r ApiEmailForwardingsCatchAllActivateRequest) Execute() (*MessageResponse, *http.Response, error) { + return r.ApiService.EmailForwardingsCatchAllActivateExecute(r) +} + +/* +EmailForwardingsCatchAllActivate Activate email forwarding catch all + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiEmailForwardingsCatchAllActivateRequest +*/ +func (a *EmailForwardingApiService) EmailForwardingsCatchAllActivate(ctx context.Context, domain string) ApiEmailForwardingsCatchAllActivateRequest { + return ApiEmailForwardingsCatchAllActivateRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return MessageResponse +func (a *EmailForwardingApiService) EmailForwardingsCatchAllActivateExecute(r ApiEmailForwardingsCatchAllActivateRequest) (*MessageResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MessageResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EmailForwardingApiService.EmailForwardingsCatchAllActivate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/email-forwardings/catch-all/activate" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -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 + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 409 { + var v MessageResponse + 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 ApiEmailForwardingsCatchAllDeactivateRequest struct { + ctx context.Context + ApiService *EmailForwardingApiService + domain string +} + +func (r ApiEmailForwardingsCatchAllDeactivateRequest) Execute() (*MessageResponse, *http.Response, error) { + return r.ApiService.EmailForwardingsCatchAllDeactivateExecute(r) +} + +/* +EmailForwardingsCatchAllDeactivate Deactivate email forwarding catch all + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiEmailForwardingsCatchAllDeactivateRequest +*/ +func (a *EmailForwardingApiService) EmailForwardingsCatchAllDeactivate(ctx context.Context, domain string) ApiEmailForwardingsCatchAllDeactivateRequest { + return ApiEmailForwardingsCatchAllDeactivateRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return MessageResponse +func (a *EmailForwardingApiService) EmailForwardingsCatchAllDeactivateExecute(r ApiEmailForwardingsCatchAllDeactivateRequest) (*MessageResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MessageResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EmailForwardingApiService.EmailForwardingsCatchAllDeactivate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/email-forwardings/catch-all/deactivate" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -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 + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 409 { + var v MessageResponse + 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 ApiEmailForwardingsDeactivateRequest struct { + ctx context.Context + ApiService *EmailForwardingApiService + domain string +} + +func (r ApiEmailForwardingsDeactivateRequest) Execute() (*MessageResponse, *http.Response, error) { + return r.ApiService.EmailForwardingsDeactivateExecute(r) +} + +/* +EmailForwardingsDeactivate Deactivate email forwarding + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiEmailForwardingsDeactivateRequest +*/ +func (a *EmailForwardingApiService) EmailForwardingsDeactivate(ctx context.Context, domain string) ApiEmailForwardingsDeactivateRequest { + return ApiEmailForwardingsDeactivateRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return MessageResponse +func (a *EmailForwardingApiService) EmailForwardingsDeactivateExecute(r ApiEmailForwardingsDeactivateRequest) (*MessageResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MessageResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EmailForwardingApiService.EmailForwardingsDeactivate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/email-forwardings/deactivate" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -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 + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 409 { + var v MessageResponse + 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 ApiEmailForwardingsRecipientsDestroyRequest struct { + ctx context.Context + ApiService *EmailForwardingApiService + domain string + emailForwardingId string + emailForwardingRecipientId string +} + +func (r ApiEmailForwardingsRecipientsDestroyRequest) Execute() (*MessageResponse, *http.Response, error) { + return r.ApiService.EmailForwardingsRecipientsDestroyExecute(r) +} + +/* +EmailForwardingsRecipientsDestroy Delete a recipient + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @param emailForwardingId Email forwarding id + @param emailForwardingRecipientId Email forwarding recipient id + @return ApiEmailForwardingsRecipientsDestroyRequest +*/ +func (a *EmailForwardingApiService) EmailForwardingsRecipientsDestroy(ctx context.Context, domain string, emailForwardingId string, emailForwardingRecipientId string) ApiEmailForwardingsRecipientsDestroyRequest { + return ApiEmailForwardingsRecipientsDestroyRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + emailForwardingId: emailForwardingId, + emailForwardingRecipientId: emailForwardingRecipientId, + } +} + +// Execute executes the request +// @return MessageResponse +func (a *EmailForwardingApiService) EmailForwardingsRecipientsDestroyExecute(r ApiEmailForwardingsRecipientsDestroyRequest) (*MessageResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MessageResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EmailForwardingApiService.EmailForwardingsRecipientsDestroy") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/email-forwardings/{emailForwardingId}/recipients/{emailForwardingRecipientId}" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"emailForwardingId"+"}", url.PathEscape(parameterValueToString(r.emailForwardingId, "emailForwardingId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"emailForwardingRecipientId"+"}", url.PathEscape(parameterValueToString(r.emailForwardingRecipientId, "emailForwardingRecipientId")), -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 + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 500 { + var v MessageResponse + 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 ApiEmailForwardingsRecipientsIndexRequest struct { + ctx context.Context + ApiService *EmailForwardingApiService + domain string + emailForwardingId string + perPage *int32 + page *int32 +} + +// Set how many items returned per page +func (r ApiEmailForwardingsRecipientsIndexRequest) PerPage(perPage int32) ApiEmailForwardingsRecipientsIndexRequest { + r.perPage = &perPage + return r +} + +// Set the desired page number +func (r ApiEmailForwardingsRecipientsIndexRequest) Page(page int32) ApiEmailForwardingsRecipientsIndexRequest { + r.page = &page + return r +} + +func (r ApiEmailForwardingsRecipientsIndexRequest) Execute() (*EmailForwardingRecipientsListData, *http.Response, error) { + return r.ApiService.EmailForwardingsRecipientsIndexExecute(r) +} + +/* +EmailForwardingsRecipientsIndex List recipients of an email forwarding + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @param emailForwardingId Email forwarding id + @return ApiEmailForwardingsRecipientsIndexRequest +*/ +func (a *EmailForwardingApiService) EmailForwardingsRecipientsIndex(ctx context.Context, domain string, emailForwardingId string) ApiEmailForwardingsRecipientsIndexRequest { + return ApiEmailForwardingsRecipientsIndexRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + emailForwardingId: emailForwardingId, + } +} + +// Execute executes the request +// @return EmailForwardingRecipientsListData +func (a *EmailForwardingApiService) EmailForwardingsRecipientsIndexExecute(r ApiEmailForwardingsRecipientsIndexRequest) (*EmailForwardingRecipientsListData, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *EmailForwardingRecipientsListData + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EmailForwardingApiService.EmailForwardingsRecipientsIndex") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/email-forwardings/{emailForwardingId}/recipients" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"emailForwardingId"+"}", url.PathEscape(parameterValueToString(r.emailForwardingId, "emailForwardingId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.perPage != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "per_page", r.perPage, "") + } + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") + } + // 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["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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 ApiEmailForwardingsRecipientsResendVerificationRequest struct { + ctx context.Context + ApiService *EmailForwardingApiService + domain string + emailForwardingId string + emailForwardingRecipientId string +} + +func (r ApiEmailForwardingsRecipientsResendVerificationRequest) Execute() (*MessageResponse, *http.Response, error) { + return r.ApiService.EmailForwardingsRecipientsResendVerificationExecute(r) +} + +/* +EmailForwardingsRecipientsResendVerification Resend Verification + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @param emailForwardingId Email forwarding id + @param emailForwardingRecipientId Email forwarding recipient id + @return ApiEmailForwardingsRecipientsResendVerificationRequest +*/ +func (a *EmailForwardingApiService) EmailForwardingsRecipientsResendVerification(ctx context.Context, domain string, emailForwardingId string, emailForwardingRecipientId string) ApiEmailForwardingsRecipientsResendVerificationRequest { + return ApiEmailForwardingsRecipientsResendVerificationRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + emailForwardingId: emailForwardingId, + emailForwardingRecipientId: emailForwardingRecipientId, + } +} + +// Execute executes the request +// @return MessageResponse +func (a *EmailForwardingApiService) EmailForwardingsRecipientsResendVerificationExecute(r ApiEmailForwardingsRecipientsResendVerificationRequest) (*MessageResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MessageResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EmailForwardingApiService.EmailForwardingsRecipientsResendVerification") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/email-forwardings/{emailForwardingId}/recipients/{emailForwardingRecipientId}/resend-verification" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"emailForwardingId"+"}", url.PathEscape(parameterValueToString(r.emailForwardingId, "emailForwardingId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"emailForwardingRecipientId"+"}", url.PathEscape(parameterValueToString(r.emailForwardingRecipientId, "emailForwardingRecipientId")), -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 + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 409 { + var v MessageResponse + 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 ApiEmailForwardingsRecipientsSetDefaultRequest struct { + ctx context.Context + ApiService *EmailForwardingApiService + domain string + emailForwardingId string + emailForwardingRecipientId string +} + +func (r ApiEmailForwardingsRecipientsSetDefaultRequest) Execute() (*MessageResponse, *http.Response, error) { + return r.ApiService.EmailForwardingsRecipientsSetDefaultExecute(r) +} + +/* +EmailForwardingsRecipientsSetDefault Set default recipient + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @param emailForwardingId Email forwarding id + @param emailForwardingRecipientId Email forwarding recipient id + @return ApiEmailForwardingsRecipientsSetDefaultRequest +*/ +func (a *EmailForwardingApiService) EmailForwardingsRecipientsSetDefault(ctx context.Context, domain string, emailForwardingId string, emailForwardingRecipientId string) ApiEmailForwardingsRecipientsSetDefaultRequest { + return ApiEmailForwardingsRecipientsSetDefaultRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + emailForwardingId: emailForwardingId, + emailForwardingRecipientId: emailForwardingRecipientId, + } +} + +// Execute executes the request +// @return MessageResponse +func (a *EmailForwardingApiService) EmailForwardingsRecipientsSetDefaultExecute(r ApiEmailForwardingsRecipientsSetDefaultRequest) (*MessageResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MessageResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EmailForwardingApiService.EmailForwardingsRecipientsSetDefault") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/email-forwardings/{emailForwardingId}/recipients/{emailForwardingRecipientId}/set-default" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"emailForwardingId"+"}", url.PathEscape(parameterValueToString(r.emailForwardingId, "emailForwardingId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"emailForwardingRecipientId"+"}", url.PathEscape(parameterValueToString(r.emailForwardingRecipientId, "emailForwardingRecipientId")), -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 + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 403 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 409 { + var v MessageResponse + 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 ApiEmailForwardingsRecipientsStoreRequest struct { + ctx context.Context + ApiService *EmailForwardingApiService + domain string + emailForwardingId string + emailForwardingRecipientsStore *EmailForwardingRecipientsStore +} + +func (r ApiEmailForwardingsRecipientsStoreRequest) EmailForwardingRecipientsStore(emailForwardingRecipientsStore EmailForwardingRecipientsStore) ApiEmailForwardingsRecipientsStoreRequest { + r.emailForwardingRecipientsStore = &emailForwardingRecipientsStore + return r +} + +func (r ApiEmailForwardingsRecipientsStoreRequest) Execute() (*EmailForwardingsRecipientsStore201Response, *http.Response, error) { + return r.ApiService.EmailForwardingsRecipientsStoreExecute(r) +} + +/* +EmailForwardingsRecipientsStore Create new recipient + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @param emailForwardingId Email forwarding id + @return ApiEmailForwardingsRecipientsStoreRequest +*/ +func (a *EmailForwardingApiService) EmailForwardingsRecipientsStore(ctx context.Context, domain string, emailForwardingId string) ApiEmailForwardingsRecipientsStoreRequest { + return ApiEmailForwardingsRecipientsStoreRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + emailForwardingId: emailForwardingId, + } +} + +// Execute executes the request +// @return EmailForwardingsRecipientsStore201Response +func (a *EmailForwardingApiService) EmailForwardingsRecipientsStoreExecute(r ApiEmailForwardingsRecipientsStoreRequest) (*EmailForwardingsRecipientsStore201Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *EmailForwardingsRecipientsStore201Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EmailForwardingApiService.EmailForwardingsRecipientsStore") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/email-forwardings/{emailForwardingId}/recipients" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"emailForwardingId"+"}", url.PathEscape(parameterValueToString(r.emailForwardingId, "emailForwardingId")), -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.emailForwardingRecipientsStore + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 409 { + var v MessageResponse + 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 ApiEmailForwardingsRecipientsVerifyRequest struct { + ctx context.Context + ApiService *EmailForwardingApiService + domain string + emailForwardingId string + emailForwardingRecipientId string + emailForwardingRecipientsVerify *EmailForwardingRecipientsVerify +} + +func (r ApiEmailForwardingsRecipientsVerifyRequest) EmailForwardingRecipientsVerify(emailForwardingRecipientsVerify EmailForwardingRecipientsVerify) ApiEmailForwardingsRecipientsVerifyRequest { + r.emailForwardingRecipientsVerify = &emailForwardingRecipientsVerify + return r +} + +func (r ApiEmailForwardingsRecipientsVerifyRequest) Execute() (*MessageResponse, *http.Response, error) { + return r.ApiService.EmailForwardingsRecipientsVerifyExecute(r) +} + +/* +EmailForwardingsRecipientsVerify Verify recipient + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @param emailForwardingId Email forwarding id + @param emailForwardingRecipientId Email forwarding recipient id + @return ApiEmailForwardingsRecipientsVerifyRequest +*/ +func (a *EmailForwardingApiService) EmailForwardingsRecipientsVerify(ctx context.Context, domain string, emailForwardingId string, emailForwardingRecipientId string) ApiEmailForwardingsRecipientsVerifyRequest { + return ApiEmailForwardingsRecipientsVerifyRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + emailForwardingId: emailForwardingId, + emailForwardingRecipientId: emailForwardingRecipientId, + } +} + +// Execute executes the request +// @return MessageResponse +func (a *EmailForwardingApiService) EmailForwardingsRecipientsVerifyExecute(r ApiEmailForwardingsRecipientsVerifyRequest) (*MessageResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MessageResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EmailForwardingApiService.EmailForwardingsRecipientsVerify") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/email-forwardings/{emailForwardingId}/recipients/{emailForwardingRecipientId}/verify" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"emailForwardingId"+"}", url.PathEscape(parameterValueToString(r.emailForwardingId, "emailForwardingId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"emailForwardingRecipientId"+"}", url.PathEscape(parameterValueToString(r.emailForwardingRecipientId, "emailForwardingRecipientId")), -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.emailForwardingRecipientsVerify + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 409 { + var v MessageResponse + 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 ApiEmailForwardingsStatsRequest struct { + ctx context.Context + ApiService *EmailForwardingApiService + domain string +} + +func (r ApiEmailForwardingsStatsRequest) Execute() (*EmailForwardingStatsData, *http.Response, error) { + return r.ApiService.EmailForwardingsStatsExecute(r) +} + +/* +EmailForwardingsStats Show stats of domain's email forwarding + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiEmailForwardingsStatsRequest +*/ +func (a *EmailForwardingApiService) EmailForwardingsStats(ctx context.Context, domain string) ApiEmailForwardingsStatsRequest { + return ApiEmailForwardingsStatsRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return EmailForwardingStatsData +func (a *EmailForwardingApiService) EmailForwardingsStatsExecute(r ApiEmailForwardingsStatsRequest) (*EmailForwardingStatsData, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *EmailForwardingStatsData + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EmailForwardingApiService.EmailForwardingsStats") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/email-forwardings/stats" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -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 + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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 +} diff --git a/api_firewall.go b/api_firewall.go new file mode 100644 index 0000000..3a6449a --- /dev/null +++ b/api_firewall.go @@ -0,0 +1,1482 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + + +// FirewallApiService FirewallApi service +type FirewallApiService service + +type ApiFirewallIndexRequest struct { + ctx context.Context + ApiService *FirewallApiService + domain string +} + +func (r ApiFirewallIndexRequest) Execute() (*FirewallIndex200Response, *http.Response, error) { + return r.ApiService.FirewallIndexExecute(r) +} + +/* +FirewallIndex Get domain's firewall configuration + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiFirewallIndexRequest + +Deprecated +*/ +func (a *FirewallApiService) FirewallIndex(ctx context.Context, domain string) ApiFirewallIndexRequest { + return ApiFirewallIndexRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return FirewallIndex200Response +// Deprecated +func (a *FirewallApiService) FirewallIndexExecute(r ApiFirewallIndexRequest) (*FirewallIndex200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *FirewallIndex200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FirewallApiService.FirewallIndex") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/firewall" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -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 + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 ApiFirewallReprioritizeRequest struct { + ctx context.Context + ApiService *FirewallApiService + domain string + reprioritizeRuleRequest *ReprioritizeRuleRequest +} + +func (r ApiFirewallReprioritizeRequest) ReprioritizeRuleRequest(reprioritizeRuleRequest ReprioritizeRuleRequest) ApiFirewallReprioritizeRequest { + r.reprioritizeRuleRequest = &reprioritizeRuleRequest + return r +} + +func (r ApiFirewallReprioritizeRequest) Execute() (*MessageResponse, *http.Response, error) { + return r.ApiService.FirewallReprioritizeExecute(r) +} + +/* +FirewallReprioritize Change priority of firewall rules + +You can choose a firewall rule and request to put it after or before another rule. +You should only provide either after_rule_id or before_rule_id (and not both of them). + + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiFirewallReprioritizeRequest +*/ +func (a *FirewallApiService) FirewallReprioritize(ctx context.Context, domain string) ApiFirewallReprioritizeRequest { + return ApiFirewallReprioritizeRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return MessageResponse +func (a *FirewallApiService) FirewallReprioritizeExecute(r ApiFirewallReprioritizeRequest) (*MessageResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MessageResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FirewallApiService.FirewallReprioritize") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/firewall/actions/reprioritize" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -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.reprioritizeRuleRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 ApiFirewallRulesDestroyRequest struct { + ctx context.Context + ApiService *FirewallApiService + domain string + id string +} + +func (r ApiFirewallRulesDestroyRequest) Execute() (*MessageResponse, *http.Response, error) { + return r.ApiService.FirewallRulesDestroyExecute(r) +} + +/* +FirewallRulesDestroy Delete firewall rule + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @param id + @return ApiFirewallRulesDestroyRequest +*/ +func (a *FirewallApiService) FirewallRulesDestroy(ctx context.Context, domain string, id string) ApiFirewallRulesDestroyRequest { + return ApiFirewallRulesDestroyRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + id: id, + } +} + +// Execute executes the request +// @return MessageResponse +func (a *FirewallApiService) FirewallRulesDestroyExecute(r ApiFirewallRulesDestroyRequest) (*MessageResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MessageResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FirewallApiService.FirewallRulesDestroy") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/firewall/rules/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -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 + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 ApiFirewallRulesIndexRequest struct { + ctx context.Context + ApiService *FirewallApiService + domain string + perPage *int32 + orderBy *string + orderType *string + search *string +} + +func (r ApiFirewallRulesIndexRequest) PerPage(perPage int32) ApiFirewallRulesIndexRequest { + r.perPage = &perPage + return r +} + +func (r ApiFirewallRulesIndexRequest) OrderBy(orderBy string) ApiFirewallRulesIndexRequest { + r.orderBy = &orderBy + return r +} + +func (r ApiFirewallRulesIndexRequest) OrderType(orderType string) ApiFirewallRulesIndexRequest { + r.orderType = &orderType + return r +} + +func (r ApiFirewallRulesIndexRequest) Search(search string) ApiFirewallRulesIndexRequest { + r.search = &search + return r +} + +func (r ApiFirewallRulesIndexRequest) Execute() (*FirewallRulesIndex200Response, *http.Response, error) { + return r.ApiService.FirewallRulesIndexExecute(r) +} + +/* +FirewallRulesIndex Get domain's firewall rules + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiFirewallRulesIndexRequest +*/ +func (a *FirewallApiService) FirewallRulesIndex(ctx context.Context, domain string) ApiFirewallRulesIndexRequest { + return ApiFirewallRulesIndexRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return FirewallRulesIndex200Response +func (a *FirewallApiService) FirewallRulesIndexExecute(r ApiFirewallRulesIndexRequest) (*FirewallRulesIndex200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *FirewallRulesIndex200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FirewallApiService.FirewallRulesIndex") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/firewall/rules" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.perPage != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "per_page", r.perPage, "") + } + if r.orderBy != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "order_by", r.orderBy, "") + } + if r.orderType != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "order_type", r.orderType, "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") + } + // 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["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 ApiFirewallRulesShowRequest struct { + ctx context.Context + ApiService *FirewallApiService + domain string + id string +} + +func (r ApiFirewallRulesShowRequest) Execute() (*FirewallRuleResponse, *http.Response, error) { + return r.ApiService.FirewallRulesShowExecute(r) +} + +/* +FirewallRulesShow Get firewall rule information + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @param id + @return ApiFirewallRulesShowRequest +*/ +func (a *FirewallApiService) FirewallRulesShow(ctx context.Context, domain string, id string) ApiFirewallRulesShowRequest { + return ApiFirewallRulesShowRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + id: id, + } +} + +// Execute executes the request +// @return FirewallRuleResponse +func (a *FirewallApiService) FirewallRulesShowExecute(r ApiFirewallRulesShowRequest) (*FirewallRuleResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *FirewallRuleResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FirewallApiService.FirewallRulesShow") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/firewall/rules/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -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 + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 ApiFirewallRulesStoreRequest struct { + ctx context.Context + ApiService *FirewallApiService + domain string + firewallRule *FirewallRule +} + +func (r ApiFirewallRulesStoreRequest) FirewallRule(firewallRule FirewallRule) ApiFirewallRulesStoreRequest { + r.firewallRule = &firewallRule + return r +} + +func (r ApiFirewallRulesStoreRequest) Execute() (*FirewallRuleResponse, *http.Response, error) { + return r.ApiService.FirewallRulesStoreExecute(r) +} + +/* +FirewallRulesStore Create new firewall rule + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiFirewallRulesStoreRequest +*/ +func (a *FirewallApiService) FirewallRulesStore(ctx context.Context, domain string) ApiFirewallRulesStoreRequest { + return ApiFirewallRulesStoreRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return FirewallRuleResponse +func (a *FirewallApiService) FirewallRulesStoreExecute(r ApiFirewallRulesStoreRequest) (*FirewallRuleResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *FirewallRuleResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FirewallApiService.FirewallRulesStore") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/firewall/rules" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -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.firewallRule + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 ApiFirewallRulesUpdateRequest struct { + ctx context.Context + ApiService *FirewallApiService + domain string + id string + firewallRule *FirewallRule +} + +func (r ApiFirewallRulesUpdateRequest) FirewallRule(firewallRule FirewallRule) ApiFirewallRulesUpdateRequest { + r.firewallRule = &firewallRule + return r +} + +func (r ApiFirewallRulesUpdateRequest) Execute() (*FirewallRuleResponse, *http.Response, error) { + return r.ApiService.FirewallRulesUpdateExecute(r) +} + +/* +FirewallRulesUpdate Update the firewall rule + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @param id + @return ApiFirewallRulesUpdateRequest +*/ +func (a *FirewallApiService) FirewallRulesUpdate(ctx context.Context, domain string, id string) ApiFirewallRulesUpdateRequest { + return ApiFirewallRulesUpdateRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + id: id, + } +} + +// Execute executes the request +// @return FirewallRuleResponse +func (a *FirewallApiService) FirewallRulesUpdateExecute(r ApiFirewallRulesUpdateRequest) (*FirewallRuleResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *FirewallRuleResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FirewallApiService.FirewallRulesUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/firewall/rules/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -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.firewallRule + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 ApiFirewallSettingsIndexRequest struct { + ctx context.Context + ApiService *FirewallApiService + domain string +} + +func (r ApiFirewallSettingsIndexRequest) Execute() (*FirewallSettingsIndex200Response, *http.Response, error) { + return r.ApiService.FirewallSettingsIndexExecute(r) +} + +/* +FirewallSettingsIndex Get domain's firewall configuration + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiFirewallSettingsIndexRequest +*/ +func (a *FirewallApiService) FirewallSettingsIndex(ctx context.Context, domain string) ApiFirewallSettingsIndexRequest { + return ApiFirewallSettingsIndexRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return FirewallSettingsIndex200Response +func (a *FirewallApiService) FirewallSettingsIndexExecute(r ApiFirewallSettingsIndexRequest) (*FirewallSettingsIndex200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *FirewallSettingsIndex200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FirewallApiService.FirewallSettingsIndex") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/firewall/settings" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -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 + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 ApiFirewallSettingsUpdateRequest struct { + ctx context.Context + ApiService *FirewallApiService + domain string + firewallSettings *FirewallSettings +} + +func (r ApiFirewallSettingsUpdateRequest) FirewallSettings(firewallSettings FirewallSettings) ApiFirewallSettingsUpdateRequest { + r.firewallSettings = &firewallSettings + return r +} + +func (r ApiFirewallSettingsUpdateRequest) Execute() (*MessageResponse, *http.Response, error) { + return r.ApiService.FirewallSettingsUpdateExecute(r) +} + +/* +FirewallSettingsUpdate Update domain's firewall configuration + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiFirewallSettingsUpdateRequest +*/ +func (a *FirewallApiService) FirewallSettingsUpdate(ctx context.Context, domain string) ApiFirewallSettingsUpdateRequest { + return ApiFirewallSettingsUpdateRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return MessageResponse +func (a *FirewallApiService) FirewallSettingsUpdateExecute(r ApiFirewallSettingsUpdateRequest) (*MessageResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MessageResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FirewallApiService.FirewallSettingsUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/firewall/settings" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -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.firewallSettings + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 ApiFirewallUpdateRequest struct { + ctx context.Context + ApiService *FirewallApiService + domain string + firewall *Firewall +} + +func (r ApiFirewallUpdateRequest) Firewall(firewall Firewall) ApiFirewallUpdateRequest { + r.firewall = &firewall + return r +} + +func (r ApiFirewallUpdateRequest) Execute() (*MessageResponse, *http.Response, error) { + return r.ApiService.FirewallUpdateExecute(r) +} + +/* +FirewallUpdate Update domain's firewall configuration + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiFirewallUpdateRequest + +Deprecated +*/ +func (a *FirewallApiService) FirewallUpdate(ctx context.Context, domain string) ApiFirewallUpdateRequest { + return ApiFirewallUpdateRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return MessageResponse +// Deprecated +func (a *FirewallApiService) FirewallUpdateExecute(r ApiFirewallUpdateRequest) (*MessageResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MessageResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FirewallApiService.FirewallUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/firewall" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -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.firewall + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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_list.go b/api_list.go new file mode 100644 index 0000000..cfa1978 --- /dev/null +++ b/api_list.go @@ -0,0 +1,760 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + + +// ListApiService ListApi service +type ListApiService service + +type ApiListsDestroyRequest struct { + ctx context.Context + ApiService *ListApiService + id string +} + +func (r ApiListsDestroyRequest) Execute() (*MessageResponse, *http.Response, error) { + return r.ApiService.ListsDestroyExecute(r) +} + +/* +ListsDestroy Delete List + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id + @return ApiListsDestroyRequest +*/ +func (a *ListApiService) ListsDestroy(ctx context.Context, id string) ApiListsDestroyRequest { + return ApiListsDestroyRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// @return MessageResponse +func (a *ListApiService) ListsDestroyExecute(r ApiListsDestroyRequest) (*MessageResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MessageResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ListApiService.ListsDestroy") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/dynamic-fields/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -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 + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 ApiListsIndexRequest struct { + ctx context.Context + ApiService *ListApiService + perPage *int32 + page *int32 + scope *string + type_ *string + name *string +} + +// Set how many items returned per page +func (r ApiListsIndexRequest) PerPage(perPage int32) ApiListsIndexRequest { + r.perPage = &perPage + return r +} + +// Set the desired page number +func (r ApiListsIndexRequest) Page(page int32) ApiListsIndexRequest { + r.page = &page + return r +} + +func (r ApiListsIndexRequest) Scope(scope string) ApiListsIndexRequest { + r.scope = &scope + return r +} + +func (r ApiListsIndexRequest) Type_(type_ string) ApiListsIndexRequest { + r.type_ = &type_ + return r +} + +func (r ApiListsIndexRequest) Name(name string) ApiListsIndexRequest { + r.name = &name + return r +} + +func (r ApiListsIndexRequest) Execute() (*ListsIndex200Response, *http.Response, error) { + return r.ApiService.ListsIndexExecute(r) +} + +/* +ListsIndex Get the list of Lists + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListsIndexRequest +*/ +func (a *ListApiService) ListsIndex(ctx context.Context) ApiListsIndexRequest { + return ApiListsIndexRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return ListsIndex200Response +func (a *ListApiService) ListsIndexExecute(r ApiListsIndexRequest) (*ListsIndex200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ListsIndex200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ListApiService.ListsIndex") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/dynamic-fields" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.perPage != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "per_page", r.perPage, "") + } + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") + } + if r.scope != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "scope", r.scope, "") + } + if r.type_ != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "type", r.type_, "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") + } + // 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["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 ApiListsShowRequest struct { + ctx context.Context + ApiService *ListApiService + id string +} + +func (r ApiListsShowRequest) Execute() (*DynamicFieldData, *http.Response, error) { + return r.ApiService.ListsShowExecute(r) +} + +/* +ListsShow Get an existing List + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id + @return ApiListsShowRequest +*/ +func (a *ListApiService) ListsShow(ctx context.Context, id string) ApiListsShowRequest { + return ApiListsShowRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// @return DynamicFieldData +func (a *ListApiService) ListsShowExecute(r ApiListsShowRequest) (*DynamicFieldData, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DynamicFieldData + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ListApiService.ListsShow") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/dynamic-fields/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -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 + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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 ApiListsStoreRequest struct { + ctx context.Context + ApiService *ListApiService + dynamicField *DynamicField +} + +func (r ApiListsStoreRequest) DynamicField(dynamicField DynamicField) ApiListsStoreRequest { + r.dynamicField = &dynamicField + return r +} + +func (r ApiListsStoreRequest) Execute() (*DynamicFieldResponse, *http.Response, error) { + return r.ApiService.ListsStoreExecute(r) +} + +/* +ListsStore Store new List + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListsStoreRequest +*/ +func (a *ListApiService) ListsStore(ctx context.Context) ApiListsStoreRequest { + return ApiListsStoreRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return DynamicFieldResponse +func (a *ListApiService) ListsStoreExecute(r ApiListsStoreRequest) (*DynamicFieldResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DynamicFieldResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ListApiService.ListsStore") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/dynamic-fields" + + 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.dynamicField + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 + } + if localVarHTTPResponse.StatusCode == 422 { + var v DomainsStore422Response + 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 ApiListsUpdateRequest struct { + ctx context.Context + ApiService *ListApiService + id string + dynamicField *DynamicField +} + +func (r ApiListsUpdateRequest) DynamicField(dynamicField DynamicField) ApiListsUpdateRequest { + r.dynamicField = &dynamicField + return r +} + +func (r ApiListsUpdateRequest) Execute() (*DynamicFieldResponse, *http.Response, error) { + return r.ApiService.ListsUpdateExecute(r) +} + +/* +ListsUpdate Update an existing List + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id + @return ApiListsUpdateRequest +*/ +func (a *ListApiService) ListsUpdate(ctx context.Context, id string) ApiListsUpdateRequest { + return ApiListsUpdateRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// @return DynamicFieldResponse +func (a *ListApiService) ListsUpdateExecute(r ApiListsUpdateRequest) (*DynamicFieldResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DynamicFieldResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ListApiService.ListsUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/dynamic-fields/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -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.dynamicField + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 + } + if localVarHTTPResponse.StatusCode == 422 { + var v DomainsStore422Response + 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_load_balancing.go b/api_load_balancing.go new file mode 100644 index 0000000..a8276fc --- /dev/null +++ b/api_load_balancing.go @@ -0,0 +1,2989 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + + +// LoadBalancingApiService LoadBalancingApi service +type LoadBalancingApiService service + +type ApiLoadBalancersDestroyRequest struct { + ctx context.Context + ApiService *LoadBalancingApiService + domain string + loadBalancerId string +} + +func (r ApiLoadBalancersDestroyRequest) Execute() (*MessageResponse, *http.Response, error) { + return r.ApiService.LoadBalancersDestroyExecute(r) +} + +/* +LoadBalancersDestroy Remove a load balancer + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @param loadBalancerId ID of the load balancer + @return ApiLoadBalancersDestroyRequest +*/ +func (a *LoadBalancingApiService) LoadBalancersDestroy(ctx context.Context, domain string, loadBalancerId string) ApiLoadBalancersDestroyRequest { + return ApiLoadBalancersDestroyRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + loadBalancerId: loadBalancerId, + } +} + +// Execute executes the request +// @return MessageResponse +func (a *LoadBalancingApiService) LoadBalancersDestroyExecute(r ApiLoadBalancersDestroyRequest) (*MessageResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MessageResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LoadBalancingApiService.LoadBalancersDestroy") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/load-balancers/{loadBalancerId}" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"loadBalancerId"+"}", url.PathEscape(parameterValueToString(r.loadBalancerId, "loadBalancerId")), -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 + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 + } + if localVarHTTPResponse.StatusCode == 422 { + var v DomainsStore422Response + 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 ApiLoadBalancersIndexRequest struct { + ctx context.Context + ApiService *LoadBalancingApiService + domain string +} + +func (r ApiLoadBalancersIndexRequest) Execute() (*LoadBalancersIndex200Response, *http.Response, error) { + return r.ApiService.LoadBalancersIndexExecute(r) +} + +/* +LoadBalancersIndex Get list of load balancers + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiLoadBalancersIndexRequest +*/ +func (a *LoadBalancingApiService) LoadBalancersIndex(ctx context.Context, domain string) ApiLoadBalancersIndexRequest { + return ApiLoadBalancersIndexRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return LoadBalancersIndex200Response +func (a *LoadBalancingApiService) LoadBalancersIndexExecute(r ApiLoadBalancersIndexRequest) (*LoadBalancersIndex200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *LoadBalancersIndex200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LoadBalancingApiService.LoadBalancersIndex") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/load-balancers" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -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 + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 ApiLoadBalancersPoolsDestroyRequest struct { + ctx context.Context + ApiService *LoadBalancingApiService + domain string + loadBalancerId string + loadBalancerPoolId string +} + +func (r ApiLoadBalancersPoolsDestroyRequest) Execute() (*MessageResponse, *http.Response, error) { + return r.ApiService.LoadBalancersPoolsDestroyExecute(r) +} + +/* +LoadBalancersPoolsDestroy Remove a load balancer pool + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @param loadBalancerId ID of the load balancer + @param loadBalancerPoolId ID of a pool of the load balancer + @return ApiLoadBalancersPoolsDestroyRequest +*/ +func (a *LoadBalancingApiService) LoadBalancersPoolsDestroy(ctx context.Context, domain string, loadBalancerId string, loadBalancerPoolId string) ApiLoadBalancersPoolsDestroyRequest { + return ApiLoadBalancersPoolsDestroyRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + loadBalancerId: loadBalancerId, + loadBalancerPoolId: loadBalancerPoolId, + } +} + +// Execute executes the request +// @return MessageResponse +func (a *LoadBalancingApiService) LoadBalancersPoolsDestroyExecute(r ApiLoadBalancersPoolsDestroyRequest) (*MessageResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MessageResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LoadBalancingApiService.LoadBalancersPoolsDestroy") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/load-balancers/{loadBalancerId}/pools/{loadBalancerPoolId}" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"loadBalancerId"+"}", url.PathEscape(parameterValueToString(r.loadBalancerId, "loadBalancerId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"loadBalancerPoolId"+"}", url.PathEscape(parameterValueToString(r.loadBalancerPoolId, "loadBalancerPoolId")), -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 + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 + } + if localVarHTTPResponse.StatusCode == 422 { + var v DomainsStore422Response + 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 ApiLoadBalancersPoolsIndexRequest struct { + ctx context.Context + ApiService *LoadBalancingApiService + domain string + loadBalancerId string +} + +func (r ApiLoadBalancersPoolsIndexRequest) Execute() (*LoadBalancersPoolsIndex200Response, *http.Response, error) { + return r.ApiService.LoadBalancersPoolsIndexExecute(r) +} + +/* +LoadBalancersPoolsIndex Get the list of pools of a load balancers + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @param loadBalancerId ID of the load balancer + @return ApiLoadBalancersPoolsIndexRequest +*/ +func (a *LoadBalancingApiService) LoadBalancersPoolsIndex(ctx context.Context, domain string, loadBalancerId string) ApiLoadBalancersPoolsIndexRequest { + return ApiLoadBalancersPoolsIndexRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + loadBalancerId: loadBalancerId, + } +} + +// Execute executes the request +// @return LoadBalancersPoolsIndex200Response +func (a *LoadBalancingApiService) LoadBalancersPoolsIndexExecute(r ApiLoadBalancersPoolsIndexRequest) (*LoadBalancersPoolsIndex200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *LoadBalancersPoolsIndex200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LoadBalancingApiService.LoadBalancersPoolsIndex") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/load-balancers/{loadBalancerId}/pools" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"loadBalancerId"+"}", url.PathEscape(parameterValueToString(r.loadBalancerId, "loadBalancerId")), -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 + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 ApiLoadBalancersPoolsOriginsDestroyRequest struct { + ctx context.Context + ApiService *LoadBalancingApiService + domain string + loadBalancerId string + loadBalancerPoolId string + loadBalancerPoolOriginId string +} + +func (r ApiLoadBalancersPoolsOriginsDestroyRequest) Execute() (*MessageResponse, *http.Response, error) { + return r.ApiService.LoadBalancersPoolsOriginsDestroyExecute(r) +} + +/* +LoadBalancersPoolsOriginsDestroy Remove an origin from the pool of the load balancer + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @param loadBalancerId ID of the load balancer + @param loadBalancerPoolId ID of a pool of the load balancer + @param loadBalancerPoolOriginId ID of an origin of the pool in the load balancer + @return ApiLoadBalancersPoolsOriginsDestroyRequest +*/ +func (a *LoadBalancingApiService) LoadBalancersPoolsOriginsDestroy(ctx context.Context, domain string, loadBalancerId string, loadBalancerPoolId string, loadBalancerPoolOriginId string) ApiLoadBalancersPoolsOriginsDestroyRequest { + return ApiLoadBalancersPoolsOriginsDestroyRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + loadBalancerId: loadBalancerId, + loadBalancerPoolId: loadBalancerPoolId, + loadBalancerPoolOriginId: loadBalancerPoolOriginId, + } +} + +// Execute executes the request +// @return MessageResponse +func (a *LoadBalancingApiService) LoadBalancersPoolsOriginsDestroyExecute(r ApiLoadBalancersPoolsOriginsDestroyRequest) (*MessageResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MessageResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LoadBalancingApiService.LoadBalancersPoolsOriginsDestroy") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/load-balancers/{loadBalancerId}/pools/{loadBalancerPoolId}/origins/{loadBalancerPoolOriginId}" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"loadBalancerId"+"}", url.PathEscape(parameterValueToString(r.loadBalancerId, "loadBalancerId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"loadBalancerPoolId"+"}", url.PathEscape(parameterValueToString(r.loadBalancerPoolId, "loadBalancerPoolId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"loadBalancerPoolOriginId"+"}", url.PathEscape(parameterValueToString(r.loadBalancerPoolOriginId, "loadBalancerPoolOriginId")), -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 + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 + } + if localVarHTTPResponse.StatusCode == 422 { + var v DomainsStore422Response + 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 ApiLoadBalancersPoolsOriginsIndexRequest struct { + ctx context.Context + ApiService *LoadBalancingApiService + domain string + loadBalancerId string + loadBalancerPoolId string +} + +func (r ApiLoadBalancersPoolsOriginsIndexRequest) Execute() (*LoadBalancersPoolsOriginsIndex200Response, *http.Response, error) { + return r.ApiService.LoadBalancersPoolsOriginsIndexExecute(r) +} + +/* +LoadBalancersPoolsOriginsIndex Get list of origins of a pool + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @param loadBalancerId ID of the load balancer + @param loadBalancerPoolId ID of a pool of the load balancer + @return ApiLoadBalancersPoolsOriginsIndexRequest +*/ +func (a *LoadBalancingApiService) LoadBalancersPoolsOriginsIndex(ctx context.Context, domain string, loadBalancerId string, loadBalancerPoolId string) ApiLoadBalancersPoolsOriginsIndexRequest { + return ApiLoadBalancersPoolsOriginsIndexRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + loadBalancerId: loadBalancerId, + loadBalancerPoolId: loadBalancerPoolId, + } +} + +// Execute executes the request +// @return LoadBalancersPoolsOriginsIndex200Response +func (a *LoadBalancingApiService) LoadBalancersPoolsOriginsIndexExecute(r ApiLoadBalancersPoolsOriginsIndexRequest) (*LoadBalancersPoolsOriginsIndex200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *LoadBalancersPoolsOriginsIndex200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LoadBalancingApiService.LoadBalancersPoolsOriginsIndex") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/load-balancers/{loadBalancerId}/pools/{loadBalancerPoolId}/origins" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"loadBalancerId"+"}", url.PathEscape(parameterValueToString(r.loadBalancerId, "loadBalancerId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"loadBalancerPoolId"+"}", url.PathEscape(parameterValueToString(r.loadBalancerPoolId, "loadBalancerPoolId")), -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 + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 ApiLoadBalancersPoolsOriginsShowRequest struct { + ctx context.Context + ApiService *LoadBalancingApiService + domain string + loadBalancerId string + loadBalancerPoolId string + loadBalancerPoolOriginId string +} + +func (r ApiLoadBalancersPoolsOriginsShowRequest) Execute() (*LoadBalancerOriginData, *http.Response, error) { + return r.ApiService.LoadBalancersPoolsOriginsShowExecute(r) +} + +/* +LoadBalancersPoolsOriginsShow Get load balancer origin information + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @param loadBalancerId ID of the load balancer + @param loadBalancerPoolId ID of a pool of the load balancer + @param loadBalancerPoolOriginId ID of an origin of the pool in the load balancer + @return ApiLoadBalancersPoolsOriginsShowRequest +*/ +func (a *LoadBalancingApiService) LoadBalancersPoolsOriginsShow(ctx context.Context, domain string, loadBalancerId string, loadBalancerPoolId string, loadBalancerPoolOriginId string) ApiLoadBalancersPoolsOriginsShowRequest { + return ApiLoadBalancersPoolsOriginsShowRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + loadBalancerId: loadBalancerId, + loadBalancerPoolId: loadBalancerPoolId, + loadBalancerPoolOriginId: loadBalancerPoolOriginId, + } +} + +// Execute executes the request +// @return LoadBalancerOriginData +func (a *LoadBalancingApiService) LoadBalancersPoolsOriginsShowExecute(r ApiLoadBalancersPoolsOriginsShowRequest) (*LoadBalancerOriginData, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *LoadBalancerOriginData + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LoadBalancingApiService.LoadBalancersPoolsOriginsShow") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/load-balancers/{loadBalancerId}/pools/{loadBalancerPoolId}/origins/{loadBalancerPoolOriginId}" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"loadBalancerId"+"}", url.PathEscape(parameterValueToString(r.loadBalancerId, "loadBalancerId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"loadBalancerPoolId"+"}", url.PathEscape(parameterValueToString(r.loadBalancerPoolId, "loadBalancerPoolId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"loadBalancerPoolOriginId"+"}", url.PathEscape(parameterValueToString(r.loadBalancerPoolOriginId, "loadBalancerPoolOriginId")), -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 + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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 ApiLoadBalancersPoolsOriginsStoreRequest struct { + ctx context.Context + ApiService *LoadBalancingApiService + domain string + loadBalancerId string + loadBalancerPoolId string + loadBalancerOriginStore *LoadBalancerOriginStore +} + +func (r ApiLoadBalancersPoolsOriginsStoreRequest) LoadBalancerOriginStore(loadBalancerOriginStore LoadBalancerOriginStore) ApiLoadBalancersPoolsOriginsStoreRequest { + r.loadBalancerOriginStore = &loadBalancerOriginStore + return r +} + +func (r ApiLoadBalancersPoolsOriginsStoreRequest) Execute() (*LoadBalancerOriginResponse, *http.Response, error) { + return r.ApiService.LoadBalancersPoolsOriginsStoreExecute(r) +} + +/* +LoadBalancersPoolsOriginsStore Create a new origin in the pool of the load balancer + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @param loadBalancerId ID of the load balancer + @param loadBalancerPoolId ID of a pool of the load balancer + @return ApiLoadBalancersPoolsOriginsStoreRequest +*/ +func (a *LoadBalancingApiService) LoadBalancersPoolsOriginsStore(ctx context.Context, domain string, loadBalancerId string, loadBalancerPoolId string) ApiLoadBalancersPoolsOriginsStoreRequest { + return ApiLoadBalancersPoolsOriginsStoreRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + loadBalancerId: loadBalancerId, + loadBalancerPoolId: loadBalancerPoolId, + } +} + +// Execute executes the request +// @return LoadBalancerOriginResponse +func (a *LoadBalancingApiService) LoadBalancersPoolsOriginsStoreExecute(r ApiLoadBalancersPoolsOriginsStoreRequest) (*LoadBalancerOriginResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *LoadBalancerOriginResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LoadBalancingApiService.LoadBalancersPoolsOriginsStore") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/load-balancers/{loadBalancerId}/pools/{loadBalancerPoolId}/origins" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"loadBalancerId"+"}", url.PathEscape(parameterValueToString(r.loadBalancerId, "loadBalancerId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"loadBalancerPoolId"+"}", url.PathEscape(parameterValueToString(r.loadBalancerPoolId, "loadBalancerPoolId")), -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.loadBalancerOriginStore + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 + } + if localVarHTTPResponse.StatusCode == 422 { + var v DomainsStore422Response + 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 ApiLoadBalancersPoolsOriginsUpdateRequest struct { + ctx context.Context + ApiService *LoadBalancingApiService + domain string + loadBalancerId string + loadBalancerPoolId string + loadBalancerPoolOriginId string + loadBalancerOrigin *LoadBalancerOrigin +} + +func (r ApiLoadBalancersPoolsOriginsUpdateRequest) LoadBalancerOrigin(loadBalancerOrigin LoadBalancerOrigin) ApiLoadBalancersPoolsOriginsUpdateRequest { + r.loadBalancerOrigin = &loadBalancerOrigin + return r +} + +func (r ApiLoadBalancersPoolsOriginsUpdateRequest) Execute() (*LoadBalancerOriginResponse, *http.Response, error) { + return r.ApiService.LoadBalancersPoolsOriginsUpdateExecute(r) +} + +/* +LoadBalancersPoolsOriginsUpdate Update an existing origin of the pool + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @param loadBalancerId ID of the load balancer + @param loadBalancerPoolId ID of a pool of the load balancer + @param loadBalancerPoolOriginId ID of an origin of the pool in the load balancer + @return ApiLoadBalancersPoolsOriginsUpdateRequest +*/ +func (a *LoadBalancingApiService) LoadBalancersPoolsOriginsUpdate(ctx context.Context, domain string, loadBalancerId string, loadBalancerPoolId string, loadBalancerPoolOriginId string) ApiLoadBalancersPoolsOriginsUpdateRequest { + return ApiLoadBalancersPoolsOriginsUpdateRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + loadBalancerId: loadBalancerId, + loadBalancerPoolId: loadBalancerPoolId, + loadBalancerPoolOriginId: loadBalancerPoolOriginId, + } +} + +// Execute executes the request +// @return LoadBalancerOriginResponse +func (a *LoadBalancingApiService) LoadBalancersPoolsOriginsUpdateExecute(r ApiLoadBalancersPoolsOriginsUpdateRequest) (*LoadBalancerOriginResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *LoadBalancerOriginResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LoadBalancingApiService.LoadBalancersPoolsOriginsUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/load-balancers/{loadBalancerId}/pools/{loadBalancerPoolId}/origins/{loadBalancerPoolOriginId}" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"loadBalancerId"+"}", url.PathEscape(parameterValueToString(r.loadBalancerId, "loadBalancerId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"loadBalancerPoolId"+"}", url.PathEscape(parameterValueToString(r.loadBalancerPoolId, "loadBalancerPoolId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"loadBalancerPoolOriginId"+"}", url.PathEscape(parameterValueToString(r.loadBalancerPoolOriginId, "loadBalancerPoolOriginId")), -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.loadBalancerOrigin + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 + } + if localVarHTTPResponse.StatusCode == 422 { + var v DomainsStore422Response + 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 ApiLoadBalancersPoolsShowRequest struct { + ctx context.Context + ApiService *LoadBalancingApiService + domain string + loadBalancerId string + loadBalancerPoolId string +} + +func (r ApiLoadBalancersPoolsShowRequest) Execute() (*LoadBalancerPoolData, *http.Response, error) { + return r.ApiService.LoadBalancersPoolsShowExecute(r) +} + +/* +LoadBalancersPoolsShow Get load balancer pool information + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @param loadBalancerId ID of the load balancer + @param loadBalancerPoolId ID of a pool of the load balancer + @return ApiLoadBalancersPoolsShowRequest +*/ +func (a *LoadBalancingApiService) LoadBalancersPoolsShow(ctx context.Context, domain string, loadBalancerId string, loadBalancerPoolId string) ApiLoadBalancersPoolsShowRequest { + return ApiLoadBalancersPoolsShowRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + loadBalancerId: loadBalancerId, + loadBalancerPoolId: loadBalancerPoolId, + } +} + +// Execute executes the request +// @return LoadBalancerPoolData +func (a *LoadBalancingApiService) LoadBalancersPoolsShowExecute(r ApiLoadBalancersPoolsShowRequest) (*LoadBalancerPoolData, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *LoadBalancerPoolData + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LoadBalancingApiService.LoadBalancersPoolsShow") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/load-balancers/{loadBalancerId}/pools/{loadBalancerPoolId}" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"loadBalancerId"+"}", url.PathEscape(parameterValueToString(r.loadBalancerId, "loadBalancerId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"loadBalancerPoolId"+"}", url.PathEscape(parameterValueToString(r.loadBalancerPoolId, "loadBalancerPoolId")), -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 + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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 ApiLoadBalancersPoolsStoreRequest struct { + ctx context.Context + ApiService *LoadBalancingApiService + domain string + loadBalancerId string + loadBalancerPoolStore *LoadBalancerPoolStore +} + +func (r ApiLoadBalancersPoolsStoreRequest) LoadBalancerPoolStore(loadBalancerPoolStore LoadBalancerPoolStore) ApiLoadBalancersPoolsStoreRequest { + r.loadBalancerPoolStore = &loadBalancerPoolStore + return r +} + +func (r ApiLoadBalancersPoolsStoreRequest) Execute() (*LoadBalancerPoolResponse, *http.Response, error) { + return r.ApiService.LoadBalancersPoolsStoreExecute(r) +} + +/* +LoadBalancersPoolsStore Create a new pool for the load balancer + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @param loadBalancerId ID of the load balancer + @return ApiLoadBalancersPoolsStoreRequest +*/ +func (a *LoadBalancingApiService) LoadBalancersPoolsStore(ctx context.Context, domain string, loadBalancerId string) ApiLoadBalancersPoolsStoreRequest { + return ApiLoadBalancersPoolsStoreRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + loadBalancerId: loadBalancerId, + } +} + +// Execute executes the request +// @return LoadBalancerPoolResponse +func (a *LoadBalancingApiService) LoadBalancersPoolsStoreExecute(r ApiLoadBalancersPoolsStoreRequest) (*LoadBalancerPoolResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *LoadBalancerPoolResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LoadBalancingApiService.LoadBalancersPoolsStore") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/load-balancers/{loadBalancerId}/pools" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"loadBalancerId"+"}", url.PathEscape(parameterValueToString(r.loadBalancerId, "loadBalancerId")), -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.loadBalancerPoolStore + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 + } + if localVarHTTPResponse.StatusCode == 422 { + var v DomainsStore422Response + 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 ApiLoadBalancersPoolsUpdateRequest struct { + ctx context.Context + ApiService *LoadBalancingApiService + domain string + loadBalancerId string + loadBalancerPoolId string + loadBalancerPoolStore *LoadBalancerPoolStore +} + +func (r ApiLoadBalancersPoolsUpdateRequest) LoadBalancerPoolStore(loadBalancerPoolStore LoadBalancerPoolStore) ApiLoadBalancersPoolsUpdateRequest { + r.loadBalancerPoolStore = &loadBalancerPoolStore + return r +} + +func (r ApiLoadBalancersPoolsUpdateRequest) Execute() (*LoadBalancerPoolResponse, *http.Response, error) { + return r.ApiService.LoadBalancersPoolsUpdateExecute(r) +} + +/* +LoadBalancersPoolsUpdate Update an existing load balancer pool with origins + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @param loadBalancerId ID of the load balancer + @param loadBalancerPoolId ID of a pool of the load balancer + @return ApiLoadBalancersPoolsUpdateRequest +*/ +func (a *LoadBalancingApiService) LoadBalancersPoolsUpdate(ctx context.Context, domain string, loadBalancerId string, loadBalancerPoolId string) ApiLoadBalancersPoolsUpdateRequest { + return ApiLoadBalancersPoolsUpdateRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + loadBalancerId: loadBalancerId, + loadBalancerPoolId: loadBalancerPoolId, + } +} + +// Execute executes the request +// @return LoadBalancerPoolResponse +func (a *LoadBalancingApiService) LoadBalancersPoolsUpdateExecute(r ApiLoadBalancersPoolsUpdateRequest) (*LoadBalancerPoolResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *LoadBalancerPoolResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LoadBalancingApiService.LoadBalancersPoolsUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/load-balancers/{loadBalancerId}/pools/{loadBalancerPoolId}" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"loadBalancerId"+"}", url.PathEscape(parameterValueToString(r.loadBalancerId, "loadBalancerId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"loadBalancerPoolId"+"}", url.PathEscape(parameterValueToString(r.loadBalancerPoolId, "loadBalancerPoolId")), -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.loadBalancerPoolStore + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 + } + if localVarHTTPResponse.StatusCode == 422 { + var v DomainsStore422Response + 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 ApiLoadBalancersPoolsUpdatePoolRequest struct { + ctx context.Context + ApiService *LoadBalancingApiService + domain string + loadBalancerId string + loadBalancerPoolId string + loadBalancerPool *LoadBalancerPool +} + +func (r ApiLoadBalancersPoolsUpdatePoolRequest) LoadBalancerPool(loadBalancerPool LoadBalancerPool) ApiLoadBalancersPoolsUpdatePoolRequest { + r.loadBalancerPool = &loadBalancerPool + return r +} + +func (r ApiLoadBalancersPoolsUpdatePoolRequest) Execute() (*LoadBalancerPoolResponse, *http.Response, error) { + return r.ApiService.LoadBalancersPoolsUpdatePoolExecute(r) +} + +/* +LoadBalancersPoolsUpdatePool Update an existing load balancer pool + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @param loadBalancerId ID of the load balancer + @param loadBalancerPoolId ID of a pool of the load balancer + @return ApiLoadBalancersPoolsUpdatePoolRequest +*/ +func (a *LoadBalancingApiService) LoadBalancersPoolsUpdatePool(ctx context.Context, domain string, loadBalancerId string, loadBalancerPoolId string) ApiLoadBalancersPoolsUpdatePoolRequest { + return ApiLoadBalancersPoolsUpdatePoolRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + loadBalancerId: loadBalancerId, + loadBalancerPoolId: loadBalancerPoolId, + } +} + +// Execute executes the request +// @return LoadBalancerPoolResponse +func (a *LoadBalancingApiService) LoadBalancersPoolsUpdatePoolExecute(r ApiLoadBalancersPoolsUpdatePoolRequest) (*LoadBalancerPoolResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *LoadBalancerPoolResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LoadBalancingApiService.LoadBalancersPoolsUpdatePool") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/load-balancers/{loadBalancerId}/pools/{loadBalancerPoolId}" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"loadBalancerId"+"}", url.PathEscape(parameterValueToString(r.loadBalancerId, "loadBalancerId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"loadBalancerPoolId"+"}", url.PathEscape(parameterValueToString(r.loadBalancerPoolId, "loadBalancerPoolId")), -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.loadBalancerPool + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 + } + if localVarHTTPResponse.StatusCode == 422 { + var v DomainsStore422Response + 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 ApiLoadBalancersPrioritizePoolRequest struct { + ctx context.Context + ApiService *LoadBalancingApiService + domain string + loadBalancerId string + prioritizePool *PrioritizePool +} + +func (r ApiLoadBalancersPrioritizePoolRequest) PrioritizePool(prioritizePool PrioritizePool) ApiLoadBalancersPrioritizePoolRequest { + r.prioritizePool = &prioritizePool + return r +} + +func (r ApiLoadBalancersPrioritizePoolRequest) Execute() (*LoadBalancerResponse, *http.Response, error) { + return r.ApiService.LoadBalancersPrioritizePoolExecute(r) +} + +/* +LoadBalancersPrioritizePool Reorder the priority of load balancer pools + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @param loadBalancerId ID of the load balancer + @return ApiLoadBalancersPrioritizePoolRequest +*/ +func (a *LoadBalancingApiService) LoadBalancersPrioritizePool(ctx context.Context, domain string, loadBalancerId string) ApiLoadBalancersPrioritizePoolRequest { + return ApiLoadBalancersPrioritizePoolRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + loadBalancerId: loadBalancerId, + } +} + +// Execute executes the request +// @return LoadBalancerResponse +func (a *LoadBalancingApiService) LoadBalancersPrioritizePoolExecute(r ApiLoadBalancersPrioritizePoolRequest) (*LoadBalancerResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *LoadBalancerResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LoadBalancingApiService.LoadBalancersPrioritizePool") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/load-balancers/{loadBalancerId}/prioritize" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"loadBalancerId"+"}", url.PathEscape(parameterValueToString(r.loadBalancerId, "loadBalancerId")), -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.prioritizePool + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 + } + if localVarHTTPResponse.StatusCode == 422 { + var v DomainsStore422Response + 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 ApiLoadBalancersRegionsIndexRequest struct { + ctx context.Context + ApiService *LoadBalancingApiService +} + +func (r ApiLoadBalancersRegionsIndexRequest) Execute() (*LoadBalancersRegionsIndex200Response, *http.Response, error) { + return r.ApiService.LoadBalancersRegionsIndexExecute(r) +} + +/* +LoadBalancersRegionsIndex Get list of regions for load balancers + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiLoadBalancersRegionsIndexRequest +*/ +func (a *LoadBalancingApiService) LoadBalancersRegionsIndex(ctx context.Context) ApiLoadBalancersRegionsIndexRequest { + return ApiLoadBalancersRegionsIndexRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return LoadBalancersRegionsIndex200Response +func (a *LoadBalancingApiService) LoadBalancersRegionsIndexExecute(r ApiLoadBalancersRegionsIndexRequest) (*LoadBalancersRegionsIndex200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *LoadBalancersRegionsIndex200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LoadBalancingApiService.LoadBalancersRegionsIndex") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/load-balancers/regions" + + 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["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 ApiLoadBalancersSettingsShowRequest struct { + ctx context.Context + ApiService *LoadBalancingApiService + domain string +} + +func (r ApiLoadBalancersSettingsShowRequest) Execute() (*LoadBalancerSettingsData, *http.Response, error) { + return r.ApiService.LoadBalancersSettingsShowExecute(r) +} + +/* +LoadBalancersSettingsShow Get list of domain load balancer global settings + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiLoadBalancersSettingsShowRequest +*/ +func (a *LoadBalancingApiService) LoadBalancersSettingsShow(ctx context.Context, domain string) ApiLoadBalancersSettingsShowRequest { + return ApiLoadBalancersSettingsShowRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return LoadBalancerSettingsData +func (a *LoadBalancingApiService) LoadBalancersSettingsShowExecute(r ApiLoadBalancersSettingsShowRequest) (*LoadBalancerSettingsData, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *LoadBalancerSettingsData + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LoadBalancingApiService.LoadBalancersSettingsShow") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/load-balancers/settings" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -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 + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 ApiLoadBalancersSettingsUpdateRequest struct { + ctx context.Context + ApiService *LoadBalancingApiService + domain string + loadBalancerSetting *LoadBalancerSetting +} + +func (r ApiLoadBalancersSettingsUpdateRequest) LoadBalancerSetting(loadBalancerSetting LoadBalancerSetting) ApiLoadBalancersSettingsUpdateRequest { + r.loadBalancerSetting = &loadBalancerSetting + return r +} + +func (r ApiLoadBalancersSettingsUpdateRequest) Execute() (*LoadBalancersSettingsUpdate200Response, *http.Response, error) { + return r.ApiService.LoadBalancersSettingsUpdateExecute(r) +} + +/* +LoadBalancersSettingsUpdate Update domain's global load balancer settings + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiLoadBalancersSettingsUpdateRequest +*/ +func (a *LoadBalancingApiService) LoadBalancersSettingsUpdate(ctx context.Context, domain string) ApiLoadBalancersSettingsUpdateRequest { + return ApiLoadBalancersSettingsUpdateRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return LoadBalancersSettingsUpdate200Response +func (a *LoadBalancingApiService) LoadBalancersSettingsUpdateExecute(r ApiLoadBalancersSettingsUpdateRequest) (*LoadBalancersSettingsUpdate200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *LoadBalancersSettingsUpdate200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LoadBalancingApiService.LoadBalancersSettingsUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/load-balancers/settings" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -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.loadBalancerSetting + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 + } + if localVarHTTPResponse.StatusCode == 422 { + var v DomainsStore422Response + 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 ApiLoadBalancersShowRequest struct { + ctx context.Context + ApiService *LoadBalancingApiService + domain string + loadBalancerId string +} + +func (r ApiLoadBalancersShowRequest) Execute() (*LoadBalancerData, *http.Response, error) { + return r.ApiService.LoadBalancersShowExecute(r) +} + +/* +LoadBalancersShow Get load balancer information + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @param loadBalancerId ID of the load balancer + @return ApiLoadBalancersShowRequest +*/ +func (a *LoadBalancingApiService) LoadBalancersShow(ctx context.Context, domain string, loadBalancerId string) ApiLoadBalancersShowRequest { + return ApiLoadBalancersShowRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + loadBalancerId: loadBalancerId, + } +} + +// Execute executes the request +// @return LoadBalancerData +func (a *LoadBalancingApiService) LoadBalancersShowExecute(r ApiLoadBalancersShowRequest) (*LoadBalancerData, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *LoadBalancerData + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LoadBalancingApiService.LoadBalancersShow") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/load-balancers/{loadBalancerId}" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"loadBalancerId"+"}", url.PathEscape(parameterValueToString(r.loadBalancerId, "loadBalancerId")), -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 + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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 ApiLoadBalancersStoreRequest struct { + ctx context.Context + ApiService *LoadBalancingApiService + domain string + loadBalancerStore *LoadBalancerStore +} + +func (r ApiLoadBalancersStoreRequest) LoadBalancerStore(loadBalancerStore LoadBalancerStore) ApiLoadBalancersStoreRequest { + r.loadBalancerStore = &loadBalancerStore + return r +} + +func (r ApiLoadBalancersStoreRequest) Execute() (*LoadBalancerResponse, *http.Response, error) { + return r.ApiService.LoadBalancersStoreExecute(r) +} + +/* +LoadBalancersStore Create a new load balancer + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiLoadBalancersStoreRequest +*/ +func (a *LoadBalancingApiService) LoadBalancersStore(ctx context.Context, domain string) ApiLoadBalancersStoreRequest { + return ApiLoadBalancersStoreRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return LoadBalancerResponse +func (a *LoadBalancingApiService) LoadBalancersStoreExecute(r ApiLoadBalancersStoreRequest) (*LoadBalancerResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *LoadBalancerResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LoadBalancingApiService.LoadBalancersStore") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/load-balancers" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -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.loadBalancerStore + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 + } + if localVarHTTPResponse.StatusCode == 422 { + var v DomainsStore422Response + 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 ApiLoadBalancersUpdateRequest struct { + ctx context.Context + ApiService *LoadBalancingApiService + domain string + loadBalancerId string + loadBalancer *LoadBalancer +} + +func (r ApiLoadBalancersUpdateRequest) LoadBalancer(loadBalancer LoadBalancer) ApiLoadBalancersUpdateRequest { + r.loadBalancer = &loadBalancer + return r +} + +func (r ApiLoadBalancersUpdateRequest) Execute() (*LoadBalancerResponse, *http.Response, error) { + return r.ApiService.LoadBalancersUpdateExecute(r) +} + +/* +LoadBalancersUpdate Update a load balancer + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @param loadBalancerId ID of the load balancer + @return ApiLoadBalancersUpdateRequest +*/ +func (a *LoadBalancingApiService) LoadBalancersUpdate(ctx context.Context, domain string, loadBalancerId string) ApiLoadBalancersUpdateRequest { + return ApiLoadBalancersUpdateRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + loadBalancerId: loadBalancerId, + } +} + +// Execute executes the request +// @return LoadBalancerResponse +func (a *LoadBalancingApiService) LoadBalancersUpdateExecute(r ApiLoadBalancersUpdateRequest) (*LoadBalancerResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *LoadBalancerResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LoadBalancingApiService.LoadBalancersUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/load-balancers/{loadBalancerId}" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"loadBalancerId"+"}", url.PathEscape(parameterValueToString(r.loadBalancerId, "loadBalancerId")), -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.loadBalancer + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 + } + if localVarHTTPResponse.StatusCode == 422 { + var v DomainsStore422Response + 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_log_forwarders.go b/api_log_forwarders.go new file mode 100644 index 0000000..6e49fd6 --- /dev/null +++ b/api_log_forwarders.go @@ -0,0 +1,923 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + + +// LogForwardersApiService LogForwardersApi service +type LogForwardersApiService service + +type ApiLogForwardersDestroyRequest struct { + ctx context.Context + ApiService *LogForwardersApiService + domain string + logForwarderId string +} + +func (r ApiLogForwardersDestroyRequest) Execute() (*MessageResponse, *http.Response, error) { + return r.ApiService.LogForwardersDestroyExecute(r) +} + +/* +LogForwardersDestroy delete a log forwarder + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @param logForwarderId Log Forwarder Id + @return ApiLogForwardersDestroyRequest +*/ +func (a *LogForwardersApiService) LogForwardersDestroy(ctx context.Context, domain string, logForwarderId string) ApiLogForwardersDestroyRequest { + return ApiLogForwardersDestroyRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + logForwarderId: logForwarderId, + } +} + +// Execute executes the request +// @return MessageResponse +func (a *LogForwardersApiService) LogForwardersDestroyExecute(r ApiLogForwardersDestroyRequest) (*MessageResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MessageResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LogForwardersApiService.LogForwardersDestroy") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/log-forwarders/{logForwarderId}" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"logForwarderId"+"}", url.PathEscape(parameterValueToString(r.logForwarderId, "logForwarderId")), -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 + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 403 { + var v MessageResponse + 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 ApiLogForwardersIndexRequest struct { + ctx context.Context + ApiService *LogForwardersApiService + domain string + perPage *int32 + page *int32 +} + +// Set how many items returned per page +func (r ApiLogForwardersIndexRequest) PerPage(perPage int32) ApiLogForwardersIndexRequest { + r.perPage = &perPage + return r +} + +// Set the desired page number +func (r ApiLogForwardersIndexRequest) Page(page int32) ApiLogForwardersIndexRequest { + r.page = &page + return r +} + +func (r ApiLogForwardersIndexRequest) Execute() (*LogForwardersIndex200Response, *http.Response, error) { + return r.ApiService.LogForwardersIndexExecute(r) +} + +/* +LogForwardersIndex Show list of log forwarders for given domain + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiLogForwardersIndexRequest +*/ +func (a *LogForwardersApiService) LogForwardersIndex(ctx context.Context, domain string) ApiLogForwardersIndexRequest { + return ApiLogForwardersIndexRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return LogForwardersIndex200Response +func (a *LogForwardersApiService) LogForwardersIndexExecute(r ApiLogForwardersIndexRequest) (*LogForwardersIndex200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *LogForwardersIndex200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LogForwardersApiService.LogForwardersIndex") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/log-forwarders" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.perPage != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "per_page", r.perPage, "") + } + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") + } + // 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["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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 ApiLogForwardersShowRequest struct { + ctx context.Context + ApiService *LogForwardersApiService + domain string + logForwarderId string +} + +func (r ApiLogForwardersShowRequest) Execute() (*LogForwarderResponse, *http.Response, error) { + return r.ApiService.LogForwardersShowExecute(r) +} + +/* +LogForwardersShow Show a log forwarder's details based on given id + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @param logForwarderId Log Forwarder Id + @return ApiLogForwardersShowRequest +*/ +func (a *LogForwardersApiService) LogForwardersShow(ctx context.Context, domain string, logForwarderId string) ApiLogForwardersShowRequest { + return ApiLogForwardersShowRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + logForwarderId: logForwarderId, + } +} + +// Execute executes the request +// @return LogForwarderResponse +func (a *LogForwardersApiService) LogForwardersShowExecute(r ApiLogForwardersShowRequest) (*LogForwarderResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *LogForwarderResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LogForwardersApiService.LogForwardersShow") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/log-forwarders/{logForwarderId}" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"logForwarderId"+"}", url.PathEscape(parameterValueToString(r.logForwarderId, "logForwarderId")), -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 + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 403 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 ApiLogForwardersStoreRequest struct { + ctx context.Context + ApiService *LogForwardersApiService + domain string + logForwarder *LogForwarder +} + +func (r ApiLogForwardersStoreRequest) LogForwarder(logForwarder LogForwarder) ApiLogForwardersStoreRequest { + r.logForwarder = &logForwarder + return r +} + +func (r ApiLogForwardersStoreRequest) Execute() (*LogForwarderResponse, *http.Response, error) { + return r.ApiService.LogForwardersStoreExecute(r) +} + +/* +LogForwardersStore Create new log forwarder + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiLogForwardersStoreRequest +*/ +func (a *LogForwardersApiService) LogForwardersStore(ctx context.Context, domain string) ApiLogForwardersStoreRequest { + return ApiLogForwardersStoreRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return LogForwarderResponse +func (a *LogForwardersApiService) LogForwardersStoreExecute(r ApiLogForwardersStoreRequest) (*LogForwarderResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *LogForwarderResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LogForwardersApiService.LogForwardersStore") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/log-forwarders" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -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.logForwarder + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 + } + if localVarHTTPResponse.StatusCode == 422 { + var v DomainsStore422Response + 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 ApiLogForwardersUpdateRequest struct { + ctx context.Context + ApiService *LogForwardersApiService + domain string + logForwarderId string + logForwarder *LogForwarder +} + +func (r ApiLogForwardersUpdateRequest) LogForwarder(logForwarder LogForwarder) ApiLogForwardersUpdateRequest { + r.logForwarder = &logForwarder + return r +} + +func (r ApiLogForwardersUpdateRequest) Execute() (*LogForwarderResponse, *http.Response, error) { + return r.ApiService.LogForwardersUpdateExecute(r) +} + +/* +LogForwardersUpdate Update a log forwarder + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @param logForwarderId Log Forwarder Id + @return ApiLogForwardersUpdateRequest +*/ +func (a *LogForwardersApiService) LogForwardersUpdate(ctx context.Context, domain string, logForwarderId string) ApiLogForwardersUpdateRequest { + return ApiLogForwardersUpdateRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + logForwarderId: logForwarderId, + } +} + +// Execute executes the request +// @return LogForwarderResponse +func (a *LogForwardersApiService) LogForwardersUpdateExecute(r ApiLogForwardersUpdateRequest) (*LogForwarderResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *LogForwarderResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LogForwardersApiService.LogForwardersUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/log-forwarders/{logForwarderId}" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"logForwarderId"+"}", url.PathEscape(parameterValueToString(r.logForwarderId, "logForwarderId")), -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.logForwarder + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 403 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 422 { + var v DomainsStore422Response + 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 ApiLogForwardersUpdateStatusRequest struct { + ctx context.Context + ApiService *LogForwardersApiService + domain string + logForwarderId string + updateBooleanStatus *UpdateBooleanStatus +} + +func (r ApiLogForwardersUpdateStatusRequest) UpdateBooleanStatus(updateBooleanStatus UpdateBooleanStatus) ApiLogForwardersUpdateStatusRequest { + r.updateBooleanStatus = &updateBooleanStatus + return r +} + +func (r ApiLogForwardersUpdateStatusRequest) Execute() (*LogForwarderResponse, *http.Response, error) { + return r.ApiService.LogForwardersUpdateStatusExecute(r) +} + +/* +LogForwardersUpdateStatus Update a log forwarder's status + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @param logForwarderId Log Forwarder Id + @return ApiLogForwardersUpdateStatusRequest +*/ +func (a *LogForwardersApiService) LogForwardersUpdateStatus(ctx context.Context, domain string, logForwarderId string) ApiLogForwardersUpdateStatusRequest { + return ApiLogForwardersUpdateStatusRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + logForwarderId: logForwarderId, + } +} + +// Execute executes the request +// @return LogForwarderResponse +func (a *LogForwardersApiService) LogForwardersUpdateStatusExecute(r ApiLogForwardersUpdateStatusRequest) (*LogForwarderResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *LogForwarderResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LogForwardersApiService.LogForwardersUpdateStatus") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/log-forwarders/{logForwarderId}/status" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"logForwarderId"+"}", url.PathEscape(parameterValueToString(r.logForwarderId, "logForwarderId")), -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.updateBooleanStatus + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 403 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 422 { + var v DomainsStore422Response + 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_page_rule.go b/api_page_rule.go new file mode 100644 index 0000000..f919f37 --- /dev/null +++ b/api_page_rule.go @@ -0,0 +1,1403 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + + +// PageRuleApiService PageRuleApi service +type PageRuleApiService service + +type ApiPageRulesDestroyRequest struct { + ctx context.Context + ApiService *PageRuleApiService + domain string + id string +} + +func (r ApiPageRulesDestroyRequest) Execute() (*MessageResponse, *http.Response, error) { + return r.ApiService.PageRulesDestroyExecute(r) +} + +/* +PageRulesDestroy Delete the page-rule + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @param id + @return ApiPageRulesDestroyRequest +*/ +func (a *PageRuleApiService) PageRulesDestroy(ctx context.Context, domain string, id string) ApiPageRulesDestroyRequest { + return ApiPageRulesDestroyRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + id: id, + } +} + +// Execute executes the request +// @return MessageResponse +func (a *PageRuleApiService) PageRulesDestroyExecute(r ApiPageRulesDestroyRequest) (*MessageResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MessageResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PageRuleApiService.PageRulesDestroy") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/page-rules/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -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 + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 ApiPageRulesDiffShowRequest struct { + ctx context.Context + ApiService *PageRuleApiService + domain string + id string +} + +func (r ApiPageRulesDiffShowRequest) Execute() (*PageRuleDiffData, *http.Response, error) { + return r.ApiService.PageRulesDiffShowExecute(r) +} + +/* +PageRulesDiffShow Get the page-rule's exceptions + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @param id + @return ApiPageRulesDiffShowRequest +*/ +func (a *PageRuleApiService) PageRulesDiffShow(ctx context.Context, domain string, id string) ApiPageRulesDiffShowRequest { + return ApiPageRulesDiffShowRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + id: id, + } +} + +// Execute executes the request +// @return PageRuleDiffData +func (a *PageRuleApiService) PageRulesDiffShowExecute(r ApiPageRulesDiffShowRequest) (*PageRuleDiffData, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PageRuleDiffData + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PageRuleApiService.PageRulesDiffShow") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/page-rules/{id}/diff" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -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 + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 ApiPageRulesDiffUpdateRequest struct { + ctx context.Context + ApiService *PageRuleApiService + domain string + id string + pageRule *PageRule +} + +func (r ApiPageRulesDiffUpdateRequest) PageRule(pageRule PageRule) ApiPageRulesDiffUpdateRequest { + r.pageRule = &pageRule + return r +} + +func (r ApiPageRulesDiffUpdateRequest) Execute() (*PageRulesDiffUpdate200Response, *http.Response, error) { + return r.ApiService.PageRulesDiffUpdateExecute(r) +} + +/* +PageRulesDiffUpdate Update the page-rule's exceptions + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @param id + @return ApiPageRulesDiffUpdateRequest +*/ +func (a *PageRuleApiService) PageRulesDiffUpdate(ctx context.Context, domain string, id string) ApiPageRulesDiffUpdateRequest { + return ApiPageRulesDiffUpdateRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + id: id, + } +} + +// Execute executes the request +// @return PageRulesDiffUpdate200Response +func (a *PageRuleApiService) PageRulesDiffUpdateExecute(r ApiPageRulesDiffUpdateRequest) (*PageRulesDiffUpdate200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PageRulesDiffUpdate200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PageRuleApiService.PageRulesDiffUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/page-rules/{id}/diff" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -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.pageRule + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 + } + if localVarHTTPResponse.StatusCode == 422 { + var v DomainsStore422Response + 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 ApiPageRulesIndexRequest struct { + ctx context.Context + ApiService *PageRuleApiService + domain string + search *string + perPage *int32 + page *int32 + order *string +} + +// Search term +func (r ApiPageRulesIndexRequest) Search(search string) ApiPageRulesIndexRequest { + r.search = &search + return r +} + +// Set how many items returned per page +func (r ApiPageRulesIndexRequest) PerPage(perPage int32) ApiPageRulesIndexRequest { + r.perPage = &perPage + return r +} + +// Set the desired page number +func (r ApiPageRulesIndexRequest) Page(page int32) ApiPageRulesIndexRequest { + r.page = &page + return r +} + +// Sort page rules in ascending or descending order base on seq +func (r ApiPageRulesIndexRequest) Order(order string) ApiPageRulesIndexRequest { + r.order = &order + return r +} + +func (r ApiPageRulesIndexRequest) Execute() (*PageRulesIndex200Response, *http.Response, error) { + return r.ApiService.PageRulesIndexExecute(r) +} + +/* +PageRulesIndex Get list of page-rules + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiPageRulesIndexRequest +*/ +func (a *PageRuleApiService) PageRulesIndex(ctx context.Context, domain string) ApiPageRulesIndexRequest { + return ApiPageRulesIndexRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return PageRulesIndex200Response +func (a *PageRuleApiService) PageRulesIndexExecute(r ApiPageRulesIndexRequest) (*PageRulesIndex200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PageRulesIndex200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PageRuleApiService.PageRulesIndex") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/page-rules" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") + } + if r.perPage != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "per_page", r.perPage, "") + } + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") + } + if r.order != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "order", r.order, "") + } + // 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["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 ApiPageRulesPurgeRequest struct { + ctx context.Context + ApiService *PageRuleApiService + domain string + id string +} + +func (r ApiPageRulesPurgeRequest) Execute() (*MessageResponse, *http.Response, error) { + return r.ApiService.PageRulesPurgeExecute(r) +} + +/* +PageRulesPurge Purge the page-rule + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @param id + @return ApiPageRulesPurgeRequest +*/ +func (a *PageRuleApiService) PageRulesPurge(ctx context.Context, domain string, id string) ApiPageRulesPurgeRequest { + return ApiPageRulesPurgeRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + id: id, + } +} + +// Execute executes the request +// @return MessageResponse +func (a *PageRuleApiService) PageRulesPurgeExecute(r ApiPageRulesPurgeRequest) (*MessageResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MessageResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PageRuleApiService.PageRulesPurge") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/page-rules/{id}/purge" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -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 + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 + } + if localVarHTTPResponse.StatusCode == 422 { + var v DomainsStore422Response + 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 ApiPageRulesShowRequest struct { + ctx context.Context + ApiService *PageRuleApiService + domain string + id string +} + +func (r ApiPageRulesShowRequest) Execute() (*PageRuleData, *http.Response, error) { + return r.ApiService.PageRulesShowExecute(r) +} + +/* +PageRulesShow Get the page-rule's information + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @param id + @return ApiPageRulesShowRequest +*/ +func (a *PageRuleApiService) PageRulesShow(ctx context.Context, domain string, id string) ApiPageRulesShowRequest { + return ApiPageRulesShowRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + id: id, + } +} + +// Execute executes the request +// @return PageRuleData +func (a *PageRuleApiService) PageRulesShowExecute(r ApiPageRulesShowRequest) (*PageRuleData, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PageRuleData + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PageRuleApiService.PageRulesShow") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/page-rules/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -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 + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 ApiPageRulesStatusUpdateRequest struct { + ctx context.Context + ApiService *PageRuleApiService + domain string + id string + updateBooleanStatus *UpdateBooleanStatus +} + +func (r ApiPageRulesStatusUpdateRequest) UpdateBooleanStatus(updateBooleanStatus UpdateBooleanStatus) ApiPageRulesStatusUpdateRequest { + r.updateBooleanStatus = &updateBooleanStatus + return r +} + +func (r ApiPageRulesStatusUpdateRequest) Execute() (*MessageResponse, *http.Response, error) { + return r.ApiService.PageRulesStatusUpdateExecute(r) +} + +/* +PageRulesStatusUpdate Toggle status of the page-rule + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @param id + @return ApiPageRulesStatusUpdateRequest +*/ +func (a *PageRuleApiService) PageRulesStatusUpdate(ctx context.Context, domain string, id string) ApiPageRulesStatusUpdateRequest { + return ApiPageRulesStatusUpdateRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + id: id, + } +} + +// Execute executes the request +// @return MessageResponse +func (a *PageRuleApiService) PageRulesStatusUpdateExecute(r ApiPageRulesStatusUpdateRequest) (*MessageResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MessageResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PageRuleApiService.PageRulesStatusUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/page-rules/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -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.updateBooleanStatus + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 + } + if localVarHTTPResponse.StatusCode == 422 { + var v DomainsStore422Response + 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 ApiPageRulesStoreRequest struct { + ctx context.Context + ApiService *PageRuleApiService + domain string + pageRule *PageRule +} + +func (r ApiPageRulesStoreRequest) PageRule(pageRule PageRule) ApiPageRulesStoreRequest { + r.pageRule = &pageRule + return r +} + +func (r ApiPageRulesStoreRequest) Execute() (*PageRuleResponse, *http.Response, error) { + return r.ApiService.PageRulesStoreExecute(r) +} + +/* +PageRulesStore Create new page-rule + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiPageRulesStoreRequest +*/ +func (a *PageRuleApiService) PageRulesStore(ctx context.Context, domain string) ApiPageRulesStoreRequest { + return ApiPageRulesStoreRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return PageRuleResponse +func (a *PageRuleApiService) PageRulesStoreExecute(r ApiPageRulesStoreRequest) (*PageRuleResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PageRuleResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PageRuleApiService.PageRulesStore") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/page-rules" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -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.pageRule + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 + } + if localVarHTTPResponse.StatusCode == 422 { + var v DomainsStore422Response + 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 ApiPageRulesUpdateRequest struct { + ctx context.Context + ApiService *PageRuleApiService + domain string + id string + pageRule *PageRule +} + +func (r ApiPageRulesUpdateRequest) PageRule(pageRule PageRule) ApiPageRulesUpdateRequest { + r.pageRule = &pageRule + return r +} + +func (r ApiPageRulesUpdateRequest) Execute() (*PageRuleResponse, *http.Response, error) { + return r.ApiService.PageRulesUpdateExecute(r) +} + +/* +PageRulesUpdate Update the page-rule + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @param id + @return ApiPageRulesUpdateRequest +*/ +func (a *PageRuleApiService) PageRulesUpdate(ctx context.Context, domain string, id string) ApiPageRulesUpdateRequest { + return ApiPageRulesUpdateRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + id: id, + } +} + +// Execute executes the request +// @return PageRuleResponse +func (a *PageRuleApiService) PageRulesUpdateExecute(r ApiPageRulesUpdateRequest) (*PageRuleResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PageRuleResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PageRuleApiService.PageRulesUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/page-rules/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -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.pageRule + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 + } + if localVarHTTPResponse.StatusCode == 422 { + var v DomainsStore422Response + 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_plan.go b/api_plan.go new file mode 100644 index 0000000..845b96c --- /dev/null +++ b/api_plan.go @@ -0,0 +1,716 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + + +// PlanApiService PlanApi service +type PlanApiService service + +type ApiDomainsPlansRequest struct { + ctx context.Context + ApiService *PlanApiService + domain string + ignoredPlans *string +} + +// Comma separaterd plan levels to ignore +func (r ApiDomainsPlansRequest) IgnoredPlans(ignoredPlans string) ApiDomainsPlansRequest { + r.ignoredPlans = &ignoredPlans + return r +} + +func (r ApiDomainsPlansRequest) Execute() (*PlanResponse, *http.Response, error) { + return r.ApiService.DomainsPlansExecute(r) +} + +/* +DomainsPlans Get the list of feature defintions for plans based on different sets + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiDomainsPlansRequest +*/ +func (a *PlanApiService) DomainsPlans(ctx context.Context, domain string) ApiDomainsPlansRequest { + return ApiDomainsPlansRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return PlanResponse +func (a *PlanApiService) DomainsPlansExecute(r ApiDomainsPlansRequest) (*PlanResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PlanResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PlanApiService.DomainsPlans") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/plans" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.ignoredPlans != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ignored_plans", r.ignoredPlans, "") + } + // 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["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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 ApiDomainsPlansUpdateRequest struct { + ctx context.Context + ApiService *PlanApiService + domain string + planUpdate *PlanUpdate +} + +func (r ApiDomainsPlansUpdateRequest) PlanUpdate(planUpdate PlanUpdate) ApiDomainsPlansUpdateRequest { + r.planUpdate = &planUpdate + return r +} + +func (r ApiDomainsPlansUpdateRequest) Execute() (*MessageResponse, *http.Response, error) { + return r.ApiService.DomainsPlansUpdateExecute(r) +} + +/* +DomainsPlansUpdate Update the domain's plan + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiDomainsPlansUpdateRequest +*/ +func (a *PlanApiService) DomainsPlansUpdate(ctx context.Context, domain string) ApiDomainsPlansUpdateRequest { + return ApiDomainsPlansUpdateRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return MessageResponse +func (a *PlanApiService) DomainsPlansUpdateExecute(r ApiDomainsPlansUpdateRequest) (*MessageResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MessageResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PlanApiService.DomainsPlansUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/plan" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -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.planUpdate + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 + } + if localVarHTTPResponse.StatusCode == 422 { + var v DomainsStore422Response + 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 ApiDomainsPlansUsagesRequest struct { + ctx context.Context + ApiService *PlanApiService + domain string + targetPlan *int32 +} + +func (r ApiDomainsPlansUsagesRequest) TargetPlan(targetPlan int32) ApiDomainsPlansUsagesRequest { + r.targetPlan = &targetPlan + return r +} + +func (r ApiDomainsPlansUsagesRequest) Execute() (*DomainsPlansUsages200Response, *http.Response, error) { + return r.ApiService.DomainsPlansUsagesExecute(r) +} + +/* +DomainsPlansUsages Get usages based on features and an estimated cost + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiDomainsPlansUsagesRequest +*/ +func (a *PlanApiService) DomainsPlansUsages(ctx context.Context, domain string) ApiDomainsPlansUsagesRequest { + return ApiDomainsPlansUsagesRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return DomainsPlansUsages200Response +func (a *PlanApiService) DomainsPlansUsagesExecute(r ApiDomainsPlansUsagesRequest) (*DomainsPlansUsages200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DomainsPlansUsages200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PlanApiService.DomainsPlansUsages") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/plan/usages" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.targetPlan != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "target_plan", r.targetPlan, "") + } + // 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["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 ApiDomainsPlansViolationsRequest struct { + ctx context.Context + ApiService *PlanApiService + domain string +} + +func (r ApiDomainsPlansViolationsRequest) Execute() (*DomainsPlansViolations200Response, *http.Response, error) { + return r.ApiService.DomainsPlansViolationsExecute(r) +} + +/* +DomainsPlansViolations Get violations based on plans + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiDomainsPlansViolationsRequest +*/ +func (a *PlanApiService) DomainsPlansViolations(ctx context.Context, domain string) ApiDomainsPlansViolationsRequest { + return ApiDomainsPlansViolationsRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return DomainsPlansViolations200Response +func (a *PlanApiService) DomainsPlansViolationsExecute(r ApiDomainsPlansViolationsRequest) (*DomainsPlansViolations200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DomainsPlansViolations200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PlanApiService.DomainsPlansViolations") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/plan/violations" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -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 + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 ApiPlansIndexRequest struct { + ctx context.Context + ApiService *PlanApiService + domain *PlansIndexDomainParameter + ignoredPlans *string +} + +// Domain name or id +func (r ApiPlansIndexRequest) Domain(domain PlansIndexDomainParameter) ApiPlansIndexRequest { + r.domain = &domain + return r +} + +// Comma separaterd plan levels to ignore +func (r ApiPlansIndexRequest) IgnoredPlans(ignoredPlans string) ApiPlansIndexRequest { + r.ignoredPlans = &ignoredPlans + return r +} + +func (r ApiPlansIndexRequest) Execute() (*PlanResponse, *http.Response, error) { + return r.ApiService.PlansIndexExecute(r) +} + +/* +PlansIndex Get the list of feature defintions for plans based on different sets + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiPlansIndexRequest +*/ +func (a *PlanApiService) PlansIndex(ctx context.Context) ApiPlansIndexRequest { + return ApiPlansIndexRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PlanResponse +func (a *PlanApiService) PlansIndexExecute(r ApiPlansIndexRequest) (*PlanResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PlanResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PlanApiService.PlansIndex") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/plans" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.domain != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "domain", r.domain, "") + } + if r.ignoredPlans != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ignored_plans", r.ignoredPlans, "") + } + // 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["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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 +} diff --git a/api_rate_limiting.go b/api_rate_limiting.go new file mode 100644 index 0000000..5851f12 --- /dev/null +++ b/api_rate_limiting.go @@ -0,0 +1,1461 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + + +// RateLimitingApiService RateLimitingApi service +type RateLimitingApiService service + +type ApiRateLimitingIndexRequest struct { + ctx context.Context + ApiService *RateLimitingApiService + domain string +} + +func (r ApiRateLimitingIndexRequest) Execute() (*RateLimitData, *http.Response, error) { + return r.ApiService.RateLimitingIndexExecute(r) +} + +/* +RateLimitingIndex Get Rate-Limit settings + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiRateLimitingIndexRequest + +Deprecated +*/ +func (a *RateLimitingApiService) RateLimitingIndex(ctx context.Context, domain string) ApiRateLimitingIndexRequest { + return ApiRateLimitingIndexRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return RateLimitData +// Deprecated +func (a *RateLimitingApiService) RateLimitingIndexExecute(r ApiRateLimitingIndexRequest) (*RateLimitData, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *RateLimitData + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RateLimitingApiService.RateLimitingIndex") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/rate-limit" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -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 + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 ApiRateLimitingReprioritizeRequest struct { + ctx context.Context + ApiService *RateLimitingApiService + domain string + reprioritizeRuleRequest *ReprioritizeRuleRequest +} + +func (r ApiRateLimitingReprioritizeRequest) ReprioritizeRuleRequest(reprioritizeRuleRequest ReprioritizeRuleRequest) ApiRateLimitingReprioritizeRequest { + r.reprioritizeRuleRequest = &reprioritizeRuleRequest + return r +} + +func (r ApiRateLimitingReprioritizeRequest) Execute() (*MessageResponse, *http.Response, error) { + return r.ApiService.RateLimitingReprioritizeExecute(r) +} + +/* +RateLimitingReprioritize Change priority of Rate limiting's rules + +You can choose a rule and request to put it after or before another rule. +You should only provide either after_rule_id or before_rule_id (and not both of them). + + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiRateLimitingReprioritizeRequest +*/ +func (a *RateLimitingApiService) RateLimitingReprioritize(ctx context.Context, domain string) ApiRateLimitingReprioritizeRequest { + return ApiRateLimitingReprioritizeRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return MessageResponse +func (a *RateLimitingApiService) RateLimitingReprioritizeExecute(r ApiRateLimitingReprioritizeRequest) (*MessageResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MessageResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RateLimitingApiService.RateLimitingReprioritize") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/rate-limit/actions/reprioritize" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -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.reprioritizeRuleRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 ApiRateLimitingRulesDestroyRequest struct { + ctx context.Context + ApiService *RateLimitingApiService + domain string + id string +} + +func (r ApiRateLimitingRulesDestroyRequest) Execute() (*MessageResponse, *http.Response, error) { + return r.ApiService.RateLimitingRulesDestroyExecute(r) +} + +/* +RateLimitingRulesDestroy Delete Rate limiting's rule + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @param id + @return ApiRateLimitingRulesDestroyRequest +*/ +func (a *RateLimitingApiService) RateLimitingRulesDestroy(ctx context.Context, domain string, id string) ApiRateLimitingRulesDestroyRequest { + return ApiRateLimitingRulesDestroyRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + id: id, + } +} + +// Execute executes the request +// @return MessageResponse +func (a *RateLimitingApiService) RateLimitingRulesDestroyExecute(r ApiRateLimitingRulesDestroyRequest) (*MessageResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MessageResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RateLimitingApiService.RateLimitingRulesDestroy") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/rate-limit/rules/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -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 + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 ApiRateLimitingRulesIndexRequest struct { + ctx context.Context + ApiService *RateLimitingApiService + domain string + perPage *int32 + orderBy *string + orderType *string + search *string +} + +func (r ApiRateLimitingRulesIndexRequest) PerPage(perPage int32) ApiRateLimitingRulesIndexRequest { + r.perPage = &perPage + return r +} + +func (r ApiRateLimitingRulesIndexRequest) OrderBy(orderBy string) ApiRateLimitingRulesIndexRequest { + r.orderBy = &orderBy + return r +} + +func (r ApiRateLimitingRulesIndexRequest) OrderType(orderType string) ApiRateLimitingRulesIndexRequest { + r.orderType = &orderType + return r +} + +func (r ApiRateLimitingRulesIndexRequest) Search(search string) ApiRateLimitingRulesIndexRequest { + r.search = &search + return r +} + +func (r ApiRateLimitingRulesIndexRequest) Execute() (*RateLimitingRulesIndex200Response, *http.Response, error) { + return r.ApiService.RateLimitingRulesIndexExecute(r) +} + +/* +RateLimitingRulesIndex Get Rate limiting rules + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiRateLimitingRulesIndexRequest +*/ +func (a *RateLimitingApiService) RateLimitingRulesIndex(ctx context.Context, domain string) ApiRateLimitingRulesIndexRequest { + return ApiRateLimitingRulesIndexRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return RateLimitingRulesIndex200Response +func (a *RateLimitingApiService) RateLimitingRulesIndexExecute(r ApiRateLimitingRulesIndexRequest) (*RateLimitingRulesIndex200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *RateLimitingRulesIndex200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RateLimitingApiService.RateLimitingRulesIndex") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/rate-limit/rules" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.perPage != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "per_page", r.perPage, "") + } + if r.orderBy != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "order_by", r.orderBy, "") + } + if r.orderType != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "order_type", r.orderType, "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") + } + // 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["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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 ApiRateLimitingRulesShowRequest struct { + ctx context.Context + ApiService *RateLimitingApiService + domain string + id string +} + +func (r ApiRateLimitingRulesShowRequest) Execute() (*RateLimitRuleData, *http.Response, error) { + return r.ApiService.RateLimitingRulesShowExecute(r) +} + +/* +RateLimitingRulesShow Get Rate limiting's rule information + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @param id + @return ApiRateLimitingRulesShowRequest +*/ +func (a *RateLimitingApiService) RateLimitingRulesShow(ctx context.Context, domain string, id string) ApiRateLimitingRulesShowRequest { + return ApiRateLimitingRulesShowRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + id: id, + } +} + +// Execute executes the request +// @return RateLimitRuleData +func (a *RateLimitingApiService) RateLimitingRulesShowExecute(r ApiRateLimitingRulesShowRequest) (*RateLimitRuleData, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *RateLimitRuleData + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RateLimitingApiService.RateLimitingRulesShow") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/rate-limit/rules/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -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 + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 ApiRateLimitingRulesStoreRequest struct { + ctx context.Context + ApiService *RateLimitingApiService + domain string + rateLimitRule *RateLimitRule +} + +func (r ApiRateLimitingRulesStoreRequest) RateLimitRule(rateLimitRule RateLimitRule) ApiRateLimitingRulesStoreRequest { + r.rateLimitRule = &rateLimitRule + return r +} + +func (r ApiRateLimitingRulesStoreRequest) Execute() (*RateLimitRuleData, *http.Response, error) { + return r.ApiService.RateLimitingRulesStoreExecute(r) +} + +/* +RateLimitingRulesStore Store new Rate limiting rule + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiRateLimitingRulesStoreRequest +*/ +func (a *RateLimitingApiService) RateLimitingRulesStore(ctx context.Context, domain string) ApiRateLimitingRulesStoreRequest { + return ApiRateLimitingRulesStoreRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return RateLimitRuleData +func (a *RateLimitingApiService) RateLimitingRulesStoreExecute(r ApiRateLimitingRulesStoreRequest) (*RateLimitRuleData, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *RateLimitRuleData + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RateLimitingApiService.RateLimitingRulesStore") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/rate-limit/rules" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -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.rateLimitRule + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 ApiRateLimitingRulesUpdateRequest struct { + ctx context.Context + ApiService *RateLimitingApiService + domain string + id string + rateLimitRule *RateLimitRule +} + +func (r ApiRateLimitingRulesUpdateRequest) RateLimitRule(rateLimitRule RateLimitRule) ApiRateLimitingRulesUpdateRequest { + r.rateLimitRule = &rateLimitRule + return r +} + +func (r ApiRateLimitingRulesUpdateRequest) Execute() (*RateLimitingRulesUpdate200Response, *http.Response, error) { + return r.ApiService.RateLimitingRulesUpdateExecute(r) +} + +/* +RateLimitingRulesUpdate Update the Rate limiting's rule + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @param id + @return ApiRateLimitingRulesUpdateRequest +*/ +func (a *RateLimitingApiService) RateLimitingRulesUpdate(ctx context.Context, domain string, id string) ApiRateLimitingRulesUpdateRequest { + return ApiRateLimitingRulesUpdateRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + id: id, + } +} + +// Execute executes the request +// @return RateLimitingRulesUpdate200Response +func (a *RateLimitingApiService) RateLimitingRulesUpdateExecute(r ApiRateLimitingRulesUpdateRequest) (*RateLimitingRulesUpdate200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *RateLimitingRulesUpdate200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RateLimitingApiService.RateLimitingRulesUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/rate-limit/rules/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -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.rateLimitRule + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 ApiRateLimitingSettingsIndexRequest struct { + ctx context.Context + ApiService *RateLimitingApiService + domain string +} + +func (r ApiRateLimitingSettingsIndexRequest) Execute() (*RateLimitSettingsData, *http.Response, error) { + return r.ApiService.RateLimitingSettingsIndexExecute(r) +} + +/* +RateLimitingSettingsIndex Get Rate limiting settings + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiRateLimitingSettingsIndexRequest +*/ +func (a *RateLimitingApiService) RateLimitingSettingsIndex(ctx context.Context, domain string) ApiRateLimitingSettingsIndexRequest { + return ApiRateLimitingSettingsIndexRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return RateLimitSettingsData +func (a *RateLimitingApiService) RateLimitingSettingsIndexExecute(r ApiRateLimitingSettingsIndexRequest) (*RateLimitSettingsData, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *RateLimitSettingsData + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RateLimitingApiService.RateLimitingSettingsIndex") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/rate-limit/settings" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -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 + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 ApiRateLimitingSettingsUpdateRequest struct { + ctx context.Context + ApiService *RateLimitingApiService + domain string + rateLimitSettings *RateLimitSettings +} + +func (r ApiRateLimitingSettingsUpdateRequest) RateLimitSettings(rateLimitSettings RateLimitSettings) ApiRateLimitingSettingsUpdateRequest { + r.rateLimitSettings = &rateLimitSettings + return r +} + +func (r ApiRateLimitingSettingsUpdateRequest) Execute() (*RateLimitingSettingsUpdate200Response, *http.Response, error) { + return r.ApiService.RateLimitingSettingsUpdateExecute(r) +} + +/* +RateLimitingSettingsUpdate Update domain's Rate limiting configuration + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiRateLimitingSettingsUpdateRequest +*/ +func (a *RateLimitingApiService) RateLimitingSettingsUpdate(ctx context.Context, domain string) ApiRateLimitingSettingsUpdateRequest { + return ApiRateLimitingSettingsUpdateRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return RateLimitingSettingsUpdate200Response +func (a *RateLimitingApiService) RateLimitingSettingsUpdateExecute(r ApiRateLimitingSettingsUpdateRequest) (*RateLimitingSettingsUpdate200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *RateLimitingSettingsUpdate200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RateLimitingApiService.RateLimitingSettingsUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/rate-limit/settings" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -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.rateLimitSettings + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 ApiRateLimitingUpdateRequest struct { + ctx context.Context + ApiService *RateLimitingApiService + domain string + rateLimit *RateLimit +} + +func (r ApiRateLimitingUpdateRequest) RateLimit(rateLimit RateLimit) ApiRateLimitingUpdateRequest { + r.rateLimit = &rateLimit + return r +} + +func (r ApiRateLimitingUpdateRequest) Execute() (*RateLimitingUpdate200Response, *http.Response, error) { + return r.ApiService.RateLimitingUpdateExecute(r) +} + +/* +RateLimitingUpdate Update domain's Rate limiting configuration + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiRateLimitingUpdateRequest + +Deprecated +*/ +func (a *RateLimitingApiService) RateLimitingUpdate(ctx context.Context, domain string) ApiRateLimitingUpdateRequest { + return ApiRateLimitingUpdateRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return RateLimitingUpdate200Response +// Deprecated +func (a *RateLimitingApiService) RateLimitingUpdateExecute(r ApiRateLimitingUpdateRequest) (*RateLimitingUpdate200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *RateLimitingUpdate200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RateLimitingApiService.RateLimitingUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/rate-limit" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -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.rateLimit + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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_redirect.go b/api_redirect.go new file mode 100644 index 0000000..307eff6 --- /dev/null +++ b/api_redirect.go @@ -0,0 +1,315 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + + +// RedirectApiService RedirectApi service +type RedirectApiService service + +type ApiRedirectShowRequest struct { + ctx context.Context + ApiService *RedirectApiService + domain string +} + +func (r ApiRedirectShowRequest) Execute() (*RedirectData, *http.Response, error) { + return r.ApiService.RedirectShowExecute(r) +} + +/* +RedirectShow Get redirect settings + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiRedirectShowRequest +*/ +func (a *RedirectApiService) RedirectShow(ctx context.Context, domain string) ApiRedirectShowRequest { + return ApiRedirectShowRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return RedirectData +func (a *RedirectApiService) RedirectShowExecute(r ApiRedirectShowRequest) (*RedirectData, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *RedirectData + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RedirectApiService.RedirectShow") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/settings/www-redirect" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -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 + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 ApiRedirectUpdateRequest struct { + ctx context.Context + ApiService *RedirectApiService + domain string + redirect *Redirect +} + +func (r ApiRedirectUpdateRequest) Redirect(redirect Redirect) ApiRedirectUpdateRequest { + r.redirect = &redirect + return r +} + +func (r ApiRedirectUpdateRequest) Execute() (*MessageResponse, *http.Response, error) { + return r.ApiService.RedirectUpdateExecute(r) +} + +/* +RedirectUpdate Update redirect settings + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiRedirectUpdateRequest +*/ +func (a *RedirectApiService) RedirectUpdate(ctx context.Context, domain string) ApiRedirectUpdateRequest { + return ApiRedirectUpdateRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return MessageResponse +func (a *RedirectApiService) RedirectUpdateExecute(r ApiRedirectUpdateRequest) (*MessageResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MessageResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RedirectApiService.RedirectUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/settings/www-redirect" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -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.redirect + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 + } + if localVarHTTPResponse.StatusCode == 422 { + var v DomainsStore422Response + 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_reports.go b/api_reports.go new file mode 100644 index 0000000..8e7da69 --- /dev/null +++ b/api_reports.go @@ -0,0 +1,3519 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "time" +) + + +// ReportsApiService ReportsApi service +type ReportsApiService service + +type ApiBulkReportsTrafficsTotalRequest struct { + ctx context.Context + ApiService *ReportsApiService + period *string + since *time.Time + until *time.Time + bulkReportsTrafficsTotalRequest *BulkReportsTrafficsTotalRequest +} + +// Select period -ending now- for report +func (r ApiBulkReportsTrafficsTotalRequest) Period(period string) ApiBulkReportsTrafficsTotalRequest { + r.period = &period + return r +} + +func (r ApiBulkReportsTrafficsTotalRequest) Since(since time.Time) ApiBulkReportsTrafficsTotalRequest { + r.since = &since + return r +} + +func (r ApiBulkReportsTrafficsTotalRequest) Until(until time.Time) ApiBulkReportsTrafficsTotalRequest { + r.until = &until + return r +} + +func (r ApiBulkReportsTrafficsTotalRequest) BulkReportsTrafficsTotalRequest(bulkReportsTrafficsTotalRequest BulkReportsTrafficsTotalRequest) ApiBulkReportsTrafficsTotalRequest { + r.bulkReportsTrafficsTotalRequest = &bulkReportsTrafficsTotalRequest + return r +} + +func (r ApiBulkReportsTrafficsTotalRequest) Execute() (*BulkTrafficReportData, *http.Response, error) { + return r.ApiService.BulkReportsTrafficsTotalExecute(r) +} + +/* +BulkReportsTrafficsTotal Get traffic report for multiple domains + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiBulkReportsTrafficsTotalRequest +*/ +func (a *ReportsApiService) BulkReportsTrafficsTotal(ctx context.Context) ApiBulkReportsTrafficsTotalRequest { + return ApiBulkReportsTrafficsTotalRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return BulkTrafficReportData +func (a *ReportsApiService) BulkReportsTrafficsTotalExecute(r ApiBulkReportsTrafficsTotalRequest) (*BulkTrafficReportData, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *BulkTrafficReportData + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ReportsApiService.BulkReportsTrafficsTotal") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/bulk/reports/traffics" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.period != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "period", r.period, "") + } + if r.since != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "since", r.since, "") + } + if r.until != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "until", r.until, "") + } + // 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.bulkReportsTrafficsTotalRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 422 { + var v DomainsStore422Response + 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 ApiBulkReportsVisitorsTotalRequest struct { + ctx context.Context + ApiService *ReportsApiService + period *string + since *time.Time + until *time.Time + bulkReportsVisitorsTotalRequest *BulkReportsVisitorsTotalRequest +} + +// Select period -ending now- for report +func (r ApiBulkReportsVisitorsTotalRequest) Period(period string) ApiBulkReportsVisitorsTotalRequest { + r.period = &period + return r +} + +func (r ApiBulkReportsVisitorsTotalRequest) Since(since time.Time) ApiBulkReportsVisitorsTotalRequest { + r.since = &since + return r +} + +func (r ApiBulkReportsVisitorsTotalRequest) Until(until time.Time) ApiBulkReportsVisitorsTotalRequest { + r.until = &until + return r +} + +func (r ApiBulkReportsVisitorsTotalRequest) BulkReportsVisitorsTotalRequest(bulkReportsVisitorsTotalRequest BulkReportsVisitorsTotalRequest) ApiBulkReportsVisitorsTotalRequest { + r.bulkReportsVisitorsTotalRequest = &bulkReportsVisitorsTotalRequest + return r +} + +func (r ApiBulkReportsVisitorsTotalRequest) Execute() (*BulkVisitorReportData, *http.Response, error) { + return r.ApiService.BulkReportsVisitorsTotalExecute(r) +} + +/* +BulkReportsVisitorsTotal Get visitor report for multiple domains + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiBulkReportsVisitorsTotalRequest +*/ +func (a *ReportsApiService) BulkReportsVisitorsTotal(ctx context.Context) ApiBulkReportsVisitorsTotalRequest { + return ApiBulkReportsVisitorsTotalRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return BulkVisitorReportData +func (a *ReportsApiService) BulkReportsVisitorsTotalExecute(r ApiBulkReportsVisitorsTotalRequest) (*BulkVisitorReportData, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *BulkVisitorReportData + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ReportsApiService.BulkReportsVisitorsTotal") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/bulk/reports/visitors" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.period != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "period", r.period, "") + } + if r.since != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "since", r.since, "") + } + if r.until != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "until", r.until, "") + } + // 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.bulkReportsVisitorsTotalRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 422 { + var v DomainsStore422Response + 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 ApiReportsAttacksAttackersRequest struct { + ctx context.Context + ApiService *ReportsApiService + domain string + period *string +} + +// Select period -ending now- for report +func (r ApiReportsAttacksAttackersRequest) Period(period string) ApiReportsAttacksAttackersRequest { + r.period = &period + return r +} + +func (r ApiReportsAttacksAttackersRequest) Execute() (*ReportsAttacksAttackers200Response, *http.Response, error) { + return r.ApiService.ReportsAttacksAttackersExecute(r) +} + +/* +ReportsAttacksAttackers Get list of attackers information + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiReportsAttacksAttackersRequest +*/ +func (a *ReportsApiService) ReportsAttacksAttackers(ctx context.Context, domain string) ApiReportsAttacksAttackersRequest { + return ApiReportsAttacksAttackersRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return ReportsAttacksAttackers200Response +func (a *ReportsApiService) ReportsAttacksAttackersExecute(r ApiReportsAttacksAttackersRequest) (*ReportsAttacksAttackers200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ReportsAttacksAttackers200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ReportsApiService.ReportsAttacksAttackers") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/reports/attacks/attackers" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.period != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "period", r.period, "") + } + // 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["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 422 { + var v DomainsStore422Response + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 ApiReportsAttacksIndexRequest struct { + ctx context.Context + ApiService *ReportsApiService + domain string + period *string + perPage *int32 + page *int32 +} + +// Select period -ending now- for report +func (r ApiReportsAttacksIndexRequest) Period(period string) ApiReportsAttacksIndexRequest { + r.period = &period + return r +} + +// Set how many items returned per page +func (r ApiReportsAttacksIndexRequest) PerPage(perPage int32) ApiReportsAttacksIndexRequest { + r.perPage = &perPage + return r +} + +// Set the desired page number +func (r ApiReportsAttacksIndexRequest) Page(page int32) ApiReportsAttacksIndexRequest { + r.page = &page + return r +} + +func (r ApiReportsAttacksIndexRequest) Execute() (*ReportsAttacksIndex200Response, *http.Response, error) { + return r.ApiService.ReportsAttacksIndexExecute(r) +} + +/* +ReportsAttacksIndex Get list of attacks details + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiReportsAttacksIndexRequest +*/ +func (a *ReportsApiService) ReportsAttacksIndex(ctx context.Context, domain string) ApiReportsAttacksIndexRequest { + return ApiReportsAttacksIndexRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return ReportsAttacksIndex200Response +func (a *ReportsApiService) ReportsAttacksIndexExecute(r ApiReportsAttacksIndexRequest) (*ReportsAttacksIndex200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ReportsAttacksIndex200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ReportsApiService.ReportsAttacksIndex") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/reports/attacks/list" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.period != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "period", r.period, "") + } + if r.perPage != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "per_page", r.perPage, "") + } + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") + } + // 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["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 422 { + var v DomainsStore422Response + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 ApiReportsAttacksMapRequest struct { + ctx context.Context + ApiService *ReportsApiService + domain string + period *string +} + +// Select period -ending now- for report +func (r ApiReportsAttacksMapRequest) Period(period string) ApiReportsAttacksMapRequest { + r.period = &period + return r +} + +func (r ApiReportsAttacksMapRequest) Execute() (*AttackReportMapData, *http.Response, error) { + return r.ApiService.ReportsAttacksMapExecute(r) +} + +/* +ReportsAttacksMap Get geo-map of attacks + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiReportsAttacksMapRequest +*/ +func (a *ReportsApiService) ReportsAttacksMap(ctx context.Context, domain string) ApiReportsAttacksMapRequest { + return ApiReportsAttacksMapRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return AttackReportMapData +func (a *ReportsApiService) ReportsAttacksMapExecute(r ApiReportsAttacksMapRequest) (*AttackReportMapData, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AttackReportMapData + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ReportsApiService.ReportsAttacksMap") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/reports/attacks/map" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.period != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "period", r.period, "") + } + // 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["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 422 { + var v DomainsStore422Response + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 ApiReportsAttacksShowRequest struct { + ctx context.Context + ApiService *ReportsApiService + domain string + period *string +} + +// Select period -ending now- for report +func (r ApiReportsAttacksShowRequest) Period(period string) ApiReportsAttacksShowRequest { + r.period = &period + return r +} + +func (r ApiReportsAttacksShowRequest) Execute() (*ReportsAttacksShow200Response, *http.Response, error) { + return r.ApiService.ReportsAttacksShowExecute(r) +} + +/* +ReportsAttacksShow Get report of attacks + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiReportsAttacksShowRequest +*/ +func (a *ReportsApiService) ReportsAttacksShow(ctx context.Context, domain string) ApiReportsAttacksShowRequest { + return ApiReportsAttacksShowRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return ReportsAttacksShow200Response +func (a *ReportsApiService) ReportsAttacksShowExecute(r ApiReportsAttacksShowRequest) (*ReportsAttacksShow200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ReportsAttacksShow200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ReportsApiService.ReportsAttacksShow") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/reports/attacks" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.period != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "period", r.period, "") + } + // 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["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 422 { + var v DomainsStore422Response + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 ApiReportsAttacksUriRequest struct { + ctx context.Context + ApiService *ReportsApiService + domain string + period *string +} + +// Select period -ending now- for report +func (r ApiReportsAttacksUriRequest) Period(period string) ApiReportsAttacksUriRequest { + r.period = &period + return r +} + +func (r ApiReportsAttacksUriRequest) Execute() (*AttackReportUriData, *http.Response, error) { + return r.ApiService.ReportsAttacksUriExecute(r) +} + +/* +ReportsAttacksUri Get list of URLs under attack + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiReportsAttacksUriRequest +*/ +func (a *ReportsApiService) ReportsAttacksUri(ctx context.Context, domain string) ApiReportsAttacksUriRequest { + return ApiReportsAttacksUriRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return AttackReportUriData +func (a *ReportsApiService) ReportsAttacksUriExecute(r ApiReportsAttacksUriRequest) (*AttackReportUriData, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AttackReportUriData + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ReportsApiService.ReportsAttacksUri") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/reports/attacks/uri" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.period != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "period", r.period, "") + } + // 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["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 422 { + var v DomainsStore422Response + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 ApiReportsDnsGeoRequest struct { + ctx context.Context + ApiService *ReportsApiService + domain string + period *string + since *time.Time + until *time.Time +} + +// Select period -ending now- for report +func (r ApiReportsDnsGeoRequest) Period(period string) ApiReportsDnsGeoRequest { + r.period = &period + return r +} + +func (r ApiReportsDnsGeoRequest) Since(since time.Time) ApiReportsDnsGeoRequest { + r.since = &since + return r +} + +func (r ApiReportsDnsGeoRequest) Until(until time.Time) ApiReportsDnsGeoRequest { + r.until = &until + return r +} + +func (r ApiReportsDnsGeoRequest) Execute() (*DnsGeoReportData, *http.Response, error) { + return r.ApiService.ReportsDnsGeoExecute(r) +} + +/* +ReportsDnsGeo Get DNS requests as geo-map + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiReportsDnsGeoRequest +*/ +func (a *ReportsApiService) ReportsDnsGeo(ctx context.Context, domain string) ApiReportsDnsGeoRequest { + return ApiReportsDnsGeoRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return DnsGeoReportData +func (a *ReportsApiService) ReportsDnsGeoExecute(r ApiReportsDnsGeoRequest) (*DnsGeoReportData, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DnsGeoReportData + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ReportsApiService.ReportsDnsGeo") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/reports/dns-geo" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.period != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "period", r.period, "") + } + if r.since != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "since", r.since, "") + } + if r.until != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "until", r.until, "") + } + // 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["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 422 { + var v DomainsStore422Response + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 ApiReportsDnsRequestsRequest struct { + ctx context.Context + ApiService *ReportsApiService + domain string + period *string + since *time.Time + until *time.Time +} + +// Select period -ending now- for report +func (r ApiReportsDnsRequestsRequest) Period(period string) ApiReportsDnsRequestsRequest { + r.period = &period + return r +} + +func (r ApiReportsDnsRequestsRequest) Since(since time.Time) ApiReportsDnsRequestsRequest { + r.since = &since + return r +} + +func (r ApiReportsDnsRequestsRequest) Until(until time.Time) ApiReportsDnsRequestsRequest { + r.until = &until + return r +} + +func (r ApiReportsDnsRequestsRequest) Execute() (*DnsRequestReportData, *http.Response, error) { + return r.ApiService.ReportsDnsRequestsExecute(r) +} + +/* +ReportsDnsRequests Get response time report + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiReportsDnsRequestsRequest +*/ +func (a *ReportsApiService) ReportsDnsRequests(ctx context.Context, domain string) ApiReportsDnsRequestsRequest { + return ApiReportsDnsRequestsRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return DnsRequestReportData +func (a *ReportsApiService) ReportsDnsRequestsExecute(r ApiReportsDnsRequestsRequest) (*DnsRequestReportData, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DnsRequestReportData + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ReportsApiService.ReportsDnsRequests") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/reports/dns-requests" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.period != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "period", r.period, "") + } + if r.since != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "since", r.since, "") + } + if r.until != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "until", r.until, "") + } + // 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["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 422 { + var v DomainsStore422Response + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 ApiReportsErrorLogDetailsRequest struct { + ctx context.Context + ApiService *ReportsApiService + domain string + period *string + since *time.Time + until *time.Time + error_ *string +} + +// Select period -ending now- for report +func (r ApiReportsErrorLogDetailsRequest) Period(period string) ApiReportsErrorLogDetailsRequest { + r.period = &period + return r +} + +func (r ApiReportsErrorLogDetailsRequest) Since(since time.Time) ApiReportsErrorLogDetailsRequest { + r.since = &since + return r +} + +func (r ApiReportsErrorLogDetailsRequest) Until(until time.Time) ApiReportsErrorLogDetailsRequest { + r.until = &until + return r +} + +// Error message to search for +func (r ApiReportsErrorLogDetailsRequest) Error_(error_ string) ApiReportsErrorLogDetailsRequest { + r.error_ = &error_ + return r +} + +func (r ApiReportsErrorLogDetailsRequest) Execute() (*ReportsErrorLogDetails200Response, *http.Response, error) { + return r.ApiService.ReportsErrorLogDetailsExecute(r) +} + +/* +ReportsErrorLogDetails Get detail of an error + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiReportsErrorLogDetailsRequest + +Deprecated +*/ +func (a *ReportsApiService) ReportsErrorLogDetails(ctx context.Context, domain string) ApiReportsErrorLogDetailsRequest { + return ApiReportsErrorLogDetailsRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return ReportsErrorLogDetails200Response +// Deprecated +func (a *ReportsApiService) ReportsErrorLogDetailsExecute(r ApiReportsErrorLogDetailsRequest) (*ReportsErrorLogDetails200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ReportsErrorLogDetails200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ReportsApiService.ReportsErrorLogDetails") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/reports/error-log-details" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.period != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "period", r.period, "") + } + if r.since != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "since", r.since, "") + } + if r.until != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "until", r.until, "") + } + if r.error_ != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "error", r.error_, "") + } + // 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["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 422 { + var v DomainsStore422Response + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 ApiReportsErrorLogsRequest struct { + ctx context.Context + ApiService *ReportsApiService + domain string + period *string + since *time.Time + until *time.Time +} + +// Select period -ending now- for report +func (r ApiReportsErrorLogsRequest) Period(period string) ApiReportsErrorLogsRequest { + r.period = &period + return r +} + +func (r ApiReportsErrorLogsRequest) Since(since time.Time) ApiReportsErrorLogsRequest { + r.since = &since + return r +} + +func (r ApiReportsErrorLogsRequest) Until(until time.Time) ApiReportsErrorLogsRequest { + r.until = &until + return r +} + +func (r ApiReportsErrorLogsRequest) Execute() (*ErrorLogsData, *http.Response, error) { + return r.ApiService.ReportsErrorLogsExecute(r) +} + +/* +ReportsErrorLogs Get list of errors + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiReportsErrorLogsRequest +*/ +func (a *ReportsApiService) ReportsErrorLogs(ctx context.Context, domain string) ApiReportsErrorLogsRequest { + return ApiReportsErrorLogsRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return ErrorLogsData +func (a *ReportsApiService) ReportsErrorLogsExecute(r ApiReportsErrorLogsRequest) (*ErrorLogsData, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ErrorLogsData + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ReportsApiService.ReportsErrorLogs") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/reports/error-logs" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.period != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "period", r.period, "") + } + if r.since != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "since", r.since, "") + } + if r.until != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "until", r.until, "") + } + // 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["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 422 { + var v DomainsStore422Response + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 ApiReportsErrorLogsChartRequest struct { + ctx context.Context + ApiService *ReportsApiService + domain string + period *string + since *time.Time + until *time.Time +} + +// Select period -ending now- for report +func (r ApiReportsErrorLogsChartRequest) Period(period string) ApiReportsErrorLogsChartRequest { + r.period = &period + return r +} + +func (r ApiReportsErrorLogsChartRequest) Since(since time.Time) ApiReportsErrorLogsChartRequest { + r.since = &since + return r +} + +func (r ApiReportsErrorLogsChartRequest) Until(until time.Time) ApiReportsErrorLogsChartRequest { + r.until = &until + return r +} + +func (r ApiReportsErrorLogsChartRequest) Execute() (*ErrorLogChartData, *http.Response, error) { + return r.ApiService.ReportsErrorLogsChartExecute(r) +} + +/* +ReportsErrorLogsChart Get chart view of errors + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiReportsErrorLogsChartRequest +*/ +func (a *ReportsApiService) ReportsErrorLogsChart(ctx context.Context, domain string) ApiReportsErrorLogsChartRequest { + return ApiReportsErrorLogsChartRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return ErrorLogChartData +func (a *ReportsApiService) ReportsErrorLogsChartExecute(r ApiReportsErrorLogsChartRequest) (*ErrorLogChartData, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ErrorLogChartData + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ReportsApiService.ReportsErrorLogsChart") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/reports/error-logs/chart" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.period != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "period", r.period, "") + } + if r.since != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "since", r.since, "") + } + if r.until != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "until", r.until, "") + } + // 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["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 422 { + var v DomainsStore422Response + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 ApiReportsResponseTimeIndexRequest struct { + ctx context.Context + ApiService *ReportsApiService + domain string + period *string + since *time.Time + until *time.Time + filterSubdomain *string +} + +// Select period -ending now- for report +func (r ApiReportsResponseTimeIndexRequest) Period(period string) ApiReportsResponseTimeIndexRequest { + r.period = &period + return r +} + +func (r ApiReportsResponseTimeIndexRequest) Since(since time.Time) ApiReportsResponseTimeIndexRequest { + r.since = &since + return r +} + +func (r ApiReportsResponseTimeIndexRequest) Until(until time.Time) ApiReportsResponseTimeIndexRequest { + r.until = &until + return r +} + +func (r ApiReportsResponseTimeIndexRequest) FilterSubdomain(filterSubdomain string) ApiReportsResponseTimeIndexRequest { + r.filterSubdomain = &filterSubdomain + return r +} + +func (r ApiReportsResponseTimeIndexRequest) Execute() (*ResponseTimeData, *http.Response, error) { + return r.ApiService.ReportsResponseTimeIndexExecute(r) +} + +/* +ReportsResponseTimeIndex Get response time report + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiReportsResponseTimeIndexRequest +*/ +func (a *ReportsApiService) ReportsResponseTimeIndex(ctx context.Context, domain string) ApiReportsResponseTimeIndexRequest { + return ApiReportsResponseTimeIndexRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return ResponseTimeData +func (a *ReportsApiService) ReportsResponseTimeIndexExecute(r ApiReportsResponseTimeIndexRequest) (*ResponseTimeData, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseTimeData + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ReportsApiService.ReportsResponseTimeIndex") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/reports/response-time" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.period != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "period", r.period, "") + } + if r.since != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "since", r.since, "") + } + if r.until != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "until", r.until, "") + } + if r.filterSubdomain != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "filter[subdomain]", r.filterSubdomain, "") + } + // 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["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 422 { + var v DomainsStore422Response + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 ApiReportsStatusIndexRequest struct { + ctx context.Context + ApiService *ReportsApiService + domain string + period *string + since *time.Time + until *time.Time +} + +// Select period -ending now- for report +func (r ApiReportsStatusIndexRequest) Period(period string) ApiReportsStatusIndexRequest { + r.period = &period + return r +} + +func (r ApiReportsStatusIndexRequest) Since(since time.Time) ApiReportsStatusIndexRequest { + r.since = &since + return r +} + +func (r ApiReportsStatusIndexRequest) Until(until time.Time) ApiReportsStatusIndexRequest { + r.until = &until + return r +} + +func (r ApiReportsStatusIndexRequest) Execute() (*StatusCodeReportData, *http.Response, error) { + return r.ApiService.ReportsStatusIndexExecute(r) +} + +/* +ReportsStatusIndex Get status codes pie chart + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiReportsStatusIndexRequest +*/ +func (a *ReportsApiService) ReportsStatusIndex(ctx context.Context, domain string) ApiReportsStatusIndexRequest { + return ApiReportsStatusIndexRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return StatusCodeReportData +func (a *ReportsApiService) ReportsStatusIndexExecute(r ApiReportsStatusIndexRequest) (*StatusCodeReportData, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *StatusCodeReportData + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ReportsApiService.ReportsStatusIndex") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/reports/status" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.period != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "period", r.period, "") + } + if r.since != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "since", r.since, "") + } + if r.until != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "until", r.until, "") + } + // 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["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 422 { + var v DomainsStore422Response + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 ApiReportsStatusSummaryRequest struct { + ctx context.Context + ApiService *ReportsApiService + domain string + period *string + since *time.Time + until *time.Time +} + +// Select period -ending now- for report +func (r ApiReportsStatusSummaryRequest) Period(period string) ApiReportsStatusSummaryRequest { + r.period = &period + return r +} + +func (r ApiReportsStatusSummaryRequest) Since(since time.Time) ApiReportsStatusSummaryRequest { + r.since = &since + return r +} + +func (r ApiReportsStatusSummaryRequest) Until(until time.Time) ApiReportsStatusSummaryRequest { + r.until = &until + return r +} + +func (r ApiReportsStatusSummaryRequest) Execute() (*StatusCodeSummaryData, *http.Response, error) { + return r.ApiService.ReportsStatusSummaryExecute(r) +} + +/* +ReportsStatusSummary Get an overview of status codes pie chart + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiReportsStatusSummaryRequest +*/ +func (a *ReportsApiService) ReportsStatusSummary(ctx context.Context, domain string) ApiReportsStatusSummaryRequest { + return ApiReportsStatusSummaryRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return StatusCodeSummaryData +func (a *ReportsApiService) ReportsStatusSummaryExecute(r ApiReportsStatusSummaryRequest) (*StatusCodeSummaryData, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *StatusCodeSummaryData + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ReportsApiService.ReportsStatusSummary") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/reports/status/summary" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.period != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "period", r.period, "") + } + if r.since != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "since", r.since, "") + } + if r.until != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "until", r.until, "") + } + // 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["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 422 { + var v DomainsStore422Response + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 ApiReportsTrafficsMapRequest struct { + ctx context.Context + ApiService *ReportsApiService + domain string + period *string + since *time.Time + until *time.Time + filterSubdomain *string +} + +// Select period -ending now- for report +func (r ApiReportsTrafficsMapRequest) Period(period string) ApiReportsTrafficsMapRequest { + r.period = &period + return r +} + +func (r ApiReportsTrafficsMapRequest) Since(since time.Time) ApiReportsTrafficsMapRequest { + r.since = &since + return r +} + +func (r ApiReportsTrafficsMapRequest) Until(until time.Time) ApiReportsTrafficsMapRequest { + r.until = &until + return r +} + +func (r ApiReportsTrafficsMapRequest) FilterSubdomain(filterSubdomain string) ApiReportsTrafficsMapRequest { + r.filterSubdomain = &filterSubdomain + return r +} + +func (r ApiReportsTrafficsMapRequest) Execute() (*MapTrafficsData, *http.Response, error) { + return r.ApiService.ReportsTrafficsMapExecute(r) +} + +/* +ReportsTrafficsMap Get traffic as geo-map + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiReportsTrafficsMapRequest +*/ +func (a *ReportsApiService) ReportsTrafficsMap(ctx context.Context, domain string) ApiReportsTrafficsMapRequest { + return ApiReportsTrafficsMapRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return MapTrafficsData +func (a *ReportsApiService) ReportsTrafficsMapExecute(r ApiReportsTrafficsMapRequest) (*MapTrafficsData, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MapTrafficsData + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ReportsApiService.ReportsTrafficsMap") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/reports/traffics/map" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.period != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "period", r.period, "") + } + if r.since != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "since", r.since, "") + } + if r.until != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "until", r.until, "") + } + if r.filterSubdomain != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "filter[subdomain]", r.filterSubdomain, "") + } + // 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["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 422 { + var v DomainsStore422Response + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 ApiReportsTrafficsSavedRequest struct { + ctx context.Context + ApiService *ReportsApiService + domain string + period *string + since *time.Time + until *time.Time + filterSubdomain *string +} + +// Select period -ending now- for report +func (r ApiReportsTrafficsSavedRequest) Period(period string) ApiReportsTrafficsSavedRequest { + r.period = &period + return r +} + +func (r ApiReportsTrafficsSavedRequest) Since(since time.Time) ApiReportsTrafficsSavedRequest { + r.since = &since + return r +} + +func (r ApiReportsTrafficsSavedRequest) Until(until time.Time) ApiReportsTrafficsSavedRequest { + r.until = &until + return r +} + +func (r ApiReportsTrafficsSavedRequest) FilterSubdomain(filterSubdomain string) ApiReportsTrafficsSavedRequest { + r.filterSubdomain = &filterSubdomain + return r +} + +func (r ApiReportsTrafficsSavedRequest) Execute() (*SavedTrafficsData, *http.Response, error) { + return r.ApiService.ReportsTrafficsSavedExecute(r) +} + +/* +ReportsTrafficsSaved Get traffic saved to total pie chart + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiReportsTrafficsSavedRequest +*/ +func (a *ReportsApiService) ReportsTrafficsSaved(ctx context.Context, domain string) ApiReportsTrafficsSavedRequest { + return ApiReportsTrafficsSavedRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return SavedTrafficsData +func (a *ReportsApiService) ReportsTrafficsSavedExecute(r ApiReportsTrafficsSavedRequest) (*SavedTrafficsData, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *SavedTrafficsData + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ReportsApiService.ReportsTrafficsSaved") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/reports/traffics/saved" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.period != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "period", r.period, "") + } + if r.since != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "since", r.since, "") + } + if r.until != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "until", r.until, "") + } + if r.filterSubdomain != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "filter[subdomain]", r.filterSubdomain, "") + } + // 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["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 422 { + var v DomainsStore422Response + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 ApiReportsTrafficsTotalRequest struct { + ctx context.Context + ApiService *ReportsApiService + domain string + period *string + since *time.Time + until *time.Time + filterSubdomain *string +} + +// Select period -ending now- for report +func (r ApiReportsTrafficsTotalRequest) Period(period string) ApiReportsTrafficsTotalRequest { + r.period = &period + return r +} + +func (r ApiReportsTrafficsTotalRequest) Since(since time.Time) ApiReportsTrafficsTotalRequest { + r.since = &since + return r +} + +func (r ApiReportsTrafficsTotalRequest) Until(until time.Time) ApiReportsTrafficsTotalRequest { + r.until = &until + return r +} + +func (r ApiReportsTrafficsTotalRequest) FilterSubdomain(filterSubdomain string) ApiReportsTrafficsTotalRequest { + r.filterSubdomain = &filterSubdomain + return r +} + +func (r ApiReportsTrafficsTotalRequest) Execute() (*TrafficsData, *http.Response, error) { + return r.ApiService.ReportsTrafficsTotalExecute(r) +} + +/* +ReportsTrafficsTotal Get traffic report for domain + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiReportsTrafficsTotalRequest +*/ +func (a *ReportsApiService) ReportsTrafficsTotal(ctx context.Context, domain string) ApiReportsTrafficsTotalRequest { + return ApiReportsTrafficsTotalRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return TrafficsData +func (a *ReportsApiService) ReportsTrafficsTotalExecute(r ApiReportsTrafficsTotalRequest) (*TrafficsData, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *TrafficsData + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ReportsApiService.ReportsTrafficsTotal") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/reports/traffics" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.period != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "period", r.period, "") + } + if r.since != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "since", r.since, "") + } + if r.until != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "until", r.until, "") + } + if r.filterSubdomain != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "filter[subdomain]", r.filterSubdomain, "") + } + // 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["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 422 { + var v DomainsStore422Response + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 ApiReportsVisitorsHighRequestIpsRequest struct { + ctx context.Context + ApiService *ReportsApiService + domain string + period *string + since *time.Time + until *time.Time + perPage *int32 + page *int32 +} + +// Select period -ending now- for report +func (r ApiReportsVisitorsHighRequestIpsRequest) Period(period string) ApiReportsVisitorsHighRequestIpsRequest { + r.period = &period + return r +} + +func (r ApiReportsVisitorsHighRequestIpsRequest) Since(since time.Time) ApiReportsVisitorsHighRequestIpsRequest { + r.since = &since + return r +} + +func (r ApiReportsVisitorsHighRequestIpsRequest) Until(until time.Time) ApiReportsVisitorsHighRequestIpsRequest { + r.until = &until + return r +} + +// Set how many items returned per page +func (r ApiReportsVisitorsHighRequestIpsRequest) PerPage(perPage int32) ApiReportsVisitorsHighRequestIpsRequest { + r.perPage = &perPage + return r +} + +// Set the desired page number +func (r ApiReportsVisitorsHighRequestIpsRequest) Page(page int32) ApiReportsVisitorsHighRequestIpsRequest { + r.page = &page + return r +} + +func (r ApiReportsVisitorsHighRequestIpsRequest) Execute() (*ReportsVisitorsHighRequestIps200Response, *http.Response, error) { + return r.ApiService.ReportsVisitorsHighRequestIpsExecute(r) +} + +/* +ReportsVisitorsHighRequestIps Get report of IPs with highest number of requests + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiReportsVisitorsHighRequestIpsRequest +*/ +func (a *ReportsApiService) ReportsVisitorsHighRequestIps(ctx context.Context, domain string) ApiReportsVisitorsHighRequestIpsRequest { + return ApiReportsVisitorsHighRequestIpsRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return ReportsVisitorsHighRequestIps200Response +func (a *ReportsApiService) ReportsVisitorsHighRequestIpsExecute(r ApiReportsVisitorsHighRequestIpsRequest) (*ReportsVisitorsHighRequestIps200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ReportsVisitorsHighRequestIps200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ReportsApiService.ReportsVisitorsHighRequestIps") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/reports/high-request-ips" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.period != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "period", r.period, "") + } + if r.since != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "since", r.since, "") + } + if r.until != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "until", r.until, "") + } + if r.perPage != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "per_page", r.perPage, "") + } + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") + } + // 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["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 422 { + var v DomainsStore422Response + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 ApiReportsVisitorsIndexRequest struct { + ctx context.Context + ApiService *ReportsApiService + domain string + period *string + since *time.Time + until *time.Time + filterSubdomain *string +} + +// Select period -ending now- for report +func (r ApiReportsVisitorsIndexRequest) Period(period string) ApiReportsVisitorsIndexRequest { + r.period = &period + return r +} + +func (r ApiReportsVisitorsIndexRequest) Since(since time.Time) ApiReportsVisitorsIndexRequest { + r.since = &since + return r +} + +func (r ApiReportsVisitorsIndexRequest) Until(until time.Time) ApiReportsVisitorsIndexRequest { + r.until = &until + return r +} + +func (r ApiReportsVisitorsIndexRequest) FilterSubdomain(filterSubdomain string) ApiReportsVisitorsIndexRequest { + r.filterSubdomain = &filterSubdomain + return r +} + +func (r ApiReportsVisitorsIndexRequest) Execute() (*VisitorsData, *http.Response, error) { + return r.ApiService.ReportsVisitorsIndexExecute(r) +} + +/* +ReportsVisitorsIndex Get report of visitors for domain + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiReportsVisitorsIndexRequest +*/ +func (a *ReportsApiService) ReportsVisitorsIndex(ctx context.Context, domain string) ApiReportsVisitorsIndexRequest { + return ApiReportsVisitorsIndexRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return VisitorsData +func (a *ReportsApiService) ReportsVisitorsIndexExecute(r ApiReportsVisitorsIndexRequest) (*VisitorsData, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *VisitorsData + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ReportsApiService.ReportsVisitorsIndex") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/reports/visitors" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.period != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "period", r.period, "") + } + if r.since != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "since", r.since, "") + } + if r.until != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "until", r.until, "") + } + if r.filterSubdomain != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "filter[subdomain]", r.filterSubdomain, "") + } + // 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["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 422 { + var v DomainsStore422Response + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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_ssltls.go b/api_ssltls.go new file mode 100644 index 0000000..9f1ce4d --- /dev/null +++ b/api_ssltls.go @@ -0,0 +1,932 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "os" +) + + +// SSLTLSApiService SSLTLSApi service +type SSLTLSApiService service + +type ApiSslCertDestroyRequest struct { + ctx context.Context + ApiService *SSLTLSApiService + domain string + id string +} + +func (r ApiSslCertDestroyRequest) Execute() (*MessageResponse, *http.Response, error) { + return r.ApiService.SslCertDestroyExecute(r) +} + +/* +SslCertDestroy Delete an unused customer certificate + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @param id + @return ApiSslCertDestroyRequest +*/ +func (a *SSLTLSApiService) SslCertDestroy(ctx context.Context, domain string, id string) ApiSslCertDestroyRequest { + return ApiSslCertDestroyRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + id: id, + } +} + +// Execute executes the request +// @return MessageResponse +func (a *SSLTLSApiService) SslCertDestroyExecute(r ApiSslCertDestroyRequest) (*MessageResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MessageResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SSLTLSApiService.SslCertDestroy") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/ssl/certificates/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -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 + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 + } + if localVarHTTPResponse.StatusCode == 422 { + var v DomainsStore422Response + 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 ApiSslCertOrderIndexRequest struct { + ctx context.Context + ApiService *SSLTLSApiService + domain string +} + +func (r ApiSslCertOrderIndexRequest) Execute() (*SslCertOrderIndex200Response, *http.Response, error) { + return r.ApiService.SslCertOrderIndexExecute(r) +} + +/* +SslCertOrderIndex Get All Managed certificate orders history + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiSslCertOrderIndexRequest +*/ +func (a *SSLTLSApiService) SslCertOrderIndex(ctx context.Context, domain string) ApiSslCertOrderIndexRequest { + return ApiSslCertOrderIndexRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return SslCertOrderIndex200Response +func (a *SSLTLSApiService) SslCertOrderIndexExecute(r ApiSslCertOrderIndexRequest) (*SslCertOrderIndex200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *SslCertOrderIndex200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SSLTLSApiService.SslCertOrderIndex") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/ssl/orders" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -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 + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 ApiSslCertOrderRetryRequest struct { + ctx context.Context + ApiService *SSLTLSApiService + domain string +} + +func (r ApiSslCertOrderRetryRequest) Execute() (*MessageResponse, *http.Response, error) { + return r.ApiService.SslCertOrderRetryExecute(r) +} + +/* +SslCertOrderRetry Retry a previously `killed` order + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiSslCertOrderRetryRequest +*/ +func (a *SSLTLSApiService) SslCertOrderRetry(ctx context.Context, domain string) ApiSslCertOrderRetryRequest { + return ApiSslCertOrderRetryRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return MessageResponse +func (a *SSLTLSApiService) SslCertOrderRetryExecute(r ApiSslCertOrderRetryRequest) (*MessageResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MessageResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SSLTLSApiService.SslCertOrderRetry") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/ssl/orders/action/retry" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -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 + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 + } + if localVarHTTPResponse.StatusCode == 422 { + var v DomainsStore422Response + 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 ApiSslCertStoreRequest struct { + ctx context.Context + ApiService *SSLTLSApiService + domain string + certificate *os.File + privateKey *os.File +} + +func (r ApiSslCertStoreRequest) Certificate(certificate *os.File) ApiSslCertStoreRequest { + r.certificate = certificate + return r +} + +func (r ApiSslCertStoreRequest) PrivateKey(privateKey *os.File) ApiSslCertStoreRequest { + r.privateKey = privateKey + return r +} + +func (r ApiSslCertStoreRequest) Execute() (*MessageResponse, *http.Response, error) { + return r.ApiService.SslCertStoreExecute(r) +} + +/* +SslCertStore Upload Certificate + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiSslCertStoreRequest +*/ +func (a *SSLTLSApiService) SslCertStore(ctx context.Context, domain string) ApiSslCertStoreRequest { + return ApiSslCertStoreRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return MessageResponse +func (a *SSLTLSApiService) SslCertStoreExecute(r ApiSslCertStoreRequest) (*MessageResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MessageResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SSLTLSApiService.SslCertStore") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/ssl/certificates" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // 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 certificateLocalVarFormFileName string + var certificateLocalVarFileName string + var certificateLocalVarFileBytes []byte + + certificateLocalVarFormFileName = "certificate" + + + certificateLocalVarFile := r.certificate + + if certificateLocalVarFile != nil { + fbs, _ := io.ReadAll(certificateLocalVarFile) + + certificateLocalVarFileBytes = fbs + certificateLocalVarFileName = certificateLocalVarFile.Name() + certificateLocalVarFile.Close() + formFiles = append(formFiles, formFile{fileBytes: certificateLocalVarFileBytes, fileName: certificateLocalVarFileName, formFileName: certificateLocalVarFormFileName}) + } + var privateKeyLocalVarFormFileName string + var privateKeyLocalVarFileName string + var privateKeyLocalVarFileBytes []byte + + privateKeyLocalVarFormFileName = "private_key" + + + privateKeyLocalVarFile := r.privateKey + + if privateKeyLocalVarFile != nil { + fbs, _ := io.ReadAll(privateKeyLocalVarFile) + + privateKeyLocalVarFileBytes = fbs + privateKeyLocalVarFileName = privateKeyLocalVarFile.Name() + privateKeyLocalVarFile.Close() + formFiles = append(formFiles, formFile{fileBytes: privateKeyLocalVarFileBytes, fileName: privateKeyLocalVarFileName, formFileName: privateKeyLocalVarFormFileName}) + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 + } + if localVarHTTPResponse.StatusCode == 422 { + var v DomainsStore422Response + 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 ApiSslIndexRequest struct { + ctx context.Context + ApiService *SSLTLSApiService + domain string +} + +func (r ApiSslIndexRequest) Execute() (*SslResponse, *http.Response, error) { + return r.ApiService.SslIndexExecute(r) +} + +/* +SslIndex Get SSL settings + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiSslIndexRequest +*/ +func (a *SSLTLSApiService) SslIndex(ctx context.Context, domain string) ApiSslIndexRequest { + return ApiSslIndexRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return SslResponse +func (a *SSLTLSApiService) SslIndexExecute(r ApiSslIndexRequest) (*SslResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *SslResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SSLTLSApiService.SslIndex") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/ssl" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -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 + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 ApiSslUpdateRequest struct { + ctx context.Context + ApiService *SSLTLSApiService + domain string + sslUpdate *SslUpdate +} + +func (r ApiSslUpdateRequest) SslUpdate(sslUpdate SslUpdate) ApiSslUpdateRequest { + r.sslUpdate = &sslUpdate + return r +} + +func (r ApiSslUpdateRequest) Execute() (*SslResponse, *http.Response, error) { + return r.ApiService.SslUpdateExecute(r) +} + +/* +SslUpdate Update domain's SSL configuration + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiSslUpdateRequest +*/ +func (a *SSLTLSApiService) SslUpdate(ctx context.Context, domain string) ApiSslUpdateRequest { + return ApiSslUpdateRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return SslResponse +func (a *SSLTLSApiService) SslUpdateExecute(r ApiSslUpdateRequest) (*SslResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *SslResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SSLTLSApiService.SslUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/ssl" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -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.sslUpdate + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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_transport_layer_proxy.go b/api_transport_layer_proxy.go new file mode 100644 index 0000000..e460bb7 --- /dev/null +++ b/api_transport_layer_proxy.go @@ -0,0 +1,786 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + + +// TransportLayerProxyApiService TransportLayerProxyApi service +type TransportLayerProxyApiService service + +type ApiTransportLayerProxiesDestroyRequest struct { + ctx context.Context + ApiService *TransportLayerProxyApiService + domain string + transportLayerProxyId string +} + +func (r ApiTransportLayerProxiesDestroyRequest) Execute() (*MessageResponse, *http.Response, error) { + return r.ApiService.TransportLayerProxiesDestroyExecute(r) +} + +/* +TransportLayerProxiesDestroy delete a transport layer proxy + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @param transportLayerProxyId Transport layer proxy id + @return ApiTransportLayerProxiesDestroyRequest +*/ +func (a *TransportLayerProxyApiService) TransportLayerProxiesDestroy(ctx context.Context, domain string, transportLayerProxyId string) ApiTransportLayerProxiesDestroyRequest { + return ApiTransportLayerProxiesDestroyRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + transportLayerProxyId: transportLayerProxyId, + } +} + +// Execute executes the request +// @return MessageResponse +func (a *TransportLayerProxyApiService) TransportLayerProxiesDestroyExecute(r ApiTransportLayerProxiesDestroyRequest) (*MessageResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MessageResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TransportLayerProxyApiService.TransportLayerProxiesDestroy") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/transport-layer-proxies/{transportLayerProxyId}" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"transportLayerProxyId"+"}", url.PathEscape(parameterValueToString(r.transportLayerProxyId, "transportLayerProxyId")), -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 + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 403 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 ApiTransportLayerProxiesIndexRequest struct { + ctx context.Context + ApiService *TransportLayerProxyApiService + domain string + perPage *int32 + page *int32 +} + +// Set how many items returned per page +func (r ApiTransportLayerProxiesIndexRequest) PerPage(perPage int32) ApiTransportLayerProxiesIndexRequest { + r.perPage = &perPage + return r +} + +// Set the desired page number +func (r ApiTransportLayerProxiesIndexRequest) Page(page int32) ApiTransportLayerProxiesIndexRequest { + r.page = &page + return r +} + +func (r ApiTransportLayerProxiesIndexRequest) Execute() (*TransportLayerProxiesIndex200Response, *http.Response, error) { + return r.ApiService.TransportLayerProxiesIndexExecute(r) +} + +/* +TransportLayerProxiesIndex Show list of transport layer proxies for given domain + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiTransportLayerProxiesIndexRequest +*/ +func (a *TransportLayerProxyApiService) TransportLayerProxiesIndex(ctx context.Context, domain string) ApiTransportLayerProxiesIndexRequest { + return ApiTransportLayerProxiesIndexRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return TransportLayerProxiesIndex200Response +func (a *TransportLayerProxyApiService) TransportLayerProxiesIndexExecute(r ApiTransportLayerProxiesIndexRequest) (*TransportLayerProxiesIndex200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *TransportLayerProxiesIndex200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TransportLayerProxyApiService.TransportLayerProxiesIndex") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/transport-layer-proxies" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.perPage != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "per_page", r.perPage, "") + } + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") + } + // 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["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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 ApiTransportLayerProxiesShowRequest struct { + ctx context.Context + ApiService *TransportLayerProxyApiService + domain string + transportLayerProxyId string +} + +func (r ApiTransportLayerProxiesShowRequest) Execute() (*TransportLayerProxyResponse, *http.Response, error) { + return r.ApiService.TransportLayerProxiesShowExecute(r) +} + +/* +TransportLayerProxiesShow Show a transport layer proxy's details based on given id + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @param transportLayerProxyId Transport layer proxy id + @return ApiTransportLayerProxiesShowRequest +*/ +func (a *TransportLayerProxyApiService) TransportLayerProxiesShow(ctx context.Context, domain string, transportLayerProxyId string) ApiTransportLayerProxiesShowRequest { + return ApiTransportLayerProxiesShowRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + transportLayerProxyId: transportLayerProxyId, + } +} + +// Execute executes the request +// @return TransportLayerProxyResponse +func (a *TransportLayerProxyApiService) TransportLayerProxiesShowExecute(r ApiTransportLayerProxiesShowRequest) (*TransportLayerProxyResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *TransportLayerProxyResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TransportLayerProxyApiService.TransportLayerProxiesShow") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/transport-layer-proxies/{transportLayerProxyId}" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"transportLayerProxyId"+"}", url.PathEscape(parameterValueToString(r.transportLayerProxyId, "transportLayerProxyId")), -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 + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 403 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 ApiTransportLayerProxiesStoreRequest struct { + ctx context.Context + ApiService *TransportLayerProxyApiService + domain string + transportLayerProxyStore *TransportLayerProxyStore +} + +func (r ApiTransportLayerProxiesStoreRequest) TransportLayerProxyStore(transportLayerProxyStore TransportLayerProxyStore) ApiTransportLayerProxiesStoreRequest { + r.transportLayerProxyStore = &transportLayerProxyStore + return r +} + +func (r ApiTransportLayerProxiesStoreRequest) Execute() (*TransportLayerProxyResponse, *http.Response, error) { + return r.ApiService.TransportLayerProxiesStoreExecute(r) +} + +/* +TransportLayerProxiesStore Create new transport layer proxy + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiTransportLayerProxiesStoreRequest +*/ +func (a *TransportLayerProxyApiService) TransportLayerProxiesStore(ctx context.Context, domain string) ApiTransportLayerProxiesStoreRequest { + return ApiTransportLayerProxiesStoreRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return TransportLayerProxyResponse +func (a *TransportLayerProxyApiService) TransportLayerProxiesStoreExecute(r ApiTransportLayerProxiesStoreRequest) (*TransportLayerProxyResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *TransportLayerProxyResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TransportLayerProxyApiService.TransportLayerProxiesStore") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/transport-layer-proxies" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -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.transportLayerProxyStore + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 + } + if localVarHTTPResponse.StatusCode == 422 { + var v DomainsStore422Response + 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 ApiTransportLayerProxiesUpdateRequest struct { + ctx context.Context + ApiService *TransportLayerProxyApiService + domain string + transportLayerProxyId string + transportLayerProxyUpdate *TransportLayerProxyUpdate +} + +func (r ApiTransportLayerProxiesUpdateRequest) TransportLayerProxyUpdate(transportLayerProxyUpdate TransportLayerProxyUpdate) ApiTransportLayerProxiesUpdateRequest { + r.transportLayerProxyUpdate = &transportLayerProxyUpdate + return r +} + +func (r ApiTransportLayerProxiesUpdateRequest) Execute() (*TransportLayerProxyResponse, *http.Response, error) { + return r.ApiService.TransportLayerProxiesUpdateExecute(r) +} + +/* +TransportLayerProxiesUpdate Update a transport layer proxy + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @param transportLayerProxyId Transport layer proxy id + @return ApiTransportLayerProxiesUpdateRequest +*/ +func (a *TransportLayerProxyApiService) TransportLayerProxiesUpdate(ctx context.Context, domain string, transportLayerProxyId string) ApiTransportLayerProxiesUpdateRequest { + return ApiTransportLayerProxiesUpdateRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + transportLayerProxyId: transportLayerProxyId, + } +} + +// Execute executes the request +// @return TransportLayerProxyResponse +func (a *TransportLayerProxyApiService) TransportLayerProxiesUpdateExecute(r ApiTransportLayerProxiesUpdateRequest) (*TransportLayerProxyResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *TransportLayerProxyResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TransportLayerProxyApiService.TransportLayerProxiesUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/transport-layer-proxies/{transportLayerProxyId}" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"transportLayerProxyId"+"}", url.PathEscape(parameterValueToString(r.transportLayerProxyId, "transportLayerProxyId")), -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.transportLayerProxyUpdate + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 403 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 + } + if localVarHTTPResponse.StatusCode == 422 { + var v DomainsStore422Response + 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_troubleshoot.go b/api_troubleshoot.go new file mode 100644 index 0000000..30862c0 --- /dev/null +++ b/api_troubleshoot.go @@ -0,0 +1,410 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + + +// TroubleshootApiService TroubleshootApi service +type TroubleshootApiService service + +type ApiTroubleshootsIndexRequest struct { + ctx context.Context + ApiService *TroubleshootApiService + domain string + perPage *int32 + page *int32 +} + +// Set how many items returned per page +func (r ApiTroubleshootsIndexRequest) PerPage(perPage int32) ApiTroubleshootsIndexRequest { + r.perPage = &perPage + return r +} + +// Set the desired page number +func (r ApiTroubleshootsIndexRequest) Page(page int32) ApiTroubleshootsIndexRequest { + r.page = &page + return r +} + +func (r ApiTroubleshootsIndexRequest) Execute() (*TroubleshootsIndex200Response, *http.Response, error) { + return r.ApiService.TroubleshootsIndexExecute(r) +} + +/* +TroubleshootsIndex Show list of troubleshoots for given domain + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiTroubleshootsIndexRequest +*/ +func (a *TroubleshootApiService) TroubleshootsIndex(ctx context.Context, domain string) ApiTroubleshootsIndexRequest { + return ApiTroubleshootsIndexRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return TroubleshootsIndex200Response +func (a *TroubleshootApiService) TroubleshootsIndexExecute(r ApiTroubleshootsIndexRequest) (*TroubleshootsIndex200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *TroubleshootsIndex200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TroubleshootApiService.TroubleshootsIndex") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/troubleshoots" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.perPage != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "per_page", r.perPage, "") + } + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") + } + // 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["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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 ApiTroubleshootsLatestRequest struct { + ctx context.Context + ApiService *TroubleshootApiService + domain string +} + +func (r ApiTroubleshootsLatestRequest) Execute() (*TroubleshootsStore201Response, *http.Response, error) { + return r.ApiService.TroubleshootsLatestExecute(r) +} + +/* +TroubleshootsLatest Show the latest troubleshoot for given domain + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiTroubleshootsLatestRequest +*/ +func (a *TroubleshootApiService) TroubleshootsLatest(ctx context.Context, domain string) ApiTroubleshootsLatestRequest { + return ApiTroubleshootsLatestRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return TroubleshootsStore201Response +func (a *TroubleshootApiService) TroubleshootsLatestExecute(r ApiTroubleshootsLatestRequest) (*TroubleshootsStore201Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *TroubleshootsStore201Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TroubleshootApiService.TroubleshootsLatest") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/troubleshoots/latest" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -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 + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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 ApiTroubleshootsStoreRequest struct { + ctx context.Context + ApiService *TroubleshootApiService + domain string +} + +func (r ApiTroubleshootsStoreRequest) Execute() (*TroubleshootsStore201Response, *http.Response, error) { + return r.ApiService.TroubleshootsStoreExecute(r) +} + +/* +TroubleshootsStore Create new troubleshoot + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiTroubleshootsStoreRequest +*/ +func (a *TroubleshootApiService) TroubleshootsStore(ctx context.Context, domain string) ApiTroubleshootsStoreRequest { + return ApiTroubleshootsStoreRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return TroubleshootsStore201Response +func (a *TroubleshootApiService) TroubleshootsStoreExecute(r ApiTroubleshootsStoreRequest) (*TroubleshootsStore201Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *TroubleshootsStore201Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TroubleshootApiService.TroubleshootsStore") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/troubleshoots" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -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 + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 429 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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_waf.go b/api_waf.go new file mode 100644 index 0000000..f807ea8 --- /dev/null +++ b/api_waf.go @@ -0,0 +1,2745 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + + +// WAFApiService WAFApi service +type WAFApiService service + +type ApiGlobalWafIndexRequest struct { + ctx context.Context + ApiService *WAFApiService +} + +func (r ApiGlobalWafIndexRequest) Execute() (*WafPresetsData, *http.Response, error) { + return r.ApiService.GlobalWafIndexExecute(r) +} + +/* +GlobalWafIndex Get WAF presets + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGlobalWafIndexRequest +*/ +func (a *WAFApiService) GlobalWafIndex(ctx context.Context) ApiGlobalWafIndexRequest { + return ApiGlobalWafIndexRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return WafPresetsData +func (a *WAFApiService) GlobalWafIndexExecute(r ApiGlobalWafIndexRequest) (*WafPresetsData, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *WafPresetsData + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WAFApiService.GlobalWafIndex") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/waf" + + 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["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 ApiGlobalWafShowPackageRequest struct { + ctx context.Context + ApiService *WAFApiService + packageId string +} + +func (r ApiGlobalWafShowPackageRequest) Execute() (*WafPackageDetailsData, *http.Response, error) { + return r.ApiService.GlobalWafShowPackageExecute(r) +} + +/* +GlobalWafShowPackage Get WAF package details + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param packageId + @return ApiGlobalWafShowPackageRequest +*/ +func (a *WAFApiService) GlobalWafShowPackage(ctx context.Context, packageId string) ApiGlobalWafShowPackageRequest { + return ApiGlobalWafShowPackageRequest{ + ApiService: a, + ctx: ctx, + packageId: packageId, + } +} + +// Execute executes the request +// @return WafPackageDetailsData +func (a *WAFApiService) GlobalWafShowPackageExecute(r ApiGlobalWafShowPackageRequest) (*WafPackageDetailsData, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *WafPackageDetailsData + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WAFApiService.GlobalWafShowPackage") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/waf/packages/{packageId}" + localVarPath = strings.Replace(localVarPath, "{"+"packageId"+"}", url.PathEscape(parameterValueToString(r.packageId, "packageId")), -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 + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 ApiWafIndexRequest struct { + ctx context.Context + ApiService *WAFApiService + domain string +} + +func (r ApiWafIndexRequest) Execute() (*DomainWafData, *http.Response, error) { + return r.ApiService.WafIndexExecute(r) +} + +/* +WafIndex Get WAF configuration + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiWafIndexRequest + +Deprecated +*/ +func (a *WAFApiService) WafIndex(ctx context.Context, domain string) ApiWafIndexRequest { + return ApiWafIndexRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return DomainWafData +// Deprecated +func (a *WAFApiService) WafIndexExecute(r ApiWafIndexRequest) (*DomainWafData, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DomainWafData + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WAFApiService.WafIndex") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/waf" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -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 + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 ApiWafPackageReprioritizeRequest struct { + ctx context.Context + ApiService *WAFApiService + domain string + wafReprioritize *WafReprioritize +} + +func (r ApiWafPackageReprioritizeRequest) WafReprioritize(wafReprioritize WafReprioritize) ApiWafPackageReprioritizeRequest { + r.wafReprioritize = &wafReprioritize + return r +} + +func (r ApiWafPackageReprioritizeRequest) Execute() (*MessageResponse, *http.Response, error) { + return r.ApiService.WafPackageReprioritizeExecute(r) +} + +/* +WafPackageReprioritize Change priority of WAF packages + +You can choose a WAF package and request to put it after or before another one. +You should only provide either after_package_id or before_package_id (and not both of them). + + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiWafPackageReprioritizeRequest +*/ +func (a *WAFApiService) WafPackageReprioritize(ctx context.Context, domain string) ApiWafPackageReprioritizeRequest { + return ApiWafPackageReprioritizeRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return MessageResponse +func (a *WAFApiService) WafPackageReprioritizeExecute(r ApiWafPackageReprioritizeRequest) (*MessageResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MessageResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WAFApiService.WafPackageReprioritize") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/waf/actions/reprioritize-package" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -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.wafReprioritize + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 ApiWafPackagesDestroyRequest struct { + ctx context.Context + ApiService *WAFApiService + domain string + id string +} + +func (r ApiWafPackagesDestroyRequest) Execute() (*MessageResponse, *http.Response, error) { + return r.ApiService.WafPackagesDestroyExecute(r) +} + +/* +WafPackagesDestroy Delete WAF package from domain + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @param id + @return ApiWafPackagesDestroyRequest +*/ +func (a *WAFApiService) WafPackagesDestroy(ctx context.Context, domain string, id string) ApiWafPackagesDestroyRequest { + return ApiWafPackagesDestroyRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + id: id, + } +} + +// Execute executes the request +// @return MessageResponse +func (a *WAFApiService) WafPackagesDestroyExecute(r ApiWafPackagesDestroyRequest) (*MessageResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MessageResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WAFApiService.WafPackagesDestroy") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/waf/packages/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -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 + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 ApiWafPackagesIndexRequest struct { + ctx context.Context + ApiService *WAFApiService + domain string + available *bool +} + +func (r ApiWafPackagesIndexRequest) Available(available bool) ApiWafPackagesIndexRequest { + r.available = &available + return r +} + +func (r ApiWafPackagesIndexRequest) Execute() (*DomainWafPackagesData, *http.Response, error) { + return r.ApiService.WafPackagesIndexExecute(r) +} + +/* +WafPackagesIndex Get WAF packages + +By passing `available` parameter in query string, it will return available packages for this domain. +Otherwise it lists currently added packages. + + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiWafPackagesIndexRequest +*/ +func (a *WAFApiService) WafPackagesIndex(ctx context.Context, domain string) ApiWafPackagesIndexRequest { + return ApiWafPackagesIndexRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return DomainWafPackagesData +func (a *WAFApiService) WafPackagesIndexExecute(r ApiWafPackagesIndexRequest) (*DomainWafPackagesData, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DomainWafPackagesData + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WAFApiService.WafPackagesIndex") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/waf/packages" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.available != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "available", r.available, "") + } + // 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["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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 ApiWafPackagesShowRequest struct { + ctx context.Context + ApiService *WAFApiService + domain string + id string +} + +func (r ApiWafPackagesShowRequest) Execute() (*DomainWafPackageDetailsData, *http.Response, error) { + return r.ApiService.WafPackagesShowExecute(r) +} + +/* +WafPackagesShow Get WAF package information + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @param id + @return ApiWafPackagesShowRequest +*/ +func (a *WAFApiService) WafPackagesShow(ctx context.Context, domain string, id string) ApiWafPackagesShowRequest { + return ApiWafPackagesShowRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + id: id, + } +} + +// Execute executes the request +// @return DomainWafPackageDetailsData +func (a *WAFApiService) WafPackagesShowExecute(r ApiWafPackagesShowRequest) (*DomainWafPackageDetailsData, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DomainWafPackageDetailsData + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WAFApiService.WafPackagesShow") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/waf/packages/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -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 + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 ApiWafPackagesStoreRequest struct { + ctx context.Context + ApiService *WAFApiService + domain string + domainWafPackageStore *DomainWafPackageStore +} + +func (r ApiWafPackagesStoreRequest) DomainWafPackageStore(domainWafPackageStore DomainWafPackageStore) ApiWafPackagesStoreRequest { + r.domainWafPackageStore = &domainWafPackageStore + return r +} + +func (r ApiWafPackagesStoreRequest) Execute() (*WafPackagesStore200Response, *http.Response, error) { + return r.ApiService.WafPackagesStoreExecute(r) +} + +/* +WafPackagesStore Add new WAF package to domain + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiWafPackagesStoreRequest +*/ +func (a *WAFApiService) WafPackagesStore(ctx context.Context, domain string) ApiWafPackagesStoreRequest { + return ApiWafPackagesStoreRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return WafPackagesStore200Response +func (a *WAFApiService) WafPackagesStoreExecute(r ApiWafPackagesStoreRequest) (*WafPackagesStore200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *WafPackagesStore200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WAFApiService.WafPackagesStore") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/waf/packages" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -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.domainWafPackageStore + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 ApiWafPackagesUpdateRequest struct { + ctx context.Context + ApiService *WAFApiService + domain string + id string + domainWafPackage *DomainWafPackage +} + +func (r ApiWafPackagesUpdateRequest) DomainWafPackage(domainWafPackage DomainWafPackage) ApiWafPackagesUpdateRequest { + r.domainWafPackage = &domainWafPackage + return r +} + +func (r ApiWafPackagesUpdateRequest) Execute() (*WafPackagesUpdate200Response, *http.Response, error) { + return r.ApiService.WafPackagesUpdateExecute(r) +} + +/* +WafPackagesUpdate Update the WAF package + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @param id + @return ApiWafPackagesUpdateRequest +*/ +func (a *WAFApiService) WafPackagesUpdate(ctx context.Context, domain string, id string) ApiWafPackagesUpdateRequest { + return ApiWafPackagesUpdateRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + id: id, + } +} + +// Execute executes the request +// @return WafPackagesUpdate200Response +func (a *WAFApiService) WafPackagesUpdateExecute(r ApiWafPackagesUpdateRequest) (*WafPackagesUpdate200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *WafPackagesUpdate200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WAFApiService.WafPackagesUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/waf/packages/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -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.domainWafPackage + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 ApiWafReconfigureRequest struct { + ctx context.Context + ApiService *WAFApiService + domain string + wafReconfigure *WafReconfigure +} + +func (r ApiWafReconfigureRequest) WafReconfigure(wafReconfigure WafReconfigure) ApiWafReconfigureRequest { + r.wafReconfigure = &wafReconfigure + return r +} + +func (r ApiWafReconfigureRequest) Execute() (*MessageResponse, *http.Response, error) { + return r.ApiService.WafReconfigureExecute(r) +} + +/* +WafReconfigure Reconfigure WAF module using a preset + +It remove all existing WAF packages and configures packages as defined in the preset + + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiWafReconfigureRequest +*/ +func (a *WAFApiService) WafReconfigure(ctx context.Context, domain string) ApiWafReconfigureRequest { + return ApiWafReconfigureRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return MessageResponse +func (a *WAFApiService) WafReconfigureExecute(r ApiWafReconfigureRequest) (*MessageResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MessageResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WAFApiService.WafReconfigure") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/waf/actions/reconfigure" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -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.wafReconfigure + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 ApiWafReprioritizeRequest struct { + ctx context.Context + ApiService *WAFApiService + domain string + reprioritizeRuleRequest *ReprioritizeRuleRequest +} + +func (r ApiWafReprioritizeRequest) ReprioritizeRuleRequest(reprioritizeRuleRequest ReprioritizeRuleRequest) ApiWafReprioritizeRequest { + r.reprioritizeRuleRequest = &reprioritizeRuleRequest + return r +} + +func (r ApiWafReprioritizeRequest) Execute() (*MessageResponse, *http.Response, error) { + return r.ApiService.WafReprioritizeExecute(r) +} + +/* +WafReprioritize Change priority of WAF rules + +You can choose a WAF rule and request to put it after or before another rule. +You should only provide either after_rule_id or before_rule_id (and not both of them). + + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiWafReprioritizeRequest +*/ +func (a *WAFApiService) WafReprioritize(ctx context.Context, domain string) ApiWafReprioritizeRequest { + return ApiWafReprioritizeRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return MessageResponse +func (a *WAFApiService) WafReprioritizeExecute(r ApiWafReprioritizeRequest) (*MessageResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MessageResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WAFApiService.WafReprioritize") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/waf/actions/reprioritize" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -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.reprioritizeRuleRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 ApiWafRulesDestroyRequest struct { + ctx context.Context + ApiService *WAFApiService + domain string + id string +} + +func (r ApiWafRulesDestroyRequest) Execute() (*MessageResponse, *http.Response, error) { + return r.ApiService.WafRulesDestroyExecute(r) +} + +/* +WafRulesDestroy Delete WAF rule + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @param id + @return ApiWafRulesDestroyRequest +*/ +func (a *WAFApiService) WafRulesDestroy(ctx context.Context, domain string, id string) ApiWafRulesDestroyRequest { + return ApiWafRulesDestroyRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + id: id, + } +} + +// Execute executes the request +// @return MessageResponse +func (a *WAFApiService) WafRulesDestroyExecute(r ApiWafRulesDestroyRequest) (*MessageResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MessageResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WAFApiService.WafRulesDestroy") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/waf/rules/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -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 + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 ApiWafRulesIndexRequest struct { + ctx context.Context + ApiService *WAFApiService + domain string + perPage *int32 + orderBy *string + orderType *string + search *string +} + +func (r ApiWafRulesIndexRequest) PerPage(perPage int32) ApiWafRulesIndexRequest { + r.perPage = &perPage + return r +} + +func (r ApiWafRulesIndexRequest) OrderBy(orderBy string) ApiWafRulesIndexRequest { + r.orderBy = &orderBy + return r +} + +func (r ApiWafRulesIndexRequest) OrderType(orderType string) ApiWafRulesIndexRequest { + r.orderType = &orderType + return r +} + +func (r ApiWafRulesIndexRequest) Search(search string) ApiWafRulesIndexRequest { + r.search = &search + return r +} + +func (r ApiWafRulesIndexRequest) Execute() (*WafRulesIndex200Response, *http.Response, error) { + return r.ApiService.WafRulesIndexExecute(r) +} + +/* +WafRulesIndex Get WAF Rules + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiWafRulesIndexRequest +*/ +func (a *WAFApiService) WafRulesIndex(ctx context.Context, domain string) ApiWafRulesIndexRequest { + return ApiWafRulesIndexRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return WafRulesIndex200Response +func (a *WAFApiService) WafRulesIndexExecute(r ApiWafRulesIndexRequest) (*WafRulesIndex200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *WafRulesIndex200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WAFApiService.WafRulesIndex") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/waf/rules" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.perPage != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "per_page", r.perPage, "") + } + if r.orderBy != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "order_by", r.orderBy, "") + } + if r.orderType != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "order_type", r.orderType, "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") + } + // 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["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 ApiWafRulesShowRequest struct { + ctx context.Context + ApiService *WAFApiService + domain string + id string +} + +func (r ApiWafRulesShowRequest) Execute() (*WafRuleResponse, *http.Response, error) { + return r.ApiService.WafRulesShowExecute(r) +} + +/* +WafRulesShow Get WAF rule information + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @param id + @return ApiWafRulesShowRequest +*/ +func (a *WAFApiService) WafRulesShow(ctx context.Context, domain string, id string) ApiWafRulesShowRequest { + return ApiWafRulesShowRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + id: id, + } +} + +// Execute executes the request +// @return WafRuleResponse +func (a *WAFApiService) WafRulesShowExecute(r ApiWafRulesShowRequest) (*WafRuleResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *WafRuleResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WAFApiService.WafRulesShow") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/waf/rules/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -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 + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 ApiWafRulesStoreRequest struct { + ctx context.Context + ApiService *WAFApiService + domain string + wafRule *WafRule +} + +func (r ApiWafRulesStoreRequest) WafRule(wafRule WafRule) ApiWafRulesStoreRequest { + r.wafRule = &wafRule + return r +} + +func (r ApiWafRulesStoreRequest) Execute() (*WafRuleResponse, *http.Response, error) { + return r.ApiService.WafRulesStoreExecute(r) +} + +/* +WafRulesStore Create new WAF rule + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiWafRulesStoreRequest +*/ +func (a *WAFApiService) WafRulesStore(ctx context.Context, domain string) ApiWafRulesStoreRequest { + return ApiWafRulesStoreRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return WafRuleResponse +func (a *WAFApiService) WafRulesStoreExecute(r ApiWafRulesStoreRequest) (*WafRuleResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *WafRuleResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WAFApiService.WafRulesStore") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/waf/rules" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -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.wafRule + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 ApiWafRulesUpdateRequest struct { + ctx context.Context + ApiService *WAFApiService + domain string + id string + wafRule *WafRule +} + +func (r ApiWafRulesUpdateRequest) WafRule(wafRule WafRule) ApiWafRulesUpdateRequest { + r.wafRule = &wafRule + return r +} + +func (r ApiWafRulesUpdateRequest) Execute() (*WafRuleResponse, *http.Response, error) { + return r.ApiService.WafRulesUpdateExecute(r) +} + +/* +WafRulesUpdate Update the WAF rule + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @param id + @return ApiWafRulesUpdateRequest +*/ +func (a *WAFApiService) WafRulesUpdate(ctx context.Context, domain string, id string) ApiWafRulesUpdateRequest { + return ApiWafRulesUpdateRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + id: id, + } +} + +// Execute executes the request +// @return WafRuleResponse +func (a *WAFApiService) WafRulesUpdateExecute(r ApiWafRulesUpdateRequest) (*WafRuleResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *WafRuleResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WAFApiService.WafRulesUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/waf/rules/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -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.wafRule + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 ApiWafSettingsIndexRequest struct { + ctx context.Context + ApiService *WAFApiService + domain string +} + +func (r ApiWafSettingsIndexRequest) Execute() (*WafSettingsData, *http.Response, error) { + return r.ApiService.WafSettingsIndexExecute(r) +} + +/* +WafSettingsIndex Get WAF configuration + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiWafSettingsIndexRequest +*/ +func (a *WAFApiService) WafSettingsIndex(ctx context.Context, domain string) ApiWafSettingsIndexRequest { + return ApiWafSettingsIndexRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return WafSettingsData +func (a *WAFApiService) WafSettingsIndexExecute(r ApiWafSettingsIndexRequest) (*WafSettingsData, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *WafSettingsData + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WAFApiService.WafSettingsIndex") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/waf/settings" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -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 + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 ApiWafSettingsUpdateRequest struct { + ctx context.Context + ApiService *WAFApiService + domain string + wafSettings *WafSettings +} + +func (r ApiWafSettingsUpdateRequest) WafSettings(wafSettings WafSettings) ApiWafSettingsUpdateRequest { + r.wafSettings = &wafSettings + return r +} + +func (r ApiWafSettingsUpdateRequest) Execute() (*WafSettingsData, *http.Response, error) { + return r.ApiService.WafSettingsUpdateExecute(r) +} + +/* +WafSettingsUpdate Configure WAF module of the domain + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiWafSettingsUpdateRequest +*/ +func (a *WAFApiService) WafSettingsUpdate(ctx context.Context, domain string) ApiWafSettingsUpdateRequest { + return ApiWafSettingsUpdateRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return WafSettingsData +func (a *WAFApiService) WafSettingsUpdateExecute(r ApiWafSettingsUpdateRequest) (*WafSettingsData, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *WafSettingsData + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WAFApiService.WafSettingsUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/waf/settings" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -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.wafSettings + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 + } + if localVarHTTPResponse.StatusCode == 422 { + var v DomainsStore422Response + 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 ApiWafUpdateRequest struct { + ctx context.Context + ApiService *WAFApiService + domain string + waf *Waf +} + +func (r ApiWafUpdateRequest) Waf(waf Waf) ApiWafUpdateRequest { + r.waf = &waf + return r +} + +func (r ApiWafUpdateRequest) Execute() (*DomainWafData, *http.Response, error) { + return r.ApiService.WafUpdateExecute(r) +} + +/* +WafUpdate Configure WAF module of the domain + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param domain Domain name + @return ApiWafUpdateRequest + +Deprecated +*/ +func (a *WAFApiService) WafUpdate(ctx context.Context, domain string) ApiWafUpdateRequest { + return ApiWafUpdateRequest{ + ApiService: a, + ctx: ctx, + domain: domain, + } +} + +// Execute executes the request +// @return DomainWafData +// Deprecated +func (a *WAFApiService) WafUpdateExecute(r ApiWafUpdateRequest) (*DomainWafData, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DomainWafData + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WAFApiService.WafUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/domains/{domain}/waf" + localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(parameterValueToString(r.domain, "domain")), -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.waf + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = 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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v MessageResponse + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v DomainsShow404Response + 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 + } + if localVarHTTPResponse.StatusCode == 422 { + var v DomainsStore422Response + 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 new file mode 100644 index 0000000..c371ffb --- /dev/null +++ b/client.go @@ -0,0 +1,727 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +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" + +) + +var ( + jsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:vnd\.[^;]+\+)?json)`) + xmlCheck = regexp.MustCompile(`(?i:(?:application|text)/xml)`) + queryParamSplit = regexp.MustCompile(`(^|&)([^&]+)`) + queryDescape = strings.NewReplacer( "%5B", "[", "%5D", "]" ) +) + +// APIClient manages communication with the ArvanCloud CDN Services API v4.99.2 +// 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 + + AccelerationApi *AccelerationApiService + + ActiveHealthCheckApi *ActiveHealthCheckApiService + + CDNAppsApi *CDNAppsApiService + + CachingApi *CachingApiService + + CustomPagesApi *CustomPagesApiService + + DDoSApi *DDoSApiService + + DNSManagementApi *DNSManagementApiService + + DomainApi *DomainApiService + + DomainTransferApi *DomainTransferApiService + + EmailForwardingApi *EmailForwardingApiService + + FirewallApi *FirewallApiService + + ListApi *ListApiService + + LoadBalancingApi *LoadBalancingApiService + + LogForwardersApi *LogForwardersApiService + + PageRuleApi *PageRuleApiService + + PlanApi *PlanApiService + + RateLimitingApi *RateLimitingApiService + + RedirectApi *RedirectApiService + + ReportsApi *ReportsApiService + + SSLTLSApi *SSLTLSApiService + + TransportLayerProxyApi *TransportLayerProxyApiService + + TroubleshootApi *TroubleshootApiService + + WAFApi *WAFApiService +} + +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 + + // API Services + c.AccelerationApi = (*AccelerationApiService)(&c.common) + c.ActiveHealthCheckApi = (*ActiveHealthCheckApiService)(&c.common) + c.CDNAppsApi = (*CDNAppsApiService)(&c.common) + c.CachingApi = (*CachingApiService)(&c.common) + c.CustomPagesApi = (*CustomPagesApiService)(&c.common) + c.DDoSApi = (*DDoSApiService)(&c.common) + c.DNSManagementApi = (*DNSManagementApiService)(&c.common) + c.DomainApi = (*DomainApiService)(&c.common) + c.DomainTransferApi = (*DomainTransferApiService)(&c.common) + c.EmailForwardingApi = (*EmailForwardingApiService)(&c.common) + c.FirewallApi = (*FirewallApiService)(&c.common) + c.ListApi = (*ListApiService)(&c.common) + c.LoadBalancingApi = (*LoadBalancingApiService)(&c.common) + c.LogForwardersApi = (*LogForwardersApiService)(&c.common) + c.PageRuleApi = (*PageRuleApiService)(&c.common) + c.PlanApi = (*PlanApiService)(&c.common) + c.RateLimitingApi = (*RateLimitingApiService)(&c.common) + c.RedirectApi = (*RedirectApiService)(&c.common) + c.ReportsApi = (*ReportsApiService)(&c.common) + c.SSLTLSApi = (*SSLTLSApiService)(&c.common) + c.TransportLayerProxyApi = (*TransportLayerProxyApiService)(&c.common) + c.TroubleshootApi = (*TroubleshootApiService)(&c.common) + c.WAFApi = (*WAFApiService)(&c.common) + + 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{}, 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, collectionType) + return + } + if t, ok := obj.(time.Time); ok { + parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, t.Format(time.RFC3339), 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. + + // AccessToken Authentication + if auth, ok := ctx.Value(ContextAccessToken).(string); ok { + localVarRequest.Header.Add("Authorization", "Bearer "+auth) + } + + } + + for header, value := range c.cfg.DefaultHeader { + localVarRequest.Header.Add(header, value) + } + 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 +} + +// Prevent trying to import "fmt" +func reportError(format string, a ...interface{}) error { + return fmt.Errorf(format, a...) +} + +// A wrapper for strict JSON decoding +func newStrictDecoder(data []byte) *json.Decoder { + dec := json.NewDecoder(bytes.NewBuffer(data)) + dec.DisallowUnknownFields() + return dec +} + +// 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) { + err = xml.NewEncoder(bodyBuf).Encode(body) + } + + 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/configuration.go b/configuration.go new file mode 100644 index 0000000..f65d391 --- /dev/null +++ b/configuration.go @@ -0,0 +1,221 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +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 ( + // ContextAccessToken takes a string oauth2 access token as authentication for the request. + ContextAccessToken = contextKey("accesstoken") + + // 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: "r1c-cdn-sdk", + Debug: false, + Servers: ServerConfigurations{ + { + URL: "https://napi.arvancloud.ir/cdn/4.0", + Description: "Production server (uses live data)", + }, + }, + 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/AAAARecord.md b/docs/AAAARecord.md new file mode 100644 index 0000000..6b2a3b8 --- /dev/null +++ b/docs/AAAARecord.md @@ -0,0 +1,342 @@ +# AAAARecord + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | Pointer to [**[]AAAARecordValue**](AAAARecordValue.md) | | [optional] +**Type** | Pointer to **string** | | [optional] [default to "aaaa"] +**Id** | Pointer to **string** | | [optional] [readonly] +**Name** | Pointer to **string** | | [optional] +**Ttl** | Pointer to **int32** | | [optional] +**Cloud** | Pointer to **bool** | | [optional] [default to false] +**UpstreamHttps** | Pointer to **string** | | [optional] +**IpFilterMode** | Pointer to [**DnsRecordIpFilterMode**](DnsRecordIpFilterMode.md) | | [optional] +**IsProtected** | Pointer to **bool** | Protected records cannot be modified or deleted by user. | [optional] [readonly] [default to false] +**Usage** | Pointer to **[]string** | | [optional] [readonly] [default to []] +**CreatedAt** | Pointer to **time.Time** | | [optional] [readonly] +**UpdatedAt** | Pointer to **time.Time** | | [optional] [readonly] + +## Methods + +### NewAAAARecord + +`func NewAAAARecord() *AAAARecord` + +NewAAAARecord instantiates a new AAAARecord object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewAAAARecordWithDefaults + +`func NewAAAARecordWithDefaults() *AAAARecord` + +NewAAAARecordWithDefaults instantiates a new AAAARecord object +This 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 *AAAARecord) GetValue() []AAAARecordValue` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *AAAARecord) GetValueOk() (*[]AAAARecordValue, 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 *AAAARecord) SetValue(v []AAAARecordValue)` + +SetValue sets Value field to given value. + +### HasValue + +`func (o *AAAARecord) HasValue() bool` + +HasValue returns a boolean if a field has been set. + +### GetType + +`func (o *AAAARecord) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *AAAARecord) 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 *AAAARecord) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *AAAARecord) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetId + +`func (o *AAAARecord) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *AAAARecord) 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 *AAAARecord) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *AAAARecord) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetName + +`func (o *AAAARecord) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *AAAARecord) 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 *AAAARecord) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *AAAARecord) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetTtl + +`func (o *AAAARecord) GetTtl() int32` + +GetTtl returns the Ttl field if non-nil, zero value otherwise. + +### GetTtlOk + +`func (o *AAAARecord) GetTtlOk() (*int32, bool)` + +GetTtlOk returns a tuple with the Ttl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTtl + +`func (o *AAAARecord) SetTtl(v int32)` + +SetTtl sets Ttl field to given value. + +### HasTtl + +`func (o *AAAARecord) HasTtl() bool` + +HasTtl returns a boolean if a field has been set. + +### GetCloud + +`func (o *AAAARecord) GetCloud() bool` + +GetCloud returns the Cloud field if non-nil, zero value otherwise. + +### GetCloudOk + +`func (o *AAAARecord) GetCloudOk() (*bool, bool)` + +GetCloudOk returns a tuple with the Cloud field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCloud + +`func (o *AAAARecord) SetCloud(v bool)` + +SetCloud sets Cloud field to given value. + +### HasCloud + +`func (o *AAAARecord) HasCloud() bool` + +HasCloud returns a boolean if a field has been set. + +### GetUpstreamHttps + +`func (o *AAAARecord) GetUpstreamHttps() string` + +GetUpstreamHttps returns the UpstreamHttps field if non-nil, zero value otherwise. + +### GetUpstreamHttpsOk + +`func (o *AAAARecord) GetUpstreamHttpsOk() (*string, bool)` + +GetUpstreamHttpsOk returns a tuple with the UpstreamHttps field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpstreamHttps + +`func (o *AAAARecord) SetUpstreamHttps(v string)` + +SetUpstreamHttps sets UpstreamHttps field to given value. + +### HasUpstreamHttps + +`func (o *AAAARecord) HasUpstreamHttps() bool` + +HasUpstreamHttps returns a boolean if a field has been set. + +### GetIpFilterMode + +`func (o *AAAARecord) GetIpFilterMode() DnsRecordIpFilterMode` + +GetIpFilterMode returns the IpFilterMode field if non-nil, zero value otherwise. + +### GetIpFilterModeOk + +`func (o *AAAARecord) GetIpFilterModeOk() (*DnsRecordIpFilterMode, bool)` + +GetIpFilterModeOk returns a tuple with the IpFilterMode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIpFilterMode + +`func (o *AAAARecord) SetIpFilterMode(v DnsRecordIpFilterMode)` + +SetIpFilterMode sets IpFilterMode field to given value. + +### HasIpFilterMode + +`func (o *AAAARecord) HasIpFilterMode() bool` + +HasIpFilterMode returns a boolean if a field has been set. + +### GetIsProtected + +`func (o *AAAARecord) GetIsProtected() bool` + +GetIsProtected returns the IsProtected field if non-nil, zero value otherwise. + +### GetIsProtectedOk + +`func (o *AAAARecord) GetIsProtectedOk() (*bool, bool)` + +GetIsProtectedOk returns a tuple with the IsProtected field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsProtected + +`func (o *AAAARecord) SetIsProtected(v bool)` + +SetIsProtected sets IsProtected field to given value. + +### HasIsProtected + +`func (o *AAAARecord) HasIsProtected() bool` + +HasIsProtected returns a boolean if a field has been set. + +### GetUsage + +`func (o *AAAARecord) GetUsage() []string` + +GetUsage returns the Usage field if non-nil, zero value otherwise. + +### GetUsageOk + +`func (o *AAAARecord) GetUsageOk() (*[]string, bool)` + +GetUsageOk returns a tuple with the Usage field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUsage + +`func (o *AAAARecord) SetUsage(v []string)` + +SetUsage sets Usage field to given value. + +### HasUsage + +`func (o *AAAARecord) HasUsage() bool` + +HasUsage returns a boolean if a field has been set. + +### GetCreatedAt + +`func (o *AAAARecord) GetCreatedAt() time.Time` + +GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. + +### GetCreatedAtOk + +`func (o *AAAARecord) GetCreatedAtOk() (*time.Time, bool)` + +GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedAt + +`func (o *AAAARecord) SetCreatedAt(v time.Time)` + +SetCreatedAt sets CreatedAt field to given value. + +### HasCreatedAt + +`func (o *AAAARecord) HasCreatedAt() bool` + +HasCreatedAt returns a boolean if a field has been set. + +### GetUpdatedAt + +`func (o *AAAARecord) GetUpdatedAt() time.Time` + +GetUpdatedAt returns the UpdatedAt field if non-nil, zero value otherwise. + +### GetUpdatedAtOk + +`func (o *AAAARecord) GetUpdatedAtOk() (*time.Time, bool)` + +GetUpdatedAtOk returns a tuple with the UpdatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpdatedAt + +`func (o *AAAARecord) SetUpdatedAt(v time.Time)` + +SetUpdatedAt sets UpdatedAt field to given value. + +### HasUpdatedAt + +`func (o *AAAARecord) HasUpdatedAt() bool` + +HasUpdatedAt returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/AAAARecordValue.md b/docs/AAAARecordValue.md new file mode 100644 index 0000000..14aee02 --- /dev/null +++ b/docs/AAAARecordValue.md @@ -0,0 +1,185 @@ +# AAAARecordValue + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Ip** | **string** | | +**Port** | Pointer to **NullableInt32** | | [optional] +**Weight** | Pointer to **NullableInt32** | | [optional] +**OriginalWeight** | Pointer to **int32** | This key shows itself here if the weights have been changed by Health Check. | [optional] [readonly] +**Country** | Pointer to **NullableString** | ISO 3166 alpha-2 country code | [optional] + +## Methods + +### NewAAAARecordValue + +`func NewAAAARecordValue(ip string, ) *AAAARecordValue` + +NewAAAARecordValue instantiates a new AAAARecordValue object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewAAAARecordValueWithDefaults + +`func NewAAAARecordValueWithDefaults() *AAAARecordValue` + +NewAAAARecordValueWithDefaults instantiates a new AAAARecordValue object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetIp + +`func (o *AAAARecordValue) GetIp() string` + +GetIp returns the Ip field if non-nil, zero value otherwise. + +### GetIpOk + +`func (o *AAAARecordValue) GetIpOk() (*string, bool)` + +GetIpOk returns a tuple with the Ip field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIp + +`func (o *AAAARecordValue) SetIp(v string)` + +SetIp sets Ip field to given value. + + +### GetPort + +`func (o *AAAARecordValue) GetPort() int32` + +GetPort returns the Port field if non-nil, zero value otherwise. + +### GetPortOk + +`func (o *AAAARecordValue) GetPortOk() (*int32, bool)` + +GetPortOk returns a tuple with the Port field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPort + +`func (o *AAAARecordValue) SetPort(v int32)` + +SetPort sets Port field to given value. + +### HasPort + +`func (o *AAAARecordValue) HasPort() bool` + +HasPort returns a boolean if a field has been set. + +### SetPortNil + +`func (o *AAAARecordValue) SetPortNil(b bool)` + + SetPortNil sets the value for Port to be an explicit nil + +### UnsetPort +`func (o *AAAARecordValue) UnsetPort()` + +UnsetPort ensures that no value is present for Port, not even an explicit nil +### GetWeight + +`func (o *AAAARecordValue) GetWeight() int32` + +GetWeight returns the Weight field if non-nil, zero value otherwise. + +### GetWeightOk + +`func (o *AAAARecordValue) GetWeightOk() (*int32, bool)` + +GetWeightOk returns a tuple with the Weight field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetWeight + +`func (o *AAAARecordValue) SetWeight(v int32)` + +SetWeight sets Weight field to given value. + +### HasWeight + +`func (o *AAAARecordValue) HasWeight() bool` + +HasWeight returns a boolean if a field has been set. + +### SetWeightNil + +`func (o *AAAARecordValue) SetWeightNil(b bool)` + + SetWeightNil sets the value for Weight to be an explicit nil + +### UnsetWeight +`func (o *AAAARecordValue) UnsetWeight()` + +UnsetWeight ensures that no value is present for Weight, not even an explicit nil +### GetOriginalWeight + +`func (o *AAAARecordValue) GetOriginalWeight() int32` + +GetOriginalWeight returns the OriginalWeight field if non-nil, zero value otherwise. + +### GetOriginalWeightOk + +`func (o *AAAARecordValue) GetOriginalWeightOk() (*int32, bool)` + +GetOriginalWeightOk returns a tuple with the OriginalWeight field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOriginalWeight + +`func (o *AAAARecordValue) SetOriginalWeight(v int32)` + +SetOriginalWeight sets OriginalWeight field to given value. + +### HasOriginalWeight + +`func (o *AAAARecordValue) HasOriginalWeight() bool` + +HasOriginalWeight returns a boolean if a field has been set. + +### GetCountry + +`func (o *AAAARecordValue) GetCountry() string` + +GetCountry returns the Country field if non-nil, zero value otherwise. + +### GetCountryOk + +`func (o *AAAARecordValue) 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 *AAAARecordValue) SetCountry(v string)` + +SetCountry sets Country field to given value. + +### HasCountry + +`func (o *AAAARecordValue) HasCountry() bool` + +HasCountry returns a boolean if a field has been set. + +### SetCountryNil + +`func (o *AAAARecordValue) SetCountryNil(b bool)` + + SetCountryNil sets the value for Country to be an explicit nil + +### UnsetCountry +`func (o *AAAARecordValue) UnsetCountry()` + +UnsetCountry ensures that no value is present for Country, not even an explicit nil + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/ANAMERecord.md b/docs/ANAMERecord.md new file mode 100644 index 0000000..7a1549d --- /dev/null +++ b/docs/ANAMERecord.md @@ -0,0 +1,342 @@ +# ANAMERecord + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | Pointer to [**ANAMERecordValue**](ANAMERecordValue.md) | | [optional] +**Type** | Pointer to **string** | | [optional] [default to "aname"] +**Id** | Pointer to **string** | | [optional] [readonly] +**Name** | Pointer to **string** | | [optional] +**Ttl** | Pointer to **int32** | | [optional] +**Cloud** | Pointer to **bool** | | [optional] [default to false] +**UpstreamHttps** | Pointer to **string** | | [optional] +**IpFilterMode** | Pointer to [**DnsRecordIpFilterMode**](DnsRecordIpFilterMode.md) | | [optional] +**IsProtected** | Pointer to **bool** | Protected records cannot be modified or deleted by user. | [optional] [readonly] [default to false] +**Usage** | Pointer to **[]string** | | [optional] [readonly] [default to []] +**CreatedAt** | Pointer to **time.Time** | | [optional] [readonly] +**UpdatedAt** | Pointer to **time.Time** | | [optional] [readonly] + +## Methods + +### NewANAMERecord + +`func NewANAMERecord() *ANAMERecord` + +NewANAMERecord instantiates a new ANAMERecord object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewANAMERecordWithDefaults + +`func NewANAMERecordWithDefaults() *ANAMERecord` + +NewANAMERecordWithDefaults instantiates a new ANAMERecord object +This 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 *ANAMERecord) GetValue() ANAMERecordValue` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *ANAMERecord) GetValueOk() (*ANAMERecordValue, 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 *ANAMERecord) SetValue(v ANAMERecordValue)` + +SetValue sets Value field to given value. + +### HasValue + +`func (o *ANAMERecord) HasValue() bool` + +HasValue returns a boolean if a field has been set. + +### GetType + +`func (o *ANAMERecord) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *ANAMERecord) 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 *ANAMERecord) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *ANAMERecord) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetId + +`func (o *ANAMERecord) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *ANAMERecord) 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 *ANAMERecord) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *ANAMERecord) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetName + +`func (o *ANAMERecord) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ANAMERecord) 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 *ANAMERecord) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *ANAMERecord) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetTtl + +`func (o *ANAMERecord) GetTtl() int32` + +GetTtl returns the Ttl field if non-nil, zero value otherwise. + +### GetTtlOk + +`func (o *ANAMERecord) GetTtlOk() (*int32, bool)` + +GetTtlOk returns a tuple with the Ttl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTtl + +`func (o *ANAMERecord) SetTtl(v int32)` + +SetTtl sets Ttl field to given value. + +### HasTtl + +`func (o *ANAMERecord) HasTtl() bool` + +HasTtl returns a boolean if a field has been set. + +### GetCloud + +`func (o *ANAMERecord) GetCloud() bool` + +GetCloud returns the Cloud field if non-nil, zero value otherwise. + +### GetCloudOk + +`func (o *ANAMERecord) GetCloudOk() (*bool, bool)` + +GetCloudOk returns a tuple with the Cloud field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCloud + +`func (o *ANAMERecord) SetCloud(v bool)` + +SetCloud sets Cloud field to given value. + +### HasCloud + +`func (o *ANAMERecord) HasCloud() bool` + +HasCloud returns a boolean if a field has been set. + +### GetUpstreamHttps + +`func (o *ANAMERecord) GetUpstreamHttps() string` + +GetUpstreamHttps returns the UpstreamHttps field if non-nil, zero value otherwise. + +### GetUpstreamHttpsOk + +`func (o *ANAMERecord) GetUpstreamHttpsOk() (*string, bool)` + +GetUpstreamHttpsOk returns a tuple with the UpstreamHttps field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpstreamHttps + +`func (o *ANAMERecord) SetUpstreamHttps(v string)` + +SetUpstreamHttps sets UpstreamHttps field to given value. + +### HasUpstreamHttps + +`func (o *ANAMERecord) HasUpstreamHttps() bool` + +HasUpstreamHttps returns a boolean if a field has been set. + +### GetIpFilterMode + +`func (o *ANAMERecord) GetIpFilterMode() DnsRecordIpFilterMode` + +GetIpFilterMode returns the IpFilterMode field if non-nil, zero value otherwise. + +### GetIpFilterModeOk + +`func (o *ANAMERecord) GetIpFilterModeOk() (*DnsRecordIpFilterMode, bool)` + +GetIpFilterModeOk returns a tuple with the IpFilterMode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIpFilterMode + +`func (o *ANAMERecord) SetIpFilterMode(v DnsRecordIpFilterMode)` + +SetIpFilterMode sets IpFilterMode field to given value. + +### HasIpFilterMode + +`func (o *ANAMERecord) HasIpFilterMode() bool` + +HasIpFilterMode returns a boolean if a field has been set. + +### GetIsProtected + +`func (o *ANAMERecord) GetIsProtected() bool` + +GetIsProtected returns the IsProtected field if non-nil, zero value otherwise. + +### GetIsProtectedOk + +`func (o *ANAMERecord) GetIsProtectedOk() (*bool, bool)` + +GetIsProtectedOk returns a tuple with the IsProtected field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsProtected + +`func (o *ANAMERecord) SetIsProtected(v bool)` + +SetIsProtected sets IsProtected field to given value. + +### HasIsProtected + +`func (o *ANAMERecord) HasIsProtected() bool` + +HasIsProtected returns a boolean if a field has been set. + +### GetUsage + +`func (o *ANAMERecord) GetUsage() []string` + +GetUsage returns the Usage field if non-nil, zero value otherwise. + +### GetUsageOk + +`func (o *ANAMERecord) GetUsageOk() (*[]string, bool)` + +GetUsageOk returns a tuple with the Usage field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUsage + +`func (o *ANAMERecord) SetUsage(v []string)` + +SetUsage sets Usage field to given value. + +### HasUsage + +`func (o *ANAMERecord) HasUsage() bool` + +HasUsage returns a boolean if a field has been set. + +### GetCreatedAt + +`func (o *ANAMERecord) GetCreatedAt() time.Time` + +GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. + +### GetCreatedAtOk + +`func (o *ANAMERecord) GetCreatedAtOk() (*time.Time, bool)` + +GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedAt + +`func (o *ANAMERecord) SetCreatedAt(v time.Time)` + +SetCreatedAt sets CreatedAt field to given value. + +### HasCreatedAt + +`func (o *ANAMERecord) HasCreatedAt() bool` + +HasCreatedAt returns a boolean if a field has been set. + +### GetUpdatedAt + +`func (o *ANAMERecord) GetUpdatedAt() time.Time` + +GetUpdatedAt returns the UpdatedAt field if non-nil, zero value otherwise. + +### GetUpdatedAtOk + +`func (o *ANAMERecord) GetUpdatedAtOk() (*time.Time, bool)` + +GetUpdatedAtOk returns a tuple with the UpdatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpdatedAt + +`func (o *ANAMERecord) SetUpdatedAt(v time.Time)` + +SetUpdatedAt sets UpdatedAt field to given value. + +### HasUpdatedAt + +`func (o *ANAMERecord) HasUpdatedAt() bool` + +HasUpdatedAt returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/ANAMERecordValue.md b/docs/ANAMERecordValue.md new file mode 100644 index 0000000..295bdff --- /dev/null +++ b/docs/ANAMERecordValue.md @@ -0,0 +1,118 @@ +# ANAMERecordValue + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Location** | **string** | A fully-qualified domain name (FQDN) | +**HostHeader** | **NullableString** | | +**Port** | Pointer to **NullableInt32** | | [optional] + +## Methods + +### NewANAMERecordValue + +`func NewANAMERecordValue(location string, hostHeader NullableString, ) *ANAMERecordValue` + +NewANAMERecordValue instantiates a new ANAMERecordValue object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewANAMERecordValueWithDefaults + +`func NewANAMERecordValueWithDefaults() *ANAMERecordValue` + +NewANAMERecordValueWithDefaults instantiates a new ANAMERecordValue object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetLocation + +`func (o *ANAMERecordValue) GetLocation() string` + +GetLocation returns the Location field if non-nil, zero value otherwise. + +### GetLocationOk + +`func (o *ANAMERecordValue) 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 *ANAMERecordValue) SetLocation(v string)` + +SetLocation sets Location field to given value. + + +### GetHostHeader + +`func (o *ANAMERecordValue) GetHostHeader() string` + +GetHostHeader returns the HostHeader field if non-nil, zero value otherwise. + +### GetHostHeaderOk + +`func (o *ANAMERecordValue) GetHostHeaderOk() (*string, bool)` + +GetHostHeaderOk returns a tuple with the HostHeader field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHostHeader + +`func (o *ANAMERecordValue) SetHostHeader(v string)` + +SetHostHeader sets HostHeader field to given value. + + +### SetHostHeaderNil + +`func (o *ANAMERecordValue) SetHostHeaderNil(b bool)` + + SetHostHeaderNil sets the value for HostHeader to be an explicit nil + +### UnsetHostHeader +`func (o *ANAMERecordValue) UnsetHostHeader()` + +UnsetHostHeader ensures that no value is present for HostHeader, not even an explicit nil +### GetPort + +`func (o *ANAMERecordValue) GetPort() int32` + +GetPort returns the Port field if non-nil, zero value otherwise. + +### GetPortOk + +`func (o *ANAMERecordValue) GetPortOk() (*int32, bool)` + +GetPortOk returns a tuple with the Port field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPort + +`func (o *ANAMERecordValue) SetPort(v int32)` + +SetPort sets Port field to given value. + +### HasPort + +`func (o *ANAMERecordValue) HasPort() bool` + +HasPort returns a boolean if a field has been set. + +### SetPortNil + +`func (o *ANAMERecordValue) SetPortNil(b bool)` + + SetPortNil sets the value for Port to be an explicit nil + +### UnsetPort +`func (o *ANAMERecordValue) UnsetPort()` + +UnsetPort ensures that no value is present for Port, not even an explicit nil + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/ARecord.md b/docs/ARecord.md new file mode 100644 index 0000000..e8c5041 --- /dev/null +++ b/docs/ARecord.md @@ -0,0 +1,342 @@ +# ARecord + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | Pointer to [**[]ARecordValue**](ARecordValue.md) | | [optional] +**Type** | Pointer to **string** | | [optional] [default to "a"] +**Id** | Pointer to **string** | | [optional] [readonly] +**Name** | Pointer to **string** | | [optional] +**Ttl** | Pointer to **int32** | | [optional] +**Cloud** | Pointer to **bool** | | [optional] [default to false] +**UpstreamHttps** | Pointer to **string** | | [optional] +**IpFilterMode** | Pointer to [**DnsRecordIpFilterMode**](DnsRecordIpFilterMode.md) | | [optional] +**IsProtected** | Pointer to **bool** | Protected records cannot be modified or deleted by user. | [optional] [readonly] [default to false] +**Usage** | Pointer to **[]string** | | [optional] [readonly] [default to []] +**CreatedAt** | Pointer to **time.Time** | | [optional] [readonly] +**UpdatedAt** | Pointer to **time.Time** | | [optional] [readonly] + +## Methods + +### NewARecord + +`func NewARecord() *ARecord` + +NewARecord instantiates a new ARecord object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewARecordWithDefaults + +`func NewARecordWithDefaults() *ARecord` + +NewARecordWithDefaults instantiates a new ARecord object +This 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 *ARecord) GetValue() []ARecordValue` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *ARecord) GetValueOk() (*[]ARecordValue, 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 *ARecord) SetValue(v []ARecordValue)` + +SetValue sets Value field to given value. + +### HasValue + +`func (o *ARecord) HasValue() bool` + +HasValue returns a boolean if a field has been set. + +### GetType + +`func (o *ARecord) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *ARecord) 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 *ARecord) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *ARecord) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetId + +`func (o *ARecord) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *ARecord) 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 *ARecord) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *ARecord) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetName + +`func (o *ARecord) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ARecord) 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 *ARecord) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *ARecord) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetTtl + +`func (o *ARecord) GetTtl() int32` + +GetTtl returns the Ttl field if non-nil, zero value otherwise. + +### GetTtlOk + +`func (o *ARecord) GetTtlOk() (*int32, bool)` + +GetTtlOk returns a tuple with the Ttl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTtl + +`func (o *ARecord) SetTtl(v int32)` + +SetTtl sets Ttl field to given value. + +### HasTtl + +`func (o *ARecord) HasTtl() bool` + +HasTtl returns a boolean if a field has been set. + +### GetCloud + +`func (o *ARecord) GetCloud() bool` + +GetCloud returns the Cloud field if non-nil, zero value otherwise. + +### GetCloudOk + +`func (o *ARecord) GetCloudOk() (*bool, bool)` + +GetCloudOk returns a tuple with the Cloud field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCloud + +`func (o *ARecord) SetCloud(v bool)` + +SetCloud sets Cloud field to given value. + +### HasCloud + +`func (o *ARecord) HasCloud() bool` + +HasCloud returns a boolean if a field has been set. + +### GetUpstreamHttps + +`func (o *ARecord) GetUpstreamHttps() string` + +GetUpstreamHttps returns the UpstreamHttps field if non-nil, zero value otherwise. + +### GetUpstreamHttpsOk + +`func (o *ARecord) GetUpstreamHttpsOk() (*string, bool)` + +GetUpstreamHttpsOk returns a tuple with the UpstreamHttps field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpstreamHttps + +`func (o *ARecord) SetUpstreamHttps(v string)` + +SetUpstreamHttps sets UpstreamHttps field to given value. + +### HasUpstreamHttps + +`func (o *ARecord) HasUpstreamHttps() bool` + +HasUpstreamHttps returns a boolean if a field has been set. + +### GetIpFilterMode + +`func (o *ARecord) GetIpFilterMode() DnsRecordIpFilterMode` + +GetIpFilterMode returns the IpFilterMode field if non-nil, zero value otherwise. + +### GetIpFilterModeOk + +`func (o *ARecord) GetIpFilterModeOk() (*DnsRecordIpFilterMode, bool)` + +GetIpFilterModeOk returns a tuple with the IpFilterMode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIpFilterMode + +`func (o *ARecord) SetIpFilterMode(v DnsRecordIpFilterMode)` + +SetIpFilterMode sets IpFilterMode field to given value. + +### HasIpFilterMode + +`func (o *ARecord) HasIpFilterMode() bool` + +HasIpFilterMode returns a boolean if a field has been set. + +### GetIsProtected + +`func (o *ARecord) GetIsProtected() bool` + +GetIsProtected returns the IsProtected field if non-nil, zero value otherwise. + +### GetIsProtectedOk + +`func (o *ARecord) GetIsProtectedOk() (*bool, bool)` + +GetIsProtectedOk returns a tuple with the IsProtected field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsProtected + +`func (o *ARecord) SetIsProtected(v bool)` + +SetIsProtected sets IsProtected field to given value. + +### HasIsProtected + +`func (o *ARecord) HasIsProtected() bool` + +HasIsProtected returns a boolean if a field has been set. + +### GetUsage + +`func (o *ARecord) GetUsage() []string` + +GetUsage returns the Usage field if non-nil, zero value otherwise. + +### GetUsageOk + +`func (o *ARecord) GetUsageOk() (*[]string, bool)` + +GetUsageOk returns a tuple with the Usage field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUsage + +`func (o *ARecord) SetUsage(v []string)` + +SetUsage sets Usage field to given value. + +### HasUsage + +`func (o *ARecord) HasUsage() bool` + +HasUsage returns a boolean if a field has been set. + +### GetCreatedAt + +`func (o *ARecord) GetCreatedAt() time.Time` + +GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. + +### GetCreatedAtOk + +`func (o *ARecord) GetCreatedAtOk() (*time.Time, bool)` + +GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedAt + +`func (o *ARecord) SetCreatedAt(v time.Time)` + +SetCreatedAt sets CreatedAt field to given value. + +### HasCreatedAt + +`func (o *ARecord) HasCreatedAt() bool` + +HasCreatedAt returns a boolean if a field has been set. + +### GetUpdatedAt + +`func (o *ARecord) GetUpdatedAt() time.Time` + +GetUpdatedAt returns the UpdatedAt field if non-nil, zero value otherwise. + +### GetUpdatedAtOk + +`func (o *ARecord) GetUpdatedAtOk() (*time.Time, bool)` + +GetUpdatedAtOk returns a tuple with the UpdatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpdatedAt + +`func (o *ARecord) SetUpdatedAt(v time.Time)` + +SetUpdatedAt sets UpdatedAt field to given value. + +### HasUpdatedAt + +`func (o *ARecord) HasUpdatedAt() bool` + +HasUpdatedAt returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/ARecordValue.md b/docs/ARecordValue.md new file mode 100644 index 0000000..78e2707 --- /dev/null +++ b/docs/ARecordValue.md @@ -0,0 +1,190 @@ +# ARecordValue + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Ip** | Pointer to **string** | | [optional] +**Port** | Pointer to **NullableInt32** | | [optional] +**Weight** | Pointer to **NullableInt32** | | [optional] +**OriginalWeight** | Pointer to **int32** | This key shows itself here if the weight have been changed by Health Check. | [optional] [readonly] +**Country** | Pointer to **NullableString** | ISO 3166 alpha-2 country code | [optional] + +## Methods + +### NewARecordValue + +`func NewARecordValue() *ARecordValue` + +NewARecordValue instantiates a new ARecordValue object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewARecordValueWithDefaults + +`func NewARecordValueWithDefaults() *ARecordValue` + +NewARecordValueWithDefaults instantiates a new ARecordValue object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetIp + +`func (o *ARecordValue) GetIp() string` + +GetIp returns the Ip field if non-nil, zero value otherwise. + +### GetIpOk + +`func (o *ARecordValue) GetIpOk() (*string, bool)` + +GetIpOk returns a tuple with the Ip field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIp + +`func (o *ARecordValue) SetIp(v string)` + +SetIp sets Ip field to given value. + +### HasIp + +`func (o *ARecordValue) HasIp() bool` + +HasIp returns a boolean if a field has been set. + +### GetPort + +`func (o *ARecordValue) GetPort() int32` + +GetPort returns the Port field if non-nil, zero value otherwise. + +### GetPortOk + +`func (o *ARecordValue) GetPortOk() (*int32, bool)` + +GetPortOk returns a tuple with the Port field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPort + +`func (o *ARecordValue) SetPort(v int32)` + +SetPort sets Port field to given value. + +### HasPort + +`func (o *ARecordValue) HasPort() bool` + +HasPort returns a boolean if a field has been set. + +### SetPortNil + +`func (o *ARecordValue) SetPortNil(b bool)` + + SetPortNil sets the value for Port to be an explicit nil + +### UnsetPort +`func (o *ARecordValue) UnsetPort()` + +UnsetPort ensures that no value is present for Port, not even an explicit nil +### GetWeight + +`func (o *ARecordValue) GetWeight() int32` + +GetWeight returns the Weight field if non-nil, zero value otherwise. + +### GetWeightOk + +`func (o *ARecordValue) GetWeightOk() (*int32, bool)` + +GetWeightOk returns a tuple with the Weight field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetWeight + +`func (o *ARecordValue) SetWeight(v int32)` + +SetWeight sets Weight field to given value. + +### HasWeight + +`func (o *ARecordValue) HasWeight() bool` + +HasWeight returns a boolean if a field has been set. + +### SetWeightNil + +`func (o *ARecordValue) SetWeightNil(b bool)` + + SetWeightNil sets the value for Weight to be an explicit nil + +### UnsetWeight +`func (o *ARecordValue) UnsetWeight()` + +UnsetWeight ensures that no value is present for Weight, not even an explicit nil +### GetOriginalWeight + +`func (o *ARecordValue) GetOriginalWeight() int32` + +GetOriginalWeight returns the OriginalWeight field if non-nil, zero value otherwise. + +### GetOriginalWeightOk + +`func (o *ARecordValue) GetOriginalWeightOk() (*int32, bool)` + +GetOriginalWeightOk returns a tuple with the OriginalWeight field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOriginalWeight + +`func (o *ARecordValue) SetOriginalWeight(v int32)` + +SetOriginalWeight sets OriginalWeight field to given value. + +### HasOriginalWeight + +`func (o *ARecordValue) HasOriginalWeight() bool` + +HasOriginalWeight returns a boolean if a field has been set. + +### GetCountry + +`func (o *ARecordValue) GetCountry() string` + +GetCountry returns the Country field if non-nil, zero value otherwise. + +### GetCountryOk + +`func (o *ARecordValue) 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 *ARecordValue) SetCountry(v string)` + +SetCountry sets Country field to given value. + +### HasCountry + +`func (o *ARecordValue) HasCountry() bool` + +HasCountry returns a boolean if a field has been set. + +### SetCountryNil + +`func (o *ARecordValue) SetCountryNil(b bool)` + + SetCountryNil sets the value for Country to be an explicit nil + +### UnsetCountry +`func (o *ARecordValue) UnsetCountry()` + +UnsetCountry ensures that no value is present for Country, not even an explicit nil + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/Acceleration.md b/docs/Acceleration.md new file mode 100644 index 0000000..e210916 --- /dev/null +++ b/docs/Acceleration.md @@ -0,0 +1,82 @@ +# Acceleration + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Status** | Pointer to **string** | | [optional] +**Extensions** | Pointer to **[]string** | | [optional] [default to []] + +## Methods + +### NewAcceleration + +`func NewAcceleration() *Acceleration` + +NewAcceleration instantiates a new Acceleration object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewAccelerationWithDefaults + +`func NewAccelerationWithDefaults() *Acceleration` + +NewAccelerationWithDefaults instantiates a new Acceleration object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetStatus + +`func (o *Acceleration) GetStatus() string` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *Acceleration) GetStatusOk() (*string, 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 *Acceleration) SetStatus(v string)` + +SetStatus sets Status field to given value. + +### HasStatus + +`func (o *Acceleration) HasStatus() bool` + +HasStatus returns a boolean if a field has been set. + +### GetExtensions + +`func (o *Acceleration) GetExtensions() []string` + +GetExtensions returns the Extensions field if non-nil, zero value otherwise. + +### GetExtensionsOk + +`func (o *Acceleration) GetExtensionsOk() (*[]string, bool)` + +GetExtensionsOk returns a tuple with the Extensions field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExtensions + +`func (o *Acceleration) SetExtensions(v []string)` + +SetExtensions sets Extensions field to given value. + +### HasExtensions + +`func (o *Acceleration) HasExtensions() bool` + +HasExtensions returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/AccelerationApi.md b/docs/AccelerationApi.md new file mode 100644 index 0000000..897f49d --- /dev/null +++ b/docs/AccelerationApi.md @@ -0,0 +1,288 @@ +# \AccelerationApi + +All URIs are relative to *https://napi.arvancloud.ir/cdn/4.0* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**AccelerationIndex**](AccelerationApi.md#AccelerationIndex) | **Get** /domains/{domain}/acceleration | Get the content of acceleration settings +[**AccelerationUpdate**](AccelerationApi.md#AccelerationUpdate) | **Patch** /domains/{domain}/acceleration | Update the content of acceleration settings +[**ImageResizeGet**](AccelerationApi.md#ImageResizeGet) | **Get** /domains/{domain}/image-resize | Get the content of image resize settings +[**ImageResizeUpdate**](AccelerationApi.md#ImageResizeUpdate) | **Patch** /domains/{domain}/image-resize | Update the content of image resize settings + + + +## AccelerationIndex + +> AccelerationResponse AccelerationIndex(ctx, domain).Execute() + +Get the content of acceleration settings + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AccelerationApi.AccelerationIndex(context.Background(), domain).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AccelerationApi.AccelerationIndex``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AccelerationIndex`: AccelerationResponse + fmt.Fprintf(os.Stdout, "Response from `AccelerationApi.AccelerationIndex`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiAccelerationIndexRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**AccelerationResponse**](AccelerationResponse.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## AccelerationUpdate + +> AccelerationResponse AccelerationUpdate(ctx, domain).AccelerationUpdate(accelerationUpdate).Execute() + +Update the content of acceleration settings + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + accelerationUpdate := *openapiclient.NewAccelerationUpdate() // AccelerationUpdate | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AccelerationApi.AccelerationUpdate(context.Background(), domain).AccelerationUpdate(accelerationUpdate).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AccelerationApi.AccelerationUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AccelerationUpdate`: AccelerationResponse + fmt.Fprintf(os.Stdout, "Response from `AccelerationApi.AccelerationUpdate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiAccelerationUpdateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **accelerationUpdate** | [**AccelerationUpdate**](AccelerationUpdate.md) | | + +### Return type + +[**AccelerationResponse**](AccelerationResponse.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## ImageResizeGet + +> ImageResizeResponse ImageResizeGet(ctx, domain).Execute() + +Get the content of image resize settings + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AccelerationApi.ImageResizeGet(context.Background(), domain).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AccelerationApi.ImageResizeGet``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ImageResizeGet`: ImageResizeResponse + fmt.Fprintf(os.Stdout, "Response from `AccelerationApi.ImageResizeGet`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiImageResizeGetRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**ImageResizeResponse**](ImageResizeResponse.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## ImageResizeUpdate + +> ImageResizeResponse ImageResizeUpdate(ctx, domain).ImageResize(imageResize).Execute() + +Update the content of image resize settings + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + imageResize := *openapiclient.NewImageResize() // ImageResize | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AccelerationApi.ImageResizeUpdate(context.Background(), domain).ImageResize(imageResize).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AccelerationApi.ImageResizeUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ImageResizeUpdate`: ImageResizeResponse + fmt.Fprintf(os.Stdout, "Response from `AccelerationApi.ImageResizeUpdate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiImageResizeUpdateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **imageResize** | [**ImageResize**](ImageResize.md) | | + +### Return type + +[**ImageResizeResponse**](ImageResizeResponse.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + diff --git a/docs/AccelerationResponse.md b/docs/AccelerationResponse.md new file mode 100644 index 0000000..432945b --- /dev/null +++ b/docs/AccelerationResponse.md @@ -0,0 +1,92 @@ +# AccelerationResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**Acceleration**](Acceleration.md) | | [optional] +**Message** | Pointer to **NullableString** | | [optional] + +## Methods + +### NewAccelerationResponse + +`func NewAccelerationResponse() *AccelerationResponse` + +NewAccelerationResponse instantiates a new AccelerationResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewAccelerationResponseWithDefaults + +`func NewAccelerationResponseWithDefaults() *AccelerationResponse` + +NewAccelerationResponseWithDefaults instantiates a new AccelerationResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *AccelerationResponse) GetData() Acceleration` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *AccelerationResponse) GetDataOk() (*Acceleration, 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 *AccelerationResponse) SetData(v Acceleration)` + +SetData sets Data field to given value. + +### HasData + +`func (o *AccelerationResponse) HasData() bool` + +HasData returns a boolean if a field has been set. + +### GetMessage + +`func (o *AccelerationResponse) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *AccelerationResponse) GetMessageOk() (*string, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessage + +`func (o *AccelerationResponse) SetMessage(v string)` + +SetMessage sets Message field to given value. + +### HasMessage + +`func (o *AccelerationResponse) HasMessage() bool` + +HasMessage returns a boolean if a field has been set. + +### SetMessageNil + +`func (o *AccelerationResponse) SetMessageNil(b bool)` + + SetMessageNil sets the value for Message to be an explicit nil + +### UnsetMessage +`func (o *AccelerationResponse) UnsetMessage()` + +UnsetMessage ensures that no value is present for Message, not even an explicit nil + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/AccelerationUpdate.md b/docs/AccelerationUpdate.md new file mode 100644 index 0000000..83bf9aa --- /dev/null +++ b/docs/AccelerationUpdate.md @@ -0,0 +1,82 @@ +# AccelerationUpdate + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Status** | Pointer to **string** | | [optional] +**Extensions** | Pointer to **[]string** | | [optional] [default to []] + +## Methods + +### NewAccelerationUpdate + +`func NewAccelerationUpdate() *AccelerationUpdate` + +NewAccelerationUpdate instantiates a new AccelerationUpdate object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewAccelerationUpdateWithDefaults + +`func NewAccelerationUpdateWithDefaults() *AccelerationUpdate` + +NewAccelerationUpdateWithDefaults instantiates a new AccelerationUpdate object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetStatus + +`func (o *AccelerationUpdate) GetStatus() string` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *AccelerationUpdate) GetStatusOk() (*string, 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 *AccelerationUpdate) SetStatus(v string)` + +SetStatus sets Status field to given value. + +### HasStatus + +`func (o *AccelerationUpdate) HasStatus() bool` + +HasStatus returns a boolean if a field has been set. + +### GetExtensions + +`func (o *AccelerationUpdate) GetExtensions() []string` + +GetExtensions returns the Extensions field if non-nil, zero value otherwise. + +### GetExtensionsOk + +`func (o *AccelerationUpdate) GetExtensionsOk() (*[]string, bool)` + +GetExtensionsOk returns a tuple with the Extensions field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExtensions + +`func (o *AccelerationUpdate) SetExtensions(v []string)` + +SetExtensions sets Extensions field to given value. + +### HasExtensions + +`func (o *AccelerationUpdate) HasExtensions() bool` + +HasExtensions returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/ActiveHealthCheckApi.md b/docs/ActiveHealthCheckApi.md new file mode 100644 index 0000000..74f633e --- /dev/null +++ b/docs/ActiveHealthCheckApi.md @@ -0,0 +1,596 @@ +# \ActiveHealthCheckApi + +All URIs are relative to *https://napi.arvancloud.ir/cdn/4.0* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ActiveHealthCheckDestroy**](ActiveHealthCheckApi.md#ActiveHealthCheckDestroy) | **Delete** /domains/{domain}/health-checks/{healthcheck} | Delete healthcheck +[**ActiveHealthCheckIndex**](ActiveHealthCheckApi.md#ActiveHealthCheckIndex) | **Get** /domains/{domain}/health-checks | Get Defined HealthCheck +[**ActiveHealthCheckReportsDetails**](ActiveHealthCheckApi.md#ActiveHealthCheckReportsDetails) | **Get** /domains/{domain}/health-checks/reports/details | Get reports of a single healthcheck monitoring +[**ActiveHealthCheckReportsSummary**](ActiveHealthCheckApi.md#ActiveHealthCheckReportsSummary) | **Get** /domains/{domain}/health-checks/reports/summary | Get summary reports of a single healthcheck monitoring +[**ActiveHealthCheckShow**](ActiveHealthCheckApi.md#ActiveHealthCheckShow) | **Get** /domains/{domain}/health-checks/{healthcheck} | Get a single healthcheck +[**ActiveHealthCheckStore**](ActiveHealthCheckApi.md#ActiveHealthCheckStore) | **Post** /domains/{domain}/health-checks | Store a new HealthCheck +[**ActiveHealthCheckUpdate**](ActiveHealthCheckApi.md#ActiveHealthCheckUpdate) | **Patch** /domains/{domain}/health-checks/{healthcheck} | Update Health check +[**HealthChecksZonesIndex**](ActiveHealthCheckApi.md#HealthChecksZonesIndex) | **Get** /health-checks/zones | Get list of all health-check zones + + + +## ActiveHealthCheckDestroy + +> MessageResponse ActiveHealthCheckDestroy(ctx, domain, healthcheck).Execute() + +Delete healthcheck + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + healthcheck := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ActiveHealthCheckApi.ActiveHealthCheckDestroy(context.Background(), domain, healthcheck).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ActiveHealthCheckApi.ActiveHealthCheckDestroy``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ActiveHealthCheckDestroy`: MessageResponse + fmt.Fprintf(os.Stdout, "Response from `ActiveHealthCheckApi.ActiveHealthCheckDestroy`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | +**healthcheck** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiActiveHealthCheckDestroyRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + +[**MessageResponse**](MessageResponse.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## ActiveHealthCheckIndex + +> ActiveHealthCheckIndex200Response ActiveHealthCheckIndex(ctx, domain).Execute() + +Get Defined HealthCheck + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ActiveHealthCheckApi.ActiveHealthCheckIndex(context.Background(), domain).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ActiveHealthCheckApi.ActiveHealthCheckIndex``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ActiveHealthCheckIndex`: ActiveHealthCheckIndex200Response + fmt.Fprintf(os.Stdout, "Response from `ActiveHealthCheckApi.ActiveHealthCheckIndex`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiActiveHealthCheckIndexRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**ActiveHealthCheckIndex200Response**](ActiveHealthCheckIndex200Response.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## ActiveHealthCheckReportsDetails + +> ActiveHealthCheckReportsDetails200Response ActiveHealthCheckReportsDetails(ctx, domain).Name(name).Upstream(upstream).Type_(type_).Period(period).Since(since).Until(until).Direction(direction).PerPage(perPage).Page(page).Execute() + +Get reports of a single healthcheck monitoring + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + "time" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + name := "name_example" // string | Name of the health-check + upstream := "upstream_example" // string | Upstream of the health-check monitoring + type_ := "type__example" // string | Type of reports for the health check (optional) (default to "all") + period := "period_example" // string | Select period -ending now- for report (optional) + since := time.Now() // time.Time | (optional) + until := time.Now() // time.Time | (optional) + direction := "direction_example" // string | Set the direction of sorting (optional) + perPage := int32(56) // int32 | Set how many items returned per page (optional) + page := int32(56) // int32 | Set the desired page number (optional) (default to 1) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ActiveHealthCheckApi.ActiveHealthCheckReportsDetails(context.Background(), domain).Name(name).Upstream(upstream).Type_(type_).Period(period).Since(since).Until(until).Direction(direction).PerPage(perPage).Page(page).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ActiveHealthCheckApi.ActiveHealthCheckReportsDetails``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ActiveHealthCheckReportsDetails`: ActiveHealthCheckReportsDetails200Response + fmt.Fprintf(os.Stdout, "Response from `ActiveHealthCheckApi.ActiveHealthCheckReportsDetails`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiActiveHealthCheckReportsDetailsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **name** | **string** | Name of the health-check | + **upstream** | **string** | Upstream of the health-check monitoring | + **type_** | **string** | Type of reports for the health check | [default to "all"] + **period** | **string** | Select period -ending now- for report | + **since** | **time.Time** | | + **until** | **time.Time** | | + **direction** | **string** | Set the direction of sorting | + **perPage** | **int32** | Set how many items returned per page | + **page** | **int32** | Set the desired page number | [default to 1] + +### Return type + +[**ActiveHealthCheckReportsDetails200Response**](ActiveHealthCheckReportsDetails200Response.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## ActiveHealthCheckReportsSummary + +> ActiveHealthCheckReportsSummary200Response ActiveHealthCheckReportsSummary(ctx, domain).Name(name).Upstream(upstream).Period(period).Since(since).Until(until).Direction(direction).Execute() + +Get summary reports of a single healthcheck monitoring + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + "time" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + name := "name_example" // string | Name of the health-check + upstream := "upstream_example" // string | Upstream of the health-check monitoring + period := "period_example" // string | Select period -ending now- for report (optional) + since := time.Now() // time.Time | (optional) + until := time.Now() // time.Time | (optional) + direction := "direction_example" // string | Set the direction of sorting (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ActiveHealthCheckApi.ActiveHealthCheckReportsSummary(context.Background(), domain).Name(name).Upstream(upstream).Period(period).Since(since).Until(until).Direction(direction).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ActiveHealthCheckApi.ActiveHealthCheckReportsSummary``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ActiveHealthCheckReportsSummary`: ActiveHealthCheckReportsSummary200Response + fmt.Fprintf(os.Stdout, "Response from `ActiveHealthCheckApi.ActiveHealthCheckReportsSummary`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiActiveHealthCheckReportsSummaryRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **name** | **string** | Name of the health-check | + **upstream** | **string** | Upstream of the health-check monitoring | + **period** | **string** | Select period -ending now- for report | + **since** | **time.Time** | | + **until** | **time.Time** | | + **direction** | **string** | Set the direction of sorting | + +### Return type + +[**ActiveHealthCheckReportsSummary200Response**](ActiveHealthCheckReportsSummary200Response.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## ActiveHealthCheckShow + +> HealthCheckResponse ActiveHealthCheckShow(ctx, domain, healthcheck).Execute() + +Get a single healthcheck + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + healthcheck := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ActiveHealthCheckApi.ActiveHealthCheckShow(context.Background(), domain, healthcheck).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ActiveHealthCheckApi.ActiveHealthCheckShow``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ActiveHealthCheckShow`: HealthCheckResponse + fmt.Fprintf(os.Stdout, "Response from `ActiveHealthCheckApi.ActiveHealthCheckShow`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | +**healthcheck** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiActiveHealthCheckShowRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + +[**HealthCheckResponse**](HealthCheckResponse.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## ActiveHealthCheckStore + +> HealthCheckResponse ActiveHealthCheckStore(ctx, domain).HealthCheck(healthCheck).Execute() + +Store a new HealthCheck + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + healthCheck := *openapiclient.NewHealthCheck() // HealthCheck | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ActiveHealthCheckApi.ActiveHealthCheckStore(context.Background(), domain).HealthCheck(healthCheck).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ActiveHealthCheckApi.ActiveHealthCheckStore``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ActiveHealthCheckStore`: HealthCheckResponse + fmt.Fprintf(os.Stdout, "Response from `ActiveHealthCheckApi.ActiveHealthCheckStore`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiActiveHealthCheckStoreRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **healthCheck** | [**HealthCheck**](HealthCheck.md) | | + +### Return type + +[**HealthCheckResponse**](HealthCheckResponse.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## ActiveHealthCheckUpdate + +> HealthCheckResponse ActiveHealthCheckUpdate(ctx, domain, healthcheck).HealthCheck(healthCheck).Execute() + +Update Health check + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + healthcheck := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | + healthCheck := *openapiclient.NewHealthCheck() // HealthCheck | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ActiveHealthCheckApi.ActiveHealthCheckUpdate(context.Background(), domain, healthcheck).HealthCheck(healthCheck).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ActiveHealthCheckApi.ActiveHealthCheckUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ActiveHealthCheckUpdate`: HealthCheckResponse + fmt.Fprintf(os.Stdout, "Response from `ActiveHealthCheckApi.ActiveHealthCheckUpdate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | +**healthcheck** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiActiveHealthCheckUpdateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **healthCheck** | [**HealthCheck**](HealthCheck.md) | | + +### Return type + +[**HealthCheckResponse**](HealthCheckResponse.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## HealthChecksZonesIndex + +> HealthChecksZonesIndex200Response HealthChecksZonesIndex(ctx).Execute() + +Get list of all health-check zones + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ActiveHealthCheckApi.HealthChecksZonesIndex(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ActiveHealthCheckApi.HealthChecksZonesIndex``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `HealthChecksZonesIndex`: HealthChecksZonesIndex200Response + fmt.Fprintf(os.Stdout, "Response from `ActiveHealthCheckApi.HealthChecksZonesIndex`: %v\n", resp) +} +``` + +### Path Parameters + +This endpoint does not need any parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a apiHealthChecksZonesIndexRequest struct via the builder pattern + + +### Return type + +[**HealthChecksZonesIndex200Response**](HealthChecksZonesIndex200Response.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + diff --git a/docs/ActiveHealthCheckIndex200Response.md b/docs/ActiveHealthCheckIndex200Response.md new file mode 100644 index 0000000..6c478fc --- /dev/null +++ b/docs/ActiveHealthCheckIndex200Response.md @@ -0,0 +1,92 @@ +# ActiveHealthCheckIndex200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**[]HealthCheckView**](HealthCheckView.md) | | [optional] +**Message** | Pointer to **NullableString** | | [optional] + +## Methods + +### NewActiveHealthCheckIndex200Response + +`func NewActiveHealthCheckIndex200Response() *ActiveHealthCheckIndex200Response` + +NewActiveHealthCheckIndex200Response instantiates a new ActiveHealthCheckIndex200Response object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewActiveHealthCheckIndex200ResponseWithDefaults + +`func NewActiveHealthCheckIndex200ResponseWithDefaults() *ActiveHealthCheckIndex200Response` + +NewActiveHealthCheckIndex200ResponseWithDefaults instantiates a new ActiveHealthCheckIndex200Response object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *ActiveHealthCheckIndex200Response) GetData() []HealthCheckView` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ActiveHealthCheckIndex200Response) GetDataOk() (*[]HealthCheckView, 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 *ActiveHealthCheckIndex200Response) SetData(v []HealthCheckView)` + +SetData sets Data field to given value. + +### HasData + +`func (o *ActiveHealthCheckIndex200Response) HasData() bool` + +HasData returns a boolean if a field has been set. + +### GetMessage + +`func (o *ActiveHealthCheckIndex200Response) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *ActiveHealthCheckIndex200Response) GetMessageOk() (*string, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessage + +`func (o *ActiveHealthCheckIndex200Response) SetMessage(v string)` + +SetMessage sets Message field to given value. + +### HasMessage + +`func (o *ActiveHealthCheckIndex200Response) HasMessage() bool` + +HasMessage returns a boolean if a field has been set. + +### SetMessageNil + +`func (o *ActiveHealthCheckIndex200Response) SetMessageNil(b bool)` + + SetMessageNil sets the value for Message to be an explicit nil + +### UnsetMessage +`func (o *ActiveHealthCheckIndex200Response) UnsetMessage()` + +UnsetMessage ensures that no value is present for Message, not even an explicit nil + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/ActiveHealthCheckReportsDetails200Response.md b/docs/ActiveHealthCheckReportsDetails200Response.md new file mode 100644 index 0000000..9ddd2fd --- /dev/null +++ b/docs/ActiveHealthCheckReportsDetails200Response.md @@ -0,0 +1,108 @@ +# ActiveHealthCheckReportsDetails200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**[]HealthCheckReportDetail**](HealthCheckReportDetail.md) | | [optional] +**Links** | Pointer to [**PaginatedResponseLinks**](PaginatedResponseLinks.md) | | [optional] +**Meta** | Pointer to [**PaginatedResponseMeta**](PaginatedResponseMeta.md) | | [optional] + +## Methods + +### NewActiveHealthCheckReportsDetails200Response + +`func NewActiveHealthCheckReportsDetails200Response() *ActiveHealthCheckReportsDetails200Response` + +NewActiveHealthCheckReportsDetails200Response instantiates a new ActiveHealthCheckReportsDetails200Response object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewActiveHealthCheckReportsDetails200ResponseWithDefaults + +`func NewActiveHealthCheckReportsDetails200ResponseWithDefaults() *ActiveHealthCheckReportsDetails200Response` + +NewActiveHealthCheckReportsDetails200ResponseWithDefaults instantiates a new ActiveHealthCheckReportsDetails200Response object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *ActiveHealthCheckReportsDetails200Response) GetData() []HealthCheckReportDetail` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ActiveHealthCheckReportsDetails200Response) GetDataOk() (*[]HealthCheckReportDetail, 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 *ActiveHealthCheckReportsDetails200Response) SetData(v []HealthCheckReportDetail)` + +SetData sets Data field to given value. + +### HasData + +`func (o *ActiveHealthCheckReportsDetails200Response) HasData() bool` + +HasData returns a boolean if a field has been set. + +### GetLinks + +`func (o *ActiveHealthCheckReportsDetails200Response) GetLinks() PaginatedResponseLinks` + +GetLinks returns the Links field if non-nil, zero value otherwise. + +### GetLinksOk + +`func (o *ActiveHealthCheckReportsDetails200Response) GetLinksOk() (*PaginatedResponseLinks, bool)` + +GetLinksOk returns a tuple with the Links field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLinks + +`func (o *ActiveHealthCheckReportsDetails200Response) SetLinks(v PaginatedResponseLinks)` + +SetLinks sets Links field to given value. + +### HasLinks + +`func (o *ActiveHealthCheckReportsDetails200Response) HasLinks() bool` + +HasLinks returns a boolean if a field has been set. + +### GetMeta + +`func (o *ActiveHealthCheckReportsDetails200Response) GetMeta() PaginatedResponseMeta` + +GetMeta returns the Meta field if non-nil, zero value otherwise. + +### GetMetaOk + +`func (o *ActiveHealthCheckReportsDetails200Response) GetMetaOk() (*PaginatedResponseMeta, bool)` + +GetMetaOk returns a tuple with the Meta field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMeta + +`func (o *ActiveHealthCheckReportsDetails200Response) SetMeta(v PaginatedResponseMeta)` + +SetMeta sets Meta field to given value. + +### HasMeta + +`func (o *ActiveHealthCheckReportsDetails200Response) HasMeta() bool` + +HasMeta returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/ActiveHealthCheckReportsSummary200Response.md b/docs/ActiveHealthCheckReportsSummary200Response.md new file mode 100644 index 0000000..26c5bff --- /dev/null +++ b/docs/ActiveHealthCheckReportsSummary200Response.md @@ -0,0 +1,92 @@ +# ActiveHealthCheckReportsSummary200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**[]HealthCheckReportSummary**](HealthCheckReportSummary.md) | | [optional] +**Message** | Pointer to **NullableString** | | [optional] + +## Methods + +### NewActiveHealthCheckReportsSummary200Response + +`func NewActiveHealthCheckReportsSummary200Response() *ActiveHealthCheckReportsSummary200Response` + +NewActiveHealthCheckReportsSummary200Response instantiates a new ActiveHealthCheckReportsSummary200Response object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewActiveHealthCheckReportsSummary200ResponseWithDefaults + +`func NewActiveHealthCheckReportsSummary200ResponseWithDefaults() *ActiveHealthCheckReportsSummary200Response` + +NewActiveHealthCheckReportsSummary200ResponseWithDefaults instantiates a new ActiveHealthCheckReportsSummary200Response object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *ActiveHealthCheckReportsSummary200Response) GetData() []HealthCheckReportSummary` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ActiveHealthCheckReportsSummary200Response) GetDataOk() (*[]HealthCheckReportSummary, 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 *ActiveHealthCheckReportsSummary200Response) SetData(v []HealthCheckReportSummary)` + +SetData sets Data field to given value. + +### HasData + +`func (o *ActiveHealthCheckReportsSummary200Response) HasData() bool` + +HasData returns a boolean if a field has been set. + +### GetMessage + +`func (o *ActiveHealthCheckReportsSummary200Response) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *ActiveHealthCheckReportsSummary200Response) GetMessageOk() (*string, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessage + +`func (o *ActiveHealthCheckReportsSummary200Response) SetMessage(v string)` + +SetMessage sets Message field to given value. + +### HasMessage + +`func (o *ActiveHealthCheckReportsSummary200Response) HasMessage() bool` + +HasMessage returns a boolean if a field has been set. + +### SetMessageNil + +`func (o *ActiveHealthCheckReportsSummary200Response) SetMessageNil(b bool)` + + SetMessageNil sets the value for Message to be an explicit nil + +### UnsetMessage +`func (o *ActiveHealthCheckReportsSummary200Response) UnsetMessage()` + +UnsetMessage ensures that no value is present for Message, not even an explicit nil + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/ApplicationCategory.md b/docs/ApplicationCategory.md new file mode 100644 index 0000000..28c8264 --- /dev/null +++ b/docs/ApplicationCategory.md @@ -0,0 +1,196 @@ +# ApplicationCategory + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **string** | | [optional] +**Name** | Pointer to **string** | | [optional] +**Active** | Pointer to **bool** | | [optional] +**Order** | Pointer to **int32** | | [optional] +**NameTranslation** | Pointer to [**NullableApplicationCategoryNameTranslation**](ApplicationCategoryNameTranslation.md) | | [optional] +**Applications** | Pointer to [**[]ApplicationCategoryApplicationsInner**](ApplicationCategoryApplicationsInner.md) | | [optional] + +## Methods + +### NewApplicationCategory + +`func NewApplicationCategory() *ApplicationCategory` + +NewApplicationCategory instantiates a new ApplicationCategory object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewApplicationCategoryWithDefaults + +`func NewApplicationCategoryWithDefaults() *ApplicationCategory` + +NewApplicationCategoryWithDefaults instantiates a new ApplicationCategory object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *ApplicationCategory) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *ApplicationCategory) 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 *ApplicationCategory) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *ApplicationCategory) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetName + +`func (o *ApplicationCategory) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ApplicationCategory) 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 *ApplicationCategory) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *ApplicationCategory) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetActive + +`func (o *ApplicationCategory) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *ApplicationCategory) GetActiveOk() (*bool, 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 *ApplicationCategory) SetActive(v bool)` + +SetActive sets Active field to given value. + +### HasActive + +`func (o *ApplicationCategory) HasActive() bool` + +HasActive returns a boolean if a field has been set. + +### GetOrder + +`func (o *ApplicationCategory) GetOrder() int32` + +GetOrder returns the Order field if non-nil, zero value otherwise. + +### GetOrderOk + +`func (o *ApplicationCategory) GetOrderOk() (*int32, bool)` + +GetOrderOk returns a tuple with the Order field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOrder + +`func (o *ApplicationCategory) SetOrder(v int32)` + +SetOrder sets Order field to given value. + +### HasOrder + +`func (o *ApplicationCategory) HasOrder() bool` + +HasOrder returns a boolean if a field has been set. + +### GetNameTranslation + +`func (o *ApplicationCategory) GetNameTranslation() ApplicationCategoryNameTranslation` + +GetNameTranslation returns the NameTranslation field if non-nil, zero value otherwise. + +### GetNameTranslationOk + +`func (o *ApplicationCategory) GetNameTranslationOk() (*ApplicationCategoryNameTranslation, bool)` + +GetNameTranslationOk returns a tuple with the NameTranslation field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNameTranslation + +`func (o *ApplicationCategory) SetNameTranslation(v ApplicationCategoryNameTranslation)` + +SetNameTranslation sets NameTranslation field to given value. + +### HasNameTranslation + +`func (o *ApplicationCategory) HasNameTranslation() bool` + +HasNameTranslation returns a boolean if a field has been set. + +### SetNameTranslationNil + +`func (o *ApplicationCategory) SetNameTranslationNil(b bool)` + + SetNameTranslationNil sets the value for NameTranslation to be an explicit nil + +### UnsetNameTranslation +`func (o *ApplicationCategory) UnsetNameTranslation()` + +UnsetNameTranslation ensures that no value is present for NameTranslation, not even an explicit nil +### GetApplications + +`func (o *ApplicationCategory) GetApplications() []ApplicationCategoryApplicationsInner` + +GetApplications returns the Applications field if non-nil, zero value otherwise. + +### GetApplicationsOk + +`func (o *ApplicationCategory) GetApplicationsOk() (*[]ApplicationCategoryApplicationsInner, bool)` + +GetApplicationsOk returns a tuple with the Applications field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetApplications + +`func (o *ApplicationCategory) SetApplications(v []ApplicationCategoryApplicationsInner)` + +SetApplications sets Applications field to given value. + +### HasApplications + +`func (o *ApplicationCategory) HasApplications() bool` + +HasApplications returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/ApplicationCategoryApplicationsInner.md b/docs/ApplicationCategoryApplicationsInner.md new file mode 100644 index 0000000..8dba5b3 --- /dev/null +++ b/docs/ApplicationCategoryApplicationsInner.md @@ -0,0 +1,160 @@ +# ApplicationCategoryApplicationsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **string** | | [optional] [readonly] +**Slug** | Pointer to **string** | | [optional] +**Name** | Pointer to **string** | | [optional] +**Description** | Pointer to **string** | | [optional] +**Logo** | Pointer to **string** | | [optional] + +## Methods + +### NewApplicationCategoryApplicationsInner + +`func NewApplicationCategoryApplicationsInner() *ApplicationCategoryApplicationsInner` + +NewApplicationCategoryApplicationsInner instantiates a new ApplicationCategoryApplicationsInner object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewApplicationCategoryApplicationsInnerWithDefaults + +`func NewApplicationCategoryApplicationsInnerWithDefaults() *ApplicationCategoryApplicationsInner` + +NewApplicationCategoryApplicationsInnerWithDefaults instantiates a new ApplicationCategoryApplicationsInner object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *ApplicationCategoryApplicationsInner) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *ApplicationCategoryApplicationsInner) 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 *ApplicationCategoryApplicationsInner) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *ApplicationCategoryApplicationsInner) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetSlug + +`func (o *ApplicationCategoryApplicationsInner) GetSlug() string` + +GetSlug returns the Slug field if non-nil, zero value otherwise. + +### GetSlugOk + +`func (o *ApplicationCategoryApplicationsInner) GetSlugOk() (*string, bool)` + +GetSlugOk returns a tuple with the Slug field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSlug + +`func (o *ApplicationCategoryApplicationsInner) SetSlug(v string)` + +SetSlug sets Slug field to given value. + +### HasSlug + +`func (o *ApplicationCategoryApplicationsInner) HasSlug() bool` + +HasSlug returns a boolean if a field has been set. + +### GetName + +`func (o *ApplicationCategoryApplicationsInner) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ApplicationCategoryApplicationsInner) 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 *ApplicationCategoryApplicationsInner) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *ApplicationCategoryApplicationsInner) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetDescription + +`func (o *ApplicationCategoryApplicationsInner) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *ApplicationCategoryApplicationsInner) 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 *ApplicationCategoryApplicationsInner) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *ApplicationCategoryApplicationsInner) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetLogo + +`func (o *ApplicationCategoryApplicationsInner) GetLogo() string` + +GetLogo returns the Logo field if non-nil, zero value otherwise. + +### GetLogoOk + +`func (o *ApplicationCategoryApplicationsInner) GetLogoOk() (*string, bool)` + +GetLogoOk returns a tuple with the Logo field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLogo + +`func (o *ApplicationCategoryApplicationsInner) SetLogo(v string)` + +SetLogo sets Logo field to given value. + +### HasLogo + +`func (o *ApplicationCategoryApplicationsInner) HasLogo() bool` + +HasLogo returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/ApplicationCategoryNameTranslation.md b/docs/ApplicationCategoryNameTranslation.md new file mode 100644 index 0000000..0473241 --- /dev/null +++ b/docs/ApplicationCategoryNameTranslation.md @@ -0,0 +1,82 @@ +# ApplicationCategoryNameTranslation + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**En** | Pointer to [**ApplicationCategoryNameTranslationEn**](ApplicationCategoryNameTranslationEn.md) | | [optional] +**Fa** | Pointer to [**ApplicationCategoryNameTranslationEn**](ApplicationCategoryNameTranslationEn.md) | | [optional] + +## Methods + +### NewApplicationCategoryNameTranslation + +`func NewApplicationCategoryNameTranslation() *ApplicationCategoryNameTranslation` + +NewApplicationCategoryNameTranslation instantiates a new ApplicationCategoryNameTranslation object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewApplicationCategoryNameTranslationWithDefaults + +`func NewApplicationCategoryNameTranslationWithDefaults() *ApplicationCategoryNameTranslation` + +NewApplicationCategoryNameTranslationWithDefaults instantiates a new ApplicationCategoryNameTranslation object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetEn + +`func (o *ApplicationCategoryNameTranslation) GetEn() ApplicationCategoryNameTranslationEn` + +GetEn returns the En field if non-nil, zero value otherwise. + +### GetEnOk + +`func (o *ApplicationCategoryNameTranslation) GetEnOk() (*ApplicationCategoryNameTranslationEn, bool)` + +GetEnOk returns a tuple with the En field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEn + +`func (o *ApplicationCategoryNameTranslation) SetEn(v ApplicationCategoryNameTranslationEn)` + +SetEn sets En field to given value. + +### HasEn + +`func (o *ApplicationCategoryNameTranslation) HasEn() bool` + +HasEn returns a boolean if a field has been set. + +### GetFa + +`func (o *ApplicationCategoryNameTranslation) GetFa() ApplicationCategoryNameTranslationEn` + +GetFa returns the Fa field if non-nil, zero value otherwise. + +### GetFaOk + +`func (o *ApplicationCategoryNameTranslation) GetFaOk() (*ApplicationCategoryNameTranslationEn, bool)` + +GetFaOk returns a tuple with the Fa field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFa + +`func (o *ApplicationCategoryNameTranslation) SetFa(v ApplicationCategoryNameTranslationEn)` + +SetFa sets Fa field to given value. + +### HasFa + +`func (o *ApplicationCategoryNameTranslation) HasFa() bool` + +HasFa returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/ApplicationCategoryNameTranslationEn.md b/docs/ApplicationCategoryNameTranslationEn.md new file mode 100644 index 0000000..173c48e --- /dev/null +++ b/docs/ApplicationCategoryNameTranslationEn.md @@ -0,0 +1,56 @@ +# ApplicationCategoryNameTranslationEn + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **string** | | [optional] + +## Methods + +### NewApplicationCategoryNameTranslationEn + +`func NewApplicationCategoryNameTranslationEn() *ApplicationCategoryNameTranslationEn` + +NewApplicationCategoryNameTranslationEn instantiates a new ApplicationCategoryNameTranslationEn object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewApplicationCategoryNameTranslationEnWithDefaults + +`func NewApplicationCategoryNameTranslationEnWithDefaults() *ApplicationCategoryNameTranslationEn` + +NewApplicationCategoryNameTranslationEnWithDefaults instantiates a new ApplicationCategoryNameTranslationEn object +This 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 *ApplicationCategoryNameTranslationEn) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ApplicationCategoryNameTranslationEn) 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 *ApplicationCategoryNameTranslationEn) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *ApplicationCategoryNameTranslationEn) HasName() bool` + +HasName returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/AppsCategoryIndex200Response.md b/docs/AppsCategoryIndex200Response.md new file mode 100644 index 0000000..f20e822 --- /dev/null +++ b/docs/AppsCategoryIndex200Response.md @@ -0,0 +1,108 @@ +# AppsCategoryIndex200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**[]ApplicationCategory**](ApplicationCategory.md) | | [optional] +**Links** | Pointer to [**PaginatedResponseLinks**](PaginatedResponseLinks.md) | | [optional] +**Meta** | Pointer to [**PaginatedResponseMeta**](PaginatedResponseMeta.md) | | [optional] + +## Methods + +### NewAppsCategoryIndex200Response + +`func NewAppsCategoryIndex200Response() *AppsCategoryIndex200Response` + +NewAppsCategoryIndex200Response instantiates a new AppsCategoryIndex200Response object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewAppsCategoryIndex200ResponseWithDefaults + +`func NewAppsCategoryIndex200ResponseWithDefaults() *AppsCategoryIndex200Response` + +NewAppsCategoryIndex200ResponseWithDefaults instantiates a new AppsCategoryIndex200Response object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *AppsCategoryIndex200Response) GetData() []ApplicationCategory` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *AppsCategoryIndex200Response) GetDataOk() (*[]ApplicationCategory, 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 *AppsCategoryIndex200Response) SetData(v []ApplicationCategory)` + +SetData sets Data field to given value. + +### HasData + +`func (o *AppsCategoryIndex200Response) HasData() bool` + +HasData returns a boolean if a field has been set. + +### GetLinks + +`func (o *AppsCategoryIndex200Response) GetLinks() PaginatedResponseLinks` + +GetLinks returns the Links field if non-nil, zero value otherwise. + +### GetLinksOk + +`func (o *AppsCategoryIndex200Response) GetLinksOk() (*PaginatedResponseLinks, bool)` + +GetLinksOk returns a tuple with the Links field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLinks + +`func (o *AppsCategoryIndex200Response) SetLinks(v PaginatedResponseLinks)` + +SetLinks sets Links field to given value. + +### HasLinks + +`func (o *AppsCategoryIndex200Response) HasLinks() bool` + +HasLinks returns a boolean if a field has been set. + +### GetMeta + +`func (o *AppsCategoryIndex200Response) GetMeta() PaginatedResponseMeta` + +GetMeta returns the Meta field if non-nil, zero value otherwise. + +### GetMetaOk + +`func (o *AppsCategoryIndex200Response) GetMetaOk() (*PaginatedResponseMeta, bool)` + +GetMetaOk returns a tuple with the Meta field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMeta + +`func (o *AppsCategoryIndex200Response) SetMeta(v PaginatedResponseMeta)` + +SetMeta sets Meta field to given value. + +### HasMeta + +`func (o *AppsCategoryIndex200Response) HasMeta() bool` + +HasMeta returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/AppsCategoryShow200Response.md b/docs/AppsCategoryShow200Response.md new file mode 100644 index 0000000..acab263 --- /dev/null +++ b/docs/AppsCategoryShow200Response.md @@ -0,0 +1,92 @@ +# AppsCategoryShow200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**ApplicationCategory**](ApplicationCategory.md) | | [optional] +**Message** | Pointer to **NullableString** | | [optional] + +## Methods + +### NewAppsCategoryShow200Response + +`func NewAppsCategoryShow200Response() *AppsCategoryShow200Response` + +NewAppsCategoryShow200Response instantiates a new AppsCategoryShow200Response object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewAppsCategoryShow200ResponseWithDefaults + +`func NewAppsCategoryShow200ResponseWithDefaults() *AppsCategoryShow200Response` + +NewAppsCategoryShow200ResponseWithDefaults instantiates a new AppsCategoryShow200Response object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *AppsCategoryShow200Response) GetData() ApplicationCategory` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *AppsCategoryShow200Response) GetDataOk() (*ApplicationCategory, 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 *AppsCategoryShow200Response) SetData(v ApplicationCategory)` + +SetData sets Data field to given value. + +### HasData + +`func (o *AppsCategoryShow200Response) HasData() bool` + +HasData returns a boolean if a field has been set. + +### GetMessage + +`func (o *AppsCategoryShow200Response) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *AppsCategoryShow200Response) GetMessageOk() (*string, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessage + +`func (o *AppsCategoryShow200Response) SetMessage(v string)` + +SetMessage sets Message field to given value. + +### HasMessage + +`func (o *AppsCategoryShow200Response) HasMessage() bool` + +HasMessage returns a boolean if a field has been set. + +### SetMessageNil + +`func (o *AppsCategoryShow200Response) SetMessageNil(b bool)` + + SetMessageNil sets the value for Message to be an explicit nil + +### UnsetMessage +`func (o *AppsCategoryShow200Response) UnsetMessage()` + +UnsetMessage ensures that no value is present for Message, not even an explicit nil + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/AppsIndex200Response.md b/docs/AppsIndex200Response.md new file mode 100644 index 0000000..0774332 --- /dev/null +++ b/docs/AppsIndex200Response.md @@ -0,0 +1,108 @@ +# AppsIndex200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**[]CdnApp**](CdnApp.md) | | [optional] +**Links** | Pointer to [**PaginatedResponseLinks**](PaginatedResponseLinks.md) | | [optional] +**Meta** | Pointer to [**PaginatedResponseMeta**](PaginatedResponseMeta.md) | | [optional] + +## Methods + +### NewAppsIndex200Response + +`func NewAppsIndex200Response() *AppsIndex200Response` + +NewAppsIndex200Response instantiates a new AppsIndex200Response object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewAppsIndex200ResponseWithDefaults + +`func NewAppsIndex200ResponseWithDefaults() *AppsIndex200Response` + +NewAppsIndex200ResponseWithDefaults instantiates a new AppsIndex200Response object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *AppsIndex200Response) GetData() []CdnApp` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *AppsIndex200Response) GetDataOk() (*[]CdnApp, 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 *AppsIndex200Response) SetData(v []CdnApp)` + +SetData sets Data field to given value. + +### HasData + +`func (o *AppsIndex200Response) HasData() bool` + +HasData returns a boolean if a field has been set. + +### GetLinks + +`func (o *AppsIndex200Response) GetLinks() PaginatedResponseLinks` + +GetLinks returns the Links field if non-nil, zero value otherwise. + +### GetLinksOk + +`func (o *AppsIndex200Response) GetLinksOk() (*PaginatedResponseLinks, bool)` + +GetLinksOk returns a tuple with the Links field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLinks + +`func (o *AppsIndex200Response) SetLinks(v PaginatedResponseLinks)` + +SetLinks sets Links field to given value. + +### HasLinks + +`func (o *AppsIndex200Response) HasLinks() bool` + +HasLinks returns a boolean if a field has been set. + +### GetMeta + +`func (o *AppsIndex200Response) GetMeta() PaginatedResponseMeta` + +GetMeta returns the Meta field if non-nil, zero value otherwise. + +### GetMetaOk + +`func (o *AppsIndex200Response) GetMetaOk() (*PaginatedResponseMeta, bool)` + +GetMetaOk returns a tuple with the Meta field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMeta + +`func (o *AppsIndex200Response) SetMeta(v PaginatedResponseMeta)` + +SetMeta sets Meta field to given value. + +### HasMeta + +`func (o *AppsIndex200Response) HasMeta() bool` + +HasMeta returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/AttackReport.md b/docs/AttackReport.md new file mode 100644 index 0000000..bb268e4 --- /dev/null +++ b/docs/AttackReport.md @@ -0,0 +1,82 @@ +# AttackReport + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Statistics** | Pointer to [**AttackReportStatistics**](AttackReportStatistics.md) | | [optional] +**Charts** | Pointer to [**AttackReportCharts**](AttackReportCharts.md) | | [optional] + +## Methods + +### NewAttackReport + +`func NewAttackReport() *AttackReport` + +NewAttackReport instantiates a new AttackReport object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewAttackReportWithDefaults + +`func NewAttackReportWithDefaults() *AttackReport` + +NewAttackReportWithDefaults instantiates a new AttackReport object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetStatistics + +`func (o *AttackReport) GetStatistics() AttackReportStatistics` + +GetStatistics returns the Statistics field if non-nil, zero value otherwise. + +### GetStatisticsOk + +`func (o *AttackReport) GetStatisticsOk() (*AttackReportStatistics, bool)` + +GetStatisticsOk returns a tuple with the Statistics field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatistics + +`func (o *AttackReport) SetStatistics(v AttackReportStatistics)` + +SetStatistics sets Statistics field to given value. + +### HasStatistics + +`func (o *AttackReport) HasStatistics() bool` + +HasStatistics returns a boolean if a field has been set. + +### GetCharts + +`func (o *AttackReport) GetCharts() AttackReportCharts` + +GetCharts returns the Charts field if non-nil, zero value otherwise. + +### GetChartsOk + +`func (o *AttackReport) GetChartsOk() (*AttackReportCharts, bool)` + +GetChartsOk returns a tuple with the Charts field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCharts + +`func (o *AttackReport) SetCharts(v AttackReportCharts)` + +SetCharts sets Charts field to given value. + +### HasCharts + +`func (o *AttackReport) HasCharts() bool` + +HasCharts returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/AttackReportCharts.md b/docs/AttackReportCharts.md new file mode 100644 index 0000000..6b84bf2 --- /dev/null +++ b/docs/AttackReportCharts.md @@ -0,0 +1,56 @@ +# AttackReportCharts + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Attacks** | Pointer to [**AttackReportChartsAttacks**](AttackReportChartsAttacks.md) | | [optional] + +## Methods + +### NewAttackReportCharts + +`func NewAttackReportCharts() *AttackReportCharts` + +NewAttackReportCharts instantiates a new AttackReportCharts object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewAttackReportChartsWithDefaults + +`func NewAttackReportChartsWithDefaults() *AttackReportCharts` + +NewAttackReportChartsWithDefaults instantiates a new AttackReportCharts object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetAttacks + +`func (o *AttackReportCharts) GetAttacks() AttackReportChartsAttacks` + +GetAttacks returns the Attacks field if non-nil, zero value otherwise. + +### GetAttacksOk + +`func (o *AttackReportCharts) GetAttacksOk() (*AttackReportChartsAttacks, bool)` + +GetAttacksOk returns a tuple with the Attacks field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAttacks + +`func (o *AttackReportCharts) SetAttacks(v AttackReportChartsAttacks)` + +SetAttacks sets Attacks field to given value. + +### HasAttacks + +`func (o *AttackReportCharts) HasAttacks() bool` + +HasAttacks returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/AttackReportChartsAttacks.md b/docs/AttackReportChartsAttacks.md new file mode 100644 index 0000000..da70b29 --- /dev/null +++ b/docs/AttackReportChartsAttacks.md @@ -0,0 +1,108 @@ +# AttackReportChartsAttacks + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Title** | Pointer to **string** | | [optional] +**Categories** | Pointer to [**[]time.Time**](time.Time.md) | | [optional] +**Series** | Pointer to [**[]AttackReportChartsAttacksSeriesInner**](AttackReportChartsAttacksSeriesInner.md) | | [optional] + +## Methods + +### NewAttackReportChartsAttacks + +`func NewAttackReportChartsAttacks() *AttackReportChartsAttacks` + +NewAttackReportChartsAttacks instantiates a new AttackReportChartsAttacks object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewAttackReportChartsAttacksWithDefaults + +`func NewAttackReportChartsAttacksWithDefaults() *AttackReportChartsAttacks` + +NewAttackReportChartsAttacksWithDefaults instantiates a new AttackReportChartsAttacks object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetTitle + +`func (o *AttackReportChartsAttacks) GetTitle() string` + +GetTitle returns the Title field if non-nil, zero value otherwise. + +### GetTitleOk + +`func (o *AttackReportChartsAttacks) 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 *AttackReportChartsAttacks) SetTitle(v string)` + +SetTitle sets Title field to given value. + +### HasTitle + +`func (o *AttackReportChartsAttacks) HasTitle() bool` + +HasTitle returns a boolean if a field has been set. + +### GetCategories + +`func (o *AttackReportChartsAttacks) GetCategories() []time.Time` + +GetCategories returns the Categories field if non-nil, zero value otherwise. + +### GetCategoriesOk + +`func (o *AttackReportChartsAttacks) GetCategoriesOk() (*[]time.Time, bool)` + +GetCategoriesOk returns a tuple with the Categories field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCategories + +`func (o *AttackReportChartsAttacks) SetCategories(v []time.Time)` + +SetCategories sets Categories field to given value. + +### HasCategories + +`func (o *AttackReportChartsAttacks) HasCategories() bool` + +HasCategories returns a boolean if a field has been set. + +### GetSeries + +`func (o *AttackReportChartsAttacks) GetSeries() []AttackReportChartsAttacksSeriesInner` + +GetSeries returns the Series field if non-nil, zero value otherwise. + +### GetSeriesOk + +`func (o *AttackReportChartsAttacks) GetSeriesOk() (*[]AttackReportChartsAttacksSeriesInner, bool)` + +GetSeriesOk returns a tuple with the Series field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSeries + +`func (o *AttackReportChartsAttacks) SetSeries(v []AttackReportChartsAttacksSeriesInner)` + +SetSeries sets Series field to given value. + +### HasSeries + +`func (o *AttackReportChartsAttacks) HasSeries() bool` + +HasSeries returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/AttackReportChartsAttacksSeriesInner.md b/docs/AttackReportChartsAttacksSeriesInner.md new file mode 100644 index 0000000..5e5c4aa --- /dev/null +++ b/docs/AttackReportChartsAttacksSeriesInner.md @@ -0,0 +1,82 @@ +# AttackReportChartsAttacksSeriesInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **string** | | [optional] +**Data** | Pointer to **[]int32** | | [optional] + +## Methods + +### NewAttackReportChartsAttacksSeriesInner + +`func NewAttackReportChartsAttacksSeriesInner() *AttackReportChartsAttacksSeriesInner` + +NewAttackReportChartsAttacksSeriesInner instantiates a new AttackReportChartsAttacksSeriesInner object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewAttackReportChartsAttacksSeriesInnerWithDefaults + +`func NewAttackReportChartsAttacksSeriesInnerWithDefaults() *AttackReportChartsAttacksSeriesInner` + +NewAttackReportChartsAttacksSeriesInnerWithDefaults instantiates a new AttackReportChartsAttacksSeriesInner object +This 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 *AttackReportChartsAttacksSeriesInner) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *AttackReportChartsAttacksSeriesInner) 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 *AttackReportChartsAttacksSeriesInner) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *AttackReportChartsAttacksSeriesInner) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetData + +`func (o *AttackReportChartsAttacksSeriesInner) GetData() []int32` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *AttackReportChartsAttacksSeriesInner) GetDataOk() (*[]int32, 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 *AttackReportChartsAttacksSeriesInner) SetData(v []int32)` + +SetData sets Data field to given value. + +### HasData + +`func (o *AttackReportChartsAttacksSeriesInner) HasData() bool` + +HasData returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/AttackReportItem.md b/docs/AttackReportItem.md new file mode 100644 index 0000000..d441aa9 --- /dev/null +++ b/docs/AttackReportItem.md @@ -0,0 +1,290 @@ +# AttackReportItem + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AttackerIp** | Pointer to **string** | | [optional] +**AttackerCountry** | Pointer to **string** | | [optional] +**Method** | Pointer to **string** | | [optional] +**Uri** | Pointer to **string** | | [optional] +**Host** | Pointer to **[]string** | | [optional] +**Timestamp** | Pointer to **time.Time** | | [optional] +**UriArgs** | Pointer to **string** | | [optional] +**Cookie** | Pointer to **[]string** | | [optional] +**Alerts** | Pointer to **[]string** | | [optional] +**UserAgent** | Pointer to **[]string** | | [optional] + +## Methods + +### NewAttackReportItem + +`func NewAttackReportItem() *AttackReportItem` + +NewAttackReportItem instantiates a new AttackReportItem object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewAttackReportItemWithDefaults + +`func NewAttackReportItemWithDefaults() *AttackReportItem` + +NewAttackReportItemWithDefaults instantiates a new AttackReportItem object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetAttackerIp + +`func (o *AttackReportItem) GetAttackerIp() string` + +GetAttackerIp returns the AttackerIp field if non-nil, zero value otherwise. + +### GetAttackerIpOk + +`func (o *AttackReportItem) GetAttackerIpOk() (*string, bool)` + +GetAttackerIpOk returns a tuple with the AttackerIp field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAttackerIp + +`func (o *AttackReportItem) SetAttackerIp(v string)` + +SetAttackerIp sets AttackerIp field to given value. + +### HasAttackerIp + +`func (o *AttackReportItem) HasAttackerIp() bool` + +HasAttackerIp returns a boolean if a field has been set. + +### GetAttackerCountry + +`func (o *AttackReportItem) GetAttackerCountry() string` + +GetAttackerCountry returns the AttackerCountry field if non-nil, zero value otherwise. + +### GetAttackerCountryOk + +`func (o *AttackReportItem) GetAttackerCountryOk() (*string, bool)` + +GetAttackerCountryOk returns a tuple with the AttackerCountry field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAttackerCountry + +`func (o *AttackReportItem) SetAttackerCountry(v string)` + +SetAttackerCountry sets AttackerCountry field to given value. + +### HasAttackerCountry + +`func (o *AttackReportItem) HasAttackerCountry() bool` + +HasAttackerCountry returns a boolean if a field has been set. + +### GetMethod + +`func (o *AttackReportItem) GetMethod() string` + +GetMethod returns the Method field if non-nil, zero value otherwise. + +### GetMethodOk + +`func (o *AttackReportItem) GetMethodOk() (*string, bool)` + +GetMethodOk returns a tuple with the Method field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMethod + +`func (o *AttackReportItem) SetMethod(v string)` + +SetMethod sets Method field to given value. + +### HasMethod + +`func (o *AttackReportItem) HasMethod() bool` + +HasMethod returns a boolean if a field has been set. + +### GetUri + +`func (o *AttackReportItem) GetUri() string` + +GetUri returns the Uri field if non-nil, zero value otherwise. + +### GetUriOk + +`func (o *AttackReportItem) GetUriOk() (*string, bool)` + +GetUriOk returns a tuple with the Uri field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUri + +`func (o *AttackReportItem) SetUri(v string)` + +SetUri sets Uri field to given value. + +### HasUri + +`func (o *AttackReportItem) HasUri() bool` + +HasUri returns a boolean if a field has been set. + +### GetHost + +`func (o *AttackReportItem) GetHost() []string` + +GetHost returns the Host field if non-nil, zero value otherwise. + +### GetHostOk + +`func (o *AttackReportItem) GetHostOk() (*[]string, bool)` + +GetHostOk returns a tuple with the Host field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHost + +`func (o *AttackReportItem) SetHost(v []string)` + +SetHost sets Host field to given value. + +### HasHost + +`func (o *AttackReportItem) HasHost() bool` + +HasHost returns a boolean if a field has been set. + +### GetTimestamp + +`func (o *AttackReportItem) GetTimestamp() time.Time` + +GetTimestamp returns the Timestamp field if non-nil, zero value otherwise. + +### GetTimestampOk + +`func (o *AttackReportItem) GetTimestampOk() (*time.Time, bool)` + +GetTimestampOk returns a tuple with the Timestamp field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTimestamp + +`func (o *AttackReportItem) SetTimestamp(v time.Time)` + +SetTimestamp sets Timestamp field to given value. + +### HasTimestamp + +`func (o *AttackReportItem) HasTimestamp() bool` + +HasTimestamp returns a boolean if a field has been set. + +### GetUriArgs + +`func (o *AttackReportItem) GetUriArgs() string` + +GetUriArgs returns the UriArgs field if non-nil, zero value otherwise. + +### GetUriArgsOk + +`func (o *AttackReportItem) GetUriArgsOk() (*string, bool)` + +GetUriArgsOk returns a tuple with the UriArgs field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUriArgs + +`func (o *AttackReportItem) SetUriArgs(v string)` + +SetUriArgs sets UriArgs field to given value. + +### HasUriArgs + +`func (o *AttackReportItem) HasUriArgs() bool` + +HasUriArgs returns a boolean if a field has been set. + +### GetCookie + +`func (o *AttackReportItem) GetCookie() []string` + +GetCookie returns the Cookie field if non-nil, zero value otherwise. + +### GetCookieOk + +`func (o *AttackReportItem) GetCookieOk() (*[]string, bool)` + +GetCookieOk returns a tuple with the Cookie field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCookie + +`func (o *AttackReportItem) SetCookie(v []string)` + +SetCookie sets Cookie field to given value. + +### HasCookie + +`func (o *AttackReportItem) HasCookie() bool` + +HasCookie returns a boolean if a field has been set. + +### GetAlerts + +`func (o *AttackReportItem) GetAlerts() []string` + +GetAlerts returns the Alerts field if non-nil, zero value otherwise. + +### GetAlertsOk + +`func (o *AttackReportItem) GetAlertsOk() (*[]string, bool)` + +GetAlertsOk returns a tuple with the Alerts field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAlerts + +`func (o *AttackReportItem) SetAlerts(v []string)` + +SetAlerts sets Alerts field to given value. + +### HasAlerts + +`func (o *AttackReportItem) HasAlerts() bool` + +HasAlerts returns a boolean if a field has been set. + +### GetUserAgent + +`func (o *AttackReportItem) GetUserAgent() []string` + +GetUserAgent returns the UserAgent field if non-nil, zero value otherwise. + +### GetUserAgentOk + +`func (o *AttackReportItem) GetUserAgentOk() (*[]string, bool)` + +GetUserAgentOk returns a tuple with the UserAgent field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUserAgent + +`func (o *AttackReportItem) SetUserAgent(v []string)` + +SetUserAgent sets UserAgent field to given value. + +### HasUserAgent + +`func (o *AttackReportItem) HasUserAgent() bool` + +HasUserAgent returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/AttackReportMap.md b/docs/AttackReportMap.md new file mode 100644 index 0000000..3503a94 --- /dev/null +++ b/docs/AttackReportMap.md @@ -0,0 +1,108 @@ +# AttackReportMap + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Statistics** | Pointer to [**[]AttackReportMapStatisticsInner**](AttackReportMapStatisticsInner.md) | | [optional] +**Charts** | Pointer to [**AttackReportMapCharts**](AttackReportMapCharts.md) | | [optional] +**Lists** | Pointer to [**[]AttackReportMapStatisticsInner**](AttackReportMapStatisticsInner.md) | | [optional] + +## Methods + +### NewAttackReportMap + +`func NewAttackReportMap() *AttackReportMap` + +NewAttackReportMap instantiates a new AttackReportMap object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewAttackReportMapWithDefaults + +`func NewAttackReportMapWithDefaults() *AttackReportMap` + +NewAttackReportMapWithDefaults instantiates a new AttackReportMap object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetStatistics + +`func (o *AttackReportMap) GetStatistics() []AttackReportMapStatisticsInner` + +GetStatistics returns the Statistics field if non-nil, zero value otherwise. + +### GetStatisticsOk + +`func (o *AttackReportMap) GetStatisticsOk() (*[]AttackReportMapStatisticsInner, bool)` + +GetStatisticsOk returns a tuple with the Statistics field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatistics + +`func (o *AttackReportMap) SetStatistics(v []AttackReportMapStatisticsInner)` + +SetStatistics sets Statistics field to given value. + +### HasStatistics + +`func (o *AttackReportMap) HasStatistics() bool` + +HasStatistics returns a boolean if a field has been set. + +### GetCharts + +`func (o *AttackReportMap) GetCharts() AttackReportMapCharts` + +GetCharts returns the Charts field if non-nil, zero value otherwise. + +### GetChartsOk + +`func (o *AttackReportMap) GetChartsOk() (*AttackReportMapCharts, bool)` + +GetChartsOk returns a tuple with the Charts field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCharts + +`func (o *AttackReportMap) SetCharts(v AttackReportMapCharts)` + +SetCharts sets Charts field to given value. + +### HasCharts + +`func (o *AttackReportMap) HasCharts() bool` + +HasCharts returns a boolean if a field has been set. + +### GetLists + +`func (o *AttackReportMap) GetLists() []AttackReportMapStatisticsInner` + +GetLists returns the Lists field if non-nil, zero value otherwise. + +### GetListsOk + +`func (o *AttackReportMap) GetListsOk() (*[]AttackReportMapStatisticsInner, bool)` + +GetListsOk returns a tuple with the Lists field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLists + +`func (o *AttackReportMap) SetLists(v []AttackReportMapStatisticsInner)` + +SetLists sets Lists field to given value. + +### HasLists + +`func (o *AttackReportMap) HasLists() bool` + +HasLists returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/AttackReportMapCharts.md b/docs/AttackReportMapCharts.md new file mode 100644 index 0000000..21e1dda --- /dev/null +++ b/docs/AttackReportMapCharts.md @@ -0,0 +1,56 @@ +# AttackReportMapCharts + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Attacks** | Pointer to [**map[string]AttackReportMapChartsAttacksValue**](AttackReportMapChartsAttacksValue.md) | | [optional] + +## Methods + +### NewAttackReportMapCharts + +`func NewAttackReportMapCharts() *AttackReportMapCharts` + +NewAttackReportMapCharts instantiates a new AttackReportMapCharts object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewAttackReportMapChartsWithDefaults + +`func NewAttackReportMapChartsWithDefaults() *AttackReportMapCharts` + +NewAttackReportMapChartsWithDefaults instantiates a new AttackReportMapCharts object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetAttacks + +`func (o *AttackReportMapCharts) GetAttacks() map[string]AttackReportMapChartsAttacksValue` + +GetAttacks returns the Attacks field if non-nil, zero value otherwise. + +### GetAttacksOk + +`func (o *AttackReportMapCharts) GetAttacksOk() (*map[string]AttackReportMapChartsAttacksValue, bool)` + +GetAttacksOk returns a tuple with the Attacks field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAttacks + +`func (o *AttackReportMapCharts) SetAttacks(v map[string]AttackReportMapChartsAttacksValue)` + +SetAttacks sets Attacks field to given value. + +### HasAttacks + +`func (o *AttackReportMapCharts) HasAttacks() bool` + +HasAttacks returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/AttackReportMapChartsAttacksValue.md b/docs/AttackReportMapChartsAttacksValue.md new file mode 100644 index 0000000..0e589be --- /dev/null +++ b/docs/AttackReportMapChartsAttacksValue.md @@ -0,0 +1,108 @@ +# AttackReportMapChartsAttacksValue + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FillKey** | Pointer to **int32** | A numerical key used for coloring the map | [optional] +**Name** | Pointer to **string** | The name of the country | [optional] +**Value** | Pointer to **int32** | The number of attacks | [optional] + +## Methods + +### NewAttackReportMapChartsAttacksValue + +`func NewAttackReportMapChartsAttacksValue() *AttackReportMapChartsAttacksValue` + +NewAttackReportMapChartsAttacksValue instantiates a new AttackReportMapChartsAttacksValue object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewAttackReportMapChartsAttacksValueWithDefaults + +`func NewAttackReportMapChartsAttacksValueWithDefaults() *AttackReportMapChartsAttacksValue` + +NewAttackReportMapChartsAttacksValueWithDefaults instantiates a new AttackReportMapChartsAttacksValue object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetFillKey + +`func (o *AttackReportMapChartsAttacksValue) GetFillKey() int32` + +GetFillKey returns the FillKey field if non-nil, zero value otherwise. + +### GetFillKeyOk + +`func (o *AttackReportMapChartsAttacksValue) GetFillKeyOk() (*int32, bool)` + +GetFillKeyOk returns a tuple with the FillKey field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFillKey + +`func (o *AttackReportMapChartsAttacksValue) SetFillKey(v int32)` + +SetFillKey sets FillKey field to given value. + +### HasFillKey + +`func (o *AttackReportMapChartsAttacksValue) HasFillKey() bool` + +HasFillKey returns a boolean if a field has been set. + +### GetName + +`func (o *AttackReportMapChartsAttacksValue) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *AttackReportMapChartsAttacksValue) 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 *AttackReportMapChartsAttacksValue) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *AttackReportMapChartsAttacksValue) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetValue + +`func (o *AttackReportMapChartsAttacksValue) GetValue() int32` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *AttackReportMapChartsAttacksValue) GetValueOk() (*int32, 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 *AttackReportMapChartsAttacksValue) SetValue(v int32)` + +SetValue sets Value field to given value. + +### HasValue + +`func (o *AttackReportMapChartsAttacksValue) HasValue() bool` + +HasValue returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/AttackReportMapData.md b/docs/AttackReportMapData.md new file mode 100644 index 0000000..695b1f8 --- /dev/null +++ b/docs/AttackReportMapData.md @@ -0,0 +1,56 @@ +# AttackReportMapData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**AttackReportMap**](AttackReportMap.md) | | [optional] + +## Methods + +### NewAttackReportMapData + +`func NewAttackReportMapData() *AttackReportMapData` + +NewAttackReportMapData instantiates a new AttackReportMapData object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewAttackReportMapDataWithDefaults + +`func NewAttackReportMapDataWithDefaults() *AttackReportMapData` + +NewAttackReportMapDataWithDefaults instantiates a new AttackReportMapData object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *AttackReportMapData) GetData() AttackReportMap` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *AttackReportMapData) GetDataOk() (*AttackReportMap, 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 *AttackReportMapData) SetData(v AttackReportMap)` + +SetData sets Data field to given value. + +### HasData + +`func (o *AttackReportMapData) HasData() bool` + +HasData returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/AttackReportMapStatisticsInner.md b/docs/AttackReportMapStatisticsInner.md new file mode 100644 index 0000000..10a1ce0 --- /dev/null +++ b/docs/AttackReportMapStatisticsInner.md @@ -0,0 +1,134 @@ +# AttackReportMapStatisticsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Country** | Pointer to **string** | The 2-letter country code | [optional] +**Name** | Pointer to **string** | The name of the country | [optional] +**Code** | Pointer to **string** | The 3-letter country code | [optional] +**Attack** | Pointer to **int32** | The number of attacks | [optional] + +## Methods + +### NewAttackReportMapStatisticsInner + +`func NewAttackReportMapStatisticsInner() *AttackReportMapStatisticsInner` + +NewAttackReportMapStatisticsInner instantiates a new AttackReportMapStatisticsInner object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewAttackReportMapStatisticsInnerWithDefaults + +`func NewAttackReportMapStatisticsInnerWithDefaults() *AttackReportMapStatisticsInner` + +NewAttackReportMapStatisticsInnerWithDefaults instantiates a new AttackReportMapStatisticsInner object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCountry + +`func (o *AttackReportMapStatisticsInner) GetCountry() string` + +GetCountry returns the Country field if non-nil, zero value otherwise. + +### GetCountryOk + +`func (o *AttackReportMapStatisticsInner) 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 *AttackReportMapStatisticsInner) SetCountry(v string)` + +SetCountry sets Country field to given value. + +### HasCountry + +`func (o *AttackReportMapStatisticsInner) HasCountry() bool` + +HasCountry returns a boolean if a field has been set. + +### GetName + +`func (o *AttackReportMapStatisticsInner) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *AttackReportMapStatisticsInner) 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 *AttackReportMapStatisticsInner) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *AttackReportMapStatisticsInner) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetCode + +`func (o *AttackReportMapStatisticsInner) GetCode() string` + +GetCode returns the Code field if non-nil, zero value otherwise. + +### GetCodeOk + +`func (o *AttackReportMapStatisticsInner) GetCodeOk() (*string, bool)` + +GetCodeOk returns a tuple with the Code field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCode + +`func (o *AttackReportMapStatisticsInner) SetCode(v string)` + +SetCode sets Code field to given value. + +### HasCode + +`func (o *AttackReportMapStatisticsInner) HasCode() bool` + +HasCode returns a boolean if a field has been set. + +### GetAttack + +`func (o *AttackReportMapStatisticsInner) GetAttack() int32` + +GetAttack returns the Attack field if non-nil, zero value otherwise. + +### GetAttackOk + +`func (o *AttackReportMapStatisticsInner) GetAttackOk() (*int32, bool)` + +GetAttackOk returns a tuple with the Attack field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAttack + +`func (o *AttackReportMapStatisticsInner) SetAttack(v int32)` + +SetAttack sets Attack field to given value. + +### HasAttack + +`func (o *AttackReportMapStatisticsInner) HasAttack() bool` + +HasAttack returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/AttackReportStatistics.md b/docs/AttackReportStatistics.md new file mode 100644 index 0000000..27e287d --- /dev/null +++ b/docs/AttackReportStatistics.md @@ -0,0 +1,56 @@ +# AttackReportStatistics + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Attacks** | Pointer to [**DnsRequestReportStatistics**](DnsRequestReportStatistics.md) | | [optional] + +## Methods + +### NewAttackReportStatistics + +`func NewAttackReportStatistics() *AttackReportStatistics` + +NewAttackReportStatistics instantiates a new AttackReportStatistics object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewAttackReportStatisticsWithDefaults + +`func NewAttackReportStatisticsWithDefaults() *AttackReportStatistics` + +NewAttackReportStatisticsWithDefaults instantiates a new AttackReportStatistics object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetAttacks + +`func (o *AttackReportStatistics) GetAttacks() DnsRequestReportStatistics` + +GetAttacks returns the Attacks field if non-nil, zero value otherwise. + +### GetAttacksOk + +`func (o *AttackReportStatistics) GetAttacksOk() (*DnsRequestReportStatistics, bool)` + +GetAttacksOk returns a tuple with the Attacks field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAttacks + +`func (o *AttackReportStatistics) SetAttacks(v DnsRequestReportStatistics)` + +SetAttacks sets Attacks field to given value. + +### HasAttacks + +`func (o *AttackReportStatistics) HasAttacks() bool` + +HasAttacks returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/AttackReportUri.md b/docs/AttackReportUri.md new file mode 100644 index 0000000..ae7c2a7 --- /dev/null +++ b/docs/AttackReportUri.md @@ -0,0 +1,82 @@ +# AttackReportUri + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Uri** | Pointer to **string** | | [optional] +**Count** | Pointer to **int32** | | [optional] + +## Methods + +### NewAttackReportUri + +`func NewAttackReportUri() *AttackReportUri` + +NewAttackReportUri instantiates a new AttackReportUri object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewAttackReportUriWithDefaults + +`func NewAttackReportUriWithDefaults() *AttackReportUri` + +NewAttackReportUriWithDefaults instantiates a new AttackReportUri object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetUri + +`func (o *AttackReportUri) GetUri() string` + +GetUri returns the Uri field if non-nil, zero value otherwise. + +### GetUriOk + +`func (o *AttackReportUri) GetUriOk() (*string, bool)` + +GetUriOk returns a tuple with the Uri field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUri + +`func (o *AttackReportUri) SetUri(v string)` + +SetUri sets Uri field to given value. + +### HasUri + +`func (o *AttackReportUri) HasUri() bool` + +HasUri returns a boolean if a field has been set. + +### GetCount + +`func (o *AttackReportUri) GetCount() int32` + +GetCount returns the Count field if non-nil, zero value otherwise. + +### GetCountOk + +`func (o *AttackReportUri) 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 *AttackReportUri) SetCount(v int32)` + +SetCount sets Count field to given value. + +### HasCount + +`func (o *AttackReportUri) HasCount() bool` + +HasCount returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/AttackReportUriData.md b/docs/AttackReportUriData.md new file mode 100644 index 0000000..33f3b16 --- /dev/null +++ b/docs/AttackReportUriData.md @@ -0,0 +1,56 @@ +# AttackReportUriData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**[]AttackReportUri**](AttackReportUri.md) | | [optional] + +## Methods + +### NewAttackReportUriData + +`func NewAttackReportUriData() *AttackReportUriData` + +NewAttackReportUriData instantiates a new AttackReportUriData object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewAttackReportUriDataWithDefaults + +`func NewAttackReportUriDataWithDefaults() *AttackReportUriData` + +NewAttackReportUriDataWithDefaults instantiates a new AttackReportUriData object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *AttackReportUriData) GetData() []AttackReportUri` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *AttackReportUriData) GetDataOk() (*[]AttackReportUri, 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 *AttackReportUriData) SetData(v []AttackReportUri)` + +SetData sets Data field to given value. + +### HasData + +`func (o *AttackReportUriData) HasData() bool` + +HasData returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/BaseDnsRecord.md b/docs/BaseDnsRecord.md new file mode 100644 index 0000000..31db32a --- /dev/null +++ b/docs/BaseDnsRecord.md @@ -0,0 +1,290 @@ +# BaseDnsRecord + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **string** | | [optional] [readonly] +**Name** | Pointer to **string** | | [optional] +**Ttl** | Pointer to **int32** | | [optional] +**Cloud** | Pointer to **bool** | | [optional] [default to false] +**UpstreamHttps** | Pointer to **string** | | [optional] +**IpFilterMode** | Pointer to [**DnsRecordIpFilterMode**](DnsRecordIpFilterMode.md) | | [optional] +**IsProtected** | Pointer to **bool** | Protected records cannot be modified or deleted by user. | [optional] [readonly] [default to false] +**Usage** | Pointer to **[]string** | | [optional] [readonly] [default to []] +**CreatedAt** | Pointer to **time.Time** | | [optional] [readonly] +**UpdatedAt** | Pointer to **time.Time** | | [optional] [readonly] + +## Methods + +### NewBaseDnsRecord + +`func NewBaseDnsRecord() *BaseDnsRecord` + +NewBaseDnsRecord instantiates a new BaseDnsRecord object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewBaseDnsRecordWithDefaults + +`func NewBaseDnsRecordWithDefaults() *BaseDnsRecord` + +NewBaseDnsRecordWithDefaults instantiates a new BaseDnsRecord object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *BaseDnsRecord) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *BaseDnsRecord) 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 *BaseDnsRecord) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *BaseDnsRecord) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetName + +`func (o *BaseDnsRecord) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *BaseDnsRecord) 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 *BaseDnsRecord) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *BaseDnsRecord) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetTtl + +`func (o *BaseDnsRecord) GetTtl() int32` + +GetTtl returns the Ttl field if non-nil, zero value otherwise. + +### GetTtlOk + +`func (o *BaseDnsRecord) GetTtlOk() (*int32, bool)` + +GetTtlOk returns a tuple with the Ttl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTtl + +`func (o *BaseDnsRecord) SetTtl(v int32)` + +SetTtl sets Ttl field to given value. + +### HasTtl + +`func (o *BaseDnsRecord) HasTtl() bool` + +HasTtl returns a boolean if a field has been set. + +### GetCloud + +`func (o *BaseDnsRecord) GetCloud() bool` + +GetCloud returns the Cloud field if non-nil, zero value otherwise. + +### GetCloudOk + +`func (o *BaseDnsRecord) GetCloudOk() (*bool, bool)` + +GetCloudOk returns a tuple with the Cloud field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCloud + +`func (o *BaseDnsRecord) SetCloud(v bool)` + +SetCloud sets Cloud field to given value. + +### HasCloud + +`func (o *BaseDnsRecord) HasCloud() bool` + +HasCloud returns a boolean if a field has been set. + +### GetUpstreamHttps + +`func (o *BaseDnsRecord) GetUpstreamHttps() string` + +GetUpstreamHttps returns the UpstreamHttps field if non-nil, zero value otherwise. + +### GetUpstreamHttpsOk + +`func (o *BaseDnsRecord) GetUpstreamHttpsOk() (*string, bool)` + +GetUpstreamHttpsOk returns a tuple with the UpstreamHttps field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpstreamHttps + +`func (o *BaseDnsRecord) SetUpstreamHttps(v string)` + +SetUpstreamHttps sets UpstreamHttps field to given value. + +### HasUpstreamHttps + +`func (o *BaseDnsRecord) HasUpstreamHttps() bool` + +HasUpstreamHttps returns a boolean if a field has been set. + +### GetIpFilterMode + +`func (o *BaseDnsRecord) GetIpFilterMode() DnsRecordIpFilterMode` + +GetIpFilterMode returns the IpFilterMode field if non-nil, zero value otherwise. + +### GetIpFilterModeOk + +`func (o *BaseDnsRecord) GetIpFilterModeOk() (*DnsRecordIpFilterMode, bool)` + +GetIpFilterModeOk returns a tuple with the IpFilterMode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIpFilterMode + +`func (o *BaseDnsRecord) SetIpFilterMode(v DnsRecordIpFilterMode)` + +SetIpFilterMode sets IpFilterMode field to given value. + +### HasIpFilterMode + +`func (o *BaseDnsRecord) HasIpFilterMode() bool` + +HasIpFilterMode returns a boolean if a field has been set. + +### GetIsProtected + +`func (o *BaseDnsRecord) GetIsProtected() bool` + +GetIsProtected returns the IsProtected field if non-nil, zero value otherwise. + +### GetIsProtectedOk + +`func (o *BaseDnsRecord) GetIsProtectedOk() (*bool, bool)` + +GetIsProtectedOk returns a tuple with the IsProtected field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsProtected + +`func (o *BaseDnsRecord) SetIsProtected(v bool)` + +SetIsProtected sets IsProtected field to given value. + +### HasIsProtected + +`func (o *BaseDnsRecord) HasIsProtected() bool` + +HasIsProtected returns a boolean if a field has been set. + +### GetUsage + +`func (o *BaseDnsRecord) GetUsage() []string` + +GetUsage returns the Usage field if non-nil, zero value otherwise. + +### GetUsageOk + +`func (o *BaseDnsRecord) GetUsageOk() (*[]string, bool)` + +GetUsageOk returns a tuple with the Usage field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUsage + +`func (o *BaseDnsRecord) SetUsage(v []string)` + +SetUsage sets Usage field to given value. + +### HasUsage + +`func (o *BaseDnsRecord) HasUsage() bool` + +HasUsage returns a boolean if a field has been set. + +### GetCreatedAt + +`func (o *BaseDnsRecord) GetCreatedAt() time.Time` + +GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. + +### GetCreatedAtOk + +`func (o *BaseDnsRecord) GetCreatedAtOk() (*time.Time, bool)` + +GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedAt + +`func (o *BaseDnsRecord) SetCreatedAt(v time.Time)` + +SetCreatedAt sets CreatedAt field to given value. + +### HasCreatedAt + +`func (o *BaseDnsRecord) HasCreatedAt() bool` + +HasCreatedAt returns a boolean if a field has been set. + +### GetUpdatedAt + +`func (o *BaseDnsRecord) GetUpdatedAt() time.Time` + +GetUpdatedAt returns the UpdatedAt field if non-nil, zero value otherwise. + +### GetUpdatedAtOk + +`func (o *BaseDnsRecord) GetUpdatedAtOk() (*time.Time, bool)` + +GetUpdatedAtOk returns a tuple with the UpdatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpdatedAt + +`func (o *BaseDnsRecord) SetUpdatedAt(v time.Time)` + +SetUpdatedAt sets UpdatedAt field to given value. + +### HasUpdatedAt + +`func (o *BaseDnsRecord) HasUpdatedAt() bool` + +HasUpdatedAt returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/BaseFirewallRule.md b/docs/BaseFirewallRule.md new file mode 100644 index 0000000..db613d8 --- /dev/null +++ b/docs/BaseFirewallRule.md @@ -0,0 +1,186 @@ +# BaseFirewallRule + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **string** | | [optional] [readonly] +**Name** | Pointer to **string** | | [optional] +**FilterExpr** | Pointer to **string** | Wireshark-like filter expression | [optional] +**Action** | Pointer to **string** | | [optional] +**IsEnabled** | Pointer to **bool** | | [optional] +**Note** | Pointer to **string** | | [optional] + +## Methods + +### NewBaseFirewallRule + +`func NewBaseFirewallRule() *BaseFirewallRule` + +NewBaseFirewallRule instantiates a new BaseFirewallRule object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewBaseFirewallRuleWithDefaults + +`func NewBaseFirewallRuleWithDefaults() *BaseFirewallRule` + +NewBaseFirewallRuleWithDefaults instantiates a new BaseFirewallRule object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *BaseFirewallRule) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *BaseFirewallRule) 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 *BaseFirewallRule) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *BaseFirewallRule) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetName + +`func (o *BaseFirewallRule) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *BaseFirewallRule) 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 *BaseFirewallRule) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *BaseFirewallRule) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetFilterExpr + +`func (o *BaseFirewallRule) GetFilterExpr() string` + +GetFilterExpr returns the FilterExpr field if non-nil, zero value otherwise. + +### GetFilterExprOk + +`func (o *BaseFirewallRule) GetFilterExprOk() (*string, bool)` + +GetFilterExprOk returns a tuple with the FilterExpr field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFilterExpr + +`func (o *BaseFirewallRule) SetFilterExpr(v string)` + +SetFilterExpr sets FilterExpr field to given value. + +### HasFilterExpr + +`func (o *BaseFirewallRule) HasFilterExpr() bool` + +HasFilterExpr returns a boolean if a field has been set. + +### GetAction + +`func (o *BaseFirewallRule) GetAction() string` + +GetAction returns the Action field if non-nil, zero value otherwise. + +### GetActionOk + +`func (o *BaseFirewallRule) GetActionOk() (*string, bool)` + +GetActionOk returns a tuple with the Action field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAction + +`func (o *BaseFirewallRule) SetAction(v string)` + +SetAction sets Action field to given value. + +### HasAction + +`func (o *BaseFirewallRule) HasAction() bool` + +HasAction returns a boolean if a field has been set. + +### GetIsEnabled + +`func (o *BaseFirewallRule) GetIsEnabled() bool` + +GetIsEnabled returns the IsEnabled field if non-nil, zero value otherwise. + +### GetIsEnabledOk + +`func (o *BaseFirewallRule) GetIsEnabledOk() (*bool, bool)` + +GetIsEnabledOk returns a tuple with the IsEnabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsEnabled + +`func (o *BaseFirewallRule) SetIsEnabled(v bool)` + +SetIsEnabled sets IsEnabled field to given value. + +### HasIsEnabled + +`func (o *BaseFirewallRule) HasIsEnabled() bool` + +HasIsEnabled returns a boolean if a field has been set. + +### GetNote + +`func (o *BaseFirewallRule) GetNote() string` + +GetNote returns the Note field if non-nil, zero value otherwise. + +### GetNoteOk + +`func (o *BaseFirewallRule) GetNoteOk() (*string, bool)` + +GetNoteOk returns a tuple with the Note field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNote + +`func (o *BaseFirewallRule) SetNote(v string)` + +SetNote sets Note field to given value. + +### HasNote + +`func (o *BaseFirewallRule) HasNote() bool` + +HasNote returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/BaseFirewallSettings.md b/docs/BaseFirewallSettings.md new file mode 100644 index 0000000..a48fff5 --- /dev/null +++ b/docs/BaseFirewallSettings.md @@ -0,0 +1,108 @@ +# BaseFirewallSettings + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**IsEnabled** | Pointer to **bool** | | [optional] [readonly] +**DefaultAction** | Pointer to **string** | | [optional] +**VerifySni** | Pointer to **bool** | True to verify that SNI and hostname are equal | [optional] [default to false] + +## Methods + +### NewBaseFirewallSettings + +`func NewBaseFirewallSettings() *BaseFirewallSettings` + +NewBaseFirewallSettings instantiates a new BaseFirewallSettings object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewBaseFirewallSettingsWithDefaults + +`func NewBaseFirewallSettingsWithDefaults() *BaseFirewallSettings` + +NewBaseFirewallSettingsWithDefaults instantiates a new BaseFirewallSettings object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetIsEnabled + +`func (o *BaseFirewallSettings) GetIsEnabled() bool` + +GetIsEnabled returns the IsEnabled field if non-nil, zero value otherwise. + +### GetIsEnabledOk + +`func (o *BaseFirewallSettings) GetIsEnabledOk() (*bool, bool)` + +GetIsEnabledOk returns a tuple with the IsEnabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsEnabled + +`func (o *BaseFirewallSettings) SetIsEnabled(v bool)` + +SetIsEnabled sets IsEnabled field to given value. + +### HasIsEnabled + +`func (o *BaseFirewallSettings) HasIsEnabled() bool` + +HasIsEnabled returns a boolean if a field has been set. + +### GetDefaultAction + +`func (o *BaseFirewallSettings) GetDefaultAction() string` + +GetDefaultAction returns the DefaultAction field if non-nil, zero value otherwise. + +### GetDefaultActionOk + +`func (o *BaseFirewallSettings) GetDefaultActionOk() (*string, bool)` + +GetDefaultActionOk returns a tuple with the DefaultAction field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDefaultAction + +`func (o *BaseFirewallSettings) SetDefaultAction(v string)` + +SetDefaultAction sets DefaultAction field to given value. + +### HasDefaultAction + +`func (o *BaseFirewallSettings) HasDefaultAction() bool` + +HasDefaultAction returns a boolean if a field has been set. + +### GetVerifySni + +`func (o *BaseFirewallSettings) GetVerifySni() bool` + +GetVerifySni returns the VerifySni field if non-nil, zero value otherwise. + +### GetVerifySniOk + +`func (o *BaseFirewallSettings) GetVerifySniOk() (*bool, bool)` + +GetVerifySniOk returns a tuple with the VerifySni field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVerifySni + +`func (o *BaseFirewallSettings) SetVerifySni(v bool)` + +SetVerifySni sets VerifySni field to given value. + +### HasVerifySni + +`func (o *BaseFirewallSettings) HasVerifySni() bool` + +HasVerifySni returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/BaseHealthCheck.md b/docs/BaseHealthCheck.md new file mode 100644 index 0000000..6c0096c --- /dev/null +++ b/docs/BaseHealthCheck.md @@ -0,0 +1,378 @@ +# BaseHealthCheck + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **string** | | [optional] [readonly] +**Name** | Pointer to **string** | | [optional] +**Description** | Pointer to **string** | | [optional] +**Origin** | Pointer to **string** | can be IP/Host when type is `upstream`, otherwise it must be a valid record ID | [optional] +**OriginType** | Pointer to **string** | | [optional] +**Upstreams** | Pointer to **[]string** | | [optional] +**Interval** | Pointer to **int32** | In milliseconds | [optional] +**Threshold** | Pointer to **int32** | | [optional] +**Type** | Pointer to **string** | | [optional] +**Status** | Pointer to **bool** | The health-check is off or on | [optional] [default to true] +**Retries** | Pointer to **int32** | Number of immediate retries in case of a timeout | [optional] +**Zones** | Pointer to [**[]HealthCheckZone**](HealthCheckZone.md) | | [optional] +**MonitoringUpdatedAt** | Pointer to **NullableTime** | | [optional] + +## Methods + +### NewBaseHealthCheck + +`func NewBaseHealthCheck() *BaseHealthCheck` + +NewBaseHealthCheck instantiates a new BaseHealthCheck object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewBaseHealthCheckWithDefaults + +`func NewBaseHealthCheckWithDefaults() *BaseHealthCheck` + +NewBaseHealthCheckWithDefaults instantiates a new BaseHealthCheck object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *BaseHealthCheck) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *BaseHealthCheck) 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 *BaseHealthCheck) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *BaseHealthCheck) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetName + +`func (o *BaseHealthCheck) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *BaseHealthCheck) 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 *BaseHealthCheck) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *BaseHealthCheck) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetDescription + +`func (o *BaseHealthCheck) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *BaseHealthCheck) 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 *BaseHealthCheck) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *BaseHealthCheck) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetOrigin + +`func (o *BaseHealthCheck) GetOrigin() string` + +GetOrigin returns the Origin field if non-nil, zero value otherwise. + +### GetOriginOk + +`func (o *BaseHealthCheck) GetOriginOk() (*string, bool)` + +GetOriginOk returns a tuple with the Origin field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOrigin + +`func (o *BaseHealthCheck) SetOrigin(v string)` + +SetOrigin sets Origin field to given value. + +### HasOrigin + +`func (o *BaseHealthCheck) HasOrigin() bool` + +HasOrigin returns a boolean if a field has been set. + +### GetOriginType + +`func (o *BaseHealthCheck) GetOriginType() string` + +GetOriginType returns the OriginType field if non-nil, zero value otherwise. + +### GetOriginTypeOk + +`func (o *BaseHealthCheck) GetOriginTypeOk() (*string, bool)` + +GetOriginTypeOk returns a tuple with the OriginType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOriginType + +`func (o *BaseHealthCheck) SetOriginType(v string)` + +SetOriginType sets OriginType field to given value. + +### HasOriginType + +`func (o *BaseHealthCheck) HasOriginType() bool` + +HasOriginType returns a boolean if a field has been set. + +### GetUpstreams + +`func (o *BaseHealthCheck) GetUpstreams() []string` + +GetUpstreams returns the Upstreams field if non-nil, zero value otherwise. + +### GetUpstreamsOk + +`func (o *BaseHealthCheck) GetUpstreamsOk() (*[]string, bool)` + +GetUpstreamsOk returns a tuple with the Upstreams field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpstreams + +`func (o *BaseHealthCheck) SetUpstreams(v []string)` + +SetUpstreams sets Upstreams field to given value. + +### HasUpstreams + +`func (o *BaseHealthCheck) HasUpstreams() bool` + +HasUpstreams returns a boolean if a field has been set. + +### GetInterval + +`func (o *BaseHealthCheck) GetInterval() int32` + +GetInterval returns the Interval field if non-nil, zero value otherwise. + +### GetIntervalOk + +`func (o *BaseHealthCheck) GetIntervalOk() (*int32, bool)` + +GetIntervalOk returns a tuple with the Interval field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetInterval + +`func (o *BaseHealthCheck) SetInterval(v int32)` + +SetInterval sets Interval field to given value. + +### HasInterval + +`func (o *BaseHealthCheck) HasInterval() bool` + +HasInterval returns a boolean if a field has been set. + +### GetThreshold + +`func (o *BaseHealthCheck) GetThreshold() int32` + +GetThreshold returns the Threshold field if non-nil, zero value otherwise. + +### GetThresholdOk + +`func (o *BaseHealthCheck) GetThresholdOk() (*int32, bool)` + +GetThresholdOk returns a tuple with the Threshold field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetThreshold + +`func (o *BaseHealthCheck) SetThreshold(v int32)` + +SetThreshold sets Threshold field to given value. + +### HasThreshold + +`func (o *BaseHealthCheck) HasThreshold() bool` + +HasThreshold returns a boolean if a field has been set. + +### GetType + +`func (o *BaseHealthCheck) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *BaseHealthCheck) 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 *BaseHealthCheck) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *BaseHealthCheck) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetStatus + +`func (o *BaseHealthCheck) GetStatus() bool` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *BaseHealthCheck) GetStatusOk() (*bool, 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 *BaseHealthCheck) SetStatus(v bool)` + +SetStatus sets Status field to given value. + +### HasStatus + +`func (o *BaseHealthCheck) HasStatus() bool` + +HasStatus returns a boolean if a field has been set. + +### GetRetries + +`func (o *BaseHealthCheck) GetRetries() int32` + +GetRetries returns the Retries field if non-nil, zero value otherwise. + +### GetRetriesOk + +`func (o *BaseHealthCheck) GetRetriesOk() (*int32, bool)` + +GetRetriesOk returns a tuple with the Retries field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRetries + +`func (o *BaseHealthCheck) SetRetries(v int32)` + +SetRetries sets Retries field to given value. + +### HasRetries + +`func (o *BaseHealthCheck) HasRetries() bool` + +HasRetries returns a boolean if a field has been set. + +### GetZones + +`func (o *BaseHealthCheck) GetZones() []HealthCheckZone` + +GetZones returns the Zones field if non-nil, zero value otherwise. + +### GetZonesOk + +`func (o *BaseHealthCheck) GetZonesOk() (*[]HealthCheckZone, bool)` + +GetZonesOk returns a tuple with the Zones field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetZones + +`func (o *BaseHealthCheck) SetZones(v []HealthCheckZone)` + +SetZones sets Zones field to given value. + +### HasZones + +`func (o *BaseHealthCheck) HasZones() bool` + +HasZones returns a boolean if a field has been set. + +### GetMonitoringUpdatedAt + +`func (o *BaseHealthCheck) GetMonitoringUpdatedAt() time.Time` + +GetMonitoringUpdatedAt returns the MonitoringUpdatedAt field if non-nil, zero value otherwise. + +### GetMonitoringUpdatedAtOk + +`func (o *BaseHealthCheck) GetMonitoringUpdatedAtOk() (*time.Time, bool)` + +GetMonitoringUpdatedAtOk returns a tuple with the MonitoringUpdatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMonitoringUpdatedAt + +`func (o *BaseHealthCheck) SetMonitoringUpdatedAt(v time.Time)` + +SetMonitoringUpdatedAt sets MonitoringUpdatedAt field to given value. + +### HasMonitoringUpdatedAt + +`func (o *BaseHealthCheck) HasMonitoringUpdatedAt() bool` + +HasMonitoringUpdatedAt returns a boolean if a field has been set. + +### SetMonitoringUpdatedAtNil + +`func (o *BaseHealthCheck) SetMonitoringUpdatedAtNil(b bool)` + + SetMonitoringUpdatedAtNil sets the value for MonitoringUpdatedAt to be an explicit nil + +### UnsetMonitoringUpdatedAt +`func (o *BaseHealthCheck) UnsetMonitoringUpdatedAt()` + +UnsetMonitoringUpdatedAt ensures that no value is present for MonitoringUpdatedAt, not even an explicit nil + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/BaseRateLimitRule.md b/docs/BaseRateLimitRule.md new file mode 100644 index 0000000..f065a9c --- /dev/null +++ b/docs/BaseRateLimitRule.md @@ -0,0 +1,311 @@ +# BaseRateLimitRule + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **string** | | [optional] [readonly] +**Action** | Pointer to **string** | | [optional] [default to "block"] +**IsEnabled** | Pointer to **bool** | | [optional] +**UrlPattern** | **string** | - `?` matches any single character. - `*` matches any (possibly empty) sequence of characters. - `**` matches the current directory and arbitrary subdirectories. This sequence must form a single path component, so both `**a` and `b**` are invalid and will result in an error. A sequence of more than two consecutive `*` characters is also invalid. - `[...]` matches any character inside the brackets. Character sequences can also specify ranges of characters, as ordered by Unicode, so e.g. `[0-9]` specifies any character between 0 and 9 inclusive. An unclosed bracket is invalid. - `[!...]` is the negation of `[...]`, i.e. it matches any characters not in the brackets. - The metacharacters `?`, `*`, `[`, `] `can be matched by using brackets (e.g. `[?]`). When a `]` occurs immediately following `[` or `[!` then it is interpreted as being part of, rather then ending, the character set, so `]` and NOT `]` can be matched by `[]]` and `[!]]` respectively. The - character can be specified inside a character sequence pattern by placing it at the start or the end, e.g. `[abc-]`. | +**Description** | Pointer to **NullableString** | | [optional] +**ExcludeSources** | Pointer to **[]string** | | [optional] +**Rate** | **int32** | | +**Burst** | Pointer to **int32** | | [optional] +**BlockDuration** | Pointer to **int32** | | [optional] +**TimeDuration** | **int32** | | +**AllowedMethods** | Pointer to **[]string** | | [optional] + +## Methods + +### NewBaseRateLimitRule + +`func NewBaseRateLimitRule(urlPattern string, rate int32, timeDuration int32, ) *BaseRateLimitRule` + +NewBaseRateLimitRule instantiates a new BaseRateLimitRule object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewBaseRateLimitRuleWithDefaults + +`func NewBaseRateLimitRuleWithDefaults() *BaseRateLimitRule` + +NewBaseRateLimitRuleWithDefaults instantiates a new BaseRateLimitRule object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *BaseRateLimitRule) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *BaseRateLimitRule) 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 *BaseRateLimitRule) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *BaseRateLimitRule) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetAction + +`func (o *BaseRateLimitRule) GetAction() string` + +GetAction returns the Action field if non-nil, zero value otherwise. + +### GetActionOk + +`func (o *BaseRateLimitRule) GetActionOk() (*string, bool)` + +GetActionOk returns a tuple with the Action field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAction + +`func (o *BaseRateLimitRule) SetAction(v string)` + +SetAction sets Action field to given value. + +### HasAction + +`func (o *BaseRateLimitRule) HasAction() bool` + +HasAction returns a boolean if a field has been set. + +### GetIsEnabled + +`func (o *BaseRateLimitRule) GetIsEnabled() bool` + +GetIsEnabled returns the IsEnabled field if non-nil, zero value otherwise. + +### GetIsEnabledOk + +`func (o *BaseRateLimitRule) GetIsEnabledOk() (*bool, bool)` + +GetIsEnabledOk returns a tuple with the IsEnabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsEnabled + +`func (o *BaseRateLimitRule) SetIsEnabled(v bool)` + +SetIsEnabled sets IsEnabled field to given value. + +### HasIsEnabled + +`func (o *BaseRateLimitRule) HasIsEnabled() bool` + +HasIsEnabled returns a boolean if a field has been set. + +### GetUrlPattern + +`func (o *BaseRateLimitRule) GetUrlPattern() string` + +GetUrlPattern returns the UrlPattern field if non-nil, zero value otherwise. + +### GetUrlPatternOk + +`func (o *BaseRateLimitRule) GetUrlPatternOk() (*string, bool)` + +GetUrlPatternOk returns a tuple with the UrlPattern field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUrlPattern + +`func (o *BaseRateLimitRule) SetUrlPattern(v string)` + +SetUrlPattern sets UrlPattern field to given value. + + +### GetDescription + +`func (o *BaseRateLimitRule) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *BaseRateLimitRule) 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 *BaseRateLimitRule) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *BaseRateLimitRule) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### SetDescriptionNil + +`func (o *BaseRateLimitRule) SetDescriptionNil(b bool)` + + SetDescriptionNil sets the value for Description to be an explicit nil + +### UnsetDescription +`func (o *BaseRateLimitRule) UnsetDescription()` + +UnsetDescription ensures that no value is present for Description, not even an explicit nil +### GetExcludeSources + +`func (o *BaseRateLimitRule) GetExcludeSources() []string` + +GetExcludeSources returns the ExcludeSources field if non-nil, zero value otherwise. + +### GetExcludeSourcesOk + +`func (o *BaseRateLimitRule) GetExcludeSourcesOk() (*[]string, bool)` + +GetExcludeSourcesOk returns a tuple with the ExcludeSources field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExcludeSources + +`func (o *BaseRateLimitRule) SetExcludeSources(v []string)` + +SetExcludeSources sets ExcludeSources field to given value. + +### HasExcludeSources + +`func (o *BaseRateLimitRule) HasExcludeSources() bool` + +HasExcludeSources returns a boolean if a field has been set. + +### GetRate + +`func (o *BaseRateLimitRule) GetRate() int32` + +GetRate returns the Rate field if non-nil, zero value otherwise. + +### GetRateOk + +`func (o *BaseRateLimitRule) GetRateOk() (*int32, bool)` + +GetRateOk returns a tuple with the Rate field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRate + +`func (o *BaseRateLimitRule) SetRate(v int32)` + +SetRate sets Rate field to given value. + + +### GetBurst + +`func (o *BaseRateLimitRule) GetBurst() int32` + +GetBurst returns the Burst field if non-nil, zero value otherwise. + +### GetBurstOk + +`func (o *BaseRateLimitRule) GetBurstOk() (*int32, bool)` + +GetBurstOk returns a tuple with the Burst field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBurst + +`func (o *BaseRateLimitRule) SetBurst(v int32)` + +SetBurst sets Burst field to given value. + +### HasBurst + +`func (o *BaseRateLimitRule) HasBurst() bool` + +HasBurst returns a boolean if a field has been set. + +### GetBlockDuration + +`func (o *BaseRateLimitRule) GetBlockDuration() int32` + +GetBlockDuration returns the BlockDuration field if non-nil, zero value otherwise. + +### GetBlockDurationOk + +`func (o *BaseRateLimitRule) GetBlockDurationOk() (*int32, bool)` + +GetBlockDurationOk returns a tuple with the BlockDuration field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBlockDuration + +`func (o *BaseRateLimitRule) SetBlockDuration(v int32)` + +SetBlockDuration sets BlockDuration field to given value. + +### HasBlockDuration + +`func (o *BaseRateLimitRule) HasBlockDuration() bool` + +HasBlockDuration returns a boolean if a field has been set. + +### GetTimeDuration + +`func (o *BaseRateLimitRule) GetTimeDuration() int32` + +GetTimeDuration returns the TimeDuration field if non-nil, zero value otherwise. + +### GetTimeDurationOk + +`func (o *BaseRateLimitRule) GetTimeDurationOk() (*int32, bool)` + +GetTimeDurationOk returns a tuple with the TimeDuration field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTimeDuration + +`func (o *BaseRateLimitRule) SetTimeDuration(v int32)` + +SetTimeDuration sets TimeDuration field to given value. + + +### GetAllowedMethods + +`func (o *BaseRateLimitRule) GetAllowedMethods() []string` + +GetAllowedMethods returns the AllowedMethods field if non-nil, zero value otherwise. + +### GetAllowedMethodsOk + +`func (o *BaseRateLimitRule) GetAllowedMethodsOk() (*[]string, bool)` + +GetAllowedMethodsOk returns a tuple with the AllowedMethods field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAllowedMethods + +`func (o *BaseRateLimitRule) SetAllowedMethods(v []string)` + +SetAllowedMethods sets AllowedMethods field to given value. + +### HasAllowedMethods + +`func (o *BaseRateLimitRule) HasAllowedMethods() bool` + +HasAllowedMethods returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/BulkReportsTrafficsTotalRequest.md b/docs/BulkReportsTrafficsTotalRequest.md new file mode 100644 index 0000000..cebb099 --- /dev/null +++ b/docs/BulkReportsTrafficsTotalRequest.md @@ -0,0 +1,82 @@ +# BulkReportsTrafficsTotalRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Domains** | Pointer to **[]string** | List of domains' IDs | [optional] +**ExcludeSubdomains** | Pointer to **bool** | Whether to include sub-domains or report only root domain traffic | [optional] + +## Methods + +### NewBulkReportsTrafficsTotalRequest + +`func NewBulkReportsTrafficsTotalRequest() *BulkReportsTrafficsTotalRequest` + +NewBulkReportsTrafficsTotalRequest instantiates a new BulkReportsTrafficsTotalRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewBulkReportsTrafficsTotalRequestWithDefaults + +`func NewBulkReportsTrafficsTotalRequestWithDefaults() *BulkReportsTrafficsTotalRequest` + +NewBulkReportsTrafficsTotalRequestWithDefaults instantiates a new BulkReportsTrafficsTotalRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetDomains + +`func (o *BulkReportsTrafficsTotalRequest) GetDomains() []string` + +GetDomains returns the Domains field if non-nil, zero value otherwise. + +### GetDomainsOk + +`func (o *BulkReportsTrafficsTotalRequest) GetDomainsOk() (*[]string, bool)` + +GetDomainsOk returns a tuple with the Domains field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDomains + +`func (o *BulkReportsTrafficsTotalRequest) SetDomains(v []string)` + +SetDomains sets Domains field to given value. + +### HasDomains + +`func (o *BulkReportsTrafficsTotalRequest) HasDomains() bool` + +HasDomains returns a boolean if a field has been set. + +### GetExcludeSubdomains + +`func (o *BulkReportsTrafficsTotalRequest) GetExcludeSubdomains() bool` + +GetExcludeSubdomains returns the ExcludeSubdomains field if non-nil, zero value otherwise. + +### GetExcludeSubdomainsOk + +`func (o *BulkReportsTrafficsTotalRequest) GetExcludeSubdomainsOk() (*bool, bool)` + +GetExcludeSubdomainsOk returns a tuple with the ExcludeSubdomains field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExcludeSubdomains + +`func (o *BulkReportsTrafficsTotalRequest) SetExcludeSubdomains(v bool)` + +SetExcludeSubdomains sets ExcludeSubdomains field to given value. + +### HasExcludeSubdomains + +`func (o *BulkReportsTrafficsTotalRequest) HasExcludeSubdomains() bool` + +HasExcludeSubdomains returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/BulkReportsVisitorsTotalRequest.md b/docs/BulkReportsVisitorsTotalRequest.md new file mode 100644 index 0000000..324a86d --- /dev/null +++ b/docs/BulkReportsVisitorsTotalRequest.md @@ -0,0 +1,92 @@ +# BulkReportsVisitorsTotalRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Domains** | Pointer to **[]string** | List of domains' IDs | [optional] +**ExcludeSubdomains** | Pointer to **interface{}** | Whether to include sub-domains or report only root domain traffic | [optional] + +## Methods + +### NewBulkReportsVisitorsTotalRequest + +`func NewBulkReportsVisitorsTotalRequest() *BulkReportsVisitorsTotalRequest` + +NewBulkReportsVisitorsTotalRequest instantiates a new BulkReportsVisitorsTotalRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewBulkReportsVisitorsTotalRequestWithDefaults + +`func NewBulkReportsVisitorsTotalRequestWithDefaults() *BulkReportsVisitorsTotalRequest` + +NewBulkReportsVisitorsTotalRequestWithDefaults instantiates a new BulkReportsVisitorsTotalRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetDomains + +`func (o *BulkReportsVisitorsTotalRequest) GetDomains() []string` + +GetDomains returns the Domains field if non-nil, zero value otherwise. + +### GetDomainsOk + +`func (o *BulkReportsVisitorsTotalRequest) GetDomainsOk() (*[]string, bool)` + +GetDomainsOk returns a tuple with the Domains field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDomains + +`func (o *BulkReportsVisitorsTotalRequest) SetDomains(v []string)` + +SetDomains sets Domains field to given value. + +### HasDomains + +`func (o *BulkReportsVisitorsTotalRequest) HasDomains() bool` + +HasDomains returns a boolean if a field has been set. + +### GetExcludeSubdomains + +`func (o *BulkReportsVisitorsTotalRequest) GetExcludeSubdomains() interface{}` + +GetExcludeSubdomains returns the ExcludeSubdomains field if non-nil, zero value otherwise. + +### GetExcludeSubdomainsOk + +`func (o *BulkReportsVisitorsTotalRequest) GetExcludeSubdomainsOk() (*interface{}, bool)` + +GetExcludeSubdomainsOk returns a tuple with the ExcludeSubdomains field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExcludeSubdomains + +`func (o *BulkReportsVisitorsTotalRequest) SetExcludeSubdomains(v interface{})` + +SetExcludeSubdomains sets ExcludeSubdomains field to given value. + +### HasExcludeSubdomains + +`func (o *BulkReportsVisitorsTotalRequest) HasExcludeSubdomains() bool` + +HasExcludeSubdomains returns a boolean if a field has been set. + +### SetExcludeSubdomainsNil + +`func (o *BulkReportsVisitorsTotalRequest) SetExcludeSubdomainsNil(b bool)` + + SetExcludeSubdomainsNil sets the value for ExcludeSubdomains to be an explicit nil + +### UnsetExcludeSubdomains +`func (o *BulkReportsVisitorsTotalRequest) UnsetExcludeSubdomains()` + +UnsetExcludeSubdomains ensures that no value is present for ExcludeSubdomains, not even an explicit nil + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/BulkTrafficReport.md b/docs/BulkTrafficReport.md new file mode 100644 index 0000000..56719d0 --- /dev/null +++ b/docs/BulkTrafficReport.md @@ -0,0 +1,144 @@ +# BulkTrafficReport + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Resource** | Pointer to **string** | Domain's ID | [optional] +**Success** | Pointer to **bool** | | [optional] +**Message** | Pointer to **NullableString** | The error message | [optional] +**Data** | Pointer to [**BulkTrafficReportData**](BulkTrafficReportData.md) | | [optional] + +## Methods + +### NewBulkTrafficReport + +`func NewBulkTrafficReport() *BulkTrafficReport` + +NewBulkTrafficReport instantiates a new BulkTrafficReport object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewBulkTrafficReportWithDefaults + +`func NewBulkTrafficReportWithDefaults() *BulkTrafficReport` + +NewBulkTrafficReportWithDefaults instantiates a new BulkTrafficReport object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetResource + +`func (o *BulkTrafficReport) GetResource() string` + +GetResource returns the Resource field if non-nil, zero value otherwise. + +### GetResourceOk + +`func (o *BulkTrafficReport) GetResourceOk() (*string, bool)` + +GetResourceOk returns a tuple with the Resource field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResource + +`func (o *BulkTrafficReport) SetResource(v string)` + +SetResource sets Resource field to given value. + +### HasResource + +`func (o *BulkTrafficReport) HasResource() bool` + +HasResource returns a boolean if a field has been set. + +### GetSuccess + +`func (o *BulkTrafficReport) GetSuccess() bool` + +GetSuccess returns the Success field if non-nil, zero value otherwise. + +### GetSuccessOk + +`func (o *BulkTrafficReport) GetSuccessOk() (*bool, bool)` + +GetSuccessOk returns a tuple with the Success field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSuccess + +`func (o *BulkTrafficReport) SetSuccess(v bool)` + +SetSuccess sets Success field to given value. + +### HasSuccess + +`func (o *BulkTrafficReport) HasSuccess() bool` + +HasSuccess returns a boolean if a field has been set. + +### GetMessage + +`func (o *BulkTrafficReport) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *BulkTrafficReport) GetMessageOk() (*string, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessage + +`func (o *BulkTrafficReport) SetMessage(v string)` + +SetMessage sets Message field to given value. + +### HasMessage + +`func (o *BulkTrafficReport) HasMessage() bool` + +HasMessage returns a boolean if a field has been set. + +### SetMessageNil + +`func (o *BulkTrafficReport) SetMessageNil(b bool)` + + SetMessageNil sets the value for Message to be an explicit nil + +### UnsetMessage +`func (o *BulkTrafficReport) UnsetMessage()` + +UnsetMessage ensures that no value is present for Message, not even an explicit nil +### GetData + +`func (o *BulkTrafficReport) GetData() BulkTrafficReportData` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *BulkTrafficReport) GetDataOk() (*BulkTrafficReportData, 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 *BulkTrafficReport) SetData(v BulkTrafficReportData)` + +SetData sets Data field to given value. + +### HasData + +`func (o *BulkTrafficReport) HasData() bool` + +HasData returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/BulkTrafficReportData.md b/docs/BulkTrafficReportData.md new file mode 100644 index 0000000..af1cdc7 --- /dev/null +++ b/docs/BulkTrafficReportData.md @@ -0,0 +1,108 @@ +# BulkTrafficReportData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Requests** | Pointer to **int32** | | [optional] +**IngressBytes** | Pointer to **int32** | | [optional] +**EgressBytes** | Pointer to [**BulkTrafficReportDataEgressBytes**](BulkTrafficReportDataEgressBytes.md) | | [optional] + +## Methods + +### NewBulkTrafficReportData + +`func NewBulkTrafficReportData() *BulkTrafficReportData` + +NewBulkTrafficReportData instantiates a new BulkTrafficReportData object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewBulkTrafficReportDataWithDefaults + +`func NewBulkTrafficReportDataWithDefaults() *BulkTrafficReportData` + +NewBulkTrafficReportDataWithDefaults instantiates a new BulkTrafficReportData object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetRequests + +`func (o *BulkTrafficReportData) GetRequests() int32` + +GetRequests returns the Requests field if non-nil, zero value otherwise. + +### GetRequestsOk + +`func (o *BulkTrafficReportData) GetRequestsOk() (*int32, bool)` + +GetRequestsOk returns a tuple with the Requests field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRequests + +`func (o *BulkTrafficReportData) SetRequests(v int32)` + +SetRequests sets Requests field to given value. + +### HasRequests + +`func (o *BulkTrafficReportData) HasRequests() bool` + +HasRequests returns a boolean if a field has been set. + +### GetIngressBytes + +`func (o *BulkTrafficReportData) GetIngressBytes() int32` + +GetIngressBytes returns the IngressBytes field if non-nil, zero value otherwise. + +### GetIngressBytesOk + +`func (o *BulkTrafficReportData) GetIngressBytesOk() (*int32, bool)` + +GetIngressBytesOk returns a tuple with the IngressBytes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIngressBytes + +`func (o *BulkTrafficReportData) SetIngressBytes(v int32)` + +SetIngressBytes sets IngressBytes field to given value. + +### HasIngressBytes + +`func (o *BulkTrafficReportData) HasIngressBytes() bool` + +HasIngressBytes returns a boolean if a field has been set. + +### GetEgressBytes + +`func (o *BulkTrafficReportData) GetEgressBytes() BulkTrafficReportDataEgressBytes` + +GetEgressBytes returns the EgressBytes field if non-nil, zero value otherwise. + +### GetEgressBytesOk + +`func (o *BulkTrafficReportData) GetEgressBytesOk() (*BulkTrafficReportDataEgressBytes, bool)` + +GetEgressBytesOk returns a tuple with the EgressBytes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEgressBytes + +`func (o *BulkTrafficReportData) SetEgressBytes(v BulkTrafficReportDataEgressBytes)` + +SetEgressBytes sets EgressBytes field to given value. + +### HasEgressBytes + +`func (o *BulkTrafficReportData) HasEgressBytes() bool` + +HasEgressBytes returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/BulkTrafficReportDataEgressBytes.md b/docs/BulkTrafficReportDataEgressBytes.md new file mode 100644 index 0000000..465f47a --- /dev/null +++ b/docs/BulkTrafficReportDataEgressBytes.md @@ -0,0 +1,108 @@ +# BulkTrafficReportDataEgressBytes + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Iran** | Pointer to **int32** | | [optional] +**EuropeAmericas** | Pointer to **int32** | | [optional] +**Others** | Pointer to **int32** | | [optional] + +## Methods + +### NewBulkTrafficReportDataEgressBytes + +`func NewBulkTrafficReportDataEgressBytes() *BulkTrafficReportDataEgressBytes` + +NewBulkTrafficReportDataEgressBytes instantiates a new BulkTrafficReportDataEgressBytes object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewBulkTrafficReportDataEgressBytesWithDefaults + +`func NewBulkTrafficReportDataEgressBytesWithDefaults() *BulkTrafficReportDataEgressBytes` + +NewBulkTrafficReportDataEgressBytesWithDefaults instantiates a new BulkTrafficReportDataEgressBytes object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetIran + +`func (o *BulkTrafficReportDataEgressBytes) GetIran() int32` + +GetIran returns the Iran field if non-nil, zero value otherwise. + +### GetIranOk + +`func (o *BulkTrafficReportDataEgressBytes) GetIranOk() (*int32, bool)` + +GetIranOk returns a tuple with the Iran field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIran + +`func (o *BulkTrafficReportDataEgressBytes) SetIran(v int32)` + +SetIran sets Iran field to given value. + +### HasIran + +`func (o *BulkTrafficReportDataEgressBytes) HasIran() bool` + +HasIran returns a boolean if a field has been set. + +### GetEuropeAmericas + +`func (o *BulkTrafficReportDataEgressBytes) GetEuropeAmericas() int32` + +GetEuropeAmericas returns the EuropeAmericas field if non-nil, zero value otherwise. + +### GetEuropeAmericasOk + +`func (o *BulkTrafficReportDataEgressBytes) GetEuropeAmericasOk() (*int32, bool)` + +GetEuropeAmericasOk returns a tuple with the EuropeAmericas field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEuropeAmericas + +`func (o *BulkTrafficReportDataEgressBytes) SetEuropeAmericas(v int32)` + +SetEuropeAmericas sets EuropeAmericas field to given value. + +### HasEuropeAmericas + +`func (o *BulkTrafficReportDataEgressBytes) HasEuropeAmericas() bool` + +HasEuropeAmericas returns a boolean if a field has been set. + +### GetOthers + +`func (o *BulkTrafficReportDataEgressBytes) GetOthers() int32` + +GetOthers returns the Others field if non-nil, zero value otherwise. + +### GetOthersOk + +`func (o *BulkTrafficReportDataEgressBytes) GetOthersOk() (*int32, bool)` + +GetOthersOk returns a tuple with the Others field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOthers + +`func (o *BulkTrafficReportDataEgressBytes) SetOthers(v int32)` + +SetOthers sets Others field to given value. + +### HasOthers + +`func (o *BulkTrafficReportDataEgressBytes) HasOthers() bool` + +HasOthers returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/BulkVisitorReport.md b/docs/BulkVisitorReport.md new file mode 100644 index 0000000..f7acb22 --- /dev/null +++ b/docs/BulkVisitorReport.md @@ -0,0 +1,144 @@ +# BulkVisitorReport + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Resource** | Pointer to **string** | Domain's ID | [optional] +**Success** | Pointer to **bool** | | [optional] +**Message** | Pointer to **NullableString** | The error message | [optional] +**Data** | Pointer to [**BulkVisitorReportData**](BulkVisitorReportData.md) | | [optional] + +## Methods + +### NewBulkVisitorReport + +`func NewBulkVisitorReport() *BulkVisitorReport` + +NewBulkVisitorReport instantiates a new BulkVisitorReport object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewBulkVisitorReportWithDefaults + +`func NewBulkVisitorReportWithDefaults() *BulkVisitorReport` + +NewBulkVisitorReportWithDefaults instantiates a new BulkVisitorReport object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetResource + +`func (o *BulkVisitorReport) GetResource() string` + +GetResource returns the Resource field if non-nil, zero value otherwise. + +### GetResourceOk + +`func (o *BulkVisitorReport) GetResourceOk() (*string, bool)` + +GetResourceOk returns a tuple with the Resource field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResource + +`func (o *BulkVisitorReport) SetResource(v string)` + +SetResource sets Resource field to given value. + +### HasResource + +`func (o *BulkVisitorReport) HasResource() bool` + +HasResource returns a boolean if a field has been set. + +### GetSuccess + +`func (o *BulkVisitorReport) GetSuccess() bool` + +GetSuccess returns the Success field if non-nil, zero value otherwise. + +### GetSuccessOk + +`func (o *BulkVisitorReport) GetSuccessOk() (*bool, bool)` + +GetSuccessOk returns a tuple with the Success field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSuccess + +`func (o *BulkVisitorReport) SetSuccess(v bool)` + +SetSuccess sets Success field to given value. + +### HasSuccess + +`func (o *BulkVisitorReport) HasSuccess() bool` + +HasSuccess returns a boolean if a field has been set. + +### GetMessage + +`func (o *BulkVisitorReport) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *BulkVisitorReport) GetMessageOk() (*string, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessage + +`func (o *BulkVisitorReport) SetMessage(v string)` + +SetMessage sets Message field to given value. + +### HasMessage + +`func (o *BulkVisitorReport) HasMessage() bool` + +HasMessage returns a boolean if a field has been set. + +### SetMessageNil + +`func (o *BulkVisitorReport) SetMessageNil(b bool)` + + SetMessageNil sets the value for Message to be an explicit nil + +### UnsetMessage +`func (o *BulkVisitorReport) UnsetMessage()` + +UnsetMessage ensures that no value is present for Message, not even an explicit nil +### GetData + +`func (o *BulkVisitorReport) GetData() BulkVisitorReportData` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *BulkVisitorReport) GetDataOk() (*BulkVisitorReportData, 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 *BulkVisitorReport) SetData(v BulkVisitorReportData)` + +SetData sets Data field to given value. + +### HasData + +`func (o *BulkVisitorReport) HasData() bool` + +HasData returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/BulkVisitorReportData.md b/docs/BulkVisitorReportData.md new file mode 100644 index 0000000..6bff10a --- /dev/null +++ b/docs/BulkVisitorReportData.md @@ -0,0 +1,56 @@ +# BulkVisitorReportData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Visitors** | Pointer to **int32** | | [optional] + +## Methods + +### NewBulkVisitorReportData + +`func NewBulkVisitorReportData() *BulkVisitorReportData` + +NewBulkVisitorReportData instantiates a new BulkVisitorReportData object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewBulkVisitorReportDataWithDefaults + +`func NewBulkVisitorReportDataWithDefaults() *BulkVisitorReportData` + +NewBulkVisitorReportDataWithDefaults instantiates a new BulkVisitorReportData object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetVisitors + +`func (o *BulkVisitorReportData) GetVisitors() int32` + +GetVisitors returns the Visitors field if non-nil, zero value otherwise. + +### GetVisitorsOk + +`func (o *BulkVisitorReportData) GetVisitorsOk() (*int32, bool)` + +GetVisitorsOk returns a tuple with the Visitors field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVisitors + +`func (o *BulkVisitorReportData) SetVisitors(v int32)` + +SetVisitors sets Visitors field to given value. + +### HasVisitors + +`func (o *BulkVisitorReportData) HasVisitors() bool` + +HasVisitors returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/BypassAction.md b/docs/BypassAction.md new file mode 100644 index 0000000..c941416 --- /dev/null +++ b/docs/BypassAction.md @@ -0,0 +1,108 @@ +# BypassAction + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Rlimit** | Pointer to **bool** | | [optional] +**Challenge** | Pointer to **bool** | | [optional] +**Waf** | Pointer to **bool** | | [optional] + +## Methods + +### NewBypassAction + +`func NewBypassAction() *BypassAction` + +NewBypassAction instantiates a new BypassAction object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewBypassActionWithDefaults + +`func NewBypassActionWithDefaults() *BypassAction` + +NewBypassActionWithDefaults instantiates a new BypassAction object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetRlimit + +`func (o *BypassAction) GetRlimit() bool` + +GetRlimit returns the Rlimit field if non-nil, zero value otherwise. + +### GetRlimitOk + +`func (o *BypassAction) GetRlimitOk() (*bool, bool)` + +GetRlimitOk returns a tuple with the Rlimit field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRlimit + +`func (o *BypassAction) SetRlimit(v bool)` + +SetRlimit sets Rlimit field to given value. + +### HasRlimit + +`func (o *BypassAction) HasRlimit() bool` + +HasRlimit returns a boolean if a field has been set. + +### GetChallenge + +`func (o *BypassAction) GetChallenge() bool` + +GetChallenge returns the Challenge field if non-nil, zero value otherwise. + +### GetChallengeOk + +`func (o *BypassAction) GetChallengeOk() (*bool, bool)` + +GetChallengeOk returns a tuple with the Challenge field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetChallenge + +`func (o *BypassAction) SetChallenge(v bool)` + +SetChallenge sets Challenge field to given value. + +### HasChallenge + +`func (o *BypassAction) HasChallenge() bool` + +HasChallenge returns a boolean if a field has been set. + +### GetWaf + +`func (o *BypassAction) GetWaf() bool` + +GetWaf returns the Waf field if non-nil, zero value otherwise. + +### GetWafOk + +`func (o *BypassAction) GetWafOk() (*bool, bool)` + +GetWafOk returns a tuple with the Waf field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetWaf + +`func (o *BypassAction) SetWaf(v bool)` + +SetWaf sets Waf field to given value. + +### HasWaf + +`func (o *BypassAction) HasWaf() bool` + +HasWaf returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/CAARecord.md b/docs/CAARecord.md new file mode 100644 index 0000000..4969909 --- /dev/null +++ b/docs/CAARecord.md @@ -0,0 +1,342 @@ +# CAARecord + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | Pointer to [**CAARecordValue**](CAARecordValue.md) | | [optional] +**Type** | Pointer to **string** | | [optional] [default to "caa"] +**Id** | Pointer to **string** | | [optional] [readonly] +**Name** | Pointer to **string** | | [optional] +**Ttl** | Pointer to **int32** | | [optional] +**Cloud** | Pointer to **bool** | | [optional] [default to false] +**UpstreamHttps** | Pointer to **string** | | [optional] +**IpFilterMode** | Pointer to [**DnsRecordIpFilterMode**](DnsRecordIpFilterMode.md) | | [optional] +**IsProtected** | Pointer to **bool** | Protected records cannot be modified or deleted by user. | [optional] [readonly] [default to false] +**Usage** | Pointer to **[]string** | | [optional] [readonly] [default to []] +**CreatedAt** | Pointer to **time.Time** | | [optional] [readonly] +**UpdatedAt** | Pointer to **time.Time** | | [optional] [readonly] + +## Methods + +### NewCAARecord + +`func NewCAARecord() *CAARecord` + +NewCAARecord instantiates a new CAARecord object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCAARecordWithDefaults + +`func NewCAARecordWithDefaults() *CAARecord` + +NewCAARecordWithDefaults instantiates a new CAARecord object +This 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 *CAARecord) GetValue() CAARecordValue` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *CAARecord) GetValueOk() (*CAARecordValue, 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 *CAARecord) SetValue(v CAARecordValue)` + +SetValue sets Value field to given value. + +### HasValue + +`func (o *CAARecord) HasValue() bool` + +HasValue returns a boolean if a field has been set. + +### GetType + +`func (o *CAARecord) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *CAARecord) 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 *CAARecord) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *CAARecord) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetId + +`func (o *CAARecord) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *CAARecord) 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 *CAARecord) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *CAARecord) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetName + +`func (o *CAARecord) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *CAARecord) 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 *CAARecord) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *CAARecord) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetTtl + +`func (o *CAARecord) GetTtl() int32` + +GetTtl returns the Ttl field if non-nil, zero value otherwise. + +### GetTtlOk + +`func (o *CAARecord) GetTtlOk() (*int32, bool)` + +GetTtlOk returns a tuple with the Ttl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTtl + +`func (o *CAARecord) SetTtl(v int32)` + +SetTtl sets Ttl field to given value. + +### HasTtl + +`func (o *CAARecord) HasTtl() bool` + +HasTtl returns a boolean if a field has been set. + +### GetCloud + +`func (o *CAARecord) GetCloud() bool` + +GetCloud returns the Cloud field if non-nil, zero value otherwise. + +### GetCloudOk + +`func (o *CAARecord) GetCloudOk() (*bool, bool)` + +GetCloudOk returns a tuple with the Cloud field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCloud + +`func (o *CAARecord) SetCloud(v bool)` + +SetCloud sets Cloud field to given value. + +### HasCloud + +`func (o *CAARecord) HasCloud() bool` + +HasCloud returns a boolean if a field has been set. + +### GetUpstreamHttps + +`func (o *CAARecord) GetUpstreamHttps() string` + +GetUpstreamHttps returns the UpstreamHttps field if non-nil, zero value otherwise. + +### GetUpstreamHttpsOk + +`func (o *CAARecord) GetUpstreamHttpsOk() (*string, bool)` + +GetUpstreamHttpsOk returns a tuple with the UpstreamHttps field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpstreamHttps + +`func (o *CAARecord) SetUpstreamHttps(v string)` + +SetUpstreamHttps sets UpstreamHttps field to given value. + +### HasUpstreamHttps + +`func (o *CAARecord) HasUpstreamHttps() bool` + +HasUpstreamHttps returns a boolean if a field has been set. + +### GetIpFilterMode + +`func (o *CAARecord) GetIpFilterMode() DnsRecordIpFilterMode` + +GetIpFilterMode returns the IpFilterMode field if non-nil, zero value otherwise. + +### GetIpFilterModeOk + +`func (o *CAARecord) GetIpFilterModeOk() (*DnsRecordIpFilterMode, bool)` + +GetIpFilterModeOk returns a tuple with the IpFilterMode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIpFilterMode + +`func (o *CAARecord) SetIpFilterMode(v DnsRecordIpFilterMode)` + +SetIpFilterMode sets IpFilterMode field to given value. + +### HasIpFilterMode + +`func (o *CAARecord) HasIpFilterMode() bool` + +HasIpFilterMode returns a boolean if a field has been set. + +### GetIsProtected + +`func (o *CAARecord) GetIsProtected() bool` + +GetIsProtected returns the IsProtected field if non-nil, zero value otherwise. + +### GetIsProtectedOk + +`func (o *CAARecord) GetIsProtectedOk() (*bool, bool)` + +GetIsProtectedOk returns a tuple with the IsProtected field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsProtected + +`func (o *CAARecord) SetIsProtected(v bool)` + +SetIsProtected sets IsProtected field to given value. + +### HasIsProtected + +`func (o *CAARecord) HasIsProtected() bool` + +HasIsProtected returns a boolean if a field has been set. + +### GetUsage + +`func (o *CAARecord) GetUsage() []string` + +GetUsage returns the Usage field if non-nil, zero value otherwise. + +### GetUsageOk + +`func (o *CAARecord) GetUsageOk() (*[]string, bool)` + +GetUsageOk returns a tuple with the Usage field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUsage + +`func (o *CAARecord) SetUsage(v []string)` + +SetUsage sets Usage field to given value. + +### HasUsage + +`func (o *CAARecord) HasUsage() bool` + +HasUsage returns a boolean if a field has been set. + +### GetCreatedAt + +`func (o *CAARecord) GetCreatedAt() time.Time` + +GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. + +### GetCreatedAtOk + +`func (o *CAARecord) GetCreatedAtOk() (*time.Time, bool)` + +GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedAt + +`func (o *CAARecord) SetCreatedAt(v time.Time)` + +SetCreatedAt sets CreatedAt field to given value. + +### HasCreatedAt + +`func (o *CAARecord) HasCreatedAt() bool` + +HasCreatedAt returns a boolean if a field has been set. + +### GetUpdatedAt + +`func (o *CAARecord) GetUpdatedAt() time.Time` + +GetUpdatedAt returns the UpdatedAt field if non-nil, zero value otherwise. + +### GetUpdatedAtOk + +`func (o *CAARecord) GetUpdatedAtOk() (*time.Time, bool)` + +GetUpdatedAtOk returns a tuple with the UpdatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpdatedAt + +`func (o *CAARecord) SetUpdatedAt(v time.Time)` + +SetUpdatedAt sets UpdatedAt field to given value. + +### HasUpdatedAt + +`func (o *CAARecord) HasUpdatedAt() bool` + +HasUpdatedAt returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/CAARecordValue.md b/docs/CAARecordValue.md new file mode 100644 index 0000000..08cf7fd --- /dev/null +++ b/docs/CAARecordValue.md @@ -0,0 +1,72 @@ +# CAARecordValue + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | **string** | Should be a valid domain | +**Tag** | **string** | | + +## Methods + +### NewCAARecordValue + +`func NewCAARecordValue(value string, tag string, ) *CAARecordValue` + +NewCAARecordValue instantiates a new CAARecordValue object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCAARecordValueWithDefaults + +`func NewCAARecordValueWithDefaults() *CAARecordValue` + +NewCAARecordValueWithDefaults instantiates a new CAARecordValue object +This 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 *CAARecordValue) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *CAARecordValue) 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 *CAARecordValue) SetValue(v string)` + +SetValue sets Value field to given value. + + +### GetTag + +`func (o *CAARecordValue) GetTag() string` + +GetTag returns the Tag field if non-nil, zero value otherwise. + +### GetTagOk + +`func (o *CAARecordValue) GetTagOk() (*string, bool)` + +GetTagOk returns a tuple with the Tag field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTag + +`func (o *CAARecordValue) SetTag(v string)` + +SetTag sets Tag field to given value. + + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/CDNAppsApi.md b/docs/CDNAppsApi.md new file mode 100644 index 0000000..f85b30b --- /dev/null +++ b/docs/CDNAppsApi.md @@ -0,0 +1,718 @@ +# \CDNAppsApi + +All URIs are relative to *https://napi.arvancloud.ir/cdn/4.0* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**AppsCategoryIndex**](CDNAppsApi.md#AppsCategoryIndex) | **Get** /apps/category | Get the list of application categories +[**AppsCategoryShow**](CDNAppsApi.md#AppsCategoryShow) | **Get** /apps/category/{application-category} | Get an existing application category +[**AppsIndex**](CDNAppsApi.md#AppsIndex) | **Get** /apps | Get list of all available cdn-apps +[**AppsLike**](CDNAppsApi.md#AppsLike) | **Post** /apps/{id} | Expressing like and dislike about a single cdn-app +[**AppsShow**](CDNAppsApi.md#AppsShow) | **Get** /apps/{id} | Get a single cdn-app +[**DomainsAppsDestroy**](CDNAppsApi.md#DomainsAppsDestroy) | **Delete** /domains/{domain}/apps/{id} | Uninstall the application from domain +[**DomainsAppsIndex**](CDNAppsApi.md#DomainsAppsIndex) | **Get** /domains/{domain}/apps | Get list of all applications installed on a domain +[**DomainsAppsInstalled**](CDNAppsApi.md#DomainsAppsInstalled) | **Get** /domains/{domain}/apps/{id} | Check the application is installed on the domain +[**DomainsAppsStore**](CDNAppsApi.md#DomainsAppsStore) | **Post** /domains/{domain}/apps/{id} | Install the application on the domain +[**DomainsAppsTriggerWebhook**](CDNAppsApi.md#DomainsAppsTriggerWebhook) | **Post** /domains/{domain}/apps/{id}/actions/trigger_webhook | trigger webhook event + + + +## AppsCategoryIndex + +> AppsCategoryIndex200Response AppsCategoryIndex(ctx).Categories(categories).Execute() + +Get the list of application categories + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + categories := []string{"Inner_example"} // []string | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.CDNAppsApi.AppsCategoryIndex(context.Background()).Categories(categories).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `CDNAppsApi.AppsCategoryIndex``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AppsCategoryIndex`: AppsCategoryIndex200Response + fmt.Fprintf(os.Stdout, "Response from `CDNAppsApi.AppsCategoryIndex`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiAppsCategoryIndexRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **categories** | **[]string** | | + +### Return type + +[**AppsCategoryIndex200Response**](AppsCategoryIndex200Response.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## AppsCategoryShow + +> AppsCategoryShow200Response AppsCategoryShow(ctx, applicationCategory).Execute() + +Get an existing application category + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + applicationCategory := "applicationCategory_example" // string | The id of the category + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.CDNAppsApi.AppsCategoryShow(context.Background(), applicationCategory).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `CDNAppsApi.AppsCategoryShow``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AppsCategoryShow`: AppsCategoryShow200Response + fmt.Fprintf(os.Stdout, "Response from `CDNAppsApi.AppsCategoryShow`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**applicationCategory** | **string** | The id of the category | + +### Other Parameters + +Other parameters are passed through a pointer to a apiAppsCategoryShowRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**AppsCategoryShow200Response**](AppsCategoryShow200Response.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## AppsIndex + +> AppsIndex200Response AppsIndex(ctx).CategoryId(categoryId).Search(search).PerPage(perPage).Page(page).SortBy(sortBy).Direction(direction).Execute() + +Get list of all available cdn-apps + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + categoryId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Filter apps by category (optional) + search := "search_example" // string | Search term (optional) + perPage := int32(56) // int32 | Set how many items returned per page (optional) + page := int32(56) // int32 | Set the desired page number (optional) (default to 1) + sortBy := "sortBy_example" // string | (optional) + direction := "direction_example" // string | Set the direction of sorting (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.CDNAppsApi.AppsIndex(context.Background()).CategoryId(categoryId).Search(search).PerPage(perPage).Page(page).SortBy(sortBy).Direction(direction).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `CDNAppsApi.AppsIndex``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AppsIndex`: AppsIndex200Response + fmt.Fprintf(os.Stdout, "Response from `CDNAppsApi.AppsIndex`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiAppsIndexRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **categoryId** | **string** | Filter apps by category | + **search** | **string** | Search term | + **perPage** | **int32** | Set how many items returned per page | + **page** | **int32** | Set the desired page number | [default to 1] + **sortBy** | **string** | | + **direction** | **string** | Set the direction of sorting | + +### Return type + +[**AppsIndex200Response**](AppsIndex200Response.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## AppsLike + +> CdnAppLikeStatsData AppsLike(ctx, id).CdnAppLike(cdnAppLike).Execute() + +Expressing like and dislike about a single cdn-app + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | + cdnAppLike := *openapiclient.NewCdnAppLike() // CdnAppLike | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.CDNAppsApi.AppsLike(context.Background(), id).CdnAppLike(cdnAppLike).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `CDNAppsApi.AppsLike``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AppsLike`: CdnAppLikeStatsData + fmt.Fprintf(os.Stdout, "Response from `CDNAppsApi.AppsLike`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiAppsLikeRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **cdnAppLike** | [**CdnAppLike**](CdnAppLike.md) | | + +### Return type + +[**CdnAppLikeStatsData**](CdnAppLikeStatsData.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## AppsShow + +> CdnAppData AppsShow(ctx, id).Execute() + +Get a single cdn-app + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.CDNAppsApi.AppsShow(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `CDNAppsApi.AppsShow``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AppsShow`: CdnAppData + fmt.Fprintf(os.Stdout, "Response from `CDNAppsApi.AppsShow`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiAppsShowRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**CdnAppData**](CdnAppData.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## DomainsAppsDestroy + +> MessageResponse DomainsAppsDestroy(ctx, domain, id).Execute() + +Uninstall the application from domain + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.CDNAppsApi.DomainsAppsDestroy(context.Background(), domain, id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `CDNAppsApi.DomainsAppsDestroy``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DomainsAppsDestroy`: MessageResponse + fmt.Fprintf(os.Stdout, "Response from `CDNAppsApi.DomainsAppsDestroy`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | +**id** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDomainsAppsDestroyRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + +[**MessageResponse**](MessageResponse.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## DomainsAppsIndex + +> AppsIndex200Response DomainsAppsIndex(ctx, domain).Execute() + +Get list of all applications installed on a domain + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.CDNAppsApi.DomainsAppsIndex(context.Background(), domain).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `CDNAppsApi.DomainsAppsIndex``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DomainsAppsIndex`: AppsIndex200Response + fmt.Fprintf(os.Stdout, "Response from `CDNAppsApi.DomainsAppsIndex`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDomainsAppsIndexRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**AppsIndex200Response**](AppsIndex200Response.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## DomainsAppsInstalled + +> CdnAppInstall DomainsAppsInstalled(ctx, domain, id).Execute() + +Check the application is installed on the domain + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.CDNAppsApi.DomainsAppsInstalled(context.Background(), domain, id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `CDNAppsApi.DomainsAppsInstalled``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DomainsAppsInstalled`: CdnAppInstall + fmt.Fprintf(os.Stdout, "Response from `CDNAppsApi.DomainsAppsInstalled`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | +**id** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDomainsAppsInstalledRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + +[**CdnAppInstall**](CdnAppInstall.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## DomainsAppsStore + +> DomainsAppsStore200Response DomainsAppsStore(ctx, domain, id).Body(body).Execute() + +Install the application on the domain + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | + body := map[string]interface{}{ ... } // map[string]interface{} | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.CDNAppsApi.DomainsAppsStore(context.Background(), domain, id).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `CDNAppsApi.DomainsAppsStore``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DomainsAppsStore`: DomainsAppsStore200Response + fmt.Fprintf(os.Stdout, "Response from `CDNAppsApi.DomainsAppsStore`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | +**id** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDomainsAppsStoreRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **body** | **map[string]interface{}** | | + +### Return type + +[**DomainsAppsStore200Response**](DomainsAppsStore200Response.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## DomainsAppsTriggerWebhook + +> MessageResponse DomainsAppsTriggerWebhook(ctx, domain, id).CdnAppTriggerWebhook(cdnAppTriggerWebhook).Execute() + +trigger webhook event + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | + cdnAppTriggerWebhook := *openapiclient.NewCdnAppTriggerWebhook("Event_example", map[string]interface{}(123)) // CdnAppTriggerWebhook | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.CDNAppsApi.DomainsAppsTriggerWebhook(context.Background(), domain, id).CdnAppTriggerWebhook(cdnAppTriggerWebhook).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `CDNAppsApi.DomainsAppsTriggerWebhook``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DomainsAppsTriggerWebhook`: MessageResponse + fmt.Fprintf(os.Stdout, "Response from `CDNAppsApi.DomainsAppsTriggerWebhook`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | +**id** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDomainsAppsTriggerWebhookRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **cdnAppTriggerWebhook** | [**CdnAppTriggerWebhook**](CdnAppTriggerWebhook.md) | | + +### Return type + +[**MessageResponse**](MessageResponse.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + diff --git a/docs/CNAMERecord.md b/docs/CNAMERecord.md new file mode 100644 index 0000000..69e98ba --- /dev/null +++ b/docs/CNAMERecord.md @@ -0,0 +1,342 @@ +# CNAMERecord + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | Pointer to [**CNAMERecordValue**](CNAMERecordValue.md) | | [optional] +**Type** | Pointer to **string** | | [optional] [default to "cname"] +**Id** | Pointer to **string** | | [optional] [readonly] +**Name** | Pointer to **string** | | [optional] +**Ttl** | Pointer to **int32** | | [optional] +**Cloud** | Pointer to **bool** | | [optional] [default to false] +**UpstreamHttps** | Pointer to **string** | | [optional] +**IpFilterMode** | Pointer to [**DnsRecordIpFilterMode**](DnsRecordIpFilterMode.md) | | [optional] +**IsProtected** | Pointer to **bool** | Protected records cannot be modified or deleted by user. | [optional] [readonly] [default to false] +**Usage** | Pointer to **[]string** | | [optional] [readonly] [default to []] +**CreatedAt** | Pointer to **time.Time** | | [optional] [readonly] +**UpdatedAt** | Pointer to **time.Time** | | [optional] [readonly] + +## Methods + +### NewCNAMERecord + +`func NewCNAMERecord() *CNAMERecord` + +NewCNAMERecord instantiates a new CNAMERecord object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCNAMERecordWithDefaults + +`func NewCNAMERecordWithDefaults() *CNAMERecord` + +NewCNAMERecordWithDefaults instantiates a new CNAMERecord object +This 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 *CNAMERecord) GetValue() CNAMERecordValue` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *CNAMERecord) GetValueOk() (*CNAMERecordValue, 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 *CNAMERecord) SetValue(v CNAMERecordValue)` + +SetValue sets Value field to given value. + +### HasValue + +`func (o *CNAMERecord) HasValue() bool` + +HasValue returns a boolean if a field has been set. + +### GetType + +`func (o *CNAMERecord) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *CNAMERecord) 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 *CNAMERecord) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *CNAMERecord) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetId + +`func (o *CNAMERecord) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *CNAMERecord) 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 *CNAMERecord) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *CNAMERecord) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetName + +`func (o *CNAMERecord) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *CNAMERecord) 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 *CNAMERecord) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *CNAMERecord) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetTtl + +`func (o *CNAMERecord) GetTtl() int32` + +GetTtl returns the Ttl field if non-nil, zero value otherwise. + +### GetTtlOk + +`func (o *CNAMERecord) GetTtlOk() (*int32, bool)` + +GetTtlOk returns a tuple with the Ttl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTtl + +`func (o *CNAMERecord) SetTtl(v int32)` + +SetTtl sets Ttl field to given value. + +### HasTtl + +`func (o *CNAMERecord) HasTtl() bool` + +HasTtl returns a boolean if a field has been set. + +### GetCloud + +`func (o *CNAMERecord) GetCloud() bool` + +GetCloud returns the Cloud field if non-nil, zero value otherwise. + +### GetCloudOk + +`func (o *CNAMERecord) GetCloudOk() (*bool, bool)` + +GetCloudOk returns a tuple with the Cloud field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCloud + +`func (o *CNAMERecord) SetCloud(v bool)` + +SetCloud sets Cloud field to given value. + +### HasCloud + +`func (o *CNAMERecord) HasCloud() bool` + +HasCloud returns a boolean if a field has been set. + +### GetUpstreamHttps + +`func (o *CNAMERecord) GetUpstreamHttps() string` + +GetUpstreamHttps returns the UpstreamHttps field if non-nil, zero value otherwise. + +### GetUpstreamHttpsOk + +`func (o *CNAMERecord) GetUpstreamHttpsOk() (*string, bool)` + +GetUpstreamHttpsOk returns a tuple with the UpstreamHttps field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpstreamHttps + +`func (o *CNAMERecord) SetUpstreamHttps(v string)` + +SetUpstreamHttps sets UpstreamHttps field to given value. + +### HasUpstreamHttps + +`func (o *CNAMERecord) HasUpstreamHttps() bool` + +HasUpstreamHttps returns a boolean if a field has been set. + +### GetIpFilterMode + +`func (o *CNAMERecord) GetIpFilterMode() DnsRecordIpFilterMode` + +GetIpFilterMode returns the IpFilterMode field if non-nil, zero value otherwise. + +### GetIpFilterModeOk + +`func (o *CNAMERecord) GetIpFilterModeOk() (*DnsRecordIpFilterMode, bool)` + +GetIpFilterModeOk returns a tuple with the IpFilterMode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIpFilterMode + +`func (o *CNAMERecord) SetIpFilterMode(v DnsRecordIpFilterMode)` + +SetIpFilterMode sets IpFilterMode field to given value. + +### HasIpFilterMode + +`func (o *CNAMERecord) HasIpFilterMode() bool` + +HasIpFilterMode returns a boolean if a field has been set. + +### GetIsProtected + +`func (o *CNAMERecord) GetIsProtected() bool` + +GetIsProtected returns the IsProtected field if non-nil, zero value otherwise. + +### GetIsProtectedOk + +`func (o *CNAMERecord) GetIsProtectedOk() (*bool, bool)` + +GetIsProtectedOk returns a tuple with the IsProtected field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsProtected + +`func (o *CNAMERecord) SetIsProtected(v bool)` + +SetIsProtected sets IsProtected field to given value. + +### HasIsProtected + +`func (o *CNAMERecord) HasIsProtected() bool` + +HasIsProtected returns a boolean if a field has been set. + +### GetUsage + +`func (o *CNAMERecord) GetUsage() []string` + +GetUsage returns the Usage field if non-nil, zero value otherwise. + +### GetUsageOk + +`func (o *CNAMERecord) GetUsageOk() (*[]string, bool)` + +GetUsageOk returns a tuple with the Usage field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUsage + +`func (o *CNAMERecord) SetUsage(v []string)` + +SetUsage sets Usage field to given value. + +### HasUsage + +`func (o *CNAMERecord) HasUsage() bool` + +HasUsage returns a boolean if a field has been set. + +### GetCreatedAt + +`func (o *CNAMERecord) GetCreatedAt() time.Time` + +GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. + +### GetCreatedAtOk + +`func (o *CNAMERecord) GetCreatedAtOk() (*time.Time, bool)` + +GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedAt + +`func (o *CNAMERecord) SetCreatedAt(v time.Time)` + +SetCreatedAt sets CreatedAt field to given value. + +### HasCreatedAt + +`func (o *CNAMERecord) HasCreatedAt() bool` + +HasCreatedAt returns a boolean if a field has been set. + +### GetUpdatedAt + +`func (o *CNAMERecord) GetUpdatedAt() time.Time` + +GetUpdatedAt returns the UpdatedAt field if non-nil, zero value otherwise. + +### GetUpdatedAtOk + +`func (o *CNAMERecord) GetUpdatedAtOk() (*time.Time, bool)` + +GetUpdatedAtOk returns a tuple with the UpdatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpdatedAt + +`func (o *CNAMERecord) SetUpdatedAt(v time.Time)` + +SetUpdatedAt sets UpdatedAt field to given value. + +### HasUpdatedAt + +`func (o *CNAMERecord) HasUpdatedAt() bool` + +HasUpdatedAt returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/CNAMERecordValue.md b/docs/CNAMERecordValue.md new file mode 100644 index 0000000..31cbd31 --- /dev/null +++ b/docs/CNAMERecordValue.md @@ -0,0 +1,118 @@ +# CNAMERecordValue + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Host** | **string** | A fully-qualified domain name (FQDN) | +**HostHeader** | **NullableString** | | +**Port** | Pointer to **NullableInt32** | | [optional] + +## Methods + +### NewCNAMERecordValue + +`func NewCNAMERecordValue(host string, hostHeader NullableString, ) *CNAMERecordValue` + +NewCNAMERecordValue instantiates a new CNAMERecordValue object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCNAMERecordValueWithDefaults + +`func NewCNAMERecordValueWithDefaults() *CNAMERecordValue` + +NewCNAMERecordValueWithDefaults instantiates a new CNAMERecordValue object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetHost + +`func (o *CNAMERecordValue) GetHost() string` + +GetHost returns the Host field if non-nil, zero value otherwise. + +### GetHostOk + +`func (o *CNAMERecordValue) GetHostOk() (*string, bool)` + +GetHostOk returns a tuple with the Host field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHost + +`func (o *CNAMERecordValue) SetHost(v string)` + +SetHost sets Host field to given value. + + +### GetHostHeader + +`func (o *CNAMERecordValue) GetHostHeader() string` + +GetHostHeader returns the HostHeader field if non-nil, zero value otherwise. + +### GetHostHeaderOk + +`func (o *CNAMERecordValue) GetHostHeaderOk() (*string, bool)` + +GetHostHeaderOk returns a tuple with the HostHeader field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHostHeader + +`func (o *CNAMERecordValue) SetHostHeader(v string)` + +SetHostHeader sets HostHeader field to given value. + + +### SetHostHeaderNil + +`func (o *CNAMERecordValue) SetHostHeaderNil(b bool)` + + SetHostHeaderNil sets the value for HostHeader to be an explicit nil + +### UnsetHostHeader +`func (o *CNAMERecordValue) UnsetHostHeader()` + +UnsetHostHeader ensures that no value is present for HostHeader, not even an explicit nil +### GetPort + +`func (o *CNAMERecordValue) GetPort() int32` + +GetPort returns the Port field if non-nil, zero value otherwise. + +### GetPortOk + +`func (o *CNAMERecordValue) GetPortOk() (*int32, bool)` + +GetPortOk returns a tuple with the Port field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPort + +`func (o *CNAMERecordValue) SetPort(v int32)` + +SetPort sets Port field to given value. + +### HasPort + +`func (o *CNAMERecordValue) HasPort() bool` + +HasPort returns a boolean if a field has been set. + +### SetPortNil + +`func (o *CNAMERecordValue) SetPortNil(b bool)` + + SetPortNil sets the value for Port to be an explicit nil + +### UnsetPort +`func (o *CNAMERecordValue) UnsetPort()` + +UnsetPort ensures that no value is present for Port, not even an explicit nil + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/CacheSettings.md b/docs/CacheSettings.md new file mode 100644 index 0000000..304cf06 --- /dev/null +++ b/docs/CacheSettings.md @@ -0,0 +1,316 @@ +# CacheSettings + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CacheDeveloperMode** | Pointer to **bool** | | [optional] +**CacheConsistentUptime** | Pointer to **bool** | | [optional] +**CacheStatus** | Pointer to **string** | | [optional] +**CachePage200** | Pointer to **string** | | [optional] +**CachePageAny** | Pointer to **string** | | [optional] +**CacheBrowser** | Pointer to **string** | | [optional] +**CacheScheme** | Pointer to **bool** | To consider scheme (HTTP/HTTPs) in cache | [optional] +**CacheIgnoreSc** | Pointer to **bool** | Ignore default behavior in caching set-cookie header | [optional] +**CacheCookie** | Pointer to **string** | Cookie variables to consider in cache (comma separaterd values) | [optional] +**CacheArgs** | Pointer to **bool** | To consider query args or not | [optional] +**CacheArg** | Pointer to **string** | Query string arguments to consider in cache (& seperated values) | [optional] [default to ""] + +## Methods + +### NewCacheSettings + +`func NewCacheSettings() *CacheSettings` + +NewCacheSettings instantiates a new CacheSettings object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCacheSettingsWithDefaults + +`func NewCacheSettingsWithDefaults() *CacheSettings` + +NewCacheSettingsWithDefaults instantiates a new CacheSettings object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCacheDeveloperMode + +`func (o *CacheSettings) GetCacheDeveloperMode() bool` + +GetCacheDeveloperMode returns the CacheDeveloperMode field if non-nil, zero value otherwise. + +### GetCacheDeveloperModeOk + +`func (o *CacheSettings) GetCacheDeveloperModeOk() (*bool, bool)` + +GetCacheDeveloperModeOk returns a tuple with the CacheDeveloperMode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCacheDeveloperMode + +`func (o *CacheSettings) SetCacheDeveloperMode(v bool)` + +SetCacheDeveloperMode sets CacheDeveloperMode field to given value. + +### HasCacheDeveloperMode + +`func (o *CacheSettings) HasCacheDeveloperMode() bool` + +HasCacheDeveloperMode returns a boolean if a field has been set. + +### GetCacheConsistentUptime + +`func (o *CacheSettings) GetCacheConsistentUptime() bool` + +GetCacheConsistentUptime returns the CacheConsistentUptime field if non-nil, zero value otherwise. + +### GetCacheConsistentUptimeOk + +`func (o *CacheSettings) GetCacheConsistentUptimeOk() (*bool, bool)` + +GetCacheConsistentUptimeOk returns a tuple with the CacheConsistentUptime field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCacheConsistentUptime + +`func (o *CacheSettings) SetCacheConsistentUptime(v bool)` + +SetCacheConsistentUptime sets CacheConsistentUptime field to given value. + +### HasCacheConsistentUptime + +`func (o *CacheSettings) HasCacheConsistentUptime() bool` + +HasCacheConsistentUptime returns a boolean if a field has been set. + +### GetCacheStatus + +`func (o *CacheSettings) GetCacheStatus() string` + +GetCacheStatus returns the CacheStatus field if non-nil, zero value otherwise. + +### GetCacheStatusOk + +`func (o *CacheSettings) GetCacheStatusOk() (*string, bool)` + +GetCacheStatusOk returns a tuple with the CacheStatus field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCacheStatus + +`func (o *CacheSettings) SetCacheStatus(v string)` + +SetCacheStatus sets CacheStatus field to given value. + +### HasCacheStatus + +`func (o *CacheSettings) HasCacheStatus() bool` + +HasCacheStatus returns a boolean if a field has been set. + +### GetCachePage200 + +`func (o *CacheSettings) GetCachePage200() string` + +GetCachePage200 returns the CachePage200 field if non-nil, zero value otherwise. + +### GetCachePage200Ok + +`func (o *CacheSettings) GetCachePage200Ok() (*string, bool)` + +GetCachePage200Ok returns a tuple with the CachePage200 field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCachePage200 + +`func (o *CacheSettings) SetCachePage200(v string)` + +SetCachePage200 sets CachePage200 field to given value. + +### HasCachePage200 + +`func (o *CacheSettings) HasCachePage200() bool` + +HasCachePage200 returns a boolean if a field has been set. + +### GetCachePageAny + +`func (o *CacheSettings) GetCachePageAny() string` + +GetCachePageAny returns the CachePageAny field if non-nil, zero value otherwise. + +### GetCachePageAnyOk + +`func (o *CacheSettings) GetCachePageAnyOk() (*string, bool)` + +GetCachePageAnyOk returns a tuple with the CachePageAny field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCachePageAny + +`func (o *CacheSettings) SetCachePageAny(v string)` + +SetCachePageAny sets CachePageAny field to given value. + +### HasCachePageAny + +`func (o *CacheSettings) HasCachePageAny() bool` + +HasCachePageAny returns a boolean if a field has been set. + +### GetCacheBrowser + +`func (o *CacheSettings) GetCacheBrowser() string` + +GetCacheBrowser returns the CacheBrowser field if non-nil, zero value otherwise. + +### GetCacheBrowserOk + +`func (o *CacheSettings) GetCacheBrowserOk() (*string, bool)` + +GetCacheBrowserOk returns a tuple with the CacheBrowser field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCacheBrowser + +`func (o *CacheSettings) SetCacheBrowser(v string)` + +SetCacheBrowser sets CacheBrowser field to given value. + +### HasCacheBrowser + +`func (o *CacheSettings) HasCacheBrowser() bool` + +HasCacheBrowser returns a boolean if a field has been set. + +### GetCacheScheme + +`func (o *CacheSettings) GetCacheScheme() bool` + +GetCacheScheme returns the CacheScheme field if non-nil, zero value otherwise. + +### GetCacheSchemeOk + +`func (o *CacheSettings) GetCacheSchemeOk() (*bool, bool)` + +GetCacheSchemeOk returns a tuple with the CacheScheme field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCacheScheme + +`func (o *CacheSettings) SetCacheScheme(v bool)` + +SetCacheScheme sets CacheScheme field to given value. + +### HasCacheScheme + +`func (o *CacheSettings) HasCacheScheme() bool` + +HasCacheScheme returns a boolean if a field has been set. + +### GetCacheIgnoreSc + +`func (o *CacheSettings) GetCacheIgnoreSc() bool` + +GetCacheIgnoreSc returns the CacheIgnoreSc field if non-nil, zero value otherwise. + +### GetCacheIgnoreScOk + +`func (o *CacheSettings) GetCacheIgnoreScOk() (*bool, bool)` + +GetCacheIgnoreScOk returns a tuple with the CacheIgnoreSc field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCacheIgnoreSc + +`func (o *CacheSettings) SetCacheIgnoreSc(v bool)` + +SetCacheIgnoreSc sets CacheIgnoreSc field to given value. + +### HasCacheIgnoreSc + +`func (o *CacheSettings) HasCacheIgnoreSc() bool` + +HasCacheIgnoreSc returns a boolean if a field has been set. + +### GetCacheCookie + +`func (o *CacheSettings) GetCacheCookie() string` + +GetCacheCookie returns the CacheCookie field if non-nil, zero value otherwise. + +### GetCacheCookieOk + +`func (o *CacheSettings) GetCacheCookieOk() (*string, bool)` + +GetCacheCookieOk returns a tuple with the CacheCookie field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCacheCookie + +`func (o *CacheSettings) SetCacheCookie(v string)` + +SetCacheCookie sets CacheCookie field to given value. + +### HasCacheCookie + +`func (o *CacheSettings) HasCacheCookie() bool` + +HasCacheCookie returns a boolean if a field has been set. + +### GetCacheArgs + +`func (o *CacheSettings) GetCacheArgs() bool` + +GetCacheArgs returns the CacheArgs field if non-nil, zero value otherwise. + +### GetCacheArgsOk + +`func (o *CacheSettings) GetCacheArgsOk() (*bool, bool)` + +GetCacheArgsOk returns a tuple with the CacheArgs field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCacheArgs + +`func (o *CacheSettings) SetCacheArgs(v bool)` + +SetCacheArgs sets CacheArgs field to given value. + +### HasCacheArgs + +`func (o *CacheSettings) HasCacheArgs() bool` + +HasCacheArgs returns a boolean if a field has been set. + +### GetCacheArg + +`func (o *CacheSettings) GetCacheArg() string` + +GetCacheArg returns the CacheArg field if non-nil, zero value otherwise. + +### GetCacheArgOk + +`func (o *CacheSettings) GetCacheArgOk() (*string, bool)` + +GetCacheArgOk returns a tuple with the CacheArg field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCacheArg + +`func (o *CacheSettings) SetCacheArg(v string)` + +SetCacheArg sets CacheArg field to given value. + +### HasCacheArg + +`func (o *CacheSettings) HasCacheArg() bool` + +HasCacheArg returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/CacheSettingsData.md b/docs/CacheSettingsData.md new file mode 100644 index 0000000..2b6765f --- /dev/null +++ b/docs/CacheSettingsData.md @@ -0,0 +1,56 @@ +# CacheSettingsData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**CacheSettings**](CacheSettings.md) | | [optional] + +## Methods + +### NewCacheSettingsData + +`func NewCacheSettingsData() *CacheSettingsData` + +NewCacheSettingsData instantiates a new CacheSettingsData object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCacheSettingsDataWithDefaults + +`func NewCacheSettingsDataWithDefaults() *CacheSettingsData` + +NewCacheSettingsDataWithDefaults instantiates a new CacheSettingsData object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *CacheSettingsData) GetData() CacheSettings` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *CacheSettingsData) GetDataOk() (*CacheSettings, 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 *CacheSettingsData) SetData(v CacheSettings)` + +SetData sets Data field to given value. + +### HasData + +`func (o *CacheSettingsData) HasData() bool` + +HasData returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/CachingApi.md b/docs/CachingApi.md new file mode 100644 index 0000000..418c176 --- /dev/null +++ b/docs/CachingApi.md @@ -0,0 +1,440 @@ +# \CachingApi + +All URIs are relative to *https://napi.arvancloud.ir/cdn/4.0* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CachingDeprecatedPurge**](CachingApi.md#CachingDeprecatedPurge) | **Delete** /domains/{domain}/caching | Purge CDN Cache +[**CachingIndex**](CachingApi.md#CachingIndex) | **Get** /domains/{domain}/caching | Get caching settings +[**CachingPurge**](CachingApi.md#CachingPurge) | **Post** /domains/{domain}/caching/purge | Purge CDN Cache +[**CachingUpdate**](CachingApi.md#CachingUpdate) | **Patch** /domains/{domain}/caching | Update caching settings +[**PurgeTagsDestroy**](CachingApi.md#PurgeTagsDestroy) | **Delete** /domains/{domain}/purge-tags | Delete a Domain's Purge tag +[**PurgeTagsIndex**](CachingApi.md#PurgeTagsIndex) | **Get** /domains/{domain}/purge-tags | Get domain's Purge tags + + + +## CachingDeprecatedPurge + +> MessageResponse CachingDeprecatedPurge(ctx, domain).Purge(purge).PurgeUrls(purgeUrls).PurgeTags(purgeTags).Execute() + +Purge CDN Cache + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + purge := "purge_example" // string | + purgeUrls := []string{"Inner_example"} // []string | URLs to be purged from cache. Required if purge value is set to individual. (optional) + purgeTags := []string{"Inner_example"} // []string | Tags to be purged from cache. Required if purge value is set to tags. Each tag must be 32 characters or less. Only ASCII characters are acceptable. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.CachingApi.CachingDeprecatedPurge(context.Background(), domain).Purge(purge).PurgeUrls(purgeUrls).PurgeTags(purgeTags).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `CachingApi.CachingDeprecatedPurge``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CachingDeprecatedPurge`: MessageResponse + fmt.Fprintf(os.Stdout, "Response from `CachingApi.CachingDeprecatedPurge`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiCachingDeprecatedPurgeRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **purge** | **string** | | + **purgeUrls** | **[]string** | URLs to be purged from cache. Required if purge value is set to individual. | + **purgeTags** | **[]string** | Tags to be purged from cache. Required if purge value is set to tags. Each tag must be 32 characters or less. Only ASCII characters are acceptable. | + +### Return type + +[**MessageResponse**](MessageResponse.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## CachingIndex + +> CacheSettingsData CachingIndex(ctx, domain).Execute() + +Get caching settings + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.CachingApi.CachingIndex(context.Background(), domain).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `CachingApi.CachingIndex``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CachingIndex`: CacheSettingsData + fmt.Fprintf(os.Stdout, "Response from `CachingApi.CachingIndex`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiCachingIndexRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**CacheSettingsData**](CacheSettingsData.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## CachingPurge + +> MessageResponse CachingPurge(ctx, domain).CachingPurge(cachingPurge).Execute() + +Purge CDN Cache + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + cachingPurge := *openapiclient.NewCachingPurge("Purge_example") // CachingPurge | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.CachingApi.CachingPurge(context.Background(), domain).CachingPurge(cachingPurge).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `CachingApi.CachingPurge``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CachingPurge`: MessageResponse + fmt.Fprintf(os.Stdout, "Response from `CachingApi.CachingPurge`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiCachingPurgeRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **cachingPurge** | [**CachingPurge**](CachingPurge.md) | | + +### Return type + +[**MessageResponse**](MessageResponse.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## CachingUpdate + +> MessageResponse CachingUpdate(ctx, domain).CacheSettings(cacheSettings).Execute() + +Update caching settings + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + cacheSettings := *openapiclient.NewCacheSettings() // CacheSettings | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.CachingApi.CachingUpdate(context.Background(), domain).CacheSettings(cacheSettings).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `CachingApi.CachingUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CachingUpdate`: MessageResponse + fmt.Fprintf(os.Stdout, "Response from `CachingApi.CachingUpdate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiCachingUpdateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **cacheSettings** | [**CacheSettings**](CacheSettings.md) | | + +### Return type + +[**MessageResponse**](MessageResponse.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## PurgeTagsDestroy + +> MessageResponse PurgeTagsDestroy(ctx, domain).Tag(tag).Execute() + +Delete a Domain's Purge tag + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + tag := "tag_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.CachingApi.PurgeTagsDestroy(context.Background(), domain).Tag(tag).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `CachingApi.PurgeTagsDestroy``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `PurgeTagsDestroy`: MessageResponse + fmt.Fprintf(os.Stdout, "Response from `CachingApi.PurgeTagsDestroy`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiPurgeTagsDestroyRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **tag** | **string** | | + +### Return type + +[**MessageResponse**](MessageResponse.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## PurgeTagsIndex + +> PurgeTagsIndex200Response PurgeTagsIndex(ctx, domain).Execute() + +Get domain's Purge tags + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.CachingApi.PurgeTagsIndex(context.Background(), domain).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `CachingApi.PurgeTagsIndex``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `PurgeTagsIndex`: PurgeTagsIndex200Response + fmt.Fprintf(os.Stdout, "Response from `CachingApi.PurgeTagsIndex`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiPurgeTagsIndexRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**PurgeTagsIndex200Response**](PurgeTagsIndex200Response.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + diff --git a/docs/CachingPurge.md b/docs/CachingPurge.md new file mode 100644 index 0000000..85217e8 --- /dev/null +++ b/docs/CachingPurge.md @@ -0,0 +1,103 @@ +# CachingPurge + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Purge** | **string** | tags is deprecated | +**PurgeUrls** | Pointer to **[]string** | URLs to be purged from cache. Required if purge value is set to individual. | [optional] +**PurgeTags** | Pointer to **[]string** | Tags to be purged from cache. Required if purge value is set to tags. Each tag must be 32 characters or less. Only ASCII characters are acceptable. | [optional] + +## Methods + +### NewCachingPurge + +`func NewCachingPurge(purge string, ) *CachingPurge` + +NewCachingPurge instantiates a new CachingPurge object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCachingPurgeWithDefaults + +`func NewCachingPurgeWithDefaults() *CachingPurge` + +NewCachingPurgeWithDefaults instantiates a new CachingPurge object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetPurge + +`func (o *CachingPurge) GetPurge() string` + +GetPurge returns the Purge field if non-nil, zero value otherwise. + +### GetPurgeOk + +`func (o *CachingPurge) GetPurgeOk() (*string, bool)` + +GetPurgeOk returns a tuple with the Purge field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPurge + +`func (o *CachingPurge) SetPurge(v string)` + +SetPurge sets Purge field to given value. + + +### GetPurgeUrls + +`func (o *CachingPurge) GetPurgeUrls() []string` + +GetPurgeUrls returns the PurgeUrls field if non-nil, zero value otherwise. + +### GetPurgeUrlsOk + +`func (o *CachingPurge) GetPurgeUrlsOk() (*[]string, bool)` + +GetPurgeUrlsOk returns a tuple with the PurgeUrls field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPurgeUrls + +`func (o *CachingPurge) SetPurgeUrls(v []string)` + +SetPurgeUrls sets PurgeUrls field to given value. + +### HasPurgeUrls + +`func (o *CachingPurge) HasPurgeUrls() bool` + +HasPurgeUrls returns a boolean if a field has been set. + +### GetPurgeTags + +`func (o *CachingPurge) GetPurgeTags() []string` + +GetPurgeTags returns the PurgeTags field if non-nil, zero value otherwise. + +### GetPurgeTagsOk + +`func (o *CachingPurge) GetPurgeTagsOk() (*[]string, bool)` + +GetPurgeTagsOk returns a tuple with the PurgeTags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPurgeTags + +`func (o *CachingPurge) SetPurgeTags(v []string)` + +SetPurgeTags sets PurgeTags field to given value. + +### HasPurgeTags + +`func (o *CachingPurge) HasPurgeTags() bool` + +HasPurgeTags returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/CdnApp.md b/docs/CdnApp.md new file mode 100644 index 0000000..89287cd --- /dev/null +++ b/docs/CdnApp.md @@ -0,0 +1,472 @@ +# CdnApp + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **string** | | [optional] [readonly] +**Categories** | Pointer to [**[]ApplicationCategory**](ApplicationCategory.md) | | [optional] +**Rank** | Pointer to **float32** | | [optional] +**Name** | Pointer to **string** | | [optional] +**Slug** | Pointer to **string** | | [optional] +**ShortDescription** | Pointer to **string** | | [optional] +**Description** | Pointer to **string** | | [optional] +**Logo** | Pointer to **string** | absolute link to logo image | [optional] +**Pictures** | Pointer to **[]string** | | [optional] +**Vendor** | Pointer to **string** | | [optional] +**SupportEmail** | Pointer to **string** | | [optional] +**InstallJson** | Pointer to **map[string]interface{}** | | [optional] +**Status** | Pointer to **string** | | [optional] +**LikeStats** | Pointer to [**CdnAppLikeStats**](CdnAppLikeStats.md) | | [optional] +**LikeByUser** | Pointer to **bool** | True means she likes, False means she dislikes. null means she did not vote. | [optional] +**CreatedAt** | Pointer to **time.Time** | | [optional] [readonly] +**UpdatedAt** | Pointer to **time.Time** | | [optional] [readonly] + +## Methods + +### NewCdnApp + +`func NewCdnApp() *CdnApp` + +NewCdnApp instantiates a new CdnApp object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCdnAppWithDefaults + +`func NewCdnAppWithDefaults() *CdnApp` + +NewCdnAppWithDefaults instantiates a new CdnApp object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *CdnApp) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *CdnApp) 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 *CdnApp) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *CdnApp) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetCategories + +`func (o *CdnApp) GetCategories() []ApplicationCategory` + +GetCategories returns the Categories field if non-nil, zero value otherwise. + +### GetCategoriesOk + +`func (o *CdnApp) GetCategoriesOk() (*[]ApplicationCategory, bool)` + +GetCategoriesOk returns a tuple with the Categories field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCategories + +`func (o *CdnApp) SetCategories(v []ApplicationCategory)` + +SetCategories sets Categories field to given value. + +### HasCategories + +`func (o *CdnApp) HasCategories() bool` + +HasCategories returns a boolean if a field has been set. + +### GetRank + +`func (o *CdnApp) GetRank() float32` + +GetRank returns the Rank field if non-nil, zero value otherwise. + +### GetRankOk + +`func (o *CdnApp) GetRankOk() (*float32, bool)` + +GetRankOk returns a tuple with the Rank field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRank + +`func (o *CdnApp) SetRank(v float32)` + +SetRank sets Rank field to given value. + +### HasRank + +`func (o *CdnApp) HasRank() bool` + +HasRank returns a boolean if a field has been set. + +### GetName + +`func (o *CdnApp) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *CdnApp) 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 *CdnApp) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *CdnApp) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetSlug + +`func (o *CdnApp) GetSlug() string` + +GetSlug returns the Slug field if non-nil, zero value otherwise. + +### GetSlugOk + +`func (o *CdnApp) GetSlugOk() (*string, bool)` + +GetSlugOk returns a tuple with the Slug field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSlug + +`func (o *CdnApp) SetSlug(v string)` + +SetSlug sets Slug field to given value. + +### HasSlug + +`func (o *CdnApp) HasSlug() bool` + +HasSlug returns a boolean if a field has been set. + +### GetShortDescription + +`func (o *CdnApp) GetShortDescription() string` + +GetShortDescription returns the ShortDescription field if non-nil, zero value otherwise. + +### GetShortDescriptionOk + +`func (o *CdnApp) GetShortDescriptionOk() (*string, bool)` + +GetShortDescriptionOk returns a tuple with the ShortDescription field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetShortDescription + +`func (o *CdnApp) SetShortDescription(v string)` + +SetShortDescription sets ShortDescription field to given value. + +### HasShortDescription + +`func (o *CdnApp) HasShortDescription() bool` + +HasShortDescription returns a boolean if a field has been set. + +### GetDescription + +`func (o *CdnApp) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *CdnApp) 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 *CdnApp) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *CdnApp) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetLogo + +`func (o *CdnApp) GetLogo() string` + +GetLogo returns the Logo field if non-nil, zero value otherwise. + +### GetLogoOk + +`func (o *CdnApp) GetLogoOk() (*string, bool)` + +GetLogoOk returns a tuple with the Logo field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLogo + +`func (o *CdnApp) SetLogo(v string)` + +SetLogo sets Logo field to given value. + +### HasLogo + +`func (o *CdnApp) HasLogo() bool` + +HasLogo returns a boolean if a field has been set. + +### GetPictures + +`func (o *CdnApp) GetPictures() []string` + +GetPictures returns the Pictures field if non-nil, zero value otherwise. + +### GetPicturesOk + +`func (o *CdnApp) GetPicturesOk() (*[]string, bool)` + +GetPicturesOk returns a tuple with the Pictures field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPictures + +`func (o *CdnApp) SetPictures(v []string)` + +SetPictures sets Pictures field to given value. + +### HasPictures + +`func (o *CdnApp) HasPictures() bool` + +HasPictures returns a boolean if a field has been set. + +### GetVendor + +`func (o *CdnApp) GetVendor() string` + +GetVendor returns the Vendor field if non-nil, zero value otherwise. + +### GetVendorOk + +`func (o *CdnApp) GetVendorOk() (*string, bool)` + +GetVendorOk returns a tuple with the Vendor field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVendor + +`func (o *CdnApp) SetVendor(v string)` + +SetVendor sets Vendor field to given value. + +### HasVendor + +`func (o *CdnApp) HasVendor() bool` + +HasVendor returns a boolean if a field has been set. + +### GetSupportEmail + +`func (o *CdnApp) GetSupportEmail() string` + +GetSupportEmail returns the SupportEmail field if non-nil, zero value otherwise. + +### GetSupportEmailOk + +`func (o *CdnApp) GetSupportEmailOk() (*string, bool)` + +GetSupportEmailOk returns a tuple with the SupportEmail field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSupportEmail + +`func (o *CdnApp) SetSupportEmail(v string)` + +SetSupportEmail sets SupportEmail field to given value. + +### HasSupportEmail + +`func (o *CdnApp) HasSupportEmail() bool` + +HasSupportEmail returns a boolean if a field has been set. + +### GetInstallJson + +`func (o *CdnApp) GetInstallJson() map[string]interface{}` + +GetInstallJson returns the InstallJson field if non-nil, zero value otherwise. + +### GetInstallJsonOk + +`func (o *CdnApp) GetInstallJsonOk() (*map[string]interface{}, bool)` + +GetInstallJsonOk returns a tuple with the InstallJson field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetInstallJson + +`func (o *CdnApp) SetInstallJson(v map[string]interface{})` + +SetInstallJson sets InstallJson field to given value. + +### HasInstallJson + +`func (o *CdnApp) HasInstallJson() bool` + +HasInstallJson returns a boolean if a field has been set. + +### GetStatus + +`func (o *CdnApp) GetStatus() string` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *CdnApp) GetStatusOk() (*string, 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 *CdnApp) SetStatus(v string)` + +SetStatus sets Status field to given value. + +### HasStatus + +`func (o *CdnApp) HasStatus() bool` + +HasStatus returns a boolean if a field has been set. + +### GetLikeStats + +`func (o *CdnApp) GetLikeStats() CdnAppLikeStats` + +GetLikeStats returns the LikeStats field if non-nil, zero value otherwise. + +### GetLikeStatsOk + +`func (o *CdnApp) GetLikeStatsOk() (*CdnAppLikeStats, bool)` + +GetLikeStatsOk returns a tuple with the LikeStats field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLikeStats + +`func (o *CdnApp) SetLikeStats(v CdnAppLikeStats)` + +SetLikeStats sets LikeStats field to given value. + +### HasLikeStats + +`func (o *CdnApp) HasLikeStats() bool` + +HasLikeStats returns a boolean if a field has been set. + +### GetLikeByUser + +`func (o *CdnApp) GetLikeByUser() bool` + +GetLikeByUser returns the LikeByUser field if non-nil, zero value otherwise. + +### GetLikeByUserOk + +`func (o *CdnApp) GetLikeByUserOk() (*bool, bool)` + +GetLikeByUserOk returns a tuple with the LikeByUser field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLikeByUser + +`func (o *CdnApp) SetLikeByUser(v bool)` + +SetLikeByUser sets LikeByUser field to given value. + +### HasLikeByUser + +`func (o *CdnApp) HasLikeByUser() bool` + +HasLikeByUser returns a boolean if a field has been set. + +### GetCreatedAt + +`func (o *CdnApp) GetCreatedAt() time.Time` + +GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. + +### GetCreatedAtOk + +`func (o *CdnApp) GetCreatedAtOk() (*time.Time, bool)` + +GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedAt + +`func (o *CdnApp) SetCreatedAt(v time.Time)` + +SetCreatedAt sets CreatedAt field to given value. + +### HasCreatedAt + +`func (o *CdnApp) HasCreatedAt() bool` + +HasCreatedAt returns a boolean if a field has been set. + +### GetUpdatedAt + +`func (o *CdnApp) GetUpdatedAt() time.Time` + +GetUpdatedAt returns the UpdatedAt field if non-nil, zero value otherwise. + +### GetUpdatedAtOk + +`func (o *CdnApp) GetUpdatedAtOk() (*time.Time, bool)` + +GetUpdatedAtOk returns a tuple with the UpdatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpdatedAt + +`func (o *CdnApp) SetUpdatedAt(v time.Time)` + +SetUpdatedAt sets UpdatedAt field to given value. + +### HasUpdatedAt + +`func (o *CdnApp) HasUpdatedAt() bool` + +HasUpdatedAt returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/CdnAppData.md b/docs/CdnAppData.md new file mode 100644 index 0000000..474e794 --- /dev/null +++ b/docs/CdnAppData.md @@ -0,0 +1,56 @@ +# CdnAppData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**CdnApp**](CdnApp.md) | | [optional] + +## Methods + +### NewCdnAppData + +`func NewCdnAppData() *CdnAppData` + +NewCdnAppData instantiates a new CdnAppData object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCdnAppDataWithDefaults + +`func NewCdnAppDataWithDefaults() *CdnAppData` + +NewCdnAppDataWithDefaults instantiates a new CdnAppData object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *CdnAppData) GetData() CdnApp` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *CdnAppData) GetDataOk() (*CdnApp, 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 *CdnAppData) SetData(v CdnApp)` + +SetData sets Data field to given value. + +### HasData + +`func (o *CdnAppData) HasData() bool` + +HasData returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/CdnAppInstall.md b/docs/CdnAppInstall.md new file mode 100644 index 0000000..cadef82 --- /dev/null +++ b/docs/CdnAppInstall.md @@ -0,0 +1,56 @@ +# CdnAppInstall + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**IsInstall** | Pointer to **bool** | | [optional] + +## Methods + +### NewCdnAppInstall + +`func NewCdnAppInstall() *CdnAppInstall` + +NewCdnAppInstall instantiates a new CdnAppInstall object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCdnAppInstallWithDefaults + +`func NewCdnAppInstallWithDefaults() *CdnAppInstall` + +NewCdnAppInstallWithDefaults instantiates a new CdnAppInstall object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetIsInstall + +`func (o *CdnAppInstall) GetIsInstall() bool` + +GetIsInstall returns the IsInstall field if non-nil, zero value otherwise. + +### GetIsInstallOk + +`func (o *CdnAppInstall) GetIsInstallOk() (*bool, bool)` + +GetIsInstallOk returns a tuple with the IsInstall field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsInstall + +`func (o *CdnAppInstall) SetIsInstall(v bool)` + +SetIsInstall sets IsInstall field to given value. + +### HasIsInstall + +`func (o *CdnAppInstall) HasIsInstall() bool` + +HasIsInstall returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/CdnAppLike.md b/docs/CdnAppLike.md new file mode 100644 index 0000000..3656390 --- /dev/null +++ b/docs/CdnAppLike.md @@ -0,0 +1,66 @@ +# CdnAppLike + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Like** | Pointer to **NullableBool** | True means she likes, False means she dislikes, null means she wants to get her vote back. | [optional] + +## Methods + +### NewCdnAppLike + +`func NewCdnAppLike() *CdnAppLike` + +NewCdnAppLike instantiates a new CdnAppLike object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCdnAppLikeWithDefaults + +`func NewCdnAppLikeWithDefaults() *CdnAppLike` + +NewCdnAppLikeWithDefaults instantiates a new CdnAppLike object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetLike + +`func (o *CdnAppLike) GetLike() bool` + +GetLike returns the Like field if non-nil, zero value otherwise. + +### GetLikeOk + +`func (o *CdnAppLike) GetLikeOk() (*bool, bool)` + +GetLikeOk returns a tuple with the Like field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLike + +`func (o *CdnAppLike) SetLike(v bool)` + +SetLike sets Like field to given value. + +### HasLike + +`func (o *CdnAppLike) HasLike() bool` + +HasLike returns a boolean if a field has been set. + +### SetLikeNil + +`func (o *CdnAppLike) SetLikeNil(b bool)` + + SetLikeNil sets the value for Like to be an explicit nil + +### UnsetLike +`func (o *CdnAppLike) UnsetLike()` + +UnsetLike ensures that no value is present for Like, not even an explicit nil + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/CdnAppLikeStats.md b/docs/CdnAppLikeStats.md new file mode 100644 index 0000000..7fbbd3d --- /dev/null +++ b/docs/CdnAppLikeStats.md @@ -0,0 +1,82 @@ +# CdnAppLikeStats + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**LikesCount** | Pointer to **int32** | | [optional] +**DislikesCount** | Pointer to **int32** | | [optional] + +## Methods + +### NewCdnAppLikeStats + +`func NewCdnAppLikeStats() *CdnAppLikeStats` + +NewCdnAppLikeStats instantiates a new CdnAppLikeStats object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCdnAppLikeStatsWithDefaults + +`func NewCdnAppLikeStatsWithDefaults() *CdnAppLikeStats` + +NewCdnAppLikeStatsWithDefaults instantiates a new CdnAppLikeStats object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetLikesCount + +`func (o *CdnAppLikeStats) GetLikesCount() int32` + +GetLikesCount returns the LikesCount field if non-nil, zero value otherwise. + +### GetLikesCountOk + +`func (o *CdnAppLikeStats) GetLikesCountOk() (*int32, bool)` + +GetLikesCountOk returns a tuple with the LikesCount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLikesCount + +`func (o *CdnAppLikeStats) SetLikesCount(v int32)` + +SetLikesCount sets LikesCount field to given value. + +### HasLikesCount + +`func (o *CdnAppLikeStats) HasLikesCount() bool` + +HasLikesCount returns a boolean if a field has been set. + +### GetDislikesCount + +`func (o *CdnAppLikeStats) GetDislikesCount() int32` + +GetDislikesCount returns the DislikesCount field if non-nil, zero value otherwise. + +### GetDislikesCountOk + +`func (o *CdnAppLikeStats) GetDislikesCountOk() (*int32, bool)` + +GetDislikesCountOk returns a tuple with the DislikesCount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDislikesCount + +`func (o *CdnAppLikeStats) SetDislikesCount(v int32)` + +SetDislikesCount sets DislikesCount field to given value. + +### HasDislikesCount + +`func (o *CdnAppLikeStats) HasDislikesCount() bool` + +HasDislikesCount returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/CdnAppLikeStatsData.md b/docs/CdnAppLikeStatsData.md new file mode 100644 index 0000000..c64f601 --- /dev/null +++ b/docs/CdnAppLikeStatsData.md @@ -0,0 +1,56 @@ +# CdnAppLikeStatsData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**CdnAppLikeStats**](CdnAppLikeStats.md) | | [optional] + +## Methods + +### NewCdnAppLikeStatsData + +`func NewCdnAppLikeStatsData() *CdnAppLikeStatsData` + +NewCdnAppLikeStatsData instantiates a new CdnAppLikeStatsData object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCdnAppLikeStatsDataWithDefaults + +`func NewCdnAppLikeStatsDataWithDefaults() *CdnAppLikeStatsData` + +NewCdnAppLikeStatsDataWithDefaults instantiates a new CdnAppLikeStatsData object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *CdnAppLikeStatsData) GetData() CdnAppLikeStats` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *CdnAppLikeStatsData) GetDataOk() (*CdnAppLikeStats, 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 *CdnAppLikeStatsData) SetData(v CdnAppLikeStats)` + +SetData sets Data field to given value. + +### HasData + +`func (o *CdnAppLikeStatsData) HasData() bool` + +HasData returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/CdnAppTriggerWebhook.md b/docs/CdnAppTriggerWebhook.md new file mode 100644 index 0000000..c8fc6f4 --- /dev/null +++ b/docs/CdnAppTriggerWebhook.md @@ -0,0 +1,72 @@ +# CdnAppTriggerWebhook + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Event** | **string** | | +**Options** | **map[string]interface{}** | | + +## Methods + +### NewCdnAppTriggerWebhook + +`func NewCdnAppTriggerWebhook(event string, options map[string]interface{}, ) *CdnAppTriggerWebhook` + +NewCdnAppTriggerWebhook instantiates a new CdnAppTriggerWebhook object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCdnAppTriggerWebhookWithDefaults + +`func NewCdnAppTriggerWebhookWithDefaults() *CdnAppTriggerWebhook` + +NewCdnAppTriggerWebhookWithDefaults instantiates a new CdnAppTriggerWebhook object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetEvent + +`func (o *CdnAppTriggerWebhook) GetEvent() string` + +GetEvent returns the Event field if non-nil, zero value otherwise. + +### GetEventOk + +`func (o *CdnAppTriggerWebhook) GetEventOk() (*string, bool)` + +GetEventOk returns a tuple with the Event field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEvent + +`func (o *CdnAppTriggerWebhook) SetEvent(v string)` + +SetEvent sets Event field to given value. + + +### GetOptions + +`func (o *CdnAppTriggerWebhook) GetOptions() map[string]interface{}` + +GetOptions returns the Options field if non-nil, zero value otherwise. + +### GetOptionsOk + +`func (o *CdnAppTriggerWebhook) GetOptionsOk() (*map[string]interface{}, bool)` + +GetOptionsOk returns a tuple with the Options field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOptions + +`func (o *CdnAppTriggerWebhook) SetOptions(v map[string]interface{})` + +SetOptions sets Options field to given value. + + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/Certificate.md b/docs/Certificate.md new file mode 100644 index 0000000..e591597 --- /dev/null +++ b/docs/Certificate.md @@ -0,0 +1,248 @@ +# Certificate + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **string** | | [optional] [readonly] +**Type** | Pointer to **string** | | [optional] [readonly] +**KeyType** | Pointer to **NullableString** | | [optional] [readonly] +**DomainNames** | Pointer to **[]string** | | [optional] [readonly] +**Issuer** | Pointer to **string** | | [optional] [readonly] +**ExpiryDate** | Pointer to **time.Time** | | [optional] [readonly] +**CreatedAt** | Pointer to **time.Time** | | [optional] [readonly] +**UpdatedAt** | Pointer to **time.Time** | | [optional] [readonly] + +## Methods + +### NewCertificate + +`func NewCertificate() *Certificate` + +NewCertificate instantiates a new Certificate object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCertificateWithDefaults + +`func NewCertificateWithDefaults() *Certificate` + +NewCertificateWithDefaults instantiates a new Certificate object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *Certificate) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *Certificate) 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 *Certificate) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *Certificate) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetType + +`func (o *Certificate) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *Certificate) 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 *Certificate) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *Certificate) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetKeyType + +`func (o *Certificate) GetKeyType() string` + +GetKeyType returns the KeyType field if non-nil, zero value otherwise. + +### GetKeyTypeOk + +`func (o *Certificate) GetKeyTypeOk() (*string, bool)` + +GetKeyTypeOk returns a tuple with the KeyType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKeyType + +`func (o *Certificate) SetKeyType(v string)` + +SetKeyType sets KeyType field to given value. + +### HasKeyType + +`func (o *Certificate) HasKeyType() bool` + +HasKeyType returns a boolean if a field has been set. + +### SetKeyTypeNil + +`func (o *Certificate) SetKeyTypeNil(b bool)` + + SetKeyTypeNil sets the value for KeyType to be an explicit nil + +### UnsetKeyType +`func (o *Certificate) UnsetKeyType()` + +UnsetKeyType ensures that no value is present for KeyType, not even an explicit nil +### GetDomainNames + +`func (o *Certificate) GetDomainNames() []string` + +GetDomainNames returns the DomainNames field if non-nil, zero value otherwise. + +### GetDomainNamesOk + +`func (o *Certificate) GetDomainNamesOk() (*[]string, bool)` + +GetDomainNamesOk returns a tuple with the DomainNames field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDomainNames + +`func (o *Certificate) SetDomainNames(v []string)` + +SetDomainNames sets DomainNames field to given value. + +### HasDomainNames + +`func (o *Certificate) HasDomainNames() bool` + +HasDomainNames returns a boolean if a field has been set. + +### GetIssuer + +`func (o *Certificate) GetIssuer() string` + +GetIssuer returns the Issuer field if non-nil, zero value otherwise. + +### GetIssuerOk + +`func (o *Certificate) 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 *Certificate) SetIssuer(v string)` + +SetIssuer sets Issuer field to given value. + +### HasIssuer + +`func (o *Certificate) HasIssuer() bool` + +HasIssuer returns a boolean if a field has been set. + +### GetExpiryDate + +`func (o *Certificate) GetExpiryDate() time.Time` + +GetExpiryDate returns the ExpiryDate field if non-nil, zero value otherwise. + +### GetExpiryDateOk + +`func (o *Certificate) GetExpiryDateOk() (*time.Time, bool)` + +GetExpiryDateOk returns a tuple with the ExpiryDate field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExpiryDate + +`func (o *Certificate) SetExpiryDate(v time.Time)` + +SetExpiryDate sets ExpiryDate field to given value. + +### HasExpiryDate + +`func (o *Certificate) HasExpiryDate() bool` + +HasExpiryDate returns a boolean if a field has been set. + +### GetCreatedAt + +`func (o *Certificate) GetCreatedAt() time.Time` + +GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. + +### GetCreatedAtOk + +`func (o *Certificate) GetCreatedAtOk() (*time.Time, bool)` + +GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedAt + +`func (o *Certificate) SetCreatedAt(v time.Time)` + +SetCreatedAt sets CreatedAt field to given value. + +### HasCreatedAt + +`func (o *Certificate) HasCreatedAt() bool` + +HasCreatedAt returns a boolean if a field has been set. + +### GetUpdatedAt + +`func (o *Certificate) GetUpdatedAt() time.Time` + +GetUpdatedAt returns the UpdatedAt field if non-nil, zero value otherwise. + +### GetUpdatedAtOk + +`func (o *Certificate) GetUpdatedAtOk() (*time.Time, bool)` + +GetUpdatedAtOk returns a tuple with the UpdatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpdatedAt + +`func (o *Certificate) SetUpdatedAt(v time.Time)` + +SetUpdatedAt sets UpdatedAt field to given value. + +### HasUpdatedAt + +`func (o *Certificate) HasUpdatedAt() bool` + +HasUpdatedAt returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/CertificateOrder.md b/docs/CertificateOrder.md new file mode 100644 index 0000000..4a5823e --- /dev/null +++ b/docs/CertificateOrder.md @@ -0,0 +1,238 @@ +# CertificateOrder + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **string** | | [optional] [readonly] +**OrderId** | Pointer to **string** | | [optional] [readonly] +**Status** | Pointer to **string** | - `unprocessed` - Order is in the process queue - `canceled` - Order is canceled in favor of a new one with updated subject names - `pending` - Authorization Challenges are set, Validating authorization challenges... - `ready` - Challenges are validated, ready to issue the certificate - `processing` - Issuing Certificate... - `valid` - Certificate is issued successfully, this is the final stage - `invalid` - An Error Occurred, this order cannot proceed anymore, a new order will be created automatically - `terminated` - An Unknown Error occurred, this order cannot proceed anymore, a new order will be created automatically - `killed` - Order failed despite many retries, will not proceed anymore nor retry, needs manual intervention | [optional] [readonly] +**DomainNames** | Pointer to **[]string** | | [optional] [readonly] +**Errors** | Pointer to **[]map[string]interface{}** | | [optional] [readonly] +**ExpiryDate** | Pointer to **time.Time** | Expired order is treated as invalid order | [optional] [readonly] +**CreatedAt** | Pointer to **time.Time** | | [optional] [readonly] +**UpdatedAt** | Pointer to **time.Time** | | [optional] [readonly] + +## Methods + +### NewCertificateOrder + +`func NewCertificateOrder() *CertificateOrder` + +NewCertificateOrder instantiates a new CertificateOrder object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCertificateOrderWithDefaults + +`func NewCertificateOrderWithDefaults() *CertificateOrder` + +NewCertificateOrderWithDefaults instantiates a new CertificateOrder object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *CertificateOrder) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *CertificateOrder) 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 *CertificateOrder) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *CertificateOrder) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetOrderId + +`func (o *CertificateOrder) GetOrderId() string` + +GetOrderId returns the OrderId field if non-nil, zero value otherwise. + +### GetOrderIdOk + +`func (o *CertificateOrder) GetOrderIdOk() (*string, bool)` + +GetOrderIdOk returns a tuple with the OrderId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOrderId + +`func (o *CertificateOrder) SetOrderId(v string)` + +SetOrderId sets OrderId field to given value. + +### HasOrderId + +`func (o *CertificateOrder) HasOrderId() bool` + +HasOrderId returns a boolean if a field has been set. + +### GetStatus + +`func (o *CertificateOrder) GetStatus() string` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *CertificateOrder) GetStatusOk() (*string, 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 *CertificateOrder) SetStatus(v string)` + +SetStatus sets Status field to given value. + +### HasStatus + +`func (o *CertificateOrder) HasStatus() bool` + +HasStatus returns a boolean if a field has been set. + +### GetDomainNames + +`func (o *CertificateOrder) GetDomainNames() []string` + +GetDomainNames returns the DomainNames field if non-nil, zero value otherwise. + +### GetDomainNamesOk + +`func (o *CertificateOrder) GetDomainNamesOk() (*[]string, bool)` + +GetDomainNamesOk returns a tuple with the DomainNames field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDomainNames + +`func (o *CertificateOrder) SetDomainNames(v []string)` + +SetDomainNames sets DomainNames field to given value. + +### HasDomainNames + +`func (o *CertificateOrder) HasDomainNames() bool` + +HasDomainNames returns a boolean if a field has been set. + +### GetErrors + +`func (o *CertificateOrder) GetErrors() []map[string]interface{}` + +GetErrors returns the Errors field if non-nil, zero value otherwise. + +### GetErrorsOk + +`func (o *CertificateOrder) GetErrorsOk() (*[]map[string]interface{}, bool)` + +GetErrorsOk returns a tuple with the Errors field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetErrors + +`func (o *CertificateOrder) SetErrors(v []map[string]interface{})` + +SetErrors sets Errors field to given value. + +### HasErrors + +`func (o *CertificateOrder) HasErrors() bool` + +HasErrors returns a boolean if a field has been set. + +### GetExpiryDate + +`func (o *CertificateOrder) GetExpiryDate() time.Time` + +GetExpiryDate returns the ExpiryDate field if non-nil, zero value otherwise. + +### GetExpiryDateOk + +`func (o *CertificateOrder) GetExpiryDateOk() (*time.Time, bool)` + +GetExpiryDateOk returns a tuple with the ExpiryDate field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExpiryDate + +`func (o *CertificateOrder) SetExpiryDate(v time.Time)` + +SetExpiryDate sets ExpiryDate field to given value. + +### HasExpiryDate + +`func (o *CertificateOrder) HasExpiryDate() bool` + +HasExpiryDate returns a boolean if a field has been set. + +### GetCreatedAt + +`func (o *CertificateOrder) GetCreatedAt() time.Time` + +GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. + +### GetCreatedAtOk + +`func (o *CertificateOrder) GetCreatedAtOk() (*time.Time, bool)` + +GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedAt + +`func (o *CertificateOrder) SetCreatedAt(v time.Time)` + +SetCreatedAt sets CreatedAt field to given value. + +### HasCreatedAt + +`func (o *CertificateOrder) HasCreatedAt() bool` + +HasCreatedAt returns a boolean if a field has been set. + +### GetUpdatedAt + +`func (o *CertificateOrder) GetUpdatedAt() time.Time` + +GetUpdatedAt returns the UpdatedAt field if non-nil, zero value otherwise. + +### GetUpdatedAtOk + +`func (o *CertificateOrder) GetUpdatedAtOk() (*time.Time, bool)` + +GetUpdatedAtOk returns a tuple with the UpdatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpdatedAt + +`func (o *CertificateOrder) SetUpdatedAt(v time.Time)` + +SetUpdatedAt sets UpdatedAt field to given value. + +### HasUpdatedAt + +`func (o *CertificateOrder) HasUpdatedAt() bool` + +HasUpdatedAt returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/ChallengeAction.md b/docs/ChallengeAction.md new file mode 100644 index 0000000..38364cb --- /dev/null +++ b/docs/ChallengeAction.md @@ -0,0 +1,108 @@ +# ChallengeAction + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Mode** | Pointer to **int32** | The mode of mitigation (1: Cookie, 2: Javascript, 3: Captcha) | [optional] +**Ttl** | Pointer to **int32** | | [optional] +**HttpsOnly** | Pointer to **bool** | | [optional] + +## Methods + +### NewChallengeAction + +`func NewChallengeAction() *ChallengeAction` + +NewChallengeAction instantiates a new ChallengeAction object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewChallengeActionWithDefaults + +`func NewChallengeActionWithDefaults() *ChallengeAction` + +NewChallengeActionWithDefaults instantiates a new ChallengeAction object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetMode + +`func (o *ChallengeAction) GetMode() int32` + +GetMode returns the Mode field if non-nil, zero value otherwise. + +### GetModeOk + +`func (o *ChallengeAction) GetModeOk() (*int32, bool)` + +GetModeOk returns a tuple with the Mode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMode + +`func (o *ChallengeAction) SetMode(v int32)` + +SetMode sets Mode field to given value. + +### HasMode + +`func (o *ChallengeAction) HasMode() bool` + +HasMode returns a boolean if a field has been set. + +### GetTtl + +`func (o *ChallengeAction) GetTtl() int32` + +GetTtl returns the Ttl field if non-nil, zero value otherwise. + +### GetTtlOk + +`func (o *ChallengeAction) GetTtlOk() (*int32, bool)` + +GetTtlOk returns a tuple with the Ttl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTtl + +`func (o *ChallengeAction) SetTtl(v int32)` + +SetTtl sets Ttl field to given value. + +### HasTtl + +`func (o *ChallengeAction) HasTtl() bool` + +HasTtl returns a boolean if a field has been set. + +### GetHttpsOnly + +`func (o *ChallengeAction) GetHttpsOnly() bool` + +GetHttpsOnly returns the HttpsOnly field if non-nil, zero value otherwise. + +### GetHttpsOnlyOk + +`func (o *ChallengeAction) GetHttpsOnlyOk() (*bool, bool)` + +GetHttpsOnlyOk returns a tuple with the HttpsOnly field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHttpsOnly + +`func (o *ChallengeAction) SetHttpsOnly(v bool)` + +SetHttpsOnly sets HttpsOnly field to given value. + +### HasHttpsOnly + +`func (o *ChallengeAction) HasHttpsOnly() bool` + +HasHttpsOnly returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/CloneDomain.md b/docs/CloneDomain.md new file mode 100644 index 0000000..ae741ef --- /dev/null +++ b/docs/CloneDomain.md @@ -0,0 +1,51 @@ +# CloneDomain + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**From** | **string** | | + +## Methods + +### NewCloneDomain + +`func NewCloneDomain(from string, ) *CloneDomain` + +NewCloneDomain instantiates a new CloneDomain object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCloneDomainWithDefaults + +`func NewCloneDomainWithDefaults() *CloneDomain` + +NewCloneDomainWithDefaults instantiates a new CloneDomain object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetFrom + +`func (o *CloneDomain) GetFrom() string` + +GetFrom returns the From field if non-nil, zero value otherwise. + +### GetFromOk + +`func (o *CloneDomain) GetFromOk() (*string, bool)` + +GetFromOk returns a tuple with the From field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFrom + +`func (o *CloneDomain) SetFrom(v string)` + +SetFrom sets From field to given value. + + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/CountryList.md b/docs/CountryList.md new file mode 100644 index 0000000..c26940f --- /dev/null +++ b/docs/CountryList.md @@ -0,0 +1,134 @@ +# CountryList + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Country** | Pointer to **string** | The name of the country | [optional] +**Code** | Pointer to **string** | The 2-letter country code | [optional] +**Requests** | Pointer to **int32** | The number of requests from the country | [optional] +**Traffics** | Pointer to **int32** | The amount of traffic from the country | [optional] + +## Methods + +### NewCountryList + +`func NewCountryList() *CountryList` + +NewCountryList instantiates a new CountryList object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCountryListWithDefaults + +`func NewCountryListWithDefaults() *CountryList` + +NewCountryListWithDefaults instantiates a new CountryList object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCountry + +`func (o *CountryList) GetCountry() string` + +GetCountry returns the Country field if non-nil, zero value otherwise. + +### GetCountryOk + +`func (o *CountryList) 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 *CountryList) SetCountry(v string)` + +SetCountry sets Country field to given value. + +### HasCountry + +`func (o *CountryList) HasCountry() bool` + +HasCountry returns a boolean if a field has been set. + +### GetCode + +`func (o *CountryList) GetCode() string` + +GetCode returns the Code field if non-nil, zero value otherwise. + +### GetCodeOk + +`func (o *CountryList) GetCodeOk() (*string, bool)` + +GetCodeOk returns a tuple with the Code field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCode + +`func (o *CountryList) SetCode(v string)` + +SetCode sets Code field to given value. + +### HasCode + +`func (o *CountryList) HasCode() bool` + +HasCode returns a boolean if a field has been set. + +### GetRequests + +`func (o *CountryList) GetRequests() int32` + +GetRequests returns the Requests field if non-nil, zero value otherwise. + +### GetRequestsOk + +`func (o *CountryList) GetRequestsOk() (*int32, bool)` + +GetRequestsOk returns a tuple with the Requests field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRequests + +`func (o *CountryList) SetRequests(v int32)` + +SetRequests sets Requests field to given value. + +### HasRequests + +`func (o *CountryList) HasRequests() bool` + +HasRequests returns a boolean if a field has been set. + +### GetTraffics + +`func (o *CountryList) GetTraffics() int32` + +GetTraffics returns the Traffics field if non-nil, zero value otherwise. + +### GetTrafficsOk + +`func (o *CountryList) GetTrafficsOk() (*int32, bool)` + +GetTrafficsOk returns a tuple with the Traffics field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTraffics + +`func (o *CountryList) SetTraffics(v int32)` + +SetTraffics sets Traffics field to given value. + +### HasTraffics + +`func (o *CountryList) HasTraffics() bool` + +HasTraffics returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/CountryRequestChart.md b/docs/CountryRequestChart.md new file mode 100644 index 0000000..5d4a64b --- /dev/null +++ b/docs/CountryRequestChart.md @@ -0,0 +1,108 @@ +# CountryRequestChart + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FillKey** | Pointer to **int32** | The fill key for the country | [optional] +**Name** | Pointer to **string** | The name of the country | [optional] +**Value** | Pointer to **int32** | The number of requests from the country | [optional] + +## Methods + +### NewCountryRequestChart + +`func NewCountryRequestChart() *CountryRequestChart` + +NewCountryRequestChart instantiates a new CountryRequestChart object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCountryRequestChartWithDefaults + +`func NewCountryRequestChartWithDefaults() *CountryRequestChart` + +NewCountryRequestChartWithDefaults instantiates a new CountryRequestChart object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetFillKey + +`func (o *CountryRequestChart) GetFillKey() int32` + +GetFillKey returns the FillKey field if non-nil, zero value otherwise. + +### GetFillKeyOk + +`func (o *CountryRequestChart) GetFillKeyOk() (*int32, bool)` + +GetFillKeyOk returns a tuple with the FillKey field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFillKey + +`func (o *CountryRequestChart) SetFillKey(v int32)` + +SetFillKey sets FillKey field to given value. + +### HasFillKey + +`func (o *CountryRequestChart) HasFillKey() bool` + +HasFillKey returns a boolean if a field has been set. + +### GetName + +`func (o *CountryRequestChart) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *CountryRequestChart) 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 *CountryRequestChart) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *CountryRequestChart) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetValue + +`func (o *CountryRequestChart) GetValue() int32` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *CountryRequestChart) GetValueOk() (*int32, 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 *CountryRequestChart) SetValue(v int32)` + +SetValue sets Value field to given value. + +### HasValue + +`func (o *CountryRequestChart) HasValue() bool` + +HasValue returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/CountryStatistics.md b/docs/CountryStatistics.md new file mode 100644 index 0000000..d0c2fac --- /dev/null +++ b/docs/CountryStatistics.md @@ -0,0 +1,108 @@ +# CountryStatistics + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Country** | Pointer to **string** | The name of the country | [optional] +**Requests** | Pointer to **int32** | The number of requests from the country | [optional] +**Traffics** | Pointer to **int32** | The amount of traffic from the country | [optional] + +## Methods + +### NewCountryStatistics + +`func NewCountryStatistics() *CountryStatistics` + +NewCountryStatistics instantiates a new CountryStatistics object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCountryStatisticsWithDefaults + +`func NewCountryStatisticsWithDefaults() *CountryStatistics` + +NewCountryStatisticsWithDefaults instantiates a new CountryStatistics object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCountry + +`func (o *CountryStatistics) GetCountry() string` + +GetCountry returns the Country field if non-nil, zero value otherwise. + +### GetCountryOk + +`func (o *CountryStatistics) 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 *CountryStatistics) SetCountry(v string)` + +SetCountry sets Country field to given value. + +### HasCountry + +`func (o *CountryStatistics) HasCountry() bool` + +HasCountry returns a boolean if a field has been set. + +### GetRequests + +`func (o *CountryStatistics) GetRequests() int32` + +GetRequests returns the Requests field if non-nil, zero value otherwise. + +### GetRequestsOk + +`func (o *CountryStatistics) GetRequestsOk() (*int32, bool)` + +GetRequestsOk returns a tuple with the Requests field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRequests + +`func (o *CountryStatistics) SetRequests(v int32)` + +SetRequests sets Requests field to given value. + +### HasRequests + +`func (o *CountryStatistics) HasRequests() bool` + +HasRequests returns a boolean if a field has been set. + +### GetTraffics + +`func (o *CountryStatistics) GetTraffics() int32` + +GetTraffics returns the Traffics field if non-nil, zero value otherwise. + +### GetTrafficsOk + +`func (o *CountryStatistics) GetTrafficsOk() (*int32, bool)` + +GetTrafficsOk returns a tuple with the Traffics field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTraffics + +`func (o *CountryStatistics) SetTraffics(v int32)` + +SetTraffics sets Traffics field to given value. + +### HasTraffics + +`func (o *CountryStatistics) HasTraffics() bool` + +HasTraffics returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/CountryTrafficChart.md b/docs/CountryTrafficChart.md new file mode 100644 index 0000000..4f315e0 --- /dev/null +++ b/docs/CountryTrafficChart.md @@ -0,0 +1,108 @@ +# CountryTrafficChart + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FillKey** | Pointer to **int32** | The fill key for the country | [optional] +**Name** | Pointer to **string** | The name of the country | [optional] +**Value** | Pointer to **int32** | The amount of traffic from the country | [optional] + +## Methods + +### NewCountryTrafficChart + +`func NewCountryTrafficChart() *CountryTrafficChart` + +NewCountryTrafficChart instantiates a new CountryTrafficChart object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCountryTrafficChartWithDefaults + +`func NewCountryTrafficChartWithDefaults() *CountryTrafficChart` + +NewCountryTrafficChartWithDefaults instantiates a new CountryTrafficChart object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetFillKey + +`func (o *CountryTrafficChart) GetFillKey() int32` + +GetFillKey returns the FillKey field if non-nil, zero value otherwise. + +### GetFillKeyOk + +`func (o *CountryTrafficChart) GetFillKeyOk() (*int32, bool)` + +GetFillKeyOk returns a tuple with the FillKey field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFillKey + +`func (o *CountryTrafficChart) SetFillKey(v int32)` + +SetFillKey sets FillKey field to given value. + +### HasFillKey + +`func (o *CountryTrafficChart) HasFillKey() bool` + +HasFillKey returns a boolean if a field has been set. + +### GetName + +`func (o *CountryTrafficChart) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *CountryTrafficChart) 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 *CountryTrafficChart) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *CountryTrafficChart) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetValue + +`func (o *CountryTrafficChart) GetValue() int32` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *CountryTrafficChart) GetValueOk() (*int32, 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 *CountryTrafficChart) SetValue(v int32)` + +SetValue sets Value field to given value. + +### HasValue + +`func (o *CountryTrafficChart) HasValue() bool` + +HasValue returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/Currency.md b/docs/Currency.md new file mode 100644 index 0000000..ccb4611 --- /dev/null +++ b/docs/Currency.md @@ -0,0 +1,82 @@ +# Currency + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Key** | Pointer to **string** | | [optional] +**Label** | Pointer to **string** | | [optional] + +## Methods + +### NewCurrency + +`func NewCurrency() *Currency` + +NewCurrency instantiates a new Currency object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCurrencyWithDefaults + +`func NewCurrencyWithDefaults() *Currency` + +NewCurrencyWithDefaults instantiates a new Currency object +This 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 *Currency) GetKey() string` + +GetKey returns the Key field if non-nil, zero value otherwise. + +### GetKeyOk + +`func (o *Currency) 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 *Currency) SetKey(v string)` + +SetKey sets Key field to given value. + +### HasKey + +`func (o *Currency) HasKey() bool` + +HasKey returns a boolean if a field has been set. + +### GetLabel + +`func (o *Currency) GetLabel() string` + +GetLabel returns the Label field if non-nil, zero value otherwise. + +### GetLabelOk + +`func (o *Currency) GetLabelOk() (*string, bool)` + +GetLabelOk returns a tuple with the Label field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLabel + +`func (o *Currency) SetLabel(v string)` + +SetLabel sets Label field to given value. + +### HasLabel + +`func (o *Currency) HasLabel() bool` + +HasLabel returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/CustomCname.md b/docs/CustomCname.md new file mode 100644 index 0000000..d1c27f0 --- /dev/null +++ b/docs/CustomCname.md @@ -0,0 +1,51 @@ +# CustomCname + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Address** | **string** | | + +## Methods + +### NewCustomCname + +`func NewCustomCname(address string, ) *CustomCname` + +NewCustomCname instantiates a new CustomCname object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCustomCnameWithDefaults + +`func NewCustomCnameWithDefaults() *CustomCname` + +NewCustomCnameWithDefaults instantiates a new CustomCname object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetAddress + +`func (o *CustomCname) GetAddress() string` + +GetAddress returns the Address field if non-nil, zero value otherwise. + +### GetAddressOk + +`func (o *CustomCname) 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 *CustomCname) SetAddress(v string)` + +SetAddress sets Address field to given value. + + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/CustomPage.md b/docs/CustomPage.md new file mode 100644 index 0000000..49dad5e --- /dev/null +++ b/docs/CustomPage.md @@ -0,0 +1,108 @@ +# CustomPage + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**StatusCode** | Pointer to **int32** | | [optional] +**Type** | Pointer to **string** | | [optional] +**Url** | Pointer to **string** | | [optional] + +## Methods + +### NewCustomPage + +`func NewCustomPage() *CustomPage` + +NewCustomPage instantiates a new CustomPage object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCustomPageWithDefaults + +`func NewCustomPageWithDefaults() *CustomPage` + +NewCustomPageWithDefaults instantiates a new CustomPage object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetStatusCode + +`func (o *CustomPage) GetStatusCode() int32` + +GetStatusCode returns the StatusCode field if non-nil, zero value otherwise. + +### GetStatusCodeOk + +`func (o *CustomPage) GetStatusCodeOk() (*int32, bool)` + +GetStatusCodeOk returns a tuple with the StatusCode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatusCode + +`func (o *CustomPage) SetStatusCode(v int32)` + +SetStatusCode sets StatusCode field to given value. + +### HasStatusCode + +`func (o *CustomPage) HasStatusCode() bool` + +HasStatusCode returns a boolean if a field has been set. + +### GetType + +`func (o *CustomPage) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *CustomPage) 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 *CustomPage) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *CustomPage) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetUrl + +`func (o *CustomPage) GetUrl() string` + +GetUrl returns the Url field if non-nil, zero value otherwise. + +### GetUrlOk + +`func (o *CustomPage) GetUrlOk() (*string, bool)` + +GetUrlOk returns a tuple with the Url field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUrl + +`func (o *CustomPage) SetUrl(v string)` + +SetUrl sets Url field to given value. + +### HasUrl + +`func (o *CustomPage) HasUrl() bool` + +HasUrl returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/CustomPages.md b/docs/CustomPages.md new file mode 100644 index 0000000..77e6851 --- /dev/null +++ b/docs/CustomPages.md @@ -0,0 +1,264 @@ +# CustomPages + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**UnderConstruction** | Pointer to [**CustomPage**](CustomPage.md) | | [optional] +**FirewallError** | Pointer to [**CustomPage**](CustomPage.md) | | [optional] +**WafProtection** | Pointer to [**CustomPage**](CustomPage.md) | | [optional] +**RateLimitExceeded** | Pointer to [**CustomPage**](CustomPage.md) | | [optional] +**SecureLinkExpired** | Pointer to [**CustomPage**](CustomPage.md) | | [optional] +**SecureLinkInvalid** | Pointer to [**CustomPage**](CustomPage.md) | | [optional] +**Error500** | Pointer to [**CustomPage**](CustomPage.md) | | [optional] +**DdosJs** | Pointer to [**CustomPage**](CustomPage.md) | | [optional] +**DdosCaptcha** | Pointer to [**CustomPage**](CustomPage.md) | | [optional] + +## Methods + +### NewCustomPages + +`func NewCustomPages() *CustomPages` + +NewCustomPages instantiates a new CustomPages object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCustomPagesWithDefaults + +`func NewCustomPagesWithDefaults() *CustomPages` + +NewCustomPagesWithDefaults instantiates a new CustomPages object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetUnderConstruction + +`func (o *CustomPages) GetUnderConstruction() CustomPage` + +GetUnderConstruction returns the UnderConstruction field if non-nil, zero value otherwise. + +### GetUnderConstructionOk + +`func (o *CustomPages) GetUnderConstructionOk() (*CustomPage, bool)` + +GetUnderConstructionOk returns a tuple with the UnderConstruction field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUnderConstruction + +`func (o *CustomPages) SetUnderConstruction(v CustomPage)` + +SetUnderConstruction sets UnderConstruction field to given value. + +### HasUnderConstruction + +`func (o *CustomPages) HasUnderConstruction() bool` + +HasUnderConstruction returns a boolean if a field has been set. + +### GetFirewallError + +`func (o *CustomPages) GetFirewallError() CustomPage` + +GetFirewallError returns the FirewallError field if non-nil, zero value otherwise. + +### GetFirewallErrorOk + +`func (o *CustomPages) GetFirewallErrorOk() (*CustomPage, bool)` + +GetFirewallErrorOk returns a tuple with the FirewallError field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFirewallError + +`func (o *CustomPages) SetFirewallError(v CustomPage)` + +SetFirewallError sets FirewallError field to given value. + +### HasFirewallError + +`func (o *CustomPages) HasFirewallError() bool` + +HasFirewallError returns a boolean if a field has been set. + +### GetWafProtection + +`func (o *CustomPages) GetWafProtection() CustomPage` + +GetWafProtection returns the WafProtection field if non-nil, zero value otherwise. + +### GetWafProtectionOk + +`func (o *CustomPages) GetWafProtectionOk() (*CustomPage, bool)` + +GetWafProtectionOk returns a tuple with the WafProtection field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetWafProtection + +`func (o *CustomPages) SetWafProtection(v CustomPage)` + +SetWafProtection sets WafProtection field to given value. + +### HasWafProtection + +`func (o *CustomPages) HasWafProtection() bool` + +HasWafProtection returns a boolean if a field has been set. + +### GetRateLimitExceeded + +`func (o *CustomPages) GetRateLimitExceeded() CustomPage` + +GetRateLimitExceeded returns the RateLimitExceeded field if non-nil, zero value otherwise. + +### GetRateLimitExceededOk + +`func (o *CustomPages) GetRateLimitExceededOk() (*CustomPage, bool)` + +GetRateLimitExceededOk returns a tuple with the RateLimitExceeded field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRateLimitExceeded + +`func (o *CustomPages) SetRateLimitExceeded(v CustomPage)` + +SetRateLimitExceeded sets RateLimitExceeded field to given value. + +### HasRateLimitExceeded + +`func (o *CustomPages) HasRateLimitExceeded() bool` + +HasRateLimitExceeded returns a boolean if a field has been set. + +### GetSecureLinkExpired + +`func (o *CustomPages) GetSecureLinkExpired() CustomPage` + +GetSecureLinkExpired returns the SecureLinkExpired field if non-nil, zero value otherwise. + +### GetSecureLinkExpiredOk + +`func (o *CustomPages) GetSecureLinkExpiredOk() (*CustomPage, bool)` + +GetSecureLinkExpiredOk returns a tuple with the SecureLinkExpired field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSecureLinkExpired + +`func (o *CustomPages) SetSecureLinkExpired(v CustomPage)` + +SetSecureLinkExpired sets SecureLinkExpired field to given value. + +### HasSecureLinkExpired + +`func (o *CustomPages) HasSecureLinkExpired() bool` + +HasSecureLinkExpired returns a boolean if a field has been set. + +### GetSecureLinkInvalid + +`func (o *CustomPages) GetSecureLinkInvalid() CustomPage` + +GetSecureLinkInvalid returns the SecureLinkInvalid field if non-nil, zero value otherwise. + +### GetSecureLinkInvalidOk + +`func (o *CustomPages) GetSecureLinkInvalidOk() (*CustomPage, bool)` + +GetSecureLinkInvalidOk returns a tuple with the SecureLinkInvalid field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSecureLinkInvalid + +`func (o *CustomPages) SetSecureLinkInvalid(v CustomPage)` + +SetSecureLinkInvalid sets SecureLinkInvalid field to given value. + +### HasSecureLinkInvalid + +`func (o *CustomPages) HasSecureLinkInvalid() bool` + +HasSecureLinkInvalid returns a boolean if a field has been set. + +### GetError500 + +`func (o *CustomPages) GetError500() CustomPage` + +GetError500 returns the Error500 field if non-nil, zero value otherwise. + +### GetError500Ok + +`func (o *CustomPages) GetError500Ok() (*CustomPage, bool)` + +GetError500Ok returns a tuple with the Error500 field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetError500 + +`func (o *CustomPages) SetError500(v CustomPage)` + +SetError500 sets Error500 field to given value. + +### HasError500 + +`func (o *CustomPages) HasError500() bool` + +HasError500 returns a boolean if a field has been set. + +### GetDdosJs + +`func (o *CustomPages) GetDdosJs() CustomPage` + +GetDdosJs returns the DdosJs field if non-nil, zero value otherwise. + +### GetDdosJsOk + +`func (o *CustomPages) GetDdosJsOk() (*CustomPage, bool)` + +GetDdosJsOk returns a tuple with the DdosJs field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDdosJs + +`func (o *CustomPages) SetDdosJs(v CustomPage)` + +SetDdosJs sets DdosJs field to given value. + +### HasDdosJs + +`func (o *CustomPages) HasDdosJs() bool` + +HasDdosJs returns a boolean if a field has been set. + +### GetDdosCaptcha + +`func (o *CustomPages) GetDdosCaptcha() CustomPage` + +GetDdosCaptcha returns the DdosCaptcha field if non-nil, zero value otherwise. + +### GetDdosCaptchaOk + +`func (o *CustomPages) GetDdosCaptchaOk() (*CustomPage, bool)` + +GetDdosCaptchaOk returns a tuple with the DdosCaptcha field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDdosCaptcha + +`func (o *CustomPages) SetDdosCaptcha(v CustomPage)` + +SetDdosCaptcha sets DdosCaptcha field to given value. + +### HasDdosCaptcha + +`func (o *CustomPages) HasDdosCaptcha() bool` + +HasDdosCaptcha returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/CustomPagesApi.md b/docs/CustomPagesApi.md new file mode 100644 index 0000000..bb3a998 --- /dev/null +++ b/docs/CustomPagesApi.md @@ -0,0 +1,154 @@ +# \CustomPagesApi + +All URIs are relative to *https://napi.arvancloud.ir/cdn/4.0* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CustomPagesGet**](CustomPagesApi.md#CustomPagesGet) | **Get** /domains/{domain}/custom-pages | Get list of custom pages +[**CustomPagesUpdate**](CustomPagesApi.md#CustomPagesUpdate) | **Post** /domains/{domain}/custom-pages | Update custom page + + + +## CustomPagesGet + +> CustomPagesData CustomPagesGet(ctx, domain).Execute() + +Get list of custom pages + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.CustomPagesApi.CustomPagesGet(context.Background(), domain).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `CustomPagesApi.CustomPagesGet``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CustomPagesGet`: CustomPagesData + fmt.Fprintf(os.Stdout, "Response from `CustomPagesApi.CustomPagesGet`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiCustomPagesGetRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**CustomPagesData**](CustomPagesData.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## CustomPagesUpdate + +> MessageResponse CustomPagesUpdate(ctx, domain).Type_(type_).Page(page).Url(url).File(file).Execute() + +Update custom page + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + type_ := "type__example" // string | (optional) + page := "page_example" // string | ddos_js and ddos_captcha can only be used with file type (optional) + url := "url_example" // string | (optional) + file := os.NewFile(1234, "some_file") // *os.File | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.CustomPagesApi.CustomPagesUpdate(context.Background(), domain).Type_(type_).Page(page).Url(url).File(file).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `CustomPagesApi.CustomPagesUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CustomPagesUpdate`: MessageResponse + fmt.Fprintf(os.Stdout, "Response from `CustomPagesApi.CustomPagesUpdate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiCustomPagesUpdateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **type_** | **string** | | + **page** | **string** | ddos_js and ddos_captcha can only be used with file type | + **url** | **string** | | + **file** | ***os.File** | | + +### Return type + +[**MessageResponse**](MessageResponse.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: multipart/form-data +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + diff --git a/docs/CustomPagesData.md b/docs/CustomPagesData.md new file mode 100644 index 0000000..2a608b6 --- /dev/null +++ b/docs/CustomPagesData.md @@ -0,0 +1,56 @@ +# CustomPagesData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**CustomPages**](CustomPages.md) | | [optional] + +## Methods + +### NewCustomPagesData + +`func NewCustomPagesData() *CustomPagesData` + +NewCustomPagesData instantiates a new CustomPagesData object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCustomPagesDataWithDefaults + +`func NewCustomPagesDataWithDefaults() *CustomPagesData` + +NewCustomPagesDataWithDefaults instantiates a new CustomPagesData object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *CustomPagesData) GetData() CustomPages` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *CustomPagesData) GetDataOk() (*CustomPages, 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 *CustomPagesData) SetData(v CustomPages)` + +SetData sets Data field to given value. + +### HasData + +`func (o *CustomPagesData) HasData() bool` + +HasData returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/DDoSApi.md b/docs/DDoSApi.md new file mode 100644 index 0000000..930f3dd --- /dev/null +++ b/docs/DDoSApi.md @@ -0,0 +1,727 @@ +# \DDoSApi + +All URIs are relative to *https://napi.arvancloud.ir/cdn/4.0* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DdosIndex**](DDoSApi.md#DdosIndex) | **Get** /domains/{domain}/ddos | Get DDoS protection settings +[**DdosReprioritize**](DDoSApi.md#DdosReprioritize) | **Post** /domains/{domain}/ddos/actions/reprioritize | Change priority of ddos rules +[**DdosRulesDestroy**](DDoSApi.md#DdosRulesDestroy) | **Delete** /domains/{domain}/ddos/rules/{id} | Delete DDoS protection rule +[**DdosRulesIndex**](DDoSApi.md#DdosRulesIndex) | **Get** /domains/{domain}/ddos/rules | Get DDoS Protection Rules +[**DdosRulesShow**](DDoSApi.md#DdosRulesShow) | **Get** /domains/{domain}/ddos/rules/{id} | Get DDoS protection's rule information +[**DdosRulesStore**](DDoSApi.md#DdosRulesStore) | **Post** /domains/{domain}/ddos/rules | Create new DDoS protection rule +[**DdosRulesUpdate**](DDoSApi.md#DdosRulesUpdate) | **Patch** /domains/{domain}/ddos/rules/{id} | Update the DDoS protection rule +[**DdosSettingsIndex**](DDoSApi.md#DdosSettingsIndex) | **Get** /domains/{domain}/ddos/settings | Get DDoS protection settings +[**DdosSettingsUpdate**](DDoSApi.md#DdosSettingsUpdate) | **Patch** /domains/{domain}/ddos/settings | Update domain's DDoS protection configuration +[**DdosUpdate**](DDoSApi.md#DdosUpdate) | **Patch** /domains/{domain}/ddos | Update domain's DDoS protection configuration + + + +## DdosIndex + +> DdosData DdosIndex(ctx, domain).Execute() + +Get DDoS protection settings + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DDoSApi.DdosIndex(context.Background(), domain).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DDoSApi.DdosIndex``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DdosIndex`: DdosData + fmt.Fprintf(os.Stdout, "Response from `DDoSApi.DdosIndex`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDdosIndexRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**DdosData**](DdosData.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## DdosReprioritize + +> MessageResponse DdosReprioritize(ctx, domain).ReprioritizeRuleRequest(reprioritizeRuleRequest).Execute() + +Change priority of ddos rules + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + reprioritizeRuleRequest := *openapiclient.NewReprioritizeRuleRequest("RuleId_example") // ReprioritizeRuleRequest | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DDoSApi.DdosReprioritize(context.Background(), domain).ReprioritizeRuleRequest(reprioritizeRuleRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DDoSApi.DdosReprioritize``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DdosReprioritize`: MessageResponse + fmt.Fprintf(os.Stdout, "Response from `DDoSApi.DdosReprioritize`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDdosReprioritizeRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **reprioritizeRuleRequest** | [**ReprioritizeRuleRequest**](ReprioritizeRuleRequest.md) | | + +### Return type + +[**MessageResponse**](MessageResponse.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## DdosRulesDestroy + +> MessageResponse DdosRulesDestroy(ctx, domain, id).Execute() + +Delete DDoS protection rule + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DDoSApi.DdosRulesDestroy(context.Background(), domain, id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DDoSApi.DdosRulesDestroy``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DdosRulesDestroy`: MessageResponse + fmt.Fprintf(os.Stdout, "Response from `DDoSApi.DdosRulesDestroy`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | +**id** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDdosRulesDestroyRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + +[**MessageResponse**](MessageResponse.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## DdosRulesIndex + +> DdosRulesIndex200Response DdosRulesIndex(ctx, domain).PerPage(perPage).OrderBy(orderBy).OrderType(orderType).Search(search).Execute() + +Get DDoS Protection Rules + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + perPage := int32(56) // int32 | (optional) + orderBy := "orderBy_example" // string | (optional) + orderType := "orderType_example" // string | (optional) + search := "search_example" // string | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DDoSApi.DdosRulesIndex(context.Background(), domain).PerPage(perPage).OrderBy(orderBy).OrderType(orderType).Search(search).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DDoSApi.DdosRulesIndex``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DdosRulesIndex`: DdosRulesIndex200Response + fmt.Fprintf(os.Stdout, "Response from `DDoSApi.DdosRulesIndex`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDdosRulesIndexRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **perPage** | **int32** | | + **orderBy** | **string** | | + **orderType** | **string** | | + **search** | **string** | | + +### Return type + +[**DdosRulesIndex200Response**](DdosRulesIndex200Response.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## DdosRulesShow + +> DdosRuleData DdosRulesShow(ctx, domain, id).Execute() + +Get DDoS protection's rule information + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DDoSApi.DdosRulesShow(context.Background(), domain, id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DDoSApi.DdosRulesShow``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DdosRulesShow`: DdosRuleData + fmt.Fprintf(os.Stdout, "Response from `DDoSApi.DdosRulesShow`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | +**id** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDdosRulesShowRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + +[**DdosRuleData**](DdosRuleData.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## DdosRulesStore + +> DdosRuleResponse DdosRulesStore(ctx, domain).DdosRule(ddosRule).Execute() + +Create new DDoS protection rule + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + ddosRule := *openapiclient.NewDdosRule() // DdosRule | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DDoSApi.DdosRulesStore(context.Background(), domain).DdosRule(ddosRule).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DDoSApi.DdosRulesStore``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DdosRulesStore`: DdosRuleResponse + fmt.Fprintf(os.Stdout, "Response from `DDoSApi.DdosRulesStore`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDdosRulesStoreRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **ddosRule** | [**DdosRule**](DdosRule.md) | | + +### Return type + +[**DdosRuleResponse**](DdosRuleResponse.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## DdosRulesUpdate + +> DdosRuleResponse DdosRulesUpdate(ctx, domain, id).DdosRule(ddosRule).Execute() + +Update the DDoS protection rule + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | + ddosRule := *openapiclient.NewDdosRule() // DdosRule | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DDoSApi.DdosRulesUpdate(context.Background(), domain, id).DdosRule(ddosRule).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DDoSApi.DdosRulesUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DdosRulesUpdate`: DdosRuleResponse + fmt.Fprintf(os.Stdout, "Response from `DDoSApi.DdosRulesUpdate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | +**id** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDdosRulesUpdateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **ddosRule** | [**DdosRule**](DdosRule.md) | | + +### Return type + +[**DdosRuleResponse**](DdosRuleResponse.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## DdosSettingsIndex + +> DdosSettingsData DdosSettingsIndex(ctx, domain).Execute() + +Get DDoS protection settings + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DDoSApi.DdosSettingsIndex(context.Background(), domain).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DDoSApi.DdosSettingsIndex``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DdosSettingsIndex`: DdosSettingsData + fmt.Fprintf(os.Stdout, "Response from `DDoSApi.DdosSettingsIndex`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDdosSettingsIndexRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**DdosSettingsData**](DdosSettingsData.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## DdosSettingsUpdate + +> DdosSettingsUpdate200Response DdosSettingsUpdate(ctx, domain).DdosSettings(ddosSettings).Execute() + +Update domain's DDoS protection configuration + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + ddosSettings := *openapiclient.NewDdosSettings() // DdosSettings | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DDoSApi.DdosSettingsUpdate(context.Background(), domain).DdosSettings(ddosSettings).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DDoSApi.DdosSettingsUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DdosSettingsUpdate`: DdosSettingsUpdate200Response + fmt.Fprintf(os.Stdout, "Response from `DDoSApi.DdosSettingsUpdate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDdosSettingsUpdateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **ddosSettings** | [**DdosSettings**](DdosSettings.md) | | + +### Return type + +[**DdosSettingsUpdate200Response**](DdosSettingsUpdate200Response.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## DdosUpdate + +> DdosUpdate200Response DdosUpdate(ctx, domain).Ddos(ddos).Execute() + +Update domain's DDoS protection configuration + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + ddos := *openapiclient.NewDdos() // Ddos | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DDoSApi.DdosUpdate(context.Background(), domain).Ddos(ddos).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DDoSApi.DdosUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DdosUpdate`: DdosUpdate200Response + fmt.Fprintf(os.Stdout, "Response from `DDoSApi.DdosUpdate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDdosUpdateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **ddos** | [**Ddos**](Ddos.md) | | + +### Return type + +[**DdosUpdate200Response**](DdosUpdate200Response.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + diff --git a/docs/DKIMRecord.md b/docs/DKIMRecord.md new file mode 100644 index 0000000..a8340aa --- /dev/null +++ b/docs/DKIMRecord.md @@ -0,0 +1,342 @@ +# DKIMRecord + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | Pointer to [**TXTRecordValue**](TXTRecordValue.md) | | [optional] +**Type** | Pointer to **string** | | [optional] [default to "dkim"] +**Id** | Pointer to **string** | | [optional] [readonly] +**Name** | Pointer to **string** | | [optional] +**Ttl** | Pointer to **int32** | | [optional] +**Cloud** | Pointer to **bool** | | [optional] [default to false] +**UpstreamHttps** | Pointer to **string** | | [optional] +**IpFilterMode** | Pointer to [**DnsRecordIpFilterMode**](DnsRecordIpFilterMode.md) | | [optional] +**IsProtected** | Pointer to **bool** | Protected records cannot be modified or deleted by user. | [optional] [readonly] [default to false] +**Usage** | Pointer to **[]string** | | [optional] [readonly] [default to []] +**CreatedAt** | Pointer to **time.Time** | | [optional] [readonly] +**UpdatedAt** | Pointer to **time.Time** | | [optional] [readonly] + +## Methods + +### NewDKIMRecord + +`func NewDKIMRecord() *DKIMRecord` + +NewDKIMRecord instantiates a new DKIMRecord object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDKIMRecordWithDefaults + +`func NewDKIMRecordWithDefaults() *DKIMRecord` + +NewDKIMRecordWithDefaults instantiates a new DKIMRecord object +This 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 *DKIMRecord) GetValue() TXTRecordValue` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *DKIMRecord) GetValueOk() (*TXTRecordValue, 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 *DKIMRecord) SetValue(v TXTRecordValue)` + +SetValue sets Value field to given value. + +### HasValue + +`func (o *DKIMRecord) HasValue() bool` + +HasValue returns a boolean if a field has been set. + +### GetType + +`func (o *DKIMRecord) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *DKIMRecord) 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 *DKIMRecord) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *DKIMRecord) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetId + +`func (o *DKIMRecord) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *DKIMRecord) 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 *DKIMRecord) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *DKIMRecord) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetName + +`func (o *DKIMRecord) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *DKIMRecord) 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 *DKIMRecord) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *DKIMRecord) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetTtl + +`func (o *DKIMRecord) GetTtl() int32` + +GetTtl returns the Ttl field if non-nil, zero value otherwise. + +### GetTtlOk + +`func (o *DKIMRecord) GetTtlOk() (*int32, bool)` + +GetTtlOk returns a tuple with the Ttl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTtl + +`func (o *DKIMRecord) SetTtl(v int32)` + +SetTtl sets Ttl field to given value. + +### HasTtl + +`func (o *DKIMRecord) HasTtl() bool` + +HasTtl returns a boolean if a field has been set. + +### GetCloud + +`func (o *DKIMRecord) GetCloud() bool` + +GetCloud returns the Cloud field if non-nil, zero value otherwise. + +### GetCloudOk + +`func (o *DKIMRecord) GetCloudOk() (*bool, bool)` + +GetCloudOk returns a tuple with the Cloud field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCloud + +`func (o *DKIMRecord) SetCloud(v bool)` + +SetCloud sets Cloud field to given value. + +### HasCloud + +`func (o *DKIMRecord) HasCloud() bool` + +HasCloud returns a boolean if a field has been set. + +### GetUpstreamHttps + +`func (o *DKIMRecord) GetUpstreamHttps() string` + +GetUpstreamHttps returns the UpstreamHttps field if non-nil, zero value otherwise. + +### GetUpstreamHttpsOk + +`func (o *DKIMRecord) GetUpstreamHttpsOk() (*string, bool)` + +GetUpstreamHttpsOk returns a tuple with the UpstreamHttps field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpstreamHttps + +`func (o *DKIMRecord) SetUpstreamHttps(v string)` + +SetUpstreamHttps sets UpstreamHttps field to given value. + +### HasUpstreamHttps + +`func (o *DKIMRecord) HasUpstreamHttps() bool` + +HasUpstreamHttps returns a boolean if a field has been set. + +### GetIpFilterMode + +`func (o *DKIMRecord) GetIpFilterMode() DnsRecordIpFilterMode` + +GetIpFilterMode returns the IpFilterMode field if non-nil, zero value otherwise. + +### GetIpFilterModeOk + +`func (o *DKIMRecord) GetIpFilterModeOk() (*DnsRecordIpFilterMode, bool)` + +GetIpFilterModeOk returns a tuple with the IpFilterMode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIpFilterMode + +`func (o *DKIMRecord) SetIpFilterMode(v DnsRecordIpFilterMode)` + +SetIpFilterMode sets IpFilterMode field to given value. + +### HasIpFilterMode + +`func (o *DKIMRecord) HasIpFilterMode() bool` + +HasIpFilterMode returns a boolean if a field has been set. + +### GetIsProtected + +`func (o *DKIMRecord) GetIsProtected() bool` + +GetIsProtected returns the IsProtected field if non-nil, zero value otherwise. + +### GetIsProtectedOk + +`func (o *DKIMRecord) GetIsProtectedOk() (*bool, bool)` + +GetIsProtectedOk returns a tuple with the IsProtected field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsProtected + +`func (o *DKIMRecord) SetIsProtected(v bool)` + +SetIsProtected sets IsProtected field to given value. + +### HasIsProtected + +`func (o *DKIMRecord) HasIsProtected() bool` + +HasIsProtected returns a boolean if a field has been set. + +### GetUsage + +`func (o *DKIMRecord) GetUsage() []string` + +GetUsage returns the Usage field if non-nil, zero value otherwise. + +### GetUsageOk + +`func (o *DKIMRecord) GetUsageOk() (*[]string, bool)` + +GetUsageOk returns a tuple with the Usage field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUsage + +`func (o *DKIMRecord) SetUsage(v []string)` + +SetUsage sets Usage field to given value. + +### HasUsage + +`func (o *DKIMRecord) HasUsage() bool` + +HasUsage returns a boolean if a field has been set. + +### GetCreatedAt + +`func (o *DKIMRecord) GetCreatedAt() time.Time` + +GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. + +### GetCreatedAtOk + +`func (o *DKIMRecord) GetCreatedAtOk() (*time.Time, bool)` + +GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedAt + +`func (o *DKIMRecord) SetCreatedAt(v time.Time)` + +SetCreatedAt sets CreatedAt field to given value. + +### HasCreatedAt + +`func (o *DKIMRecord) HasCreatedAt() bool` + +HasCreatedAt returns a boolean if a field has been set. + +### GetUpdatedAt + +`func (o *DKIMRecord) GetUpdatedAt() time.Time` + +GetUpdatedAt returns the UpdatedAt field if non-nil, zero value otherwise. + +### GetUpdatedAtOk + +`func (o *DKIMRecord) GetUpdatedAtOk() (*time.Time, bool)` + +GetUpdatedAtOk returns a tuple with the UpdatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpdatedAt + +`func (o *DKIMRecord) SetUpdatedAt(v time.Time)` + +SetUpdatedAt sets UpdatedAt field to given value. + +### HasUpdatedAt + +`func (o *DKIMRecord) HasUpdatedAt() bool` + +HasUpdatedAt returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/DNSManagementApi.md b/docs/DNSManagementApi.md new file mode 100644 index 0000000..403740b --- /dev/null +++ b/docs/DNSManagementApi.md @@ -0,0 +1,659 @@ +# \DNSManagementApi + +All URIs are relative to *https://napi.arvancloud.ir/cdn/4.0* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DnsRecordsCloud**](DNSManagementApi.md#DnsRecordsCloud) | **Put** /domains/{domain}/dns-records/{id}/cloud | Toggle cloud status (To proxy or not proxy, that's the question!) +[**DnsRecordsDestroy**](DNSManagementApi.md#DnsRecordsDestroy) | **Delete** /domains/{domain}/dns-records/{id} | Remove a DNS record +[**DnsRecordsDnsSecShow**](DNSManagementApi.md#DnsRecordsDnsSecShow) | **Get** /domains/{domain}/dns-records/dnssec | Get status of DNSSEC +[**DnsRecordsDnsSecUpdate**](DNSManagementApi.md#DnsRecordsDnsSecUpdate) | **Put** /domains/{domain}/dns-records/dnssec/actions | Update DNSSEC status +[**DnsRecordsImport**](DNSManagementApi.md#DnsRecordsImport) | **Post** /domains/{domain}/dns-records/import | Import DNS records using BIND file +[**DnsRecordsIndex**](DNSManagementApi.md#DnsRecordsIndex) | **Get** /domains/{domain}/dns-records | Get list of DNS records +[**DnsRecordsShow**](DNSManagementApi.md#DnsRecordsShow) | **Get** /domains/{domain}/dns-records/{id} | Get information of a record +[**DnsRecordsStore**](DNSManagementApi.md#DnsRecordsStore) | **Post** /domains/{domain}/dns-records | Create new DNS record +[**DnsRecordsUpdate**](DNSManagementApi.md#DnsRecordsUpdate) | **Put** /domains/{domain}/dns-records/{id} | Update a DNS record + + + +## DnsRecordsCloud + +> DnsRecordResponse DnsRecordsCloud(ctx, domain, id).DnsRecordCloud(dnsRecordCloud).Execute() + +Toggle cloud status (To proxy or not proxy, that's the question!) + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ID of the DNS record + dnsRecordCloud := *openapiclient.NewDnsRecordCloud(false) // DnsRecordCloud | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DNSManagementApi.DnsRecordsCloud(context.Background(), domain, id).DnsRecordCloud(dnsRecordCloud).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DNSManagementApi.DnsRecordsCloud``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DnsRecordsCloud`: DnsRecordResponse + fmt.Fprintf(os.Stdout, "Response from `DNSManagementApi.DnsRecordsCloud`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | +**id** | **string** | ID of the DNS record | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDnsRecordsCloudRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **dnsRecordCloud** | [**DnsRecordCloud**](DnsRecordCloud.md) | | + +### Return type + +[**DnsRecordResponse**](DnsRecordResponse.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## DnsRecordsDestroy + +> MessageResponse DnsRecordsDestroy(ctx, domain, id).Execute() + +Remove a DNS record + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ID of the DNS record + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DNSManagementApi.DnsRecordsDestroy(context.Background(), domain, id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DNSManagementApi.DnsRecordsDestroy``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DnsRecordsDestroy`: MessageResponse + fmt.Fprintf(os.Stdout, "Response from `DNSManagementApi.DnsRecordsDestroy`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | +**id** | **string** | ID of the DNS record | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDnsRecordsDestroyRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + +[**MessageResponse**](MessageResponse.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## DnsRecordsDnsSecShow + +> DnsSecData DnsRecordsDnsSecShow(ctx, domain).Execute() + +Get status of DNSSEC + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DNSManagementApi.DnsRecordsDnsSecShow(context.Background(), domain).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DNSManagementApi.DnsRecordsDnsSecShow``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DnsRecordsDnsSecShow`: DnsSecData + fmt.Fprintf(os.Stdout, "Response from `DNSManagementApi.DnsRecordsDnsSecShow`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDnsRecordsDnsSecShowRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**DnsSecData**](DnsSecData.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## DnsRecordsDnsSecUpdate + +> DnsSecData DnsRecordsDnsSecUpdate(ctx, domain).DnsSecStatus(dnsSecStatus).Execute() + +Update DNSSEC status + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + dnsSecStatus := *openapiclient.NewDnsSecStatus(false) // DnsSecStatus | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DNSManagementApi.DnsRecordsDnsSecUpdate(context.Background(), domain).DnsSecStatus(dnsSecStatus).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DNSManagementApi.DnsRecordsDnsSecUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DnsRecordsDnsSecUpdate`: DnsSecData + fmt.Fprintf(os.Stdout, "Response from `DNSManagementApi.DnsRecordsDnsSecUpdate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDnsRecordsDnsSecUpdateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **dnsSecStatus** | [**DnsSecStatus**](DnsSecStatus.md) | | + +### Return type + +[**DnsSecData**](DnsSecData.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## DnsRecordsImport + +> MessageResponse DnsRecordsImport(ctx, domain).FZoneFile(fZoneFile).Execute() + +Import DNS records using BIND file + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + fZoneFile := os.NewFile(1234, "some_file") // *os.File | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DNSManagementApi.DnsRecordsImport(context.Background(), domain).FZoneFile(fZoneFile).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DNSManagementApi.DnsRecordsImport``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DnsRecordsImport`: MessageResponse + fmt.Fprintf(os.Stdout, "Response from `DNSManagementApi.DnsRecordsImport`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDnsRecordsImportRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **fZoneFile** | ***os.File** | | + +### Return type + +[**MessageResponse**](MessageResponse.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: multipart/form-data +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## DnsRecordsIndex + +> DnsRecordsIndex200Response DnsRecordsIndex(ctx, domain).Search(search).Type_(type_).Page(page).PerPage(perPage).Execute() + +Get list of DNS records + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + search := "search_example" // string | Search term (optional) + type_ := "a,cname,txt" // string | Type of a dns record. To filter multiple types separate them using a comma (optional) + page := int32(56) // int32 | Set the desired page number (optional) (default to 1) + perPage := int32(56) // int32 | Set how many items returned per page (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DNSManagementApi.DnsRecordsIndex(context.Background(), domain).Search(search).Type_(type_).Page(page).PerPage(perPage).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DNSManagementApi.DnsRecordsIndex``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DnsRecordsIndex`: DnsRecordsIndex200Response + fmt.Fprintf(os.Stdout, "Response from `DNSManagementApi.DnsRecordsIndex`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDnsRecordsIndexRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **search** | **string** | Search term | + **type_** | **string** | Type of a dns record. To filter multiple types separate them using a comma | + **page** | **int32** | Set the desired page number | [default to 1] + **perPage** | **int32** | Set how many items returned per page | + +### Return type + +[**DnsRecordsIndex200Response**](DnsRecordsIndex200Response.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## DnsRecordsShow + +> DnsRecordData DnsRecordsShow(ctx, domain, id).Execute() + +Get information of a record + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ID of the DNS record + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DNSManagementApi.DnsRecordsShow(context.Background(), domain, id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DNSManagementApi.DnsRecordsShow``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DnsRecordsShow`: DnsRecordData + fmt.Fprintf(os.Stdout, "Response from `DNSManagementApi.DnsRecordsShow`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | +**id** | **string** | ID of the DNS record | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDnsRecordsShowRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + +[**DnsRecordData**](DnsRecordData.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## DnsRecordsStore + +> DnsRecordResponse DnsRecordsStore(ctx, domain).DnsRecord(dnsRecord).Execute() + +Create new DNS record + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + dnsRecord := openapiclient.DnsRecord{AAAARecord: openapiclient.NewAAAARecord()} // DnsRecord | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DNSManagementApi.DnsRecordsStore(context.Background(), domain).DnsRecord(dnsRecord).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DNSManagementApi.DnsRecordsStore``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DnsRecordsStore`: DnsRecordResponse + fmt.Fprintf(os.Stdout, "Response from `DNSManagementApi.DnsRecordsStore`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDnsRecordsStoreRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **dnsRecord** | [**DnsRecord**](DnsRecord.md) | | + +### Return type + +[**DnsRecordResponse**](DnsRecordResponse.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## DnsRecordsUpdate + +> DnsRecordResponse DnsRecordsUpdate(ctx, domain, id).DnsRecord(dnsRecord).Execute() + +Update a DNS record + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ID of the DNS record + dnsRecord := openapiclient.DnsRecord{AAAARecord: openapiclient.NewAAAARecord()} // DnsRecord | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DNSManagementApi.DnsRecordsUpdate(context.Background(), domain, id).DnsRecord(dnsRecord).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DNSManagementApi.DnsRecordsUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DnsRecordsUpdate`: DnsRecordResponse + fmt.Fprintf(os.Stdout, "Response from `DNSManagementApi.DnsRecordsUpdate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | +**id** | **string** | ID of the DNS record | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDnsRecordsUpdateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **dnsRecord** | [**DnsRecord**](DnsRecord.md) | | + +### Return type + +[**DnsRecordResponse**](DnsRecordResponse.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + diff --git a/docs/DataResponse.md b/docs/DataResponse.md new file mode 100644 index 0000000..8090a12 --- /dev/null +++ b/docs/DataResponse.md @@ -0,0 +1,66 @@ +# DataResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to **map[string]interface{}** | | [optional] + +## Methods + +### NewDataResponse + +`func NewDataResponse() *DataResponse` + +NewDataResponse instantiates a new DataResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDataResponseWithDefaults + +`func NewDataResponseWithDefaults() *DataResponse` + +NewDataResponseWithDefaults instantiates a new DataResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *DataResponse) GetData() map[string]interface{}` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *DataResponse) GetDataOk() (*map[string]interface{}, 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 *DataResponse) SetData(v map[string]interface{})` + +SetData sets Data field to given value. + +### HasData + +`func (o *DataResponse) HasData() bool` + +HasData returns a boolean if a field has been set. + +### SetDataNil + +`func (o *DataResponse) SetDataNil(b bool)` + + SetDataNil sets the value for Data to be an explicit nil + +### UnsetData +`func (o *DataResponse) UnsetData()` + +UnsetData ensures that no value is present for Data, not even an explicit nil + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/DataWithMessageResponse.md b/docs/DataWithMessageResponse.md new file mode 100644 index 0000000..36f5c6a --- /dev/null +++ b/docs/DataWithMessageResponse.md @@ -0,0 +1,102 @@ +# DataWithMessageResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | Pointer to **NullableString** | | [optional] +**Data** | Pointer to **map[string]interface{}** | | [optional] + +## Methods + +### NewDataWithMessageResponse + +`func NewDataWithMessageResponse() *DataWithMessageResponse` + +NewDataWithMessageResponse instantiates a new DataWithMessageResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDataWithMessageResponseWithDefaults + +`func NewDataWithMessageResponseWithDefaults() *DataWithMessageResponse` + +NewDataWithMessageResponseWithDefaults instantiates a new DataWithMessageResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetMessage + +`func (o *DataWithMessageResponse) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *DataWithMessageResponse) GetMessageOk() (*string, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessage + +`func (o *DataWithMessageResponse) SetMessage(v string)` + +SetMessage sets Message field to given value. + +### HasMessage + +`func (o *DataWithMessageResponse) HasMessage() bool` + +HasMessage returns a boolean if a field has been set. + +### SetMessageNil + +`func (o *DataWithMessageResponse) SetMessageNil(b bool)` + + SetMessageNil sets the value for Message to be an explicit nil + +### UnsetMessage +`func (o *DataWithMessageResponse) UnsetMessage()` + +UnsetMessage ensures that no value is present for Message, not even an explicit nil +### GetData + +`func (o *DataWithMessageResponse) GetData() map[string]interface{}` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *DataWithMessageResponse) GetDataOk() (*map[string]interface{}, 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 *DataWithMessageResponse) SetData(v map[string]interface{})` + +SetData sets Data field to given value. + +### HasData + +`func (o *DataWithMessageResponse) HasData() bool` + +HasData returns a boolean if a field has been set. + +### SetDataNil + +`func (o *DataWithMessageResponse) SetDataNil(b bool)` + + SetDataNil sets the value for Data to be an explicit nil + +### UnsetData +`func (o *DataWithMessageResponse) UnsetData()` + +UnsetData ensures that no value is present for Data, not even an explicit nil + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/Ddos.md b/docs/Ddos.md new file mode 100644 index 0000000..cded8aa --- /dev/null +++ b/docs/Ddos.md @@ -0,0 +1,212 @@ +# Ddos + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**IsEnabled** | Pointer to **bool** | | [optional] [readonly] +**ProtectionMode** | Pointer to **string** | | [optional] +**CaptchaService** | Pointer to **string** | | [optional] +**Ttl** | Pointer to **int32** | Time in seconds for cookie max-age | [optional] +**HttpsOnly** | Pointer to **bool** | Adds \"SameSite=None; Secure\" to set-cookie header | [optional] +**Preflight** | Pointer to [**DdosPreflight**](DdosPreflight.md) | | [optional] +**Rules** | Pointer to [**[]DdosRule**](DdosRule.md) | | [optional] [readonly] + +## Methods + +### NewDdos + +`func NewDdos() *Ddos` + +NewDdos instantiates a new Ddos object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDdosWithDefaults + +`func NewDdosWithDefaults() *Ddos` + +NewDdosWithDefaults instantiates a new Ddos object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetIsEnabled + +`func (o *Ddos) GetIsEnabled() bool` + +GetIsEnabled returns the IsEnabled field if non-nil, zero value otherwise. + +### GetIsEnabledOk + +`func (o *Ddos) GetIsEnabledOk() (*bool, bool)` + +GetIsEnabledOk returns a tuple with the IsEnabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsEnabled + +`func (o *Ddos) SetIsEnabled(v bool)` + +SetIsEnabled sets IsEnabled field to given value. + +### HasIsEnabled + +`func (o *Ddos) HasIsEnabled() bool` + +HasIsEnabled returns a boolean if a field has been set. + +### GetProtectionMode + +`func (o *Ddos) GetProtectionMode() string` + +GetProtectionMode returns the ProtectionMode field if non-nil, zero value otherwise. + +### GetProtectionModeOk + +`func (o *Ddos) GetProtectionModeOk() (*string, bool)` + +GetProtectionModeOk returns a tuple with the ProtectionMode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProtectionMode + +`func (o *Ddos) SetProtectionMode(v string)` + +SetProtectionMode sets ProtectionMode field to given value. + +### HasProtectionMode + +`func (o *Ddos) HasProtectionMode() bool` + +HasProtectionMode returns a boolean if a field has been set. + +### GetCaptchaService + +`func (o *Ddos) GetCaptchaService() string` + +GetCaptchaService returns the CaptchaService field if non-nil, zero value otherwise. + +### GetCaptchaServiceOk + +`func (o *Ddos) GetCaptchaServiceOk() (*string, bool)` + +GetCaptchaServiceOk returns a tuple with the CaptchaService field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCaptchaService + +`func (o *Ddos) SetCaptchaService(v string)` + +SetCaptchaService sets CaptchaService field to given value. + +### HasCaptchaService + +`func (o *Ddos) HasCaptchaService() bool` + +HasCaptchaService returns a boolean if a field has been set. + +### GetTtl + +`func (o *Ddos) GetTtl() int32` + +GetTtl returns the Ttl field if non-nil, zero value otherwise. + +### GetTtlOk + +`func (o *Ddos) GetTtlOk() (*int32, bool)` + +GetTtlOk returns a tuple with the Ttl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTtl + +`func (o *Ddos) SetTtl(v int32)` + +SetTtl sets Ttl field to given value. + +### HasTtl + +`func (o *Ddos) HasTtl() bool` + +HasTtl returns a boolean if a field has been set. + +### GetHttpsOnly + +`func (o *Ddos) GetHttpsOnly() bool` + +GetHttpsOnly returns the HttpsOnly field if non-nil, zero value otherwise. + +### GetHttpsOnlyOk + +`func (o *Ddos) GetHttpsOnlyOk() (*bool, bool)` + +GetHttpsOnlyOk returns a tuple with the HttpsOnly field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHttpsOnly + +`func (o *Ddos) SetHttpsOnly(v bool)` + +SetHttpsOnly sets HttpsOnly field to given value. + +### HasHttpsOnly + +`func (o *Ddos) HasHttpsOnly() bool` + +HasHttpsOnly returns a boolean if a field has been set. + +### GetPreflight + +`func (o *Ddos) GetPreflight() DdosPreflight` + +GetPreflight returns the Preflight field if non-nil, zero value otherwise. + +### GetPreflightOk + +`func (o *Ddos) GetPreflightOk() (*DdosPreflight, bool)` + +GetPreflightOk returns a tuple with the Preflight field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPreflight + +`func (o *Ddos) SetPreflight(v DdosPreflight)` + +SetPreflight sets Preflight field to given value. + +### HasPreflight + +`func (o *Ddos) HasPreflight() bool` + +HasPreflight returns a boolean if a field has been set. + +### GetRules + +`func (o *Ddos) GetRules() []DdosRule` + +GetRules returns the Rules field if non-nil, zero value otherwise. + +### GetRulesOk + +`func (o *Ddos) GetRulesOk() (*[]DdosRule, bool)` + +GetRulesOk returns a tuple with the Rules field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRules + +`func (o *Ddos) SetRules(v []DdosRule)` + +SetRules sets Rules field to given value. + +### HasRules + +`func (o *Ddos) HasRules() bool` + +HasRules returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/DdosData.md b/docs/DdosData.md new file mode 100644 index 0000000..0f163d7 --- /dev/null +++ b/docs/DdosData.md @@ -0,0 +1,92 @@ +# DdosData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**Ddos**](Ddos.md) | | [optional] +**Message** | Pointer to **NullableString** | | [optional] + +## Methods + +### NewDdosData + +`func NewDdosData() *DdosData` + +NewDdosData instantiates a new DdosData object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDdosDataWithDefaults + +`func NewDdosDataWithDefaults() *DdosData` + +NewDdosDataWithDefaults instantiates a new DdosData object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *DdosData) GetData() Ddos` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *DdosData) GetDataOk() (*Ddos, 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 *DdosData) SetData(v Ddos)` + +SetData sets Data field to given value. + +### HasData + +`func (o *DdosData) HasData() bool` + +HasData returns a boolean if a field has been set. + +### GetMessage + +`func (o *DdosData) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *DdosData) GetMessageOk() (*string, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessage + +`func (o *DdosData) SetMessage(v string)` + +SetMessage sets Message field to given value. + +### HasMessage + +`func (o *DdosData) HasMessage() bool` + +HasMessage returns a boolean if a field has been set. + +### SetMessageNil + +`func (o *DdosData) SetMessageNil(b bool)` + + SetMessageNil sets the value for Message to be an explicit nil + +### UnsetMessage +`func (o *DdosData) UnsetMessage()` + +UnsetMessage ensures that no value is present for Message, not even an explicit nil + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/DdosPreflight.md b/docs/DdosPreflight.md new file mode 100644 index 0000000..377ced3 --- /dev/null +++ b/docs/DdosPreflight.md @@ -0,0 +1,160 @@ +# DdosPreflight + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccessOrigin** | Pointer to **string** | | [optional] +**AccessCredentials** | Pointer to **string** | | [optional] +**AccessMethods** | Pointer to **[]string** | | [optional] +**AccessHeaders** | Pointer to **string** | | [optional] +**AccessExposeHeaders** | Pointer to **string** | | [optional] + +## Methods + +### NewDdosPreflight + +`func NewDdosPreflight() *DdosPreflight` + +NewDdosPreflight instantiates a new DdosPreflight object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDdosPreflightWithDefaults + +`func NewDdosPreflightWithDefaults() *DdosPreflight` + +NewDdosPreflightWithDefaults instantiates a new DdosPreflight object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetAccessOrigin + +`func (o *DdosPreflight) GetAccessOrigin() string` + +GetAccessOrigin returns the AccessOrigin field if non-nil, zero value otherwise. + +### GetAccessOriginOk + +`func (o *DdosPreflight) GetAccessOriginOk() (*string, bool)` + +GetAccessOriginOk returns a tuple with the AccessOrigin field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccessOrigin + +`func (o *DdosPreflight) SetAccessOrigin(v string)` + +SetAccessOrigin sets AccessOrigin field to given value. + +### HasAccessOrigin + +`func (o *DdosPreflight) HasAccessOrigin() bool` + +HasAccessOrigin returns a boolean if a field has been set. + +### GetAccessCredentials + +`func (o *DdosPreflight) GetAccessCredentials() string` + +GetAccessCredentials returns the AccessCredentials field if non-nil, zero value otherwise. + +### GetAccessCredentialsOk + +`func (o *DdosPreflight) GetAccessCredentialsOk() (*string, bool)` + +GetAccessCredentialsOk returns a tuple with the AccessCredentials field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccessCredentials + +`func (o *DdosPreflight) SetAccessCredentials(v string)` + +SetAccessCredentials sets AccessCredentials field to given value. + +### HasAccessCredentials + +`func (o *DdosPreflight) HasAccessCredentials() bool` + +HasAccessCredentials returns a boolean if a field has been set. + +### GetAccessMethods + +`func (o *DdosPreflight) GetAccessMethods() []string` + +GetAccessMethods returns the AccessMethods field if non-nil, zero value otherwise. + +### GetAccessMethodsOk + +`func (o *DdosPreflight) GetAccessMethodsOk() (*[]string, bool)` + +GetAccessMethodsOk returns a tuple with the AccessMethods field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccessMethods + +`func (o *DdosPreflight) SetAccessMethods(v []string)` + +SetAccessMethods sets AccessMethods field to given value. + +### HasAccessMethods + +`func (o *DdosPreflight) HasAccessMethods() bool` + +HasAccessMethods returns a boolean if a field has been set. + +### GetAccessHeaders + +`func (o *DdosPreflight) GetAccessHeaders() string` + +GetAccessHeaders returns the AccessHeaders field if non-nil, zero value otherwise. + +### GetAccessHeadersOk + +`func (o *DdosPreflight) GetAccessHeadersOk() (*string, bool)` + +GetAccessHeadersOk returns a tuple with the AccessHeaders field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccessHeaders + +`func (o *DdosPreflight) SetAccessHeaders(v string)` + +SetAccessHeaders sets AccessHeaders field to given value. + +### HasAccessHeaders + +`func (o *DdosPreflight) HasAccessHeaders() bool` + +HasAccessHeaders returns a boolean if a field has been set. + +### GetAccessExposeHeaders + +`func (o *DdosPreflight) GetAccessExposeHeaders() string` + +GetAccessExposeHeaders returns the AccessExposeHeaders field if non-nil, zero value otherwise. + +### GetAccessExposeHeadersOk + +`func (o *DdosPreflight) GetAccessExposeHeadersOk() (*string, bool)` + +GetAccessExposeHeadersOk returns a tuple with the AccessExposeHeaders field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccessExposeHeaders + +`func (o *DdosPreflight) SetAccessExposeHeaders(v string)` + +SetAccessExposeHeaders sets AccessExposeHeaders field to given value. + +### HasAccessExposeHeaders + +`func (o *DdosPreflight) HasAccessExposeHeaders() bool` + +HasAccessExposeHeaders returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/DdosRule.md b/docs/DdosRule.md new file mode 100644 index 0000000..50291af --- /dev/null +++ b/docs/DdosRule.md @@ -0,0 +1,186 @@ +# DdosRule + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **string** | | [optional] [readonly] +**UrlPattern** | Pointer to **string** | - `?` matches any single character. - `*` matches any (possibly empty) sequence of characters. - `**` matches the current directory and arbitrary subdirectories. This sequence must form a single path component, so both `**a` and `b**` are invalid and will result in an error. A sequence of more than two consecutive `*` characters is also invalid. - `[...]` matches any character inside the brackets. Character sequences can also specify ranges of characters, as ordered by Unicode, so e.g. `[0-9]` specifies any character between 0 and 9 inclusive. An unclosed bracket is invalid. - `[!...]` is the negation of `[...]`, i.e. it matches any characters not in the brackets. - The metacharacters `?`, `*`, `[`, `] `can be matched by using brackets (e.g. `[?]`). When a `]` occurs immediately following `[` or `[!` then it is interpreted as being part of, rather then ending, the character set, so `]` and NOT `]` can be matched by `[]]` and `[!]]` respectively. The - character can be specified inside a character sequence pattern by placing it at the start or the end, e.g. `[abc-]`. | [optional] +**Sources** | Pointer to **[]string** | | [optional] +**Description** | Pointer to **string** | | [optional] +**Action** | Pointer to **string** | | [optional] +**IsEnabled** | Pointer to **bool** | | [optional] + +## Methods + +### NewDdosRule + +`func NewDdosRule() *DdosRule` + +NewDdosRule instantiates a new DdosRule object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDdosRuleWithDefaults + +`func NewDdosRuleWithDefaults() *DdosRule` + +NewDdosRuleWithDefaults instantiates a new DdosRule object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *DdosRule) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *DdosRule) 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 *DdosRule) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *DdosRule) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetUrlPattern + +`func (o *DdosRule) GetUrlPattern() string` + +GetUrlPattern returns the UrlPattern field if non-nil, zero value otherwise. + +### GetUrlPatternOk + +`func (o *DdosRule) GetUrlPatternOk() (*string, bool)` + +GetUrlPatternOk returns a tuple with the UrlPattern field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUrlPattern + +`func (o *DdosRule) SetUrlPattern(v string)` + +SetUrlPattern sets UrlPattern field to given value. + +### HasUrlPattern + +`func (o *DdosRule) HasUrlPattern() bool` + +HasUrlPattern returns a boolean if a field has been set. + +### GetSources + +`func (o *DdosRule) GetSources() []string` + +GetSources returns the Sources field if non-nil, zero value otherwise. + +### GetSourcesOk + +`func (o *DdosRule) GetSourcesOk() (*[]string, 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 *DdosRule) SetSources(v []string)` + +SetSources sets Sources field to given value. + +### HasSources + +`func (o *DdosRule) HasSources() bool` + +HasSources returns a boolean if a field has been set. + +### GetDescription + +`func (o *DdosRule) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *DdosRule) 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 *DdosRule) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *DdosRule) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetAction + +`func (o *DdosRule) GetAction() string` + +GetAction returns the Action field if non-nil, zero value otherwise. + +### GetActionOk + +`func (o *DdosRule) GetActionOk() (*string, bool)` + +GetActionOk returns a tuple with the Action field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAction + +`func (o *DdosRule) SetAction(v string)` + +SetAction sets Action field to given value. + +### HasAction + +`func (o *DdosRule) HasAction() bool` + +HasAction returns a boolean if a field has been set. + +### GetIsEnabled + +`func (o *DdosRule) GetIsEnabled() bool` + +GetIsEnabled returns the IsEnabled field if non-nil, zero value otherwise. + +### GetIsEnabledOk + +`func (o *DdosRule) GetIsEnabledOk() (*bool, bool)` + +GetIsEnabledOk returns a tuple with the IsEnabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsEnabled + +`func (o *DdosRule) SetIsEnabled(v bool)` + +SetIsEnabled sets IsEnabled field to given value. + +### HasIsEnabled + +`func (o *DdosRule) HasIsEnabled() bool` + +HasIsEnabled returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/DdosRuleData.md b/docs/DdosRuleData.md new file mode 100644 index 0000000..c0160ab --- /dev/null +++ b/docs/DdosRuleData.md @@ -0,0 +1,56 @@ +# DdosRuleData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**DdosRule**](DdosRule.md) | | [optional] + +## Methods + +### NewDdosRuleData + +`func NewDdosRuleData() *DdosRuleData` + +NewDdosRuleData instantiates a new DdosRuleData object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDdosRuleDataWithDefaults + +`func NewDdosRuleDataWithDefaults() *DdosRuleData` + +NewDdosRuleDataWithDefaults instantiates a new DdosRuleData object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *DdosRuleData) GetData() DdosRule` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *DdosRuleData) GetDataOk() (*DdosRule, 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 *DdosRuleData) SetData(v DdosRule)` + +SetData sets Data field to given value. + +### HasData + +`func (o *DdosRuleData) HasData() bool` + +HasData returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/DdosRuleResponse.md b/docs/DdosRuleResponse.md new file mode 100644 index 0000000..f4310d9 --- /dev/null +++ b/docs/DdosRuleResponse.md @@ -0,0 +1,92 @@ +# DdosRuleResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**DdosRule**](DdosRule.md) | | [optional] +**Message** | Pointer to **NullableString** | | [optional] + +## Methods + +### NewDdosRuleResponse + +`func NewDdosRuleResponse() *DdosRuleResponse` + +NewDdosRuleResponse instantiates a new DdosRuleResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDdosRuleResponseWithDefaults + +`func NewDdosRuleResponseWithDefaults() *DdosRuleResponse` + +NewDdosRuleResponseWithDefaults instantiates a new DdosRuleResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *DdosRuleResponse) GetData() DdosRule` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *DdosRuleResponse) GetDataOk() (*DdosRule, 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 *DdosRuleResponse) SetData(v DdosRule)` + +SetData sets Data field to given value. + +### HasData + +`func (o *DdosRuleResponse) HasData() bool` + +HasData returns a boolean if a field has been set. + +### GetMessage + +`func (o *DdosRuleResponse) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *DdosRuleResponse) GetMessageOk() (*string, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessage + +`func (o *DdosRuleResponse) SetMessage(v string)` + +SetMessage sets Message field to given value. + +### HasMessage + +`func (o *DdosRuleResponse) HasMessage() bool` + +HasMessage returns a boolean if a field has been set. + +### SetMessageNil + +`func (o *DdosRuleResponse) SetMessageNil(b bool)` + + SetMessageNil sets the value for Message to be an explicit nil + +### UnsetMessage +`func (o *DdosRuleResponse) UnsetMessage()` + +UnsetMessage ensures that no value is present for Message, not even an explicit nil + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/DdosRulesIndex200Response.md b/docs/DdosRulesIndex200Response.md new file mode 100644 index 0000000..f5775aa --- /dev/null +++ b/docs/DdosRulesIndex200Response.md @@ -0,0 +1,108 @@ +# DdosRulesIndex200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**[]DdosRule**](DdosRule.md) | | [optional] +**Links** | Pointer to [**PaginatedResponseLinks**](PaginatedResponseLinks.md) | | [optional] +**Meta** | Pointer to [**PaginatedResponseMeta**](PaginatedResponseMeta.md) | | [optional] + +## Methods + +### NewDdosRulesIndex200Response + +`func NewDdosRulesIndex200Response() *DdosRulesIndex200Response` + +NewDdosRulesIndex200Response instantiates a new DdosRulesIndex200Response object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDdosRulesIndex200ResponseWithDefaults + +`func NewDdosRulesIndex200ResponseWithDefaults() *DdosRulesIndex200Response` + +NewDdosRulesIndex200ResponseWithDefaults instantiates a new DdosRulesIndex200Response object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *DdosRulesIndex200Response) GetData() []DdosRule` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *DdosRulesIndex200Response) GetDataOk() (*[]DdosRule, 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 *DdosRulesIndex200Response) SetData(v []DdosRule)` + +SetData sets Data field to given value. + +### HasData + +`func (o *DdosRulesIndex200Response) HasData() bool` + +HasData returns a boolean if a field has been set. + +### GetLinks + +`func (o *DdosRulesIndex200Response) GetLinks() PaginatedResponseLinks` + +GetLinks returns the Links field if non-nil, zero value otherwise. + +### GetLinksOk + +`func (o *DdosRulesIndex200Response) GetLinksOk() (*PaginatedResponseLinks, bool)` + +GetLinksOk returns a tuple with the Links field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLinks + +`func (o *DdosRulesIndex200Response) SetLinks(v PaginatedResponseLinks)` + +SetLinks sets Links field to given value. + +### HasLinks + +`func (o *DdosRulesIndex200Response) HasLinks() bool` + +HasLinks returns a boolean if a field has been set. + +### GetMeta + +`func (o *DdosRulesIndex200Response) GetMeta() PaginatedResponseMeta` + +GetMeta returns the Meta field if non-nil, zero value otherwise. + +### GetMetaOk + +`func (o *DdosRulesIndex200Response) GetMetaOk() (*PaginatedResponseMeta, bool)` + +GetMetaOk returns a tuple with the Meta field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMeta + +`func (o *DdosRulesIndex200Response) SetMeta(v PaginatedResponseMeta)` + +SetMeta sets Meta field to given value. + +### HasMeta + +`func (o *DdosRulesIndex200Response) HasMeta() bool` + +HasMeta returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/DdosSettings.md b/docs/DdosSettings.md new file mode 100644 index 0000000..1db0a96 --- /dev/null +++ b/docs/DdosSettings.md @@ -0,0 +1,186 @@ +# DdosSettings + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**IsEnabled** | Pointer to **bool** | | [optional] [readonly] +**ProtectionMode** | Pointer to **string** | | [optional] +**CaptchaService** | Pointer to **string** | | [optional] +**Ttl** | Pointer to **int32** | Time in seconds for cookie max-age | [optional] +**HttpsOnly** | Pointer to **bool** | Adds \"SameSite=None; Secure\" to set-cookie header | [optional] +**Preflight** | Pointer to [**DdosPreflight**](DdosPreflight.md) | | [optional] + +## Methods + +### NewDdosSettings + +`func NewDdosSettings() *DdosSettings` + +NewDdosSettings instantiates a new DdosSettings object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDdosSettingsWithDefaults + +`func NewDdosSettingsWithDefaults() *DdosSettings` + +NewDdosSettingsWithDefaults instantiates a new DdosSettings object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetIsEnabled + +`func (o *DdosSettings) GetIsEnabled() bool` + +GetIsEnabled returns the IsEnabled field if non-nil, zero value otherwise. + +### GetIsEnabledOk + +`func (o *DdosSettings) GetIsEnabledOk() (*bool, bool)` + +GetIsEnabledOk returns a tuple with the IsEnabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsEnabled + +`func (o *DdosSettings) SetIsEnabled(v bool)` + +SetIsEnabled sets IsEnabled field to given value. + +### HasIsEnabled + +`func (o *DdosSettings) HasIsEnabled() bool` + +HasIsEnabled returns a boolean if a field has been set. + +### GetProtectionMode + +`func (o *DdosSettings) GetProtectionMode() string` + +GetProtectionMode returns the ProtectionMode field if non-nil, zero value otherwise. + +### GetProtectionModeOk + +`func (o *DdosSettings) GetProtectionModeOk() (*string, bool)` + +GetProtectionModeOk returns a tuple with the ProtectionMode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProtectionMode + +`func (o *DdosSettings) SetProtectionMode(v string)` + +SetProtectionMode sets ProtectionMode field to given value. + +### HasProtectionMode + +`func (o *DdosSettings) HasProtectionMode() bool` + +HasProtectionMode returns a boolean if a field has been set. + +### GetCaptchaService + +`func (o *DdosSettings) GetCaptchaService() string` + +GetCaptchaService returns the CaptchaService field if non-nil, zero value otherwise. + +### GetCaptchaServiceOk + +`func (o *DdosSettings) GetCaptchaServiceOk() (*string, bool)` + +GetCaptchaServiceOk returns a tuple with the CaptchaService field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCaptchaService + +`func (o *DdosSettings) SetCaptchaService(v string)` + +SetCaptchaService sets CaptchaService field to given value. + +### HasCaptchaService + +`func (o *DdosSettings) HasCaptchaService() bool` + +HasCaptchaService returns a boolean if a field has been set. + +### GetTtl + +`func (o *DdosSettings) GetTtl() int32` + +GetTtl returns the Ttl field if non-nil, zero value otherwise. + +### GetTtlOk + +`func (o *DdosSettings) GetTtlOk() (*int32, bool)` + +GetTtlOk returns a tuple with the Ttl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTtl + +`func (o *DdosSettings) SetTtl(v int32)` + +SetTtl sets Ttl field to given value. + +### HasTtl + +`func (o *DdosSettings) HasTtl() bool` + +HasTtl returns a boolean if a field has been set. + +### GetHttpsOnly + +`func (o *DdosSettings) GetHttpsOnly() bool` + +GetHttpsOnly returns the HttpsOnly field if non-nil, zero value otherwise. + +### GetHttpsOnlyOk + +`func (o *DdosSettings) GetHttpsOnlyOk() (*bool, bool)` + +GetHttpsOnlyOk returns a tuple with the HttpsOnly field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHttpsOnly + +`func (o *DdosSettings) SetHttpsOnly(v bool)` + +SetHttpsOnly sets HttpsOnly field to given value. + +### HasHttpsOnly + +`func (o *DdosSettings) HasHttpsOnly() bool` + +HasHttpsOnly returns a boolean if a field has been set. + +### GetPreflight + +`func (o *DdosSettings) GetPreflight() DdosPreflight` + +GetPreflight returns the Preflight field if non-nil, zero value otherwise. + +### GetPreflightOk + +`func (o *DdosSettings) GetPreflightOk() (*DdosPreflight, bool)` + +GetPreflightOk returns a tuple with the Preflight field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPreflight + +`func (o *DdosSettings) SetPreflight(v DdosPreflight)` + +SetPreflight sets Preflight field to given value. + +### HasPreflight + +`func (o *DdosSettings) HasPreflight() bool` + +HasPreflight returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/DdosSettingsData.md b/docs/DdosSettingsData.md new file mode 100644 index 0000000..1f39876 --- /dev/null +++ b/docs/DdosSettingsData.md @@ -0,0 +1,92 @@ +# DdosSettingsData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**DdosSettings**](DdosSettings.md) | | [optional] +**Message** | Pointer to **NullableString** | | [optional] + +## Methods + +### NewDdosSettingsData + +`func NewDdosSettingsData() *DdosSettingsData` + +NewDdosSettingsData instantiates a new DdosSettingsData object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDdosSettingsDataWithDefaults + +`func NewDdosSettingsDataWithDefaults() *DdosSettingsData` + +NewDdosSettingsDataWithDefaults instantiates a new DdosSettingsData object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *DdosSettingsData) GetData() DdosSettings` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *DdosSettingsData) GetDataOk() (*DdosSettings, 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 *DdosSettingsData) SetData(v DdosSettings)` + +SetData sets Data field to given value. + +### HasData + +`func (o *DdosSettingsData) HasData() bool` + +HasData returns a boolean if a field has been set. + +### GetMessage + +`func (o *DdosSettingsData) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *DdosSettingsData) GetMessageOk() (*string, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessage + +`func (o *DdosSettingsData) SetMessage(v string)` + +SetMessage sets Message field to given value. + +### HasMessage + +`func (o *DdosSettingsData) HasMessage() bool` + +HasMessage returns a boolean if a field has been set. + +### SetMessageNil + +`func (o *DdosSettingsData) SetMessageNil(b bool)` + + SetMessageNil sets the value for Message to be an explicit nil + +### UnsetMessage +`func (o *DdosSettingsData) UnsetMessage()` + +UnsetMessage ensures that no value is present for Message, not even an explicit nil + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/DdosSettingsUpdate200Response.md b/docs/DdosSettingsUpdate200Response.md new file mode 100644 index 0000000..dda4a13 --- /dev/null +++ b/docs/DdosSettingsUpdate200Response.md @@ -0,0 +1,92 @@ +# DdosSettingsUpdate200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**DdosSettings**](DdosSettings.md) | | [optional] +**Message** | Pointer to **NullableString** | | [optional] + +## Methods + +### NewDdosSettingsUpdate200Response + +`func NewDdosSettingsUpdate200Response() *DdosSettingsUpdate200Response` + +NewDdosSettingsUpdate200Response instantiates a new DdosSettingsUpdate200Response object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDdosSettingsUpdate200ResponseWithDefaults + +`func NewDdosSettingsUpdate200ResponseWithDefaults() *DdosSettingsUpdate200Response` + +NewDdosSettingsUpdate200ResponseWithDefaults instantiates a new DdosSettingsUpdate200Response object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *DdosSettingsUpdate200Response) GetData() DdosSettings` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *DdosSettingsUpdate200Response) GetDataOk() (*DdosSettings, 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 *DdosSettingsUpdate200Response) SetData(v DdosSettings)` + +SetData sets Data field to given value. + +### HasData + +`func (o *DdosSettingsUpdate200Response) HasData() bool` + +HasData returns a boolean if a field has been set. + +### GetMessage + +`func (o *DdosSettingsUpdate200Response) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *DdosSettingsUpdate200Response) GetMessageOk() (*string, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessage + +`func (o *DdosSettingsUpdate200Response) SetMessage(v string)` + +SetMessage sets Message field to given value. + +### HasMessage + +`func (o *DdosSettingsUpdate200Response) HasMessage() bool` + +HasMessage returns a boolean if a field has been set. + +### SetMessageNil + +`func (o *DdosSettingsUpdate200Response) SetMessageNil(b bool)` + + SetMessageNil sets the value for Message to be an explicit nil + +### UnsetMessage +`func (o *DdosSettingsUpdate200Response) UnsetMessage()` + +UnsetMessage ensures that no value is present for Message, not even an explicit nil + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/DdosUpdate200Response.md b/docs/DdosUpdate200Response.md new file mode 100644 index 0000000..5e48856 --- /dev/null +++ b/docs/DdosUpdate200Response.md @@ -0,0 +1,92 @@ +# DdosUpdate200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**Ddos**](Ddos.md) | | [optional] +**Message** | Pointer to **NullableString** | | [optional] + +## Methods + +### NewDdosUpdate200Response + +`func NewDdosUpdate200Response() *DdosUpdate200Response` + +NewDdosUpdate200Response instantiates a new DdosUpdate200Response object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDdosUpdate200ResponseWithDefaults + +`func NewDdosUpdate200ResponseWithDefaults() *DdosUpdate200Response` + +NewDdosUpdate200ResponseWithDefaults instantiates a new DdosUpdate200Response object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *DdosUpdate200Response) GetData() Ddos` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *DdosUpdate200Response) GetDataOk() (*Ddos, 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 *DdosUpdate200Response) SetData(v Ddos)` + +SetData sets Data field to given value. + +### HasData + +`func (o *DdosUpdate200Response) HasData() bool` + +HasData returns a boolean if a field has been set. + +### GetMessage + +`func (o *DdosUpdate200Response) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *DdosUpdate200Response) GetMessageOk() (*string, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessage + +`func (o *DdosUpdate200Response) SetMessage(v string)` + +SetMessage sets Message field to given value. + +### HasMessage + +`func (o *DdosUpdate200Response) HasMessage() bool` + +HasMessage returns a boolean if a field has been set. + +### SetMessageNil + +`func (o *DdosUpdate200Response) SetMessageNil(b bool)` + + SetMessageNil sets the value for Message to be an explicit nil + +### UnsetMessage +`func (o *DdosUpdate200Response) UnsetMessage()` + +UnsetMessage ensures that no value is present for Message, not even an explicit nil + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/DeprecatedNs.md b/docs/DeprecatedNs.md new file mode 100644 index 0000000..b5cb887 --- /dev/null +++ b/docs/DeprecatedNs.md @@ -0,0 +1,108 @@ +# DeprecatedNs + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**NsDomain** | Pointer to **[]string** | Current NS records of the domain | [optional] +**NsKeys** | Pointer to **[]string** | Desired NS values for the domain | [optional] +**NsStatus** | Pointer to **bool** | | [optional] + +## Methods + +### NewDeprecatedNs + +`func NewDeprecatedNs() *DeprecatedNs` + +NewDeprecatedNs instantiates a new DeprecatedNs object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDeprecatedNsWithDefaults + +`func NewDeprecatedNsWithDefaults() *DeprecatedNs` + +NewDeprecatedNsWithDefaults instantiates a new DeprecatedNs object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetNsDomain + +`func (o *DeprecatedNs) GetNsDomain() []string` + +GetNsDomain returns the NsDomain field if non-nil, zero value otherwise. + +### GetNsDomainOk + +`func (o *DeprecatedNs) GetNsDomainOk() (*[]string, bool)` + +GetNsDomainOk returns a tuple with the NsDomain field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNsDomain + +`func (o *DeprecatedNs) SetNsDomain(v []string)` + +SetNsDomain sets NsDomain field to given value. + +### HasNsDomain + +`func (o *DeprecatedNs) HasNsDomain() bool` + +HasNsDomain returns a boolean if a field has been set. + +### GetNsKeys + +`func (o *DeprecatedNs) GetNsKeys() []string` + +GetNsKeys returns the NsKeys field if non-nil, zero value otherwise. + +### GetNsKeysOk + +`func (o *DeprecatedNs) GetNsKeysOk() (*[]string, bool)` + +GetNsKeysOk returns a tuple with the NsKeys field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNsKeys + +`func (o *DeprecatedNs) SetNsKeys(v []string)` + +SetNsKeys sets NsKeys field to given value. + +### HasNsKeys + +`func (o *DeprecatedNs) HasNsKeys() bool` + +HasNsKeys returns a boolean if a field has been set. + +### GetNsStatus + +`func (o *DeprecatedNs) GetNsStatus() bool` + +GetNsStatus returns the NsStatus field if non-nil, zero value otherwise. + +### GetNsStatusOk + +`func (o *DeprecatedNs) GetNsStatusOk() (*bool, bool)` + +GetNsStatusOk returns a tuple with the NsStatus field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNsStatus + +`func (o *DeprecatedNs) SetNsStatus(v bool)` + +SetNsStatus sets NsStatus field to given value. + +### HasNsStatus + +`func (o *DeprecatedNs) HasNsStatus() bool` + +HasNsStatus returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/DeprecatedWafSettings.md b/docs/DeprecatedWafSettings.md new file mode 100644 index 0000000..b7368ad --- /dev/null +++ b/docs/DeprecatedWafSettings.md @@ -0,0 +1,108 @@ +# DeprecatedWafSettings + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FWafStatus** | Pointer to **string** | | [optional] +**FThreshold** | Pointer to **string** | | [optional] +**FProvider** | Pointer to **string** | | [optional] + +## Methods + +### NewDeprecatedWafSettings + +`func NewDeprecatedWafSettings() *DeprecatedWafSettings` + +NewDeprecatedWafSettings instantiates a new DeprecatedWafSettings object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDeprecatedWafSettingsWithDefaults + +`func NewDeprecatedWafSettingsWithDefaults() *DeprecatedWafSettings` + +NewDeprecatedWafSettingsWithDefaults instantiates a new DeprecatedWafSettings object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetFWafStatus + +`func (o *DeprecatedWafSettings) GetFWafStatus() string` + +GetFWafStatus returns the FWafStatus field if non-nil, zero value otherwise. + +### GetFWafStatusOk + +`func (o *DeprecatedWafSettings) GetFWafStatusOk() (*string, bool)` + +GetFWafStatusOk returns a tuple with the FWafStatus field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFWafStatus + +`func (o *DeprecatedWafSettings) SetFWafStatus(v string)` + +SetFWafStatus sets FWafStatus field to given value. + +### HasFWafStatus + +`func (o *DeprecatedWafSettings) HasFWafStatus() bool` + +HasFWafStatus returns a boolean if a field has been set. + +### GetFThreshold + +`func (o *DeprecatedWafSettings) GetFThreshold() string` + +GetFThreshold returns the FThreshold field if non-nil, zero value otherwise. + +### GetFThresholdOk + +`func (o *DeprecatedWafSettings) GetFThresholdOk() (*string, bool)` + +GetFThresholdOk returns a tuple with the FThreshold field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFThreshold + +`func (o *DeprecatedWafSettings) SetFThreshold(v string)` + +SetFThreshold sets FThreshold field to given value. + +### HasFThreshold + +`func (o *DeprecatedWafSettings) HasFThreshold() bool` + +HasFThreshold returns a boolean if a field has been set. + +### GetFProvider + +`func (o *DeprecatedWafSettings) GetFProvider() string` + +GetFProvider returns the FProvider field if non-nil, zero value otherwise. + +### GetFProviderOk + +`func (o *DeprecatedWafSettings) GetFProviderOk() (*string, bool)` + +GetFProviderOk returns a tuple with the FProvider field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFProvider + +`func (o *DeprecatedWafSettings) SetFProvider(v string)` + +SetFProvider sets FProvider field to given value. + +### HasFProvider + +`func (o *DeprecatedWafSettings) HasFProvider() bool` + +HasFProvider returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/DnsGeoReport.md b/docs/DnsGeoReport.md new file mode 100644 index 0000000..50109b9 --- /dev/null +++ b/docs/DnsGeoReport.md @@ -0,0 +1,108 @@ +# DnsGeoReport + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Statistics** | Pointer to **[]interface{}** | | [optional] +**Charts** | Pointer to [**DnsGeoReportCharts**](DnsGeoReportCharts.md) | | [optional] +**Lists** | Pointer to [**[]DnsGeoReportListsInner**](DnsGeoReportListsInner.md) | | [optional] + +## Methods + +### NewDnsGeoReport + +`func NewDnsGeoReport() *DnsGeoReport` + +NewDnsGeoReport instantiates a new DnsGeoReport object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDnsGeoReportWithDefaults + +`func NewDnsGeoReportWithDefaults() *DnsGeoReport` + +NewDnsGeoReportWithDefaults instantiates a new DnsGeoReport object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetStatistics + +`func (o *DnsGeoReport) GetStatistics() []interface{}` + +GetStatistics returns the Statistics field if non-nil, zero value otherwise. + +### GetStatisticsOk + +`func (o *DnsGeoReport) GetStatisticsOk() (*[]interface{}, bool)` + +GetStatisticsOk returns a tuple with the Statistics field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatistics + +`func (o *DnsGeoReport) SetStatistics(v []interface{})` + +SetStatistics sets Statistics field to given value. + +### HasStatistics + +`func (o *DnsGeoReport) HasStatistics() bool` + +HasStatistics returns a boolean if a field has been set. + +### GetCharts + +`func (o *DnsGeoReport) GetCharts() DnsGeoReportCharts` + +GetCharts returns the Charts field if non-nil, zero value otherwise. + +### GetChartsOk + +`func (o *DnsGeoReport) GetChartsOk() (*DnsGeoReportCharts, bool)` + +GetChartsOk returns a tuple with the Charts field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCharts + +`func (o *DnsGeoReport) SetCharts(v DnsGeoReportCharts)` + +SetCharts sets Charts field to given value. + +### HasCharts + +`func (o *DnsGeoReport) HasCharts() bool` + +HasCharts returns a boolean if a field has been set. + +### GetLists + +`func (o *DnsGeoReport) GetLists() []DnsGeoReportListsInner` + +GetLists returns the Lists field if non-nil, zero value otherwise. + +### GetListsOk + +`func (o *DnsGeoReport) GetListsOk() (*[]DnsGeoReportListsInner, bool)` + +GetListsOk returns a tuple with the Lists field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLists + +`func (o *DnsGeoReport) SetLists(v []DnsGeoReportListsInner)` + +SetLists sets Lists field to given value. + +### HasLists + +`func (o *DnsGeoReport) HasLists() bool` + +HasLists returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/DnsGeoReportCharts.md b/docs/DnsGeoReportCharts.md new file mode 100644 index 0000000..53bdaca --- /dev/null +++ b/docs/DnsGeoReportCharts.md @@ -0,0 +1,56 @@ +# DnsGeoReportCharts + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Requests** | Pointer to [**map[string]DnsGeoReportChartsRequestsValue**](DnsGeoReportChartsRequestsValue.md) | A dictionay which maps country codes to fill and value | [optional] + +## Methods + +### NewDnsGeoReportCharts + +`func NewDnsGeoReportCharts() *DnsGeoReportCharts` + +NewDnsGeoReportCharts instantiates a new DnsGeoReportCharts object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDnsGeoReportChartsWithDefaults + +`func NewDnsGeoReportChartsWithDefaults() *DnsGeoReportCharts` + +NewDnsGeoReportChartsWithDefaults instantiates a new DnsGeoReportCharts object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetRequests + +`func (o *DnsGeoReportCharts) GetRequests() map[string]DnsGeoReportChartsRequestsValue` + +GetRequests returns the Requests field if non-nil, zero value otherwise. + +### GetRequestsOk + +`func (o *DnsGeoReportCharts) GetRequestsOk() (*map[string]DnsGeoReportChartsRequestsValue, bool)` + +GetRequestsOk returns a tuple with the Requests field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRequests + +`func (o *DnsGeoReportCharts) SetRequests(v map[string]DnsGeoReportChartsRequestsValue)` + +SetRequests sets Requests field to given value. + +### HasRequests + +`func (o *DnsGeoReportCharts) HasRequests() bool` + +HasRequests returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/DnsGeoReportChartsRequestsValue.md b/docs/DnsGeoReportChartsRequestsValue.md new file mode 100644 index 0000000..7ff7ddf --- /dev/null +++ b/docs/DnsGeoReportChartsRequestsValue.md @@ -0,0 +1,108 @@ +# DnsGeoReportChartsRequestsValue + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FillKey** | Pointer to **int32** | | [optional] +**Name** | Pointer to **string** | | [optional] +**Value** | Pointer to **int32** | | [optional] + +## Methods + +### NewDnsGeoReportChartsRequestsValue + +`func NewDnsGeoReportChartsRequestsValue() *DnsGeoReportChartsRequestsValue` + +NewDnsGeoReportChartsRequestsValue instantiates a new DnsGeoReportChartsRequestsValue object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDnsGeoReportChartsRequestsValueWithDefaults + +`func NewDnsGeoReportChartsRequestsValueWithDefaults() *DnsGeoReportChartsRequestsValue` + +NewDnsGeoReportChartsRequestsValueWithDefaults instantiates a new DnsGeoReportChartsRequestsValue object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetFillKey + +`func (o *DnsGeoReportChartsRequestsValue) GetFillKey() int32` + +GetFillKey returns the FillKey field if non-nil, zero value otherwise. + +### GetFillKeyOk + +`func (o *DnsGeoReportChartsRequestsValue) GetFillKeyOk() (*int32, bool)` + +GetFillKeyOk returns a tuple with the FillKey field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFillKey + +`func (o *DnsGeoReportChartsRequestsValue) SetFillKey(v int32)` + +SetFillKey sets FillKey field to given value. + +### HasFillKey + +`func (o *DnsGeoReportChartsRequestsValue) HasFillKey() bool` + +HasFillKey returns a boolean if a field has been set. + +### GetName + +`func (o *DnsGeoReportChartsRequestsValue) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *DnsGeoReportChartsRequestsValue) 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 *DnsGeoReportChartsRequestsValue) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *DnsGeoReportChartsRequestsValue) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetValue + +`func (o *DnsGeoReportChartsRequestsValue) GetValue() int32` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *DnsGeoReportChartsRequestsValue) GetValueOk() (*int32, 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 *DnsGeoReportChartsRequestsValue) SetValue(v int32)` + +SetValue sets Value field to given value. + +### HasValue + +`func (o *DnsGeoReportChartsRequestsValue) HasValue() bool` + +HasValue returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/DnsGeoReportData.md b/docs/DnsGeoReportData.md new file mode 100644 index 0000000..99262dd --- /dev/null +++ b/docs/DnsGeoReportData.md @@ -0,0 +1,56 @@ +# DnsGeoReportData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**DnsGeoReport**](DnsGeoReport.md) | | [optional] + +## Methods + +### NewDnsGeoReportData + +`func NewDnsGeoReportData() *DnsGeoReportData` + +NewDnsGeoReportData instantiates a new DnsGeoReportData object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDnsGeoReportDataWithDefaults + +`func NewDnsGeoReportDataWithDefaults() *DnsGeoReportData` + +NewDnsGeoReportDataWithDefaults instantiates a new DnsGeoReportData object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *DnsGeoReportData) GetData() DnsGeoReport` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *DnsGeoReportData) GetDataOk() (*DnsGeoReport, 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 *DnsGeoReportData) SetData(v DnsGeoReport)` + +SetData sets Data field to given value. + +### HasData + +`func (o *DnsGeoReportData) HasData() bool` + +HasData returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/DnsGeoReportListsInner.md b/docs/DnsGeoReportListsInner.md new file mode 100644 index 0000000..f46ee6b --- /dev/null +++ b/docs/DnsGeoReportListsInner.md @@ -0,0 +1,134 @@ +# DnsGeoReportListsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Country** | Pointer to **string** | | [optional] +**Name** | Pointer to **string** | | [optional] +**Code** | Pointer to **string** | | [optional] +**Requests** | Pointer to **int32** | | [optional] + +## Methods + +### NewDnsGeoReportListsInner + +`func NewDnsGeoReportListsInner() *DnsGeoReportListsInner` + +NewDnsGeoReportListsInner instantiates a new DnsGeoReportListsInner object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDnsGeoReportListsInnerWithDefaults + +`func NewDnsGeoReportListsInnerWithDefaults() *DnsGeoReportListsInner` + +NewDnsGeoReportListsInnerWithDefaults instantiates a new DnsGeoReportListsInner object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCountry + +`func (o *DnsGeoReportListsInner) GetCountry() string` + +GetCountry returns the Country field if non-nil, zero value otherwise. + +### GetCountryOk + +`func (o *DnsGeoReportListsInner) 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 *DnsGeoReportListsInner) SetCountry(v string)` + +SetCountry sets Country field to given value. + +### HasCountry + +`func (o *DnsGeoReportListsInner) HasCountry() bool` + +HasCountry returns a boolean if a field has been set. + +### GetName + +`func (o *DnsGeoReportListsInner) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *DnsGeoReportListsInner) 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 *DnsGeoReportListsInner) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *DnsGeoReportListsInner) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetCode + +`func (o *DnsGeoReportListsInner) GetCode() string` + +GetCode returns the Code field if non-nil, zero value otherwise. + +### GetCodeOk + +`func (o *DnsGeoReportListsInner) GetCodeOk() (*string, bool)` + +GetCodeOk returns a tuple with the Code field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCode + +`func (o *DnsGeoReportListsInner) SetCode(v string)` + +SetCode sets Code field to given value. + +### HasCode + +`func (o *DnsGeoReportListsInner) HasCode() bool` + +HasCode returns a boolean if a field has been set. + +### GetRequests + +`func (o *DnsGeoReportListsInner) GetRequests() int32` + +GetRequests returns the Requests field if non-nil, zero value otherwise. + +### GetRequestsOk + +`func (o *DnsGeoReportListsInner) GetRequestsOk() (*int32, bool)` + +GetRequestsOk returns a tuple with the Requests field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRequests + +`func (o *DnsGeoReportListsInner) SetRequests(v int32)` + +SetRequests sets Requests field to given value. + +### HasRequests + +`func (o *DnsGeoReportListsInner) HasRequests() bool` + +HasRequests returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/DnsRecord.md b/docs/DnsRecord.md new file mode 100644 index 0000000..2196423 --- /dev/null +++ b/docs/DnsRecord.md @@ -0,0 +1,290 @@ +# DnsRecord + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **string** | | [optional] [readonly] +**Name** | Pointer to **string** | | [optional] +**Ttl** | Pointer to **int32** | | [optional] +**Cloud** | Pointer to **bool** | | [optional] [default to false] +**UpstreamHttps** | Pointer to **string** | | [optional] +**IpFilterMode** | Pointer to [**DnsRecordIpFilterMode**](DnsRecordIpFilterMode.md) | | [optional] +**IsProtected** | Pointer to **bool** | Protected records cannot be modified or deleted by user. | [optional] [readonly] [default to false] +**Usage** | Pointer to **[]string** | | [optional] [readonly] [default to []] +**CreatedAt** | Pointer to **time.Time** | | [optional] [readonly] +**UpdatedAt** | Pointer to **time.Time** | | [optional] [readonly] + +## Methods + +### NewDnsRecord + +`func NewDnsRecord() *DnsRecord` + +NewDnsRecord instantiates a new DnsRecord object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDnsRecordWithDefaults + +`func NewDnsRecordWithDefaults() *DnsRecord` + +NewDnsRecordWithDefaults instantiates a new DnsRecord object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *DnsRecord) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *DnsRecord) 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 *DnsRecord) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *DnsRecord) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetName + +`func (o *DnsRecord) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *DnsRecord) 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 *DnsRecord) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *DnsRecord) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetTtl + +`func (o *DnsRecord) GetTtl() int32` + +GetTtl returns the Ttl field if non-nil, zero value otherwise. + +### GetTtlOk + +`func (o *DnsRecord) GetTtlOk() (*int32, bool)` + +GetTtlOk returns a tuple with the Ttl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTtl + +`func (o *DnsRecord) SetTtl(v int32)` + +SetTtl sets Ttl field to given value. + +### HasTtl + +`func (o *DnsRecord) HasTtl() bool` + +HasTtl returns a boolean if a field has been set. + +### GetCloud + +`func (o *DnsRecord) GetCloud() bool` + +GetCloud returns the Cloud field if non-nil, zero value otherwise. + +### GetCloudOk + +`func (o *DnsRecord) GetCloudOk() (*bool, bool)` + +GetCloudOk returns a tuple with the Cloud field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCloud + +`func (o *DnsRecord) SetCloud(v bool)` + +SetCloud sets Cloud field to given value. + +### HasCloud + +`func (o *DnsRecord) HasCloud() bool` + +HasCloud returns a boolean if a field has been set. + +### GetUpstreamHttps + +`func (o *DnsRecord) GetUpstreamHttps() string` + +GetUpstreamHttps returns the UpstreamHttps field if non-nil, zero value otherwise. + +### GetUpstreamHttpsOk + +`func (o *DnsRecord) GetUpstreamHttpsOk() (*string, bool)` + +GetUpstreamHttpsOk returns a tuple with the UpstreamHttps field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpstreamHttps + +`func (o *DnsRecord) SetUpstreamHttps(v string)` + +SetUpstreamHttps sets UpstreamHttps field to given value. + +### HasUpstreamHttps + +`func (o *DnsRecord) HasUpstreamHttps() bool` + +HasUpstreamHttps returns a boolean if a field has been set. + +### GetIpFilterMode + +`func (o *DnsRecord) GetIpFilterMode() DnsRecordIpFilterMode` + +GetIpFilterMode returns the IpFilterMode field if non-nil, zero value otherwise. + +### GetIpFilterModeOk + +`func (o *DnsRecord) GetIpFilterModeOk() (*DnsRecordIpFilterMode, bool)` + +GetIpFilterModeOk returns a tuple with the IpFilterMode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIpFilterMode + +`func (o *DnsRecord) SetIpFilterMode(v DnsRecordIpFilterMode)` + +SetIpFilterMode sets IpFilterMode field to given value. + +### HasIpFilterMode + +`func (o *DnsRecord) HasIpFilterMode() bool` + +HasIpFilterMode returns a boolean if a field has been set. + +### GetIsProtected + +`func (o *DnsRecord) GetIsProtected() bool` + +GetIsProtected returns the IsProtected field if non-nil, zero value otherwise. + +### GetIsProtectedOk + +`func (o *DnsRecord) GetIsProtectedOk() (*bool, bool)` + +GetIsProtectedOk returns a tuple with the IsProtected field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsProtected + +`func (o *DnsRecord) SetIsProtected(v bool)` + +SetIsProtected sets IsProtected field to given value. + +### HasIsProtected + +`func (o *DnsRecord) HasIsProtected() bool` + +HasIsProtected returns a boolean if a field has been set. + +### GetUsage + +`func (o *DnsRecord) GetUsage() []string` + +GetUsage returns the Usage field if non-nil, zero value otherwise. + +### GetUsageOk + +`func (o *DnsRecord) GetUsageOk() (*[]string, bool)` + +GetUsageOk returns a tuple with the Usage field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUsage + +`func (o *DnsRecord) SetUsage(v []string)` + +SetUsage sets Usage field to given value. + +### HasUsage + +`func (o *DnsRecord) HasUsage() bool` + +HasUsage returns a boolean if a field has been set. + +### GetCreatedAt + +`func (o *DnsRecord) GetCreatedAt() time.Time` + +GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. + +### GetCreatedAtOk + +`func (o *DnsRecord) GetCreatedAtOk() (*time.Time, bool)` + +GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedAt + +`func (o *DnsRecord) SetCreatedAt(v time.Time)` + +SetCreatedAt sets CreatedAt field to given value. + +### HasCreatedAt + +`func (o *DnsRecord) HasCreatedAt() bool` + +HasCreatedAt returns a boolean if a field has been set. + +### GetUpdatedAt + +`func (o *DnsRecord) GetUpdatedAt() time.Time` + +GetUpdatedAt returns the UpdatedAt field if non-nil, zero value otherwise. + +### GetUpdatedAtOk + +`func (o *DnsRecord) GetUpdatedAtOk() (*time.Time, bool)` + +GetUpdatedAtOk returns a tuple with the UpdatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpdatedAt + +`func (o *DnsRecord) SetUpdatedAt(v time.Time)` + +SetUpdatedAt sets UpdatedAt field to given value. + +### HasUpdatedAt + +`func (o *DnsRecord) HasUpdatedAt() bool` + +HasUpdatedAt returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/DnsRecordCloud.md b/docs/DnsRecordCloud.md new file mode 100644 index 0000000..1b9fc55 --- /dev/null +++ b/docs/DnsRecordCloud.md @@ -0,0 +1,51 @@ +# DnsRecordCloud + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Cloud** | **bool** | | + +## Methods + +### NewDnsRecordCloud + +`func NewDnsRecordCloud(cloud bool, ) *DnsRecordCloud` + +NewDnsRecordCloud instantiates a new DnsRecordCloud object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDnsRecordCloudWithDefaults + +`func NewDnsRecordCloudWithDefaults() *DnsRecordCloud` + +NewDnsRecordCloudWithDefaults instantiates a new DnsRecordCloud object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCloud + +`func (o *DnsRecordCloud) GetCloud() bool` + +GetCloud returns the Cloud field if non-nil, zero value otherwise. + +### GetCloudOk + +`func (o *DnsRecordCloud) GetCloudOk() (*bool, bool)` + +GetCloudOk returns a tuple with the Cloud field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCloud + +`func (o *DnsRecordCloud) SetCloud(v bool)` + +SetCloud sets Cloud field to given value. + + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/DnsRecordData.md b/docs/DnsRecordData.md new file mode 100644 index 0000000..44fc455 --- /dev/null +++ b/docs/DnsRecordData.md @@ -0,0 +1,56 @@ +# DnsRecordData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**DnsRecordGeneric**](DnsRecordGeneric.md) | | [optional] + +## Methods + +### NewDnsRecordData + +`func NewDnsRecordData() *DnsRecordData` + +NewDnsRecordData instantiates a new DnsRecordData object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDnsRecordDataWithDefaults + +`func NewDnsRecordDataWithDefaults() *DnsRecordData` + +NewDnsRecordDataWithDefaults instantiates a new DnsRecordData object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *DnsRecordData) GetData() DnsRecordGeneric` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *DnsRecordData) GetDataOk() (*DnsRecordGeneric, 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 *DnsRecordData) SetData(v DnsRecordGeneric)` + +SetData sets Data field to given value. + +### HasData + +`func (o *DnsRecordData) HasData() bool` + +HasData returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/DnsRecordGeneric.md b/docs/DnsRecordGeneric.md new file mode 100644 index 0000000..bd4426d --- /dev/null +++ b/docs/DnsRecordGeneric.md @@ -0,0 +1,290 @@ +# DnsRecordGeneric + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **string** | | [optional] [readonly] +**Name** | Pointer to **string** | | [optional] +**Ttl** | Pointer to **int32** | | [optional] +**Cloud** | Pointer to **bool** | | [optional] [default to false] +**UpstreamHttps** | Pointer to **string** | | [optional] +**IpFilterMode** | Pointer to [**DnsRecordIpFilterMode**](DnsRecordIpFilterMode.md) | | [optional] +**IsProtected** | Pointer to **bool** | Protected records cannot be modified or deleted by user. | [optional] [readonly] [default to false] +**Usage** | Pointer to **[]string** | | [optional] [readonly] [default to []] +**CreatedAt** | Pointer to **time.Time** | | [optional] [readonly] +**UpdatedAt** | Pointer to **time.Time** | | [optional] [readonly] + +## Methods + +### NewDnsRecordGeneric + +`func NewDnsRecordGeneric() *DnsRecordGeneric` + +NewDnsRecordGeneric instantiates a new DnsRecordGeneric object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDnsRecordGenericWithDefaults + +`func NewDnsRecordGenericWithDefaults() *DnsRecordGeneric` + +NewDnsRecordGenericWithDefaults instantiates a new DnsRecordGeneric object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *DnsRecordGeneric) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *DnsRecordGeneric) 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 *DnsRecordGeneric) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *DnsRecordGeneric) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetName + +`func (o *DnsRecordGeneric) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *DnsRecordGeneric) 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 *DnsRecordGeneric) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *DnsRecordGeneric) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetTtl + +`func (o *DnsRecordGeneric) GetTtl() int32` + +GetTtl returns the Ttl field if non-nil, zero value otherwise. + +### GetTtlOk + +`func (o *DnsRecordGeneric) GetTtlOk() (*int32, bool)` + +GetTtlOk returns a tuple with the Ttl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTtl + +`func (o *DnsRecordGeneric) SetTtl(v int32)` + +SetTtl sets Ttl field to given value. + +### HasTtl + +`func (o *DnsRecordGeneric) HasTtl() bool` + +HasTtl returns a boolean if a field has been set. + +### GetCloud + +`func (o *DnsRecordGeneric) GetCloud() bool` + +GetCloud returns the Cloud field if non-nil, zero value otherwise. + +### GetCloudOk + +`func (o *DnsRecordGeneric) GetCloudOk() (*bool, bool)` + +GetCloudOk returns a tuple with the Cloud field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCloud + +`func (o *DnsRecordGeneric) SetCloud(v bool)` + +SetCloud sets Cloud field to given value. + +### HasCloud + +`func (o *DnsRecordGeneric) HasCloud() bool` + +HasCloud returns a boolean if a field has been set. + +### GetUpstreamHttps + +`func (o *DnsRecordGeneric) GetUpstreamHttps() string` + +GetUpstreamHttps returns the UpstreamHttps field if non-nil, zero value otherwise. + +### GetUpstreamHttpsOk + +`func (o *DnsRecordGeneric) GetUpstreamHttpsOk() (*string, bool)` + +GetUpstreamHttpsOk returns a tuple with the UpstreamHttps field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpstreamHttps + +`func (o *DnsRecordGeneric) SetUpstreamHttps(v string)` + +SetUpstreamHttps sets UpstreamHttps field to given value. + +### HasUpstreamHttps + +`func (o *DnsRecordGeneric) HasUpstreamHttps() bool` + +HasUpstreamHttps returns a boolean if a field has been set. + +### GetIpFilterMode + +`func (o *DnsRecordGeneric) GetIpFilterMode() DnsRecordIpFilterMode` + +GetIpFilterMode returns the IpFilterMode field if non-nil, zero value otherwise. + +### GetIpFilterModeOk + +`func (o *DnsRecordGeneric) GetIpFilterModeOk() (*DnsRecordIpFilterMode, bool)` + +GetIpFilterModeOk returns a tuple with the IpFilterMode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIpFilterMode + +`func (o *DnsRecordGeneric) SetIpFilterMode(v DnsRecordIpFilterMode)` + +SetIpFilterMode sets IpFilterMode field to given value. + +### HasIpFilterMode + +`func (o *DnsRecordGeneric) HasIpFilterMode() bool` + +HasIpFilterMode returns a boolean if a field has been set. + +### GetIsProtected + +`func (o *DnsRecordGeneric) GetIsProtected() bool` + +GetIsProtected returns the IsProtected field if non-nil, zero value otherwise. + +### GetIsProtectedOk + +`func (o *DnsRecordGeneric) GetIsProtectedOk() (*bool, bool)` + +GetIsProtectedOk returns a tuple with the IsProtected field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsProtected + +`func (o *DnsRecordGeneric) SetIsProtected(v bool)` + +SetIsProtected sets IsProtected field to given value. + +### HasIsProtected + +`func (o *DnsRecordGeneric) HasIsProtected() bool` + +HasIsProtected returns a boolean if a field has been set. + +### GetUsage + +`func (o *DnsRecordGeneric) GetUsage() []string` + +GetUsage returns the Usage field if non-nil, zero value otherwise. + +### GetUsageOk + +`func (o *DnsRecordGeneric) GetUsageOk() (*[]string, bool)` + +GetUsageOk returns a tuple with the Usage field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUsage + +`func (o *DnsRecordGeneric) SetUsage(v []string)` + +SetUsage sets Usage field to given value. + +### HasUsage + +`func (o *DnsRecordGeneric) HasUsage() bool` + +HasUsage returns a boolean if a field has been set. + +### GetCreatedAt + +`func (o *DnsRecordGeneric) GetCreatedAt() time.Time` + +GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. + +### GetCreatedAtOk + +`func (o *DnsRecordGeneric) GetCreatedAtOk() (*time.Time, bool)` + +GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedAt + +`func (o *DnsRecordGeneric) SetCreatedAt(v time.Time)` + +SetCreatedAt sets CreatedAt field to given value. + +### HasCreatedAt + +`func (o *DnsRecordGeneric) HasCreatedAt() bool` + +HasCreatedAt returns a boolean if a field has been set. + +### GetUpdatedAt + +`func (o *DnsRecordGeneric) GetUpdatedAt() time.Time` + +GetUpdatedAt returns the UpdatedAt field if non-nil, zero value otherwise. + +### GetUpdatedAtOk + +`func (o *DnsRecordGeneric) GetUpdatedAtOk() (*time.Time, bool)` + +GetUpdatedAtOk returns a tuple with the UpdatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpdatedAt + +`func (o *DnsRecordGeneric) SetUpdatedAt(v time.Time)` + +SetUpdatedAt sets UpdatedAt field to given value. + +### HasUpdatedAt + +`func (o *DnsRecordGeneric) HasUpdatedAt() bool` + +HasUpdatedAt returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/DnsRecordGenericArrayValue.md b/docs/DnsRecordGenericArrayValue.md new file mode 100644 index 0000000..64848ee --- /dev/null +++ b/docs/DnsRecordGenericArrayValue.md @@ -0,0 +1,342 @@ +# DnsRecordGenericArrayValue + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | Pointer to **[]interface{}** | | [optional] +**Type** | Pointer to **string** | | [optional] +**Id** | Pointer to **string** | | [optional] [readonly] +**Name** | Pointer to **string** | | [optional] +**Ttl** | Pointer to **int32** | | [optional] +**Cloud** | Pointer to **bool** | | [optional] [default to false] +**UpstreamHttps** | Pointer to **string** | | [optional] +**IpFilterMode** | Pointer to [**DnsRecordIpFilterMode**](DnsRecordIpFilterMode.md) | | [optional] +**IsProtected** | Pointer to **bool** | Protected records cannot be modified or deleted by user. | [optional] [readonly] [default to false] +**Usage** | Pointer to **[]string** | | [optional] [readonly] [default to []] +**CreatedAt** | Pointer to **time.Time** | | [optional] [readonly] +**UpdatedAt** | Pointer to **time.Time** | | [optional] [readonly] + +## Methods + +### NewDnsRecordGenericArrayValue + +`func NewDnsRecordGenericArrayValue() *DnsRecordGenericArrayValue` + +NewDnsRecordGenericArrayValue instantiates a new DnsRecordGenericArrayValue object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDnsRecordGenericArrayValueWithDefaults + +`func NewDnsRecordGenericArrayValueWithDefaults() *DnsRecordGenericArrayValue` + +NewDnsRecordGenericArrayValueWithDefaults instantiates a new DnsRecordGenericArrayValue object +This 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 *DnsRecordGenericArrayValue) GetValue() []interface{}` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *DnsRecordGenericArrayValue) GetValueOk() (*[]interface{}, 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 *DnsRecordGenericArrayValue) SetValue(v []interface{})` + +SetValue sets Value field to given value. + +### HasValue + +`func (o *DnsRecordGenericArrayValue) HasValue() bool` + +HasValue returns a boolean if a field has been set. + +### GetType + +`func (o *DnsRecordGenericArrayValue) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *DnsRecordGenericArrayValue) 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 *DnsRecordGenericArrayValue) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *DnsRecordGenericArrayValue) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetId + +`func (o *DnsRecordGenericArrayValue) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *DnsRecordGenericArrayValue) 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 *DnsRecordGenericArrayValue) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *DnsRecordGenericArrayValue) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetName + +`func (o *DnsRecordGenericArrayValue) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *DnsRecordGenericArrayValue) 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 *DnsRecordGenericArrayValue) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *DnsRecordGenericArrayValue) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetTtl + +`func (o *DnsRecordGenericArrayValue) GetTtl() int32` + +GetTtl returns the Ttl field if non-nil, zero value otherwise. + +### GetTtlOk + +`func (o *DnsRecordGenericArrayValue) GetTtlOk() (*int32, bool)` + +GetTtlOk returns a tuple with the Ttl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTtl + +`func (o *DnsRecordGenericArrayValue) SetTtl(v int32)` + +SetTtl sets Ttl field to given value. + +### HasTtl + +`func (o *DnsRecordGenericArrayValue) HasTtl() bool` + +HasTtl returns a boolean if a field has been set. + +### GetCloud + +`func (o *DnsRecordGenericArrayValue) GetCloud() bool` + +GetCloud returns the Cloud field if non-nil, zero value otherwise. + +### GetCloudOk + +`func (o *DnsRecordGenericArrayValue) GetCloudOk() (*bool, bool)` + +GetCloudOk returns a tuple with the Cloud field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCloud + +`func (o *DnsRecordGenericArrayValue) SetCloud(v bool)` + +SetCloud sets Cloud field to given value. + +### HasCloud + +`func (o *DnsRecordGenericArrayValue) HasCloud() bool` + +HasCloud returns a boolean if a field has been set. + +### GetUpstreamHttps + +`func (o *DnsRecordGenericArrayValue) GetUpstreamHttps() string` + +GetUpstreamHttps returns the UpstreamHttps field if non-nil, zero value otherwise. + +### GetUpstreamHttpsOk + +`func (o *DnsRecordGenericArrayValue) GetUpstreamHttpsOk() (*string, bool)` + +GetUpstreamHttpsOk returns a tuple with the UpstreamHttps field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpstreamHttps + +`func (o *DnsRecordGenericArrayValue) SetUpstreamHttps(v string)` + +SetUpstreamHttps sets UpstreamHttps field to given value. + +### HasUpstreamHttps + +`func (o *DnsRecordGenericArrayValue) HasUpstreamHttps() bool` + +HasUpstreamHttps returns a boolean if a field has been set. + +### GetIpFilterMode + +`func (o *DnsRecordGenericArrayValue) GetIpFilterMode() DnsRecordIpFilterMode` + +GetIpFilterMode returns the IpFilterMode field if non-nil, zero value otherwise. + +### GetIpFilterModeOk + +`func (o *DnsRecordGenericArrayValue) GetIpFilterModeOk() (*DnsRecordIpFilterMode, bool)` + +GetIpFilterModeOk returns a tuple with the IpFilterMode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIpFilterMode + +`func (o *DnsRecordGenericArrayValue) SetIpFilterMode(v DnsRecordIpFilterMode)` + +SetIpFilterMode sets IpFilterMode field to given value. + +### HasIpFilterMode + +`func (o *DnsRecordGenericArrayValue) HasIpFilterMode() bool` + +HasIpFilterMode returns a boolean if a field has been set. + +### GetIsProtected + +`func (o *DnsRecordGenericArrayValue) GetIsProtected() bool` + +GetIsProtected returns the IsProtected field if non-nil, zero value otherwise. + +### GetIsProtectedOk + +`func (o *DnsRecordGenericArrayValue) GetIsProtectedOk() (*bool, bool)` + +GetIsProtectedOk returns a tuple with the IsProtected field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsProtected + +`func (o *DnsRecordGenericArrayValue) SetIsProtected(v bool)` + +SetIsProtected sets IsProtected field to given value. + +### HasIsProtected + +`func (o *DnsRecordGenericArrayValue) HasIsProtected() bool` + +HasIsProtected returns a boolean if a field has been set. + +### GetUsage + +`func (o *DnsRecordGenericArrayValue) GetUsage() []string` + +GetUsage returns the Usage field if non-nil, zero value otherwise. + +### GetUsageOk + +`func (o *DnsRecordGenericArrayValue) GetUsageOk() (*[]string, bool)` + +GetUsageOk returns a tuple with the Usage field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUsage + +`func (o *DnsRecordGenericArrayValue) SetUsage(v []string)` + +SetUsage sets Usage field to given value. + +### HasUsage + +`func (o *DnsRecordGenericArrayValue) HasUsage() bool` + +HasUsage returns a boolean if a field has been set. + +### GetCreatedAt + +`func (o *DnsRecordGenericArrayValue) GetCreatedAt() time.Time` + +GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. + +### GetCreatedAtOk + +`func (o *DnsRecordGenericArrayValue) GetCreatedAtOk() (*time.Time, bool)` + +GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedAt + +`func (o *DnsRecordGenericArrayValue) SetCreatedAt(v time.Time)` + +SetCreatedAt sets CreatedAt field to given value. + +### HasCreatedAt + +`func (o *DnsRecordGenericArrayValue) HasCreatedAt() bool` + +HasCreatedAt returns a boolean if a field has been set. + +### GetUpdatedAt + +`func (o *DnsRecordGenericArrayValue) GetUpdatedAt() time.Time` + +GetUpdatedAt returns the UpdatedAt field if non-nil, zero value otherwise. + +### GetUpdatedAtOk + +`func (o *DnsRecordGenericArrayValue) GetUpdatedAtOk() (*time.Time, bool)` + +GetUpdatedAtOk returns a tuple with the UpdatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpdatedAt + +`func (o *DnsRecordGenericArrayValue) SetUpdatedAt(v time.Time)` + +SetUpdatedAt sets UpdatedAt field to given value. + +### HasUpdatedAt + +`func (o *DnsRecordGenericArrayValue) HasUpdatedAt() bool` + +HasUpdatedAt returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/DnsRecordGenericObjectValue.md b/docs/DnsRecordGenericObjectValue.md new file mode 100644 index 0000000..baf059c --- /dev/null +++ b/docs/DnsRecordGenericObjectValue.md @@ -0,0 +1,342 @@ +# DnsRecordGenericObjectValue + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | Pointer to **map[string]interface{}** | | [optional] +**Type** | Pointer to **string** | | [optional] +**Id** | Pointer to **string** | | [optional] [readonly] +**Name** | Pointer to **string** | | [optional] +**Ttl** | Pointer to **int32** | | [optional] +**Cloud** | Pointer to **bool** | | [optional] [default to false] +**UpstreamHttps** | Pointer to **string** | | [optional] +**IpFilterMode** | Pointer to [**DnsRecordIpFilterMode**](DnsRecordIpFilterMode.md) | | [optional] +**IsProtected** | Pointer to **bool** | Protected records cannot be modified or deleted by user. | [optional] [readonly] [default to false] +**Usage** | Pointer to **[]string** | | [optional] [readonly] [default to []] +**CreatedAt** | Pointer to **time.Time** | | [optional] [readonly] +**UpdatedAt** | Pointer to **time.Time** | | [optional] [readonly] + +## Methods + +### NewDnsRecordGenericObjectValue + +`func NewDnsRecordGenericObjectValue() *DnsRecordGenericObjectValue` + +NewDnsRecordGenericObjectValue instantiates a new DnsRecordGenericObjectValue object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDnsRecordGenericObjectValueWithDefaults + +`func NewDnsRecordGenericObjectValueWithDefaults() *DnsRecordGenericObjectValue` + +NewDnsRecordGenericObjectValueWithDefaults instantiates a new DnsRecordGenericObjectValue object +This 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 *DnsRecordGenericObjectValue) GetValue() map[string]interface{}` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *DnsRecordGenericObjectValue) GetValueOk() (*map[string]interface{}, 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 *DnsRecordGenericObjectValue) SetValue(v map[string]interface{})` + +SetValue sets Value field to given value. + +### HasValue + +`func (o *DnsRecordGenericObjectValue) HasValue() bool` + +HasValue returns a boolean if a field has been set. + +### GetType + +`func (o *DnsRecordGenericObjectValue) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *DnsRecordGenericObjectValue) 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 *DnsRecordGenericObjectValue) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *DnsRecordGenericObjectValue) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetId + +`func (o *DnsRecordGenericObjectValue) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *DnsRecordGenericObjectValue) 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 *DnsRecordGenericObjectValue) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *DnsRecordGenericObjectValue) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetName + +`func (o *DnsRecordGenericObjectValue) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *DnsRecordGenericObjectValue) 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 *DnsRecordGenericObjectValue) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *DnsRecordGenericObjectValue) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetTtl + +`func (o *DnsRecordGenericObjectValue) GetTtl() int32` + +GetTtl returns the Ttl field if non-nil, zero value otherwise. + +### GetTtlOk + +`func (o *DnsRecordGenericObjectValue) GetTtlOk() (*int32, bool)` + +GetTtlOk returns a tuple with the Ttl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTtl + +`func (o *DnsRecordGenericObjectValue) SetTtl(v int32)` + +SetTtl sets Ttl field to given value. + +### HasTtl + +`func (o *DnsRecordGenericObjectValue) HasTtl() bool` + +HasTtl returns a boolean if a field has been set. + +### GetCloud + +`func (o *DnsRecordGenericObjectValue) GetCloud() bool` + +GetCloud returns the Cloud field if non-nil, zero value otherwise. + +### GetCloudOk + +`func (o *DnsRecordGenericObjectValue) GetCloudOk() (*bool, bool)` + +GetCloudOk returns a tuple with the Cloud field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCloud + +`func (o *DnsRecordGenericObjectValue) SetCloud(v bool)` + +SetCloud sets Cloud field to given value. + +### HasCloud + +`func (o *DnsRecordGenericObjectValue) HasCloud() bool` + +HasCloud returns a boolean if a field has been set. + +### GetUpstreamHttps + +`func (o *DnsRecordGenericObjectValue) GetUpstreamHttps() string` + +GetUpstreamHttps returns the UpstreamHttps field if non-nil, zero value otherwise. + +### GetUpstreamHttpsOk + +`func (o *DnsRecordGenericObjectValue) GetUpstreamHttpsOk() (*string, bool)` + +GetUpstreamHttpsOk returns a tuple with the UpstreamHttps field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpstreamHttps + +`func (o *DnsRecordGenericObjectValue) SetUpstreamHttps(v string)` + +SetUpstreamHttps sets UpstreamHttps field to given value. + +### HasUpstreamHttps + +`func (o *DnsRecordGenericObjectValue) HasUpstreamHttps() bool` + +HasUpstreamHttps returns a boolean if a field has been set. + +### GetIpFilterMode + +`func (o *DnsRecordGenericObjectValue) GetIpFilterMode() DnsRecordIpFilterMode` + +GetIpFilterMode returns the IpFilterMode field if non-nil, zero value otherwise. + +### GetIpFilterModeOk + +`func (o *DnsRecordGenericObjectValue) GetIpFilterModeOk() (*DnsRecordIpFilterMode, bool)` + +GetIpFilterModeOk returns a tuple with the IpFilterMode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIpFilterMode + +`func (o *DnsRecordGenericObjectValue) SetIpFilterMode(v DnsRecordIpFilterMode)` + +SetIpFilterMode sets IpFilterMode field to given value. + +### HasIpFilterMode + +`func (o *DnsRecordGenericObjectValue) HasIpFilterMode() bool` + +HasIpFilterMode returns a boolean if a field has been set. + +### GetIsProtected + +`func (o *DnsRecordGenericObjectValue) GetIsProtected() bool` + +GetIsProtected returns the IsProtected field if non-nil, zero value otherwise. + +### GetIsProtectedOk + +`func (o *DnsRecordGenericObjectValue) GetIsProtectedOk() (*bool, bool)` + +GetIsProtectedOk returns a tuple with the IsProtected field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsProtected + +`func (o *DnsRecordGenericObjectValue) SetIsProtected(v bool)` + +SetIsProtected sets IsProtected field to given value. + +### HasIsProtected + +`func (o *DnsRecordGenericObjectValue) HasIsProtected() bool` + +HasIsProtected returns a boolean if a field has been set. + +### GetUsage + +`func (o *DnsRecordGenericObjectValue) GetUsage() []string` + +GetUsage returns the Usage field if non-nil, zero value otherwise. + +### GetUsageOk + +`func (o *DnsRecordGenericObjectValue) GetUsageOk() (*[]string, bool)` + +GetUsageOk returns a tuple with the Usage field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUsage + +`func (o *DnsRecordGenericObjectValue) SetUsage(v []string)` + +SetUsage sets Usage field to given value. + +### HasUsage + +`func (o *DnsRecordGenericObjectValue) HasUsage() bool` + +HasUsage returns a boolean if a field has been set. + +### GetCreatedAt + +`func (o *DnsRecordGenericObjectValue) GetCreatedAt() time.Time` + +GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. + +### GetCreatedAtOk + +`func (o *DnsRecordGenericObjectValue) GetCreatedAtOk() (*time.Time, bool)` + +GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedAt + +`func (o *DnsRecordGenericObjectValue) SetCreatedAt(v time.Time)` + +SetCreatedAt sets CreatedAt field to given value. + +### HasCreatedAt + +`func (o *DnsRecordGenericObjectValue) HasCreatedAt() bool` + +HasCreatedAt returns a boolean if a field has been set. + +### GetUpdatedAt + +`func (o *DnsRecordGenericObjectValue) GetUpdatedAt() time.Time` + +GetUpdatedAt returns the UpdatedAt field if non-nil, zero value otherwise. + +### GetUpdatedAtOk + +`func (o *DnsRecordGenericObjectValue) GetUpdatedAtOk() (*time.Time, bool)` + +GetUpdatedAtOk returns a tuple with the UpdatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpdatedAt + +`func (o *DnsRecordGenericObjectValue) SetUpdatedAt(v time.Time)` + +SetUpdatedAt sets UpdatedAt field to given value. + +### HasUpdatedAt + +`func (o *DnsRecordGenericObjectValue) HasUpdatedAt() bool` + +HasUpdatedAt returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/DnsRecordIpFilterMode.md b/docs/DnsRecordIpFilterMode.md new file mode 100644 index 0000000..94666bd --- /dev/null +++ b/docs/DnsRecordIpFilterMode.md @@ -0,0 +1,108 @@ +# DnsRecordIpFilterMode + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Count** | Pointer to **string** | | [optional] +**Order** | Pointer to **string** | | [optional] +**GeoFilter** | Pointer to **string** | | [optional] + +## Methods + +### NewDnsRecordIpFilterMode + +`func NewDnsRecordIpFilterMode() *DnsRecordIpFilterMode` + +NewDnsRecordIpFilterMode instantiates a new DnsRecordIpFilterMode object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDnsRecordIpFilterModeWithDefaults + +`func NewDnsRecordIpFilterModeWithDefaults() *DnsRecordIpFilterMode` + +NewDnsRecordIpFilterModeWithDefaults instantiates a new DnsRecordIpFilterMode object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCount + +`func (o *DnsRecordIpFilterMode) GetCount() string` + +GetCount returns the Count field if non-nil, zero value otherwise. + +### GetCountOk + +`func (o *DnsRecordIpFilterMode) GetCountOk() (*string, 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 *DnsRecordIpFilterMode) SetCount(v string)` + +SetCount sets Count field to given value. + +### HasCount + +`func (o *DnsRecordIpFilterMode) HasCount() bool` + +HasCount returns a boolean if a field has been set. + +### GetOrder + +`func (o *DnsRecordIpFilterMode) GetOrder() string` + +GetOrder returns the Order field if non-nil, zero value otherwise. + +### GetOrderOk + +`func (o *DnsRecordIpFilterMode) GetOrderOk() (*string, bool)` + +GetOrderOk returns a tuple with the Order field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOrder + +`func (o *DnsRecordIpFilterMode) SetOrder(v string)` + +SetOrder sets Order field to given value. + +### HasOrder + +`func (o *DnsRecordIpFilterMode) HasOrder() bool` + +HasOrder returns a boolean if a field has been set. + +### GetGeoFilter + +`func (o *DnsRecordIpFilterMode) GetGeoFilter() string` + +GetGeoFilter returns the GeoFilter field if non-nil, zero value otherwise. + +### GetGeoFilterOk + +`func (o *DnsRecordIpFilterMode) GetGeoFilterOk() (*string, bool)` + +GetGeoFilterOk returns a tuple with the GeoFilter field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetGeoFilter + +`func (o *DnsRecordIpFilterMode) SetGeoFilter(v string)` + +SetGeoFilter sets GeoFilter field to given value. + +### HasGeoFilter + +`func (o *DnsRecordIpFilterMode) HasGeoFilter() bool` + +HasGeoFilter returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/DnsRecordResponse.md b/docs/DnsRecordResponse.md new file mode 100644 index 0000000..eb8dad0 --- /dev/null +++ b/docs/DnsRecordResponse.md @@ -0,0 +1,92 @@ +# DnsRecordResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**DnsRecordGeneric**](DnsRecordGeneric.md) | | [optional] +**Message** | Pointer to **NullableString** | | [optional] + +## Methods + +### NewDnsRecordResponse + +`func NewDnsRecordResponse() *DnsRecordResponse` + +NewDnsRecordResponse instantiates a new DnsRecordResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDnsRecordResponseWithDefaults + +`func NewDnsRecordResponseWithDefaults() *DnsRecordResponse` + +NewDnsRecordResponseWithDefaults instantiates a new DnsRecordResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *DnsRecordResponse) GetData() DnsRecordGeneric` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *DnsRecordResponse) GetDataOk() (*DnsRecordGeneric, 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 *DnsRecordResponse) SetData(v DnsRecordGeneric)` + +SetData sets Data field to given value. + +### HasData + +`func (o *DnsRecordResponse) HasData() bool` + +HasData returns a boolean if a field has been set. + +### GetMessage + +`func (o *DnsRecordResponse) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *DnsRecordResponse) GetMessageOk() (*string, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessage + +`func (o *DnsRecordResponse) SetMessage(v string)` + +SetMessage sets Message field to given value. + +### HasMessage + +`func (o *DnsRecordResponse) HasMessage() bool` + +HasMessage returns a boolean if a field has been set. + +### SetMessageNil + +`func (o *DnsRecordResponse) SetMessageNil(b bool)` + + SetMessageNil sets the value for Message to be an explicit nil + +### UnsetMessage +`func (o *DnsRecordResponse) UnsetMessage()` + +UnsetMessage ensures that no value is present for Message, not even an explicit nil + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/DnsRecordsIndex200Response.md b/docs/DnsRecordsIndex200Response.md new file mode 100644 index 0000000..f06c966 --- /dev/null +++ b/docs/DnsRecordsIndex200Response.md @@ -0,0 +1,108 @@ +# DnsRecordsIndex200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**[]DnsRecordGeneric**](DnsRecordGeneric.md) | | [optional] +**Links** | Pointer to [**PaginatedResponseLinks**](PaginatedResponseLinks.md) | | [optional] +**Meta** | Pointer to [**PaginatedResponseMeta**](PaginatedResponseMeta.md) | | [optional] + +## Methods + +### NewDnsRecordsIndex200Response + +`func NewDnsRecordsIndex200Response() *DnsRecordsIndex200Response` + +NewDnsRecordsIndex200Response instantiates a new DnsRecordsIndex200Response object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDnsRecordsIndex200ResponseWithDefaults + +`func NewDnsRecordsIndex200ResponseWithDefaults() *DnsRecordsIndex200Response` + +NewDnsRecordsIndex200ResponseWithDefaults instantiates a new DnsRecordsIndex200Response object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *DnsRecordsIndex200Response) GetData() []DnsRecordGeneric` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *DnsRecordsIndex200Response) GetDataOk() (*[]DnsRecordGeneric, 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 *DnsRecordsIndex200Response) SetData(v []DnsRecordGeneric)` + +SetData sets Data field to given value. + +### HasData + +`func (o *DnsRecordsIndex200Response) HasData() bool` + +HasData returns a boolean if a field has been set. + +### GetLinks + +`func (o *DnsRecordsIndex200Response) GetLinks() PaginatedResponseLinks` + +GetLinks returns the Links field if non-nil, zero value otherwise. + +### GetLinksOk + +`func (o *DnsRecordsIndex200Response) GetLinksOk() (*PaginatedResponseLinks, bool)` + +GetLinksOk returns a tuple with the Links field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLinks + +`func (o *DnsRecordsIndex200Response) SetLinks(v PaginatedResponseLinks)` + +SetLinks sets Links field to given value. + +### HasLinks + +`func (o *DnsRecordsIndex200Response) HasLinks() bool` + +HasLinks returns a boolean if a field has been set. + +### GetMeta + +`func (o *DnsRecordsIndex200Response) GetMeta() PaginatedResponseMeta` + +GetMeta returns the Meta field if non-nil, zero value otherwise. + +### GetMetaOk + +`func (o *DnsRecordsIndex200Response) GetMetaOk() (*PaginatedResponseMeta, bool)` + +GetMetaOk returns a tuple with the Meta field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMeta + +`func (o *DnsRecordsIndex200Response) SetMeta(v PaginatedResponseMeta)` + +SetMeta sets Meta field to given value. + +### HasMeta + +`func (o *DnsRecordsIndex200Response) HasMeta() bool` + +HasMeta returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/DnsRequestReport.md b/docs/DnsRequestReport.md new file mode 100644 index 0000000..4b867fc --- /dev/null +++ b/docs/DnsRequestReport.md @@ -0,0 +1,82 @@ +# DnsRequestReport + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Statistics** | Pointer to [**DnsRequestReportStatistics**](DnsRequestReportStatistics.md) | | [optional] +**Charts** | Pointer to [**DnsRequestReportCharts**](DnsRequestReportCharts.md) | | [optional] + +## Methods + +### NewDnsRequestReport + +`func NewDnsRequestReport() *DnsRequestReport` + +NewDnsRequestReport instantiates a new DnsRequestReport object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDnsRequestReportWithDefaults + +`func NewDnsRequestReportWithDefaults() *DnsRequestReport` + +NewDnsRequestReportWithDefaults instantiates a new DnsRequestReport object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetStatistics + +`func (o *DnsRequestReport) GetStatistics() DnsRequestReportStatistics` + +GetStatistics returns the Statistics field if non-nil, zero value otherwise. + +### GetStatisticsOk + +`func (o *DnsRequestReport) GetStatisticsOk() (*DnsRequestReportStatistics, bool)` + +GetStatisticsOk returns a tuple with the Statistics field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatistics + +`func (o *DnsRequestReport) SetStatistics(v DnsRequestReportStatistics)` + +SetStatistics sets Statistics field to given value. + +### HasStatistics + +`func (o *DnsRequestReport) HasStatistics() bool` + +HasStatistics returns a boolean if a field has been set. + +### GetCharts + +`func (o *DnsRequestReport) GetCharts() DnsRequestReportCharts` + +GetCharts returns the Charts field if non-nil, zero value otherwise. + +### GetChartsOk + +`func (o *DnsRequestReport) GetChartsOk() (*DnsRequestReportCharts, bool)` + +GetChartsOk returns a tuple with the Charts field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCharts + +`func (o *DnsRequestReport) SetCharts(v DnsRequestReportCharts)` + +SetCharts sets Charts field to given value. + +### HasCharts + +`func (o *DnsRequestReport) HasCharts() bool` + +HasCharts returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/DnsRequestReportCharts.md b/docs/DnsRequestReportCharts.md new file mode 100644 index 0000000..4bd8be8 --- /dev/null +++ b/docs/DnsRequestReportCharts.md @@ -0,0 +1,56 @@ +# DnsRequestReportCharts + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Requests** | Pointer to [**DnsRequestReportChartsRequests**](DnsRequestReportChartsRequests.md) | | [optional] + +## Methods + +### NewDnsRequestReportCharts + +`func NewDnsRequestReportCharts() *DnsRequestReportCharts` + +NewDnsRequestReportCharts instantiates a new DnsRequestReportCharts object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDnsRequestReportChartsWithDefaults + +`func NewDnsRequestReportChartsWithDefaults() *DnsRequestReportCharts` + +NewDnsRequestReportChartsWithDefaults instantiates a new DnsRequestReportCharts object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetRequests + +`func (o *DnsRequestReportCharts) GetRequests() DnsRequestReportChartsRequests` + +GetRequests returns the Requests field if non-nil, zero value otherwise. + +### GetRequestsOk + +`func (o *DnsRequestReportCharts) GetRequestsOk() (*DnsRequestReportChartsRequests, bool)` + +GetRequestsOk returns a tuple with the Requests field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRequests + +`func (o *DnsRequestReportCharts) SetRequests(v DnsRequestReportChartsRequests)` + +SetRequests sets Requests field to given value. + +### HasRequests + +`func (o *DnsRequestReportCharts) HasRequests() bool` + +HasRequests returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/DnsRequestReportChartsRequests.md b/docs/DnsRequestReportChartsRequests.md new file mode 100644 index 0000000..53100ed --- /dev/null +++ b/docs/DnsRequestReportChartsRequests.md @@ -0,0 +1,108 @@ +# DnsRequestReportChartsRequests + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Title** | Pointer to **string** | | [optional] +**Categories** | Pointer to [**[]time.Time**](time.Time.md) | | [optional] +**Series** | Pointer to [**[]DnsRequestReportChartsRequestsSeriesInner**](DnsRequestReportChartsRequestsSeriesInner.md) | | [optional] + +## Methods + +### NewDnsRequestReportChartsRequests + +`func NewDnsRequestReportChartsRequests() *DnsRequestReportChartsRequests` + +NewDnsRequestReportChartsRequests instantiates a new DnsRequestReportChartsRequests object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDnsRequestReportChartsRequestsWithDefaults + +`func NewDnsRequestReportChartsRequestsWithDefaults() *DnsRequestReportChartsRequests` + +NewDnsRequestReportChartsRequestsWithDefaults instantiates a new DnsRequestReportChartsRequests object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetTitle + +`func (o *DnsRequestReportChartsRequests) GetTitle() string` + +GetTitle returns the Title field if non-nil, zero value otherwise. + +### GetTitleOk + +`func (o *DnsRequestReportChartsRequests) 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 *DnsRequestReportChartsRequests) SetTitle(v string)` + +SetTitle sets Title field to given value. + +### HasTitle + +`func (o *DnsRequestReportChartsRequests) HasTitle() bool` + +HasTitle returns a boolean if a field has been set. + +### GetCategories + +`func (o *DnsRequestReportChartsRequests) GetCategories() []time.Time` + +GetCategories returns the Categories field if non-nil, zero value otherwise. + +### GetCategoriesOk + +`func (o *DnsRequestReportChartsRequests) GetCategoriesOk() (*[]time.Time, bool)` + +GetCategoriesOk returns a tuple with the Categories field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCategories + +`func (o *DnsRequestReportChartsRequests) SetCategories(v []time.Time)` + +SetCategories sets Categories field to given value. + +### HasCategories + +`func (o *DnsRequestReportChartsRequests) HasCategories() bool` + +HasCategories returns a boolean if a field has been set. + +### GetSeries + +`func (o *DnsRequestReportChartsRequests) GetSeries() []DnsRequestReportChartsRequestsSeriesInner` + +GetSeries returns the Series field if non-nil, zero value otherwise. + +### GetSeriesOk + +`func (o *DnsRequestReportChartsRequests) GetSeriesOk() (*[]DnsRequestReportChartsRequestsSeriesInner, bool)` + +GetSeriesOk returns a tuple with the Series field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSeries + +`func (o *DnsRequestReportChartsRequests) SetSeries(v []DnsRequestReportChartsRequestsSeriesInner)` + +SetSeries sets Series field to given value. + +### HasSeries + +`func (o *DnsRequestReportChartsRequests) HasSeries() bool` + +HasSeries returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/DnsRequestReportChartsRequestsSeriesInner.md b/docs/DnsRequestReportChartsRequestsSeriesInner.md new file mode 100644 index 0000000..a0a06f6 --- /dev/null +++ b/docs/DnsRequestReportChartsRequestsSeriesInner.md @@ -0,0 +1,82 @@ +# DnsRequestReportChartsRequestsSeriesInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **string** | | [optional] +**Data** | Pointer to **[]int32** | | [optional] + +## Methods + +### NewDnsRequestReportChartsRequestsSeriesInner + +`func NewDnsRequestReportChartsRequestsSeriesInner() *DnsRequestReportChartsRequestsSeriesInner` + +NewDnsRequestReportChartsRequestsSeriesInner instantiates a new DnsRequestReportChartsRequestsSeriesInner object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDnsRequestReportChartsRequestsSeriesInnerWithDefaults + +`func NewDnsRequestReportChartsRequestsSeriesInnerWithDefaults() *DnsRequestReportChartsRequestsSeriesInner` + +NewDnsRequestReportChartsRequestsSeriesInnerWithDefaults instantiates a new DnsRequestReportChartsRequestsSeriesInner object +This 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 *DnsRequestReportChartsRequestsSeriesInner) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *DnsRequestReportChartsRequestsSeriesInner) 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 *DnsRequestReportChartsRequestsSeriesInner) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *DnsRequestReportChartsRequestsSeriesInner) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetData + +`func (o *DnsRequestReportChartsRequestsSeriesInner) GetData() []int32` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *DnsRequestReportChartsRequestsSeriesInner) GetDataOk() (*[]int32, 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 *DnsRequestReportChartsRequestsSeriesInner) SetData(v []int32)` + +SetData sets Data field to given value. + +### HasData + +`func (o *DnsRequestReportChartsRequestsSeriesInner) HasData() bool` + +HasData returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/DnsRequestReportData.md b/docs/DnsRequestReportData.md new file mode 100644 index 0000000..b06607b --- /dev/null +++ b/docs/DnsRequestReportData.md @@ -0,0 +1,56 @@ +# DnsRequestReportData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**DnsRequestReport**](DnsRequestReport.md) | | [optional] + +## Methods + +### NewDnsRequestReportData + +`func NewDnsRequestReportData() *DnsRequestReportData` + +NewDnsRequestReportData instantiates a new DnsRequestReportData object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDnsRequestReportDataWithDefaults + +`func NewDnsRequestReportDataWithDefaults() *DnsRequestReportData` + +NewDnsRequestReportDataWithDefaults instantiates a new DnsRequestReportData object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *DnsRequestReportData) GetData() DnsRequestReport` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *DnsRequestReportData) GetDataOk() (*DnsRequestReport, 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 *DnsRequestReportData) SetData(v DnsRequestReport)` + +SetData sets Data field to given value. + +### HasData + +`func (o *DnsRequestReportData) HasData() bool` + +HasData returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/DnsRequestReportStatistics.md b/docs/DnsRequestReportStatistics.md new file mode 100644 index 0000000..a6ef7a2 --- /dev/null +++ b/docs/DnsRequestReportStatistics.md @@ -0,0 +1,82 @@ +# DnsRequestReportStatistics + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Total** | Pointer to **int32** | | [optional] +**Top** | Pointer to **time.Time** | | [optional] + +## Methods + +### NewDnsRequestReportStatistics + +`func NewDnsRequestReportStatistics() *DnsRequestReportStatistics` + +NewDnsRequestReportStatistics instantiates a new DnsRequestReportStatistics object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDnsRequestReportStatisticsWithDefaults + +`func NewDnsRequestReportStatisticsWithDefaults() *DnsRequestReportStatistics` + +NewDnsRequestReportStatisticsWithDefaults instantiates a new DnsRequestReportStatistics object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetTotal + +`func (o *DnsRequestReportStatistics) GetTotal() int32` + +GetTotal returns the Total field if non-nil, zero value otherwise. + +### GetTotalOk + +`func (o *DnsRequestReportStatistics) 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 *DnsRequestReportStatistics) SetTotal(v int32)` + +SetTotal sets Total field to given value. + +### HasTotal + +`func (o *DnsRequestReportStatistics) HasTotal() bool` + +HasTotal returns a boolean if a field has been set. + +### GetTop + +`func (o *DnsRequestReportStatistics) GetTop() time.Time` + +GetTop returns the Top field if non-nil, zero value otherwise. + +### GetTopOk + +`func (o *DnsRequestReportStatistics) GetTopOk() (*time.Time, bool)` + +GetTopOk returns a tuple with the Top field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTop + +`func (o *DnsRequestReportStatistics) SetTop(v time.Time)` + +SetTop sets Top field to given value. + +### HasTop + +`func (o *DnsRequestReportStatistics) HasTop() bool` + +HasTop returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/DnsSec.md b/docs/DnsSec.md new file mode 100644 index 0000000..6bded59 --- /dev/null +++ b/docs/DnsSec.md @@ -0,0 +1,92 @@ +# DnsSec + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enabled** | Pointer to **bool** | | [optional] [default to false] +**Ds** | Pointer to **NullableString** | | [optional] + +## Methods + +### NewDnsSec + +`func NewDnsSec() *DnsSec` + +NewDnsSec instantiates a new DnsSec object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDnsSecWithDefaults + +`func NewDnsSecWithDefaults() *DnsSec` + +NewDnsSecWithDefaults instantiates a new DnsSec object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetEnabled + +`func (o *DnsSec) GetEnabled() bool` + +GetEnabled returns the Enabled field if non-nil, zero value otherwise. + +### GetEnabledOk + +`func (o *DnsSec) 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 *DnsSec) SetEnabled(v bool)` + +SetEnabled sets Enabled field to given value. + +### HasEnabled + +`func (o *DnsSec) HasEnabled() bool` + +HasEnabled returns a boolean if a field has been set. + +### GetDs + +`func (o *DnsSec) GetDs() string` + +GetDs returns the Ds field if non-nil, zero value otherwise. + +### GetDsOk + +`func (o *DnsSec) GetDsOk() (*string, bool)` + +GetDsOk returns a tuple with the Ds field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDs + +`func (o *DnsSec) SetDs(v string)` + +SetDs sets Ds field to given value. + +### HasDs + +`func (o *DnsSec) HasDs() bool` + +HasDs returns a boolean if a field has been set. + +### SetDsNil + +`func (o *DnsSec) SetDsNil(b bool)` + + SetDsNil sets the value for Ds to be an explicit nil + +### UnsetDs +`func (o *DnsSec) UnsetDs()` + +UnsetDs ensures that no value is present for Ds, not even an explicit nil + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/DnsSecData.md b/docs/DnsSecData.md new file mode 100644 index 0000000..d180b10 --- /dev/null +++ b/docs/DnsSecData.md @@ -0,0 +1,56 @@ +# DnsSecData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**DnsSec**](DnsSec.md) | | [optional] + +## Methods + +### NewDnsSecData + +`func NewDnsSecData() *DnsSecData` + +NewDnsSecData instantiates a new DnsSecData object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDnsSecDataWithDefaults + +`func NewDnsSecDataWithDefaults() *DnsSecData` + +NewDnsSecDataWithDefaults instantiates a new DnsSecData object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *DnsSecData) GetData() DnsSec` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *DnsSecData) GetDataOk() (*DnsSec, 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 *DnsSecData) SetData(v DnsSec)` + +SetData sets Data field to given value. + +### HasData + +`func (o *DnsSecData) HasData() bool` + +HasData returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/DnsSecStatus.md b/docs/DnsSecStatus.md new file mode 100644 index 0000000..c95857f --- /dev/null +++ b/docs/DnsSecStatus.md @@ -0,0 +1,51 @@ +# DnsSecStatus + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enable** | **bool** | | + +## Methods + +### NewDnsSecStatus + +`func NewDnsSecStatus(enable bool, ) *DnsSecStatus` + +NewDnsSecStatus instantiates a new DnsSecStatus object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDnsSecStatusWithDefaults + +`func NewDnsSecStatusWithDefaults() *DnsSecStatus` + +NewDnsSecStatusWithDefaults instantiates a new DnsSecStatus object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetEnable + +`func (o *DnsSecStatus) GetEnable() bool` + +GetEnable returns the Enable field if non-nil, zero value otherwise. + +### GetEnableOk + +`func (o *DnsSecStatus) GetEnableOk() (*bool, bool)` + +GetEnableOk returns a tuple with the Enable field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEnable + +`func (o *DnsSecStatus) SetEnable(v bool)` + +SetEnable sets Enable field to given value. + + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/Domain.md b/docs/Domain.md new file mode 100644 index 0000000..09a95bb --- /dev/null +++ b/docs/Domain.md @@ -0,0 +1,466 @@ +# Domain + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **string** | | [optional] [readonly] +**UserId** | Pointer to **string** | | [optional] +**Domain** | Pointer to **string** | Deprecated in favor of name attribute | [optional] +**Name** | Pointer to **string** | | [optional] +**PlanLevel** | Pointer to **int32** | - `0` - Traffic - `1` - Basic - `2` - Growth - `3` - Professional - `4` - Enterprise | [optional] +**NsKeys** | Pointer to **[]string** | Desired NS values for the domain | [optional] +**CurrentNs** | Pointer to **[]string** | Current NS values for the domain | [optional] +**TargetCname** | Pointer to **NullableString** | Current record for CNAME Setup of the domain | [optional] +**CustomCname** | Pointer to **NullableString** | Domain's custom record for CNAME Setup | [optional] +**Type** | Pointer to **string** | Partial domain is using CNAME Setup and full domain is using NS Setup | [optional] +**Status** | Pointer to **string** | | [optional] +**DnsCloud** | Pointer to **bool** | | [optional] [default to false] +**Restriction** | Pointer to **[]string** | | [optional] +**Transfer** | Pointer to [**DomainTransferData**](DomainTransferData.md) | | [optional] +**CreatedAt** | Pointer to **time.Time** | | [optional] [readonly] +**UpdatedAt** | Pointer to **time.Time** | | [optional] [readonly] + +## Methods + +### NewDomain + +`func NewDomain() *Domain` + +NewDomain instantiates a new Domain object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDomainWithDefaults + +`func NewDomainWithDefaults() *Domain` + +NewDomainWithDefaults instantiates a new Domain object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *Domain) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *Domain) 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 *Domain) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *Domain) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetUserId + +`func (o *Domain) GetUserId() string` + +GetUserId returns the UserId field if non-nil, zero value otherwise. + +### GetUserIdOk + +`func (o *Domain) 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 *Domain) SetUserId(v string)` + +SetUserId sets UserId field to given value. + +### HasUserId + +`func (o *Domain) HasUserId() bool` + +HasUserId returns a boolean if a field has been set. + +### GetDomain + +`func (o *Domain) GetDomain() string` + +GetDomain returns the Domain field if non-nil, zero value otherwise. + +### GetDomainOk + +`func (o *Domain) GetDomainOk() (*string, bool)` + +GetDomainOk returns a tuple with the Domain field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDomain + +`func (o *Domain) SetDomain(v string)` + +SetDomain sets Domain field to given value. + +### HasDomain + +`func (o *Domain) HasDomain() bool` + +HasDomain returns a boolean if a field has been set. + +### GetName + +`func (o *Domain) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *Domain) 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 *Domain) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *Domain) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetPlanLevel + +`func (o *Domain) GetPlanLevel() int32` + +GetPlanLevel returns the PlanLevel field if non-nil, zero value otherwise. + +### GetPlanLevelOk + +`func (o *Domain) GetPlanLevelOk() (*int32, bool)` + +GetPlanLevelOk returns a tuple with the PlanLevel field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPlanLevel + +`func (o *Domain) SetPlanLevel(v int32)` + +SetPlanLevel sets PlanLevel field to given value. + +### HasPlanLevel + +`func (o *Domain) HasPlanLevel() bool` + +HasPlanLevel returns a boolean if a field has been set. + +### GetNsKeys + +`func (o *Domain) GetNsKeys() []string` + +GetNsKeys returns the NsKeys field if non-nil, zero value otherwise. + +### GetNsKeysOk + +`func (o *Domain) GetNsKeysOk() (*[]string, bool)` + +GetNsKeysOk returns a tuple with the NsKeys field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNsKeys + +`func (o *Domain) SetNsKeys(v []string)` + +SetNsKeys sets NsKeys field to given value. + +### HasNsKeys + +`func (o *Domain) HasNsKeys() bool` + +HasNsKeys returns a boolean if a field has been set. + +### GetCurrentNs + +`func (o *Domain) GetCurrentNs() []string` + +GetCurrentNs returns the CurrentNs field if non-nil, zero value otherwise. + +### GetCurrentNsOk + +`func (o *Domain) GetCurrentNsOk() (*[]string, bool)` + +GetCurrentNsOk returns a tuple with the CurrentNs field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCurrentNs + +`func (o *Domain) SetCurrentNs(v []string)` + +SetCurrentNs sets CurrentNs field to given value. + +### HasCurrentNs + +`func (o *Domain) HasCurrentNs() bool` + +HasCurrentNs returns a boolean if a field has been set. + +### GetTargetCname + +`func (o *Domain) GetTargetCname() string` + +GetTargetCname returns the TargetCname field if non-nil, zero value otherwise. + +### GetTargetCnameOk + +`func (o *Domain) GetTargetCnameOk() (*string, bool)` + +GetTargetCnameOk returns a tuple with the TargetCname field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTargetCname + +`func (o *Domain) SetTargetCname(v string)` + +SetTargetCname sets TargetCname field to given value. + +### HasTargetCname + +`func (o *Domain) HasTargetCname() bool` + +HasTargetCname returns a boolean if a field has been set. + +### SetTargetCnameNil + +`func (o *Domain) SetTargetCnameNil(b bool)` + + SetTargetCnameNil sets the value for TargetCname to be an explicit nil + +### UnsetTargetCname +`func (o *Domain) UnsetTargetCname()` + +UnsetTargetCname ensures that no value is present for TargetCname, not even an explicit nil +### GetCustomCname + +`func (o *Domain) GetCustomCname() string` + +GetCustomCname returns the CustomCname field if non-nil, zero value otherwise. + +### GetCustomCnameOk + +`func (o *Domain) GetCustomCnameOk() (*string, bool)` + +GetCustomCnameOk returns a tuple with the CustomCname field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCustomCname + +`func (o *Domain) SetCustomCname(v string)` + +SetCustomCname sets CustomCname field to given value. + +### HasCustomCname + +`func (o *Domain) HasCustomCname() bool` + +HasCustomCname returns a boolean if a field has been set. + +### SetCustomCnameNil + +`func (o *Domain) SetCustomCnameNil(b bool)` + + SetCustomCnameNil sets the value for CustomCname to be an explicit nil + +### UnsetCustomCname +`func (o *Domain) UnsetCustomCname()` + +UnsetCustomCname ensures that no value is present for CustomCname, not even an explicit nil +### GetType + +`func (o *Domain) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *Domain) 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 *Domain) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *Domain) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetStatus + +`func (o *Domain) GetStatus() string` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *Domain) GetStatusOk() (*string, 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 *Domain) SetStatus(v string)` + +SetStatus sets Status field to given value. + +### HasStatus + +`func (o *Domain) HasStatus() bool` + +HasStatus returns a boolean if a field has been set. + +### GetDnsCloud + +`func (o *Domain) GetDnsCloud() bool` + +GetDnsCloud returns the DnsCloud field if non-nil, zero value otherwise. + +### GetDnsCloudOk + +`func (o *Domain) GetDnsCloudOk() (*bool, bool)` + +GetDnsCloudOk returns a tuple with the DnsCloud field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDnsCloud + +`func (o *Domain) SetDnsCloud(v bool)` + +SetDnsCloud sets DnsCloud field to given value. + +### HasDnsCloud + +`func (o *Domain) HasDnsCloud() bool` + +HasDnsCloud returns a boolean if a field has been set. + +### GetRestriction + +`func (o *Domain) GetRestriction() []string` + +GetRestriction returns the Restriction field if non-nil, zero value otherwise. + +### GetRestrictionOk + +`func (o *Domain) GetRestrictionOk() (*[]string, bool)` + +GetRestrictionOk returns a tuple with the Restriction field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRestriction + +`func (o *Domain) SetRestriction(v []string)` + +SetRestriction sets Restriction field to given value. + +### HasRestriction + +`func (o *Domain) HasRestriction() bool` + +HasRestriction returns a boolean if a field has been set. + +### GetTransfer + +`func (o *Domain) GetTransfer() DomainTransferData` + +GetTransfer returns the Transfer field if non-nil, zero value otherwise. + +### GetTransferOk + +`func (o *Domain) GetTransferOk() (*DomainTransferData, bool)` + +GetTransferOk returns a tuple with the Transfer field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTransfer + +`func (o *Domain) SetTransfer(v DomainTransferData)` + +SetTransfer sets Transfer field to given value. + +### HasTransfer + +`func (o *Domain) HasTransfer() bool` + +HasTransfer returns a boolean if a field has been set. + +### GetCreatedAt + +`func (o *Domain) GetCreatedAt() time.Time` + +GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. + +### GetCreatedAtOk + +`func (o *Domain) GetCreatedAtOk() (*time.Time, bool)` + +GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedAt + +`func (o *Domain) SetCreatedAt(v time.Time)` + +SetCreatedAt sets CreatedAt field to given value. + +### HasCreatedAt + +`func (o *Domain) HasCreatedAt() bool` + +HasCreatedAt returns a boolean if a field has been set. + +### GetUpdatedAt + +`func (o *Domain) GetUpdatedAt() time.Time` + +GetUpdatedAt returns the UpdatedAt field if non-nil, zero value otherwise. + +### GetUpdatedAtOk + +`func (o *Domain) GetUpdatedAtOk() (*time.Time, bool)` + +GetUpdatedAtOk returns a tuple with the UpdatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpdatedAt + +`func (o *Domain) SetUpdatedAt(v time.Time)` + +SetUpdatedAt sets UpdatedAt field to given value. + +### HasUpdatedAt + +`func (o *Domain) HasUpdatedAt() bool` + +HasUpdatedAt returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/DomainApi.md b/docs/DomainApi.md new file mode 100644 index 0000000..92c036b --- /dev/null +++ b/docs/DomainApi.md @@ -0,0 +1,1049 @@ +# \DomainApi + +All URIs are relative to *https://napi.arvancloud.ir/cdn/4.0* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DomainsClone**](DomainApi.md#DomainsClone) | **Post** /domains/{domain}/clone | Clone a domain config from another one +[**DomainsCnameSetupCheck**](DomainApi.md#DomainsCnameSetupCheck) | **Get** /domains/{domain}/cname-setup/check | Check Cname Setup to find whether domain is activated +[**DomainsCnameSetupConvert**](DomainApi.md#DomainsCnameSetupConvert) | **Post** /domains/{domain}/cname-setup/convert | Convert domain setup to cname +[**DomainsCnameSetupReset**](DomainApi.md#DomainsCnameSetupReset) | **Delete** /domains/{domain}/cname-setup/custom | Reset the custom record of CNAME Setup to the default value +[**DomainsCnameSetupSet**](DomainApi.md#DomainsCnameSetupSet) | **Put** /domains/{domain}/cname-setup/custom | Set a custom record for using CNAME Setup +[**DomainsDestroy**](DomainApi.md#DomainsDestroy) | **Delete** /domains/{domain} | Remove the domain +[**DomainsIndex**](DomainApi.md#DomainsIndex) | **Get** /domains | Get the list of domains +[**DomainsNameserversCheck**](DomainApi.md#DomainsNameserversCheck) | **Get** /domains/{domain}/ns-keys/check | Check NS to find whether domain is activated +[**DomainsNameserversDeprecatedCheck**](DomainApi.md#DomainsNameserversDeprecatedCheck) | **Put** /domains/{domain}/dns-service/check-ns | Deprecated in favor /ns-keys/check +[**DomainsNameserversOptional**](DomainApi.md#DomainsNameserversOptional) | **Post** /domains/{domain}/ns-keys/use-optional-keys | Use optional NS keys +[**DomainsNameserversReset**](DomainApi.md#DomainsNameserversReset) | **Delete** /domains/{domain}/ns-keys | Reset custom Nameserver keys to the default values for the domain +[**DomainsNameserversSet**](DomainApi.md#DomainsNameserversSet) | **Put** /domains/{domain}/ns-keys | Set custom NS records for the domain +[**DomainsRegenerate**](DomainApi.md#DomainsRegenerate) | **Post** /domains/{domain}/regenerate | Regenerate domain settings for edge servers +[**DomainsShow**](DomainApi.md#DomainsShow) | **Get** /domains/{domain} | Get information of the domain +[**DomainsStore**](DomainApi.md#DomainsStore) | **Post** /domains/dns-service | Create new domain + + + +## DomainsClone + +> MessageResponse DomainsClone(ctx, domain).CloneDomain(cloneDomain).Execute() + +Clone a domain config from another one + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + cloneDomain := *openapiclient.NewCloneDomain("From_example") // CloneDomain | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DomainApi.DomainsClone(context.Background(), domain).CloneDomain(cloneDomain).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DomainApi.DomainsClone``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DomainsClone`: MessageResponse + fmt.Fprintf(os.Stdout, "Response from `DomainApi.DomainsClone`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDomainsCloneRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **cloneDomain** | [**CloneDomain**](CloneDomain.md) | | + +### Return type + +[**MessageResponse**](MessageResponse.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## DomainsCnameSetupCheck + +> DomainResponse DomainsCnameSetupCheck(ctx, domain).Execute() + +Check Cname Setup to find whether domain is activated + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DomainApi.DomainsCnameSetupCheck(context.Background(), domain).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DomainApi.DomainsCnameSetupCheck``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DomainsCnameSetupCheck`: DomainResponse + fmt.Fprintf(os.Stdout, "Response from `DomainApi.DomainsCnameSetupCheck`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDomainsCnameSetupCheckRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**DomainResponse**](DomainResponse.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## DomainsCnameSetupConvert + +> DomainResponse DomainsCnameSetupConvert(ctx, domain).Execute() + +Convert domain setup to cname + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DomainApi.DomainsCnameSetupConvert(context.Background(), domain).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DomainApi.DomainsCnameSetupConvert``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DomainsCnameSetupConvert`: DomainResponse + fmt.Fprintf(os.Stdout, "Response from `DomainApi.DomainsCnameSetupConvert`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDomainsCnameSetupConvertRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**DomainResponse**](DomainResponse.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## DomainsCnameSetupReset + +> DomainResponse DomainsCnameSetupReset(ctx, domain).Execute() + +Reset the custom record of CNAME Setup to the default value + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DomainApi.DomainsCnameSetupReset(context.Background(), domain).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DomainApi.DomainsCnameSetupReset``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DomainsCnameSetupReset`: DomainResponse + fmt.Fprintf(os.Stdout, "Response from `DomainApi.DomainsCnameSetupReset`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDomainsCnameSetupResetRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**DomainResponse**](DomainResponse.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## DomainsCnameSetupSet + +> DomainResponse DomainsCnameSetupSet(ctx, domain).CustomCname(customCname).Execute() + +Set a custom record for using CNAME Setup + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + customCname := *openapiclient.NewCustomCname("Address_example") // CustomCname | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DomainApi.DomainsCnameSetupSet(context.Background(), domain).CustomCname(customCname).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DomainApi.DomainsCnameSetupSet``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DomainsCnameSetupSet`: DomainResponse + fmt.Fprintf(os.Stdout, "Response from `DomainApi.DomainsCnameSetupSet`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDomainsCnameSetupSetRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **customCname** | [**CustomCname**](CustomCname.md) | | + +### Return type + +[**DomainResponse**](DomainResponse.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## DomainsDestroy + +> MessageResponse DomainsDestroy(ctx, domain).Id(id).Execute() + +Remove the domain + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DomainApi.DomainsDestroy(context.Background(), domain).Id(id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DomainApi.DomainsDestroy``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DomainsDestroy`: MessageResponse + fmt.Fprintf(os.Stdout, "Response from `DomainApi.DomainsDestroy`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDomainsDestroyRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **id** | **string** | | + +### Return type + +[**MessageResponse**](MessageResponse.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## DomainsIndex + +> DomainsIndex200Response DomainsIndex(ctx).Search(search).PerPage(perPage).Page(page).Execute() + +Get the list of domains + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + search := "search_example" // string | Search term (optional) + perPage := int32(56) // int32 | Set how many items returned per page (optional) + page := int32(56) // int32 | Set the desired page number (optional) (default to 1) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DomainApi.DomainsIndex(context.Background()).Search(search).PerPage(perPage).Page(page).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DomainApi.DomainsIndex``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DomainsIndex`: DomainsIndex200Response + fmt.Fprintf(os.Stdout, "Response from `DomainApi.DomainsIndex`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiDomainsIndexRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **search** | **string** | Search term | + **perPage** | **int32** | Set how many items returned per page | + **page** | **int32** | Set the desired page number | [default to 1] + +### Return type + +[**DomainsIndex200Response**](DomainsIndex200Response.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## DomainsNameserversCheck + +> DomainsNameserversCheck200Response DomainsNameserversCheck(ctx, domain).Execute() + +Check NS to find whether domain is activated + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DomainApi.DomainsNameserversCheck(context.Background(), domain).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DomainApi.DomainsNameserversCheck``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DomainsNameserversCheck`: DomainsNameserversCheck200Response + fmt.Fprintf(os.Stdout, "Response from `DomainApi.DomainsNameserversCheck`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDomainsNameserversCheckRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**DomainsNameserversCheck200Response**](DomainsNameserversCheck200Response.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## DomainsNameserversDeprecatedCheck + +> DomainsNameserversDeprecatedCheck200Response DomainsNameserversDeprecatedCheck(ctx, domain).Execute() + +Deprecated in favor /ns-keys/check + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DomainApi.DomainsNameserversDeprecatedCheck(context.Background(), domain).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DomainApi.DomainsNameserversDeprecatedCheck``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DomainsNameserversDeprecatedCheck`: DomainsNameserversDeprecatedCheck200Response + fmt.Fprintf(os.Stdout, "Response from `DomainApi.DomainsNameserversDeprecatedCheck`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDomainsNameserversDeprecatedCheckRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**DomainsNameserversDeprecatedCheck200Response**](DomainsNameserversDeprecatedCheck200Response.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## DomainsNameserversOptional + +> NsKeysResponse DomainsNameserversOptional(ctx, domain).Execute() + +Use optional NS keys + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DomainApi.DomainsNameserversOptional(context.Background(), domain).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DomainApi.DomainsNameserversOptional``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DomainsNameserversOptional`: NsKeysResponse + fmt.Fprintf(os.Stdout, "Response from `DomainApi.DomainsNameserversOptional`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDomainsNameserversOptionalRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**NsKeysResponse**](NsKeysResponse.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## DomainsNameserversReset + +> NsKeysResponse DomainsNameserversReset(ctx, domain).Execute() + +Reset custom Nameserver keys to the default values for the domain + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DomainApi.DomainsNameserversReset(context.Background(), domain).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DomainApi.DomainsNameserversReset``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DomainsNameserversReset`: NsKeysResponse + fmt.Fprintf(os.Stdout, "Response from `DomainApi.DomainsNameserversReset`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDomainsNameserversResetRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**NsKeysResponse**](NsKeysResponse.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## DomainsNameserversSet + +> NsKeysResponse DomainsNameserversSet(ctx, domain).NsKeys(nsKeys).Execute() + +Set custom NS records for the domain + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + nsKeys := *openapiclient.NewNsKeys() // NsKeys | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DomainApi.DomainsNameserversSet(context.Background(), domain).NsKeys(nsKeys).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DomainApi.DomainsNameserversSet``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DomainsNameserversSet`: NsKeysResponse + fmt.Fprintf(os.Stdout, "Response from `DomainApi.DomainsNameserversSet`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDomainsNameserversSetRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **nsKeys** | [**NsKeys**](NsKeys.md) | | + +### Return type + +[**NsKeysResponse**](NsKeysResponse.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## DomainsRegenerate + +> MessageResponse DomainsRegenerate(ctx, domain).Execute() + +Regenerate domain settings for edge servers + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DomainApi.DomainsRegenerate(context.Background(), domain).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DomainApi.DomainsRegenerate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DomainsRegenerate`: MessageResponse + fmt.Fprintf(os.Stdout, "Response from `DomainApi.DomainsRegenerate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDomainsRegenerateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**MessageResponse**](MessageResponse.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## DomainsShow + +> DomainResponse DomainsShow(ctx, domain).Execute() + +Get information of the domain + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DomainApi.DomainsShow(context.Background(), domain).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DomainApi.DomainsShow``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DomainsShow`: DomainResponse + fmt.Fprintf(os.Stdout, "Response from `DomainApi.DomainsShow`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDomainsShowRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**DomainResponse**](DomainResponse.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## DomainsStore + +> DomainResponse DomainsStore(ctx).DomainStore(domainStore).Execute() + +Create new domain + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domainStore := *openapiclient.NewDomainStore("Domain_example") // DomainStore | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DomainApi.DomainsStore(context.Background()).DomainStore(domainStore).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DomainApi.DomainsStore``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DomainsStore`: DomainResponse + fmt.Fprintf(os.Stdout, "Response from `DomainApi.DomainsStore`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiDomainsStoreRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **domainStore** | [**DomainStore**](DomainStore.md) | | + +### Return type + +[**DomainResponse**](DomainResponse.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + diff --git a/docs/DomainCdnApp.md b/docs/DomainCdnApp.md new file mode 100644 index 0000000..b80ef57 --- /dev/null +++ b/docs/DomainCdnApp.md @@ -0,0 +1,212 @@ +# DomainCdnApp + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **string** | | [optional] [readonly] +**DomainId** | Pointer to **string** | | [optional] [readonly] +**ApplicationId** | Pointer to **string** | | [optional] [readonly] +**Active** | Pointer to **bool** | | [optional] +**Options** | Pointer to **map[string]interface{}** | | [optional] +**CreatedAt** | Pointer to **time.Time** | | [optional] [readonly] +**UpdatedAt** | Pointer to **time.Time** | | [optional] [readonly] + +## Methods + +### NewDomainCdnApp + +`func NewDomainCdnApp() *DomainCdnApp` + +NewDomainCdnApp instantiates a new DomainCdnApp object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDomainCdnAppWithDefaults + +`func NewDomainCdnAppWithDefaults() *DomainCdnApp` + +NewDomainCdnAppWithDefaults instantiates a new DomainCdnApp object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *DomainCdnApp) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *DomainCdnApp) 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 *DomainCdnApp) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *DomainCdnApp) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetDomainId + +`func (o *DomainCdnApp) GetDomainId() string` + +GetDomainId returns the DomainId field if non-nil, zero value otherwise. + +### GetDomainIdOk + +`func (o *DomainCdnApp) GetDomainIdOk() (*string, bool)` + +GetDomainIdOk returns a tuple with the DomainId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDomainId + +`func (o *DomainCdnApp) SetDomainId(v string)` + +SetDomainId sets DomainId field to given value. + +### HasDomainId + +`func (o *DomainCdnApp) HasDomainId() bool` + +HasDomainId returns a boolean if a field has been set. + +### GetApplicationId + +`func (o *DomainCdnApp) GetApplicationId() string` + +GetApplicationId returns the ApplicationId field if non-nil, zero value otherwise. + +### GetApplicationIdOk + +`func (o *DomainCdnApp) GetApplicationIdOk() (*string, bool)` + +GetApplicationIdOk returns a tuple with the ApplicationId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetApplicationId + +`func (o *DomainCdnApp) SetApplicationId(v string)` + +SetApplicationId sets ApplicationId field to given value. + +### HasApplicationId + +`func (o *DomainCdnApp) HasApplicationId() bool` + +HasApplicationId returns a boolean if a field has been set. + +### GetActive + +`func (o *DomainCdnApp) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *DomainCdnApp) GetActiveOk() (*bool, 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 *DomainCdnApp) SetActive(v bool)` + +SetActive sets Active field to given value. + +### HasActive + +`func (o *DomainCdnApp) HasActive() bool` + +HasActive returns a boolean if a field has been set. + +### GetOptions + +`func (o *DomainCdnApp) GetOptions() map[string]interface{}` + +GetOptions returns the Options field if non-nil, zero value otherwise. + +### GetOptionsOk + +`func (o *DomainCdnApp) GetOptionsOk() (*map[string]interface{}, bool)` + +GetOptionsOk returns a tuple with the Options field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOptions + +`func (o *DomainCdnApp) SetOptions(v map[string]interface{})` + +SetOptions sets Options field to given value. + +### HasOptions + +`func (o *DomainCdnApp) HasOptions() bool` + +HasOptions returns a boolean if a field has been set. + +### GetCreatedAt + +`func (o *DomainCdnApp) GetCreatedAt() time.Time` + +GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. + +### GetCreatedAtOk + +`func (o *DomainCdnApp) GetCreatedAtOk() (*time.Time, bool)` + +GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedAt + +`func (o *DomainCdnApp) SetCreatedAt(v time.Time)` + +SetCreatedAt sets CreatedAt field to given value. + +### HasCreatedAt + +`func (o *DomainCdnApp) HasCreatedAt() bool` + +HasCreatedAt returns a boolean if a field has been set. + +### GetUpdatedAt + +`func (o *DomainCdnApp) GetUpdatedAt() time.Time` + +GetUpdatedAt returns the UpdatedAt field if non-nil, zero value otherwise. + +### GetUpdatedAtOk + +`func (o *DomainCdnApp) GetUpdatedAtOk() (*time.Time, bool)` + +GetUpdatedAtOk returns a tuple with the UpdatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpdatedAt + +`func (o *DomainCdnApp) SetUpdatedAt(v time.Time)` + +SetUpdatedAt sets UpdatedAt field to given value. + +### HasUpdatedAt + +`func (o *DomainCdnApp) HasUpdatedAt() bool` + +HasUpdatedAt returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/DomainPurgeTags.md b/docs/DomainPurgeTags.md new file mode 100644 index 0000000..925c478 --- /dev/null +++ b/docs/DomainPurgeTags.md @@ -0,0 +1,134 @@ +# DomainPurgeTags + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DomainId** | Pointer to **string** | | [optional] +**Tags** | Pointer to **[]string** | | [optional] +**CreatedAt** | Pointer to **time.Time** | | [optional] +**UpdatedAt** | Pointer to **time.Time** | | [optional] + +## Methods + +### NewDomainPurgeTags + +`func NewDomainPurgeTags() *DomainPurgeTags` + +NewDomainPurgeTags instantiates a new DomainPurgeTags object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDomainPurgeTagsWithDefaults + +`func NewDomainPurgeTagsWithDefaults() *DomainPurgeTags` + +NewDomainPurgeTagsWithDefaults instantiates a new DomainPurgeTags object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetDomainId + +`func (o *DomainPurgeTags) GetDomainId() string` + +GetDomainId returns the DomainId field if non-nil, zero value otherwise. + +### GetDomainIdOk + +`func (o *DomainPurgeTags) GetDomainIdOk() (*string, bool)` + +GetDomainIdOk returns a tuple with the DomainId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDomainId + +`func (o *DomainPurgeTags) SetDomainId(v string)` + +SetDomainId sets DomainId field to given value. + +### HasDomainId + +`func (o *DomainPurgeTags) HasDomainId() bool` + +HasDomainId returns a boolean if a field has been set. + +### GetTags + +`func (o *DomainPurgeTags) GetTags() []string` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *DomainPurgeTags) 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 *DomainPurgeTags) SetTags(v []string)` + +SetTags sets Tags field to given value. + +### HasTags + +`func (o *DomainPurgeTags) HasTags() bool` + +HasTags returns a boolean if a field has been set. + +### GetCreatedAt + +`func (o *DomainPurgeTags) GetCreatedAt() time.Time` + +GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. + +### GetCreatedAtOk + +`func (o *DomainPurgeTags) GetCreatedAtOk() (*time.Time, bool)` + +GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedAt + +`func (o *DomainPurgeTags) SetCreatedAt(v time.Time)` + +SetCreatedAt sets CreatedAt field to given value. + +### HasCreatedAt + +`func (o *DomainPurgeTags) HasCreatedAt() bool` + +HasCreatedAt returns a boolean if a field has been set. + +### GetUpdatedAt + +`func (o *DomainPurgeTags) GetUpdatedAt() time.Time` + +GetUpdatedAt returns the UpdatedAt field if non-nil, zero value otherwise. + +### GetUpdatedAtOk + +`func (o *DomainPurgeTags) GetUpdatedAtOk() (*time.Time, bool)` + +GetUpdatedAtOk returns a tuple with the UpdatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpdatedAt + +`func (o *DomainPurgeTags) SetUpdatedAt(v time.Time)` + +SetUpdatedAt sets UpdatedAt field to given value. + +### HasUpdatedAt + +`func (o *DomainPurgeTags) HasUpdatedAt() bool` + +HasUpdatedAt returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/DomainResponse.md b/docs/DomainResponse.md new file mode 100644 index 0000000..63f9f6a --- /dev/null +++ b/docs/DomainResponse.md @@ -0,0 +1,92 @@ +# DomainResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**Domain**](Domain.md) | | [optional] +**Message** | Pointer to **NullableString** | | [optional] + +## Methods + +### NewDomainResponse + +`func NewDomainResponse() *DomainResponse` + +NewDomainResponse instantiates a new DomainResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDomainResponseWithDefaults + +`func NewDomainResponseWithDefaults() *DomainResponse` + +NewDomainResponseWithDefaults instantiates a new DomainResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *DomainResponse) GetData() Domain` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *DomainResponse) GetDataOk() (*Domain, 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 *DomainResponse) SetData(v Domain)` + +SetData sets Data field to given value. + +### HasData + +`func (o *DomainResponse) HasData() bool` + +HasData returns a boolean if a field has been set. + +### GetMessage + +`func (o *DomainResponse) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *DomainResponse) GetMessageOk() (*string, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessage + +`func (o *DomainResponse) SetMessage(v string)` + +SetMessage sets Message field to given value. + +### HasMessage + +`func (o *DomainResponse) HasMessage() bool` + +HasMessage returns a boolean if a field has been set. + +### SetMessageNil + +`func (o *DomainResponse) SetMessageNil(b bool)` + + SetMessageNil sets the value for Message to be an explicit nil + +### UnsetMessage +`func (o *DomainResponse) UnsetMessage()` + +UnsetMessage ensures that no value is present for Message, not even an explicit nil + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/DomainStore.md b/docs/DomainStore.md new file mode 100644 index 0000000..3e9ce83 --- /dev/null +++ b/docs/DomainStore.md @@ -0,0 +1,103 @@ +# DomainStore + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Domain** | **string** | Name of the domain | +**DomainType** | Pointer to **string** | If you want to register a subdomain, you can use cname setup by sending partial type | [optional] [default to "full"] +**PlanLevel** | Pointer to **int32** | - `0` - Traffic - `1` - Basic - `2` - Growth - `3` - Professional - `4` - Enterprise | [optional] + +## Methods + +### NewDomainStore + +`func NewDomainStore(domain string, ) *DomainStore` + +NewDomainStore instantiates a new DomainStore object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDomainStoreWithDefaults + +`func NewDomainStoreWithDefaults() *DomainStore` + +NewDomainStoreWithDefaults instantiates a new DomainStore object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetDomain + +`func (o *DomainStore) GetDomain() string` + +GetDomain returns the Domain field if non-nil, zero value otherwise. + +### GetDomainOk + +`func (o *DomainStore) GetDomainOk() (*string, bool)` + +GetDomainOk returns a tuple with the Domain field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDomain + +`func (o *DomainStore) SetDomain(v string)` + +SetDomain sets Domain field to given value. + + +### GetDomainType + +`func (o *DomainStore) GetDomainType() string` + +GetDomainType returns the DomainType field if non-nil, zero value otherwise. + +### GetDomainTypeOk + +`func (o *DomainStore) GetDomainTypeOk() (*string, bool)` + +GetDomainTypeOk returns a tuple with the DomainType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDomainType + +`func (o *DomainStore) SetDomainType(v string)` + +SetDomainType sets DomainType field to given value. + +### HasDomainType + +`func (o *DomainStore) HasDomainType() bool` + +HasDomainType returns a boolean if a field has been set. + +### GetPlanLevel + +`func (o *DomainStore) GetPlanLevel() int32` + +GetPlanLevel returns the PlanLevel field if non-nil, zero value otherwise. + +### GetPlanLevelOk + +`func (o *DomainStore) GetPlanLevelOk() (*int32, bool)` + +GetPlanLevelOk returns a tuple with the PlanLevel field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPlanLevel + +`func (o *DomainStore) SetPlanLevel(v int32)` + +SetPlanLevel sets PlanLevel field to given value. + +### HasPlanLevel + +`func (o *DomainStore) HasPlanLevel() bool` + +HasPlanLevel returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/DomainTransferApi.md b/docs/DomainTransferApi.md new file mode 100644 index 0000000..adf499f --- /dev/null +++ b/docs/DomainTransferApi.md @@ -0,0 +1,213 @@ +# \DomainTransferApi + +All URIs are relative to *https://napi.arvancloud.ir/cdn/4.0* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DomainsTransferIndex**](DomainTransferApi.md#DomainsTransferIndex) | **Get** /domains/transfer | Get the list of pending transfers +[**DomainsTransferStore**](DomainTransferApi.md#DomainsTransferStore) | **Post** /domains/{domain}/transfer | Transfer domain to another account +[**DomainsTransferUpdate**](DomainTransferApi.md#DomainsTransferUpdate) | **Post** /domains/transfer/change-status | Accept or cancel transferring a domain + + + +## DomainsTransferIndex + +> DomainsTransferIndex200Response DomainsTransferIndex(ctx).PerPage(perPage).Page(page).Type_(type_).Execute() + +Get the list of pending transfers + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + perPage := int32(56) // int32 | Set how many items returned per page (optional) + page := int32(56) // int32 | Set the desired page number (optional) (default to 1) + type_ := "type__example" // string | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DomainTransferApi.DomainsTransferIndex(context.Background()).PerPage(perPage).Page(page).Type_(type_).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DomainTransferApi.DomainsTransferIndex``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DomainsTransferIndex`: DomainsTransferIndex200Response + fmt.Fprintf(os.Stdout, "Response from `DomainTransferApi.DomainsTransferIndex`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiDomainsTransferIndexRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **perPage** | **int32** | Set how many items returned per page | + **page** | **int32** | Set the desired page number | [default to 1] + **type_** | **string** | | + +### Return type + +[**DomainsTransferIndex200Response**](DomainsTransferIndex200Response.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## DomainsTransferStore + +> DomainTransferData DomainsTransferStore(ctx, domain).TransferDomain(transferDomain).Execute() + +Transfer domain to another account + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + transferDomain := *openapiclient.NewTransferDomain("AccountId_example") // TransferDomain | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DomainTransferApi.DomainsTransferStore(context.Background(), domain).TransferDomain(transferDomain).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DomainTransferApi.DomainsTransferStore``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DomainsTransferStore`: DomainTransferData + fmt.Fprintf(os.Stdout, "Response from `DomainTransferApi.DomainsTransferStore`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDomainsTransferStoreRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **transferDomain** | [**TransferDomain**](TransferDomain.md) | | + +### Return type + +[**DomainTransferData**](DomainTransferData.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## DomainsTransferUpdate + +> MessageResponse DomainsTransferUpdate(ctx).TransferDomainChangeStatus(transferDomainChangeStatus).Execute() + +Accept or cancel transferring a domain + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + transferDomainChangeStatus := *openapiclient.NewTransferDomainChangeStatus("example.com", "Status_example") // TransferDomainChangeStatus | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DomainTransferApi.DomainsTransferUpdate(context.Background()).TransferDomainChangeStatus(transferDomainChangeStatus).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DomainTransferApi.DomainsTransferUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DomainsTransferUpdate`: MessageResponse + fmt.Fprintf(os.Stdout, "Response from `DomainTransferApi.DomainsTransferUpdate`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiDomainsTransferUpdateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **transferDomainChangeStatus** | [**TransferDomainChangeStatus**](TransferDomainChangeStatus.md) | | + +### Return type + +[**MessageResponse**](MessageResponse.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + diff --git a/docs/DomainTransferData.md b/docs/DomainTransferData.md new file mode 100644 index 0000000..67f63a4 --- /dev/null +++ b/docs/DomainTransferData.md @@ -0,0 +1,212 @@ +# DomainTransferData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Domain** | Pointer to **string** | | [optional] +**AccountId** | Pointer to **string** | | [optional] +**AccountName** | Pointer to **string** | | [optional] +**OwnerName** | Pointer to **string** | | [optional] +**OwnerId** | Pointer to **string** | | [optional] +**Time** | Pointer to **time.Time** | | [optional] +**Incoming** | Pointer to **bool** | | [optional] + +## Methods + +### NewDomainTransferData + +`func NewDomainTransferData() *DomainTransferData` + +NewDomainTransferData instantiates a new DomainTransferData object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDomainTransferDataWithDefaults + +`func NewDomainTransferDataWithDefaults() *DomainTransferData` + +NewDomainTransferDataWithDefaults instantiates a new DomainTransferData object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetDomain + +`func (o *DomainTransferData) GetDomain() string` + +GetDomain returns the Domain field if non-nil, zero value otherwise. + +### GetDomainOk + +`func (o *DomainTransferData) GetDomainOk() (*string, bool)` + +GetDomainOk returns a tuple with the Domain field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDomain + +`func (o *DomainTransferData) SetDomain(v string)` + +SetDomain sets Domain field to given value. + +### HasDomain + +`func (o *DomainTransferData) HasDomain() bool` + +HasDomain returns a boolean if a field has been set. + +### GetAccountId + +`func (o *DomainTransferData) GetAccountId() string` + +GetAccountId returns the AccountId field if non-nil, zero value otherwise. + +### GetAccountIdOk + +`func (o *DomainTransferData) GetAccountIdOk() (*string, bool)` + +GetAccountIdOk returns a tuple with the AccountId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccountId + +`func (o *DomainTransferData) SetAccountId(v string)` + +SetAccountId sets AccountId field to given value. + +### HasAccountId + +`func (o *DomainTransferData) HasAccountId() bool` + +HasAccountId returns a boolean if a field has been set. + +### GetAccountName + +`func (o *DomainTransferData) GetAccountName() string` + +GetAccountName returns the AccountName field if non-nil, zero value otherwise. + +### GetAccountNameOk + +`func (o *DomainTransferData) GetAccountNameOk() (*string, bool)` + +GetAccountNameOk returns a tuple with the AccountName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccountName + +`func (o *DomainTransferData) SetAccountName(v string)` + +SetAccountName sets AccountName field to given value. + +### HasAccountName + +`func (o *DomainTransferData) HasAccountName() bool` + +HasAccountName returns a boolean if a field has been set. + +### GetOwnerName + +`func (o *DomainTransferData) GetOwnerName() string` + +GetOwnerName returns the OwnerName field if non-nil, zero value otherwise. + +### GetOwnerNameOk + +`func (o *DomainTransferData) GetOwnerNameOk() (*string, bool)` + +GetOwnerNameOk returns a tuple with the OwnerName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOwnerName + +`func (o *DomainTransferData) SetOwnerName(v string)` + +SetOwnerName sets OwnerName field to given value. + +### HasOwnerName + +`func (o *DomainTransferData) HasOwnerName() bool` + +HasOwnerName returns a boolean if a field has been set. + +### GetOwnerId + +`func (o *DomainTransferData) GetOwnerId() string` + +GetOwnerId returns the OwnerId field if non-nil, zero value otherwise. + +### GetOwnerIdOk + +`func (o *DomainTransferData) GetOwnerIdOk() (*string, bool)` + +GetOwnerIdOk returns a tuple with the OwnerId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOwnerId + +`func (o *DomainTransferData) SetOwnerId(v string)` + +SetOwnerId sets OwnerId field to given value. + +### HasOwnerId + +`func (o *DomainTransferData) HasOwnerId() bool` + +HasOwnerId returns a boolean if a field has been set. + +### GetTime + +`func (o *DomainTransferData) GetTime() time.Time` + +GetTime returns the Time field if non-nil, zero value otherwise. + +### GetTimeOk + +`func (o *DomainTransferData) GetTimeOk() (*time.Time, bool)` + +GetTimeOk returns a tuple with the Time field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTime + +`func (o *DomainTransferData) SetTime(v time.Time)` + +SetTime sets Time field to given value. + +### HasTime + +`func (o *DomainTransferData) HasTime() bool` + +HasTime returns a boolean if a field has been set. + +### GetIncoming + +`func (o *DomainTransferData) GetIncoming() bool` + +GetIncoming returns the Incoming field if non-nil, zero value otherwise. + +### GetIncomingOk + +`func (o *DomainTransferData) GetIncomingOk() (*bool, bool)` + +GetIncomingOk returns a tuple with the Incoming field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIncoming + +`func (o *DomainTransferData) SetIncoming(v bool)` + +SetIncoming sets Incoming field to given value. + +### HasIncoming + +`func (o *DomainTransferData) HasIncoming() bool` + +HasIncoming returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/DomainWaf.md b/docs/DomainWaf.md new file mode 100644 index 0000000..e312982 --- /dev/null +++ b/docs/DomainWaf.md @@ -0,0 +1,212 @@ +# DomainWaf + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**IsEnabled** | Pointer to **bool** | | [optional] [readonly] +**Mode** | Pointer to **string** | | [optional] +**Packages** | Pointer to [**[]DomainWafPackage**](DomainWafPackage.md) | Pacakges and their configurations that are used to configure WAF. | [optional] [readonly] +**Rules** | Pointer to [**[]WafRule**](WafRule.md) | | [optional] [readonly] +**FWafStatus** | Pointer to **string** | | [optional] +**FThreshold** | Pointer to **string** | | [optional] +**FProvider** | Pointer to **string** | | [optional] + +## Methods + +### NewDomainWaf + +`func NewDomainWaf() *DomainWaf` + +NewDomainWaf instantiates a new DomainWaf object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDomainWafWithDefaults + +`func NewDomainWafWithDefaults() *DomainWaf` + +NewDomainWafWithDefaults instantiates a new DomainWaf object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetIsEnabled + +`func (o *DomainWaf) GetIsEnabled() bool` + +GetIsEnabled returns the IsEnabled field if non-nil, zero value otherwise. + +### GetIsEnabledOk + +`func (o *DomainWaf) GetIsEnabledOk() (*bool, bool)` + +GetIsEnabledOk returns a tuple with the IsEnabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsEnabled + +`func (o *DomainWaf) SetIsEnabled(v bool)` + +SetIsEnabled sets IsEnabled field to given value. + +### HasIsEnabled + +`func (o *DomainWaf) HasIsEnabled() bool` + +HasIsEnabled returns a boolean if a field has been set. + +### GetMode + +`func (o *DomainWaf) GetMode() string` + +GetMode returns the Mode field if non-nil, zero value otherwise. + +### GetModeOk + +`func (o *DomainWaf) GetModeOk() (*string, bool)` + +GetModeOk returns a tuple with the Mode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMode + +`func (o *DomainWaf) SetMode(v string)` + +SetMode sets Mode field to given value. + +### HasMode + +`func (o *DomainWaf) HasMode() bool` + +HasMode returns a boolean if a field has been set. + +### GetPackages + +`func (o *DomainWaf) GetPackages() []DomainWafPackage` + +GetPackages returns the Packages field if non-nil, zero value otherwise. + +### GetPackagesOk + +`func (o *DomainWaf) GetPackagesOk() (*[]DomainWafPackage, bool)` + +GetPackagesOk returns a tuple with the Packages field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPackages + +`func (o *DomainWaf) SetPackages(v []DomainWafPackage)` + +SetPackages sets Packages field to given value. + +### HasPackages + +`func (o *DomainWaf) HasPackages() bool` + +HasPackages returns a boolean if a field has been set. + +### GetRules + +`func (o *DomainWaf) GetRules() []WafRule` + +GetRules returns the Rules field if non-nil, zero value otherwise. + +### GetRulesOk + +`func (o *DomainWaf) GetRulesOk() (*[]WafRule, bool)` + +GetRulesOk returns a tuple with the Rules field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRules + +`func (o *DomainWaf) SetRules(v []WafRule)` + +SetRules sets Rules field to given value. + +### HasRules + +`func (o *DomainWaf) HasRules() bool` + +HasRules returns a boolean if a field has been set. + +### GetFWafStatus + +`func (o *DomainWaf) GetFWafStatus() string` + +GetFWafStatus returns the FWafStatus field if non-nil, zero value otherwise. + +### GetFWafStatusOk + +`func (o *DomainWaf) GetFWafStatusOk() (*string, bool)` + +GetFWafStatusOk returns a tuple with the FWafStatus field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFWafStatus + +`func (o *DomainWaf) SetFWafStatus(v string)` + +SetFWafStatus sets FWafStatus field to given value. + +### HasFWafStatus + +`func (o *DomainWaf) HasFWafStatus() bool` + +HasFWafStatus returns a boolean if a field has been set. + +### GetFThreshold + +`func (o *DomainWaf) GetFThreshold() string` + +GetFThreshold returns the FThreshold field if non-nil, zero value otherwise. + +### GetFThresholdOk + +`func (o *DomainWaf) GetFThresholdOk() (*string, bool)` + +GetFThresholdOk returns a tuple with the FThreshold field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFThreshold + +`func (o *DomainWaf) SetFThreshold(v string)` + +SetFThreshold sets FThreshold field to given value. + +### HasFThreshold + +`func (o *DomainWaf) HasFThreshold() bool` + +HasFThreshold returns a boolean if a field has been set. + +### GetFProvider + +`func (o *DomainWaf) GetFProvider() string` + +GetFProvider returns the FProvider field if non-nil, zero value otherwise. + +### GetFProviderOk + +`func (o *DomainWaf) GetFProviderOk() (*string, bool)` + +GetFProviderOk returns a tuple with the FProvider field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFProvider + +`func (o *DomainWaf) SetFProvider(v string)` + +SetFProvider sets FProvider field to given value. + +### HasFProvider + +`func (o *DomainWaf) HasFProvider() bool` + +HasFProvider returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/DomainWafData.md b/docs/DomainWafData.md new file mode 100644 index 0000000..a8cac8d --- /dev/null +++ b/docs/DomainWafData.md @@ -0,0 +1,56 @@ +# DomainWafData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**DomainWaf**](DomainWaf.md) | | [optional] + +## Methods + +### NewDomainWafData + +`func NewDomainWafData() *DomainWafData` + +NewDomainWafData instantiates a new DomainWafData object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDomainWafDataWithDefaults + +`func NewDomainWafDataWithDefaults() *DomainWafData` + +NewDomainWafDataWithDefaults instantiates a new DomainWafData object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *DomainWafData) GetData() DomainWaf` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *DomainWafData) GetDataOk() (*DomainWaf, 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 *DomainWafData) SetData(v DomainWaf)` + +SetData sets Data field to given value. + +### HasData + +`func (o *DomainWafData) HasData() bool` + +HasData returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/DomainWafPackage.md b/docs/DomainWafPackage.md new file mode 100644 index 0000000..57af3b0 --- /dev/null +++ b/docs/DomainWafPackage.md @@ -0,0 +1,238 @@ +# DomainWafPackage + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Params** | Pointer to **map[string]interface{}** | parameters of the package | [optional] +**IsEnabled** | Pointer to **bool** | | [optional] [default to true] +**Id** | Pointer to **string** | | [optional] [readonly] +**Name** | Pointer to **string** | | [optional] [readonly] +**Provider** | Pointer to [**WafPackageProvider**](WafPackageProvider.md) | | [optional] +**ParamsSchema** | Pointer to **map[string]interface{}** | JSON-schema of parameters of the package | [optional] +**DisabledRules** | Pointer to **[]string** | It will be filled by default disabled rules when it's not provided | [optional] +**DisabledRulesets** | Pointer to **[]string** | It will be filled by default disabled rulesets when it's not provided | [optional] + +## Methods + +### NewDomainWafPackage + +`func NewDomainWafPackage() *DomainWafPackage` + +NewDomainWafPackage instantiates a new DomainWafPackage object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDomainWafPackageWithDefaults + +`func NewDomainWafPackageWithDefaults() *DomainWafPackage` + +NewDomainWafPackageWithDefaults instantiates a new DomainWafPackage object +This 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 *DomainWafPackage) GetParams() map[string]interface{}` + +GetParams returns the Params field if non-nil, zero value otherwise. + +### GetParamsOk + +`func (o *DomainWafPackage) 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 *DomainWafPackage) SetParams(v map[string]interface{})` + +SetParams sets Params field to given value. + +### HasParams + +`func (o *DomainWafPackage) HasParams() bool` + +HasParams returns a boolean if a field has been set. + +### GetIsEnabled + +`func (o *DomainWafPackage) GetIsEnabled() bool` + +GetIsEnabled returns the IsEnabled field if non-nil, zero value otherwise. + +### GetIsEnabledOk + +`func (o *DomainWafPackage) GetIsEnabledOk() (*bool, bool)` + +GetIsEnabledOk returns a tuple with the IsEnabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsEnabled + +`func (o *DomainWafPackage) SetIsEnabled(v bool)` + +SetIsEnabled sets IsEnabled field to given value. + +### HasIsEnabled + +`func (o *DomainWafPackage) HasIsEnabled() bool` + +HasIsEnabled returns a boolean if a field has been set. + +### GetId + +`func (o *DomainWafPackage) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *DomainWafPackage) 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 *DomainWafPackage) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *DomainWafPackage) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetName + +`func (o *DomainWafPackage) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *DomainWafPackage) 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 *DomainWafPackage) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *DomainWafPackage) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetProvider + +`func (o *DomainWafPackage) GetProvider() WafPackageProvider` + +GetProvider returns the Provider field if non-nil, zero value otherwise. + +### GetProviderOk + +`func (o *DomainWafPackage) GetProviderOk() (*WafPackageProvider, bool)` + +GetProviderOk returns a tuple with the Provider field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProvider + +`func (o *DomainWafPackage) SetProvider(v WafPackageProvider)` + +SetProvider sets Provider field to given value. + +### HasProvider + +`func (o *DomainWafPackage) HasProvider() bool` + +HasProvider returns a boolean if a field has been set. + +### GetParamsSchema + +`func (o *DomainWafPackage) GetParamsSchema() map[string]interface{}` + +GetParamsSchema returns the ParamsSchema field if non-nil, zero value otherwise. + +### GetParamsSchemaOk + +`func (o *DomainWafPackage) GetParamsSchemaOk() (*map[string]interface{}, bool)` + +GetParamsSchemaOk returns a tuple with the ParamsSchema field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetParamsSchema + +`func (o *DomainWafPackage) SetParamsSchema(v map[string]interface{})` + +SetParamsSchema sets ParamsSchema field to given value. + +### HasParamsSchema + +`func (o *DomainWafPackage) HasParamsSchema() bool` + +HasParamsSchema returns a boolean if a field has been set. + +### GetDisabledRules + +`func (o *DomainWafPackage) GetDisabledRules() []string` + +GetDisabledRules returns the DisabledRules field if non-nil, zero value otherwise. + +### GetDisabledRulesOk + +`func (o *DomainWafPackage) GetDisabledRulesOk() (*[]string, bool)` + +GetDisabledRulesOk returns a tuple with the DisabledRules field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDisabledRules + +`func (o *DomainWafPackage) SetDisabledRules(v []string)` + +SetDisabledRules sets DisabledRules field to given value. + +### HasDisabledRules + +`func (o *DomainWafPackage) HasDisabledRules() bool` + +HasDisabledRules returns a boolean if a field has been set. + +### GetDisabledRulesets + +`func (o *DomainWafPackage) GetDisabledRulesets() []string` + +GetDisabledRulesets returns the DisabledRulesets field if non-nil, zero value otherwise. + +### GetDisabledRulesetsOk + +`func (o *DomainWafPackage) GetDisabledRulesetsOk() (*[]string, bool)` + +GetDisabledRulesetsOk returns a tuple with the DisabledRulesets field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDisabledRulesets + +`func (o *DomainWafPackage) SetDisabledRulesets(v []string)` + +SetDisabledRulesets sets DisabledRulesets field to given value. + +### HasDisabledRulesets + +`func (o *DomainWafPackage) HasDisabledRulesets() bool` + +HasDisabledRulesets returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/DomainWafPackageDetails.md b/docs/DomainWafPackageDetails.md new file mode 100644 index 0000000..083500b --- /dev/null +++ b/docs/DomainWafPackageDetails.md @@ -0,0 +1,212 @@ +# DomainWafPackageDetails + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **string** | | [optional] [readonly] +**Name** | Pointer to **string** | | [optional] [readonly] +**Provider** | Pointer to [**WafPackageProvider**](WafPackageProvider.md) | | [optional] +**ParamsSchema** | Pointer to **map[string]interface{}** | JSON-schema of parameters of the package | [optional] +**DisabledRules** | Pointer to **[]string** | It will be filled by default disabled rules when it's not provided | [optional] +**DisabledRulesets** | Pointer to **[]string** | It will be filled by default disabled rulesets when it's not provided | [optional] +**Rulesets** | Pointer to [**[]WafRuleset**](WafRuleset.md) | | [optional] + +## Methods + +### NewDomainWafPackageDetails + +`func NewDomainWafPackageDetails() *DomainWafPackageDetails` + +NewDomainWafPackageDetails instantiates a new DomainWafPackageDetails object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDomainWafPackageDetailsWithDefaults + +`func NewDomainWafPackageDetailsWithDefaults() *DomainWafPackageDetails` + +NewDomainWafPackageDetailsWithDefaults instantiates a new DomainWafPackageDetails object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *DomainWafPackageDetails) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *DomainWafPackageDetails) 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 *DomainWafPackageDetails) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *DomainWafPackageDetails) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetName + +`func (o *DomainWafPackageDetails) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *DomainWafPackageDetails) 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 *DomainWafPackageDetails) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *DomainWafPackageDetails) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetProvider + +`func (o *DomainWafPackageDetails) GetProvider() WafPackageProvider` + +GetProvider returns the Provider field if non-nil, zero value otherwise. + +### GetProviderOk + +`func (o *DomainWafPackageDetails) GetProviderOk() (*WafPackageProvider, bool)` + +GetProviderOk returns a tuple with the Provider field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProvider + +`func (o *DomainWafPackageDetails) SetProvider(v WafPackageProvider)` + +SetProvider sets Provider field to given value. + +### HasProvider + +`func (o *DomainWafPackageDetails) HasProvider() bool` + +HasProvider returns a boolean if a field has been set. + +### GetParamsSchema + +`func (o *DomainWafPackageDetails) GetParamsSchema() map[string]interface{}` + +GetParamsSchema returns the ParamsSchema field if non-nil, zero value otherwise. + +### GetParamsSchemaOk + +`func (o *DomainWafPackageDetails) GetParamsSchemaOk() (*map[string]interface{}, bool)` + +GetParamsSchemaOk returns a tuple with the ParamsSchema field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetParamsSchema + +`func (o *DomainWafPackageDetails) SetParamsSchema(v map[string]interface{})` + +SetParamsSchema sets ParamsSchema field to given value. + +### HasParamsSchema + +`func (o *DomainWafPackageDetails) HasParamsSchema() bool` + +HasParamsSchema returns a boolean if a field has been set. + +### GetDisabledRules + +`func (o *DomainWafPackageDetails) GetDisabledRules() []string` + +GetDisabledRules returns the DisabledRules field if non-nil, zero value otherwise. + +### GetDisabledRulesOk + +`func (o *DomainWafPackageDetails) GetDisabledRulesOk() (*[]string, bool)` + +GetDisabledRulesOk returns a tuple with the DisabledRules field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDisabledRules + +`func (o *DomainWafPackageDetails) SetDisabledRules(v []string)` + +SetDisabledRules sets DisabledRules field to given value. + +### HasDisabledRules + +`func (o *DomainWafPackageDetails) HasDisabledRules() bool` + +HasDisabledRules returns a boolean if a field has been set. + +### GetDisabledRulesets + +`func (o *DomainWafPackageDetails) GetDisabledRulesets() []string` + +GetDisabledRulesets returns the DisabledRulesets field if non-nil, zero value otherwise. + +### GetDisabledRulesetsOk + +`func (o *DomainWafPackageDetails) GetDisabledRulesetsOk() (*[]string, bool)` + +GetDisabledRulesetsOk returns a tuple with the DisabledRulesets field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDisabledRulesets + +`func (o *DomainWafPackageDetails) SetDisabledRulesets(v []string)` + +SetDisabledRulesets sets DisabledRulesets field to given value. + +### HasDisabledRulesets + +`func (o *DomainWafPackageDetails) HasDisabledRulesets() bool` + +HasDisabledRulesets returns a boolean if a field has been set. + +### GetRulesets + +`func (o *DomainWafPackageDetails) GetRulesets() []WafRuleset` + +GetRulesets returns the Rulesets field if non-nil, zero value otherwise. + +### GetRulesetsOk + +`func (o *DomainWafPackageDetails) GetRulesetsOk() (*[]WafRuleset, bool)` + +GetRulesetsOk returns a tuple with the Rulesets field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRulesets + +`func (o *DomainWafPackageDetails) SetRulesets(v []WafRuleset)` + +SetRulesets sets Rulesets field to given value. + +### HasRulesets + +`func (o *DomainWafPackageDetails) HasRulesets() bool` + +HasRulesets returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/DomainWafPackageDetailsData.md b/docs/DomainWafPackageDetailsData.md new file mode 100644 index 0000000..699a995 --- /dev/null +++ b/docs/DomainWafPackageDetailsData.md @@ -0,0 +1,56 @@ +# DomainWafPackageDetailsData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**DomainWafPackageDetails**](DomainWafPackageDetails.md) | | [optional] + +## Methods + +### NewDomainWafPackageDetailsData + +`func NewDomainWafPackageDetailsData() *DomainWafPackageDetailsData` + +NewDomainWafPackageDetailsData instantiates a new DomainWafPackageDetailsData object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDomainWafPackageDetailsDataWithDefaults + +`func NewDomainWafPackageDetailsDataWithDefaults() *DomainWafPackageDetailsData` + +NewDomainWafPackageDetailsDataWithDefaults instantiates a new DomainWafPackageDetailsData object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *DomainWafPackageDetailsData) GetData() DomainWafPackageDetails` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *DomainWafPackageDetailsData) GetDataOk() (*DomainWafPackageDetails, 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 *DomainWafPackageDetailsData) SetData(v DomainWafPackageDetails)` + +SetData sets Data field to given value. + +### HasData + +`func (o *DomainWafPackageDetailsData) HasData() bool` + +HasData returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/DomainWafPackageStore.md b/docs/DomainWafPackageStore.md new file mode 100644 index 0000000..a81e314 --- /dev/null +++ b/docs/DomainWafPackageStore.md @@ -0,0 +1,51 @@ +# DomainWafPackageStore + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | | + +## Methods + +### NewDomainWafPackageStore + +`func NewDomainWafPackageStore(id string, ) *DomainWafPackageStore` + +NewDomainWafPackageStore instantiates a new DomainWafPackageStore object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDomainWafPackageStoreWithDefaults + +`func NewDomainWafPackageStoreWithDefaults() *DomainWafPackageStore` + +NewDomainWafPackageStoreWithDefaults instantiates a new DomainWafPackageStore object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *DomainWafPackageStore) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *DomainWafPackageStore) 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 *DomainWafPackageStore) SetId(v string)` + +SetId sets Id field to given value. + + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/DomainWafPackagesData.md b/docs/DomainWafPackagesData.md new file mode 100644 index 0000000..f5fb524 --- /dev/null +++ b/docs/DomainWafPackagesData.md @@ -0,0 +1,56 @@ +# DomainWafPackagesData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**[]DomainWafPackage**](DomainWafPackage.md) | | [optional] + +## Methods + +### NewDomainWafPackagesData + +`func NewDomainWafPackagesData() *DomainWafPackagesData` + +NewDomainWafPackagesData instantiates a new DomainWafPackagesData object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDomainWafPackagesDataWithDefaults + +`func NewDomainWafPackagesDataWithDefaults() *DomainWafPackagesData` + +NewDomainWafPackagesDataWithDefaults instantiates a new DomainWafPackagesData object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *DomainWafPackagesData) GetData() []DomainWafPackage` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *DomainWafPackagesData) GetDataOk() (*[]DomainWafPackage, 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 *DomainWafPackagesData) SetData(v []DomainWafPackage)` + +SetData sets Data field to given value. + +### HasData + +`func (o *DomainWafPackagesData) HasData() bool` + +HasData returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/DomainsAppsStore200Response.md b/docs/DomainsAppsStore200Response.md new file mode 100644 index 0000000..fc59c1d --- /dev/null +++ b/docs/DomainsAppsStore200Response.md @@ -0,0 +1,92 @@ +# DomainsAppsStore200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**DomainCdnApp**](DomainCdnApp.md) | | [optional] +**Message** | Pointer to **NullableString** | | [optional] + +## Methods + +### NewDomainsAppsStore200Response + +`func NewDomainsAppsStore200Response() *DomainsAppsStore200Response` + +NewDomainsAppsStore200Response instantiates a new DomainsAppsStore200Response object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDomainsAppsStore200ResponseWithDefaults + +`func NewDomainsAppsStore200ResponseWithDefaults() *DomainsAppsStore200Response` + +NewDomainsAppsStore200ResponseWithDefaults instantiates a new DomainsAppsStore200Response object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *DomainsAppsStore200Response) GetData() DomainCdnApp` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *DomainsAppsStore200Response) GetDataOk() (*DomainCdnApp, 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 *DomainsAppsStore200Response) SetData(v DomainCdnApp)` + +SetData sets Data field to given value. + +### HasData + +`func (o *DomainsAppsStore200Response) HasData() bool` + +HasData returns a boolean if a field has been set. + +### GetMessage + +`func (o *DomainsAppsStore200Response) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *DomainsAppsStore200Response) GetMessageOk() (*string, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessage + +`func (o *DomainsAppsStore200Response) SetMessage(v string)` + +SetMessage sets Message field to given value. + +### HasMessage + +`func (o *DomainsAppsStore200Response) HasMessage() bool` + +HasMessage returns a boolean if a field has been set. + +### SetMessageNil + +`func (o *DomainsAppsStore200Response) SetMessageNil(b bool)` + + SetMessageNil sets the value for Message to be an explicit nil + +### UnsetMessage +`func (o *DomainsAppsStore200Response) UnsetMessage()` + +UnsetMessage ensures that no value is present for Message, not even an explicit nil + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/DomainsIndex200Response.md b/docs/DomainsIndex200Response.md new file mode 100644 index 0000000..2b099d1 --- /dev/null +++ b/docs/DomainsIndex200Response.md @@ -0,0 +1,108 @@ +# DomainsIndex200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**[]Domain**](Domain.md) | | [optional] +**Links** | Pointer to [**PaginatedResponseLinks**](PaginatedResponseLinks.md) | | [optional] +**Meta** | Pointer to [**PaginatedResponseMeta**](PaginatedResponseMeta.md) | | [optional] + +## Methods + +### NewDomainsIndex200Response + +`func NewDomainsIndex200Response() *DomainsIndex200Response` + +NewDomainsIndex200Response instantiates a new DomainsIndex200Response object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDomainsIndex200ResponseWithDefaults + +`func NewDomainsIndex200ResponseWithDefaults() *DomainsIndex200Response` + +NewDomainsIndex200ResponseWithDefaults instantiates a new DomainsIndex200Response object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *DomainsIndex200Response) GetData() []Domain` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *DomainsIndex200Response) GetDataOk() (*[]Domain, 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 *DomainsIndex200Response) SetData(v []Domain)` + +SetData sets Data field to given value. + +### HasData + +`func (o *DomainsIndex200Response) HasData() bool` + +HasData returns a boolean if a field has been set. + +### GetLinks + +`func (o *DomainsIndex200Response) GetLinks() PaginatedResponseLinks` + +GetLinks returns the Links field if non-nil, zero value otherwise. + +### GetLinksOk + +`func (o *DomainsIndex200Response) GetLinksOk() (*PaginatedResponseLinks, bool)` + +GetLinksOk returns a tuple with the Links field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLinks + +`func (o *DomainsIndex200Response) SetLinks(v PaginatedResponseLinks)` + +SetLinks sets Links field to given value. + +### HasLinks + +`func (o *DomainsIndex200Response) HasLinks() bool` + +HasLinks returns a boolean if a field has been set. + +### GetMeta + +`func (o *DomainsIndex200Response) GetMeta() PaginatedResponseMeta` + +GetMeta returns the Meta field if non-nil, zero value otherwise. + +### GetMetaOk + +`func (o *DomainsIndex200Response) GetMetaOk() (*PaginatedResponseMeta, bool)` + +GetMetaOk returns a tuple with the Meta field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMeta + +`func (o *DomainsIndex200Response) SetMeta(v PaginatedResponseMeta)` + +SetMeta sets Meta field to given value. + +### HasMeta + +`func (o *DomainsIndex200Response) HasMeta() bool` + +HasMeta returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/DomainsNameserversCheck200Response.md b/docs/DomainsNameserversCheck200Response.md new file mode 100644 index 0000000..4dd900f --- /dev/null +++ b/docs/DomainsNameserversCheck200Response.md @@ -0,0 +1,92 @@ +# DomainsNameserversCheck200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**NsDomain**](NsDomain.md) | | [optional] +**Message** | Pointer to **NullableString** | | [optional] + +## Methods + +### NewDomainsNameserversCheck200Response + +`func NewDomainsNameserversCheck200Response() *DomainsNameserversCheck200Response` + +NewDomainsNameserversCheck200Response instantiates a new DomainsNameserversCheck200Response object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDomainsNameserversCheck200ResponseWithDefaults + +`func NewDomainsNameserversCheck200ResponseWithDefaults() *DomainsNameserversCheck200Response` + +NewDomainsNameserversCheck200ResponseWithDefaults instantiates a new DomainsNameserversCheck200Response object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *DomainsNameserversCheck200Response) GetData() NsDomain` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *DomainsNameserversCheck200Response) GetDataOk() (*NsDomain, 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 *DomainsNameserversCheck200Response) SetData(v NsDomain)` + +SetData sets Data field to given value. + +### HasData + +`func (o *DomainsNameserversCheck200Response) HasData() bool` + +HasData returns a boolean if a field has been set. + +### GetMessage + +`func (o *DomainsNameserversCheck200Response) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *DomainsNameserversCheck200Response) GetMessageOk() (*string, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessage + +`func (o *DomainsNameserversCheck200Response) SetMessage(v string)` + +SetMessage sets Message field to given value. + +### HasMessage + +`func (o *DomainsNameserversCheck200Response) HasMessage() bool` + +HasMessage returns a boolean if a field has been set. + +### SetMessageNil + +`func (o *DomainsNameserversCheck200Response) SetMessageNil(b bool)` + + SetMessageNil sets the value for Message to be an explicit nil + +### UnsetMessage +`func (o *DomainsNameserversCheck200Response) UnsetMessage()` + +UnsetMessage ensures that no value is present for Message, not even an explicit nil + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/DomainsNameserversDeprecatedCheck200Response.md b/docs/DomainsNameserversDeprecatedCheck200Response.md new file mode 100644 index 0000000..ef58425 --- /dev/null +++ b/docs/DomainsNameserversDeprecatedCheck200Response.md @@ -0,0 +1,92 @@ +# DomainsNameserversDeprecatedCheck200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**DeprecatedNs**](DeprecatedNs.md) | | [optional] +**Message** | Pointer to **NullableString** | | [optional] + +## Methods + +### NewDomainsNameserversDeprecatedCheck200Response + +`func NewDomainsNameserversDeprecatedCheck200Response() *DomainsNameserversDeprecatedCheck200Response` + +NewDomainsNameserversDeprecatedCheck200Response instantiates a new DomainsNameserversDeprecatedCheck200Response object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDomainsNameserversDeprecatedCheck200ResponseWithDefaults + +`func NewDomainsNameserversDeprecatedCheck200ResponseWithDefaults() *DomainsNameserversDeprecatedCheck200Response` + +NewDomainsNameserversDeprecatedCheck200ResponseWithDefaults instantiates a new DomainsNameserversDeprecatedCheck200Response object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *DomainsNameserversDeprecatedCheck200Response) GetData() DeprecatedNs` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *DomainsNameserversDeprecatedCheck200Response) GetDataOk() (*DeprecatedNs, 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 *DomainsNameserversDeprecatedCheck200Response) SetData(v DeprecatedNs)` + +SetData sets Data field to given value. + +### HasData + +`func (o *DomainsNameserversDeprecatedCheck200Response) HasData() bool` + +HasData returns a boolean if a field has been set. + +### GetMessage + +`func (o *DomainsNameserversDeprecatedCheck200Response) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *DomainsNameserversDeprecatedCheck200Response) GetMessageOk() (*string, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessage + +`func (o *DomainsNameserversDeprecatedCheck200Response) SetMessage(v string)` + +SetMessage sets Message field to given value. + +### HasMessage + +`func (o *DomainsNameserversDeprecatedCheck200Response) HasMessage() bool` + +HasMessage returns a boolean if a field has been set. + +### SetMessageNil + +`func (o *DomainsNameserversDeprecatedCheck200Response) SetMessageNil(b bool)` + + SetMessageNil sets the value for Message to be an explicit nil + +### UnsetMessage +`func (o *DomainsNameserversDeprecatedCheck200Response) UnsetMessage()` + +UnsetMessage ensures that no value is present for Message, not even an explicit nil + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/DomainsPlansUsages200Response.md b/docs/DomainsPlansUsages200Response.md new file mode 100644 index 0000000..8a671c2 --- /dev/null +++ b/docs/DomainsPlansUsages200Response.md @@ -0,0 +1,92 @@ +# DomainsPlansUsages200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**Usages**](Usages.md) | | [optional] +**Message** | Pointer to **NullableString** | | [optional] + +## Methods + +### NewDomainsPlansUsages200Response + +`func NewDomainsPlansUsages200Response() *DomainsPlansUsages200Response` + +NewDomainsPlansUsages200Response instantiates a new DomainsPlansUsages200Response object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDomainsPlansUsages200ResponseWithDefaults + +`func NewDomainsPlansUsages200ResponseWithDefaults() *DomainsPlansUsages200Response` + +NewDomainsPlansUsages200ResponseWithDefaults instantiates a new DomainsPlansUsages200Response object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *DomainsPlansUsages200Response) GetData() Usages` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *DomainsPlansUsages200Response) GetDataOk() (*Usages, 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 *DomainsPlansUsages200Response) SetData(v Usages)` + +SetData sets Data field to given value. + +### HasData + +`func (o *DomainsPlansUsages200Response) HasData() bool` + +HasData returns a boolean if a field has been set. + +### GetMessage + +`func (o *DomainsPlansUsages200Response) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *DomainsPlansUsages200Response) GetMessageOk() (*string, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessage + +`func (o *DomainsPlansUsages200Response) SetMessage(v string)` + +SetMessage sets Message field to given value. + +### HasMessage + +`func (o *DomainsPlansUsages200Response) HasMessage() bool` + +HasMessage returns a boolean if a field has been set. + +### SetMessageNil + +`func (o *DomainsPlansUsages200Response) SetMessageNil(b bool)` + + SetMessageNil sets the value for Message to be an explicit nil + +### UnsetMessage +`func (o *DomainsPlansUsages200Response) UnsetMessage()` + +UnsetMessage ensures that no value is present for Message, not even an explicit nil + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/DomainsPlansViolations200Response.md b/docs/DomainsPlansViolations200Response.md new file mode 100644 index 0000000..4a3afb6 --- /dev/null +++ b/docs/DomainsPlansViolations200Response.md @@ -0,0 +1,92 @@ +# DomainsPlansViolations200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**Violations**](Violations.md) | | [optional] +**Message** | Pointer to **NullableString** | | [optional] + +## Methods + +### NewDomainsPlansViolations200Response + +`func NewDomainsPlansViolations200Response() *DomainsPlansViolations200Response` + +NewDomainsPlansViolations200Response instantiates a new DomainsPlansViolations200Response object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDomainsPlansViolations200ResponseWithDefaults + +`func NewDomainsPlansViolations200ResponseWithDefaults() *DomainsPlansViolations200Response` + +NewDomainsPlansViolations200ResponseWithDefaults instantiates a new DomainsPlansViolations200Response object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *DomainsPlansViolations200Response) GetData() Violations` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *DomainsPlansViolations200Response) GetDataOk() (*Violations, 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 *DomainsPlansViolations200Response) SetData(v Violations)` + +SetData sets Data field to given value. + +### HasData + +`func (o *DomainsPlansViolations200Response) HasData() bool` + +HasData returns a boolean if a field has been set. + +### GetMessage + +`func (o *DomainsPlansViolations200Response) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *DomainsPlansViolations200Response) GetMessageOk() (*string, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessage + +`func (o *DomainsPlansViolations200Response) SetMessage(v string)` + +SetMessage sets Message field to given value. + +### HasMessage + +`func (o *DomainsPlansViolations200Response) HasMessage() bool` + +HasMessage returns a boolean if a field has been set. + +### SetMessageNil + +`func (o *DomainsPlansViolations200Response) SetMessageNil(b bool)` + + SetMessageNil sets the value for Message to be an explicit nil + +### UnsetMessage +`func (o *DomainsPlansViolations200Response) UnsetMessage()` + +UnsetMessage ensures that no value is present for Message, not even an explicit nil + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/DomainsShow404Response.md b/docs/DomainsShow404Response.md new file mode 100644 index 0000000..506190a --- /dev/null +++ b/docs/DomainsShow404Response.md @@ -0,0 +1,82 @@ +# DomainsShow404Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Status** | Pointer to **bool** | | [optional] [default to false] +**Message** | Pointer to **string** | | [optional] + +## Methods + +### NewDomainsShow404Response + +`func NewDomainsShow404Response() *DomainsShow404Response` + +NewDomainsShow404Response instantiates a new DomainsShow404Response object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDomainsShow404ResponseWithDefaults + +`func NewDomainsShow404ResponseWithDefaults() *DomainsShow404Response` + +NewDomainsShow404ResponseWithDefaults instantiates a new DomainsShow404Response object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetStatus + +`func (o *DomainsShow404Response) GetStatus() bool` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *DomainsShow404Response) GetStatusOk() (*bool, 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 *DomainsShow404Response) SetStatus(v bool)` + +SetStatus sets Status field to given value. + +### HasStatus + +`func (o *DomainsShow404Response) HasStatus() bool` + +HasStatus returns a boolean if a field has been set. + +### GetMessage + +`func (o *DomainsShow404Response) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *DomainsShow404Response) GetMessageOk() (*string, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessage + +`func (o *DomainsShow404Response) SetMessage(v string)` + +SetMessage sets Message field to given value. + +### HasMessage + +`func (o *DomainsShow404Response) HasMessage() bool` + +HasMessage returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/DomainsStore422Response.md b/docs/DomainsStore422Response.md new file mode 100644 index 0000000..b5bbdc3 --- /dev/null +++ b/docs/DomainsStore422Response.md @@ -0,0 +1,118 @@ +# DomainsStore422Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Status** | Pointer to **bool** | | [optional] [default to false] +**Message** | Pointer to **string** | | [optional] +**Errors** | Pointer to **map[string]interface{}** | List of parameters and related errors | [optional] + +## Methods + +### NewDomainsStore422Response + +`func NewDomainsStore422Response() *DomainsStore422Response` + +NewDomainsStore422Response instantiates a new DomainsStore422Response object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDomainsStore422ResponseWithDefaults + +`func NewDomainsStore422ResponseWithDefaults() *DomainsStore422Response` + +NewDomainsStore422ResponseWithDefaults instantiates a new DomainsStore422Response object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetStatus + +`func (o *DomainsStore422Response) GetStatus() bool` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *DomainsStore422Response) GetStatusOk() (*bool, 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 *DomainsStore422Response) SetStatus(v bool)` + +SetStatus sets Status field to given value. + +### HasStatus + +`func (o *DomainsStore422Response) HasStatus() bool` + +HasStatus returns a boolean if a field has been set. + +### GetMessage + +`func (o *DomainsStore422Response) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *DomainsStore422Response) GetMessageOk() (*string, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessage + +`func (o *DomainsStore422Response) SetMessage(v string)` + +SetMessage sets Message field to given value. + +### HasMessage + +`func (o *DomainsStore422Response) HasMessage() bool` + +HasMessage returns a boolean if a field has been set. + +### GetErrors + +`func (o *DomainsStore422Response) GetErrors() map[string]interface{}` + +GetErrors returns the Errors field if non-nil, zero value otherwise. + +### GetErrorsOk + +`func (o *DomainsStore422Response) GetErrorsOk() (*map[string]interface{}, bool)` + +GetErrorsOk returns a tuple with the Errors field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetErrors + +`func (o *DomainsStore422Response) SetErrors(v map[string]interface{})` + +SetErrors sets Errors field to given value. + +### HasErrors + +`func (o *DomainsStore422Response) HasErrors() bool` + +HasErrors returns a boolean if a field has been set. + +### SetErrorsNil + +`func (o *DomainsStore422Response) SetErrorsNil(b bool)` + + SetErrorsNil sets the value for Errors to be an explicit nil + +### UnsetErrors +`func (o *DomainsStore422Response) UnsetErrors()` + +UnsetErrors ensures that no value is present for Errors, not even an explicit nil + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/DomainsTransferIndex200Response.md b/docs/DomainsTransferIndex200Response.md new file mode 100644 index 0000000..a9809bb --- /dev/null +++ b/docs/DomainsTransferIndex200Response.md @@ -0,0 +1,108 @@ +# DomainsTransferIndex200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**[]DomainTransferData**](DomainTransferData.md) | | [optional] +**Links** | Pointer to [**PaginatedResponseLinks**](PaginatedResponseLinks.md) | | [optional] +**Meta** | Pointer to [**PaginatedResponseMeta**](PaginatedResponseMeta.md) | | [optional] + +## Methods + +### NewDomainsTransferIndex200Response + +`func NewDomainsTransferIndex200Response() *DomainsTransferIndex200Response` + +NewDomainsTransferIndex200Response instantiates a new DomainsTransferIndex200Response object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDomainsTransferIndex200ResponseWithDefaults + +`func NewDomainsTransferIndex200ResponseWithDefaults() *DomainsTransferIndex200Response` + +NewDomainsTransferIndex200ResponseWithDefaults instantiates a new DomainsTransferIndex200Response object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *DomainsTransferIndex200Response) GetData() []DomainTransferData` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *DomainsTransferIndex200Response) GetDataOk() (*[]DomainTransferData, 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 *DomainsTransferIndex200Response) SetData(v []DomainTransferData)` + +SetData sets Data field to given value. + +### HasData + +`func (o *DomainsTransferIndex200Response) HasData() bool` + +HasData returns a boolean if a field has been set. + +### GetLinks + +`func (o *DomainsTransferIndex200Response) GetLinks() PaginatedResponseLinks` + +GetLinks returns the Links field if non-nil, zero value otherwise. + +### GetLinksOk + +`func (o *DomainsTransferIndex200Response) GetLinksOk() (*PaginatedResponseLinks, bool)` + +GetLinksOk returns a tuple with the Links field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLinks + +`func (o *DomainsTransferIndex200Response) SetLinks(v PaginatedResponseLinks)` + +SetLinks sets Links field to given value. + +### HasLinks + +`func (o *DomainsTransferIndex200Response) HasLinks() bool` + +HasLinks returns a boolean if a field has been set. + +### GetMeta + +`func (o *DomainsTransferIndex200Response) GetMeta() PaginatedResponseMeta` + +GetMeta returns the Meta field if non-nil, zero value otherwise. + +### GetMetaOk + +`func (o *DomainsTransferIndex200Response) GetMetaOk() (*PaginatedResponseMeta, bool)` + +GetMetaOk returns a tuple with the Meta field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMeta + +`func (o *DomainsTransferIndex200Response) SetMeta(v PaginatedResponseMeta)` + +SetMeta sets Meta field to given value. + +### HasMeta + +`func (o *DomainsTransferIndex200Response) HasMeta() bool` + +HasMeta returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/DynamicField.md b/docs/DynamicField.md new file mode 100644 index 0000000..3c291d4 --- /dev/null +++ b/docs/DynamicField.md @@ -0,0 +1,259 @@ +# DynamicField + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **string** | | [optional] [readonly] +**Name** | **string** | | +**Description** | Pointer to **NullableString** | | [optional] +**Namespace** | Pointer to **string** | | [optional] [readonly] +**Type** | **string** | | +**Scope** | Pointer to **string** | | [optional] [readonly] +**Values** | [**[]DynamicFieldValue**](DynamicFieldValue.md) | | +**CreatedAt** | Pointer to **time.Time** | | [optional] [readonly] +**UpdatedAt** | Pointer to **time.Time** | | [optional] [readonly] + +## Methods + +### NewDynamicField + +`func NewDynamicField(name string, type_ string, values []DynamicFieldValue, ) *DynamicField` + +NewDynamicField instantiates a new DynamicField object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDynamicFieldWithDefaults + +`func NewDynamicFieldWithDefaults() *DynamicField` + +NewDynamicFieldWithDefaults instantiates a new DynamicField object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *DynamicField) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *DynamicField) 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 *DynamicField) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *DynamicField) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetName + +`func (o *DynamicField) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *DynamicField) 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 *DynamicField) SetName(v string)` + +SetName sets Name field to given value. + + +### GetDescription + +`func (o *DynamicField) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *DynamicField) 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 *DynamicField) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *DynamicField) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### SetDescriptionNil + +`func (o *DynamicField) SetDescriptionNil(b bool)` + + SetDescriptionNil sets the value for Description to be an explicit nil + +### UnsetDescription +`func (o *DynamicField) UnsetDescription()` + +UnsetDescription ensures that no value is present for Description, not even an explicit nil +### GetNamespace + +`func (o *DynamicField) GetNamespace() string` + +GetNamespace returns the Namespace field if non-nil, zero value otherwise. + +### GetNamespaceOk + +`func (o *DynamicField) GetNamespaceOk() (*string, bool)` + +GetNamespaceOk returns a tuple with the Namespace field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNamespace + +`func (o *DynamicField) SetNamespace(v string)` + +SetNamespace sets Namespace field to given value. + +### HasNamespace + +`func (o *DynamicField) HasNamespace() bool` + +HasNamespace returns a boolean if a field has been set. + +### GetType + +`func (o *DynamicField) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *DynamicField) 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 *DynamicField) SetType(v string)` + +SetType sets Type field to given value. + + +### GetScope + +`func (o *DynamicField) GetScope() string` + +GetScope returns the Scope field if non-nil, zero value otherwise. + +### GetScopeOk + +`func (o *DynamicField) GetScopeOk() (*string, bool)` + +GetScopeOk returns a tuple with the Scope field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetScope + +`func (o *DynamicField) SetScope(v string)` + +SetScope sets Scope field to given value. + +### HasScope + +`func (o *DynamicField) HasScope() bool` + +HasScope returns a boolean if a field has been set. + +### GetValues + +`func (o *DynamicField) GetValues() []DynamicFieldValue` + +GetValues returns the Values field if non-nil, zero value otherwise. + +### GetValuesOk + +`func (o *DynamicField) GetValuesOk() (*[]DynamicFieldValue, bool)` + +GetValuesOk returns a tuple with the Values field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValues + +`func (o *DynamicField) SetValues(v []DynamicFieldValue)` + +SetValues sets Values field to given value. + + +### GetCreatedAt + +`func (o *DynamicField) GetCreatedAt() time.Time` + +GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. + +### GetCreatedAtOk + +`func (o *DynamicField) GetCreatedAtOk() (*time.Time, bool)` + +GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedAt + +`func (o *DynamicField) SetCreatedAt(v time.Time)` + +SetCreatedAt sets CreatedAt field to given value. + +### HasCreatedAt + +`func (o *DynamicField) HasCreatedAt() bool` + +HasCreatedAt returns a boolean if a field has been set. + +### GetUpdatedAt + +`func (o *DynamicField) GetUpdatedAt() time.Time` + +GetUpdatedAt returns the UpdatedAt field if non-nil, zero value otherwise. + +### GetUpdatedAtOk + +`func (o *DynamicField) GetUpdatedAtOk() (*time.Time, bool)` + +GetUpdatedAtOk returns a tuple with the UpdatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpdatedAt + +`func (o *DynamicField) SetUpdatedAt(v time.Time)` + +SetUpdatedAt sets UpdatedAt field to given value. + +### HasUpdatedAt + +`func (o *DynamicField) HasUpdatedAt() bool` + +HasUpdatedAt returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/DynamicFieldData.md b/docs/DynamicFieldData.md new file mode 100644 index 0000000..55dc85e --- /dev/null +++ b/docs/DynamicFieldData.md @@ -0,0 +1,56 @@ +# DynamicFieldData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**DynamicField**](DynamicField.md) | | [optional] + +## Methods + +### NewDynamicFieldData + +`func NewDynamicFieldData() *DynamicFieldData` + +NewDynamicFieldData instantiates a new DynamicFieldData object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDynamicFieldDataWithDefaults + +`func NewDynamicFieldDataWithDefaults() *DynamicFieldData` + +NewDynamicFieldDataWithDefaults instantiates a new DynamicFieldData object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *DynamicFieldData) GetData() DynamicField` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *DynamicFieldData) GetDataOk() (*DynamicField, 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 *DynamicFieldData) SetData(v DynamicField)` + +SetData sets Data field to given value. + +### HasData + +`func (o *DynamicFieldData) HasData() bool` + +HasData returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/DynamicFieldResponse.md b/docs/DynamicFieldResponse.md new file mode 100644 index 0000000..72412d9 --- /dev/null +++ b/docs/DynamicFieldResponse.md @@ -0,0 +1,92 @@ +# DynamicFieldResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**DynamicField**](DynamicField.md) | | [optional] +**Message** | Pointer to **NullableString** | | [optional] + +## Methods + +### NewDynamicFieldResponse + +`func NewDynamicFieldResponse() *DynamicFieldResponse` + +NewDynamicFieldResponse instantiates a new DynamicFieldResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDynamicFieldResponseWithDefaults + +`func NewDynamicFieldResponseWithDefaults() *DynamicFieldResponse` + +NewDynamicFieldResponseWithDefaults instantiates a new DynamicFieldResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *DynamicFieldResponse) GetData() DynamicField` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *DynamicFieldResponse) GetDataOk() (*DynamicField, 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 *DynamicFieldResponse) SetData(v DynamicField)` + +SetData sets Data field to given value. + +### HasData + +`func (o *DynamicFieldResponse) HasData() bool` + +HasData returns a boolean if a field has been set. + +### GetMessage + +`func (o *DynamicFieldResponse) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *DynamicFieldResponse) GetMessageOk() (*string, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessage + +`func (o *DynamicFieldResponse) SetMessage(v string)` + +SetMessage sets Message field to given value. + +### HasMessage + +`func (o *DynamicFieldResponse) HasMessage() bool` + +HasMessage returns a boolean if a field has been set. + +### SetMessageNil + +`func (o *DynamicFieldResponse) SetMessageNil(b bool)` + + SetMessageNil sets the value for Message to be an explicit nil + +### UnsetMessage +`func (o *DynamicFieldResponse) UnsetMessage()` + +UnsetMessage ensures that no value is present for Message, not even an explicit nil + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/DynamicFieldType.md b/docs/DynamicFieldType.md new file mode 100644 index 0000000..dec8604 --- /dev/null +++ b/docs/DynamicFieldType.md @@ -0,0 +1,30 @@ +# DynamicFieldType + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Methods + +### NewDynamicFieldType + +`func NewDynamicFieldType() *DynamicFieldType` + +NewDynamicFieldType instantiates a new DynamicFieldType object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDynamicFieldTypeWithDefaults + +`func NewDynamicFieldTypeWithDefaults() *DynamicFieldType` + +NewDynamicFieldTypeWithDefaults instantiates a new DynamicFieldType object +This 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]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/DynamicFieldValue.md b/docs/DynamicFieldValue.md new file mode 100644 index 0000000..928353d --- /dev/null +++ b/docs/DynamicFieldValue.md @@ -0,0 +1,108 @@ +# DynamicFieldValue + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | Pointer to [**DynamicFieldType**](DynamicFieldType.md) | | [optional] +**Desc** | Pointer to **string** | | [optional] +**CreatedAt** | Pointer to **string** | | [optional] [readonly] + +## Methods + +### NewDynamicFieldValue + +`func NewDynamicFieldValue() *DynamicFieldValue` + +NewDynamicFieldValue instantiates a new DynamicFieldValue object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDynamicFieldValueWithDefaults + +`func NewDynamicFieldValueWithDefaults() *DynamicFieldValue` + +NewDynamicFieldValueWithDefaults instantiates a new DynamicFieldValue object +This 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 *DynamicFieldValue) GetValue() DynamicFieldType` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *DynamicFieldValue) GetValueOk() (*DynamicFieldType, 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 *DynamicFieldValue) SetValue(v DynamicFieldType)` + +SetValue sets Value field to given value. + +### HasValue + +`func (o *DynamicFieldValue) HasValue() bool` + +HasValue returns a boolean if a field has been set. + +### GetDesc + +`func (o *DynamicFieldValue) GetDesc() string` + +GetDesc returns the Desc field if non-nil, zero value otherwise. + +### GetDescOk + +`func (o *DynamicFieldValue) GetDescOk() (*string, bool)` + +GetDescOk returns a tuple with the Desc field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDesc + +`func (o *DynamicFieldValue) SetDesc(v string)` + +SetDesc sets Desc field to given value. + +### HasDesc + +`func (o *DynamicFieldValue) HasDesc() bool` + +HasDesc returns a boolean if a field has been set. + +### GetCreatedAt + +`func (o *DynamicFieldValue) GetCreatedAt() string` + +GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. + +### GetCreatedAtOk + +`func (o *DynamicFieldValue) GetCreatedAtOk() (*string, bool)` + +GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedAt + +`func (o *DynamicFieldValue) SetCreatedAt(v string)` + +SetCreatedAt sets CreatedAt field to given value. + +### HasCreatedAt + +`func (o *DynamicFieldValue) HasCreatedAt() bool` + +HasCreatedAt returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/EmailForwardingAlias.md b/docs/EmailForwardingAlias.md new file mode 100644 index 0000000..f167dae --- /dev/null +++ b/docs/EmailForwardingAlias.md @@ -0,0 +1,134 @@ +# EmailForwardingAlias + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **string** | | [optional] +**LocalPart** | Pointer to **string** | | [optional] +**Email** | Pointer to **string** | | [optional] +**IsActive** | Pointer to **bool** | | [optional] + +## Methods + +### NewEmailForwardingAlias + +`func NewEmailForwardingAlias() *EmailForwardingAlias` + +NewEmailForwardingAlias instantiates a new EmailForwardingAlias object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewEmailForwardingAliasWithDefaults + +`func NewEmailForwardingAliasWithDefaults() *EmailForwardingAlias` + +NewEmailForwardingAliasWithDefaults instantiates a new EmailForwardingAlias object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *EmailForwardingAlias) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *EmailForwardingAlias) 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 *EmailForwardingAlias) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *EmailForwardingAlias) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetLocalPart + +`func (o *EmailForwardingAlias) GetLocalPart() string` + +GetLocalPart returns the LocalPart field if non-nil, zero value otherwise. + +### GetLocalPartOk + +`func (o *EmailForwardingAlias) GetLocalPartOk() (*string, bool)` + +GetLocalPartOk returns a tuple with the LocalPart field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLocalPart + +`func (o *EmailForwardingAlias) SetLocalPart(v string)` + +SetLocalPart sets LocalPart field to given value. + +### HasLocalPart + +`func (o *EmailForwardingAlias) HasLocalPart() bool` + +HasLocalPart returns a boolean if a field has been set. + +### GetEmail + +`func (o *EmailForwardingAlias) GetEmail() string` + +GetEmail returns the Email field if non-nil, zero value otherwise. + +### GetEmailOk + +`func (o *EmailForwardingAlias) GetEmailOk() (*string, bool)` + +GetEmailOk returns a tuple with the Email field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEmail + +`func (o *EmailForwardingAlias) SetEmail(v string)` + +SetEmail sets Email field to given value. + +### HasEmail + +`func (o *EmailForwardingAlias) HasEmail() bool` + +HasEmail returns a boolean if a field has been set. + +### GetIsActive + +`func (o *EmailForwardingAlias) GetIsActive() bool` + +GetIsActive returns the IsActive field if non-nil, zero value otherwise. + +### GetIsActiveOk + +`func (o *EmailForwardingAlias) GetIsActiveOk() (*bool, bool)` + +GetIsActiveOk returns a tuple with the IsActive field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsActive + +`func (o *EmailForwardingAlias) SetIsActive(v bool)` + +SetIsActive sets IsActive field to given value. + +### HasIsActive + +`func (o *EmailForwardingAlias) HasIsActive() bool` + +HasIsActive returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/EmailForwardingAliasesListData.md b/docs/EmailForwardingAliasesListData.md new file mode 100644 index 0000000..7439dc1 --- /dev/null +++ b/docs/EmailForwardingAliasesListData.md @@ -0,0 +1,56 @@ +# EmailForwardingAliasesListData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**[]EmailForwardingAliasesListInner**](EmailForwardingAliasesListInner.md) | | [optional] + +## Methods + +### NewEmailForwardingAliasesListData + +`func NewEmailForwardingAliasesListData() *EmailForwardingAliasesListData` + +NewEmailForwardingAliasesListData instantiates a new EmailForwardingAliasesListData object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewEmailForwardingAliasesListDataWithDefaults + +`func NewEmailForwardingAliasesListDataWithDefaults() *EmailForwardingAliasesListData` + +NewEmailForwardingAliasesListDataWithDefaults instantiates a new EmailForwardingAliasesListData object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *EmailForwardingAliasesListData) GetData() []EmailForwardingAliasesListInner` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *EmailForwardingAliasesListData) GetDataOk() (*[]EmailForwardingAliasesListInner, 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 *EmailForwardingAliasesListData) SetData(v []EmailForwardingAliasesListInner)` + +SetData sets Data field to given value. + +### HasData + +`func (o *EmailForwardingAliasesListData) HasData() bool` + +HasData returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/EmailForwardingAliasesListInner.md b/docs/EmailForwardingAliasesListInner.md new file mode 100644 index 0000000..af96870 --- /dev/null +++ b/docs/EmailForwardingAliasesListInner.md @@ -0,0 +1,134 @@ +# EmailForwardingAliasesListInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **string** | | [optional] +**LocalPart** | Pointer to **string** | | [optional] +**Email** | Pointer to **string** | | [optional] +**IsActive** | Pointer to **bool** | | [optional] + +## Methods + +### NewEmailForwardingAliasesListInner + +`func NewEmailForwardingAliasesListInner() *EmailForwardingAliasesListInner` + +NewEmailForwardingAliasesListInner instantiates a new EmailForwardingAliasesListInner object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewEmailForwardingAliasesListInnerWithDefaults + +`func NewEmailForwardingAliasesListInnerWithDefaults() *EmailForwardingAliasesListInner` + +NewEmailForwardingAliasesListInnerWithDefaults instantiates a new EmailForwardingAliasesListInner object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *EmailForwardingAliasesListInner) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *EmailForwardingAliasesListInner) 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 *EmailForwardingAliasesListInner) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *EmailForwardingAliasesListInner) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetLocalPart + +`func (o *EmailForwardingAliasesListInner) GetLocalPart() string` + +GetLocalPart returns the LocalPart field if non-nil, zero value otherwise. + +### GetLocalPartOk + +`func (o *EmailForwardingAliasesListInner) GetLocalPartOk() (*string, bool)` + +GetLocalPartOk returns a tuple with the LocalPart field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLocalPart + +`func (o *EmailForwardingAliasesListInner) SetLocalPart(v string)` + +SetLocalPart sets LocalPart field to given value. + +### HasLocalPart + +`func (o *EmailForwardingAliasesListInner) HasLocalPart() bool` + +HasLocalPart returns a boolean if a field has been set. + +### GetEmail + +`func (o *EmailForwardingAliasesListInner) GetEmail() string` + +GetEmail returns the Email field if non-nil, zero value otherwise. + +### GetEmailOk + +`func (o *EmailForwardingAliasesListInner) GetEmailOk() (*string, bool)` + +GetEmailOk returns a tuple with the Email field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEmail + +`func (o *EmailForwardingAliasesListInner) SetEmail(v string)` + +SetEmail sets Email field to given value. + +### HasEmail + +`func (o *EmailForwardingAliasesListInner) HasEmail() bool` + +HasEmail returns a boolean if a field has been set. + +### GetIsActive + +`func (o *EmailForwardingAliasesListInner) GetIsActive() bool` + +GetIsActive returns the IsActive field if non-nil, zero value otherwise. + +### GetIsActiveOk + +`func (o *EmailForwardingAliasesListInner) GetIsActiveOk() (*bool, bool)` + +GetIsActiveOk returns a tuple with the IsActive field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsActive + +`func (o *EmailForwardingAliasesListInner) SetIsActive(v bool)` + +SetIsActive sets IsActive field to given value. + +### HasIsActive + +`func (o *EmailForwardingAliasesListInner) HasIsActive() bool` + +HasIsActive returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/EmailForwardingAliasesRecipients.md b/docs/EmailForwardingAliasesRecipients.md new file mode 100644 index 0000000..980cd7f --- /dev/null +++ b/docs/EmailForwardingAliasesRecipients.md @@ -0,0 +1,51 @@ +# EmailForwardingAliasesRecipients + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Recipients** | **[]string** | | + +## Methods + +### NewEmailForwardingAliasesRecipients + +`func NewEmailForwardingAliasesRecipients(recipients []string, ) *EmailForwardingAliasesRecipients` + +NewEmailForwardingAliasesRecipients instantiates a new EmailForwardingAliasesRecipients object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewEmailForwardingAliasesRecipientsWithDefaults + +`func NewEmailForwardingAliasesRecipientsWithDefaults() *EmailForwardingAliasesRecipients` + +NewEmailForwardingAliasesRecipientsWithDefaults instantiates a new EmailForwardingAliasesRecipients object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetRecipients + +`func (o *EmailForwardingAliasesRecipients) GetRecipients() []string` + +GetRecipients returns the Recipients field if non-nil, zero value otherwise. + +### GetRecipientsOk + +`func (o *EmailForwardingAliasesRecipients) GetRecipientsOk() (*[]string, bool)` + +GetRecipientsOk returns a tuple with the Recipients field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRecipients + +`func (o *EmailForwardingAliasesRecipients) SetRecipients(v []string)` + +SetRecipients sets Recipients field to given value. + + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/EmailForwardingAliasesStore.md b/docs/EmailForwardingAliasesStore.md new file mode 100644 index 0000000..911e7c8 --- /dev/null +++ b/docs/EmailForwardingAliasesStore.md @@ -0,0 +1,72 @@ +# EmailForwardingAliasesStore + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**LocalPart** | **string** | | +**Recipients** | **[]string** | | + +## Methods + +### NewEmailForwardingAliasesStore + +`func NewEmailForwardingAliasesStore(localPart string, recipients []string, ) *EmailForwardingAliasesStore` + +NewEmailForwardingAliasesStore instantiates a new EmailForwardingAliasesStore object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewEmailForwardingAliasesStoreWithDefaults + +`func NewEmailForwardingAliasesStoreWithDefaults() *EmailForwardingAliasesStore` + +NewEmailForwardingAliasesStoreWithDefaults instantiates a new EmailForwardingAliasesStore object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetLocalPart + +`func (o *EmailForwardingAliasesStore) GetLocalPart() string` + +GetLocalPart returns the LocalPart field if non-nil, zero value otherwise. + +### GetLocalPartOk + +`func (o *EmailForwardingAliasesStore) GetLocalPartOk() (*string, bool)` + +GetLocalPartOk returns a tuple with the LocalPart field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLocalPart + +`func (o *EmailForwardingAliasesStore) SetLocalPart(v string)` + +SetLocalPart sets LocalPart field to given value. + + +### GetRecipients + +`func (o *EmailForwardingAliasesStore) GetRecipients() []string` + +GetRecipients returns the Recipients field if non-nil, zero value otherwise. + +### GetRecipientsOk + +`func (o *EmailForwardingAliasesStore) GetRecipientsOk() (*[]string, bool)` + +GetRecipientsOk returns a tuple with the Recipients field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRecipients + +`func (o *EmailForwardingAliasesStore) SetRecipients(v []string)` + +SetRecipients sets Recipients field to given value. + + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/EmailForwardingAliasesToggleActivation.md b/docs/EmailForwardingAliasesToggleActivation.md new file mode 100644 index 0000000..7febcda --- /dev/null +++ b/docs/EmailForwardingAliasesToggleActivation.md @@ -0,0 +1,51 @@ +# EmailForwardingAliasesToggleActivation + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**IsActive** | **bool** | | + +## Methods + +### NewEmailForwardingAliasesToggleActivation + +`func NewEmailForwardingAliasesToggleActivation(isActive bool, ) *EmailForwardingAliasesToggleActivation` + +NewEmailForwardingAliasesToggleActivation instantiates a new EmailForwardingAliasesToggleActivation object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewEmailForwardingAliasesToggleActivationWithDefaults + +`func NewEmailForwardingAliasesToggleActivationWithDefaults() *EmailForwardingAliasesToggleActivation` + +NewEmailForwardingAliasesToggleActivationWithDefaults instantiates a new EmailForwardingAliasesToggleActivation object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetIsActive + +`func (o *EmailForwardingAliasesToggleActivation) GetIsActive() bool` + +GetIsActive returns the IsActive field if non-nil, zero value otherwise. + +### GetIsActiveOk + +`func (o *EmailForwardingAliasesToggleActivation) GetIsActiveOk() (*bool, bool)` + +GetIsActiveOk returns a tuple with the IsActive field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsActive + +`func (o *EmailForwardingAliasesToggleActivation) SetIsActive(v bool)` + +SetIsActive sets IsActive field to given value. + + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/EmailForwardingApi.md b/docs/EmailForwardingApi.md new file mode 100644 index 0000000..55b5dc9 --- /dev/null +++ b/docs/EmailForwardingApi.md @@ -0,0 +1,1184 @@ +# \EmailForwardingApi + +All URIs are relative to *https://napi.arvancloud.ir/cdn/4.0* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**EmailForwardingsActivate**](EmailForwardingApi.md#EmailForwardingsActivate) | **Post** /domains/{domain}/email-forwardings/activate | Activate email forwarding +[**EmailForwardingsAliasesDestroy**](EmailForwardingApi.md#EmailForwardingsAliasesDestroy) | **Delete** /domains/{domain}/email-forwardings/{emailForwardingId}/aliases/{emailForwardingAliasId} | Delete an alias +[**EmailForwardingsAliasesIndex**](EmailForwardingApi.md#EmailForwardingsAliasesIndex) | **Get** /domains/{domain}/email-forwardings/{emailForwardingId}/aliases | List of email forwarding aliases for given domain +[**EmailForwardingsAliasesStore**](EmailForwardingApi.md#EmailForwardingsAliasesStore) | **Post** /domains/{domain}/email-forwardings/{emailForwardingId}/aliases | Create new alias +[**EmailForwardingsAliasesToggleActivation**](EmailForwardingApi.md#EmailForwardingsAliasesToggleActivation) | **Patch** /domains/{domain}/email-forwardings/{emailForwardingId}/aliases/{emailForwardingAliasId}/toggle-activation | Toggle alias activation +[**EmailForwardingsAliasesUpdateRecipients**](EmailForwardingApi.md#EmailForwardingsAliasesUpdateRecipients) | **Patch** /domains/{domain}/email-forwardings/{emailForwardingId}/aliases/{emailForwardingAliasId}/recipients | Update alias recipients +[**EmailForwardingsCatchAllActivate**](EmailForwardingApi.md#EmailForwardingsCatchAllActivate) | **Post** /domains/{domain}/email-forwardings/catch-all/activate | Activate email forwarding catch all +[**EmailForwardingsCatchAllDeactivate**](EmailForwardingApi.md#EmailForwardingsCatchAllDeactivate) | **Post** /domains/{domain}/email-forwardings/catch-all/deactivate | Deactivate email forwarding catch all +[**EmailForwardingsDeactivate**](EmailForwardingApi.md#EmailForwardingsDeactivate) | **Post** /domains/{domain}/email-forwardings/deactivate | Deactivate email forwarding +[**EmailForwardingsRecipientsDestroy**](EmailForwardingApi.md#EmailForwardingsRecipientsDestroy) | **Delete** /domains/{domain}/email-forwardings/{emailForwardingId}/recipients/{emailForwardingRecipientId} | Delete a recipient +[**EmailForwardingsRecipientsIndex**](EmailForwardingApi.md#EmailForwardingsRecipientsIndex) | **Get** /domains/{domain}/email-forwardings/{emailForwardingId}/recipients | List recipients of an email forwarding +[**EmailForwardingsRecipientsResendVerification**](EmailForwardingApi.md#EmailForwardingsRecipientsResendVerification) | **Post** /domains/{domain}/email-forwardings/{emailForwardingId}/recipients/{emailForwardingRecipientId}/resend-verification | Resend Verification +[**EmailForwardingsRecipientsSetDefault**](EmailForwardingApi.md#EmailForwardingsRecipientsSetDefault) | **Patch** /domains/{domain}/email-forwardings/{emailForwardingId}/recipients/{emailForwardingRecipientId}/set-default | Set default recipient +[**EmailForwardingsRecipientsStore**](EmailForwardingApi.md#EmailForwardingsRecipientsStore) | **Post** /domains/{domain}/email-forwardings/{emailForwardingId}/recipients | Create new recipient +[**EmailForwardingsRecipientsVerify**](EmailForwardingApi.md#EmailForwardingsRecipientsVerify) | **Post** /domains/{domain}/email-forwardings/{emailForwardingId}/recipients/{emailForwardingRecipientId}/verify | Verify recipient +[**EmailForwardingsStats**](EmailForwardingApi.md#EmailForwardingsStats) | **Get** /domains/{domain}/email-forwardings/stats | Show stats of domain's email forwarding + + + +## EmailForwardingsActivate + +> MessageResponse EmailForwardingsActivate(ctx, domain).Execute() + +Activate email forwarding + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.EmailForwardingApi.EmailForwardingsActivate(context.Background(), domain).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `EmailForwardingApi.EmailForwardingsActivate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `EmailForwardingsActivate`: MessageResponse + fmt.Fprintf(os.Stdout, "Response from `EmailForwardingApi.EmailForwardingsActivate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiEmailForwardingsActivateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**MessageResponse**](MessageResponse.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## EmailForwardingsAliasesDestroy + +> MessageResponse EmailForwardingsAliasesDestroy(ctx, domain, emailForwardingId, emailForwardingAliasId).Execute() + +Delete an alias + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + emailForwardingId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Email forwarding id + emailForwardingAliasId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Email forwarding alias id + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.EmailForwardingApi.EmailForwardingsAliasesDestroy(context.Background(), domain, emailForwardingId, emailForwardingAliasId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `EmailForwardingApi.EmailForwardingsAliasesDestroy``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `EmailForwardingsAliasesDestroy`: MessageResponse + fmt.Fprintf(os.Stdout, "Response from `EmailForwardingApi.EmailForwardingsAliasesDestroy`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | +**emailForwardingId** | **string** | Email forwarding id | +**emailForwardingAliasId** | **string** | Email forwarding alias id | + +### Other Parameters + +Other parameters are passed through a pointer to a apiEmailForwardingsAliasesDestroyRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + +### Return type + +[**MessageResponse**](MessageResponse.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## EmailForwardingsAliasesIndex + +> EmailForwardingAliasesListData EmailForwardingsAliasesIndex(ctx, domain, emailForwardingId).PerPage(perPage).Page(page).Execute() + +List of email forwarding aliases for given domain + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + emailForwardingId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Email forwarding id + perPage := int32(56) // int32 | Set how many items returned per page (optional) + page := int32(56) // int32 | Set the desired page number (optional) (default to 1) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.EmailForwardingApi.EmailForwardingsAliasesIndex(context.Background(), domain, emailForwardingId).PerPage(perPage).Page(page).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `EmailForwardingApi.EmailForwardingsAliasesIndex``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `EmailForwardingsAliasesIndex`: EmailForwardingAliasesListData + fmt.Fprintf(os.Stdout, "Response from `EmailForwardingApi.EmailForwardingsAliasesIndex`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | +**emailForwardingId** | **string** | Email forwarding id | + +### Other Parameters + +Other parameters are passed through a pointer to a apiEmailForwardingsAliasesIndexRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **perPage** | **int32** | Set how many items returned per page | + **page** | **int32** | Set the desired page number | [default to 1] + +### Return type + +[**EmailForwardingAliasesListData**](EmailForwardingAliasesListData.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## EmailForwardingsAliasesStore + +> EmailForwardingsAliasesStore201Response EmailForwardingsAliasesStore(ctx, domain, emailForwardingId).EmailForwardingAliasesStore(emailForwardingAliasesStore).Execute() + +Create new alias + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + emailForwardingId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Email forwarding id + emailForwardingAliasesStore := *openapiclient.NewEmailForwardingAliasesStore("LocalPart_example", []string{"Recipients_example"}) // EmailForwardingAliasesStore | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.EmailForwardingApi.EmailForwardingsAliasesStore(context.Background(), domain, emailForwardingId).EmailForwardingAliasesStore(emailForwardingAliasesStore).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `EmailForwardingApi.EmailForwardingsAliasesStore``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `EmailForwardingsAliasesStore`: EmailForwardingsAliasesStore201Response + fmt.Fprintf(os.Stdout, "Response from `EmailForwardingApi.EmailForwardingsAliasesStore`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | +**emailForwardingId** | **string** | Email forwarding id | + +### Other Parameters + +Other parameters are passed through a pointer to a apiEmailForwardingsAliasesStoreRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **emailForwardingAliasesStore** | [**EmailForwardingAliasesStore**](EmailForwardingAliasesStore.md) | | + +### Return type + +[**EmailForwardingsAliasesStore201Response**](EmailForwardingsAliasesStore201Response.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## EmailForwardingsAliasesToggleActivation + +> MessageResponse EmailForwardingsAliasesToggleActivation(ctx, domain, emailForwardingId, emailForwardingAliasId).EmailForwardingAliasesToggleActivation(emailForwardingAliasesToggleActivation).Execute() + +Toggle alias activation + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + emailForwardingId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Email forwarding id + emailForwardingAliasId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Email forwarding alias id + emailForwardingAliasesToggleActivation := *openapiclient.NewEmailForwardingAliasesToggleActivation(false) // EmailForwardingAliasesToggleActivation | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.EmailForwardingApi.EmailForwardingsAliasesToggleActivation(context.Background(), domain, emailForwardingId, emailForwardingAliasId).EmailForwardingAliasesToggleActivation(emailForwardingAliasesToggleActivation).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `EmailForwardingApi.EmailForwardingsAliasesToggleActivation``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `EmailForwardingsAliasesToggleActivation`: MessageResponse + fmt.Fprintf(os.Stdout, "Response from `EmailForwardingApi.EmailForwardingsAliasesToggleActivation`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | +**emailForwardingId** | **string** | Email forwarding id | +**emailForwardingAliasId** | **string** | Email forwarding alias id | + +### Other Parameters + +Other parameters are passed through a pointer to a apiEmailForwardingsAliasesToggleActivationRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + **emailForwardingAliasesToggleActivation** | [**EmailForwardingAliasesToggleActivation**](EmailForwardingAliasesToggleActivation.md) | | + +### Return type + +[**MessageResponse**](MessageResponse.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## EmailForwardingsAliasesUpdateRecipients + +> MessageResponse EmailForwardingsAliasesUpdateRecipients(ctx, domain, emailForwardingId, emailForwardingAliasId).EmailForwardingAliasesRecipients(emailForwardingAliasesRecipients).Execute() + +Update alias recipients + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + emailForwardingId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Email forwarding id + emailForwardingAliasId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Email forwarding alias id + emailForwardingAliasesRecipients := *openapiclient.NewEmailForwardingAliasesRecipients([]string{"Recipients_example"}) // EmailForwardingAliasesRecipients | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.EmailForwardingApi.EmailForwardingsAliasesUpdateRecipients(context.Background(), domain, emailForwardingId, emailForwardingAliasId).EmailForwardingAliasesRecipients(emailForwardingAliasesRecipients).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `EmailForwardingApi.EmailForwardingsAliasesUpdateRecipients``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `EmailForwardingsAliasesUpdateRecipients`: MessageResponse + fmt.Fprintf(os.Stdout, "Response from `EmailForwardingApi.EmailForwardingsAliasesUpdateRecipients`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | +**emailForwardingId** | **string** | Email forwarding id | +**emailForwardingAliasId** | **string** | Email forwarding alias id | + +### Other Parameters + +Other parameters are passed through a pointer to a apiEmailForwardingsAliasesUpdateRecipientsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + **emailForwardingAliasesRecipients** | [**EmailForwardingAliasesRecipients**](EmailForwardingAliasesRecipients.md) | | + +### Return type + +[**MessageResponse**](MessageResponse.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## EmailForwardingsCatchAllActivate + +> MessageResponse EmailForwardingsCatchAllActivate(ctx, domain).Execute() + +Activate email forwarding catch all + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.EmailForwardingApi.EmailForwardingsCatchAllActivate(context.Background(), domain).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `EmailForwardingApi.EmailForwardingsCatchAllActivate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `EmailForwardingsCatchAllActivate`: MessageResponse + fmt.Fprintf(os.Stdout, "Response from `EmailForwardingApi.EmailForwardingsCatchAllActivate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiEmailForwardingsCatchAllActivateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**MessageResponse**](MessageResponse.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## EmailForwardingsCatchAllDeactivate + +> MessageResponse EmailForwardingsCatchAllDeactivate(ctx, domain).Execute() + +Deactivate email forwarding catch all + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.EmailForwardingApi.EmailForwardingsCatchAllDeactivate(context.Background(), domain).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `EmailForwardingApi.EmailForwardingsCatchAllDeactivate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `EmailForwardingsCatchAllDeactivate`: MessageResponse + fmt.Fprintf(os.Stdout, "Response from `EmailForwardingApi.EmailForwardingsCatchAllDeactivate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiEmailForwardingsCatchAllDeactivateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**MessageResponse**](MessageResponse.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## EmailForwardingsDeactivate + +> MessageResponse EmailForwardingsDeactivate(ctx, domain).Execute() + +Deactivate email forwarding + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.EmailForwardingApi.EmailForwardingsDeactivate(context.Background(), domain).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `EmailForwardingApi.EmailForwardingsDeactivate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `EmailForwardingsDeactivate`: MessageResponse + fmt.Fprintf(os.Stdout, "Response from `EmailForwardingApi.EmailForwardingsDeactivate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiEmailForwardingsDeactivateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**MessageResponse**](MessageResponse.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## EmailForwardingsRecipientsDestroy + +> MessageResponse EmailForwardingsRecipientsDestroy(ctx, domain, emailForwardingId, emailForwardingRecipientId).Execute() + +Delete a recipient + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + emailForwardingId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Email forwarding id + emailForwardingRecipientId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Email forwarding recipient id + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.EmailForwardingApi.EmailForwardingsRecipientsDestroy(context.Background(), domain, emailForwardingId, emailForwardingRecipientId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `EmailForwardingApi.EmailForwardingsRecipientsDestroy``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `EmailForwardingsRecipientsDestroy`: MessageResponse + fmt.Fprintf(os.Stdout, "Response from `EmailForwardingApi.EmailForwardingsRecipientsDestroy`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | +**emailForwardingId** | **string** | Email forwarding id | +**emailForwardingRecipientId** | **string** | Email forwarding recipient id | + +### Other Parameters + +Other parameters are passed through a pointer to a apiEmailForwardingsRecipientsDestroyRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + +### Return type + +[**MessageResponse**](MessageResponse.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## EmailForwardingsRecipientsIndex + +> EmailForwardingRecipientsListData EmailForwardingsRecipientsIndex(ctx, domain, emailForwardingId).PerPage(perPage).Page(page).Execute() + +List recipients of an email forwarding + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + emailForwardingId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Email forwarding id + perPage := int32(56) // int32 | Set how many items returned per page (optional) + page := int32(56) // int32 | Set the desired page number (optional) (default to 1) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.EmailForwardingApi.EmailForwardingsRecipientsIndex(context.Background(), domain, emailForwardingId).PerPage(perPage).Page(page).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `EmailForwardingApi.EmailForwardingsRecipientsIndex``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `EmailForwardingsRecipientsIndex`: EmailForwardingRecipientsListData + fmt.Fprintf(os.Stdout, "Response from `EmailForwardingApi.EmailForwardingsRecipientsIndex`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | +**emailForwardingId** | **string** | Email forwarding id | + +### Other Parameters + +Other parameters are passed through a pointer to a apiEmailForwardingsRecipientsIndexRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **perPage** | **int32** | Set how many items returned per page | + **page** | **int32** | Set the desired page number | [default to 1] + +### Return type + +[**EmailForwardingRecipientsListData**](EmailForwardingRecipientsListData.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## EmailForwardingsRecipientsResendVerification + +> MessageResponse EmailForwardingsRecipientsResendVerification(ctx, domain, emailForwardingId, emailForwardingRecipientId).Execute() + +Resend Verification + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + emailForwardingId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Email forwarding id + emailForwardingRecipientId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Email forwarding recipient id + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.EmailForwardingApi.EmailForwardingsRecipientsResendVerification(context.Background(), domain, emailForwardingId, emailForwardingRecipientId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `EmailForwardingApi.EmailForwardingsRecipientsResendVerification``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `EmailForwardingsRecipientsResendVerification`: MessageResponse + fmt.Fprintf(os.Stdout, "Response from `EmailForwardingApi.EmailForwardingsRecipientsResendVerification`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | +**emailForwardingId** | **string** | Email forwarding id | +**emailForwardingRecipientId** | **string** | Email forwarding recipient id | + +### Other Parameters + +Other parameters are passed through a pointer to a apiEmailForwardingsRecipientsResendVerificationRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + +### Return type + +[**MessageResponse**](MessageResponse.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## EmailForwardingsRecipientsSetDefault + +> MessageResponse EmailForwardingsRecipientsSetDefault(ctx, domain, emailForwardingId, emailForwardingRecipientId).Execute() + +Set default recipient + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + emailForwardingId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Email forwarding id + emailForwardingRecipientId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Email forwarding recipient id + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.EmailForwardingApi.EmailForwardingsRecipientsSetDefault(context.Background(), domain, emailForwardingId, emailForwardingRecipientId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `EmailForwardingApi.EmailForwardingsRecipientsSetDefault``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `EmailForwardingsRecipientsSetDefault`: MessageResponse + fmt.Fprintf(os.Stdout, "Response from `EmailForwardingApi.EmailForwardingsRecipientsSetDefault`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | +**emailForwardingId** | **string** | Email forwarding id | +**emailForwardingRecipientId** | **string** | Email forwarding recipient id | + +### Other Parameters + +Other parameters are passed through a pointer to a apiEmailForwardingsRecipientsSetDefaultRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + +### Return type + +[**MessageResponse**](MessageResponse.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## EmailForwardingsRecipientsStore + +> EmailForwardingsRecipientsStore201Response EmailForwardingsRecipientsStore(ctx, domain, emailForwardingId).EmailForwardingRecipientsStore(emailForwardingRecipientsStore).Execute() + +Create new recipient + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + emailForwardingId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Email forwarding id + emailForwardingRecipientsStore := *openapiclient.NewEmailForwardingRecipientsStore("Email_example") // EmailForwardingRecipientsStore | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.EmailForwardingApi.EmailForwardingsRecipientsStore(context.Background(), domain, emailForwardingId).EmailForwardingRecipientsStore(emailForwardingRecipientsStore).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `EmailForwardingApi.EmailForwardingsRecipientsStore``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `EmailForwardingsRecipientsStore`: EmailForwardingsRecipientsStore201Response + fmt.Fprintf(os.Stdout, "Response from `EmailForwardingApi.EmailForwardingsRecipientsStore`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | +**emailForwardingId** | **string** | Email forwarding id | + +### Other Parameters + +Other parameters are passed through a pointer to a apiEmailForwardingsRecipientsStoreRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **emailForwardingRecipientsStore** | [**EmailForwardingRecipientsStore**](EmailForwardingRecipientsStore.md) | | + +### Return type + +[**EmailForwardingsRecipientsStore201Response**](EmailForwardingsRecipientsStore201Response.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## EmailForwardingsRecipientsVerify + +> MessageResponse EmailForwardingsRecipientsVerify(ctx, domain, emailForwardingId, emailForwardingRecipientId).EmailForwardingRecipientsVerify(emailForwardingRecipientsVerify).Execute() + +Verify recipient + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + emailForwardingId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Email forwarding id + emailForwardingRecipientId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Email forwarding recipient id + emailForwardingRecipientsVerify := *openapiclient.NewEmailForwardingRecipientsVerify("Code_example") // EmailForwardingRecipientsVerify | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.EmailForwardingApi.EmailForwardingsRecipientsVerify(context.Background(), domain, emailForwardingId, emailForwardingRecipientId).EmailForwardingRecipientsVerify(emailForwardingRecipientsVerify).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `EmailForwardingApi.EmailForwardingsRecipientsVerify``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `EmailForwardingsRecipientsVerify`: MessageResponse + fmt.Fprintf(os.Stdout, "Response from `EmailForwardingApi.EmailForwardingsRecipientsVerify`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | +**emailForwardingId** | **string** | Email forwarding id | +**emailForwardingRecipientId** | **string** | Email forwarding recipient id | + +### Other Parameters + +Other parameters are passed through a pointer to a apiEmailForwardingsRecipientsVerifyRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + **emailForwardingRecipientsVerify** | [**EmailForwardingRecipientsVerify**](EmailForwardingRecipientsVerify.md) | | + +### Return type + +[**MessageResponse**](MessageResponse.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## EmailForwardingsStats + +> EmailForwardingStatsData EmailForwardingsStats(ctx, domain).Execute() + +Show stats of domain's email forwarding + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.EmailForwardingApi.EmailForwardingsStats(context.Background(), domain).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `EmailForwardingApi.EmailForwardingsStats``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `EmailForwardingsStats`: EmailForwardingStatsData + fmt.Fprintf(os.Stdout, "Response from `EmailForwardingApi.EmailForwardingsStats`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiEmailForwardingsStatsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**EmailForwardingStatsData**](EmailForwardingStatsData.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + diff --git a/docs/EmailForwardingRecipient.md b/docs/EmailForwardingRecipient.md new file mode 100644 index 0000000..99470e7 --- /dev/null +++ b/docs/EmailForwardingRecipient.md @@ -0,0 +1,134 @@ +# EmailForwardingRecipient + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **string** | | [optional] +**Email** | Pointer to **string** | | [optional] +**IsVerified** | Pointer to **bool** | | [optional] +**IsDefault** | Pointer to **bool** | | [optional] + +## Methods + +### NewEmailForwardingRecipient + +`func NewEmailForwardingRecipient() *EmailForwardingRecipient` + +NewEmailForwardingRecipient instantiates a new EmailForwardingRecipient object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewEmailForwardingRecipientWithDefaults + +`func NewEmailForwardingRecipientWithDefaults() *EmailForwardingRecipient` + +NewEmailForwardingRecipientWithDefaults instantiates a new EmailForwardingRecipient object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *EmailForwardingRecipient) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *EmailForwardingRecipient) 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 *EmailForwardingRecipient) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *EmailForwardingRecipient) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetEmail + +`func (o *EmailForwardingRecipient) GetEmail() string` + +GetEmail returns the Email field if non-nil, zero value otherwise. + +### GetEmailOk + +`func (o *EmailForwardingRecipient) GetEmailOk() (*string, bool)` + +GetEmailOk returns a tuple with the Email field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEmail + +`func (o *EmailForwardingRecipient) SetEmail(v string)` + +SetEmail sets Email field to given value. + +### HasEmail + +`func (o *EmailForwardingRecipient) HasEmail() bool` + +HasEmail returns a boolean if a field has been set. + +### GetIsVerified + +`func (o *EmailForwardingRecipient) GetIsVerified() bool` + +GetIsVerified returns the IsVerified field if non-nil, zero value otherwise. + +### GetIsVerifiedOk + +`func (o *EmailForwardingRecipient) GetIsVerifiedOk() (*bool, bool)` + +GetIsVerifiedOk returns a tuple with the IsVerified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsVerified + +`func (o *EmailForwardingRecipient) SetIsVerified(v bool)` + +SetIsVerified sets IsVerified field to given value. + +### HasIsVerified + +`func (o *EmailForwardingRecipient) HasIsVerified() bool` + +HasIsVerified returns a boolean if a field has been set. + +### GetIsDefault + +`func (o *EmailForwardingRecipient) GetIsDefault() bool` + +GetIsDefault returns the IsDefault field if non-nil, zero value otherwise. + +### GetIsDefaultOk + +`func (o *EmailForwardingRecipient) GetIsDefaultOk() (*bool, bool)` + +GetIsDefaultOk returns a tuple with the IsDefault field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsDefault + +`func (o *EmailForwardingRecipient) SetIsDefault(v bool)` + +SetIsDefault sets IsDefault field to given value. + +### HasIsDefault + +`func (o *EmailForwardingRecipient) HasIsDefault() bool` + +HasIsDefault returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/EmailForwardingRecipientsListData.md b/docs/EmailForwardingRecipientsListData.md new file mode 100644 index 0000000..fbb521f --- /dev/null +++ b/docs/EmailForwardingRecipientsListData.md @@ -0,0 +1,56 @@ +# EmailForwardingRecipientsListData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**[]EmailForwardingRecipientsListInner**](EmailForwardingRecipientsListInner.md) | | [optional] + +## Methods + +### NewEmailForwardingRecipientsListData + +`func NewEmailForwardingRecipientsListData() *EmailForwardingRecipientsListData` + +NewEmailForwardingRecipientsListData instantiates a new EmailForwardingRecipientsListData object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewEmailForwardingRecipientsListDataWithDefaults + +`func NewEmailForwardingRecipientsListDataWithDefaults() *EmailForwardingRecipientsListData` + +NewEmailForwardingRecipientsListDataWithDefaults instantiates a new EmailForwardingRecipientsListData object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *EmailForwardingRecipientsListData) GetData() []EmailForwardingRecipientsListInner` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *EmailForwardingRecipientsListData) GetDataOk() (*[]EmailForwardingRecipientsListInner, 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 *EmailForwardingRecipientsListData) SetData(v []EmailForwardingRecipientsListInner)` + +SetData sets Data field to given value. + +### HasData + +`func (o *EmailForwardingRecipientsListData) HasData() bool` + +HasData returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/EmailForwardingRecipientsListInner.md b/docs/EmailForwardingRecipientsListInner.md new file mode 100644 index 0000000..282c4bb --- /dev/null +++ b/docs/EmailForwardingRecipientsListInner.md @@ -0,0 +1,134 @@ +# EmailForwardingRecipientsListInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **string** | | [optional] +**Email** | Pointer to **string** | | [optional] +**IsVerified** | Pointer to **bool** | | [optional] +**IsDefault** | Pointer to **bool** | | [optional] + +## Methods + +### NewEmailForwardingRecipientsListInner + +`func NewEmailForwardingRecipientsListInner() *EmailForwardingRecipientsListInner` + +NewEmailForwardingRecipientsListInner instantiates a new EmailForwardingRecipientsListInner object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewEmailForwardingRecipientsListInnerWithDefaults + +`func NewEmailForwardingRecipientsListInnerWithDefaults() *EmailForwardingRecipientsListInner` + +NewEmailForwardingRecipientsListInnerWithDefaults instantiates a new EmailForwardingRecipientsListInner object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *EmailForwardingRecipientsListInner) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *EmailForwardingRecipientsListInner) 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 *EmailForwardingRecipientsListInner) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *EmailForwardingRecipientsListInner) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetEmail + +`func (o *EmailForwardingRecipientsListInner) GetEmail() string` + +GetEmail returns the Email field if non-nil, zero value otherwise. + +### GetEmailOk + +`func (o *EmailForwardingRecipientsListInner) GetEmailOk() (*string, bool)` + +GetEmailOk returns a tuple with the Email field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEmail + +`func (o *EmailForwardingRecipientsListInner) SetEmail(v string)` + +SetEmail sets Email field to given value. + +### HasEmail + +`func (o *EmailForwardingRecipientsListInner) HasEmail() bool` + +HasEmail returns a boolean if a field has been set. + +### GetIsVerified + +`func (o *EmailForwardingRecipientsListInner) GetIsVerified() bool` + +GetIsVerified returns the IsVerified field if non-nil, zero value otherwise. + +### GetIsVerifiedOk + +`func (o *EmailForwardingRecipientsListInner) GetIsVerifiedOk() (*bool, bool)` + +GetIsVerifiedOk returns a tuple with the IsVerified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsVerified + +`func (o *EmailForwardingRecipientsListInner) SetIsVerified(v bool)` + +SetIsVerified sets IsVerified field to given value. + +### HasIsVerified + +`func (o *EmailForwardingRecipientsListInner) HasIsVerified() bool` + +HasIsVerified returns a boolean if a field has been set. + +### GetIsDefault + +`func (o *EmailForwardingRecipientsListInner) GetIsDefault() bool` + +GetIsDefault returns the IsDefault field if non-nil, zero value otherwise. + +### GetIsDefaultOk + +`func (o *EmailForwardingRecipientsListInner) GetIsDefaultOk() (*bool, bool)` + +GetIsDefaultOk returns a tuple with the IsDefault field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsDefault + +`func (o *EmailForwardingRecipientsListInner) SetIsDefault(v bool)` + +SetIsDefault sets IsDefault field to given value. + +### HasIsDefault + +`func (o *EmailForwardingRecipientsListInner) HasIsDefault() bool` + +HasIsDefault returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/EmailForwardingRecipientsStore.md b/docs/EmailForwardingRecipientsStore.md new file mode 100644 index 0000000..681976c --- /dev/null +++ b/docs/EmailForwardingRecipientsStore.md @@ -0,0 +1,51 @@ +# EmailForwardingRecipientsStore + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Email** | **string** | | + +## Methods + +### NewEmailForwardingRecipientsStore + +`func NewEmailForwardingRecipientsStore(email string, ) *EmailForwardingRecipientsStore` + +NewEmailForwardingRecipientsStore instantiates a new EmailForwardingRecipientsStore object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewEmailForwardingRecipientsStoreWithDefaults + +`func NewEmailForwardingRecipientsStoreWithDefaults() *EmailForwardingRecipientsStore` + +NewEmailForwardingRecipientsStoreWithDefaults instantiates a new EmailForwardingRecipientsStore object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetEmail + +`func (o *EmailForwardingRecipientsStore) GetEmail() string` + +GetEmail returns the Email field if non-nil, zero value otherwise. + +### GetEmailOk + +`func (o *EmailForwardingRecipientsStore) GetEmailOk() (*string, bool)` + +GetEmailOk returns a tuple with the Email field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEmail + +`func (o *EmailForwardingRecipientsStore) SetEmail(v string)` + +SetEmail sets Email field to given value. + + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/EmailForwardingRecipientsVerify.md b/docs/EmailForwardingRecipientsVerify.md new file mode 100644 index 0000000..1c37ed1 --- /dev/null +++ b/docs/EmailForwardingRecipientsVerify.md @@ -0,0 +1,51 @@ +# EmailForwardingRecipientsVerify + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Code** | **string** | | + +## Methods + +### NewEmailForwardingRecipientsVerify + +`func NewEmailForwardingRecipientsVerify(code string, ) *EmailForwardingRecipientsVerify` + +NewEmailForwardingRecipientsVerify instantiates a new EmailForwardingRecipientsVerify object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewEmailForwardingRecipientsVerifyWithDefaults + +`func NewEmailForwardingRecipientsVerifyWithDefaults() *EmailForwardingRecipientsVerify` + +NewEmailForwardingRecipientsVerifyWithDefaults instantiates a new EmailForwardingRecipientsVerify object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCode + +`func (o *EmailForwardingRecipientsVerify) GetCode() string` + +GetCode returns the Code field if non-nil, zero value otherwise. + +### GetCodeOk + +`func (o *EmailForwardingRecipientsVerify) GetCodeOk() (*string, bool)` + +GetCodeOk returns a tuple with the Code field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCode + +`func (o *EmailForwardingRecipientsVerify) SetCode(v string)` + +SetCode sets Code field to given value. + + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/EmailForwardingStats.md b/docs/EmailForwardingStats.md new file mode 100644 index 0000000..0ef3186 --- /dev/null +++ b/docs/EmailForwardingStats.md @@ -0,0 +1,264 @@ +# EmailForwardingStats + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **string** | | [optional] +**DnsActivation** | Pointer to **bool** | | [optional] +**RecipientsCount** | Pointer to **int32** | | [optional] +**AliasesCount** | Pointer to **int32** | | [optional] +**IsActive** | Pointer to **bool** | | [optional] +**IsConfigured** | Pointer to **bool** | | [optional] +**EmailsForwarded** | Pointer to **int32** | | [optional] +**EmailsBlocked** | Pointer to **int32** | | [optional] +**EmailsReplied** | Pointer to **int32** | | [optional] + +## Methods + +### NewEmailForwardingStats + +`func NewEmailForwardingStats() *EmailForwardingStats` + +NewEmailForwardingStats instantiates a new EmailForwardingStats object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewEmailForwardingStatsWithDefaults + +`func NewEmailForwardingStatsWithDefaults() *EmailForwardingStats` + +NewEmailForwardingStatsWithDefaults instantiates a new EmailForwardingStats object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *EmailForwardingStats) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *EmailForwardingStats) 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 *EmailForwardingStats) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *EmailForwardingStats) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetDnsActivation + +`func (o *EmailForwardingStats) GetDnsActivation() bool` + +GetDnsActivation returns the DnsActivation field if non-nil, zero value otherwise. + +### GetDnsActivationOk + +`func (o *EmailForwardingStats) GetDnsActivationOk() (*bool, bool)` + +GetDnsActivationOk returns a tuple with the DnsActivation field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDnsActivation + +`func (o *EmailForwardingStats) SetDnsActivation(v bool)` + +SetDnsActivation sets DnsActivation field to given value. + +### HasDnsActivation + +`func (o *EmailForwardingStats) HasDnsActivation() bool` + +HasDnsActivation returns a boolean if a field has been set. + +### GetRecipientsCount + +`func (o *EmailForwardingStats) GetRecipientsCount() int32` + +GetRecipientsCount returns the RecipientsCount field if non-nil, zero value otherwise. + +### GetRecipientsCountOk + +`func (o *EmailForwardingStats) GetRecipientsCountOk() (*int32, bool)` + +GetRecipientsCountOk returns a tuple with the RecipientsCount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRecipientsCount + +`func (o *EmailForwardingStats) SetRecipientsCount(v int32)` + +SetRecipientsCount sets RecipientsCount field to given value. + +### HasRecipientsCount + +`func (o *EmailForwardingStats) HasRecipientsCount() bool` + +HasRecipientsCount returns a boolean if a field has been set. + +### GetAliasesCount + +`func (o *EmailForwardingStats) GetAliasesCount() int32` + +GetAliasesCount returns the AliasesCount field if non-nil, zero value otherwise. + +### GetAliasesCountOk + +`func (o *EmailForwardingStats) GetAliasesCountOk() (*int32, bool)` + +GetAliasesCountOk returns a tuple with the AliasesCount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAliasesCount + +`func (o *EmailForwardingStats) SetAliasesCount(v int32)` + +SetAliasesCount sets AliasesCount field to given value. + +### HasAliasesCount + +`func (o *EmailForwardingStats) HasAliasesCount() bool` + +HasAliasesCount returns a boolean if a field has been set. + +### GetIsActive + +`func (o *EmailForwardingStats) GetIsActive() bool` + +GetIsActive returns the IsActive field if non-nil, zero value otherwise. + +### GetIsActiveOk + +`func (o *EmailForwardingStats) GetIsActiveOk() (*bool, bool)` + +GetIsActiveOk returns a tuple with the IsActive field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsActive + +`func (o *EmailForwardingStats) SetIsActive(v bool)` + +SetIsActive sets IsActive field to given value. + +### HasIsActive + +`func (o *EmailForwardingStats) HasIsActive() bool` + +HasIsActive returns a boolean if a field has been set. + +### GetIsConfigured + +`func (o *EmailForwardingStats) GetIsConfigured() bool` + +GetIsConfigured returns the IsConfigured field if non-nil, zero value otherwise. + +### GetIsConfiguredOk + +`func (o *EmailForwardingStats) GetIsConfiguredOk() (*bool, bool)` + +GetIsConfiguredOk returns a tuple with the IsConfigured field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsConfigured + +`func (o *EmailForwardingStats) SetIsConfigured(v bool)` + +SetIsConfigured sets IsConfigured field to given value. + +### HasIsConfigured + +`func (o *EmailForwardingStats) HasIsConfigured() bool` + +HasIsConfigured returns a boolean if a field has been set. + +### GetEmailsForwarded + +`func (o *EmailForwardingStats) GetEmailsForwarded() int32` + +GetEmailsForwarded returns the EmailsForwarded field if non-nil, zero value otherwise. + +### GetEmailsForwardedOk + +`func (o *EmailForwardingStats) GetEmailsForwardedOk() (*int32, bool)` + +GetEmailsForwardedOk returns a tuple with the EmailsForwarded field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEmailsForwarded + +`func (o *EmailForwardingStats) SetEmailsForwarded(v int32)` + +SetEmailsForwarded sets EmailsForwarded field to given value. + +### HasEmailsForwarded + +`func (o *EmailForwardingStats) HasEmailsForwarded() bool` + +HasEmailsForwarded returns a boolean if a field has been set. + +### GetEmailsBlocked + +`func (o *EmailForwardingStats) GetEmailsBlocked() int32` + +GetEmailsBlocked returns the EmailsBlocked field if non-nil, zero value otherwise. + +### GetEmailsBlockedOk + +`func (o *EmailForwardingStats) GetEmailsBlockedOk() (*int32, bool)` + +GetEmailsBlockedOk returns a tuple with the EmailsBlocked field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEmailsBlocked + +`func (o *EmailForwardingStats) SetEmailsBlocked(v int32)` + +SetEmailsBlocked sets EmailsBlocked field to given value. + +### HasEmailsBlocked + +`func (o *EmailForwardingStats) HasEmailsBlocked() bool` + +HasEmailsBlocked returns a boolean if a field has been set. + +### GetEmailsReplied + +`func (o *EmailForwardingStats) GetEmailsReplied() int32` + +GetEmailsReplied returns the EmailsReplied field if non-nil, zero value otherwise. + +### GetEmailsRepliedOk + +`func (o *EmailForwardingStats) GetEmailsRepliedOk() (*int32, bool)` + +GetEmailsRepliedOk returns a tuple with the EmailsReplied field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEmailsReplied + +`func (o *EmailForwardingStats) SetEmailsReplied(v int32)` + +SetEmailsReplied sets EmailsReplied field to given value. + +### HasEmailsReplied + +`func (o *EmailForwardingStats) HasEmailsReplied() bool` + +HasEmailsReplied returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/EmailForwardingStatsData.md b/docs/EmailForwardingStatsData.md new file mode 100644 index 0000000..3a63236 --- /dev/null +++ b/docs/EmailForwardingStatsData.md @@ -0,0 +1,56 @@ +# EmailForwardingStatsData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**EmailForwardingStats**](EmailForwardingStats.md) | | [optional] + +## Methods + +### NewEmailForwardingStatsData + +`func NewEmailForwardingStatsData() *EmailForwardingStatsData` + +NewEmailForwardingStatsData instantiates a new EmailForwardingStatsData object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewEmailForwardingStatsDataWithDefaults + +`func NewEmailForwardingStatsDataWithDefaults() *EmailForwardingStatsData` + +NewEmailForwardingStatsDataWithDefaults instantiates a new EmailForwardingStatsData object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *EmailForwardingStatsData) GetData() EmailForwardingStats` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *EmailForwardingStatsData) GetDataOk() (*EmailForwardingStats, 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 *EmailForwardingStatsData) SetData(v EmailForwardingStats)` + +SetData sets Data field to given value. + +### HasData + +`func (o *EmailForwardingStatsData) HasData() bool` + +HasData returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/EmailForwardingsAliasesStore201Response.md b/docs/EmailForwardingsAliasesStore201Response.md new file mode 100644 index 0000000..b753568 --- /dev/null +++ b/docs/EmailForwardingsAliasesStore201Response.md @@ -0,0 +1,92 @@ +# EmailForwardingsAliasesStore201Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**EmailForwardingAlias**](EmailForwardingAlias.md) | | [optional] +**Message** | Pointer to **NullableString** | | [optional] + +## Methods + +### NewEmailForwardingsAliasesStore201Response + +`func NewEmailForwardingsAliasesStore201Response() *EmailForwardingsAliasesStore201Response` + +NewEmailForwardingsAliasesStore201Response instantiates a new EmailForwardingsAliasesStore201Response object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewEmailForwardingsAliasesStore201ResponseWithDefaults + +`func NewEmailForwardingsAliasesStore201ResponseWithDefaults() *EmailForwardingsAliasesStore201Response` + +NewEmailForwardingsAliasesStore201ResponseWithDefaults instantiates a new EmailForwardingsAliasesStore201Response object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *EmailForwardingsAliasesStore201Response) GetData() EmailForwardingAlias` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *EmailForwardingsAliasesStore201Response) GetDataOk() (*EmailForwardingAlias, 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 *EmailForwardingsAliasesStore201Response) SetData(v EmailForwardingAlias)` + +SetData sets Data field to given value. + +### HasData + +`func (o *EmailForwardingsAliasesStore201Response) HasData() bool` + +HasData returns a boolean if a field has been set. + +### GetMessage + +`func (o *EmailForwardingsAliasesStore201Response) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *EmailForwardingsAliasesStore201Response) GetMessageOk() (*string, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessage + +`func (o *EmailForwardingsAliasesStore201Response) SetMessage(v string)` + +SetMessage sets Message field to given value. + +### HasMessage + +`func (o *EmailForwardingsAliasesStore201Response) HasMessage() bool` + +HasMessage returns a boolean if a field has been set. + +### SetMessageNil + +`func (o *EmailForwardingsAliasesStore201Response) SetMessageNil(b bool)` + + SetMessageNil sets the value for Message to be an explicit nil + +### UnsetMessage +`func (o *EmailForwardingsAliasesStore201Response) UnsetMessage()` + +UnsetMessage ensures that no value is present for Message, not even an explicit nil + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/EmailForwardingsRecipientsStore201Response.md b/docs/EmailForwardingsRecipientsStore201Response.md new file mode 100644 index 0000000..54b0bfd --- /dev/null +++ b/docs/EmailForwardingsRecipientsStore201Response.md @@ -0,0 +1,92 @@ +# EmailForwardingsRecipientsStore201Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**EmailForwardingRecipient**](EmailForwardingRecipient.md) | | [optional] +**Message** | Pointer to **NullableString** | | [optional] + +## Methods + +### NewEmailForwardingsRecipientsStore201Response + +`func NewEmailForwardingsRecipientsStore201Response() *EmailForwardingsRecipientsStore201Response` + +NewEmailForwardingsRecipientsStore201Response instantiates a new EmailForwardingsRecipientsStore201Response object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewEmailForwardingsRecipientsStore201ResponseWithDefaults + +`func NewEmailForwardingsRecipientsStore201ResponseWithDefaults() *EmailForwardingsRecipientsStore201Response` + +NewEmailForwardingsRecipientsStore201ResponseWithDefaults instantiates a new EmailForwardingsRecipientsStore201Response object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *EmailForwardingsRecipientsStore201Response) GetData() EmailForwardingRecipient` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *EmailForwardingsRecipientsStore201Response) GetDataOk() (*EmailForwardingRecipient, 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 *EmailForwardingsRecipientsStore201Response) SetData(v EmailForwardingRecipient)` + +SetData sets Data field to given value. + +### HasData + +`func (o *EmailForwardingsRecipientsStore201Response) HasData() bool` + +HasData returns a boolean if a field has been set. + +### GetMessage + +`func (o *EmailForwardingsRecipientsStore201Response) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *EmailForwardingsRecipientsStore201Response) GetMessageOk() (*string, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessage + +`func (o *EmailForwardingsRecipientsStore201Response) SetMessage(v string)` + +SetMessage sets Message field to given value. + +### HasMessage + +`func (o *EmailForwardingsRecipientsStore201Response) HasMessage() bool` + +HasMessage returns a boolean if a field has been set. + +### SetMessageNil + +`func (o *EmailForwardingsRecipientsStore201Response) SetMessageNil(b bool)` + + SetMessageNil sets the value for Message to be an explicit nil + +### UnsetMessage +`func (o *EmailForwardingsRecipientsStore201Response) UnsetMessage()` + +UnsetMessage ensures that no value is present for Message, not even an explicit nil + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/ErrorLog.md b/docs/ErrorLog.md new file mode 100644 index 0000000..9c90862 --- /dev/null +++ b/docs/ErrorLog.md @@ -0,0 +1,108 @@ +# ErrorLog + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **string** | The error message | [optional] +**Count** | Pointer to **int32** | The error's count | [optional] +**Upstreams** | Pointer to [**[]ErrorLogUpstreamsInner**](ErrorLogUpstreamsInner.md) | | [optional] + +## Methods + +### NewErrorLog + +`func NewErrorLog() *ErrorLog` + +NewErrorLog instantiates a new ErrorLog object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewErrorLogWithDefaults + +`func NewErrorLogWithDefaults() *ErrorLog` + +NewErrorLogWithDefaults instantiates a new ErrorLog object +This 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 *ErrorLog) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ErrorLog) 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 *ErrorLog) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *ErrorLog) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetCount + +`func (o *ErrorLog) GetCount() int32` + +GetCount returns the Count field if non-nil, zero value otherwise. + +### GetCountOk + +`func (o *ErrorLog) 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 *ErrorLog) SetCount(v int32)` + +SetCount sets Count field to given value. + +### HasCount + +`func (o *ErrorLog) HasCount() bool` + +HasCount returns a boolean if a field has been set. + +### GetUpstreams + +`func (o *ErrorLog) GetUpstreams() []ErrorLogUpstreamsInner` + +GetUpstreams returns the Upstreams field if non-nil, zero value otherwise. + +### GetUpstreamsOk + +`func (o *ErrorLog) GetUpstreamsOk() (*[]ErrorLogUpstreamsInner, bool)` + +GetUpstreamsOk returns a tuple with the Upstreams field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpstreams + +`func (o *ErrorLog) SetUpstreams(v []ErrorLogUpstreamsInner)` + +SetUpstreams sets Upstreams field to given value. + +### HasUpstreams + +`func (o *ErrorLog) HasUpstreams() bool` + +HasUpstreams returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/ErrorLogChart.md b/docs/ErrorLogChart.md new file mode 100644 index 0000000..4324735 --- /dev/null +++ b/docs/ErrorLogChart.md @@ -0,0 +1,82 @@ +# ErrorLogChart + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Statistics** | Pointer to [**ErrorLogChartStatistics**](ErrorLogChartStatistics.md) | | [optional] +**Charts** | Pointer to [**ErrorLogChartCharts**](ErrorLogChartCharts.md) | | [optional] + +## Methods + +### NewErrorLogChart + +`func NewErrorLogChart() *ErrorLogChart` + +NewErrorLogChart instantiates a new ErrorLogChart object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewErrorLogChartWithDefaults + +`func NewErrorLogChartWithDefaults() *ErrorLogChart` + +NewErrorLogChartWithDefaults instantiates a new ErrorLogChart object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetStatistics + +`func (o *ErrorLogChart) GetStatistics() ErrorLogChartStatistics` + +GetStatistics returns the Statistics field if non-nil, zero value otherwise. + +### GetStatisticsOk + +`func (o *ErrorLogChart) GetStatisticsOk() (*ErrorLogChartStatistics, bool)` + +GetStatisticsOk returns a tuple with the Statistics field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatistics + +`func (o *ErrorLogChart) SetStatistics(v ErrorLogChartStatistics)` + +SetStatistics sets Statistics field to given value. + +### HasStatistics + +`func (o *ErrorLogChart) HasStatistics() bool` + +HasStatistics returns a boolean if a field has been set. + +### GetCharts + +`func (o *ErrorLogChart) GetCharts() ErrorLogChartCharts` + +GetCharts returns the Charts field if non-nil, zero value otherwise. + +### GetChartsOk + +`func (o *ErrorLogChart) GetChartsOk() (*ErrorLogChartCharts, bool)` + +GetChartsOk returns a tuple with the Charts field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCharts + +`func (o *ErrorLogChart) SetCharts(v ErrorLogChartCharts)` + +SetCharts sets Charts field to given value. + +### HasCharts + +`func (o *ErrorLogChart) HasCharts() bool` + +HasCharts returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/ErrorLogChartCharts.md b/docs/ErrorLogChartCharts.md new file mode 100644 index 0000000..f428f6f --- /dev/null +++ b/docs/ErrorLogChartCharts.md @@ -0,0 +1,56 @@ +# ErrorLogChartCharts + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**StatusCode** | Pointer to [**ErrorLogChartChartsStatusCode**](ErrorLogChartChartsStatusCode.md) | | [optional] + +## Methods + +### NewErrorLogChartCharts + +`func NewErrorLogChartCharts() *ErrorLogChartCharts` + +NewErrorLogChartCharts instantiates a new ErrorLogChartCharts object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewErrorLogChartChartsWithDefaults + +`func NewErrorLogChartChartsWithDefaults() *ErrorLogChartCharts` + +NewErrorLogChartChartsWithDefaults instantiates a new ErrorLogChartCharts object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetStatusCode + +`func (o *ErrorLogChartCharts) GetStatusCode() ErrorLogChartChartsStatusCode` + +GetStatusCode returns the StatusCode field if non-nil, zero value otherwise. + +### GetStatusCodeOk + +`func (o *ErrorLogChartCharts) GetStatusCodeOk() (*ErrorLogChartChartsStatusCode, bool)` + +GetStatusCodeOk returns a tuple with the StatusCode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatusCode + +`func (o *ErrorLogChartCharts) SetStatusCode(v ErrorLogChartChartsStatusCode)` + +SetStatusCode sets StatusCode field to given value. + +### HasStatusCode + +`func (o *ErrorLogChartCharts) HasStatusCode() bool` + +HasStatusCode returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/ErrorLogChartChartsStatusCode.md b/docs/ErrorLogChartChartsStatusCode.md new file mode 100644 index 0000000..90552f4 --- /dev/null +++ b/docs/ErrorLogChartChartsStatusCode.md @@ -0,0 +1,108 @@ +# ErrorLogChartChartsStatusCode + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Title** | Pointer to **string** | | [optional] +**Categories** | Pointer to [**[]time.Time**](time.Time.md) | | [optional] +**Series** | Pointer to [**[]ErrorLogChartChartsStatusCodeSeriesInner**](ErrorLogChartChartsStatusCodeSeriesInner.md) | | [optional] + +## Methods + +### NewErrorLogChartChartsStatusCode + +`func NewErrorLogChartChartsStatusCode() *ErrorLogChartChartsStatusCode` + +NewErrorLogChartChartsStatusCode instantiates a new ErrorLogChartChartsStatusCode object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewErrorLogChartChartsStatusCodeWithDefaults + +`func NewErrorLogChartChartsStatusCodeWithDefaults() *ErrorLogChartChartsStatusCode` + +NewErrorLogChartChartsStatusCodeWithDefaults instantiates a new ErrorLogChartChartsStatusCode object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetTitle + +`func (o *ErrorLogChartChartsStatusCode) GetTitle() string` + +GetTitle returns the Title field if non-nil, zero value otherwise. + +### GetTitleOk + +`func (o *ErrorLogChartChartsStatusCode) 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 *ErrorLogChartChartsStatusCode) SetTitle(v string)` + +SetTitle sets Title field to given value. + +### HasTitle + +`func (o *ErrorLogChartChartsStatusCode) HasTitle() bool` + +HasTitle returns a boolean if a field has been set. + +### GetCategories + +`func (o *ErrorLogChartChartsStatusCode) GetCategories() []time.Time` + +GetCategories returns the Categories field if non-nil, zero value otherwise. + +### GetCategoriesOk + +`func (o *ErrorLogChartChartsStatusCode) GetCategoriesOk() (*[]time.Time, bool)` + +GetCategoriesOk returns a tuple with the Categories field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCategories + +`func (o *ErrorLogChartChartsStatusCode) SetCategories(v []time.Time)` + +SetCategories sets Categories field to given value. + +### HasCategories + +`func (o *ErrorLogChartChartsStatusCode) HasCategories() bool` + +HasCategories returns a boolean if a field has been set. + +### GetSeries + +`func (o *ErrorLogChartChartsStatusCode) GetSeries() []ErrorLogChartChartsStatusCodeSeriesInner` + +GetSeries returns the Series field if non-nil, zero value otherwise. + +### GetSeriesOk + +`func (o *ErrorLogChartChartsStatusCode) GetSeriesOk() (*[]ErrorLogChartChartsStatusCodeSeriesInner, bool)` + +GetSeriesOk returns a tuple with the Series field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSeries + +`func (o *ErrorLogChartChartsStatusCode) SetSeries(v []ErrorLogChartChartsStatusCodeSeriesInner)` + +SetSeries sets Series field to given value. + +### HasSeries + +`func (o *ErrorLogChartChartsStatusCode) HasSeries() bool` + +HasSeries returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/ErrorLogChartChartsStatusCodeSeriesInner.md b/docs/ErrorLogChartChartsStatusCodeSeriesInner.md new file mode 100644 index 0000000..48134c3 --- /dev/null +++ b/docs/ErrorLogChartChartsStatusCodeSeriesInner.md @@ -0,0 +1,82 @@ +# ErrorLogChartChartsStatusCodeSeriesInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **string** | The error message | [optional] +**Data** | Pointer to **[]int32** | | [optional] + +## Methods + +### NewErrorLogChartChartsStatusCodeSeriesInner + +`func NewErrorLogChartChartsStatusCodeSeriesInner() *ErrorLogChartChartsStatusCodeSeriesInner` + +NewErrorLogChartChartsStatusCodeSeriesInner instantiates a new ErrorLogChartChartsStatusCodeSeriesInner object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewErrorLogChartChartsStatusCodeSeriesInnerWithDefaults + +`func NewErrorLogChartChartsStatusCodeSeriesInnerWithDefaults() *ErrorLogChartChartsStatusCodeSeriesInner` + +NewErrorLogChartChartsStatusCodeSeriesInnerWithDefaults instantiates a new ErrorLogChartChartsStatusCodeSeriesInner object +This 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 *ErrorLogChartChartsStatusCodeSeriesInner) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ErrorLogChartChartsStatusCodeSeriesInner) 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 *ErrorLogChartChartsStatusCodeSeriesInner) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *ErrorLogChartChartsStatusCodeSeriesInner) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetData + +`func (o *ErrorLogChartChartsStatusCodeSeriesInner) GetData() []int32` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ErrorLogChartChartsStatusCodeSeriesInner) GetDataOk() (*[]int32, 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 *ErrorLogChartChartsStatusCodeSeriesInner) SetData(v []int32)` + +SetData sets Data field to given value. + +### HasData + +`func (o *ErrorLogChartChartsStatusCodeSeriesInner) HasData() bool` + +HasData returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/ErrorLogChartData.md b/docs/ErrorLogChartData.md new file mode 100644 index 0000000..5adc9d1 --- /dev/null +++ b/docs/ErrorLogChartData.md @@ -0,0 +1,56 @@ +# ErrorLogChartData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**ErrorLogChart**](ErrorLogChart.md) | | [optional] + +## Methods + +### NewErrorLogChartData + +`func NewErrorLogChartData() *ErrorLogChartData` + +NewErrorLogChartData instantiates a new ErrorLogChartData object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewErrorLogChartDataWithDefaults + +`func NewErrorLogChartDataWithDefaults() *ErrorLogChartData` + +NewErrorLogChartDataWithDefaults instantiates a new ErrorLogChartData object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *ErrorLogChartData) GetData() ErrorLogChart` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ErrorLogChartData) GetDataOk() (*ErrorLogChart, 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 *ErrorLogChartData) SetData(v ErrorLogChart)` + +SetData sets Data field to given value. + +### HasData + +`func (o *ErrorLogChartData) HasData() bool` + +HasData returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/ErrorLogChartStatistics.md b/docs/ErrorLogChartStatistics.md new file mode 100644 index 0000000..92cedcd --- /dev/null +++ b/docs/ErrorLogChartStatistics.md @@ -0,0 +1,56 @@ +# ErrorLogChartStatistics + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**StatusCodes** | Pointer to **map[string]interface{}** | <key, value> where key is error and value is its count | [optional] + +## Methods + +### NewErrorLogChartStatistics + +`func NewErrorLogChartStatistics() *ErrorLogChartStatistics` + +NewErrorLogChartStatistics instantiates a new ErrorLogChartStatistics object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewErrorLogChartStatisticsWithDefaults + +`func NewErrorLogChartStatisticsWithDefaults() *ErrorLogChartStatistics` + +NewErrorLogChartStatisticsWithDefaults instantiates a new ErrorLogChartStatistics object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetStatusCodes + +`func (o *ErrorLogChartStatistics) GetStatusCodes() map[string]interface{}` + +GetStatusCodes returns the StatusCodes field if non-nil, zero value otherwise. + +### GetStatusCodesOk + +`func (o *ErrorLogChartStatistics) GetStatusCodesOk() (*map[string]interface{}, bool)` + +GetStatusCodesOk returns a tuple with the StatusCodes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatusCodes + +`func (o *ErrorLogChartStatistics) SetStatusCodes(v map[string]interface{})` + +SetStatusCodes sets StatusCodes field to given value. + +### HasStatusCodes + +`func (o *ErrorLogChartStatistics) HasStatusCodes() bool` + +HasStatusCodes returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/ErrorLogUpstreamsInner.md b/docs/ErrorLogUpstreamsInner.md new file mode 100644 index 0000000..75ba625 --- /dev/null +++ b/docs/ErrorLogUpstreamsInner.md @@ -0,0 +1,82 @@ +# ErrorLogUpstreamsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Address** | Pointer to **string** | The upstream's address | [optional] +**Count** | Pointer to **int32** | Error count per upstream | [optional] + +## Methods + +### NewErrorLogUpstreamsInner + +`func NewErrorLogUpstreamsInner() *ErrorLogUpstreamsInner` + +NewErrorLogUpstreamsInner instantiates a new ErrorLogUpstreamsInner object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewErrorLogUpstreamsInnerWithDefaults + +`func NewErrorLogUpstreamsInnerWithDefaults() *ErrorLogUpstreamsInner` + +NewErrorLogUpstreamsInnerWithDefaults instantiates a new ErrorLogUpstreamsInner object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetAddress + +`func (o *ErrorLogUpstreamsInner) GetAddress() string` + +GetAddress returns the Address field if non-nil, zero value otherwise. + +### GetAddressOk + +`func (o *ErrorLogUpstreamsInner) 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 *ErrorLogUpstreamsInner) SetAddress(v string)` + +SetAddress sets Address field to given value. + +### HasAddress + +`func (o *ErrorLogUpstreamsInner) HasAddress() bool` + +HasAddress returns a boolean if a field has been set. + +### GetCount + +`func (o *ErrorLogUpstreamsInner) GetCount() int32` + +GetCount returns the Count field if non-nil, zero value otherwise. + +### GetCountOk + +`func (o *ErrorLogUpstreamsInner) 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 *ErrorLogUpstreamsInner) SetCount(v int32)` + +SetCount sets Count field to given value. + +### HasCount + +`func (o *ErrorLogUpstreamsInner) HasCount() bool` + +HasCount returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/ErrorLogsData.md b/docs/ErrorLogsData.md new file mode 100644 index 0000000..ceb14d7 --- /dev/null +++ b/docs/ErrorLogsData.md @@ -0,0 +1,56 @@ +# ErrorLogsData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**[]ErrorLog**](ErrorLog.md) | | [optional] + +## Methods + +### NewErrorLogsData + +`func NewErrorLogsData() *ErrorLogsData` + +NewErrorLogsData instantiates a new ErrorLogsData object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewErrorLogsDataWithDefaults + +`func NewErrorLogsDataWithDefaults() *ErrorLogsData` + +NewErrorLogsDataWithDefaults instantiates a new ErrorLogsData object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *ErrorLogsData) GetData() []ErrorLog` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ErrorLogsData) GetDataOk() (*[]ErrorLog, 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 *ErrorLogsData) SetData(v []ErrorLog)` + +SetData sets Data field to given value. + +### HasData + +`func (o *ErrorLogsData) HasData() bool` + +HasData returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/EstimatedCost.md b/docs/EstimatedCost.md new file mode 100644 index 0000000..3edeafa --- /dev/null +++ b/docs/EstimatedCost.md @@ -0,0 +1,108 @@ +# EstimatedCost + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Period** | Pointer to **string** | | [optional] +**Currency** | Pointer to **string** | | [optional] +**Value** | Pointer to **float32** | | [optional] + +## Methods + +### NewEstimatedCost + +`func NewEstimatedCost() *EstimatedCost` + +NewEstimatedCost instantiates a new EstimatedCost object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewEstimatedCostWithDefaults + +`func NewEstimatedCostWithDefaults() *EstimatedCost` + +NewEstimatedCostWithDefaults instantiates a new EstimatedCost object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetPeriod + +`func (o *EstimatedCost) GetPeriod() string` + +GetPeriod returns the Period field if non-nil, zero value otherwise. + +### GetPeriodOk + +`func (o *EstimatedCost) GetPeriodOk() (*string, bool)` + +GetPeriodOk returns a tuple with the Period field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPeriod + +`func (o *EstimatedCost) SetPeriod(v string)` + +SetPeriod sets Period field to given value. + +### HasPeriod + +`func (o *EstimatedCost) HasPeriod() bool` + +HasPeriod returns a boolean if a field has been set. + +### GetCurrency + +`func (o *EstimatedCost) GetCurrency() string` + +GetCurrency returns the Currency field if non-nil, zero value otherwise. + +### GetCurrencyOk + +`func (o *EstimatedCost) GetCurrencyOk() (*string, bool)` + +GetCurrencyOk returns a tuple with the Currency field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCurrency + +`func (o *EstimatedCost) SetCurrency(v string)` + +SetCurrency sets Currency field to given value. + +### HasCurrency + +`func (o *EstimatedCost) HasCurrency() bool` + +HasCurrency returns a boolean if a field has been set. + +### GetValue + +`func (o *EstimatedCost) GetValue() float32` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *EstimatedCost) GetValueOk() (*float32, 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 *EstimatedCost) SetValue(v float32)` + +SetValue sets Value field to given value. + +### HasValue + +`func (o *EstimatedCost) HasValue() bool` + +HasValue returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/ExpectedResponse.md b/docs/ExpectedResponse.md new file mode 100644 index 0000000..aff88dc --- /dev/null +++ b/docs/ExpectedResponse.md @@ -0,0 +1,108 @@ +# ExpectedResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Codes** | Pointer to **[]int32** | List of expected http status code | [optional] +**Headers** | Pointer to **map[string][]string** | | [optional] +**Body** | Pointer to **string** | | [optional] + +## Methods + +### NewExpectedResponse + +`func NewExpectedResponse() *ExpectedResponse` + +NewExpectedResponse instantiates a new ExpectedResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewExpectedResponseWithDefaults + +`func NewExpectedResponseWithDefaults() *ExpectedResponse` + +NewExpectedResponseWithDefaults instantiates a new ExpectedResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCodes + +`func (o *ExpectedResponse) GetCodes() []int32` + +GetCodes returns the Codes field if non-nil, zero value otherwise. + +### GetCodesOk + +`func (o *ExpectedResponse) GetCodesOk() (*[]int32, bool)` + +GetCodesOk returns a tuple with the Codes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCodes + +`func (o *ExpectedResponse) SetCodes(v []int32)` + +SetCodes sets Codes field to given value. + +### HasCodes + +`func (o *ExpectedResponse) HasCodes() bool` + +HasCodes returns a boolean if a field has been set. + +### GetHeaders + +`func (o *ExpectedResponse) GetHeaders() map[string][]string` + +GetHeaders returns the Headers field if non-nil, zero value otherwise. + +### GetHeadersOk + +`func (o *ExpectedResponse) GetHeadersOk() (*map[string][]string, bool)` + +GetHeadersOk returns a tuple with the Headers field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHeaders + +`func (o *ExpectedResponse) SetHeaders(v map[string][]string)` + +SetHeaders sets Headers field to given value. + +### HasHeaders + +`func (o *ExpectedResponse) HasHeaders() bool` + +HasHeaders returns a boolean if a field has been set. + +### GetBody + +`func (o *ExpectedResponse) GetBody() string` + +GetBody returns the Body field if non-nil, zero value otherwise. + +### GetBodyOk + +`func (o *ExpectedResponse) GetBodyOk() (*string, bool)` + +GetBodyOk returns a tuple with the Body field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBody + +`func (o *ExpectedResponse) SetBody(v string)` + +SetBody sets Body field to given value. + +### HasBody + +`func (o *ExpectedResponse) HasBody() bool` + +HasBody returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/FeatureDefinition.md b/docs/FeatureDefinition.md new file mode 100644 index 0000000..babd432 --- /dev/null +++ b/docs/FeatureDefinition.md @@ -0,0 +1,108 @@ +# FeatureDefinition + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **string** | | [optional] +**Plans** | Pointer to [**FeatureDefinitionPlans**](FeatureDefinitionPlans.md) | | [optional] +**Meta** | Pointer to [**FeatureDefinitionMeta**](FeatureDefinitionMeta.md) | | [optional] + +## Methods + +### NewFeatureDefinition + +`func NewFeatureDefinition() *FeatureDefinition` + +NewFeatureDefinition instantiates a new FeatureDefinition object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewFeatureDefinitionWithDefaults + +`func NewFeatureDefinitionWithDefaults() *FeatureDefinition` + +NewFeatureDefinitionWithDefaults instantiates a new FeatureDefinition object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *FeatureDefinition) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *FeatureDefinition) 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 *FeatureDefinition) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *FeatureDefinition) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetPlans + +`func (o *FeatureDefinition) GetPlans() FeatureDefinitionPlans` + +GetPlans returns the Plans field if non-nil, zero value otherwise. + +### GetPlansOk + +`func (o *FeatureDefinition) GetPlansOk() (*FeatureDefinitionPlans, bool)` + +GetPlansOk returns a tuple with the Plans field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPlans + +`func (o *FeatureDefinition) SetPlans(v FeatureDefinitionPlans)` + +SetPlans sets Plans field to given value. + +### HasPlans + +`func (o *FeatureDefinition) HasPlans() bool` + +HasPlans returns a boolean if a field has been set. + +### GetMeta + +`func (o *FeatureDefinition) GetMeta() FeatureDefinitionMeta` + +GetMeta returns the Meta field if non-nil, zero value otherwise. + +### GetMetaOk + +`func (o *FeatureDefinition) GetMetaOk() (*FeatureDefinitionMeta, bool)` + +GetMetaOk returns a tuple with the Meta field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMeta + +`func (o *FeatureDefinition) SetMeta(v FeatureDefinitionMeta)` + +SetMeta sets Meta field to given value. + +### HasMeta + +`func (o *FeatureDefinition) HasMeta() bool` + +HasMeta returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/FeatureDefinitionMeta.md b/docs/FeatureDefinitionMeta.md new file mode 100644 index 0000000..c317097 --- /dev/null +++ b/docs/FeatureDefinitionMeta.md @@ -0,0 +1,82 @@ +# FeatureDefinitionMeta + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Label** | Pointer to **string** | | [optional] +**Description** | Pointer to **string** | | [optional] + +## Methods + +### NewFeatureDefinitionMeta + +`func NewFeatureDefinitionMeta() *FeatureDefinitionMeta` + +NewFeatureDefinitionMeta instantiates a new FeatureDefinitionMeta object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewFeatureDefinitionMetaWithDefaults + +`func NewFeatureDefinitionMetaWithDefaults() *FeatureDefinitionMeta` + +NewFeatureDefinitionMetaWithDefaults instantiates a new FeatureDefinitionMeta object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetLabel + +`func (o *FeatureDefinitionMeta) GetLabel() string` + +GetLabel returns the Label field if non-nil, zero value otherwise. + +### GetLabelOk + +`func (o *FeatureDefinitionMeta) GetLabelOk() (*string, bool)` + +GetLabelOk returns a tuple with the Label field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLabel + +`func (o *FeatureDefinitionMeta) SetLabel(v string)` + +SetLabel sets Label field to given value. + +### HasLabel + +`func (o *FeatureDefinitionMeta) HasLabel() bool` + +HasLabel returns a boolean if a field has been set. + +### GetDescription + +`func (o *FeatureDefinitionMeta) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *FeatureDefinitionMeta) 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 *FeatureDefinitionMeta) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *FeatureDefinitionMeta) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/FeatureDefinitionPlans.md b/docs/FeatureDefinitionPlans.md new file mode 100644 index 0000000..7f682f1 --- /dev/null +++ b/docs/FeatureDefinitionPlans.md @@ -0,0 +1,210 @@ +# FeatureDefinitionPlans + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Var0** | Pointer to [**NullableFeaturePlanDefinition**](FeaturePlanDefinition.md) | | [optional] +**Var1** | Pointer to [**NullableFeaturePlanDefinition**](FeaturePlanDefinition.md) | | [optional] +**Var2** | Pointer to [**NullableFeaturePlanDefinition**](FeaturePlanDefinition.md) | | [optional] +**Var3** | Pointer to [**NullableFeaturePlanDefinition**](FeaturePlanDefinition.md) | | [optional] +**Var4** | Pointer to [**NullableFeaturePlanDefinition**](FeaturePlanDefinition.md) | | [optional] + +## Methods + +### NewFeatureDefinitionPlans + +`func NewFeatureDefinitionPlans() *FeatureDefinitionPlans` + +NewFeatureDefinitionPlans instantiates a new FeatureDefinitionPlans object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewFeatureDefinitionPlansWithDefaults + +`func NewFeatureDefinitionPlansWithDefaults() *FeatureDefinitionPlans` + +NewFeatureDefinitionPlansWithDefaults instantiates a new FeatureDefinitionPlans object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetVar0 + +`func (o *FeatureDefinitionPlans) GetVar0() FeaturePlanDefinition` + +GetVar0 returns the Var0 field if non-nil, zero value otherwise. + +### GetVar0Ok + +`func (o *FeatureDefinitionPlans) GetVar0Ok() (*FeaturePlanDefinition, bool)` + +GetVar0Ok returns a tuple with the Var0 field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVar0 + +`func (o *FeatureDefinitionPlans) SetVar0(v FeaturePlanDefinition)` + +SetVar0 sets Var0 field to given value. + +### HasVar0 + +`func (o *FeatureDefinitionPlans) HasVar0() bool` + +HasVar0 returns a boolean if a field has been set. + +### SetVar0Nil + +`func (o *FeatureDefinitionPlans) SetVar0Nil(b bool)` + + SetVar0Nil sets the value for Var0 to be an explicit nil + +### UnsetVar0 +`func (o *FeatureDefinitionPlans) UnsetVar0()` + +UnsetVar0 ensures that no value is present for Var0, not even an explicit nil +### GetVar1 + +`func (o *FeatureDefinitionPlans) GetVar1() FeaturePlanDefinition` + +GetVar1 returns the Var1 field if non-nil, zero value otherwise. + +### GetVar1Ok + +`func (o *FeatureDefinitionPlans) GetVar1Ok() (*FeaturePlanDefinition, bool)` + +GetVar1Ok returns a tuple with the Var1 field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVar1 + +`func (o *FeatureDefinitionPlans) SetVar1(v FeaturePlanDefinition)` + +SetVar1 sets Var1 field to given value. + +### HasVar1 + +`func (o *FeatureDefinitionPlans) HasVar1() bool` + +HasVar1 returns a boolean if a field has been set. + +### SetVar1Nil + +`func (o *FeatureDefinitionPlans) SetVar1Nil(b bool)` + + SetVar1Nil sets the value for Var1 to be an explicit nil + +### UnsetVar1 +`func (o *FeatureDefinitionPlans) UnsetVar1()` + +UnsetVar1 ensures that no value is present for Var1, not even an explicit nil +### GetVar2 + +`func (o *FeatureDefinitionPlans) GetVar2() FeaturePlanDefinition` + +GetVar2 returns the Var2 field if non-nil, zero value otherwise. + +### GetVar2Ok + +`func (o *FeatureDefinitionPlans) GetVar2Ok() (*FeaturePlanDefinition, bool)` + +GetVar2Ok returns a tuple with the Var2 field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVar2 + +`func (o *FeatureDefinitionPlans) SetVar2(v FeaturePlanDefinition)` + +SetVar2 sets Var2 field to given value. + +### HasVar2 + +`func (o *FeatureDefinitionPlans) HasVar2() bool` + +HasVar2 returns a boolean if a field has been set. + +### SetVar2Nil + +`func (o *FeatureDefinitionPlans) SetVar2Nil(b bool)` + + SetVar2Nil sets the value for Var2 to be an explicit nil + +### UnsetVar2 +`func (o *FeatureDefinitionPlans) UnsetVar2()` + +UnsetVar2 ensures that no value is present for Var2, not even an explicit nil +### GetVar3 + +`func (o *FeatureDefinitionPlans) GetVar3() FeaturePlanDefinition` + +GetVar3 returns the Var3 field if non-nil, zero value otherwise. + +### GetVar3Ok + +`func (o *FeatureDefinitionPlans) GetVar3Ok() (*FeaturePlanDefinition, bool)` + +GetVar3Ok returns a tuple with the Var3 field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVar3 + +`func (o *FeatureDefinitionPlans) SetVar3(v FeaturePlanDefinition)` + +SetVar3 sets Var3 field to given value. + +### HasVar3 + +`func (o *FeatureDefinitionPlans) HasVar3() bool` + +HasVar3 returns a boolean if a field has been set. + +### SetVar3Nil + +`func (o *FeatureDefinitionPlans) SetVar3Nil(b bool)` + + SetVar3Nil sets the value for Var3 to be an explicit nil + +### UnsetVar3 +`func (o *FeatureDefinitionPlans) UnsetVar3()` + +UnsetVar3 ensures that no value is present for Var3, not even an explicit nil +### GetVar4 + +`func (o *FeatureDefinitionPlans) GetVar4() FeaturePlanDefinition` + +GetVar4 returns the Var4 field if non-nil, zero value otherwise. + +### GetVar4Ok + +`func (o *FeatureDefinitionPlans) GetVar4Ok() (*FeaturePlanDefinition, bool)` + +GetVar4Ok returns a tuple with the Var4 field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVar4 + +`func (o *FeatureDefinitionPlans) SetVar4(v FeaturePlanDefinition)` + +SetVar4 sets Var4 field to given value. + +### HasVar4 + +`func (o *FeatureDefinitionPlans) HasVar4() bool` + +HasVar4 returns a boolean if a field has been set. + +### SetVar4Nil + +`func (o *FeatureDefinitionPlans) SetVar4Nil(b bool)` + + SetVar4Nil sets the value for Var4 to be an explicit nil + +### UnsetVar4 +`func (o *FeatureDefinitionPlans) UnsetVar4()` + +UnsetVar4 ensures that no value is present for Var4, not even an explicit nil + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/FeaturePlanDefinition.md b/docs/FeaturePlanDefinition.md new file mode 100644 index 0000000..ce4d301 --- /dev/null +++ b/docs/FeaturePlanDefinition.md @@ -0,0 +1,128 @@ +# FeaturePlanDefinition + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | Pointer to [**FeaturePlanDefinitionMeta**](FeaturePlanDefinitionMeta.md) | | [optional] +**UsageLimit** | Pointer to [**NullableUsageLimit**](UsageLimit.md) | | [optional] +**Pricing** | Pointer to [**NullableFeaturePricing**](FeaturePricing.md) | | [optional] + +## Methods + +### NewFeaturePlanDefinition + +`func NewFeaturePlanDefinition() *FeaturePlanDefinition` + +NewFeaturePlanDefinition instantiates a new FeaturePlanDefinition object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewFeaturePlanDefinitionWithDefaults + +`func NewFeaturePlanDefinitionWithDefaults() *FeaturePlanDefinition` + +NewFeaturePlanDefinitionWithDefaults instantiates a new FeaturePlanDefinition object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetMeta + +`func (o *FeaturePlanDefinition) GetMeta() FeaturePlanDefinitionMeta` + +GetMeta returns the Meta field if non-nil, zero value otherwise. + +### GetMetaOk + +`func (o *FeaturePlanDefinition) GetMetaOk() (*FeaturePlanDefinitionMeta, bool)` + +GetMetaOk returns a tuple with the Meta field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMeta + +`func (o *FeaturePlanDefinition) SetMeta(v FeaturePlanDefinitionMeta)` + +SetMeta sets Meta field to given value. + +### HasMeta + +`func (o *FeaturePlanDefinition) HasMeta() bool` + +HasMeta returns a boolean if a field has been set. + +### GetUsageLimit + +`func (o *FeaturePlanDefinition) GetUsageLimit() UsageLimit` + +GetUsageLimit returns the UsageLimit field if non-nil, zero value otherwise. + +### GetUsageLimitOk + +`func (o *FeaturePlanDefinition) GetUsageLimitOk() (*UsageLimit, bool)` + +GetUsageLimitOk returns a tuple with the UsageLimit field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUsageLimit + +`func (o *FeaturePlanDefinition) SetUsageLimit(v UsageLimit)` + +SetUsageLimit sets UsageLimit field to given value. + +### HasUsageLimit + +`func (o *FeaturePlanDefinition) HasUsageLimit() bool` + +HasUsageLimit returns a boolean if a field has been set. + +### SetUsageLimitNil + +`func (o *FeaturePlanDefinition) SetUsageLimitNil(b bool)` + + SetUsageLimitNil sets the value for UsageLimit to be an explicit nil + +### UnsetUsageLimit +`func (o *FeaturePlanDefinition) UnsetUsageLimit()` + +UnsetUsageLimit ensures that no value is present for UsageLimit, not even an explicit nil +### GetPricing + +`func (o *FeaturePlanDefinition) GetPricing() FeaturePricing` + +GetPricing returns the Pricing field if non-nil, zero value otherwise. + +### GetPricingOk + +`func (o *FeaturePlanDefinition) GetPricingOk() (*FeaturePricing, bool)` + +GetPricingOk returns a tuple with the Pricing field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPricing + +`func (o *FeaturePlanDefinition) SetPricing(v FeaturePricing)` + +SetPricing sets Pricing field to given value. + +### HasPricing + +`func (o *FeaturePlanDefinition) HasPricing() bool` + +HasPricing returns a boolean if a field has been set. + +### SetPricingNil + +`func (o *FeaturePlanDefinition) SetPricingNil(b bool)` + + SetPricingNil sets the value for Pricing to be an explicit nil + +### UnsetPricing +`func (o *FeaturePlanDefinition) UnsetPricing()` + +UnsetPricing ensures that no value is present for Pricing, not even an explicit nil + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/FeaturePlanDefinitionMeta.md b/docs/FeaturePlanDefinitionMeta.md new file mode 100644 index 0000000..4a13bb3 --- /dev/null +++ b/docs/FeaturePlanDefinitionMeta.md @@ -0,0 +1,82 @@ +# FeaturePlanDefinitionMeta + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Labels** | Pointer to [**[]FeaturePlanDefinitionMetaLabelsInner**](FeaturePlanDefinitionMetaLabelsInner.md) | | [optional] +**Tip** | Pointer to **string** | | [optional] + +## Methods + +### NewFeaturePlanDefinitionMeta + +`func NewFeaturePlanDefinitionMeta() *FeaturePlanDefinitionMeta` + +NewFeaturePlanDefinitionMeta instantiates a new FeaturePlanDefinitionMeta object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewFeaturePlanDefinitionMetaWithDefaults + +`func NewFeaturePlanDefinitionMetaWithDefaults() *FeaturePlanDefinitionMeta` + +NewFeaturePlanDefinitionMetaWithDefaults instantiates a new FeaturePlanDefinitionMeta object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetLabels + +`func (o *FeaturePlanDefinitionMeta) GetLabels() []FeaturePlanDefinitionMetaLabelsInner` + +GetLabels returns the Labels field if non-nil, zero value otherwise. + +### GetLabelsOk + +`func (o *FeaturePlanDefinitionMeta) GetLabelsOk() (*[]FeaturePlanDefinitionMetaLabelsInner, bool)` + +GetLabelsOk returns a tuple with the Labels field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLabels + +`func (o *FeaturePlanDefinitionMeta) SetLabels(v []FeaturePlanDefinitionMetaLabelsInner)` + +SetLabels sets Labels field to given value. + +### HasLabels + +`func (o *FeaturePlanDefinitionMeta) HasLabels() bool` + +HasLabels returns a boolean if a field has been set. + +### GetTip + +`func (o *FeaturePlanDefinitionMeta) GetTip() string` + +GetTip returns the Tip field if non-nil, zero value otherwise. + +### GetTipOk + +`func (o *FeaturePlanDefinitionMeta) GetTipOk() (*string, bool)` + +GetTipOk returns a tuple with the Tip field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTip + +`func (o *FeaturePlanDefinitionMeta) SetTip(v string)` + +SetTip sets Tip field to given value. + +### HasTip + +`func (o *FeaturePlanDefinitionMeta) HasTip() bool` + +HasTip returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/FeaturePlanDefinitionMetaLabelsInner.md b/docs/FeaturePlanDefinitionMetaLabelsInner.md new file mode 100644 index 0000000..0384a16 --- /dev/null +++ b/docs/FeaturePlanDefinitionMetaLabelsInner.md @@ -0,0 +1,30 @@ +# FeaturePlanDefinitionMetaLabelsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Methods + +### NewFeaturePlanDefinitionMetaLabelsInner + +`func NewFeaturePlanDefinitionMetaLabelsInner() *FeaturePlanDefinitionMetaLabelsInner` + +NewFeaturePlanDefinitionMetaLabelsInner instantiates a new FeaturePlanDefinitionMetaLabelsInner object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewFeaturePlanDefinitionMetaLabelsInnerWithDefaults + +`func NewFeaturePlanDefinitionMetaLabelsInnerWithDefaults() *FeaturePlanDefinitionMetaLabelsInner` + +NewFeaturePlanDefinitionMetaLabelsInnerWithDefaults instantiates a new FeaturePlanDefinitionMetaLabelsInner object +This 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]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/FeaturePrice.md b/docs/FeaturePrice.md new file mode 100644 index 0000000..d5afa5a --- /dev/null +++ b/docs/FeaturePrice.md @@ -0,0 +1,108 @@ +# FeaturePrice + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**MetricKey** | Pointer to **string** | | [optional] +**Currency** | Pointer to **string** | | [optional] +**Value** | Pointer to **float32** | | [optional] + +## Methods + +### NewFeaturePrice + +`func NewFeaturePrice() *FeaturePrice` + +NewFeaturePrice instantiates a new FeaturePrice object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewFeaturePriceWithDefaults + +`func NewFeaturePriceWithDefaults() *FeaturePrice` + +NewFeaturePriceWithDefaults instantiates a new FeaturePrice object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetMetricKey + +`func (o *FeaturePrice) GetMetricKey() string` + +GetMetricKey returns the MetricKey field if non-nil, zero value otherwise. + +### GetMetricKeyOk + +`func (o *FeaturePrice) GetMetricKeyOk() (*string, bool)` + +GetMetricKeyOk returns a tuple with the MetricKey field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMetricKey + +`func (o *FeaturePrice) SetMetricKey(v string)` + +SetMetricKey sets MetricKey field to given value. + +### HasMetricKey + +`func (o *FeaturePrice) HasMetricKey() bool` + +HasMetricKey returns a boolean if a field has been set. + +### GetCurrency + +`func (o *FeaturePrice) GetCurrency() string` + +GetCurrency returns the Currency field if non-nil, zero value otherwise. + +### GetCurrencyOk + +`func (o *FeaturePrice) GetCurrencyOk() (*string, bool)` + +GetCurrencyOk returns a tuple with the Currency field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCurrency + +`func (o *FeaturePrice) SetCurrency(v string)` + +SetCurrency sets Currency field to given value. + +### HasCurrency + +`func (o *FeaturePrice) HasCurrency() bool` + +HasCurrency returns a boolean if a field has been set. + +### GetValue + +`func (o *FeaturePrice) GetValue() float32` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *FeaturePrice) GetValueOk() (*float32, 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 *FeaturePrice) SetValue(v float32)` + +SetValue sets Value field to given value. + +### HasValue + +`func (o *FeaturePrice) HasValue() bool` + +HasValue returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/FeaturePricing.md b/docs/FeaturePricing.md new file mode 100644 index 0000000..b00c19e --- /dev/null +++ b/docs/FeaturePricing.md @@ -0,0 +1,128 @@ +# FeaturePricing + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FreeTier** | Pointer to **int32** | | [optional] +**Flat** | Pointer to [**NullableFeaturePrice**](FeaturePrice.md) | | [optional] +**PerUnit** | Pointer to [**NullableFeaturePrice**](FeaturePrice.md) | | [optional] + +## Methods + +### NewFeaturePricing + +`func NewFeaturePricing() *FeaturePricing` + +NewFeaturePricing instantiates a new FeaturePricing object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewFeaturePricingWithDefaults + +`func NewFeaturePricingWithDefaults() *FeaturePricing` + +NewFeaturePricingWithDefaults instantiates a new FeaturePricing object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetFreeTier + +`func (o *FeaturePricing) GetFreeTier() int32` + +GetFreeTier returns the FreeTier field if non-nil, zero value otherwise. + +### GetFreeTierOk + +`func (o *FeaturePricing) GetFreeTierOk() (*int32, bool)` + +GetFreeTierOk returns a tuple with the FreeTier field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFreeTier + +`func (o *FeaturePricing) SetFreeTier(v int32)` + +SetFreeTier sets FreeTier field to given value. + +### HasFreeTier + +`func (o *FeaturePricing) HasFreeTier() bool` + +HasFreeTier returns a boolean if a field has been set. + +### GetFlat + +`func (o *FeaturePricing) GetFlat() FeaturePrice` + +GetFlat returns the Flat field if non-nil, zero value otherwise. + +### GetFlatOk + +`func (o *FeaturePricing) GetFlatOk() (*FeaturePrice, bool)` + +GetFlatOk returns a tuple with the Flat field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFlat + +`func (o *FeaturePricing) SetFlat(v FeaturePrice)` + +SetFlat sets Flat field to given value. + +### HasFlat + +`func (o *FeaturePricing) HasFlat() bool` + +HasFlat returns a boolean if a field has been set. + +### SetFlatNil + +`func (o *FeaturePricing) SetFlatNil(b bool)` + + SetFlatNil sets the value for Flat to be an explicit nil + +### UnsetFlat +`func (o *FeaturePricing) UnsetFlat()` + +UnsetFlat ensures that no value is present for Flat, not even an explicit nil +### GetPerUnit + +`func (o *FeaturePricing) GetPerUnit() FeaturePrice` + +GetPerUnit returns the PerUnit field if non-nil, zero value otherwise. + +### GetPerUnitOk + +`func (o *FeaturePricing) GetPerUnitOk() (*FeaturePrice, bool)` + +GetPerUnitOk returns a tuple with the PerUnit field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPerUnit + +`func (o *FeaturePricing) SetPerUnit(v FeaturePrice)` + +SetPerUnit sets PerUnit field to given value. + +### HasPerUnit + +`func (o *FeaturePricing) HasPerUnit() bool` + +HasPerUnit returns a boolean if a field has been set. + +### SetPerUnitNil + +`func (o *FeaturePricing) SetPerUnitNil(b bool)` + + SetPerUnitNil sets the value for PerUnit to be an explicit nil + +### UnsetPerUnit +`func (o *FeaturePricing) UnsetPerUnit()` + +UnsetPerUnit ensures that no value is present for PerUnit, not even an explicit nil + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/FeatureSet.md b/docs/FeatureSet.md new file mode 100644 index 0000000..21bdccf --- /dev/null +++ b/docs/FeatureSet.md @@ -0,0 +1,108 @@ +# FeatureSet + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **string** | | [optional] +**Label** | Pointer to **string** | | [optional] +**Features** | Pointer to [**[]FeatureDefinition**](FeatureDefinition.md) | | [optional] + +## Methods + +### NewFeatureSet + +`func NewFeatureSet() *FeatureSet` + +NewFeatureSet instantiates a new FeatureSet object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewFeatureSetWithDefaults + +`func NewFeatureSetWithDefaults() *FeatureSet` + +NewFeatureSetWithDefaults instantiates a new FeatureSet object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *FeatureSet) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *FeatureSet) 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 *FeatureSet) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *FeatureSet) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetLabel + +`func (o *FeatureSet) GetLabel() string` + +GetLabel returns the Label field if non-nil, zero value otherwise. + +### GetLabelOk + +`func (o *FeatureSet) GetLabelOk() (*string, bool)` + +GetLabelOk returns a tuple with the Label field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLabel + +`func (o *FeatureSet) SetLabel(v string)` + +SetLabel sets Label field to given value. + +### HasLabel + +`func (o *FeatureSet) HasLabel() bool` + +HasLabel returns a boolean if a field has been set. + +### GetFeatures + +`func (o *FeatureSet) GetFeatures() []FeatureDefinition` + +GetFeatures returns the Features field if non-nil, zero value otherwise. + +### GetFeaturesOk + +`func (o *FeatureSet) GetFeaturesOk() (*[]FeatureDefinition, bool)` + +GetFeaturesOk returns a tuple with the Features field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFeatures + +`func (o *FeatureSet) SetFeatures(v []FeatureDefinition)` + +SetFeatures sets Features field to given value. + +### HasFeatures + +`func (o *FeatureSet) HasFeatures() bool` + +HasFeatures returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/FeatureSets.md b/docs/FeatureSets.md new file mode 100644 index 0000000..1f2781a --- /dev/null +++ b/docs/FeatureSets.md @@ -0,0 +1,108 @@ +# FeatureSets + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Currency** | Pointer to [**Currency**](Currency.md) | | [optional] +**Plans** | Pointer to [**[]PlanInfo**](PlanInfo.md) | | [optional] +**FeatureSets** | Pointer to [**[]FeatureSet**](FeatureSet.md) | | [optional] + +## Methods + +### NewFeatureSets + +`func NewFeatureSets() *FeatureSets` + +NewFeatureSets instantiates a new FeatureSets object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewFeatureSetsWithDefaults + +`func NewFeatureSetsWithDefaults() *FeatureSets` + +NewFeatureSetsWithDefaults instantiates a new FeatureSets object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCurrency + +`func (o *FeatureSets) GetCurrency() Currency` + +GetCurrency returns the Currency field if non-nil, zero value otherwise. + +### GetCurrencyOk + +`func (o *FeatureSets) GetCurrencyOk() (*Currency, bool)` + +GetCurrencyOk returns a tuple with the Currency field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCurrency + +`func (o *FeatureSets) SetCurrency(v Currency)` + +SetCurrency sets Currency field to given value. + +### HasCurrency + +`func (o *FeatureSets) HasCurrency() bool` + +HasCurrency returns a boolean if a field has been set. + +### GetPlans + +`func (o *FeatureSets) GetPlans() []PlanInfo` + +GetPlans returns the Plans field if non-nil, zero value otherwise. + +### GetPlansOk + +`func (o *FeatureSets) GetPlansOk() (*[]PlanInfo, bool)` + +GetPlansOk returns a tuple with the Plans field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPlans + +`func (o *FeatureSets) SetPlans(v []PlanInfo)` + +SetPlans sets Plans field to given value. + +### HasPlans + +`func (o *FeatureSets) HasPlans() bool` + +HasPlans returns a boolean if a field has been set. + +### GetFeatureSets + +`func (o *FeatureSets) GetFeatureSets() []FeatureSet` + +GetFeatureSets returns the FeatureSets field if non-nil, zero value otherwise. + +### GetFeatureSetsOk + +`func (o *FeatureSets) GetFeatureSetsOk() (*[]FeatureSet, bool)` + +GetFeatureSetsOk returns a tuple with the FeatureSets field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFeatureSets + +`func (o *FeatureSets) SetFeatureSets(v []FeatureSet)` + +SetFeatureSets sets FeatureSets field to given value. + +### HasFeatureSets + +`func (o *FeatureSets) HasFeatureSets() bool` + +HasFeatureSets returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/FeatureUsage.md b/docs/FeatureUsage.md new file mode 100644 index 0000000..d7e73f7 --- /dev/null +++ b/docs/FeatureUsage.md @@ -0,0 +1,144 @@ +# FeatureUsage + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FeatureId** | Pointer to **string** | | [optional] +**Pricing** | Pointer to [**NullableFeaturePricing**](FeaturePricing.md) | | [optional] +**EstimatedCost** | Pointer to [**EstimatedCost**](EstimatedCost.md) | | [optional] +**Usage** | Pointer to **float32** | | [optional] + +## Methods + +### NewFeatureUsage + +`func NewFeatureUsage() *FeatureUsage` + +NewFeatureUsage instantiates a new FeatureUsage object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewFeatureUsageWithDefaults + +`func NewFeatureUsageWithDefaults() *FeatureUsage` + +NewFeatureUsageWithDefaults instantiates a new FeatureUsage object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetFeatureId + +`func (o *FeatureUsage) GetFeatureId() string` + +GetFeatureId returns the FeatureId field if non-nil, zero value otherwise. + +### GetFeatureIdOk + +`func (o *FeatureUsage) GetFeatureIdOk() (*string, bool)` + +GetFeatureIdOk returns a tuple with the FeatureId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFeatureId + +`func (o *FeatureUsage) SetFeatureId(v string)` + +SetFeatureId sets FeatureId field to given value. + +### HasFeatureId + +`func (o *FeatureUsage) HasFeatureId() bool` + +HasFeatureId returns a boolean if a field has been set. + +### GetPricing + +`func (o *FeatureUsage) GetPricing() FeaturePricing` + +GetPricing returns the Pricing field if non-nil, zero value otherwise. + +### GetPricingOk + +`func (o *FeatureUsage) GetPricingOk() (*FeaturePricing, bool)` + +GetPricingOk returns a tuple with the Pricing field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPricing + +`func (o *FeatureUsage) SetPricing(v FeaturePricing)` + +SetPricing sets Pricing field to given value. + +### HasPricing + +`func (o *FeatureUsage) HasPricing() bool` + +HasPricing returns a boolean if a field has been set. + +### SetPricingNil + +`func (o *FeatureUsage) SetPricingNil(b bool)` + + SetPricingNil sets the value for Pricing to be an explicit nil + +### UnsetPricing +`func (o *FeatureUsage) UnsetPricing()` + +UnsetPricing ensures that no value is present for Pricing, not even an explicit nil +### GetEstimatedCost + +`func (o *FeatureUsage) GetEstimatedCost() EstimatedCost` + +GetEstimatedCost returns the EstimatedCost field if non-nil, zero value otherwise. + +### GetEstimatedCostOk + +`func (o *FeatureUsage) GetEstimatedCostOk() (*EstimatedCost, bool)` + +GetEstimatedCostOk returns a tuple with the EstimatedCost field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEstimatedCost + +`func (o *FeatureUsage) SetEstimatedCost(v EstimatedCost)` + +SetEstimatedCost sets EstimatedCost field to given value. + +### HasEstimatedCost + +`func (o *FeatureUsage) HasEstimatedCost() bool` + +HasEstimatedCost returns a boolean if a field has been set. + +### GetUsage + +`func (o *FeatureUsage) GetUsage() float32` + +GetUsage returns the Usage field if non-nil, zero value otherwise. + +### GetUsageOk + +`func (o *FeatureUsage) GetUsageOk() (*float32, bool)` + +GetUsageOk returns a tuple with the Usage field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUsage + +`func (o *FeatureUsage) SetUsage(v float32)` + +SetUsage sets Usage field to given value. + +### HasUsage + +`func (o *FeatureUsage) HasUsage() bool` + +HasUsage returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/Firewall.md b/docs/Firewall.md new file mode 100644 index 0000000..8ce1cb7 --- /dev/null +++ b/docs/Firewall.md @@ -0,0 +1,170 @@ +# Firewall + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**IsEnabled** | Pointer to **bool** | | [optional] [readonly] +**DefaultAction** | Pointer to **string** | | [optional] +**DefaultActionDetails** | Pointer to **map[string]interface{}** | | [optional] +**VerifySni** | Pointer to **bool** | True to verify that SNI and hostname are equal | [optional] [default to false] +**Rules** | Pointer to [**[]FirewallRuleView**](FirewallRuleView.md) | | [optional] [readonly] + +## Methods + +### NewFirewall + +`func NewFirewall() *Firewall` + +NewFirewall instantiates a new Firewall object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewFirewallWithDefaults + +`func NewFirewallWithDefaults() *Firewall` + +NewFirewallWithDefaults instantiates a new Firewall object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetIsEnabled + +`func (o *Firewall) GetIsEnabled() bool` + +GetIsEnabled returns the IsEnabled field if non-nil, zero value otherwise. + +### GetIsEnabledOk + +`func (o *Firewall) GetIsEnabledOk() (*bool, bool)` + +GetIsEnabledOk returns a tuple with the IsEnabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsEnabled + +`func (o *Firewall) SetIsEnabled(v bool)` + +SetIsEnabled sets IsEnabled field to given value. + +### HasIsEnabled + +`func (o *Firewall) HasIsEnabled() bool` + +HasIsEnabled returns a boolean if a field has been set. + +### GetDefaultAction + +`func (o *Firewall) GetDefaultAction() string` + +GetDefaultAction returns the DefaultAction field if non-nil, zero value otherwise. + +### GetDefaultActionOk + +`func (o *Firewall) GetDefaultActionOk() (*string, bool)` + +GetDefaultActionOk returns a tuple with the DefaultAction field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDefaultAction + +`func (o *Firewall) SetDefaultAction(v string)` + +SetDefaultAction sets DefaultAction field to given value. + +### HasDefaultAction + +`func (o *Firewall) HasDefaultAction() bool` + +HasDefaultAction returns a boolean if a field has been set. + +### GetDefaultActionDetails + +`func (o *Firewall) GetDefaultActionDetails() map[string]interface{}` + +GetDefaultActionDetails returns the DefaultActionDetails field if non-nil, zero value otherwise. + +### GetDefaultActionDetailsOk + +`func (o *Firewall) GetDefaultActionDetailsOk() (*map[string]interface{}, bool)` + +GetDefaultActionDetailsOk returns a tuple with the DefaultActionDetails field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDefaultActionDetails + +`func (o *Firewall) SetDefaultActionDetails(v map[string]interface{})` + +SetDefaultActionDetails sets DefaultActionDetails field to given value. + +### HasDefaultActionDetails + +`func (o *Firewall) HasDefaultActionDetails() bool` + +HasDefaultActionDetails returns a boolean if a field has been set. + +### SetDefaultActionDetailsNil + +`func (o *Firewall) SetDefaultActionDetailsNil(b bool)` + + SetDefaultActionDetailsNil sets the value for DefaultActionDetails to be an explicit nil + +### UnsetDefaultActionDetails +`func (o *Firewall) UnsetDefaultActionDetails()` + +UnsetDefaultActionDetails ensures that no value is present for DefaultActionDetails, not even an explicit nil +### GetVerifySni + +`func (o *Firewall) GetVerifySni() bool` + +GetVerifySni returns the VerifySni field if non-nil, zero value otherwise. + +### GetVerifySniOk + +`func (o *Firewall) GetVerifySniOk() (*bool, bool)` + +GetVerifySniOk returns a tuple with the VerifySni field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVerifySni + +`func (o *Firewall) SetVerifySni(v bool)` + +SetVerifySni sets VerifySni field to given value. + +### HasVerifySni + +`func (o *Firewall) HasVerifySni() bool` + +HasVerifySni returns a boolean if a field has been set. + +### GetRules + +`func (o *Firewall) GetRules() []FirewallRuleView` + +GetRules returns the Rules field if non-nil, zero value otherwise. + +### GetRulesOk + +`func (o *Firewall) GetRulesOk() (*[]FirewallRuleView, bool)` + +GetRulesOk returns a tuple with the Rules field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRules + +`func (o *Firewall) SetRules(v []FirewallRuleView)` + +SetRules sets Rules field to given value. + +### HasRules + +`func (o *Firewall) HasRules() bool` + +HasRules returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/FirewallActionDetails.md b/docs/FirewallActionDetails.md new file mode 100644 index 0000000..6841cc5 --- /dev/null +++ b/docs/FirewallActionDetails.md @@ -0,0 +1,186 @@ +# FirewallActionDetails + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Rlimit** | Pointer to **bool** | | [optional] +**Challenge** | Pointer to **bool** | | [optional] +**Waf** | Pointer to **bool** | | [optional] +**Mode** | Pointer to **int32** | The mode of mitigation (1: Cookie, 2: Javascript, 3: Captcha) | [optional] +**Ttl** | Pointer to **int32** | | [optional] +**HttpsOnly** | Pointer to **bool** | | [optional] + +## Methods + +### NewFirewallActionDetails + +`func NewFirewallActionDetails() *FirewallActionDetails` + +NewFirewallActionDetails instantiates a new FirewallActionDetails object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewFirewallActionDetailsWithDefaults + +`func NewFirewallActionDetailsWithDefaults() *FirewallActionDetails` + +NewFirewallActionDetailsWithDefaults instantiates a new FirewallActionDetails object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetRlimit + +`func (o *FirewallActionDetails) GetRlimit() bool` + +GetRlimit returns the Rlimit field if non-nil, zero value otherwise. + +### GetRlimitOk + +`func (o *FirewallActionDetails) GetRlimitOk() (*bool, bool)` + +GetRlimitOk returns a tuple with the Rlimit field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRlimit + +`func (o *FirewallActionDetails) SetRlimit(v bool)` + +SetRlimit sets Rlimit field to given value. + +### HasRlimit + +`func (o *FirewallActionDetails) HasRlimit() bool` + +HasRlimit returns a boolean if a field has been set. + +### GetChallenge + +`func (o *FirewallActionDetails) GetChallenge() bool` + +GetChallenge returns the Challenge field if non-nil, zero value otherwise. + +### GetChallengeOk + +`func (o *FirewallActionDetails) GetChallengeOk() (*bool, bool)` + +GetChallengeOk returns a tuple with the Challenge field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetChallenge + +`func (o *FirewallActionDetails) SetChallenge(v bool)` + +SetChallenge sets Challenge field to given value. + +### HasChallenge + +`func (o *FirewallActionDetails) HasChallenge() bool` + +HasChallenge returns a boolean if a field has been set. + +### GetWaf + +`func (o *FirewallActionDetails) GetWaf() bool` + +GetWaf returns the Waf field if non-nil, zero value otherwise. + +### GetWafOk + +`func (o *FirewallActionDetails) GetWafOk() (*bool, bool)` + +GetWafOk returns a tuple with the Waf field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetWaf + +`func (o *FirewallActionDetails) SetWaf(v bool)` + +SetWaf sets Waf field to given value. + +### HasWaf + +`func (o *FirewallActionDetails) HasWaf() bool` + +HasWaf returns a boolean if a field has been set. + +### GetMode + +`func (o *FirewallActionDetails) GetMode() int32` + +GetMode returns the Mode field if non-nil, zero value otherwise. + +### GetModeOk + +`func (o *FirewallActionDetails) GetModeOk() (*int32, bool)` + +GetModeOk returns a tuple with the Mode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMode + +`func (o *FirewallActionDetails) SetMode(v int32)` + +SetMode sets Mode field to given value. + +### HasMode + +`func (o *FirewallActionDetails) HasMode() bool` + +HasMode returns a boolean if a field has been set. + +### GetTtl + +`func (o *FirewallActionDetails) GetTtl() int32` + +GetTtl returns the Ttl field if non-nil, zero value otherwise. + +### GetTtlOk + +`func (o *FirewallActionDetails) GetTtlOk() (*int32, bool)` + +GetTtlOk returns a tuple with the Ttl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTtl + +`func (o *FirewallActionDetails) SetTtl(v int32)` + +SetTtl sets Ttl field to given value. + +### HasTtl + +`func (o *FirewallActionDetails) HasTtl() bool` + +HasTtl returns a boolean if a field has been set. + +### GetHttpsOnly + +`func (o *FirewallActionDetails) GetHttpsOnly() bool` + +GetHttpsOnly returns the HttpsOnly field if non-nil, zero value otherwise. + +### GetHttpsOnlyOk + +`func (o *FirewallActionDetails) GetHttpsOnlyOk() (*bool, bool)` + +GetHttpsOnlyOk returns a tuple with the HttpsOnly field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHttpsOnly + +`func (o *FirewallActionDetails) SetHttpsOnly(v bool)` + +SetHttpsOnly sets HttpsOnly field to given value. + +### HasHttpsOnly + +`func (o *FirewallActionDetails) HasHttpsOnly() bool` + +HasHttpsOnly returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/FirewallApi.md b/docs/FirewallApi.md new file mode 100644 index 0000000..353e015 --- /dev/null +++ b/docs/FirewallApi.md @@ -0,0 +1,727 @@ +# \FirewallApi + +All URIs are relative to *https://napi.arvancloud.ir/cdn/4.0* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**FirewallIndex**](FirewallApi.md#FirewallIndex) | **Get** /domains/{domain}/firewall | Get domain's firewall configuration +[**FirewallReprioritize**](FirewallApi.md#FirewallReprioritize) | **Post** /domains/{domain}/firewall/actions/reprioritize | Change priority of firewall rules +[**FirewallRulesDestroy**](FirewallApi.md#FirewallRulesDestroy) | **Delete** /domains/{domain}/firewall/rules/{id} | Delete firewall rule +[**FirewallRulesIndex**](FirewallApi.md#FirewallRulesIndex) | **Get** /domains/{domain}/firewall/rules | Get domain's firewall rules +[**FirewallRulesShow**](FirewallApi.md#FirewallRulesShow) | **Get** /domains/{domain}/firewall/rules/{id} | Get firewall rule information +[**FirewallRulesStore**](FirewallApi.md#FirewallRulesStore) | **Post** /domains/{domain}/firewall/rules | Create new firewall rule +[**FirewallRulesUpdate**](FirewallApi.md#FirewallRulesUpdate) | **Patch** /domains/{domain}/firewall/rules/{id} | Update the firewall rule +[**FirewallSettingsIndex**](FirewallApi.md#FirewallSettingsIndex) | **Get** /domains/{domain}/firewall/settings | Get domain's firewall configuration +[**FirewallSettingsUpdate**](FirewallApi.md#FirewallSettingsUpdate) | **Patch** /domains/{domain}/firewall/settings | Update domain's firewall configuration +[**FirewallUpdate**](FirewallApi.md#FirewallUpdate) | **Patch** /domains/{domain}/firewall | Update domain's firewall configuration + + + +## FirewallIndex + +> FirewallIndex200Response FirewallIndex(ctx, domain).Execute() + +Get domain's firewall configuration + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.FirewallApi.FirewallIndex(context.Background(), domain).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `FirewallApi.FirewallIndex``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `FirewallIndex`: FirewallIndex200Response + fmt.Fprintf(os.Stdout, "Response from `FirewallApi.FirewallIndex`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiFirewallIndexRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**FirewallIndex200Response**](FirewallIndex200Response.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## FirewallReprioritize + +> MessageResponse FirewallReprioritize(ctx, domain).ReprioritizeRuleRequest(reprioritizeRuleRequest).Execute() + +Change priority of firewall rules + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + reprioritizeRuleRequest := *openapiclient.NewReprioritizeRuleRequest("RuleId_example") // ReprioritizeRuleRequest | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.FirewallApi.FirewallReprioritize(context.Background(), domain).ReprioritizeRuleRequest(reprioritizeRuleRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `FirewallApi.FirewallReprioritize``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `FirewallReprioritize`: MessageResponse + fmt.Fprintf(os.Stdout, "Response from `FirewallApi.FirewallReprioritize`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiFirewallReprioritizeRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **reprioritizeRuleRequest** | [**ReprioritizeRuleRequest**](ReprioritizeRuleRequest.md) | | + +### Return type + +[**MessageResponse**](MessageResponse.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## FirewallRulesDestroy + +> MessageResponse FirewallRulesDestroy(ctx, domain, id).Execute() + +Delete firewall rule + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.FirewallApi.FirewallRulesDestroy(context.Background(), domain, id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `FirewallApi.FirewallRulesDestroy``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `FirewallRulesDestroy`: MessageResponse + fmt.Fprintf(os.Stdout, "Response from `FirewallApi.FirewallRulesDestroy`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | +**id** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiFirewallRulesDestroyRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + +[**MessageResponse**](MessageResponse.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## FirewallRulesIndex + +> FirewallRulesIndex200Response FirewallRulesIndex(ctx, domain).PerPage(perPage).OrderBy(orderBy).OrderType(orderType).Search(search).Execute() + +Get domain's firewall rules + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + perPage := int32(56) // int32 | (optional) + orderBy := "orderBy_example" // string | (optional) + orderType := "orderType_example" // string | (optional) + search := "search_example" // string | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.FirewallApi.FirewallRulesIndex(context.Background(), domain).PerPage(perPage).OrderBy(orderBy).OrderType(orderType).Search(search).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `FirewallApi.FirewallRulesIndex``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `FirewallRulesIndex`: FirewallRulesIndex200Response + fmt.Fprintf(os.Stdout, "Response from `FirewallApi.FirewallRulesIndex`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiFirewallRulesIndexRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **perPage** | **int32** | | + **orderBy** | **string** | | + **orderType** | **string** | | + **search** | **string** | | + +### Return type + +[**FirewallRulesIndex200Response**](FirewallRulesIndex200Response.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## FirewallRulesShow + +> FirewallRuleResponse FirewallRulesShow(ctx, domain, id).Execute() + +Get firewall rule information + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.FirewallApi.FirewallRulesShow(context.Background(), domain, id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `FirewallApi.FirewallRulesShow``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `FirewallRulesShow`: FirewallRuleResponse + fmt.Fprintf(os.Stdout, "Response from `FirewallApi.FirewallRulesShow`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | +**id** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiFirewallRulesShowRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + +[**FirewallRuleResponse**](FirewallRuleResponse.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## FirewallRulesStore + +> FirewallRuleResponse FirewallRulesStore(ctx, domain).FirewallRule(firewallRule).Execute() + +Create new firewall rule + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + firewallRule := *openapiclient.NewFirewallRule("Name_example", "ip.geoip.country in {"IR" "TH" "US"} and ssl", "Action_example") // FirewallRule | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.FirewallApi.FirewallRulesStore(context.Background(), domain).FirewallRule(firewallRule).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `FirewallApi.FirewallRulesStore``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `FirewallRulesStore`: FirewallRuleResponse + fmt.Fprintf(os.Stdout, "Response from `FirewallApi.FirewallRulesStore`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiFirewallRulesStoreRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **firewallRule** | [**FirewallRule**](FirewallRule.md) | | + +### Return type + +[**FirewallRuleResponse**](FirewallRuleResponse.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## FirewallRulesUpdate + +> FirewallRuleResponse FirewallRulesUpdate(ctx, domain, id).FirewallRule(firewallRule).Execute() + +Update the firewall rule + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | + firewallRule := *openapiclient.NewFirewallRule("Name_example", "ip.geoip.country in {"IR" "TH" "US"} and ssl", "Action_example") // FirewallRule | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.FirewallApi.FirewallRulesUpdate(context.Background(), domain, id).FirewallRule(firewallRule).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `FirewallApi.FirewallRulesUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `FirewallRulesUpdate`: FirewallRuleResponse + fmt.Fprintf(os.Stdout, "Response from `FirewallApi.FirewallRulesUpdate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | +**id** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiFirewallRulesUpdateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **firewallRule** | [**FirewallRule**](FirewallRule.md) | | + +### Return type + +[**FirewallRuleResponse**](FirewallRuleResponse.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## FirewallSettingsIndex + +> FirewallSettingsIndex200Response FirewallSettingsIndex(ctx, domain).Execute() + +Get domain's firewall configuration + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.FirewallApi.FirewallSettingsIndex(context.Background(), domain).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `FirewallApi.FirewallSettingsIndex``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `FirewallSettingsIndex`: FirewallSettingsIndex200Response + fmt.Fprintf(os.Stdout, "Response from `FirewallApi.FirewallSettingsIndex`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiFirewallSettingsIndexRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**FirewallSettingsIndex200Response**](FirewallSettingsIndex200Response.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## FirewallSettingsUpdate + +> MessageResponse FirewallSettingsUpdate(ctx, domain).FirewallSettings(firewallSettings).Execute() + +Update domain's firewall configuration + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + firewallSettings := *openapiclient.NewFirewallSettings() // FirewallSettings | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.FirewallApi.FirewallSettingsUpdate(context.Background(), domain).FirewallSettings(firewallSettings).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `FirewallApi.FirewallSettingsUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `FirewallSettingsUpdate`: MessageResponse + fmt.Fprintf(os.Stdout, "Response from `FirewallApi.FirewallSettingsUpdate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiFirewallSettingsUpdateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **firewallSettings** | [**FirewallSettings**](FirewallSettings.md) | | + +### Return type + +[**MessageResponse**](MessageResponse.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## FirewallUpdate + +> MessageResponse FirewallUpdate(ctx, domain).Firewall(firewall).Execute() + +Update domain's firewall configuration + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + firewall := *openapiclient.NewFirewall() // Firewall | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.FirewallApi.FirewallUpdate(context.Background(), domain).Firewall(firewall).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `FirewallApi.FirewallUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `FirewallUpdate`: MessageResponse + fmt.Fprintf(os.Stdout, "Response from `FirewallApi.FirewallUpdate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiFirewallUpdateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **firewall** | [**Firewall**](Firewall.md) | | + +### Return type + +[**MessageResponse**](MessageResponse.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + diff --git a/docs/FirewallIndex200Response.md b/docs/FirewallIndex200Response.md new file mode 100644 index 0000000..0ed3032 --- /dev/null +++ b/docs/FirewallIndex200Response.md @@ -0,0 +1,92 @@ +# FirewallIndex200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**Firewall**](Firewall.md) | | [optional] +**Message** | Pointer to **NullableString** | | [optional] + +## Methods + +### NewFirewallIndex200Response + +`func NewFirewallIndex200Response() *FirewallIndex200Response` + +NewFirewallIndex200Response instantiates a new FirewallIndex200Response object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewFirewallIndex200ResponseWithDefaults + +`func NewFirewallIndex200ResponseWithDefaults() *FirewallIndex200Response` + +NewFirewallIndex200ResponseWithDefaults instantiates a new FirewallIndex200Response object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *FirewallIndex200Response) GetData() Firewall` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *FirewallIndex200Response) GetDataOk() (*Firewall, 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 *FirewallIndex200Response) SetData(v Firewall)` + +SetData sets Data field to given value. + +### HasData + +`func (o *FirewallIndex200Response) HasData() bool` + +HasData returns a boolean if a field has been set. + +### GetMessage + +`func (o *FirewallIndex200Response) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *FirewallIndex200Response) GetMessageOk() (*string, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessage + +`func (o *FirewallIndex200Response) SetMessage(v string)` + +SetMessage sets Message field to given value. + +### HasMessage + +`func (o *FirewallIndex200Response) HasMessage() bool` + +HasMessage returns a boolean if a field has been set. + +### SetMessageNil + +`func (o *FirewallIndex200Response) SetMessageNil(b bool)` + + SetMessageNil sets the value for Message to be an explicit nil + +### UnsetMessage +`func (o *FirewallIndex200Response) UnsetMessage()` + +UnsetMessage ensures that no value is present for Message, not even an explicit nil + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/FirewallRule.md b/docs/FirewallRule.md new file mode 100644 index 0000000..7521eae --- /dev/null +++ b/docs/FirewallRule.md @@ -0,0 +1,207 @@ +# FirewallRule + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ActionDetails** | Pointer to [**NullableFirewallActionDetails**](FirewallActionDetails.md) | | [optional] +**Id** | Pointer to **string** | | [optional] [readonly] +**Name** | **string** | | +**FilterExpr** | **string** | Wireshark-like filter expression | +**Action** | **string** | | +**IsEnabled** | Pointer to **bool** | | [optional] +**Note** | Pointer to **string** | | [optional] + +## Methods + +### NewFirewallRule + +`func NewFirewallRule(name string, filterExpr string, action string, ) *FirewallRule` + +NewFirewallRule instantiates a new FirewallRule object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewFirewallRuleWithDefaults + +`func NewFirewallRuleWithDefaults() *FirewallRule` + +NewFirewallRuleWithDefaults instantiates a new FirewallRule object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetActionDetails + +`func (o *FirewallRule) GetActionDetails() FirewallActionDetails` + +GetActionDetails returns the ActionDetails field if non-nil, zero value otherwise. + +### GetActionDetailsOk + +`func (o *FirewallRule) GetActionDetailsOk() (*FirewallActionDetails, bool)` + +GetActionDetailsOk returns a tuple with the ActionDetails field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActionDetails + +`func (o *FirewallRule) SetActionDetails(v FirewallActionDetails)` + +SetActionDetails sets ActionDetails field to given value. + +### HasActionDetails + +`func (o *FirewallRule) HasActionDetails() bool` + +HasActionDetails returns a boolean if a field has been set. + +### SetActionDetailsNil + +`func (o *FirewallRule) SetActionDetailsNil(b bool)` + + SetActionDetailsNil sets the value for ActionDetails to be an explicit nil + +### UnsetActionDetails +`func (o *FirewallRule) UnsetActionDetails()` + +UnsetActionDetails ensures that no value is present for ActionDetails, not even an explicit nil +### GetId + +`func (o *FirewallRule) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *FirewallRule) 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 *FirewallRule) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *FirewallRule) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetName + +`func (o *FirewallRule) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *FirewallRule) 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 *FirewallRule) SetName(v string)` + +SetName sets Name field to given value. + + +### GetFilterExpr + +`func (o *FirewallRule) GetFilterExpr() string` + +GetFilterExpr returns the FilterExpr field if non-nil, zero value otherwise. + +### GetFilterExprOk + +`func (o *FirewallRule) GetFilterExprOk() (*string, bool)` + +GetFilterExprOk returns a tuple with the FilterExpr field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFilterExpr + +`func (o *FirewallRule) SetFilterExpr(v string)` + +SetFilterExpr sets FilterExpr field to given value. + + +### GetAction + +`func (o *FirewallRule) GetAction() string` + +GetAction returns the Action field if non-nil, zero value otherwise. + +### GetActionOk + +`func (o *FirewallRule) GetActionOk() (*string, bool)` + +GetActionOk returns a tuple with the Action field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAction + +`func (o *FirewallRule) SetAction(v string)` + +SetAction sets Action field to given value. + + +### GetIsEnabled + +`func (o *FirewallRule) GetIsEnabled() bool` + +GetIsEnabled returns the IsEnabled field if non-nil, zero value otherwise. + +### GetIsEnabledOk + +`func (o *FirewallRule) GetIsEnabledOk() (*bool, bool)` + +GetIsEnabledOk returns a tuple with the IsEnabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsEnabled + +`func (o *FirewallRule) SetIsEnabled(v bool)` + +SetIsEnabled sets IsEnabled field to given value. + +### HasIsEnabled + +`func (o *FirewallRule) HasIsEnabled() bool` + +HasIsEnabled returns a boolean if a field has been set. + +### GetNote + +`func (o *FirewallRule) GetNote() string` + +GetNote returns the Note field if non-nil, zero value otherwise. + +### GetNoteOk + +`func (o *FirewallRule) GetNoteOk() (*string, bool)` + +GetNoteOk returns a tuple with the Note field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNote + +`func (o *FirewallRule) SetNote(v string)` + +SetNote sets Note field to given value. + +### HasNote + +`func (o *FirewallRule) HasNote() bool` + +HasNote returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/FirewallRuleResponse.md b/docs/FirewallRuleResponse.md new file mode 100644 index 0000000..e491267 --- /dev/null +++ b/docs/FirewallRuleResponse.md @@ -0,0 +1,92 @@ +# FirewallRuleResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**FirewallRuleView**](FirewallRuleView.md) | | [optional] +**Message** | Pointer to **NullableString** | | [optional] + +## Methods + +### NewFirewallRuleResponse + +`func NewFirewallRuleResponse() *FirewallRuleResponse` + +NewFirewallRuleResponse instantiates a new FirewallRuleResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewFirewallRuleResponseWithDefaults + +`func NewFirewallRuleResponseWithDefaults() *FirewallRuleResponse` + +NewFirewallRuleResponseWithDefaults instantiates a new FirewallRuleResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *FirewallRuleResponse) GetData() FirewallRuleView` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *FirewallRuleResponse) GetDataOk() (*FirewallRuleView, 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 *FirewallRuleResponse) SetData(v FirewallRuleView)` + +SetData sets Data field to given value. + +### HasData + +`func (o *FirewallRuleResponse) HasData() bool` + +HasData returns a boolean if a field has been set. + +### GetMessage + +`func (o *FirewallRuleResponse) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *FirewallRuleResponse) GetMessageOk() (*string, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessage + +`func (o *FirewallRuleResponse) SetMessage(v string)` + +SetMessage sets Message field to given value. + +### HasMessage + +`func (o *FirewallRuleResponse) HasMessage() bool` + +HasMessage returns a boolean if a field has been set. + +### SetMessageNil + +`func (o *FirewallRuleResponse) SetMessageNil(b bool)` + + SetMessageNil sets the value for Message to be an explicit nil + +### UnsetMessage +`func (o *FirewallRuleResponse) UnsetMessage()` + +UnsetMessage ensures that no value is present for Message, not even an explicit nil + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/FirewallRuleView.md b/docs/FirewallRuleView.md new file mode 100644 index 0000000..f486d32 --- /dev/null +++ b/docs/FirewallRuleView.md @@ -0,0 +1,212 @@ +# FirewallRuleView + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ActionDetails** | Pointer to **map[string]interface{}** | | [optional] +**Id** | Pointer to **string** | | [optional] [readonly] +**Name** | Pointer to **string** | | [optional] +**FilterExpr** | Pointer to **string** | Wireshark-like filter expression | [optional] +**Action** | Pointer to **string** | | [optional] +**IsEnabled** | Pointer to **bool** | | [optional] +**Note** | Pointer to **string** | | [optional] + +## Methods + +### NewFirewallRuleView + +`func NewFirewallRuleView() *FirewallRuleView` + +NewFirewallRuleView instantiates a new FirewallRuleView object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewFirewallRuleViewWithDefaults + +`func NewFirewallRuleViewWithDefaults() *FirewallRuleView` + +NewFirewallRuleViewWithDefaults instantiates a new FirewallRuleView object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetActionDetails + +`func (o *FirewallRuleView) GetActionDetails() map[string]interface{}` + +GetActionDetails returns the ActionDetails field if non-nil, zero value otherwise. + +### GetActionDetailsOk + +`func (o *FirewallRuleView) GetActionDetailsOk() (*map[string]interface{}, bool)` + +GetActionDetailsOk returns a tuple with the ActionDetails field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActionDetails + +`func (o *FirewallRuleView) SetActionDetails(v map[string]interface{})` + +SetActionDetails sets ActionDetails field to given value. + +### HasActionDetails + +`func (o *FirewallRuleView) HasActionDetails() bool` + +HasActionDetails returns a boolean if a field has been set. + +### GetId + +`func (o *FirewallRuleView) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *FirewallRuleView) 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 *FirewallRuleView) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *FirewallRuleView) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetName + +`func (o *FirewallRuleView) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *FirewallRuleView) 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 *FirewallRuleView) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *FirewallRuleView) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetFilterExpr + +`func (o *FirewallRuleView) GetFilterExpr() string` + +GetFilterExpr returns the FilterExpr field if non-nil, zero value otherwise. + +### GetFilterExprOk + +`func (o *FirewallRuleView) GetFilterExprOk() (*string, bool)` + +GetFilterExprOk returns a tuple with the FilterExpr field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFilterExpr + +`func (o *FirewallRuleView) SetFilterExpr(v string)` + +SetFilterExpr sets FilterExpr field to given value. + +### HasFilterExpr + +`func (o *FirewallRuleView) HasFilterExpr() bool` + +HasFilterExpr returns a boolean if a field has been set. + +### GetAction + +`func (o *FirewallRuleView) GetAction() string` + +GetAction returns the Action field if non-nil, zero value otherwise. + +### GetActionOk + +`func (o *FirewallRuleView) GetActionOk() (*string, bool)` + +GetActionOk returns a tuple with the Action field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAction + +`func (o *FirewallRuleView) SetAction(v string)` + +SetAction sets Action field to given value. + +### HasAction + +`func (o *FirewallRuleView) HasAction() bool` + +HasAction returns a boolean if a field has been set. + +### GetIsEnabled + +`func (o *FirewallRuleView) GetIsEnabled() bool` + +GetIsEnabled returns the IsEnabled field if non-nil, zero value otherwise. + +### GetIsEnabledOk + +`func (o *FirewallRuleView) GetIsEnabledOk() (*bool, bool)` + +GetIsEnabledOk returns a tuple with the IsEnabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsEnabled + +`func (o *FirewallRuleView) SetIsEnabled(v bool)` + +SetIsEnabled sets IsEnabled field to given value. + +### HasIsEnabled + +`func (o *FirewallRuleView) HasIsEnabled() bool` + +HasIsEnabled returns a boolean if a field has been set. + +### GetNote + +`func (o *FirewallRuleView) GetNote() string` + +GetNote returns the Note field if non-nil, zero value otherwise. + +### GetNoteOk + +`func (o *FirewallRuleView) GetNoteOk() (*string, bool)` + +GetNoteOk returns a tuple with the Note field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNote + +`func (o *FirewallRuleView) SetNote(v string)` + +SetNote sets Note field to given value. + +### HasNote + +`func (o *FirewallRuleView) HasNote() bool` + +HasNote returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/FirewallRulesIndex200Response.md b/docs/FirewallRulesIndex200Response.md new file mode 100644 index 0000000..45c8468 --- /dev/null +++ b/docs/FirewallRulesIndex200Response.md @@ -0,0 +1,108 @@ +# FirewallRulesIndex200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**[]FirewallRuleView**](FirewallRuleView.md) | | [optional] +**Links** | Pointer to [**PaginatedResponseLinks**](PaginatedResponseLinks.md) | | [optional] +**Meta** | Pointer to [**PaginatedResponseMeta**](PaginatedResponseMeta.md) | | [optional] + +## Methods + +### NewFirewallRulesIndex200Response + +`func NewFirewallRulesIndex200Response() *FirewallRulesIndex200Response` + +NewFirewallRulesIndex200Response instantiates a new FirewallRulesIndex200Response object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewFirewallRulesIndex200ResponseWithDefaults + +`func NewFirewallRulesIndex200ResponseWithDefaults() *FirewallRulesIndex200Response` + +NewFirewallRulesIndex200ResponseWithDefaults instantiates a new FirewallRulesIndex200Response object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *FirewallRulesIndex200Response) GetData() []FirewallRuleView` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *FirewallRulesIndex200Response) GetDataOk() (*[]FirewallRuleView, 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 *FirewallRulesIndex200Response) SetData(v []FirewallRuleView)` + +SetData sets Data field to given value. + +### HasData + +`func (o *FirewallRulesIndex200Response) HasData() bool` + +HasData returns a boolean if a field has been set. + +### GetLinks + +`func (o *FirewallRulesIndex200Response) GetLinks() PaginatedResponseLinks` + +GetLinks returns the Links field if non-nil, zero value otherwise. + +### GetLinksOk + +`func (o *FirewallRulesIndex200Response) GetLinksOk() (*PaginatedResponseLinks, bool)` + +GetLinksOk returns a tuple with the Links field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLinks + +`func (o *FirewallRulesIndex200Response) SetLinks(v PaginatedResponseLinks)` + +SetLinks sets Links field to given value. + +### HasLinks + +`func (o *FirewallRulesIndex200Response) HasLinks() bool` + +HasLinks returns a boolean if a field has been set. + +### GetMeta + +`func (o *FirewallRulesIndex200Response) GetMeta() PaginatedResponseMeta` + +GetMeta returns the Meta field if non-nil, zero value otherwise. + +### GetMetaOk + +`func (o *FirewallRulesIndex200Response) GetMetaOk() (*PaginatedResponseMeta, bool)` + +GetMetaOk returns a tuple with the Meta field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMeta + +`func (o *FirewallRulesIndex200Response) SetMeta(v PaginatedResponseMeta)` + +SetMeta sets Meta field to given value. + +### HasMeta + +`func (o *FirewallRulesIndex200Response) HasMeta() bool` + +HasMeta returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/FirewallSettings.md b/docs/FirewallSettings.md new file mode 100644 index 0000000..fb423ec --- /dev/null +++ b/docs/FirewallSettings.md @@ -0,0 +1,144 @@ +# FirewallSettings + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DefaultActionDetails** | Pointer to [**NullableFirewallActionDetails**](FirewallActionDetails.md) | | [optional] +**IsEnabled** | Pointer to **bool** | | [optional] [readonly] +**DefaultAction** | Pointer to **string** | | [optional] +**VerifySni** | Pointer to **bool** | True to verify that SNI and hostname are equal | [optional] [default to false] + +## Methods + +### NewFirewallSettings + +`func NewFirewallSettings() *FirewallSettings` + +NewFirewallSettings instantiates a new FirewallSettings object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewFirewallSettingsWithDefaults + +`func NewFirewallSettingsWithDefaults() *FirewallSettings` + +NewFirewallSettingsWithDefaults instantiates a new FirewallSettings object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetDefaultActionDetails + +`func (o *FirewallSettings) GetDefaultActionDetails() FirewallActionDetails` + +GetDefaultActionDetails returns the DefaultActionDetails field if non-nil, zero value otherwise. + +### GetDefaultActionDetailsOk + +`func (o *FirewallSettings) GetDefaultActionDetailsOk() (*FirewallActionDetails, bool)` + +GetDefaultActionDetailsOk returns a tuple with the DefaultActionDetails field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDefaultActionDetails + +`func (o *FirewallSettings) SetDefaultActionDetails(v FirewallActionDetails)` + +SetDefaultActionDetails sets DefaultActionDetails field to given value. + +### HasDefaultActionDetails + +`func (o *FirewallSettings) HasDefaultActionDetails() bool` + +HasDefaultActionDetails returns a boolean if a field has been set. + +### SetDefaultActionDetailsNil + +`func (o *FirewallSettings) SetDefaultActionDetailsNil(b bool)` + + SetDefaultActionDetailsNil sets the value for DefaultActionDetails to be an explicit nil + +### UnsetDefaultActionDetails +`func (o *FirewallSettings) UnsetDefaultActionDetails()` + +UnsetDefaultActionDetails ensures that no value is present for DefaultActionDetails, not even an explicit nil +### GetIsEnabled + +`func (o *FirewallSettings) GetIsEnabled() bool` + +GetIsEnabled returns the IsEnabled field if non-nil, zero value otherwise. + +### GetIsEnabledOk + +`func (o *FirewallSettings) GetIsEnabledOk() (*bool, bool)` + +GetIsEnabledOk returns a tuple with the IsEnabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsEnabled + +`func (o *FirewallSettings) SetIsEnabled(v bool)` + +SetIsEnabled sets IsEnabled field to given value. + +### HasIsEnabled + +`func (o *FirewallSettings) HasIsEnabled() bool` + +HasIsEnabled returns a boolean if a field has been set. + +### GetDefaultAction + +`func (o *FirewallSettings) GetDefaultAction() string` + +GetDefaultAction returns the DefaultAction field if non-nil, zero value otherwise. + +### GetDefaultActionOk + +`func (o *FirewallSettings) GetDefaultActionOk() (*string, bool)` + +GetDefaultActionOk returns a tuple with the DefaultAction field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDefaultAction + +`func (o *FirewallSettings) SetDefaultAction(v string)` + +SetDefaultAction sets DefaultAction field to given value. + +### HasDefaultAction + +`func (o *FirewallSettings) HasDefaultAction() bool` + +HasDefaultAction returns a boolean if a field has been set. + +### GetVerifySni + +`func (o *FirewallSettings) GetVerifySni() bool` + +GetVerifySni returns the VerifySni field if non-nil, zero value otherwise. + +### GetVerifySniOk + +`func (o *FirewallSettings) GetVerifySniOk() (*bool, bool)` + +GetVerifySniOk returns a tuple with the VerifySni field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVerifySni + +`func (o *FirewallSettings) SetVerifySni(v bool)` + +SetVerifySni sets VerifySni field to given value. + +### HasVerifySni + +`func (o *FirewallSettings) HasVerifySni() bool` + +HasVerifySni returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/FirewallSettingsIndex200Response.md b/docs/FirewallSettingsIndex200Response.md new file mode 100644 index 0000000..0172ade --- /dev/null +++ b/docs/FirewallSettingsIndex200Response.md @@ -0,0 +1,92 @@ +# FirewallSettingsIndex200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**FirewallSettingsView**](FirewallSettingsView.md) | | [optional] +**Message** | Pointer to **NullableString** | | [optional] + +## Methods + +### NewFirewallSettingsIndex200Response + +`func NewFirewallSettingsIndex200Response() *FirewallSettingsIndex200Response` + +NewFirewallSettingsIndex200Response instantiates a new FirewallSettingsIndex200Response object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewFirewallSettingsIndex200ResponseWithDefaults + +`func NewFirewallSettingsIndex200ResponseWithDefaults() *FirewallSettingsIndex200Response` + +NewFirewallSettingsIndex200ResponseWithDefaults instantiates a new FirewallSettingsIndex200Response object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *FirewallSettingsIndex200Response) GetData() FirewallSettingsView` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *FirewallSettingsIndex200Response) GetDataOk() (*FirewallSettingsView, 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 *FirewallSettingsIndex200Response) SetData(v FirewallSettingsView)` + +SetData sets Data field to given value. + +### HasData + +`func (o *FirewallSettingsIndex200Response) HasData() bool` + +HasData returns a boolean if a field has been set. + +### GetMessage + +`func (o *FirewallSettingsIndex200Response) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *FirewallSettingsIndex200Response) GetMessageOk() (*string, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessage + +`func (o *FirewallSettingsIndex200Response) SetMessage(v string)` + +SetMessage sets Message field to given value. + +### HasMessage + +`func (o *FirewallSettingsIndex200Response) HasMessage() bool` + +HasMessage returns a boolean if a field has been set. + +### SetMessageNil + +`func (o *FirewallSettingsIndex200Response) SetMessageNil(b bool)` + + SetMessageNil sets the value for Message to be an explicit nil + +### UnsetMessage +`func (o *FirewallSettingsIndex200Response) UnsetMessage()` + +UnsetMessage ensures that no value is present for Message, not even an explicit nil + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/FirewallSettingsView.md b/docs/FirewallSettingsView.md new file mode 100644 index 0000000..fb31f13 --- /dev/null +++ b/docs/FirewallSettingsView.md @@ -0,0 +1,144 @@ +# FirewallSettingsView + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DefaultActionDetails** | Pointer to **map[string]interface{}** | | [optional] +**IsEnabled** | Pointer to **bool** | | [optional] [readonly] +**DefaultAction** | Pointer to **string** | | [optional] +**VerifySni** | Pointer to **bool** | True to verify that SNI and hostname are equal | [optional] [default to false] + +## Methods + +### NewFirewallSettingsView + +`func NewFirewallSettingsView() *FirewallSettingsView` + +NewFirewallSettingsView instantiates a new FirewallSettingsView object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewFirewallSettingsViewWithDefaults + +`func NewFirewallSettingsViewWithDefaults() *FirewallSettingsView` + +NewFirewallSettingsViewWithDefaults instantiates a new FirewallSettingsView object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetDefaultActionDetails + +`func (o *FirewallSettingsView) GetDefaultActionDetails() map[string]interface{}` + +GetDefaultActionDetails returns the DefaultActionDetails field if non-nil, zero value otherwise. + +### GetDefaultActionDetailsOk + +`func (o *FirewallSettingsView) GetDefaultActionDetailsOk() (*map[string]interface{}, bool)` + +GetDefaultActionDetailsOk returns a tuple with the DefaultActionDetails field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDefaultActionDetails + +`func (o *FirewallSettingsView) SetDefaultActionDetails(v map[string]interface{})` + +SetDefaultActionDetails sets DefaultActionDetails field to given value. + +### HasDefaultActionDetails + +`func (o *FirewallSettingsView) HasDefaultActionDetails() bool` + +HasDefaultActionDetails returns a boolean if a field has been set. + +### SetDefaultActionDetailsNil + +`func (o *FirewallSettingsView) SetDefaultActionDetailsNil(b bool)` + + SetDefaultActionDetailsNil sets the value for DefaultActionDetails to be an explicit nil + +### UnsetDefaultActionDetails +`func (o *FirewallSettingsView) UnsetDefaultActionDetails()` + +UnsetDefaultActionDetails ensures that no value is present for DefaultActionDetails, not even an explicit nil +### GetIsEnabled + +`func (o *FirewallSettingsView) GetIsEnabled() bool` + +GetIsEnabled returns the IsEnabled field if non-nil, zero value otherwise. + +### GetIsEnabledOk + +`func (o *FirewallSettingsView) GetIsEnabledOk() (*bool, bool)` + +GetIsEnabledOk returns a tuple with the IsEnabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsEnabled + +`func (o *FirewallSettingsView) SetIsEnabled(v bool)` + +SetIsEnabled sets IsEnabled field to given value. + +### HasIsEnabled + +`func (o *FirewallSettingsView) HasIsEnabled() bool` + +HasIsEnabled returns a boolean if a field has been set. + +### GetDefaultAction + +`func (o *FirewallSettingsView) GetDefaultAction() string` + +GetDefaultAction returns the DefaultAction field if non-nil, zero value otherwise. + +### GetDefaultActionOk + +`func (o *FirewallSettingsView) GetDefaultActionOk() (*string, bool)` + +GetDefaultActionOk returns a tuple with the DefaultAction field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDefaultAction + +`func (o *FirewallSettingsView) SetDefaultAction(v string)` + +SetDefaultAction sets DefaultAction field to given value. + +### HasDefaultAction + +`func (o *FirewallSettingsView) HasDefaultAction() bool` + +HasDefaultAction returns a boolean if a field has been set. + +### GetVerifySni + +`func (o *FirewallSettingsView) GetVerifySni() bool` + +GetVerifySni returns the VerifySni field if non-nil, zero value otherwise. + +### GetVerifySniOk + +`func (o *FirewallSettingsView) GetVerifySniOk() (*bool, bool)` + +GetVerifySniOk returns a tuple with the VerifySni field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVerifySni + +`func (o *FirewallSettingsView) SetVerifySni(v bool)` + +SetVerifySni sets VerifySni field to given value. + +### HasVerifySni + +`func (o *FirewallSettingsView) HasVerifySni() bool` + +HasVerifySni returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/HOW-TO.md b/docs/HOW-TO.md new file mode 100644 index 0000000..6d4373c --- /dev/null +++ b/docs/HOW-TO.md @@ -0,0 +1,728 @@ +# Go API client for r1cdn + +Use this documentation to learn how to use the ArvanCloud SDK. + +**API version**: 4.99.2 + +## Dependencies + +Install the following packages: + +```shell +go get github.com/stretchr/testify/assert +go get golang.org/x/net/context +``` + +## Usage + +Get the package: + +```bash +go get github.com/arvancloud/cdn-go +``` + +Put the package under your project folder and add the following in import: + +```golang +import r1cdn "github.com/arvancloud/cdn-go" +``` + +## 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 `sw.ContextServerIndex` of type `int`. + +```golang +ctx := context.WithValue(context.Background(), r1cdn.ContextServerIndex, 1) +``` + +### Templated Server URL + +Templated server URL is formatted using default variables from configuration or from context value `sw.ContextServerVariables` of type `map[string]string`. + +```golang +ctx := context.WithValue(context.Background(), r1cdn.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 `sw.ContextOperationServerIndices` and `sw.ContextOperationServerVariables` context maps. + +```golang +ctx := context.WithValue(context.Background(), r1cdn.ContextOperationServerIndices, map[string]int{ + "{classname}Service.{nickname}": 2, +}) +ctx = context.WithValue(context.Background(), r1cdn.ContextOperationServerVariables, map[string]map[string]string{ + "{classname}Service.{nickname}": { + "port": "8443", + }, +}) +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://napi.arvancloud.ir/cdn/4.0* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*AccelerationApi* | [**AccelerationIndex**](AccelerationApi.md#accelerationindex) | **Get** /domains/{domain}/acceleration | Get the content of acceleration settings +*AccelerationApi* | [**AccelerationUpdate**](AccelerationApi.md#accelerationupdate) | **Patch** /domains/{domain}/acceleration | Update the content of acceleration settings +*AccelerationApi* | [**ImageResizeGet**](AccelerationApi.md#imageresizeget) | **Get** /domains/{domain}/image-resize | Get the content of image resize settings +*AccelerationApi* | [**ImageResizeUpdate**](AccelerationApi.md#imageresizeupdate) | **Patch** /domains/{domain}/image-resize | Update the content of image resize settings +*ActiveHealthCheckApi* | [**ActiveHealthCheckDestroy**](ActiveHealthCheckApi.md#activehealthcheckdestroy) | **Delete** /domains/{domain}/health-checks/{healthcheck} | Delete healthcheck +*ActiveHealthCheckApi* | [**ActiveHealthCheckIndex**](ActiveHealthCheckApi.md#activehealthcheckindex) | **Get** /domains/{domain}/health-checks | Get Defined HealthCheck +*ActiveHealthCheckApi* | [**ActiveHealthCheckReportsDetails**](ActiveHealthCheckApi.md#activehealthcheckreportsdetails) | **Get** /domains/{domain}/health-checks/reports/details | Get reports of a single healthcheck monitoring +*ActiveHealthCheckApi* | [**ActiveHealthCheckReportsSummary**](ActiveHealthCheckApi.md#activehealthcheckreportssummary) | **Get** /domains/{domain}/health-checks/reports/summary | Get summary reports of a single healthcheck monitoring +*ActiveHealthCheckApi* | [**ActiveHealthCheckShow**](ActiveHealthCheckApi.md#activehealthcheckshow) | **Get** /domains/{domain}/health-checks/{healthcheck} | Get a single healthcheck +*ActiveHealthCheckApi* | [**ActiveHealthCheckStore**](ActiveHealthCheckApi.md#activehealthcheckstore) | **Post** /domains/{domain}/health-checks | Store a new HealthCheck +*ActiveHealthCheckApi* | [**ActiveHealthCheckUpdate**](ActiveHealthCheckApi.md#activehealthcheckupdate) | **Patch** /domains/{domain}/health-checks/{healthcheck} | Update Health check +*ActiveHealthCheckApi* | [**HealthChecksZonesIndex**](ActiveHealthCheckApi.md#healthcheckszonesindex) | **Get** /health-checks/zones | Get list of all health-check zones +*CDNAppsApi* | [**AppsCategoryIndex**](CDNAppsApi.md#appscategoryindex) | **Get** /apps/category | Get the list of application categories +*CDNAppsApi* | [**AppsCategoryShow**](CDNAppsApi.md#appscategoryshow) | **Get** /apps/category/{application-category} | Get an existing application category +*CDNAppsApi* | [**AppsIndex**](CDNAppsApi.md#appsindex) | **Get** /apps | Get list of all available cdn-apps +*CDNAppsApi* | [**AppsLike**](CDNAppsApi.md#appslike) | **Post** /apps/{id} | Expressing like and dislike about a single cdn-app +*CDNAppsApi* | [**AppsShow**](CDNAppsApi.md#appsshow) | **Get** /apps/{id} | Get a single cdn-app +*CDNAppsApi* | [**DomainsAppsDestroy**](CDNAppsApi.md#domainsappsdestroy) | **Delete** /domains/{domain}/apps/{id} | Uninstall the application from domain +*CDNAppsApi* | [**DomainsAppsIndex**](CDNAppsApi.md#domainsappsindex) | **Get** /domains/{domain}/apps | Get list of all applications installed on a domain +*CDNAppsApi* | [**DomainsAppsInstalled**](CDNAppsApi.md#domainsappsinstalled) | **Get** /domains/{domain}/apps/{id} | Check the application is installed on the domain +*CDNAppsApi* | [**DomainsAppsStore**](CDNAppsApi.md#domainsappsstore) | **Post** /domains/{domain}/apps/{id} | Install the application on the domain +*CDNAppsApi* | [**DomainsAppsTriggerWebhook**](CDNAppsApi.md#domainsappstriggerwebhook) | **Post** /domains/{domain}/apps/{id}/actions/trigger_webhook | trigger webhook event +*CachingApi* | [**CachingDeprecatedPurge**](CachingApi.md#cachingdeprecatedpurge) | **Delete** /domains/{domain}/caching | Purge CDN Cache +*CachingApi* | [**CachingIndex**](CachingApi.md#cachingindex) | **Get** /domains/{domain}/caching | Get caching settings +*CachingApi* | [**CachingPurge**](CachingApi.md#cachingpurge) | **Post** /domains/{domain}/caching/purge | Purge CDN Cache +*CachingApi* | [**CachingUpdate**](CachingApi.md#cachingupdate) | **Patch** /domains/{domain}/caching | Update caching settings +*CachingApi* | [**PurgeTagsDestroy**](CachingApi.md#purgetagsdestroy) | **Delete** /domains/{domain}/purge-tags | Delete a Domain's Purge tag +*CachingApi* | [**PurgeTagsIndex**](CachingApi.md#purgetagsindex) | **Get** /domains/{domain}/purge-tags | Get domain's Purge tags +*CustomPagesApi* | [**CustomPagesGet**](CustomPagesApi.md#custompagesget) | **Get** /domains/{domain}/custom-pages | Get list of custom pages +*CustomPagesApi* | [**CustomPagesUpdate**](CustomPagesApi.md#custompagesupdate) | **Post** /domains/{domain}/custom-pages | Update custom page +*DDoSApi* | [**DdosIndex**](DDoSApi.md#ddosindex) | **Get** /domains/{domain}/ddos | Get DDoS protection settings +*DDoSApi* | [**DdosReprioritize**](DDoSApi.md#ddosreprioritize) | **Post** /domains/{domain}/ddos/actions/reprioritize | Change priority of ddos rules +*DDoSApi* | [**DdosRulesDestroy**](DDoSApi.md#ddosrulesdestroy) | **Delete** /domains/{domain}/ddos/rules/{id} | Delete DDoS protection rule +*DDoSApi* | [**DdosRulesIndex**](DDoSApi.md#ddosrulesindex) | **Get** /domains/{domain}/ddos/rules | Get DDoS Protection Rules +*DDoSApi* | [**DdosRulesShow**](DDoSApi.md#ddosrulesshow) | **Get** /domains/{domain}/ddos/rules/{id} | Get DDoS protection's rule information +*DDoSApi* | [**DdosRulesStore**](DDoSApi.md#ddosrulesstore) | **Post** /domains/{domain}/ddos/rules | Create new DDoS protection rule +*DDoSApi* | [**DdosRulesUpdate**](DDoSApi.md#ddosrulesupdate) | **Patch** /domains/{domain}/ddos/rules/{id} | Update the DDoS protection rule +*DDoSApi* | [**DdosSettingsIndex**](DDoSApi.md#ddossettingsindex) | **Get** /domains/{domain}/ddos/settings | Get DDoS protection settings +*DDoSApi* | [**DdosSettingsUpdate**](DDoSApi.md#ddossettingsupdate) | **Patch** /domains/{domain}/ddos/settings | Update domain's DDoS protection configuration +*DDoSApi* | [**DdosUpdate**](DDoSApi.md#ddosupdate) | **Patch** /domains/{domain}/ddos | Update domain's DDoS protection configuration +*DNSManagementApi* | [**DnsRecordsCloud**](DNSManagementApi.md#dnsrecordscloud) | **Put** /domains/{domain}/dns-records/{id}/cloud | Toggle cloud status (To proxy or not proxy, that's the question!) +*DNSManagementApi* | [**DnsRecordsDestroy**](DNSManagementApi.md#dnsrecordsdestroy) | **Delete** /domains/{domain}/dns-records/{id} | Remove a DNS record +*DNSManagementApi* | [**DnsRecordsDnsSecShow**](DNSManagementApi.md#dnsrecordsdnssecshow) | **Get** /domains/{domain}/dns-records/dnssec | Get status of DNSSEC +*DNSManagementApi* | [**DnsRecordsDnsSecUpdate**](DNSManagementApi.md#dnsrecordsdnssecupdate) | **Put** /domains/{domain}/dns-records/dnssec/actions | Update DNSSEC status +*DNSManagementApi* | [**DnsRecordsImport**](DNSManagementApi.md#dnsrecordsimport) | **Post** /domains/{domain}/dns-records/import | Import DNS records using BIND file +*DNSManagementApi* | [**DnsRecordsIndex**](DNSManagementApi.md#dnsrecordsindex) | **Get** /domains/{domain}/dns-records | Get list of DNS records +*DNSManagementApi* | [**DnsRecordsShow**](DNSManagementApi.md#dnsrecordsshow) | **Get** /domains/{domain}/dns-records/{id} | Get information of a record +*DNSManagementApi* | [**DnsRecordsStore**](DNSManagementApi.md#dnsrecordsstore) | **Post** /domains/{domain}/dns-records | Create new DNS record +*DNSManagementApi* | [**DnsRecordsUpdate**](DNSManagementApi.md#dnsrecordsupdate) | **Put** /domains/{domain}/dns-records/{id} | Update a DNS record +*DomainApi* | [**DomainsClone**](DomainApi.md#domainsclone) | **Post** /domains/{domain}/clone | Clone a domain config from another one +*DomainApi* | [**DomainsCnameSetupCheck**](DomainApi.md#domainscnamesetupcheck) | **Get** /domains/{domain}/cname-setup/check | Check Cname Setup to find whether domain is activated +*DomainApi* | [**DomainsCnameSetupConvert**](DomainApi.md#domainscnamesetupconvert) | **Post** /domains/{domain}/cname-setup/convert | Convert domain setup to cname +*DomainApi* | [**DomainsCnameSetupReset**](DomainApi.md#domainscnamesetupreset) | **Delete** /domains/{domain}/cname-setup/custom | Reset the custom record of CNAME Setup to the default value +*DomainApi* | [**DomainsCnameSetupSet**](DomainApi.md#domainscnamesetupset) | **Put** /domains/{domain}/cname-setup/custom | Set a custom record for using CNAME Setup +*DomainApi* | [**DomainsDestroy**](DomainApi.md#domainsdestroy) | **Delete** /domains/{domain} | Remove the domain +*DomainApi* | [**DomainsIndex**](DomainApi.md#domainsindex) | **Get** /domains | Get the list of domains +*DomainApi* | [**DomainsNameserversCheck**](DomainApi.md#domainsnameserverscheck) | **Get** /domains/{domain}/ns-keys/check | Check NS to find whether domain is activated +*DomainApi* | [**DomainsNameserversDeprecatedCheck**](DomainApi.md#domainsnameserversdeprecatedcheck) | **Put** /domains/{domain}/dns-service/check-ns | Deprecated in favor /ns-keys/check +*DomainApi* | [**DomainsNameserversOptional**](DomainApi.md#domainsnameserversoptional) | **Post** /domains/{domain}/ns-keys/use-optional-keys | Use optional NS keys +*DomainApi* | [**DomainsNameserversReset**](DomainApi.md#domainsnameserversreset) | **Delete** /domains/{domain}/ns-keys | Reset custom Nameserver keys to the default values for the domain +*DomainApi* | [**DomainsNameserversSet**](DomainApi.md#domainsnameserversset) | **Put** /domains/{domain}/ns-keys | Set custom NS records for the domain +*DomainApi* | [**DomainsRegenerate**](DomainApi.md#domainsregenerate) | **Post** /domains/{domain}/regenerate | Regenerate domain settings for edge servers +*DomainApi* | [**DomainsShow**](DomainApi.md#domainsshow) | **Get** /domains/{domain} | Get information of the domain +*DomainApi* | [**DomainsStore**](DomainApi.md#domainsstore) | **Post** /domains/dns-service | Create new domain +*DomainTransferApi* | [**DomainsTransferIndex**](DomainTransferApi.md#domainstransferindex) | **Get** /domains/transfer | Get the list of pending transfers +*DomainTransferApi* | [**DomainsTransferStore**](DomainTransferApi.md#domainstransferstore) | **Post** /domains/{domain}/transfer | Transfer domain to another account +*DomainTransferApi* | [**DomainsTransferUpdate**](DomainTransferApi.md#domainstransferupdate) | **Post** /domains/transfer/change-status | Accept or cancel transferring a domain +*EmailForwardingApi* | [**EmailForwardingsActivate**](EmailForwardingApi.md#emailforwardingsactivate) | **Post** /domains/{domain}/email-forwardings/activate | Activate email forwarding +*EmailForwardingApi* | [**EmailForwardingsAliasesDestroy**](EmailForwardingApi.md#emailforwardingsaliasesdestroy) | **Delete** /domains/{domain}/email-forwardings/{emailForwardingId}/aliases/{emailForwardingAliasId} | Delete an alias +*EmailForwardingApi* | [**EmailForwardingsAliasesIndex**](EmailForwardingApi.md#emailforwardingsaliasesindex) | **Get** /domains/{domain}/email-forwardings/{emailForwardingId}/aliases | List of email forwarding aliases for given domain +*EmailForwardingApi* | [**EmailForwardingsAliasesStore**](EmailForwardingApi.md#emailforwardingsaliasesstore) | **Post** /domains/{domain}/email-forwardings/{emailForwardingId}/aliases | Create new alias +*EmailForwardingApi* | [**EmailForwardingsAliasesToggleActivation**](EmailForwardingApi.md#emailforwardingsaliasestoggleactivation) | **Patch** /domains/{domain}/email-forwardings/{emailForwardingId}/aliases/{emailForwardingAliasId}/toggle-activation | Toggle alias activation +*EmailForwardingApi* | [**EmailForwardingsAliasesUpdateRecipients**](EmailForwardingApi.md#emailforwardingsaliasesupdaterecipients) | **Patch** /domains/{domain}/email-forwardings/{emailForwardingId}/aliases/{emailForwardingAliasId}/recipients | Update alias recipients +*EmailForwardingApi* | [**EmailForwardingsCatchAllActivate**](EmailForwardingApi.md#emailforwardingscatchallactivate) | **Post** /domains/{domain}/email-forwardings/catch-all/activate | Activate email forwarding catch all +*EmailForwardingApi* | [**EmailForwardingsCatchAllDeactivate**](EmailForwardingApi.md#emailforwardingscatchalldeactivate) | **Post** /domains/{domain}/email-forwardings/catch-all/deactivate | Deactivate email forwarding catch all +*EmailForwardingApi* | [**EmailForwardingsDeactivate**](EmailForwardingApi.md#emailforwardingsdeactivate) | **Post** /domains/{domain}/email-forwardings/deactivate | Deactivate email forwarding +*EmailForwardingApi* | [**EmailForwardingsRecipientsDestroy**](EmailForwardingApi.md#emailforwardingsrecipientsdestroy) | **Delete** /domains/{domain}/email-forwardings/{emailForwardingId}/recipients/{emailForwardingRecipientId} | Delete a recipient +*EmailForwardingApi* | [**EmailForwardingsRecipientsIndex**](EmailForwardingApi.md#emailforwardingsrecipientsindex) | **Get** /domains/{domain}/email-forwardings/{emailForwardingId}/recipients | List recipients of an email forwarding +*EmailForwardingApi* | [**EmailForwardingsRecipientsResendVerification**](EmailForwardingApi.md#emailforwardingsrecipientsresendverification) | **Post** /domains/{domain}/email-forwardings/{emailForwardingId}/recipients/{emailForwardingRecipientId}/resend-verification | Resend Verification +*EmailForwardingApi* | [**EmailForwardingsRecipientsSetDefault**](EmailForwardingApi.md#emailforwardingsrecipientssetdefault) | **Patch** /domains/{domain}/email-forwardings/{emailForwardingId}/recipients/{emailForwardingRecipientId}/set-default | Set default recipient +*EmailForwardingApi* | [**EmailForwardingsRecipientsStore**](EmailForwardingApi.md#emailforwardingsrecipientsstore) | **Post** /domains/{domain}/email-forwardings/{emailForwardingId}/recipients | Create new recipient +*EmailForwardingApi* | [**EmailForwardingsRecipientsVerify**](EmailForwardingApi.md#emailforwardingsrecipientsverify) | **Post** /domains/{domain}/email-forwardings/{emailForwardingId}/recipients/{emailForwardingRecipientId}/verify | Verify recipient +*EmailForwardingApi* | [**EmailForwardingsStats**](EmailForwardingApi.md#emailforwardingsstats) | **Get** /domains/{domain}/email-forwardings/stats | Show stats of domain's email forwarding +*FirewallApi* | [**FirewallIndex**](FirewallApi.md#firewallindex) | **Get** /domains/{domain}/firewall | Get domain's firewall configuration +*FirewallApi* | [**FirewallReprioritize**](FirewallApi.md#firewallreprioritize) | **Post** /domains/{domain}/firewall/actions/reprioritize | Change priority of firewall rules +*FirewallApi* | [**FirewallRulesDestroy**](FirewallApi.md#firewallrulesdestroy) | **Delete** /domains/{domain}/firewall/rules/{id} | Delete firewall rule +*FirewallApi* | [**FirewallRulesIndex**](FirewallApi.md#firewallrulesindex) | **Get** /domains/{domain}/firewall/rules | Get domain's firewall rules +*FirewallApi* | [**FirewallRulesShow**](FirewallApi.md#firewallrulesshow) | **Get** /domains/{domain}/firewall/rules/{id} | Get firewall rule information +*FirewallApi* | [**FirewallRulesStore**](FirewallApi.md#firewallrulesstore) | **Post** /domains/{domain}/firewall/rules | Create new firewall rule +*FirewallApi* | [**FirewallRulesUpdate**](FirewallApi.md#firewallrulesupdate) | **Patch** /domains/{domain}/firewall/rules/{id} | Update the firewall rule +*FirewallApi* | [**FirewallSettingsIndex**](FirewallApi.md#firewallsettingsindex) | **Get** /domains/{domain}/firewall/settings | Get domain's firewall configuration +*FirewallApi* | [**FirewallSettingsUpdate**](FirewallApi.md#firewallsettingsupdate) | **Patch** /domains/{domain}/firewall/settings | Update domain's firewall configuration +*FirewallApi* | [**FirewallUpdate**](FirewallApi.md#firewallupdate) | **Patch** /domains/{domain}/firewall | Update domain's firewall configuration +*ListApi* | [**ListsDestroy**](ListApi.md#listsdestroy) | **Delete** /dynamic-fields/{id} | Delete List +*ListApi* | [**ListsIndex**](ListApi.md#listsindex) | **Get** /dynamic-fields | Get the list of Lists +*ListApi* | [**ListsShow**](ListApi.md#listsshow) | **Get** /dynamic-fields/{id} | Get an existing List +*ListApi* | [**ListsStore**](ListApi.md#listsstore) | **Post** /dynamic-fields | Store new List +*ListApi* | [**ListsUpdate**](ListApi.md#listsupdate) | **Patch** /dynamic-fields/{id} | Update an existing List +*LoadBalancingApi* | [**LoadBalancersDestroy**](LoadBalancingApi.md#loadbalancersdestroy) | **Delete** /domains/{domain}/load-balancers/{loadBalancerId} | Remove a load balancer +*LoadBalancingApi* | [**LoadBalancersIndex**](LoadBalancingApi.md#loadbalancersindex) | **Get** /domains/{domain}/load-balancers | Get list of load balancers +*LoadBalancingApi* | [**LoadBalancersPoolsDestroy**](LoadBalancingApi.md#loadbalancerspoolsdestroy) | **Delete** /domains/{domain}/load-balancers/{loadBalancerId}/pools/{loadBalancerPoolId} | Remove a load balancer pool +*LoadBalancingApi* | [**LoadBalancersPoolsIndex**](LoadBalancingApi.md#loadbalancerspoolsindex) | **Get** /domains/{domain}/load-balancers/{loadBalancerId}/pools | Get the list of pools of a load balancers +*LoadBalancingApi* | [**LoadBalancersPoolsOriginsDestroy**](LoadBalancingApi.md#loadbalancerspoolsoriginsdestroy) | **Delete** /domains/{domain}/load-balancers/{loadBalancerId}/pools/{loadBalancerPoolId}/origins/{loadBalancerPoolOriginId} | Remove an origin from the pool of the load balancer +*LoadBalancingApi* | [**LoadBalancersPoolsOriginsIndex**](LoadBalancingApi.md#loadbalancerspoolsoriginsindex) | **Get** /domains/{domain}/load-balancers/{loadBalancerId}/pools/{loadBalancerPoolId}/origins | Get list of origins of a pool +*LoadBalancingApi* | [**LoadBalancersPoolsOriginsShow**](LoadBalancingApi.md#loadbalancerspoolsoriginsshow) | **Get** /domains/{domain}/load-balancers/{loadBalancerId}/pools/{loadBalancerPoolId}/origins/{loadBalancerPoolOriginId} | Get load balancer origin information +*LoadBalancingApi* | [**LoadBalancersPoolsOriginsStore**](LoadBalancingApi.md#loadbalancerspoolsoriginsstore) | **Post** /domains/{domain}/load-balancers/{loadBalancerId}/pools/{loadBalancerPoolId}/origins | Create a new origin in the pool of the load balancer +*LoadBalancingApi* | [**LoadBalancersPoolsOriginsUpdate**](LoadBalancingApi.md#loadbalancerspoolsoriginsupdate) | **Patch** /domains/{domain}/load-balancers/{loadBalancerId}/pools/{loadBalancerPoolId}/origins/{loadBalancerPoolOriginId} | Update an existing origin of the pool +*LoadBalancingApi* | [**LoadBalancersPoolsShow**](LoadBalancingApi.md#loadbalancerspoolsshow) | **Get** /domains/{domain}/load-balancers/{loadBalancerId}/pools/{loadBalancerPoolId} | Get load balancer pool information +*LoadBalancingApi* | [**LoadBalancersPoolsStore**](LoadBalancingApi.md#loadbalancerspoolsstore) | **Post** /domains/{domain}/load-balancers/{loadBalancerId}/pools | Create a new pool for the load balancer +*LoadBalancingApi* | [**LoadBalancersPoolsUpdate**](LoadBalancingApi.md#loadbalancerspoolsupdate) | **Put** /domains/{domain}/load-balancers/{loadBalancerId}/pools/{loadBalancerPoolId} | Update an existing load balancer pool with origins +*LoadBalancingApi* | [**LoadBalancersPoolsUpdatePool**](LoadBalancingApi.md#loadbalancerspoolsupdatepool) | **Patch** /domains/{domain}/load-balancers/{loadBalancerId}/pools/{loadBalancerPoolId} | Update an existing load balancer pool +*LoadBalancingApi* | [**LoadBalancersPrioritizePool**](LoadBalancingApi.md#loadbalancersprioritizepool) | **Post** /domains/{domain}/load-balancers/{loadBalancerId}/prioritize | Reorder the priority of load balancer pools +*LoadBalancingApi* | [**LoadBalancersRegionsIndex**](LoadBalancingApi.md#loadbalancersregionsindex) | **Get** /load-balancers/regions | Get list of regions for load balancers +*LoadBalancingApi* | [**LoadBalancersSettingsShow**](LoadBalancingApi.md#loadbalancerssettingsshow) | **Get** /domains/{domain}/load-balancers/settings | Get list of domain load balancer global settings +*LoadBalancingApi* | [**LoadBalancersSettingsUpdate**](LoadBalancingApi.md#loadbalancerssettingsupdate) | **Patch** /domains/{domain}/load-balancers/settings | Update domain's global load balancer settings +*LoadBalancingApi* | [**LoadBalancersShow**](LoadBalancingApi.md#loadbalancersshow) | **Get** /domains/{domain}/load-balancers/{loadBalancerId} | Get load balancer information +*LoadBalancingApi* | [**LoadBalancersStore**](LoadBalancingApi.md#loadbalancersstore) | **Post** /domains/{domain}/load-balancers | Create a new load balancer +*LoadBalancingApi* | [**LoadBalancersUpdate**](LoadBalancingApi.md#loadbalancersupdate) | **Patch** /domains/{domain}/load-balancers/{loadBalancerId} | Update a load balancer +*LogForwardersApi* | [**LogForwardersDestroy**](LogForwardersApi.md#logforwardersdestroy) | **Delete** /domains/{domain}/log-forwarders/{logForwarderId} | delete a log forwarder +*LogForwardersApi* | [**LogForwardersIndex**](LogForwardersApi.md#logforwardersindex) | **Get** /domains/{domain}/log-forwarders | Show list of log forwarders for given domain +*LogForwardersApi* | [**LogForwardersShow**](LogForwardersApi.md#logforwardersshow) | **Get** /domains/{domain}/log-forwarders/{logForwarderId} | Show a log forwarder's details based on given id +*LogForwardersApi* | [**LogForwardersStore**](LogForwardersApi.md#logforwardersstore) | **Post** /domains/{domain}/log-forwarders | Create new log forwarder +*LogForwardersApi* | [**LogForwardersUpdate**](LogForwardersApi.md#logforwardersupdate) | **Put** /domains/{domain}/log-forwarders/{logForwarderId} | Update a log forwarder +*LogForwardersApi* | [**LogForwardersUpdateStatus**](LogForwardersApi.md#logforwardersupdatestatus) | **Patch** /domains/{domain}/log-forwarders/{logForwarderId}/status | Update a log forwarder's status +*PageRuleApi* | [**PageRulesDestroy**](PageRuleApi.md#pagerulesdestroy) | **Delete** /domains/{domain}/page-rules/{id} | Delete the page-rule +*PageRuleApi* | [**PageRulesDiffShow**](PageRuleApi.md#pagerulesdiffshow) | **Get** /domains/{domain}/page-rules/{id}/diff | Get the page-rule's exceptions +*PageRuleApi* | [**PageRulesDiffUpdate**](PageRuleApi.md#pagerulesdiffupdate) | **Patch** /domains/{domain}/page-rules/{id}/diff | Update the page-rule's exceptions +*PageRuleApi* | [**PageRulesIndex**](PageRuleApi.md#pagerulesindex) | **Get** /domains/{domain}/page-rules | Get list of page-rules +*PageRuleApi* | [**PageRulesPurge**](PageRuleApi.md#pagerulespurge) | **Delete** /domains/{domain}/page-rules/{id}/purge | Purge the page-rule +*PageRuleApi* | [**PageRulesShow**](PageRuleApi.md#pagerulesshow) | **Get** /domains/{domain}/page-rules/{id} | Get the page-rule's information +*PageRuleApi* | [**PageRulesStatusUpdate**](PageRuleApi.md#pagerulesstatusupdate) | **Patch** /domains/{domain}/page-rules/{id} | Toggle status of the page-rule +*PageRuleApi* | [**PageRulesStore**](PageRuleApi.md#pagerulesstore) | **Post** /domains/{domain}/page-rules | Create new page-rule +*PageRuleApi* | [**PageRulesUpdate**](PageRuleApi.md#pagerulesupdate) | **Put** /domains/{domain}/page-rules/{id} | Update the page-rule +*PlanApi* | [**DomainsPlans**](PlanApi.md#domainsplans) | **Get** /domains/{domain}/plans | Get the list of feature defintions for plans based on different sets +*PlanApi* | [**DomainsPlansUpdate**](PlanApi.md#domainsplansupdate) | **Put** /domains/{domain}/plan | Update the domain's plan +*PlanApi* | [**DomainsPlansUsages**](PlanApi.md#domainsplansusages) | **Get** /domains/{domain}/plan/usages | Get usages based on features and an estimated cost +*PlanApi* | [**DomainsPlansViolations**](PlanApi.md#domainsplansviolations) | **Get** /domains/{domain}/plan/violations | Get violations based on plans +*PlanApi* | [**PlansIndex**](PlanApi.md#plansindex) | **Get** /plans | Get the list of feature defintions for plans based on different sets +*RateLimitingApi* | [**RateLimitingIndex**](RateLimitingApi.md#ratelimitingindex) | **Get** /domains/{domain}/rate-limit | Get Rate-Limit settings +*RateLimitingApi* | [**RateLimitingReprioritize**](RateLimitingApi.md#ratelimitingreprioritize) | **Post** /domains/{domain}/rate-limit/actions/reprioritize | Change priority of Rate limiting's rules +*RateLimitingApi* | [**RateLimitingRulesDestroy**](RateLimitingApi.md#ratelimitingrulesdestroy) | **Delete** /domains/{domain}/rate-limit/rules/{id} | Delete Rate limiting's rule +*RateLimitingApi* | [**RateLimitingRulesIndex**](RateLimitingApi.md#ratelimitingrulesindex) | **Get** /domains/{domain}/rate-limit/rules | Get Rate limiting rules +*RateLimitingApi* | [**RateLimitingRulesShow**](RateLimitingApi.md#ratelimitingrulesshow) | **Get** /domains/{domain}/rate-limit/rules/{id} | Get Rate limiting's rule information +*RateLimitingApi* | [**RateLimitingRulesStore**](RateLimitingApi.md#ratelimitingrulesstore) | **Post** /domains/{domain}/rate-limit/rules | Store new Rate limiting rule +*RateLimitingApi* | [**RateLimitingRulesUpdate**](RateLimitingApi.md#ratelimitingrulesupdate) | **Patch** /domains/{domain}/rate-limit/rules/{id} | Update the Rate limiting's rule +*RateLimitingApi* | [**RateLimitingSettingsIndex**](RateLimitingApi.md#ratelimitingsettingsindex) | **Get** /domains/{domain}/rate-limit/settings | Get Rate limiting settings +*RateLimitingApi* | [**RateLimitingSettingsUpdate**](RateLimitingApi.md#ratelimitingsettingsupdate) | **Patch** /domains/{domain}/rate-limit/settings | Update domain's Rate limiting configuration +*RateLimitingApi* | [**RateLimitingUpdate**](RateLimitingApi.md#ratelimitingupdate) | **Patch** /domains/{domain}/rate-limit | Update domain's Rate limiting configuration +*RedirectApi* | [**RedirectShow**](RedirectApi.md#redirectshow) | **Get** /domains/{domain}/settings/www-redirect | Get redirect settings +*RedirectApi* | [**RedirectUpdate**](RedirectApi.md#redirectupdate) | **Put** /domains/{domain}/settings/www-redirect | Update redirect settings +*ReportsApi* | [**BulkReportsTrafficsTotal**](ReportsApi.md#bulkreportstrafficstotal) | **Post** /bulk/reports/traffics | Get traffic report for multiple domains +*ReportsApi* | [**BulkReportsVisitorsTotal**](ReportsApi.md#bulkreportsvisitorstotal) | **Post** /bulk/reports/visitors | Get visitor report for multiple domains +*ReportsApi* | [**ReportsAttacksAttackers**](ReportsApi.md#reportsattacksattackers) | **Get** /domains/{domain}/reports/attacks/attackers | Get list of attackers information +*ReportsApi* | [**ReportsAttacksIndex**](ReportsApi.md#reportsattacksindex) | **Get** /domains/{domain}/reports/attacks/list | Get list of attacks details +*ReportsApi* | [**ReportsAttacksMap**](ReportsApi.md#reportsattacksmap) | **Get** /domains/{domain}/reports/attacks/map | Get geo-map of attacks +*ReportsApi* | [**ReportsAttacksShow**](ReportsApi.md#reportsattacksshow) | **Get** /domains/{domain}/reports/attacks | Get report of attacks +*ReportsApi* | [**ReportsAttacksUri**](ReportsApi.md#reportsattacksuri) | **Get** /domains/{domain}/reports/attacks/uri | Get list of URLs under attack +*ReportsApi* | [**ReportsDnsGeo**](ReportsApi.md#reportsdnsgeo) | **Get** /domains/{domain}/reports/dns-geo | Get DNS requests as geo-map +*ReportsApi* | [**ReportsDnsRequests**](ReportsApi.md#reportsdnsrequests) | **Get** /domains/{domain}/reports/dns-requests | Get response time report +*ReportsApi* | [**ReportsErrorLogDetails**](ReportsApi.md#reportserrorlogdetails) | **Get** /domains/{domain}/reports/error-log-details | Get detail of an error +*ReportsApi* | [**ReportsErrorLogs**](ReportsApi.md#reportserrorlogs) | **Get** /domains/{domain}/reports/error-logs | Get list of errors +*ReportsApi* | [**ReportsErrorLogsChart**](ReportsApi.md#reportserrorlogschart) | **Get** /domains/{domain}/reports/error-logs/chart | Get chart view of errors +*ReportsApi* | [**ReportsResponseTimeIndex**](ReportsApi.md#reportsresponsetimeindex) | **Get** /domains/{domain}/reports/response-time | Get response time report +*ReportsApi* | [**ReportsStatusIndex**](ReportsApi.md#reportsstatusindex) | **Get** /domains/{domain}/reports/status | Get status codes pie chart +*ReportsApi* | [**ReportsStatusSummary**](ReportsApi.md#reportsstatussummary) | **Get** /domains/{domain}/reports/status/summary | Get an overview of status codes pie chart +*ReportsApi* | [**ReportsTrafficsMap**](ReportsApi.md#reportstrafficsmap) | **Get** /domains/{domain}/reports/traffics/map | Get traffic as geo-map +*ReportsApi* | [**ReportsTrafficsSaved**](ReportsApi.md#reportstrafficssaved) | **Get** /domains/{domain}/reports/traffics/saved | Get traffic saved to total pie chart +*ReportsApi* | [**ReportsTrafficsTotal**](ReportsApi.md#reportstrafficstotal) | **Get** /domains/{domain}/reports/traffics | Get traffic report for domain +*ReportsApi* | [**ReportsVisitorsHighRequestIps**](ReportsApi.md#reportsvisitorshighrequestips) | **Get** /domains/{domain}/reports/high-request-ips | Get report of IPs with highest number of requests +*ReportsApi* | [**ReportsVisitorsIndex**](ReportsApi.md#reportsvisitorsindex) | **Get** /domains/{domain}/reports/visitors | Get report of visitors for domain +*SSLTLSApi* | [**SslCertDestroy**](SSLTLSApi.md#sslcertdestroy) | **Delete** /domains/{domain}/ssl/certificates/{id} | Delete an unused customer certificate +*SSLTLSApi* | [**SslCertOrderIndex**](SSLTLSApi.md#sslcertorderindex) | **Get** /domains/{domain}/ssl/orders | Get All Managed certificate orders history +*SSLTLSApi* | [**SslCertOrderRetry**](SSLTLSApi.md#sslcertorderretry) | **Post** /domains/{domain}/ssl/orders/action/retry | Retry a previously `killed` order +*SSLTLSApi* | [**SslCertStore**](SSLTLSApi.md#sslcertstore) | **Post** /domains/{domain}/ssl/certificates | Upload Certificate +*SSLTLSApi* | [**SslIndex**](SSLTLSApi.md#sslindex) | **Get** /domains/{domain}/ssl | Get SSL settings +*SSLTLSApi* | [**SslUpdate**](SSLTLSApi.md#sslupdate) | **Patch** /domains/{domain}/ssl | Update domain's SSL configuration +*TransportLayerProxyApi* | [**TransportLayerProxiesDestroy**](TransportLayerProxyApi.md#transportlayerproxiesdestroy) | **Delete** /domains/{domain}/transport-layer-proxies/{transportLayerProxyId} | delete a transport layer proxy +*TransportLayerProxyApi* | [**TransportLayerProxiesIndex**](TransportLayerProxyApi.md#transportlayerproxiesindex) | **Get** /domains/{domain}/transport-layer-proxies | Show list of transport layer proxies for given domain +*TransportLayerProxyApi* | [**TransportLayerProxiesShow**](TransportLayerProxyApi.md#transportlayerproxiesshow) | **Get** /domains/{domain}/transport-layer-proxies/{transportLayerProxyId} | Show a transport layer proxy's details based on given id +*TransportLayerProxyApi* | [**TransportLayerProxiesStore**](TransportLayerProxyApi.md#transportlayerproxiesstore) | **Post** /domains/{domain}/transport-layer-proxies | Create new transport layer proxy +*TransportLayerProxyApi* | [**TransportLayerProxiesUpdate**](TransportLayerProxyApi.md#transportlayerproxiesupdate) | **Put** /domains/{domain}/transport-layer-proxies/{transportLayerProxyId} | Update a transport layer proxy +*TroubleshootApi* | [**TroubleshootsIndex**](TroubleshootApi.md#troubleshootsindex) | **Get** /domains/{domain}/troubleshoots | Show list of troubleshoots for given domain +*TroubleshootApi* | [**TroubleshootsLatest**](TroubleshootApi.md#troubleshootslatest) | **Get** /domains/{domain}/troubleshoots/latest | Show the latest troubleshoot for given domain +*TroubleshootApi* | [**TroubleshootsStore**](TroubleshootApi.md#troubleshootsstore) | **Post** /domains/{domain}/troubleshoots | Create new troubleshoot +*WAFApi* | [**GlobalWafIndex**](WAFApi.md#globalwafindex) | **Get** /waf | Get WAF presets +*WAFApi* | [**GlobalWafShowPackage**](WAFApi.md#globalwafshowpackage) | **Get** /waf/packages/{packageId} | Get WAF package details +*WAFApi* | [**WafIndex**](WAFApi.md#wafindex) | **Get** /domains/{domain}/waf | Get WAF configuration +*WAFApi* | [**WafPackageReprioritize**](WAFApi.md#wafpackagereprioritize) | **Post** /domains/{domain}/waf/actions/reprioritize-package | Change priority of WAF packages +*WAFApi* | [**WafPackagesDestroy**](WAFApi.md#wafpackagesdestroy) | **Delete** /domains/{domain}/waf/packages/{id} | Delete WAF package from domain +*WAFApi* | [**WafPackagesIndex**](WAFApi.md#wafpackagesindex) | **Get** /domains/{domain}/waf/packages | Get WAF packages +*WAFApi* | [**WafPackagesShow**](WAFApi.md#wafpackagesshow) | **Get** /domains/{domain}/waf/packages/{id} | Get WAF package information +*WAFApi* | [**WafPackagesStore**](WAFApi.md#wafpackagesstore) | **Post** /domains/{domain}/waf/packages | Add new WAF package to domain +*WAFApi* | [**WafPackagesUpdate**](WAFApi.md#wafpackagesupdate) | **Patch** /domains/{domain}/waf/packages/{id} | Update the WAF package +*WAFApi* | [**WafReconfigure**](WAFApi.md#wafreconfigure) | **Post** /domains/{domain}/waf/actions/reconfigure | Reconfigure WAF module using a preset +*WAFApi* | [**WafReprioritize**](WAFApi.md#wafreprioritize) | **Post** /domains/{domain}/waf/actions/reprioritize | Change priority of WAF rules +*WAFApi* | [**WafRulesDestroy**](WAFApi.md#wafrulesdestroy) | **Delete** /domains/{domain}/waf/rules/{id} | Delete WAF rule +*WAFApi* | [**WafRulesIndex**](WAFApi.md#wafrulesindex) | **Get** /domains/{domain}/waf/rules | Get WAF Rules +*WAFApi* | [**WafRulesShow**](WAFApi.md#wafrulesshow) | **Get** /domains/{domain}/waf/rules/{id} | Get WAF rule information +*WAFApi* | [**WafRulesStore**](WAFApi.md#wafrulesstore) | **Post** /domains/{domain}/waf/rules | Create new WAF rule +*WAFApi* | [**WafRulesUpdate**](WAFApi.md#wafrulesupdate) | **Patch** /domains/{domain}/waf/rules/{id} | Update the WAF rule +*WAFApi* | [**WafSettingsIndex**](WAFApi.md#wafsettingsindex) | **Get** /domains/{domain}/waf/settings | Get WAF configuration +*WAFApi* | [**WafSettingsUpdate**](WAFApi.md#wafsettingsupdate) | **Patch** /domains/{domain}/waf/settings | Configure WAF module of the domain +*WAFApi* | [**WafUpdate**](WAFApi.md#wafupdate) | **Patch** /domains/{domain}/waf | Configure WAF module of the domain + + +## Documentation For Models + + - [AAAARecord](AAAARecord.md) + - [AAAARecordValue](AAAARecordValue.md) + - [ANAMERecord](ANAMERecord.md) + - [ANAMERecordValue](ANAMERecordValue.md) + - [ARecord](ARecord.md) + - [ARecordValue](ARecordValue.md) + - [Acceleration](Acceleration.md) + - [AccelerationResponse](AccelerationResponse.md) + - [AccelerationUpdate](AccelerationUpdate.md) + - [ActiveHealthCheckIndex200Response](ActiveHealthCheckIndex200Response.md) + - [ActiveHealthCheckReportsDetails200Response](ActiveHealthCheckReportsDetails200Response.md) + - [ActiveHealthCheckReportsSummary200Response](ActiveHealthCheckReportsSummary200Response.md) + - [ApplicationCategory](ApplicationCategory.md) + - [ApplicationCategoryApplicationsInner](ApplicationCategoryApplicationsInner.md) + - [ApplicationCategoryNameTranslation](ApplicationCategoryNameTranslation.md) + - [ApplicationCategoryNameTranslationEn](ApplicationCategoryNameTranslationEn.md) + - [AppsCategoryIndex200Response](AppsCategoryIndex200Response.md) + - [AppsCategoryShow200Response](AppsCategoryShow200Response.md) + - [AppsIndex200Response](AppsIndex200Response.md) + - [AttackReport](AttackReport.md) + - [AttackReportCharts](AttackReportCharts.md) + - [AttackReportChartsAttacks](AttackReportChartsAttacks.md) + - [AttackReportChartsAttacksSeriesInner](AttackReportChartsAttacksSeriesInner.md) + - [AttackReportItem](AttackReportItem.md) + - [AttackReportMap](AttackReportMap.md) + - [AttackReportMapCharts](AttackReportMapCharts.md) + - [AttackReportMapChartsAttacksValue](AttackReportMapChartsAttacksValue.md) + - [AttackReportMapData](AttackReportMapData.md) + - [AttackReportMapStatisticsInner](AttackReportMapStatisticsInner.md) + - [AttackReportStatistics](AttackReportStatistics.md) + - [AttackReportUri](AttackReportUri.md) + - [AttackReportUriData](AttackReportUriData.md) + - [BaseDnsRecord](BaseDnsRecord.md) + - [BaseFirewallRule](BaseFirewallRule.md) + - [BaseFirewallSettings](BaseFirewallSettings.md) + - [BaseHealthCheck](BaseHealthCheck.md) + - [BaseRateLimitRule](BaseRateLimitRule.md) + - [BulkReportsTrafficsTotalRequest](BulkReportsTrafficsTotalRequest.md) + - [BulkReportsVisitorsTotalRequest](BulkReportsVisitorsTotalRequest.md) + - [BulkTrafficReport](BulkTrafficReport.md) + - [BulkTrafficReportData](BulkTrafficReportData.md) + - [BulkTrafficReportDataEgressBytes](BulkTrafficReportDataEgressBytes.md) + - [BulkVisitorReport](BulkVisitorReport.md) + - [BulkVisitorReportData](BulkVisitorReportData.md) + - [BypassAction](BypassAction.md) + - [CAARecord](CAARecord.md) + - [CAARecordValue](CAARecordValue.md) + - [CNAMERecord](CNAMERecord.md) + - [CNAMERecordValue](CNAMERecordValue.md) + - [CacheSettings](CacheSettings.md) + - [CacheSettingsData](CacheSettingsData.md) + - [CachingPurge](CachingPurge.md) + - [CdnApp](CdnApp.md) + - [CdnAppData](CdnAppData.md) + - [CdnAppInstall](CdnAppInstall.md) + - [CdnAppLike](CdnAppLike.md) + - [CdnAppLikeStats](CdnAppLikeStats.md) + - [CdnAppLikeStatsData](CdnAppLikeStatsData.md) + - [CdnAppTriggerWebhook](CdnAppTriggerWebhook.md) + - [Certificate](Certificate.md) + - [CertificateOrder](CertificateOrder.md) + - [ChallengeAction](ChallengeAction.md) + - [CloneDomain](CloneDomain.md) + - [CountryList](CountryList.md) + - [CountryRequestChart](CountryRequestChart.md) + - [CountryStatistics](CountryStatistics.md) + - [CountryTrafficChart](CountryTrafficChart.md) + - [Currency](Currency.md) + - [CustomCname](CustomCname.md) + - [CustomPage](CustomPage.md) + - [CustomPages](CustomPages.md) + - [CustomPagesData](CustomPagesData.md) + - [DKIMRecord](DKIMRecord.md) + - [DataResponse](DataResponse.md) + - [DataWithMessageResponse](DataWithMessageResponse.md) + - [Ddos](Ddos.md) + - [DdosData](DdosData.md) + - [DdosPreflight](DdosPreflight.md) + - [DdosRule](DdosRule.md) + - [DdosRuleData](DdosRuleData.md) + - [DdosRuleResponse](DdosRuleResponse.md) + - [DdosRulesIndex200Response](DdosRulesIndex200Response.md) + - [DdosSettings](DdosSettings.md) + - [DdosSettingsData](DdosSettingsData.md) + - [DdosSettingsUpdate200Response](DdosSettingsUpdate200Response.md) + - [DdosUpdate200Response](DdosUpdate200Response.md) + - [DeprecatedNs](DeprecatedNs.md) + - [DeprecatedWafSettings](DeprecatedWafSettings.md) + - [DnsGeoReport](DnsGeoReport.md) + - [DnsGeoReportCharts](DnsGeoReportCharts.md) + - [DnsGeoReportChartsRequestsValue](DnsGeoReportChartsRequestsValue.md) + - [DnsGeoReportData](DnsGeoReportData.md) + - [DnsGeoReportListsInner](DnsGeoReportListsInner.md) + - [DnsRecord](DnsRecord.md) + - [DnsRecordCloud](DnsRecordCloud.md) + - [DnsRecordData](DnsRecordData.md) + - [DnsRecordGeneric](DnsRecordGeneric.md) + - [DnsRecordGenericArrayValue](DnsRecordGenericArrayValue.md) + - [DnsRecordGenericObjectValue](DnsRecordGenericObjectValue.md) + - [DnsRecordIpFilterMode](DnsRecordIpFilterMode.md) + - [DnsRecordResponse](DnsRecordResponse.md) + - [DnsRecordsIndex200Response](DnsRecordsIndex200Response.md) + - [DnsRequestReport](DnsRequestReport.md) + - [DnsRequestReportCharts](DnsRequestReportCharts.md) + - [DnsRequestReportChartsRequests](DnsRequestReportChartsRequests.md) + - [DnsRequestReportChartsRequestsSeriesInner](DnsRequestReportChartsRequestsSeriesInner.md) + - [DnsRequestReportData](DnsRequestReportData.md) + - [DnsRequestReportStatistics](DnsRequestReportStatistics.md) + - [DnsSec](DnsSec.md) + - [DnsSecData](DnsSecData.md) + - [DnsSecStatus](DnsSecStatus.md) + - [Domain](Domain.md) + - [DomainCdnApp](DomainCdnApp.md) + - [DomainPurgeTags](DomainPurgeTags.md) + - [DomainResponse](DomainResponse.md) + - [DomainStore](DomainStore.md) + - [DomainTransferData](DomainTransferData.md) + - [DomainWaf](DomainWaf.md) + - [DomainWafData](DomainWafData.md) + - [DomainWafPackage](DomainWafPackage.md) + - [DomainWafPackageDetails](DomainWafPackageDetails.md) + - [DomainWafPackageDetailsData](DomainWafPackageDetailsData.md) + - [DomainWafPackageStore](DomainWafPackageStore.md) + - [DomainWafPackagesData](DomainWafPackagesData.md) + - [DomainsAppsStore200Response](DomainsAppsStore200Response.md) + - [DomainsIndex200Response](DomainsIndex200Response.md) + - [DomainsNameserversCheck200Response](DomainsNameserversCheck200Response.md) + - [DomainsNameserversDeprecatedCheck200Response](DomainsNameserversDeprecatedCheck200Response.md) + - [DomainsPlansUsages200Response](DomainsPlansUsages200Response.md) + - [DomainsPlansViolations200Response](DomainsPlansViolations200Response.md) + - [DomainsShow404Response](DomainsShow404Response.md) + - [DomainsStore422Response](DomainsStore422Response.md) + - [DomainsTransferIndex200Response](DomainsTransferIndex200Response.md) + - [DynamicField](DynamicField.md) + - [DynamicFieldData](DynamicFieldData.md) + - [DynamicFieldResponse](DynamicFieldResponse.md) + - [DynamicFieldType](DynamicFieldType.md) + - [DynamicFieldValue](DynamicFieldValue.md) + - [EmailForwardingAlias](EmailForwardingAlias.md) + - [EmailForwardingAliasesListData](EmailForwardingAliasesListData.md) + - [EmailForwardingAliasesListInner](EmailForwardingAliasesListInner.md) + - [EmailForwardingAliasesRecipients](EmailForwardingAliasesRecipients.md) + - [EmailForwardingAliasesStore](EmailForwardingAliasesStore.md) + - [EmailForwardingAliasesToggleActivation](EmailForwardingAliasesToggleActivation.md) + - [EmailForwardingRecipient](EmailForwardingRecipient.md) + - [EmailForwardingRecipientsListData](EmailForwardingRecipientsListData.md) + - [EmailForwardingRecipientsListInner](EmailForwardingRecipientsListInner.md) + - [EmailForwardingRecipientsStore](EmailForwardingRecipientsStore.md) + - [EmailForwardingRecipientsVerify](EmailForwardingRecipientsVerify.md) + - [EmailForwardingStats](EmailForwardingStats.md) + - [EmailForwardingStatsData](EmailForwardingStatsData.md) + - [EmailForwardingsAliasesStore201Response](EmailForwardingsAliasesStore201Response.md) + - [EmailForwardingsRecipientsStore201Response](EmailForwardingsRecipientsStore201Response.md) + - [ErrorLog](ErrorLog.md) + - [ErrorLogChart](ErrorLogChart.md) + - [ErrorLogChartCharts](ErrorLogChartCharts.md) + - [ErrorLogChartChartsStatusCode](ErrorLogChartChartsStatusCode.md) + - [ErrorLogChartChartsStatusCodeSeriesInner](ErrorLogChartChartsStatusCodeSeriesInner.md) + - [ErrorLogChartData](ErrorLogChartData.md) + - [ErrorLogChartStatistics](ErrorLogChartStatistics.md) + - [ErrorLogUpstreamsInner](ErrorLogUpstreamsInner.md) + - [ErrorLogsData](ErrorLogsData.md) + - [EstimatedCost](EstimatedCost.md) + - [ExpectedResponse](ExpectedResponse.md) + - [FeatureDefinition](FeatureDefinition.md) + - [FeatureDefinitionMeta](FeatureDefinitionMeta.md) + - [FeatureDefinitionPlans](FeatureDefinitionPlans.md) + - [FeaturePlanDefinition](FeaturePlanDefinition.md) + - [FeaturePlanDefinitionMeta](FeaturePlanDefinitionMeta.md) + - [FeaturePlanDefinitionMetaLabelsInner](FeaturePlanDefinitionMetaLabelsInner.md) + - [FeaturePrice](FeaturePrice.md) + - [FeaturePricing](FeaturePricing.md) + - [FeatureSet](FeatureSet.md) + - [FeatureSets](FeatureSets.md) + - [FeatureUsage](FeatureUsage.md) + - [Firewall](Firewall.md) + - [FirewallActionDetails](FirewallActionDetails.md) + - [FirewallIndex200Response](FirewallIndex200Response.md) + - [FirewallRule](FirewallRule.md) + - [FirewallRuleResponse](FirewallRuleResponse.md) + - [FirewallRuleView](FirewallRuleView.md) + - [FirewallRulesIndex200Response](FirewallRulesIndex200Response.md) + - [FirewallSettings](FirewallSettings.md) + - [FirewallSettingsIndex200Response](FirewallSettingsIndex200Response.md) + - [FirewallSettingsView](FirewallSettingsView.md) + - [HealthCheck](HealthCheck.md) + - [HealthCheckReportDetail](HealthCheckReportDetail.md) + - [HealthCheckReportSummary](HealthCheckReportSummary.md) + - [HealthCheckReportSummaryDetail](HealthCheckReportSummaryDetail.md) + - [HealthCheckRequestConfig](HealthCheckRequestConfig.md) + - [HealthCheckResponse](HealthCheckResponse.md) + - [HealthCheckView](HealthCheckView.md) + - [HealthCheckZone](HealthCheckZone.md) + - [HealthCheckZoneName](HealthCheckZoneName.md) + - [HealthChecksZonesIndex200Response](HealthChecksZonesIndex200Response.md) + - [HighRequestedIp](HighRequestedIp.md) + - [HighRequestedIpIp](HighRequestedIpIp.md) + - [HttpConfig](HttpConfig.md) + - [ImageResize](ImageResize.md) + - [ImageResizeResponse](ImageResizeResponse.md) + - [ListsIndex200Response](ListsIndex200Response.md) + - [LoadBalancer](LoadBalancer.md) + - [LoadBalancerData](LoadBalancerData.md) + - [LoadBalancerOrigin](LoadBalancerOrigin.md) + - [LoadBalancerOriginData](LoadBalancerOriginData.md) + - [LoadBalancerOriginResponse](LoadBalancerOriginResponse.md) + - [LoadBalancerOriginStore](LoadBalancerOriginStore.md) + - [LoadBalancerPool](LoadBalancerPool.md) + - [LoadBalancerPoolData](LoadBalancerPoolData.md) + - [LoadBalancerPoolResponse](LoadBalancerPoolResponse.md) + - [LoadBalancerPoolStore](LoadBalancerPoolStore.md) + - [LoadBalancerRegion](LoadBalancerRegion.md) + - [LoadBalancerResponse](LoadBalancerResponse.md) + - [LoadBalancerSetting](LoadBalancerSetting.md) + - [LoadBalancerSettingsData](LoadBalancerSettingsData.md) + - [LoadBalancerStore](LoadBalancerStore.md) + - [LoadBalancersIndex200Response](LoadBalancersIndex200Response.md) + - [LoadBalancersPoolsIndex200Response](LoadBalancersPoolsIndex200Response.md) + - [LoadBalancersPoolsOriginsIndex200Response](LoadBalancersPoolsOriginsIndex200Response.md) + - [LoadBalancersRegionsIndex200Response](LoadBalancersRegionsIndex200Response.md) + - [LoadBalancersSettingsUpdate200Response](LoadBalancersSettingsUpdate200Response.md) + - [LogForwarder](LogForwarder.md) + - [LogForwarderAccessLogType](LogForwarderAccessLogType.md) + - [LogForwarderDNSType](LogForwarderDNSType.md) + - [LogForwarderDataFormat](LogForwarderDataFormat.md) + - [LogForwarderDatadogConnectionType](LogForwarderDatadogConnectionType.md) + - [LogForwarderErrorType](LogForwarderErrorType.md) + - [LogForwarderGeneric](LogForwarderGeneric.md) + - [LogForwarderKafkaConnectionType](LogForwarderKafkaConnectionType.md) + - [LogForwarderLogglyConnectionType](LogForwarderLogglyConnectionType.md) + - [LogForwarderResponse](LogForwarderResponse.md) + - [LogForwarderS3ConnectionType](LogForwarderS3ConnectionType.md) + - [LogForwarderSetting](LogForwarderSetting.md) + - [LogForwarderSummary](LogForwarderSummary.md) + - [LogForwarderSyslogConnectionType](LogForwarderSyslogConnectionType.md) + - [LogForwarderWAFType](LogForwarderWAFType.md) + - [LogForwardersIndex200Response](LogForwardersIndex200Response.md) + - [MXRecord](MXRecord.md) + - [MXRecordValue](MXRecordValue.md) + - [MapTrafficsData](MapTrafficsData.md) + - [MessageResponse](MessageResponse.md) + - [MonitoringStatus](MonitoringStatus.md) + - [NSRecord](NSRecord.md) + - [NSRecordValue](NSRecordValue.md) + - [NsDomain](NsDomain.md) + - [NsKeys](NsKeys.md) + - [NsKeysResponse](NsKeysResponse.md) + - [PTRRecord](PTRRecord.md) + - [PTRRecordValue](PTRRecordValue.md) + - [PageRule](PageRule.md) + - [PageRuleData](PageRuleData.md) + - [PageRuleDiff](PageRuleDiff.md) + - [PageRuleDiffData](PageRuleDiffData.md) + - [PageRuleDiffRedirect](PageRuleDiffRedirect.md) + - [PageRuleDiffReqCustomHeadersInner](PageRuleDiffReqCustomHeadersInner.md) + - [PageRuleImageResize](PageRuleImageResize.md) + - [PageRuleRedirect](PageRuleRedirect.md) + - [PageRuleResponse](PageRuleResponse.md) + - [PageRuleSummary](PageRuleSummary.md) + - [PageRulesDiffUpdate200Response](PageRulesDiffUpdate200Response.md) + - [PageRulesIndex200Response](PageRulesIndex200Response.md) + - [PaginatedResponse](PaginatedResponse.md) + - [PaginatedResponseLinks](PaginatedResponseLinks.md) + - [PaginatedResponseMeta](PaginatedResponseMeta.md) + - [PlanInfo](PlanInfo.md) + - [PlanResponse](PlanResponse.md) + - [PlanUpdate](PlanUpdate.md) + - [PlansIndexDomainParameter](PlansIndexDomainParameter.md) + - [PrioritizePool](PrioritizePool.md) + - [PrioritizePoolAfter](PrioritizePoolAfter.md) + - [PrioritizePoolBefore](PrioritizePoolBefore.md) + - [PurgeTagsIndex200Response](PurgeTagsIndex200Response.md) + - [RateLimit](RateLimit.md) + - [RateLimitData](RateLimitData.md) + - [RateLimitRule](RateLimitRule.md) + - [RateLimitRuleData](RateLimitRuleData.md) + - [RateLimitRuleView](RateLimitRuleView.md) + - [RateLimitSettings](RateLimitSettings.md) + - [RateLimitSettingsData](RateLimitSettingsData.md) + - [RateLimitingRulesIndex200Response](RateLimitingRulesIndex200Response.md) + - [RateLimitingRulesUpdate200Response](RateLimitingRulesUpdate200Response.md) + - [RateLimitingSettingsUpdate200Response](RateLimitingSettingsUpdate200Response.md) + - [RateLimitingUpdate200Response](RateLimitingUpdate200Response.md) + - [Redirect](Redirect.md) + - [RedirectData](RedirectData.md) + - [ReportsAttacksAttackers200Response](ReportsAttacksAttackers200Response.md) + - [ReportsAttacksAttackers200ResponseDataInner](ReportsAttacksAttackers200ResponseDataInner.md) + - [ReportsAttacksIndex200Response](ReportsAttacksIndex200Response.md) + - [ReportsAttacksShow200Response](ReportsAttacksShow200Response.md) + - [ReportsErrorLogDetails200Response](ReportsErrorLogDetails200Response.md) + - [ReportsVisitorsHighRequestIps200Response](ReportsVisitorsHighRequestIps200Response.md) + - [ReprioritizeRuleRequest](ReprioritizeRuleRequest.md) + - [ResponseTime](ResponseTime.md) + - [ResponseTimeCharts](ResponseTimeCharts.md) + - [ResponseTimeChartsIr](ResponseTimeChartsIr.md) + - [ResponseTimeChartsIrSeriesInner](ResponseTimeChartsIrSeriesInner.md) + - [ResponseTimeData](ResponseTimeData.md) + - [ResponseTimeStatistics](ResponseTimeStatistics.md) + - [SPFRecord](SPFRecord.md) + - [SRVRecord](SRVRecord.md) + - [SRVRecordValue](SRVRecordValue.md) + - [SavedTrafficsCharts](SavedTrafficsCharts.md) + - [SavedTrafficsChartsRequestInner](SavedTrafficsChartsRequestInner.md) + - [SavedTrafficsChartsTrafficInner](SavedTrafficsChartsTrafficInner.md) + - [SavedTrafficsData](SavedTrafficsData.md) + - [SavedTrafficsStatistics](SavedTrafficsStatistics.md) + - [SavedTrafficsStatisticsTraffic](SavedTrafficsStatisticsTraffic.md) + - [Ssl](Ssl.md) + - [SslCertOrderIndex200Response](SslCertOrderIndex200Response.md) + - [SslResponse](SslResponse.md) + - [SslUpdate](SslUpdate.md) + - [StatusCodeReport](StatusCodeReport.md) + - [StatusCodeReportCharts](StatusCodeReportCharts.md) + - [StatusCodeReportChartsStatusCode](StatusCodeReportChartsStatusCode.md) + - [StatusCodeReportChartsStatusCodeSeriesInner](StatusCodeReportChartsStatusCodeSeriesInner.md) + - [StatusCodeReportData](StatusCodeReportData.md) + - [StatusCodeReportStatistics](StatusCodeReportStatistics.md) + - [StatusCodeReportStatisticsStatusCodes](StatusCodeReportStatisticsStatusCodes.md) + - [StatusCodeSummary](StatusCodeSummary.md) + - [StatusCodeSummaryCharts](StatusCodeSummaryCharts.md) + - [StatusCodeSummaryChartsStatusCodeInner](StatusCodeSummaryChartsStatusCodeInner.md) + - [StatusCodeSummaryData](StatusCodeSummaryData.md) + - [TLSARecord](TLSARecord.md) + - [TLSARecordValue](TLSARecordValue.md) + - [TXTRecord](TXTRecord.md) + - [TXTRecordValue](TXTRecordValue.md) + - [TcpConfig](TcpConfig.md) + - [TrafficCharts](TrafficCharts.md) + - [TrafficChartsRequests](TrafficChartsRequests.md) + - [TrafficChartsRequestsSeriesInner](TrafficChartsRequestsSeriesInner.md) + - [TrafficChartsTraffics](TrafficChartsTraffics.md) + - [TrafficChartsTrafficsSeriesInner](TrafficChartsTrafficsSeriesInner.md) + - [TrafficStatistics](TrafficStatistics.md) + - [TrafficStatisticsTraffics](TrafficStatisticsTraffics.md) + - [TrafficsData](TrafficsData.md) + - [TransferDomain](TransferDomain.md) + - [TransferDomainChangeStatus](TransferDomainChangeStatus.md) + - [TransportLayerProxiesIndex200Response](TransportLayerProxiesIndex200Response.md) + - [TransportLayerProxy](TransportLayerProxy.md) + - [TransportLayerProxyFirewall](TransportLayerProxyFirewall.md) + - [TransportLayerProxyFirewallsInner](TransportLayerProxyFirewallsInner.md) + - [TransportLayerProxyMatch](TransportLayerProxyMatch.md) + - [TransportLayerProxyResponse](TransportLayerProxyResponse.md) + - [TransportLayerProxyServer](TransportLayerProxyServer.md) + - [TransportLayerProxyServersInner](TransportLayerProxyServersInner.md) + - [TransportLayerProxyStore](TransportLayerProxyStore.md) + - [TransportLayerProxyUpdate](TransportLayerProxyUpdate.md) + - [Troubleshoot](Troubleshoot.md) + - [TroubleshootDetailsInner](TroubleshootDetailsInner.md) + - [TroubleshootsIndex200Response](TroubleshootsIndex200Response.md) + - [TroubleshootsStore201Response](TroubleshootsStore201Response.md) + - [UpdateBooleanStatus](UpdateBooleanStatus.md) + - [UpstreamTimeout](UpstreamTimeout.md) + - [UsageLimit](UsageLimit.md) + - [Usages](Usages.md) + - [Violations](Violations.md) + - [ViolationsViolations](ViolationsViolations.md) + - [Visitors](Visitors.md) + - [VisitorsCharts](VisitorsCharts.md) + - [VisitorsChartsVisitors](VisitorsChartsVisitors.md) + - [VisitorsChartsVisitorsSeriesInner](VisitorsChartsVisitorsSeriesInner.md) + - [VisitorsData](VisitorsData.md) + - [VisitorsStatistics](VisitorsStatistics.md) + - [VisitorsStatisticsVisitors](VisitorsStatisticsVisitors.md) + - [Waf](Waf.md) + - [WafPackage](WafPackage.md) + - [WafPackageDetails](WafPackageDetails.md) + - [WafPackageDetailsData](WafPackageDetailsData.md) + - [WafPackageProvider](WafPackageProvider.md) + - [WafPackagesStore200Response](WafPackagesStore200Response.md) + - [WafPackagesUpdate200Response](WafPackagesUpdate200Response.md) + - [WafPreset](WafPreset.md) + - [WafPresetPackagesInner](WafPresetPackagesInner.md) + - [WafPresetPackagesInnerProvider](WafPresetPackagesInnerProvider.md) + - [WafPresets](WafPresets.md) + - [WafPresetsData](WafPresetsData.md) + - [WafReconfigure](WafReconfigure.md) + - [WafReprioritize](WafReprioritize.md) + - [WafRule](WafRule.md) + - [WafRuleResponse](WafRuleResponse.md) + - [WafRulesIndex200Response](WafRulesIndex200Response.md) + - [WafRuleset](WafRuleset.md) + - [WafRulesetRulesInner](WafRulesetRulesInner.md) + - [WafRulesets](WafRulesets.md) + - [WafSettings](WafSettings.md) + - [WafSettingsData](WafSettingsData.md) + + +## Documentation For Authorization + + +Authentication schemes defined for the API: +### UserToken + +- **Type**: HTTP Bearer token authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextAccessToken, "BEARER_TOKEN_STRING") +r, err := client.Service.Operation(auth, args) +``` + +### ApiKey + +- **Type**: API key +- **API key parameter name**: Authorization +- **Location**: HTTP header + +Note, each API key must be added to a map of `map[string]APIKey` where the key is: Authorization and passed in as the auth context for each request. + +Example + +```golang +auth := context.WithValue( + context.Background(), + sw.ContextAPIKeys, + map[string]sw.APIKey{ + "Authorization": {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 + + + diff --git a/docs/HealthCheck.md b/docs/HealthCheck.md new file mode 100644 index 0000000..6ee1318 --- /dev/null +++ b/docs/HealthCheck.md @@ -0,0 +1,404 @@ +# HealthCheck + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**RequestConfig** | Pointer to [**HealthCheckRequestConfig**](HealthCheckRequestConfig.md) | | [optional] +**Id** | Pointer to **string** | | [optional] [readonly] +**Name** | Pointer to **string** | | [optional] +**Description** | Pointer to **string** | | [optional] +**Origin** | Pointer to **string** | can be IP/Host when type is `upstream`, otherwise it must be a valid record ID | [optional] +**OriginType** | Pointer to **string** | | [optional] +**Upstreams** | Pointer to **[]string** | | [optional] +**Interval** | Pointer to **int32** | In milliseconds | [optional] +**Threshold** | Pointer to **int32** | | [optional] +**Type** | Pointer to **string** | | [optional] +**Status** | Pointer to **bool** | The health-check is off or on | [optional] [default to true] +**Retries** | Pointer to **int32** | Number of immediate retries in case of a timeout | [optional] +**Zones** | Pointer to [**[]HealthCheckZone**](HealthCheckZone.md) | | [optional] +**MonitoringUpdatedAt** | Pointer to **NullableTime** | | [optional] + +## Methods + +### NewHealthCheck + +`func NewHealthCheck() *HealthCheck` + +NewHealthCheck instantiates a new HealthCheck object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewHealthCheckWithDefaults + +`func NewHealthCheckWithDefaults() *HealthCheck` + +NewHealthCheckWithDefaults instantiates a new HealthCheck object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetRequestConfig + +`func (o *HealthCheck) GetRequestConfig() HealthCheckRequestConfig` + +GetRequestConfig returns the RequestConfig field if non-nil, zero value otherwise. + +### GetRequestConfigOk + +`func (o *HealthCheck) GetRequestConfigOk() (*HealthCheckRequestConfig, bool)` + +GetRequestConfigOk returns a tuple with the RequestConfig field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRequestConfig + +`func (o *HealthCheck) SetRequestConfig(v HealthCheckRequestConfig)` + +SetRequestConfig sets RequestConfig field to given value. + +### HasRequestConfig + +`func (o *HealthCheck) HasRequestConfig() bool` + +HasRequestConfig returns a boolean if a field has been set. + +### GetId + +`func (o *HealthCheck) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *HealthCheck) 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 *HealthCheck) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *HealthCheck) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetName + +`func (o *HealthCheck) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *HealthCheck) 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 *HealthCheck) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *HealthCheck) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetDescription + +`func (o *HealthCheck) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *HealthCheck) 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 *HealthCheck) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *HealthCheck) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetOrigin + +`func (o *HealthCheck) GetOrigin() string` + +GetOrigin returns the Origin field if non-nil, zero value otherwise. + +### GetOriginOk + +`func (o *HealthCheck) GetOriginOk() (*string, bool)` + +GetOriginOk returns a tuple with the Origin field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOrigin + +`func (o *HealthCheck) SetOrigin(v string)` + +SetOrigin sets Origin field to given value. + +### HasOrigin + +`func (o *HealthCheck) HasOrigin() bool` + +HasOrigin returns a boolean if a field has been set. + +### GetOriginType + +`func (o *HealthCheck) GetOriginType() string` + +GetOriginType returns the OriginType field if non-nil, zero value otherwise. + +### GetOriginTypeOk + +`func (o *HealthCheck) GetOriginTypeOk() (*string, bool)` + +GetOriginTypeOk returns a tuple with the OriginType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOriginType + +`func (o *HealthCheck) SetOriginType(v string)` + +SetOriginType sets OriginType field to given value. + +### HasOriginType + +`func (o *HealthCheck) HasOriginType() bool` + +HasOriginType returns a boolean if a field has been set. + +### GetUpstreams + +`func (o *HealthCheck) GetUpstreams() []string` + +GetUpstreams returns the Upstreams field if non-nil, zero value otherwise. + +### GetUpstreamsOk + +`func (o *HealthCheck) GetUpstreamsOk() (*[]string, bool)` + +GetUpstreamsOk returns a tuple with the Upstreams field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpstreams + +`func (o *HealthCheck) SetUpstreams(v []string)` + +SetUpstreams sets Upstreams field to given value. + +### HasUpstreams + +`func (o *HealthCheck) HasUpstreams() bool` + +HasUpstreams returns a boolean if a field has been set. + +### GetInterval + +`func (o *HealthCheck) GetInterval() int32` + +GetInterval returns the Interval field if non-nil, zero value otherwise. + +### GetIntervalOk + +`func (o *HealthCheck) GetIntervalOk() (*int32, bool)` + +GetIntervalOk returns a tuple with the Interval field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetInterval + +`func (o *HealthCheck) SetInterval(v int32)` + +SetInterval sets Interval field to given value. + +### HasInterval + +`func (o *HealthCheck) HasInterval() bool` + +HasInterval returns a boolean if a field has been set. + +### GetThreshold + +`func (o *HealthCheck) GetThreshold() int32` + +GetThreshold returns the Threshold field if non-nil, zero value otherwise. + +### GetThresholdOk + +`func (o *HealthCheck) GetThresholdOk() (*int32, bool)` + +GetThresholdOk returns a tuple with the Threshold field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetThreshold + +`func (o *HealthCheck) SetThreshold(v int32)` + +SetThreshold sets Threshold field to given value. + +### HasThreshold + +`func (o *HealthCheck) HasThreshold() bool` + +HasThreshold returns a boolean if a field has been set. + +### GetType + +`func (o *HealthCheck) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *HealthCheck) 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 *HealthCheck) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *HealthCheck) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetStatus + +`func (o *HealthCheck) GetStatus() bool` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *HealthCheck) GetStatusOk() (*bool, 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 *HealthCheck) SetStatus(v bool)` + +SetStatus sets Status field to given value. + +### HasStatus + +`func (o *HealthCheck) HasStatus() bool` + +HasStatus returns a boolean if a field has been set. + +### GetRetries + +`func (o *HealthCheck) GetRetries() int32` + +GetRetries returns the Retries field if non-nil, zero value otherwise. + +### GetRetriesOk + +`func (o *HealthCheck) GetRetriesOk() (*int32, bool)` + +GetRetriesOk returns a tuple with the Retries field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRetries + +`func (o *HealthCheck) SetRetries(v int32)` + +SetRetries sets Retries field to given value. + +### HasRetries + +`func (o *HealthCheck) HasRetries() bool` + +HasRetries returns a boolean if a field has been set. + +### GetZones + +`func (o *HealthCheck) GetZones() []HealthCheckZone` + +GetZones returns the Zones field if non-nil, zero value otherwise. + +### GetZonesOk + +`func (o *HealthCheck) GetZonesOk() (*[]HealthCheckZone, bool)` + +GetZonesOk returns a tuple with the Zones field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetZones + +`func (o *HealthCheck) SetZones(v []HealthCheckZone)` + +SetZones sets Zones field to given value. + +### HasZones + +`func (o *HealthCheck) HasZones() bool` + +HasZones returns a boolean if a field has been set. + +### GetMonitoringUpdatedAt + +`func (o *HealthCheck) GetMonitoringUpdatedAt() time.Time` + +GetMonitoringUpdatedAt returns the MonitoringUpdatedAt field if non-nil, zero value otherwise. + +### GetMonitoringUpdatedAtOk + +`func (o *HealthCheck) GetMonitoringUpdatedAtOk() (*time.Time, bool)` + +GetMonitoringUpdatedAtOk returns a tuple with the MonitoringUpdatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMonitoringUpdatedAt + +`func (o *HealthCheck) SetMonitoringUpdatedAt(v time.Time)` + +SetMonitoringUpdatedAt sets MonitoringUpdatedAt field to given value. + +### HasMonitoringUpdatedAt + +`func (o *HealthCheck) HasMonitoringUpdatedAt() bool` + +HasMonitoringUpdatedAt returns a boolean if a field has been set. + +### SetMonitoringUpdatedAtNil + +`func (o *HealthCheck) SetMonitoringUpdatedAtNil(b bool)` + + SetMonitoringUpdatedAtNil sets the value for MonitoringUpdatedAt to be an explicit nil + +### UnsetMonitoringUpdatedAt +`func (o *HealthCheck) UnsetMonitoringUpdatedAt()` + +UnsetMonitoringUpdatedAt ensures that no value is present for MonitoringUpdatedAt, not even an explicit nil + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/HealthCheckReportDetail.md b/docs/HealthCheckReportDetail.md new file mode 100644 index 0000000..1bc417c --- /dev/null +++ b/docs/HealthCheckReportDetail.md @@ -0,0 +1,160 @@ +# HealthCheckReportDetail + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Date** | Pointer to **string** | | [optional] +**Zone** | Pointer to **string** | | [optional] +**Upstream** | Pointer to **string** | | [optional] +**Status** | Pointer to **bool** | | [optional] +**Message** | Pointer to **string** | | [optional] + +## Methods + +### NewHealthCheckReportDetail + +`func NewHealthCheckReportDetail() *HealthCheckReportDetail` + +NewHealthCheckReportDetail instantiates a new HealthCheckReportDetail object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewHealthCheckReportDetailWithDefaults + +`func NewHealthCheckReportDetailWithDefaults() *HealthCheckReportDetail` + +NewHealthCheckReportDetailWithDefaults instantiates a new HealthCheckReportDetail object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetDate + +`func (o *HealthCheckReportDetail) GetDate() string` + +GetDate returns the Date field if non-nil, zero value otherwise. + +### GetDateOk + +`func (o *HealthCheckReportDetail) GetDateOk() (*string, bool)` + +GetDateOk returns a tuple with the Date field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDate + +`func (o *HealthCheckReportDetail) SetDate(v string)` + +SetDate sets Date field to given value. + +### HasDate + +`func (o *HealthCheckReportDetail) HasDate() bool` + +HasDate returns a boolean if a field has been set. + +### GetZone + +`func (o *HealthCheckReportDetail) GetZone() string` + +GetZone returns the Zone field if non-nil, zero value otherwise. + +### GetZoneOk + +`func (o *HealthCheckReportDetail) GetZoneOk() (*string, bool)` + +GetZoneOk returns a tuple with the Zone field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetZone + +`func (o *HealthCheckReportDetail) SetZone(v string)` + +SetZone sets Zone field to given value. + +### HasZone + +`func (o *HealthCheckReportDetail) HasZone() bool` + +HasZone returns a boolean if a field has been set. + +### GetUpstream + +`func (o *HealthCheckReportDetail) GetUpstream() string` + +GetUpstream returns the Upstream field if non-nil, zero value otherwise. + +### GetUpstreamOk + +`func (o *HealthCheckReportDetail) GetUpstreamOk() (*string, bool)` + +GetUpstreamOk returns a tuple with the Upstream field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpstream + +`func (o *HealthCheckReportDetail) SetUpstream(v string)` + +SetUpstream sets Upstream field to given value. + +### HasUpstream + +`func (o *HealthCheckReportDetail) HasUpstream() bool` + +HasUpstream returns a boolean if a field has been set. + +### GetStatus + +`func (o *HealthCheckReportDetail) GetStatus() bool` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *HealthCheckReportDetail) GetStatusOk() (*bool, 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 *HealthCheckReportDetail) SetStatus(v bool)` + +SetStatus sets Status field to given value. + +### HasStatus + +`func (o *HealthCheckReportDetail) HasStatus() bool` + +HasStatus returns a boolean if a field has been set. + +### GetMessage + +`func (o *HealthCheckReportDetail) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *HealthCheckReportDetail) GetMessageOk() (*string, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessage + +`func (o *HealthCheckReportDetail) SetMessage(v string)` + +SetMessage sets Message field to given value. + +### HasMessage + +`func (o *HealthCheckReportDetail) HasMessage() bool` + +HasMessage returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/HealthCheckReportSummary.md b/docs/HealthCheckReportSummary.md new file mode 100644 index 0000000..f60597f --- /dev/null +++ b/docs/HealthCheckReportSummary.md @@ -0,0 +1,160 @@ +# HealthCheckReportSummary + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Zone** | Pointer to **string** | | [optional] +**Status** | Pointer to **bool** | | [optional] +**Total** | Pointer to **int32** | | [optional] +**Failed** | Pointer to **int32** | | [optional] +**Details** | Pointer to [**[]HealthCheckReportSummaryDetail**](HealthCheckReportSummaryDetail.md) | | [optional] + +## Methods + +### NewHealthCheckReportSummary + +`func NewHealthCheckReportSummary() *HealthCheckReportSummary` + +NewHealthCheckReportSummary instantiates a new HealthCheckReportSummary object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewHealthCheckReportSummaryWithDefaults + +`func NewHealthCheckReportSummaryWithDefaults() *HealthCheckReportSummary` + +NewHealthCheckReportSummaryWithDefaults instantiates a new HealthCheckReportSummary object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetZone + +`func (o *HealthCheckReportSummary) GetZone() string` + +GetZone returns the Zone field if non-nil, zero value otherwise. + +### GetZoneOk + +`func (o *HealthCheckReportSummary) GetZoneOk() (*string, bool)` + +GetZoneOk returns a tuple with the Zone field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetZone + +`func (o *HealthCheckReportSummary) SetZone(v string)` + +SetZone sets Zone field to given value. + +### HasZone + +`func (o *HealthCheckReportSummary) HasZone() bool` + +HasZone returns a boolean if a field has been set. + +### GetStatus + +`func (o *HealthCheckReportSummary) GetStatus() bool` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *HealthCheckReportSummary) GetStatusOk() (*bool, 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 *HealthCheckReportSummary) SetStatus(v bool)` + +SetStatus sets Status field to given value. + +### HasStatus + +`func (o *HealthCheckReportSummary) HasStatus() bool` + +HasStatus returns a boolean if a field has been set. + +### GetTotal + +`func (o *HealthCheckReportSummary) GetTotal() int32` + +GetTotal returns the Total field if non-nil, zero value otherwise. + +### GetTotalOk + +`func (o *HealthCheckReportSummary) 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 *HealthCheckReportSummary) SetTotal(v int32)` + +SetTotal sets Total field to given value. + +### HasTotal + +`func (o *HealthCheckReportSummary) HasTotal() bool` + +HasTotal returns a boolean if a field has been set. + +### GetFailed + +`func (o *HealthCheckReportSummary) GetFailed() int32` + +GetFailed returns the Failed field if non-nil, zero value otherwise. + +### GetFailedOk + +`func (o *HealthCheckReportSummary) GetFailedOk() (*int32, 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 *HealthCheckReportSummary) SetFailed(v int32)` + +SetFailed sets Failed field to given value. + +### HasFailed + +`func (o *HealthCheckReportSummary) HasFailed() bool` + +HasFailed returns a boolean if a field has been set. + +### GetDetails + +`func (o *HealthCheckReportSummary) GetDetails() []HealthCheckReportSummaryDetail` + +GetDetails returns the Details field if non-nil, zero value otherwise. + +### GetDetailsOk + +`func (o *HealthCheckReportSummary) GetDetailsOk() (*[]HealthCheckReportSummaryDetail, bool)` + +GetDetailsOk returns a tuple with the Details field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDetails + +`func (o *HealthCheckReportSummary) SetDetails(v []HealthCheckReportSummaryDetail)` + +SetDetails sets Details field to given value. + +### HasDetails + +`func (o *HealthCheckReportSummary) HasDetails() bool` + +HasDetails returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/HealthCheckReportSummaryDetail.md b/docs/HealthCheckReportSummaryDetail.md new file mode 100644 index 0000000..a134030 --- /dev/null +++ b/docs/HealthCheckReportSummaryDetail.md @@ -0,0 +1,82 @@ +# HealthCheckReportSummaryDetail + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Date** | Pointer to **string** | | [optional] +**Status** | Pointer to **bool** | | [optional] + +## Methods + +### NewHealthCheckReportSummaryDetail + +`func NewHealthCheckReportSummaryDetail() *HealthCheckReportSummaryDetail` + +NewHealthCheckReportSummaryDetail instantiates a new HealthCheckReportSummaryDetail object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewHealthCheckReportSummaryDetailWithDefaults + +`func NewHealthCheckReportSummaryDetailWithDefaults() *HealthCheckReportSummaryDetail` + +NewHealthCheckReportSummaryDetailWithDefaults instantiates a new HealthCheckReportSummaryDetail object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetDate + +`func (o *HealthCheckReportSummaryDetail) GetDate() string` + +GetDate returns the Date field if non-nil, zero value otherwise. + +### GetDateOk + +`func (o *HealthCheckReportSummaryDetail) GetDateOk() (*string, bool)` + +GetDateOk returns a tuple with the Date field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDate + +`func (o *HealthCheckReportSummaryDetail) SetDate(v string)` + +SetDate sets Date field to given value. + +### HasDate + +`func (o *HealthCheckReportSummaryDetail) HasDate() bool` + +HasDate returns a boolean if a field has been set. + +### GetStatus + +`func (o *HealthCheckReportSummaryDetail) GetStatus() bool` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *HealthCheckReportSummaryDetail) GetStatusOk() (*bool, 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 *HealthCheckReportSummaryDetail) SetStatus(v bool)` + +SetStatus sets Status field to given value. + +### HasStatus + +`func (o *HealthCheckReportSummaryDetail) HasStatus() bool` + +HasStatus returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/HealthCheckRequestConfig.md b/docs/HealthCheckRequestConfig.md new file mode 100644 index 0000000..2eab61d --- /dev/null +++ b/docs/HealthCheckRequestConfig.md @@ -0,0 +1,203 @@ +# HealthCheckRequestConfig + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Method** | **string** | | +**Port** | **int32** | | +**Path** | **string** | path for test | +**AllowInsecure** | **bool** | | +**ExpectedResponse** | [**ExpectedResponse**](ExpectedResponse.md) | | +**Headers** | **map[string]string** | | +**FollowRedirects** | Pointer to **bool** | | [optional] [readonly] +**Timeout** | **int32** | In milliseconds | + +## Methods + +### NewHealthCheckRequestConfig + +`func NewHealthCheckRequestConfig(method string, port int32, path string, allowInsecure bool, expectedResponse ExpectedResponse, headers map[string]string, timeout int32, ) *HealthCheckRequestConfig` + +NewHealthCheckRequestConfig instantiates a new HealthCheckRequestConfig object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewHealthCheckRequestConfigWithDefaults + +`func NewHealthCheckRequestConfigWithDefaults() *HealthCheckRequestConfig` + +NewHealthCheckRequestConfigWithDefaults instantiates a new HealthCheckRequestConfig object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetMethod + +`func (o *HealthCheckRequestConfig) GetMethod() string` + +GetMethod returns the Method field if non-nil, zero value otherwise. + +### GetMethodOk + +`func (o *HealthCheckRequestConfig) GetMethodOk() (*string, bool)` + +GetMethodOk returns a tuple with the Method field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMethod + +`func (o *HealthCheckRequestConfig) SetMethod(v string)` + +SetMethod sets Method field to given value. + + +### GetPort + +`func (o *HealthCheckRequestConfig) GetPort() int32` + +GetPort returns the Port field if non-nil, zero value otherwise. + +### GetPortOk + +`func (o *HealthCheckRequestConfig) GetPortOk() (*int32, bool)` + +GetPortOk returns a tuple with the Port field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPort + +`func (o *HealthCheckRequestConfig) SetPort(v int32)` + +SetPort sets Port field to given value. + + +### GetPath + +`func (o *HealthCheckRequestConfig) GetPath() string` + +GetPath returns the Path field if non-nil, zero value otherwise. + +### GetPathOk + +`func (o *HealthCheckRequestConfig) GetPathOk() (*string, bool)` + +GetPathOk returns a tuple with the Path field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPath + +`func (o *HealthCheckRequestConfig) SetPath(v string)` + +SetPath sets Path field to given value. + + +### GetAllowInsecure + +`func (o *HealthCheckRequestConfig) GetAllowInsecure() bool` + +GetAllowInsecure returns the AllowInsecure field if non-nil, zero value otherwise. + +### GetAllowInsecureOk + +`func (o *HealthCheckRequestConfig) GetAllowInsecureOk() (*bool, bool)` + +GetAllowInsecureOk returns a tuple with the AllowInsecure field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAllowInsecure + +`func (o *HealthCheckRequestConfig) SetAllowInsecure(v bool)` + +SetAllowInsecure sets AllowInsecure field to given value. + + +### GetExpectedResponse + +`func (o *HealthCheckRequestConfig) GetExpectedResponse() ExpectedResponse` + +GetExpectedResponse returns the ExpectedResponse field if non-nil, zero value otherwise. + +### GetExpectedResponseOk + +`func (o *HealthCheckRequestConfig) GetExpectedResponseOk() (*ExpectedResponse, bool)` + +GetExpectedResponseOk returns a tuple with the ExpectedResponse field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExpectedResponse + +`func (o *HealthCheckRequestConfig) SetExpectedResponse(v ExpectedResponse)` + +SetExpectedResponse sets ExpectedResponse field to given value. + + +### GetHeaders + +`func (o *HealthCheckRequestConfig) GetHeaders() map[string]string` + +GetHeaders returns the Headers field if non-nil, zero value otherwise. + +### GetHeadersOk + +`func (o *HealthCheckRequestConfig) GetHeadersOk() (*map[string]string, bool)` + +GetHeadersOk returns a tuple with the Headers field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHeaders + +`func (o *HealthCheckRequestConfig) SetHeaders(v map[string]string)` + +SetHeaders sets Headers field to given value. + + +### GetFollowRedirects + +`func (o *HealthCheckRequestConfig) GetFollowRedirects() bool` + +GetFollowRedirects returns the FollowRedirects field if non-nil, zero value otherwise. + +### GetFollowRedirectsOk + +`func (o *HealthCheckRequestConfig) GetFollowRedirectsOk() (*bool, bool)` + +GetFollowRedirectsOk returns a tuple with the FollowRedirects field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFollowRedirects + +`func (o *HealthCheckRequestConfig) SetFollowRedirects(v bool)` + +SetFollowRedirects sets FollowRedirects field to given value. + +### HasFollowRedirects + +`func (o *HealthCheckRequestConfig) HasFollowRedirects() bool` + +HasFollowRedirects returns a boolean if a field has been set. + +### GetTimeout + +`func (o *HealthCheckRequestConfig) GetTimeout() int32` + +GetTimeout returns the Timeout field if non-nil, zero value otherwise. + +### GetTimeoutOk + +`func (o *HealthCheckRequestConfig) GetTimeoutOk() (*int32, bool)` + +GetTimeoutOk returns a tuple with the Timeout field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTimeout + +`func (o *HealthCheckRequestConfig) SetTimeout(v int32)` + +SetTimeout sets Timeout field to given value. + + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/HealthCheckResponse.md b/docs/HealthCheckResponse.md new file mode 100644 index 0000000..4dc35b1 --- /dev/null +++ b/docs/HealthCheckResponse.md @@ -0,0 +1,92 @@ +# HealthCheckResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**HealthCheckView**](HealthCheckView.md) | | [optional] +**Message** | Pointer to **NullableString** | | [optional] + +## Methods + +### NewHealthCheckResponse + +`func NewHealthCheckResponse() *HealthCheckResponse` + +NewHealthCheckResponse instantiates a new HealthCheckResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewHealthCheckResponseWithDefaults + +`func NewHealthCheckResponseWithDefaults() *HealthCheckResponse` + +NewHealthCheckResponseWithDefaults instantiates a new HealthCheckResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *HealthCheckResponse) GetData() HealthCheckView` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *HealthCheckResponse) GetDataOk() (*HealthCheckView, 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 *HealthCheckResponse) SetData(v HealthCheckView)` + +SetData sets Data field to given value. + +### HasData + +`func (o *HealthCheckResponse) HasData() bool` + +HasData returns a boolean if a field has been set. + +### GetMessage + +`func (o *HealthCheckResponse) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *HealthCheckResponse) GetMessageOk() (*string, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessage + +`func (o *HealthCheckResponse) SetMessage(v string)` + +SetMessage sets Message field to given value. + +### HasMessage + +`func (o *HealthCheckResponse) HasMessage() bool` + +HasMessage returns a boolean if a field has been set. + +### SetMessageNil + +`func (o *HealthCheckResponse) SetMessageNil(b bool)` + + SetMessageNil sets the value for Message to be an explicit nil + +### UnsetMessage +`func (o *HealthCheckResponse) UnsetMessage()` + +UnsetMessage ensures that no value is present for Message, not even an explicit nil + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/HealthCheckView.md b/docs/HealthCheckView.md new file mode 100644 index 0000000..e198a3c --- /dev/null +++ b/docs/HealthCheckView.md @@ -0,0 +1,404 @@ +# HealthCheckView + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**RequestConfig** | Pointer to **map[string]interface{}** | | [optional] +**Id** | Pointer to **string** | | [optional] [readonly] +**Name** | Pointer to **string** | | [optional] +**Description** | Pointer to **string** | | [optional] +**Origin** | Pointer to **string** | can be IP/Host when type is `upstream`, otherwise it must be a valid record ID | [optional] +**OriginType** | Pointer to **string** | | [optional] +**Upstreams** | Pointer to **[]string** | | [optional] +**Interval** | Pointer to **int32** | In milliseconds | [optional] +**Threshold** | Pointer to **int32** | | [optional] +**Type** | Pointer to **string** | | [optional] +**Status** | Pointer to **bool** | The health-check is off or on | [optional] [default to true] +**Retries** | Pointer to **int32** | Number of immediate retries in case of a timeout | [optional] +**Zones** | Pointer to [**[]HealthCheckZone**](HealthCheckZone.md) | | [optional] +**MonitoringUpdatedAt** | Pointer to **NullableTime** | | [optional] + +## Methods + +### NewHealthCheckView + +`func NewHealthCheckView() *HealthCheckView` + +NewHealthCheckView instantiates a new HealthCheckView object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewHealthCheckViewWithDefaults + +`func NewHealthCheckViewWithDefaults() *HealthCheckView` + +NewHealthCheckViewWithDefaults instantiates a new HealthCheckView object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetRequestConfig + +`func (o *HealthCheckView) GetRequestConfig() map[string]interface{}` + +GetRequestConfig returns the RequestConfig field if non-nil, zero value otherwise. + +### GetRequestConfigOk + +`func (o *HealthCheckView) GetRequestConfigOk() (*map[string]interface{}, bool)` + +GetRequestConfigOk returns a tuple with the RequestConfig field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRequestConfig + +`func (o *HealthCheckView) SetRequestConfig(v map[string]interface{})` + +SetRequestConfig sets RequestConfig field to given value. + +### HasRequestConfig + +`func (o *HealthCheckView) HasRequestConfig() bool` + +HasRequestConfig returns a boolean if a field has been set. + +### GetId + +`func (o *HealthCheckView) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *HealthCheckView) 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 *HealthCheckView) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *HealthCheckView) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetName + +`func (o *HealthCheckView) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *HealthCheckView) 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 *HealthCheckView) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *HealthCheckView) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetDescription + +`func (o *HealthCheckView) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *HealthCheckView) 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 *HealthCheckView) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *HealthCheckView) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetOrigin + +`func (o *HealthCheckView) GetOrigin() string` + +GetOrigin returns the Origin field if non-nil, zero value otherwise. + +### GetOriginOk + +`func (o *HealthCheckView) GetOriginOk() (*string, bool)` + +GetOriginOk returns a tuple with the Origin field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOrigin + +`func (o *HealthCheckView) SetOrigin(v string)` + +SetOrigin sets Origin field to given value. + +### HasOrigin + +`func (o *HealthCheckView) HasOrigin() bool` + +HasOrigin returns a boolean if a field has been set. + +### GetOriginType + +`func (o *HealthCheckView) GetOriginType() string` + +GetOriginType returns the OriginType field if non-nil, zero value otherwise. + +### GetOriginTypeOk + +`func (o *HealthCheckView) GetOriginTypeOk() (*string, bool)` + +GetOriginTypeOk returns a tuple with the OriginType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOriginType + +`func (o *HealthCheckView) SetOriginType(v string)` + +SetOriginType sets OriginType field to given value. + +### HasOriginType + +`func (o *HealthCheckView) HasOriginType() bool` + +HasOriginType returns a boolean if a field has been set. + +### GetUpstreams + +`func (o *HealthCheckView) GetUpstreams() []string` + +GetUpstreams returns the Upstreams field if non-nil, zero value otherwise. + +### GetUpstreamsOk + +`func (o *HealthCheckView) GetUpstreamsOk() (*[]string, bool)` + +GetUpstreamsOk returns a tuple with the Upstreams field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpstreams + +`func (o *HealthCheckView) SetUpstreams(v []string)` + +SetUpstreams sets Upstreams field to given value. + +### HasUpstreams + +`func (o *HealthCheckView) HasUpstreams() bool` + +HasUpstreams returns a boolean if a field has been set. + +### GetInterval + +`func (o *HealthCheckView) GetInterval() int32` + +GetInterval returns the Interval field if non-nil, zero value otherwise. + +### GetIntervalOk + +`func (o *HealthCheckView) GetIntervalOk() (*int32, bool)` + +GetIntervalOk returns a tuple with the Interval field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetInterval + +`func (o *HealthCheckView) SetInterval(v int32)` + +SetInterval sets Interval field to given value. + +### HasInterval + +`func (o *HealthCheckView) HasInterval() bool` + +HasInterval returns a boolean if a field has been set. + +### GetThreshold + +`func (o *HealthCheckView) GetThreshold() int32` + +GetThreshold returns the Threshold field if non-nil, zero value otherwise. + +### GetThresholdOk + +`func (o *HealthCheckView) GetThresholdOk() (*int32, bool)` + +GetThresholdOk returns a tuple with the Threshold field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetThreshold + +`func (o *HealthCheckView) SetThreshold(v int32)` + +SetThreshold sets Threshold field to given value. + +### HasThreshold + +`func (o *HealthCheckView) HasThreshold() bool` + +HasThreshold returns a boolean if a field has been set. + +### GetType + +`func (o *HealthCheckView) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *HealthCheckView) 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 *HealthCheckView) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *HealthCheckView) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetStatus + +`func (o *HealthCheckView) GetStatus() bool` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *HealthCheckView) GetStatusOk() (*bool, 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 *HealthCheckView) SetStatus(v bool)` + +SetStatus sets Status field to given value. + +### HasStatus + +`func (o *HealthCheckView) HasStatus() bool` + +HasStatus returns a boolean if a field has been set. + +### GetRetries + +`func (o *HealthCheckView) GetRetries() int32` + +GetRetries returns the Retries field if non-nil, zero value otherwise. + +### GetRetriesOk + +`func (o *HealthCheckView) GetRetriesOk() (*int32, bool)` + +GetRetriesOk returns a tuple with the Retries field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRetries + +`func (o *HealthCheckView) SetRetries(v int32)` + +SetRetries sets Retries field to given value. + +### HasRetries + +`func (o *HealthCheckView) HasRetries() bool` + +HasRetries returns a boolean if a field has been set. + +### GetZones + +`func (o *HealthCheckView) GetZones() []HealthCheckZone` + +GetZones returns the Zones field if non-nil, zero value otherwise. + +### GetZonesOk + +`func (o *HealthCheckView) GetZonesOk() (*[]HealthCheckZone, bool)` + +GetZonesOk returns a tuple with the Zones field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetZones + +`func (o *HealthCheckView) SetZones(v []HealthCheckZone)` + +SetZones sets Zones field to given value. + +### HasZones + +`func (o *HealthCheckView) HasZones() bool` + +HasZones returns a boolean if a field has been set. + +### GetMonitoringUpdatedAt + +`func (o *HealthCheckView) GetMonitoringUpdatedAt() time.Time` + +GetMonitoringUpdatedAt returns the MonitoringUpdatedAt field if non-nil, zero value otherwise. + +### GetMonitoringUpdatedAtOk + +`func (o *HealthCheckView) GetMonitoringUpdatedAtOk() (*time.Time, bool)` + +GetMonitoringUpdatedAtOk returns a tuple with the MonitoringUpdatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMonitoringUpdatedAt + +`func (o *HealthCheckView) SetMonitoringUpdatedAt(v time.Time)` + +SetMonitoringUpdatedAt sets MonitoringUpdatedAt field to given value. + +### HasMonitoringUpdatedAt + +`func (o *HealthCheckView) HasMonitoringUpdatedAt() bool` + +HasMonitoringUpdatedAt returns a boolean if a field has been set. + +### SetMonitoringUpdatedAtNil + +`func (o *HealthCheckView) SetMonitoringUpdatedAtNil(b bool)` + + SetMonitoringUpdatedAtNil sets the value for MonitoringUpdatedAt to be an explicit nil + +### UnsetMonitoringUpdatedAt +`func (o *HealthCheckView) UnsetMonitoringUpdatedAt()` + +UnsetMonitoringUpdatedAt ensures that no value is present for MonitoringUpdatedAt, not even an explicit nil + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/HealthCheckZone.md b/docs/HealthCheckZone.md new file mode 100644 index 0000000..2a72230 --- /dev/null +++ b/docs/HealthCheckZone.md @@ -0,0 +1,82 @@ +# HealthCheckZone + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **string** | | [optional] +**MonitoringLevel** | Pointer to **string** | | [optional] + +## Methods + +### NewHealthCheckZone + +`func NewHealthCheckZone() *HealthCheckZone` + +NewHealthCheckZone instantiates a new HealthCheckZone object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewHealthCheckZoneWithDefaults + +`func NewHealthCheckZoneWithDefaults() *HealthCheckZone` + +NewHealthCheckZoneWithDefaults instantiates a new HealthCheckZone object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *HealthCheckZone) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *HealthCheckZone) 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 *HealthCheckZone) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *HealthCheckZone) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetMonitoringLevel + +`func (o *HealthCheckZone) GetMonitoringLevel() string` + +GetMonitoringLevel returns the MonitoringLevel field if non-nil, zero value otherwise. + +### GetMonitoringLevelOk + +`func (o *HealthCheckZone) GetMonitoringLevelOk() (*string, bool)` + +GetMonitoringLevelOk returns a tuple with the MonitoringLevel field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMonitoringLevel + +`func (o *HealthCheckZone) SetMonitoringLevel(v string)` + +SetMonitoringLevel sets MonitoringLevel field to given value. + +### HasMonitoringLevel + +`func (o *HealthCheckZone) HasMonitoringLevel() bool` + +HasMonitoringLevel returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/HealthCheckZoneName.md b/docs/HealthCheckZoneName.md new file mode 100644 index 0000000..1dfb498 --- /dev/null +++ b/docs/HealthCheckZoneName.md @@ -0,0 +1,82 @@ +# HealthCheckZoneName + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **string** | | [optional] +**Name** | Pointer to **string** | | [optional] + +## Methods + +### NewHealthCheckZoneName + +`func NewHealthCheckZoneName() *HealthCheckZoneName` + +NewHealthCheckZoneName instantiates a new HealthCheckZoneName object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewHealthCheckZoneNameWithDefaults + +`func NewHealthCheckZoneNameWithDefaults() *HealthCheckZoneName` + +NewHealthCheckZoneNameWithDefaults instantiates a new HealthCheckZoneName object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *HealthCheckZoneName) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *HealthCheckZoneName) 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 *HealthCheckZoneName) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *HealthCheckZoneName) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetName + +`func (o *HealthCheckZoneName) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *HealthCheckZoneName) 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 *HealthCheckZoneName) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *HealthCheckZoneName) HasName() bool` + +HasName returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/HealthChecksZonesIndex200Response.md b/docs/HealthChecksZonesIndex200Response.md new file mode 100644 index 0000000..d5f0a78 --- /dev/null +++ b/docs/HealthChecksZonesIndex200Response.md @@ -0,0 +1,92 @@ +# HealthChecksZonesIndex200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**[]HealthCheckZoneName**](HealthCheckZoneName.md) | | [optional] +**Message** | Pointer to **NullableString** | | [optional] + +## Methods + +### NewHealthChecksZonesIndex200Response + +`func NewHealthChecksZonesIndex200Response() *HealthChecksZonesIndex200Response` + +NewHealthChecksZonesIndex200Response instantiates a new HealthChecksZonesIndex200Response object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewHealthChecksZonesIndex200ResponseWithDefaults + +`func NewHealthChecksZonesIndex200ResponseWithDefaults() *HealthChecksZonesIndex200Response` + +NewHealthChecksZonesIndex200ResponseWithDefaults instantiates a new HealthChecksZonesIndex200Response object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *HealthChecksZonesIndex200Response) GetData() []HealthCheckZoneName` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *HealthChecksZonesIndex200Response) GetDataOk() (*[]HealthCheckZoneName, 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 *HealthChecksZonesIndex200Response) SetData(v []HealthCheckZoneName)` + +SetData sets Data field to given value. + +### HasData + +`func (o *HealthChecksZonesIndex200Response) HasData() bool` + +HasData returns a boolean if a field has been set. + +### GetMessage + +`func (o *HealthChecksZonesIndex200Response) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *HealthChecksZonesIndex200Response) GetMessageOk() (*string, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessage + +`func (o *HealthChecksZonesIndex200Response) SetMessage(v string)` + +SetMessage sets Message field to given value. + +### HasMessage + +`func (o *HealthChecksZonesIndex200Response) HasMessage() bool` + +HasMessage returns a boolean if a field has been set. + +### SetMessageNil + +`func (o *HealthChecksZonesIndex200Response) SetMessageNil(b bool)` + + SetMessageNil sets the value for Message to be an explicit nil + +### UnsetMessage +`func (o *HealthChecksZonesIndex200Response) UnsetMessage()` + +UnsetMessage ensures that no value is present for Message, not even an explicit nil + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/HighRequestedIp.md b/docs/HighRequestedIp.md new file mode 100644 index 0000000..6136203 --- /dev/null +++ b/docs/HighRequestedIp.md @@ -0,0 +1,82 @@ +# HighRequestedIp + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Ip** | Pointer to [**HighRequestedIpIp**](HighRequestedIpIp.md) | | [optional] +**RequestCount** | Pointer to **int32** | | [optional] + +## Methods + +### NewHighRequestedIp + +`func NewHighRequestedIp() *HighRequestedIp` + +NewHighRequestedIp instantiates a new HighRequestedIp object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewHighRequestedIpWithDefaults + +`func NewHighRequestedIpWithDefaults() *HighRequestedIp` + +NewHighRequestedIpWithDefaults instantiates a new HighRequestedIp object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetIp + +`func (o *HighRequestedIp) GetIp() HighRequestedIpIp` + +GetIp returns the Ip field if non-nil, zero value otherwise. + +### GetIpOk + +`func (o *HighRequestedIp) GetIpOk() (*HighRequestedIpIp, bool)` + +GetIpOk returns a tuple with the Ip field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIp + +`func (o *HighRequestedIp) SetIp(v HighRequestedIpIp)` + +SetIp sets Ip field to given value. + +### HasIp + +`func (o *HighRequestedIp) HasIp() bool` + +HasIp returns a boolean if a field has been set. + +### GetRequestCount + +`func (o *HighRequestedIp) GetRequestCount() int32` + +GetRequestCount returns the RequestCount field if non-nil, zero value otherwise. + +### GetRequestCountOk + +`func (o *HighRequestedIp) GetRequestCountOk() (*int32, bool)` + +GetRequestCountOk returns a tuple with the RequestCount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRequestCount + +`func (o *HighRequestedIp) SetRequestCount(v int32)` + +SetRequestCount sets RequestCount field to given value. + +### HasRequestCount + +`func (o *HighRequestedIp) HasRequestCount() bool` + +HasRequestCount returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/HighRequestedIpIp.md b/docs/HighRequestedIpIp.md new file mode 100644 index 0000000..8b17a8f --- /dev/null +++ b/docs/HighRequestedIpIp.md @@ -0,0 +1,30 @@ +# HighRequestedIpIp + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Methods + +### NewHighRequestedIpIp + +`func NewHighRequestedIpIp() *HighRequestedIpIp` + +NewHighRequestedIpIp instantiates a new HighRequestedIpIp object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewHighRequestedIpIpWithDefaults + +`func NewHighRequestedIpIpWithDefaults() *HighRequestedIpIp` + +NewHighRequestedIpIpWithDefaults instantiates a new HighRequestedIpIp object +This 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]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/HttpConfig.md b/docs/HttpConfig.md new file mode 100644 index 0000000..39ad576 --- /dev/null +++ b/docs/HttpConfig.md @@ -0,0 +1,203 @@ +# HttpConfig + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Method** | **string** | | +**Port** | **int32** | | +**Path** | **string** | path for test | +**AllowInsecure** | **bool** | | +**ExpectedResponse** | [**ExpectedResponse**](ExpectedResponse.md) | | +**Headers** | **map[string]string** | | +**FollowRedirects** | Pointer to **bool** | | [optional] [readonly] +**Timeout** | **int32** | In milliseconds | + +## Methods + +### NewHttpConfig + +`func NewHttpConfig(method string, port int32, path string, allowInsecure bool, expectedResponse ExpectedResponse, headers map[string]string, timeout int32, ) *HttpConfig` + +NewHttpConfig instantiates a new HttpConfig object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewHttpConfigWithDefaults + +`func NewHttpConfigWithDefaults() *HttpConfig` + +NewHttpConfigWithDefaults instantiates a new HttpConfig object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetMethod + +`func (o *HttpConfig) GetMethod() string` + +GetMethod returns the Method field if non-nil, zero value otherwise. + +### GetMethodOk + +`func (o *HttpConfig) GetMethodOk() (*string, bool)` + +GetMethodOk returns a tuple with the Method field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMethod + +`func (o *HttpConfig) SetMethod(v string)` + +SetMethod sets Method field to given value. + + +### GetPort + +`func (o *HttpConfig) GetPort() int32` + +GetPort returns the Port field if non-nil, zero value otherwise. + +### GetPortOk + +`func (o *HttpConfig) GetPortOk() (*int32, bool)` + +GetPortOk returns a tuple with the Port field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPort + +`func (o *HttpConfig) SetPort(v int32)` + +SetPort sets Port field to given value. + + +### GetPath + +`func (o *HttpConfig) GetPath() string` + +GetPath returns the Path field if non-nil, zero value otherwise. + +### GetPathOk + +`func (o *HttpConfig) GetPathOk() (*string, bool)` + +GetPathOk returns a tuple with the Path field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPath + +`func (o *HttpConfig) SetPath(v string)` + +SetPath sets Path field to given value. + + +### GetAllowInsecure + +`func (o *HttpConfig) GetAllowInsecure() bool` + +GetAllowInsecure returns the AllowInsecure field if non-nil, zero value otherwise. + +### GetAllowInsecureOk + +`func (o *HttpConfig) GetAllowInsecureOk() (*bool, bool)` + +GetAllowInsecureOk returns a tuple with the AllowInsecure field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAllowInsecure + +`func (o *HttpConfig) SetAllowInsecure(v bool)` + +SetAllowInsecure sets AllowInsecure field to given value. + + +### GetExpectedResponse + +`func (o *HttpConfig) GetExpectedResponse() ExpectedResponse` + +GetExpectedResponse returns the ExpectedResponse field if non-nil, zero value otherwise. + +### GetExpectedResponseOk + +`func (o *HttpConfig) GetExpectedResponseOk() (*ExpectedResponse, bool)` + +GetExpectedResponseOk returns a tuple with the ExpectedResponse field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExpectedResponse + +`func (o *HttpConfig) SetExpectedResponse(v ExpectedResponse)` + +SetExpectedResponse sets ExpectedResponse field to given value. + + +### GetHeaders + +`func (o *HttpConfig) GetHeaders() map[string]string` + +GetHeaders returns the Headers field if non-nil, zero value otherwise. + +### GetHeadersOk + +`func (o *HttpConfig) GetHeadersOk() (*map[string]string, bool)` + +GetHeadersOk returns a tuple with the Headers field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHeaders + +`func (o *HttpConfig) SetHeaders(v map[string]string)` + +SetHeaders sets Headers field to given value. + + +### GetFollowRedirects + +`func (o *HttpConfig) GetFollowRedirects() bool` + +GetFollowRedirects returns the FollowRedirects field if non-nil, zero value otherwise. + +### GetFollowRedirectsOk + +`func (o *HttpConfig) GetFollowRedirectsOk() (*bool, bool)` + +GetFollowRedirectsOk returns a tuple with the FollowRedirects field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFollowRedirects + +`func (o *HttpConfig) SetFollowRedirects(v bool)` + +SetFollowRedirects sets FollowRedirects field to given value. + +### HasFollowRedirects + +`func (o *HttpConfig) HasFollowRedirects() bool` + +HasFollowRedirects returns a boolean if a field has been set. + +### GetTimeout + +`func (o *HttpConfig) GetTimeout() int32` + +GetTimeout returns the Timeout field if non-nil, zero value otherwise. + +### GetTimeoutOk + +`func (o *HttpConfig) GetTimeoutOk() (*int32, bool)` + +GetTimeoutOk returns a tuple with the Timeout field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTimeout + +`func (o *HttpConfig) SetTimeout(v int32)` + +SetTimeout sets Timeout field to given value. + + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/ImageResize.md b/docs/ImageResize.md new file mode 100644 index 0000000..ea696f9 --- /dev/null +++ b/docs/ImageResize.md @@ -0,0 +1,108 @@ +# ImageResize + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Status** | Pointer to **string** | | [optional] [default to "off"] +**HeightBy** | Pointer to **string** | | [optional] [default to "height"] +**WidthBy** | Pointer to **string** | | [optional] [default to "width"] + +## Methods + +### NewImageResize + +`func NewImageResize() *ImageResize` + +NewImageResize instantiates a new ImageResize object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewImageResizeWithDefaults + +`func NewImageResizeWithDefaults() *ImageResize` + +NewImageResizeWithDefaults instantiates a new ImageResize object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetStatus + +`func (o *ImageResize) GetStatus() string` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *ImageResize) GetStatusOk() (*string, 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 *ImageResize) SetStatus(v string)` + +SetStatus sets Status field to given value. + +### HasStatus + +`func (o *ImageResize) HasStatus() bool` + +HasStatus returns a boolean if a field has been set. + +### GetHeightBy + +`func (o *ImageResize) GetHeightBy() string` + +GetHeightBy returns the HeightBy field if non-nil, zero value otherwise. + +### GetHeightByOk + +`func (o *ImageResize) GetHeightByOk() (*string, bool)` + +GetHeightByOk returns a tuple with the HeightBy field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHeightBy + +`func (o *ImageResize) SetHeightBy(v string)` + +SetHeightBy sets HeightBy field to given value. + +### HasHeightBy + +`func (o *ImageResize) HasHeightBy() bool` + +HasHeightBy returns a boolean if a field has been set. + +### GetWidthBy + +`func (o *ImageResize) GetWidthBy() string` + +GetWidthBy returns the WidthBy field if non-nil, zero value otherwise. + +### GetWidthByOk + +`func (o *ImageResize) GetWidthByOk() (*string, bool)` + +GetWidthByOk returns a tuple with the WidthBy field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetWidthBy + +`func (o *ImageResize) SetWidthBy(v string)` + +SetWidthBy sets WidthBy field to given value. + +### HasWidthBy + +`func (o *ImageResize) HasWidthBy() bool` + +HasWidthBy returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/ImageResizeResponse.md b/docs/ImageResizeResponse.md new file mode 100644 index 0000000..2b8f57b --- /dev/null +++ b/docs/ImageResizeResponse.md @@ -0,0 +1,92 @@ +# ImageResizeResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**ImageResize**](ImageResize.md) | | [optional] +**Message** | Pointer to **NullableString** | | [optional] + +## Methods + +### NewImageResizeResponse + +`func NewImageResizeResponse() *ImageResizeResponse` + +NewImageResizeResponse instantiates a new ImageResizeResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewImageResizeResponseWithDefaults + +`func NewImageResizeResponseWithDefaults() *ImageResizeResponse` + +NewImageResizeResponseWithDefaults instantiates a new ImageResizeResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *ImageResizeResponse) GetData() ImageResize` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ImageResizeResponse) GetDataOk() (*ImageResize, 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 *ImageResizeResponse) SetData(v ImageResize)` + +SetData sets Data field to given value. + +### HasData + +`func (o *ImageResizeResponse) HasData() bool` + +HasData returns a boolean if a field has been set. + +### GetMessage + +`func (o *ImageResizeResponse) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *ImageResizeResponse) GetMessageOk() (*string, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessage + +`func (o *ImageResizeResponse) SetMessage(v string)` + +SetMessage sets Message field to given value. + +### HasMessage + +`func (o *ImageResizeResponse) HasMessage() bool` + +HasMessage returns a boolean if a field has been set. + +### SetMessageNil + +`func (o *ImageResizeResponse) SetMessageNil(b bool)` + + SetMessageNil sets the value for Message to be an explicit nil + +### UnsetMessage +`func (o *ImageResizeResponse) UnsetMessage()` + +UnsetMessage ensures that no value is present for Message, not even an explicit nil + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/ListApi.md b/docs/ListApi.md new file mode 100644 index 0000000..838f080 --- /dev/null +++ b/docs/ListApi.md @@ -0,0 +1,355 @@ +# \ListApi + +All URIs are relative to *https://napi.arvancloud.ir/cdn/4.0* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListsDestroy**](ListApi.md#ListsDestroy) | **Delete** /dynamic-fields/{id} | Delete List +[**ListsIndex**](ListApi.md#ListsIndex) | **Get** /dynamic-fields | Get the list of Lists +[**ListsShow**](ListApi.md#ListsShow) | **Get** /dynamic-fields/{id} | Get an existing List +[**ListsStore**](ListApi.md#ListsStore) | **Post** /dynamic-fields | Store new List +[**ListsUpdate**](ListApi.md#ListsUpdate) | **Patch** /dynamic-fields/{id} | Update an existing List + + + +## ListsDestroy + +> MessageResponse ListsDestroy(ctx, id).Execute() + +Delete List + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ListApi.ListsDestroy(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ListApi.ListsDestroy``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListsDestroy`: MessageResponse + fmt.Fprintf(os.Stdout, "Response from `ListApi.ListsDestroy`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiListsDestroyRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**MessageResponse**](MessageResponse.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## ListsIndex + +> ListsIndex200Response ListsIndex(ctx).PerPage(perPage).Page(page).Scope(scope).Type_(type_).Name(name).Execute() + +Get the list of Lists + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + perPage := int32(56) // int32 | Set how many items returned per page (optional) + page := int32(56) // int32 | Set the desired page number (optional) (default to 1) + scope := "scope_example" // string | (optional) + type_ := "type__example" // string | (optional) + name := "name_example" // string | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ListApi.ListsIndex(context.Background()).PerPage(perPage).Page(page).Scope(scope).Type_(type_).Name(name).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ListApi.ListsIndex``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListsIndex`: ListsIndex200Response + fmt.Fprintf(os.Stdout, "Response from `ListApi.ListsIndex`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiListsIndexRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **perPage** | **int32** | Set how many items returned per page | + **page** | **int32** | Set the desired page number | [default to 1] + **scope** | **string** | | + **type_** | **string** | | + **name** | **string** | | + +### Return type + +[**ListsIndex200Response**](ListsIndex200Response.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## ListsShow + +> DynamicFieldData ListsShow(ctx, id).Execute() + +Get an existing List + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ListApi.ListsShow(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ListApi.ListsShow``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListsShow`: DynamicFieldData + fmt.Fprintf(os.Stdout, "Response from `ListApi.ListsShow`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiListsShowRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**DynamicFieldData**](DynamicFieldData.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## ListsStore + +> DynamicFieldResponse ListsStore(ctx).DynamicField(dynamicField).Execute() + +Store new List + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + dynamicField := *openapiclient.NewDynamicField("Name_example", "Type_example", []openapiclient.DynamicFieldValue{*openapiclient.NewDynamicFieldValue()}) // DynamicField | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ListApi.ListsStore(context.Background()).DynamicField(dynamicField).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ListApi.ListsStore``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListsStore`: DynamicFieldResponse + fmt.Fprintf(os.Stdout, "Response from `ListApi.ListsStore`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiListsStoreRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **dynamicField** | [**DynamicField**](DynamicField.md) | | + +### Return type + +[**DynamicFieldResponse**](DynamicFieldResponse.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## ListsUpdate + +> DynamicFieldResponse ListsUpdate(ctx, id).DynamicField(dynamicField).Execute() + +Update an existing List + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | + dynamicField := *openapiclient.NewDynamicField("Name_example", "Type_example", []openapiclient.DynamicFieldValue{*openapiclient.NewDynamicFieldValue()}) // DynamicField | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ListApi.ListsUpdate(context.Background(), id).DynamicField(dynamicField).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ListApi.ListsUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListsUpdate`: DynamicFieldResponse + fmt.Fprintf(os.Stdout, "Response from `ListApi.ListsUpdate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiListsUpdateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **dynamicField** | [**DynamicField**](DynamicField.md) | | + +### Return type + +[**DynamicFieldResponse**](DynamicFieldResponse.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + diff --git a/docs/ListsIndex200Response.md b/docs/ListsIndex200Response.md new file mode 100644 index 0000000..7482c9c --- /dev/null +++ b/docs/ListsIndex200Response.md @@ -0,0 +1,108 @@ +# ListsIndex200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**[]DynamicField**](DynamicField.md) | | [optional] +**Links** | Pointer to [**PaginatedResponseLinks**](PaginatedResponseLinks.md) | | [optional] +**Meta** | Pointer to [**PaginatedResponseMeta**](PaginatedResponseMeta.md) | | [optional] + +## Methods + +### NewListsIndex200Response + +`func NewListsIndex200Response() *ListsIndex200Response` + +NewListsIndex200Response instantiates a new ListsIndex200Response object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewListsIndex200ResponseWithDefaults + +`func NewListsIndex200ResponseWithDefaults() *ListsIndex200Response` + +NewListsIndex200ResponseWithDefaults instantiates a new ListsIndex200Response object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *ListsIndex200Response) GetData() []DynamicField` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ListsIndex200Response) GetDataOk() (*[]DynamicField, 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 *ListsIndex200Response) SetData(v []DynamicField)` + +SetData sets Data field to given value. + +### HasData + +`func (o *ListsIndex200Response) HasData() bool` + +HasData returns a boolean if a field has been set. + +### GetLinks + +`func (o *ListsIndex200Response) GetLinks() PaginatedResponseLinks` + +GetLinks returns the Links field if non-nil, zero value otherwise. + +### GetLinksOk + +`func (o *ListsIndex200Response) GetLinksOk() (*PaginatedResponseLinks, bool)` + +GetLinksOk returns a tuple with the Links field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLinks + +`func (o *ListsIndex200Response) SetLinks(v PaginatedResponseLinks)` + +SetLinks sets Links field to given value. + +### HasLinks + +`func (o *ListsIndex200Response) HasLinks() bool` + +HasLinks returns a boolean if a field has been set. + +### GetMeta + +`func (o *ListsIndex200Response) GetMeta() PaginatedResponseMeta` + +GetMeta returns the Meta field if non-nil, zero value otherwise. + +### GetMetaOk + +`func (o *ListsIndex200Response) GetMetaOk() (*PaginatedResponseMeta, bool)` + +GetMetaOk returns a tuple with the Meta field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMeta + +`func (o *ListsIndex200Response) SetMeta(v PaginatedResponseMeta)` + +SetMeta sets Meta field to given value. + +### HasMeta + +`func (o *ListsIndex200Response) HasMeta() bool` + +HasMeta returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/LoadBalancer.md b/docs/LoadBalancer.md new file mode 100644 index 0000000..0210e35 --- /dev/null +++ b/docs/LoadBalancer.md @@ -0,0 +1,238 @@ +# LoadBalancer + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **string** | | [optional] [readonly] +**Name** | Pointer to **string** | | [optional] +**Description** | Pointer to **string** | | [optional] +**Status** | Pointer to **bool** | | [optional] +**Method** | Pointer to **string** | | [optional] +**Pools** | Pointer to [**[]LoadBalancerPool**](LoadBalancerPool.md) | | [optional] [readonly] +**CreatedAt** | Pointer to **time.Time** | | [optional] [readonly] +**UpdatedAt** | Pointer to **time.Time** | | [optional] [readonly] + +## Methods + +### NewLoadBalancer + +`func NewLoadBalancer() *LoadBalancer` + +NewLoadBalancer instantiates a new LoadBalancer object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewLoadBalancerWithDefaults + +`func NewLoadBalancerWithDefaults() *LoadBalancer` + +NewLoadBalancerWithDefaults instantiates a new LoadBalancer object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *LoadBalancer) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *LoadBalancer) 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 *LoadBalancer) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *LoadBalancer) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetName + +`func (o *LoadBalancer) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *LoadBalancer) 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 *LoadBalancer) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *LoadBalancer) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetDescription + +`func (o *LoadBalancer) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *LoadBalancer) 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 *LoadBalancer) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *LoadBalancer) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetStatus + +`func (o *LoadBalancer) GetStatus() bool` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *LoadBalancer) GetStatusOk() (*bool, 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 *LoadBalancer) SetStatus(v bool)` + +SetStatus sets Status field to given value. + +### HasStatus + +`func (o *LoadBalancer) HasStatus() bool` + +HasStatus returns a boolean if a field has been set. + +### GetMethod + +`func (o *LoadBalancer) GetMethod() string` + +GetMethod returns the Method field if non-nil, zero value otherwise. + +### GetMethodOk + +`func (o *LoadBalancer) GetMethodOk() (*string, bool)` + +GetMethodOk returns a tuple with the Method field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMethod + +`func (o *LoadBalancer) SetMethod(v string)` + +SetMethod sets Method field to given value. + +### HasMethod + +`func (o *LoadBalancer) HasMethod() bool` + +HasMethod returns a boolean if a field has been set. + +### GetPools + +`func (o *LoadBalancer) GetPools() []LoadBalancerPool` + +GetPools returns the Pools field if non-nil, zero value otherwise. + +### GetPoolsOk + +`func (o *LoadBalancer) GetPoolsOk() (*[]LoadBalancerPool, bool)` + +GetPoolsOk returns a tuple with the Pools field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPools + +`func (o *LoadBalancer) SetPools(v []LoadBalancerPool)` + +SetPools sets Pools field to given value. + +### HasPools + +`func (o *LoadBalancer) HasPools() bool` + +HasPools returns a boolean if a field has been set. + +### GetCreatedAt + +`func (o *LoadBalancer) GetCreatedAt() time.Time` + +GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. + +### GetCreatedAtOk + +`func (o *LoadBalancer) GetCreatedAtOk() (*time.Time, bool)` + +GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedAt + +`func (o *LoadBalancer) SetCreatedAt(v time.Time)` + +SetCreatedAt sets CreatedAt field to given value. + +### HasCreatedAt + +`func (o *LoadBalancer) HasCreatedAt() bool` + +HasCreatedAt returns a boolean if a field has been set. + +### GetUpdatedAt + +`func (o *LoadBalancer) GetUpdatedAt() time.Time` + +GetUpdatedAt returns the UpdatedAt field if non-nil, zero value otherwise. + +### GetUpdatedAtOk + +`func (o *LoadBalancer) GetUpdatedAtOk() (*time.Time, bool)` + +GetUpdatedAtOk returns a tuple with the UpdatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpdatedAt + +`func (o *LoadBalancer) SetUpdatedAt(v time.Time)` + +SetUpdatedAt sets UpdatedAt field to given value. + +### HasUpdatedAt + +`func (o *LoadBalancer) HasUpdatedAt() bool` + +HasUpdatedAt returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/LoadBalancerData.md b/docs/LoadBalancerData.md new file mode 100644 index 0000000..150bcc2 --- /dev/null +++ b/docs/LoadBalancerData.md @@ -0,0 +1,56 @@ +# LoadBalancerData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**LoadBalancer**](LoadBalancer.md) | | [optional] + +## Methods + +### NewLoadBalancerData + +`func NewLoadBalancerData() *LoadBalancerData` + +NewLoadBalancerData instantiates a new LoadBalancerData object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewLoadBalancerDataWithDefaults + +`func NewLoadBalancerDataWithDefaults() *LoadBalancerData` + +NewLoadBalancerDataWithDefaults instantiates a new LoadBalancerData object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *LoadBalancerData) GetData() LoadBalancer` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *LoadBalancerData) GetDataOk() (*LoadBalancer, 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 *LoadBalancerData) SetData(v LoadBalancer)` + +SetData sets Data field to given value. + +### HasData + +`func (o *LoadBalancerData) HasData() bool` + +HasData returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/LoadBalancerOrigin.md b/docs/LoadBalancerOrigin.md new file mode 100644 index 0000000..698b11f --- /dev/null +++ b/docs/LoadBalancerOrigin.md @@ -0,0 +1,290 @@ +# LoadBalancerOrigin + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **string** | | [optional] [readonly] +**Name** | Pointer to **string** | | [optional] +**Status** | Pointer to **bool** | | [optional] +**Address** | Pointer to **string** | | [optional] +**Port** | Pointer to **int32** | | [optional] +**Weight** | Pointer to **int32** | | [optional] +**Protocol** | Pointer to **string** | | [optional] [default to "auto"] +**HostHeader** | Pointer to **string** | | [optional] +**CreatedAt** | Pointer to **time.Time** | | [optional] [readonly] +**UpdatedAt** | Pointer to **time.Time** | | [optional] [readonly] + +## Methods + +### NewLoadBalancerOrigin + +`func NewLoadBalancerOrigin() *LoadBalancerOrigin` + +NewLoadBalancerOrigin instantiates a new LoadBalancerOrigin object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewLoadBalancerOriginWithDefaults + +`func NewLoadBalancerOriginWithDefaults() *LoadBalancerOrigin` + +NewLoadBalancerOriginWithDefaults instantiates a new LoadBalancerOrigin object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *LoadBalancerOrigin) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *LoadBalancerOrigin) 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 *LoadBalancerOrigin) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *LoadBalancerOrigin) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetName + +`func (o *LoadBalancerOrigin) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *LoadBalancerOrigin) 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 *LoadBalancerOrigin) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *LoadBalancerOrigin) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetStatus + +`func (o *LoadBalancerOrigin) GetStatus() bool` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *LoadBalancerOrigin) GetStatusOk() (*bool, 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 *LoadBalancerOrigin) SetStatus(v bool)` + +SetStatus sets Status field to given value. + +### HasStatus + +`func (o *LoadBalancerOrigin) HasStatus() bool` + +HasStatus returns a boolean if a field has been set. + +### GetAddress + +`func (o *LoadBalancerOrigin) GetAddress() string` + +GetAddress returns the Address field if non-nil, zero value otherwise. + +### GetAddressOk + +`func (o *LoadBalancerOrigin) 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 *LoadBalancerOrigin) SetAddress(v string)` + +SetAddress sets Address field to given value. + +### HasAddress + +`func (o *LoadBalancerOrigin) HasAddress() bool` + +HasAddress returns a boolean if a field has been set. + +### GetPort + +`func (o *LoadBalancerOrigin) GetPort() int32` + +GetPort returns the Port field if non-nil, zero value otherwise. + +### GetPortOk + +`func (o *LoadBalancerOrigin) GetPortOk() (*int32, bool)` + +GetPortOk returns a tuple with the Port field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPort + +`func (o *LoadBalancerOrigin) SetPort(v int32)` + +SetPort sets Port field to given value. + +### HasPort + +`func (o *LoadBalancerOrigin) HasPort() bool` + +HasPort returns a boolean if a field has been set. + +### GetWeight + +`func (o *LoadBalancerOrigin) GetWeight() int32` + +GetWeight returns the Weight field if non-nil, zero value otherwise. + +### GetWeightOk + +`func (o *LoadBalancerOrigin) GetWeightOk() (*int32, bool)` + +GetWeightOk returns a tuple with the Weight field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetWeight + +`func (o *LoadBalancerOrigin) SetWeight(v int32)` + +SetWeight sets Weight field to given value. + +### HasWeight + +`func (o *LoadBalancerOrigin) HasWeight() bool` + +HasWeight returns a boolean if a field has been set. + +### GetProtocol + +`func (o *LoadBalancerOrigin) GetProtocol() string` + +GetProtocol returns the Protocol field if non-nil, zero value otherwise. + +### GetProtocolOk + +`func (o *LoadBalancerOrigin) GetProtocolOk() (*string, bool)` + +GetProtocolOk returns a tuple with the Protocol field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProtocol + +`func (o *LoadBalancerOrigin) SetProtocol(v string)` + +SetProtocol sets Protocol field to given value. + +### HasProtocol + +`func (o *LoadBalancerOrigin) HasProtocol() bool` + +HasProtocol returns a boolean if a field has been set. + +### GetHostHeader + +`func (o *LoadBalancerOrigin) GetHostHeader() string` + +GetHostHeader returns the HostHeader field if non-nil, zero value otherwise. + +### GetHostHeaderOk + +`func (o *LoadBalancerOrigin) GetHostHeaderOk() (*string, bool)` + +GetHostHeaderOk returns a tuple with the HostHeader field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHostHeader + +`func (o *LoadBalancerOrigin) SetHostHeader(v string)` + +SetHostHeader sets HostHeader field to given value. + +### HasHostHeader + +`func (o *LoadBalancerOrigin) HasHostHeader() bool` + +HasHostHeader returns a boolean if a field has been set. + +### GetCreatedAt + +`func (o *LoadBalancerOrigin) GetCreatedAt() time.Time` + +GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. + +### GetCreatedAtOk + +`func (o *LoadBalancerOrigin) GetCreatedAtOk() (*time.Time, bool)` + +GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedAt + +`func (o *LoadBalancerOrigin) SetCreatedAt(v time.Time)` + +SetCreatedAt sets CreatedAt field to given value. + +### HasCreatedAt + +`func (o *LoadBalancerOrigin) HasCreatedAt() bool` + +HasCreatedAt returns a boolean if a field has been set. + +### GetUpdatedAt + +`func (o *LoadBalancerOrigin) GetUpdatedAt() time.Time` + +GetUpdatedAt returns the UpdatedAt field if non-nil, zero value otherwise. + +### GetUpdatedAtOk + +`func (o *LoadBalancerOrigin) GetUpdatedAtOk() (*time.Time, bool)` + +GetUpdatedAtOk returns a tuple with the UpdatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpdatedAt + +`func (o *LoadBalancerOrigin) SetUpdatedAt(v time.Time)` + +SetUpdatedAt sets UpdatedAt field to given value. + +### HasUpdatedAt + +`func (o *LoadBalancerOrigin) HasUpdatedAt() bool` + +HasUpdatedAt returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/LoadBalancerOriginData.md b/docs/LoadBalancerOriginData.md new file mode 100644 index 0000000..f6b4cca --- /dev/null +++ b/docs/LoadBalancerOriginData.md @@ -0,0 +1,56 @@ +# LoadBalancerOriginData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**LoadBalancerOrigin**](LoadBalancerOrigin.md) | | [optional] + +## Methods + +### NewLoadBalancerOriginData + +`func NewLoadBalancerOriginData() *LoadBalancerOriginData` + +NewLoadBalancerOriginData instantiates a new LoadBalancerOriginData object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewLoadBalancerOriginDataWithDefaults + +`func NewLoadBalancerOriginDataWithDefaults() *LoadBalancerOriginData` + +NewLoadBalancerOriginDataWithDefaults instantiates a new LoadBalancerOriginData object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *LoadBalancerOriginData) GetData() LoadBalancerOrigin` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *LoadBalancerOriginData) GetDataOk() (*LoadBalancerOrigin, 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 *LoadBalancerOriginData) SetData(v LoadBalancerOrigin)` + +SetData sets Data field to given value. + +### HasData + +`func (o *LoadBalancerOriginData) HasData() bool` + +HasData returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/LoadBalancerOriginResponse.md b/docs/LoadBalancerOriginResponse.md new file mode 100644 index 0000000..7c06d7b --- /dev/null +++ b/docs/LoadBalancerOriginResponse.md @@ -0,0 +1,92 @@ +# LoadBalancerOriginResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**LoadBalancerOrigin**](LoadBalancerOrigin.md) | | [optional] +**Message** | Pointer to **NullableString** | | [optional] + +## Methods + +### NewLoadBalancerOriginResponse + +`func NewLoadBalancerOriginResponse() *LoadBalancerOriginResponse` + +NewLoadBalancerOriginResponse instantiates a new LoadBalancerOriginResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewLoadBalancerOriginResponseWithDefaults + +`func NewLoadBalancerOriginResponseWithDefaults() *LoadBalancerOriginResponse` + +NewLoadBalancerOriginResponseWithDefaults instantiates a new LoadBalancerOriginResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *LoadBalancerOriginResponse) GetData() LoadBalancerOrigin` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *LoadBalancerOriginResponse) GetDataOk() (*LoadBalancerOrigin, 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 *LoadBalancerOriginResponse) SetData(v LoadBalancerOrigin)` + +SetData sets Data field to given value. + +### HasData + +`func (o *LoadBalancerOriginResponse) HasData() bool` + +HasData returns a boolean if a field has been set. + +### GetMessage + +`func (o *LoadBalancerOriginResponse) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *LoadBalancerOriginResponse) GetMessageOk() (*string, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessage + +`func (o *LoadBalancerOriginResponse) SetMessage(v string)` + +SetMessage sets Message field to given value. + +### HasMessage + +`func (o *LoadBalancerOriginResponse) HasMessage() bool` + +HasMessage returns a boolean if a field has been set. + +### SetMessageNil + +`func (o *LoadBalancerOriginResponse) SetMessageNil(b bool)` + + SetMessageNil sets the value for Message to be an explicit nil + +### UnsetMessage +`func (o *LoadBalancerOriginResponse) UnsetMessage()` + +UnsetMessage ensures that no value is present for Message, not even an explicit nil + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/LoadBalancerOriginStore.md b/docs/LoadBalancerOriginStore.md new file mode 100644 index 0000000..0793198 --- /dev/null +++ b/docs/LoadBalancerOriginStore.md @@ -0,0 +1,187 @@ +# LoadBalancerOriginStore + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **string** | | [optional] +**Status** | **bool** | | +**Address** | **string** | | +**Port** | **int32** | | +**Weight** | **int32** | | +**Protocol** | **string** | | [default to "auto"] +**HostHeader** | Pointer to **string** | | [optional] + +## Methods + +### NewLoadBalancerOriginStore + +`func NewLoadBalancerOriginStore(status bool, address string, port int32, weight int32, protocol string, ) *LoadBalancerOriginStore` + +NewLoadBalancerOriginStore instantiates a new LoadBalancerOriginStore object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewLoadBalancerOriginStoreWithDefaults + +`func NewLoadBalancerOriginStoreWithDefaults() *LoadBalancerOriginStore` + +NewLoadBalancerOriginStoreWithDefaults instantiates a new LoadBalancerOriginStore object +This 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 *LoadBalancerOriginStore) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *LoadBalancerOriginStore) 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 *LoadBalancerOriginStore) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *LoadBalancerOriginStore) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetStatus + +`func (o *LoadBalancerOriginStore) GetStatus() bool` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *LoadBalancerOriginStore) GetStatusOk() (*bool, 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 *LoadBalancerOriginStore) SetStatus(v bool)` + +SetStatus sets Status field to given value. + + +### GetAddress + +`func (o *LoadBalancerOriginStore) GetAddress() string` + +GetAddress returns the Address field if non-nil, zero value otherwise. + +### GetAddressOk + +`func (o *LoadBalancerOriginStore) 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 *LoadBalancerOriginStore) SetAddress(v string)` + +SetAddress sets Address field to given value. + + +### GetPort + +`func (o *LoadBalancerOriginStore) GetPort() int32` + +GetPort returns the Port field if non-nil, zero value otherwise. + +### GetPortOk + +`func (o *LoadBalancerOriginStore) GetPortOk() (*int32, bool)` + +GetPortOk returns a tuple with the Port field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPort + +`func (o *LoadBalancerOriginStore) SetPort(v int32)` + +SetPort sets Port field to given value. + + +### GetWeight + +`func (o *LoadBalancerOriginStore) GetWeight() int32` + +GetWeight returns the Weight field if non-nil, zero value otherwise. + +### GetWeightOk + +`func (o *LoadBalancerOriginStore) GetWeightOk() (*int32, bool)` + +GetWeightOk returns a tuple with the Weight field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetWeight + +`func (o *LoadBalancerOriginStore) SetWeight(v int32)` + +SetWeight sets Weight field to given value. + + +### GetProtocol + +`func (o *LoadBalancerOriginStore) GetProtocol() string` + +GetProtocol returns the Protocol field if non-nil, zero value otherwise. + +### GetProtocolOk + +`func (o *LoadBalancerOriginStore) GetProtocolOk() (*string, bool)` + +GetProtocolOk returns a tuple with the Protocol field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProtocol + +`func (o *LoadBalancerOriginStore) SetProtocol(v string)` + +SetProtocol sets Protocol field to given value. + + +### GetHostHeader + +`func (o *LoadBalancerOriginStore) GetHostHeader() string` + +GetHostHeader returns the HostHeader field if non-nil, zero value otherwise. + +### GetHostHeaderOk + +`func (o *LoadBalancerOriginStore) GetHostHeaderOk() (*string, bool)` + +GetHostHeaderOk returns a tuple with the HostHeader field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHostHeader + +`func (o *LoadBalancerOriginStore) SetHostHeader(v string)` + +SetHostHeader sets HostHeader field to given value. + +### HasHostHeader + +`func (o *LoadBalancerOriginStore) HasHostHeader() bool` + +HasHostHeader returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/LoadBalancerPool.md b/docs/LoadBalancerPool.md new file mode 100644 index 0000000..5087a02 --- /dev/null +++ b/docs/LoadBalancerPool.md @@ -0,0 +1,378 @@ +# LoadBalancerPool + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **string** | | [optional] [readonly] +**Name** | Pointer to **string** | | [optional] +**Description** | Pointer to **string** | | [optional] +**Status** | Pointer to **bool** | | [optional] +**Priority** | Pointer to **int32** | Zero means the default pool | [optional] +**Method** | Pointer to **string** | | [optional] +**Keepalive** | Pointer to **string** | | [optional] [default to "off"] +**NextUpstreamTcp** | Pointer to **string** | | [optional] [default to "off"] +**Regions** | Pointer to **[]string** | | [optional] +**Origins** | Pointer to [**[]LoadBalancerOrigin**](LoadBalancerOrigin.md) | | [optional] [readonly] +**MonitoringStatus** | Pointer to [**NullableMonitoringStatus**](MonitoringStatus.md) | | [optional] +**CreatedAt** | Pointer to **time.Time** | | [optional] [readonly] +**UpdatedAt** | Pointer to **time.Time** | | [optional] [readonly] + +## Methods + +### NewLoadBalancerPool + +`func NewLoadBalancerPool() *LoadBalancerPool` + +NewLoadBalancerPool instantiates a new LoadBalancerPool object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewLoadBalancerPoolWithDefaults + +`func NewLoadBalancerPoolWithDefaults() *LoadBalancerPool` + +NewLoadBalancerPoolWithDefaults instantiates a new LoadBalancerPool object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *LoadBalancerPool) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *LoadBalancerPool) 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 *LoadBalancerPool) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *LoadBalancerPool) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetName + +`func (o *LoadBalancerPool) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *LoadBalancerPool) 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 *LoadBalancerPool) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *LoadBalancerPool) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetDescription + +`func (o *LoadBalancerPool) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *LoadBalancerPool) 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 *LoadBalancerPool) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *LoadBalancerPool) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetStatus + +`func (o *LoadBalancerPool) GetStatus() bool` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *LoadBalancerPool) GetStatusOk() (*bool, 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 *LoadBalancerPool) SetStatus(v bool)` + +SetStatus sets Status field to given value. + +### HasStatus + +`func (o *LoadBalancerPool) HasStatus() bool` + +HasStatus returns a boolean if a field has been set. + +### GetPriority + +`func (o *LoadBalancerPool) GetPriority() int32` + +GetPriority returns the Priority field if non-nil, zero value otherwise. + +### GetPriorityOk + +`func (o *LoadBalancerPool) GetPriorityOk() (*int32, bool)` + +GetPriorityOk returns a tuple with the Priority field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPriority + +`func (o *LoadBalancerPool) SetPriority(v int32)` + +SetPriority sets Priority field to given value. + +### HasPriority + +`func (o *LoadBalancerPool) HasPriority() bool` + +HasPriority returns a boolean if a field has been set. + +### GetMethod + +`func (o *LoadBalancerPool) GetMethod() string` + +GetMethod returns the Method field if non-nil, zero value otherwise. + +### GetMethodOk + +`func (o *LoadBalancerPool) GetMethodOk() (*string, bool)` + +GetMethodOk returns a tuple with the Method field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMethod + +`func (o *LoadBalancerPool) SetMethod(v string)` + +SetMethod sets Method field to given value. + +### HasMethod + +`func (o *LoadBalancerPool) HasMethod() bool` + +HasMethod returns a boolean if a field has been set. + +### GetKeepalive + +`func (o *LoadBalancerPool) GetKeepalive() string` + +GetKeepalive returns the Keepalive field if non-nil, zero value otherwise. + +### GetKeepaliveOk + +`func (o *LoadBalancerPool) GetKeepaliveOk() (*string, bool)` + +GetKeepaliveOk returns a tuple with the Keepalive field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKeepalive + +`func (o *LoadBalancerPool) SetKeepalive(v string)` + +SetKeepalive sets Keepalive field to given value. + +### HasKeepalive + +`func (o *LoadBalancerPool) HasKeepalive() bool` + +HasKeepalive returns a boolean if a field has been set. + +### GetNextUpstreamTcp + +`func (o *LoadBalancerPool) GetNextUpstreamTcp() string` + +GetNextUpstreamTcp returns the NextUpstreamTcp field if non-nil, zero value otherwise. + +### GetNextUpstreamTcpOk + +`func (o *LoadBalancerPool) GetNextUpstreamTcpOk() (*string, bool)` + +GetNextUpstreamTcpOk returns a tuple with the NextUpstreamTcp field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNextUpstreamTcp + +`func (o *LoadBalancerPool) SetNextUpstreamTcp(v string)` + +SetNextUpstreamTcp sets NextUpstreamTcp field to given value. + +### HasNextUpstreamTcp + +`func (o *LoadBalancerPool) HasNextUpstreamTcp() bool` + +HasNextUpstreamTcp returns a boolean if a field has been set. + +### GetRegions + +`func (o *LoadBalancerPool) GetRegions() []string` + +GetRegions returns the Regions field if non-nil, zero value otherwise. + +### GetRegionsOk + +`func (o *LoadBalancerPool) GetRegionsOk() (*[]string, bool)` + +GetRegionsOk returns a tuple with the Regions field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRegions + +`func (o *LoadBalancerPool) SetRegions(v []string)` + +SetRegions sets Regions field to given value. + +### HasRegions + +`func (o *LoadBalancerPool) HasRegions() bool` + +HasRegions returns a boolean if a field has been set. + +### GetOrigins + +`func (o *LoadBalancerPool) GetOrigins() []LoadBalancerOrigin` + +GetOrigins returns the Origins field if non-nil, zero value otherwise. + +### GetOriginsOk + +`func (o *LoadBalancerPool) GetOriginsOk() (*[]LoadBalancerOrigin, bool)` + +GetOriginsOk returns a tuple with the Origins field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOrigins + +`func (o *LoadBalancerPool) SetOrigins(v []LoadBalancerOrigin)` + +SetOrigins sets Origins field to given value. + +### HasOrigins + +`func (o *LoadBalancerPool) HasOrigins() bool` + +HasOrigins returns a boolean if a field has been set. + +### GetMonitoringStatus + +`func (o *LoadBalancerPool) GetMonitoringStatus() MonitoringStatus` + +GetMonitoringStatus returns the MonitoringStatus field if non-nil, zero value otherwise. + +### GetMonitoringStatusOk + +`func (o *LoadBalancerPool) GetMonitoringStatusOk() (*MonitoringStatus, bool)` + +GetMonitoringStatusOk returns a tuple with the MonitoringStatus field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMonitoringStatus + +`func (o *LoadBalancerPool) SetMonitoringStatus(v MonitoringStatus)` + +SetMonitoringStatus sets MonitoringStatus field to given value. + +### HasMonitoringStatus + +`func (o *LoadBalancerPool) HasMonitoringStatus() bool` + +HasMonitoringStatus returns a boolean if a field has been set. + +### SetMonitoringStatusNil + +`func (o *LoadBalancerPool) SetMonitoringStatusNil(b bool)` + + SetMonitoringStatusNil sets the value for MonitoringStatus to be an explicit nil + +### UnsetMonitoringStatus +`func (o *LoadBalancerPool) UnsetMonitoringStatus()` + +UnsetMonitoringStatus ensures that no value is present for MonitoringStatus, not even an explicit nil +### GetCreatedAt + +`func (o *LoadBalancerPool) GetCreatedAt() time.Time` + +GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. + +### GetCreatedAtOk + +`func (o *LoadBalancerPool) GetCreatedAtOk() (*time.Time, bool)` + +GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedAt + +`func (o *LoadBalancerPool) SetCreatedAt(v time.Time)` + +SetCreatedAt sets CreatedAt field to given value. + +### HasCreatedAt + +`func (o *LoadBalancerPool) HasCreatedAt() bool` + +HasCreatedAt returns a boolean if a field has been set. + +### GetUpdatedAt + +`func (o *LoadBalancerPool) GetUpdatedAt() time.Time` + +GetUpdatedAt returns the UpdatedAt field if non-nil, zero value otherwise. + +### GetUpdatedAtOk + +`func (o *LoadBalancerPool) GetUpdatedAtOk() (*time.Time, bool)` + +GetUpdatedAtOk returns a tuple with the UpdatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpdatedAt + +`func (o *LoadBalancerPool) SetUpdatedAt(v time.Time)` + +SetUpdatedAt sets UpdatedAt field to given value. + +### HasUpdatedAt + +`func (o *LoadBalancerPool) HasUpdatedAt() bool` + +HasUpdatedAt returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/LoadBalancerPoolData.md b/docs/LoadBalancerPoolData.md new file mode 100644 index 0000000..b33dde2 --- /dev/null +++ b/docs/LoadBalancerPoolData.md @@ -0,0 +1,56 @@ +# LoadBalancerPoolData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**LoadBalancerPool**](LoadBalancerPool.md) | | [optional] + +## Methods + +### NewLoadBalancerPoolData + +`func NewLoadBalancerPoolData() *LoadBalancerPoolData` + +NewLoadBalancerPoolData instantiates a new LoadBalancerPoolData object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewLoadBalancerPoolDataWithDefaults + +`func NewLoadBalancerPoolDataWithDefaults() *LoadBalancerPoolData` + +NewLoadBalancerPoolDataWithDefaults instantiates a new LoadBalancerPoolData object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *LoadBalancerPoolData) GetData() LoadBalancerPool` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *LoadBalancerPoolData) GetDataOk() (*LoadBalancerPool, 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 *LoadBalancerPoolData) SetData(v LoadBalancerPool)` + +SetData sets Data field to given value. + +### HasData + +`func (o *LoadBalancerPoolData) HasData() bool` + +HasData returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/LoadBalancerPoolResponse.md b/docs/LoadBalancerPoolResponse.md new file mode 100644 index 0000000..ff8ff27 --- /dev/null +++ b/docs/LoadBalancerPoolResponse.md @@ -0,0 +1,92 @@ +# LoadBalancerPoolResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**[]LoadBalancerPool**](LoadBalancerPool.md) | | [optional] +**Message** | Pointer to **NullableString** | | [optional] + +## Methods + +### NewLoadBalancerPoolResponse + +`func NewLoadBalancerPoolResponse() *LoadBalancerPoolResponse` + +NewLoadBalancerPoolResponse instantiates a new LoadBalancerPoolResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewLoadBalancerPoolResponseWithDefaults + +`func NewLoadBalancerPoolResponseWithDefaults() *LoadBalancerPoolResponse` + +NewLoadBalancerPoolResponseWithDefaults instantiates a new LoadBalancerPoolResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *LoadBalancerPoolResponse) GetData() []LoadBalancerPool` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *LoadBalancerPoolResponse) GetDataOk() (*[]LoadBalancerPool, 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 *LoadBalancerPoolResponse) SetData(v []LoadBalancerPool)` + +SetData sets Data field to given value. + +### HasData + +`func (o *LoadBalancerPoolResponse) HasData() bool` + +HasData returns a boolean if a field has been set. + +### GetMessage + +`func (o *LoadBalancerPoolResponse) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *LoadBalancerPoolResponse) GetMessageOk() (*string, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessage + +`func (o *LoadBalancerPoolResponse) SetMessage(v string)` + +SetMessage sets Message field to given value. + +### HasMessage + +`func (o *LoadBalancerPoolResponse) HasMessage() bool` + +HasMessage returns a boolean if a field has been set. + +### SetMessageNil + +`func (o *LoadBalancerPoolResponse) SetMessageNil(b bool)` + + SetMessageNil sets the value for Message to be an explicit nil + +### UnsetMessage +`func (o *LoadBalancerPoolResponse) UnsetMessage()` + +UnsetMessage ensures that no value is present for Message, not even an explicit nil + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/LoadBalancerPoolStore.md b/docs/LoadBalancerPoolStore.md new file mode 100644 index 0000000..e6feb2e --- /dev/null +++ b/docs/LoadBalancerPoolStore.md @@ -0,0 +1,239 @@ +# LoadBalancerPoolStore + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**Description** | Pointer to **string** | | [optional] +**Status** | **bool** | | +**Priority** | Pointer to **int32** | Zero means the default pool | [optional] +**Method** | **string** | | +**Keepalive** | **string** | | [default to "off"] +**NextUpstreamTcp** | **string** | | [default to "off"] +**Regions** | Pointer to **[]string** | | [optional] +**Origins** | Pointer to [**[]LoadBalancerOriginStore**](LoadBalancerOriginStore.md) | | [optional] + +## Methods + +### NewLoadBalancerPoolStore + +`func NewLoadBalancerPoolStore(name string, status bool, method string, keepalive string, nextUpstreamTcp string, ) *LoadBalancerPoolStore` + +NewLoadBalancerPoolStore instantiates a new LoadBalancerPoolStore object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewLoadBalancerPoolStoreWithDefaults + +`func NewLoadBalancerPoolStoreWithDefaults() *LoadBalancerPoolStore` + +NewLoadBalancerPoolStoreWithDefaults instantiates a new LoadBalancerPoolStore object +This 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 *LoadBalancerPoolStore) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *LoadBalancerPoolStore) 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 *LoadBalancerPoolStore) SetName(v string)` + +SetName sets Name field to given value. + + +### GetDescription + +`func (o *LoadBalancerPoolStore) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *LoadBalancerPoolStore) 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 *LoadBalancerPoolStore) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *LoadBalancerPoolStore) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetStatus + +`func (o *LoadBalancerPoolStore) GetStatus() bool` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *LoadBalancerPoolStore) GetStatusOk() (*bool, 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 *LoadBalancerPoolStore) SetStatus(v bool)` + +SetStatus sets Status field to given value. + + +### GetPriority + +`func (o *LoadBalancerPoolStore) GetPriority() int32` + +GetPriority returns the Priority field if non-nil, zero value otherwise. + +### GetPriorityOk + +`func (o *LoadBalancerPoolStore) GetPriorityOk() (*int32, bool)` + +GetPriorityOk returns a tuple with the Priority field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPriority + +`func (o *LoadBalancerPoolStore) SetPriority(v int32)` + +SetPriority sets Priority field to given value. + +### HasPriority + +`func (o *LoadBalancerPoolStore) HasPriority() bool` + +HasPriority returns a boolean if a field has been set. + +### GetMethod + +`func (o *LoadBalancerPoolStore) GetMethod() string` + +GetMethod returns the Method field if non-nil, zero value otherwise. + +### GetMethodOk + +`func (o *LoadBalancerPoolStore) GetMethodOk() (*string, bool)` + +GetMethodOk returns a tuple with the Method field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMethod + +`func (o *LoadBalancerPoolStore) SetMethod(v string)` + +SetMethod sets Method field to given value. + + +### GetKeepalive + +`func (o *LoadBalancerPoolStore) GetKeepalive() string` + +GetKeepalive returns the Keepalive field if non-nil, zero value otherwise. + +### GetKeepaliveOk + +`func (o *LoadBalancerPoolStore) GetKeepaliveOk() (*string, bool)` + +GetKeepaliveOk returns a tuple with the Keepalive field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKeepalive + +`func (o *LoadBalancerPoolStore) SetKeepalive(v string)` + +SetKeepalive sets Keepalive field to given value. + + +### GetNextUpstreamTcp + +`func (o *LoadBalancerPoolStore) GetNextUpstreamTcp() string` + +GetNextUpstreamTcp returns the NextUpstreamTcp field if non-nil, zero value otherwise. + +### GetNextUpstreamTcpOk + +`func (o *LoadBalancerPoolStore) GetNextUpstreamTcpOk() (*string, bool)` + +GetNextUpstreamTcpOk returns a tuple with the NextUpstreamTcp field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNextUpstreamTcp + +`func (o *LoadBalancerPoolStore) SetNextUpstreamTcp(v string)` + +SetNextUpstreamTcp sets NextUpstreamTcp field to given value. + + +### GetRegions + +`func (o *LoadBalancerPoolStore) GetRegions() []string` + +GetRegions returns the Regions field if non-nil, zero value otherwise. + +### GetRegionsOk + +`func (o *LoadBalancerPoolStore) GetRegionsOk() (*[]string, bool)` + +GetRegionsOk returns a tuple with the Regions field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRegions + +`func (o *LoadBalancerPoolStore) SetRegions(v []string)` + +SetRegions sets Regions field to given value. + +### HasRegions + +`func (o *LoadBalancerPoolStore) HasRegions() bool` + +HasRegions returns a boolean if a field has been set. + +### GetOrigins + +`func (o *LoadBalancerPoolStore) GetOrigins() []LoadBalancerOriginStore` + +GetOrigins returns the Origins field if non-nil, zero value otherwise. + +### GetOriginsOk + +`func (o *LoadBalancerPoolStore) GetOriginsOk() (*[]LoadBalancerOriginStore, bool)` + +GetOriginsOk returns a tuple with the Origins field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOrigins + +`func (o *LoadBalancerPoolStore) SetOrigins(v []LoadBalancerOriginStore)` + +SetOrigins sets Origins field to given value. + +### HasOrigins + +`func (o *LoadBalancerPoolStore) HasOrigins() bool` + +HasOrigins returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/LoadBalancerRegion.md b/docs/LoadBalancerRegion.md new file mode 100644 index 0000000..45e48a0 --- /dev/null +++ b/docs/LoadBalancerRegion.md @@ -0,0 +1,108 @@ +# LoadBalancerRegion + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **string** | | [optional] +**Region** | Pointer to **string** | | [optional] +**Name** | Pointer to **string** | | [optional] [readonly] + +## Methods + +### NewLoadBalancerRegion + +`func NewLoadBalancerRegion() *LoadBalancerRegion` + +NewLoadBalancerRegion instantiates a new LoadBalancerRegion object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewLoadBalancerRegionWithDefaults + +`func NewLoadBalancerRegionWithDefaults() *LoadBalancerRegion` + +NewLoadBalancerRegionWithDefaults instantiates a new LoadBalancerRegion object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *LoadBalancerRegion) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *LoadBalancerRegion) 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 *LoadBalancerRegion) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *LoadBalancerRegion) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetRegion + +`func (o *LoadBalancerRegion) GetRegion() string` + +GetRegion returns the Region field if non-nil, zero value otherwise. + +### GetRegionOk + +`func (o *LoadBalancerRegion) GetRegionOk() (*string, bool)` + +GetRegionOk returns a tuple with the Region field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRegion + +`func (o *LoadBalancerRegion) SetRegion(v string)` + +SetRegion sets Region field to given value. + +### HasRegion + +`func (o *LoadBalancerRegion) HasRegion() bool` + +HasRegion returns a boolean if a field has been set. + +### GetName + +`func (o *LoadBalancerRegion) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *LoadBalancerRegion) 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 *LoadBalancerRegion) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *LoadBalancerRegion) HasName() bool` + +HasName returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/LoadBalancerResponse.md b/docs/LoadBalancerResponse.md new file mode 100644 index 0000000..0921bd6 --- /dev/null +++ b/docs/LoadBalancerResponse.md @@ -0,0 +1,92 @@ +# LoadBalancerResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**LoadBalancer**](LoadBalancer.md) | | [optional] +**Message** | Pointer to **NullableString** | | [optional] + +## Methods + +### NewLoadBalancerResponse + +`func NewLoadBalancerResponse() *LoadBalancerResponse` + +NewLoadBalancerResponse instantiates a new LoadBalancerResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewLoadBalancerResponseWithDefaults + +`func NewLoadBalancerResponseWithDefaults() *LoadBalancerResponse` + +NewLoadBalancerResponseWithDefaults instantiates a new LoadBalancerResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *LoadBalancerResponse) GetData() LoadBalancer` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *LoadBalancerResponse) GetDataOk() (*LoadBalancer, 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 *LoadBalancerResponse) SetData(v LoadBalancer)` + +SetData sets Data field to given value. + +### HasData + +`func (o *LoadBalancerResponse) HasData() bool` + +HasData returns a boolean if a field has been set. + +### GetMessage + +`func (o *LoadBalancerResponse) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *LoadBalancerResponse) GetMessageOk() (*string, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessage + +`func (o *LoadBalancerResponse) SetMessage(v string)` + +SetMessage sets Message field to given value. + +### HasMessage + +`func (o *LoadBalancerResponse) HasMessage() bool` + +HasMessage returns a boolean if a field has been set. + +### SetMessageNil + +`func (o *LoadBalancerResponse) SetMessageNil(b bool)` + + SetMessageNil sets the value for Message to be an explicit nil + +### UnsetMessage +`func (o *LoadBalancerResponse) UnsetMessage()` + +UnsetMessage ensures that no value is present for Message, not even an explicit nil + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/LoadBalancerSetting.md b/docs/LoadBalancerSetting.md new file mode 100644 index 0000000..b03187c --- /dev/null +++ b/docs/LoadBalancerSetting.md @@ -0,0 +1,186 @@ +# LoadBalancerSetting + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Method** | Pointer to **string** | | [optional] +**NextUpstreamTcp** | Pointer to **string** | | [optional] [default to "off"] +**Protocol** | Pointer to **string** | | [optional] +**Keepalive** | Pointer to **string** | | [optional] [default to "off"] +**MaxFails** | Pointer to **float32** | Zero will disable failing strategy. | [optional] [default to 0] +**FailTimeout** | Pointer to **string** | Human friendly time duration. | [optional] [default to "10s"] + +## Methods + +### NewLoadBalancerSetting + +`func NewLoadBalancerSetting() *LoadBalancerSetting` + +NewLoadBalancerSetting instantiates a new LoadBalancerSetting object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewLoadBalancerSettingWithDefaults + +`func NewLoadBalancerSettingWithDefaults() *LoadBalancerSetting` + +NewLoadBalancerSettingWithDefaults instantiates a new LoadBalancerSetting object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetMethod + +`func (o *LoadBalancerSetting) GetMethod() string` + +GetMethod returns the Method field if non-nil, zero value otherwise. + +### GetMethodOk + +`func (o *LoadBalancerSetting) GetMethodOk() (*string, bool)` + +GetMethodOk returns a tuple with the Method field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMethod + +`func (o *LoadBalancerSetting) SetMethod(v string)` + +SetMethod sets Method field to given value. + +### HasMethod + +`func (o *LoadBalancerSetting) HasMethod() bool` + +HasMethod returns a boolean if a field has been set. + +### GetNextUpstreamTcp + +`func (o *LoadBalancerSetting) GetNextUpstreamTcp() string` + +GetNextUpstreamTcp returns the NextUpstreamTcp field if non-nil, zero value otherwise. + +### GetNextUpstreamTcpOk + +`func (o *LoadBalancerSetting) GetNextUpstreamTcpOk() (*string, bool)` + +GetNextUpstreamTcpOk returns a tuple with the NextUpstreamTcp field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNextUpstreamTcp + +`func (o *LoadBalancerSetting) SetNextUpstreamTcp(v string)` + +SetNextUpstreamTcp sets NextUpstreamTcp field to given value. + +### HasNextUpstreamTcp + +`func (o *LoadBalancerSetting) HasNextUpstreamTcp() bool` + +HasNextUpstreamTcp returns a boolean if a field has been set. + +### GetProtocol + +`func (o *LoadBalancerSetting) GetProtocol() string` + +GetProtocol returns the Protocol field if non-nil, zero value otherwise. + +### GetProtocolOk + +`func (o *LoadBalancerSetting) GetProtocolOk() (*string, bool)` + +GetProtocolOk returns a tuple with the Protocol field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProtocol + +`func (o *LoadBalancerSetting) SetProtocol(v string)` + +SetProtocol sets Protocol field to given value. + +### HasProtocol + +`func (o *LoadBalancerSetting) HasProtocol() bool` + +HasProtocol returns a boolean if a field has been set. + +### GetKeepalive + +`func (o *LoadBalancerSetting) GetKeepalive() string` + +GetKeepalive returns the Keepalive field if non-nil, zero value otherwise. + +### GetKeepaliveOk + +`func (o *LoadBalancerSetting) GetKeepaliveOk() (*string, bool)` + +GetKeepaliveOk returns a tuple with the Keepalive field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKeepalive + +`func (o *LoadBalancerSetting) SetKeepalive(v string)` + +SetKeepalive sets Keepalive field to given value. + +### HasKeepalive + +`func (o *LoadBalancerSetting) HasKeepalive() bool` + +HasKeepalive returns a boolean if a field has been set. + +### GetMaxFails + +`func (o *LoadBalancerSetting) GetMaxFails() float32` + +GetMaxFails returns the MaxFails field if non-nil, zero value otherwise. + +### GetMaxFailsOk + +`func (o *LoadBalancerSetting) GetMaxFailsOk() (*float32, bool)` + +GetMaxFailsOk returns a tuple with the MaxFails field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMaxFails + +`func (o *LoadBalancerSetting) SetMaxFails(v float32)` + +SetMaxFails sets MaxFails field to given value. + +### HasMaxFails + +`func (o *LoadBalancerSetting) HasMaxFails() bool` + +HasMaxFails returns a boolean if a field has been set. + +### GetFailTimeout + +`func (o *LoadBalancerSetting) GetFailTimeout() string` + +GetFailTimeout returns the FailTimeout field if non-nil, zero value otherwise. + +### GetFailTimeoutOk + +`func (o *LoadBalancerSetting) GetFailTimeoutOk() (*string, bool)` + +GetFailTimeoutOk returns a tuple with the FailTimeout field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFailTimeout + +`func (o *LoadBalancerSetting) SetFailTimeout(v string)` + +SetFailTimeout sets FailTimeout field to given value. + +### HasFailTimeout + +`func (o *LoadBalancerSetting) HasFailTimeout() bool` + +HasFailTimeout returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/LoadBalancerSettingsData.md b/docs/LoadBalancerSettingsData.md new file mode 100644 index 0000000..08589fe --- /dev/null +++ b/docs/LoadBalancerSettingsData.md @@ -0,0 +1,56 @@ +# LoadBalancerSettingsData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**LoadBalancerSetting**](LoadBalancerSetting.md) | | [optional] + +## Methods + +### NewLoadBalancerSettingsData + +`func NewLoadBalancerSettingsData() *LoadBalancerSettingsData` + +NewLoadBalancerSettingsData instantiates a new LoadBalancerSettingsData object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewLoadBalancerSettingsDataWithDefaults + +`func NewLoadBalancerSettingsDataWithDefaults() *LoadBalancerSettingsData` + +NewLoadBalancerSettingsDataWithDefaults instantiates a new LoadBalancerSettingsData object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *LoadBalancerSettingsData) GetData() LoadBalancerSetting` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *LoadBalancerSettingsData) GetDataOk() (*LoadBalancerSetting, 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 *LoadBalancerSettingsData) SetData(v LoadBalancerSetting)` + +SetData sets Data field to given value. + +### HasData + +`func (o *LoadBalancerSettingsData) HasData() bool` + +HasData returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/LoadBalancerStore.md b/docs/LoadBalancerStore.md new file mode 100644 index 0000000..fa79efa --- /dev/null +++ b/docs/LoadBalancerStore.md @@ -0,0 +1,119 @@ +# LoadBalancerStore + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**Description** | Pointer to **string** | | [optional] +**Status** | **bool** | | +**Method** | **string** | | + +## Methods + +### NewLoadBalancerStore + +`func NewLoadBalancerStore(name string, status bool, method string, ) *LoadBalancerStore` + +NewLoadBalancerStore instantiates a new LoadBalancerStore object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewLoadBalancerStoreWithDefaults + +`func NewLoadBalancerStoreWithDefaults() *LoadBalancerStore` + +NewLoadBalancerStoreWithDefaults instantiates a new LoadBalancerStore object +This 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 *LoadBalancerStore) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *LoadBalancerStore) 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 *LoadBalancerStore) SetName(v string)` + +SetName sets Name field to given value. + + +### GetDescription + +`func (o *LoadBalancerStore) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *LoadBalancerStore) 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 *LoadBalancerStore) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *LoadBalancerStore) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetStatus + +`func (o *LoadBalancerStore) GetStatus() bool` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *LoadBalancerStore) GetStatusOk() (*bool, 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 *LoadBalancerStore) SetStatus(v bool)` + +SetStatus sets Status field to given value. + + +### GetMethod + +`func (o *LoadBalancerStore) GetMethod() string` + +GetMethod returns the Method field if non-nil, zero value otherwise. + +### GetMethodOk + +`func (o *LoadBalancerStore) GetMethodOk() (*string, bool)` + +GetMethodOk returns a tuple with the Method field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMethod + +`func (o *LoadBalancerStore) SetMethod(v string)` + +SetMethod sets Method field to given value. + + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/LoadBalancersIndex200Response.md b/docs/LoadBalancersIndex200Response.md new file mode 100644 index 0000000..47ca7a8 --- /dev/null +++ b/docs/LoadBalancersIndex200Response.md @@ -0,0 +1,56 @@ +# LoadBalancersIndex200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**[]LoadBalancer**](LoadBalancer.md) | | [optional] + +## Methods + +### NewLoadBalancersIndex200Response + +`func NewLoadBalancersIndex200Response() *LoadBalancersIndex200Response` + +NewLoadBalancersIndex200Response instantiates a new LoadBalancersIndex200Response object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewLoadBalancersIndex200ResponseWithDefaults + +`func NewLoadBalancersIndex200ResponseWithDefaults() *LoadBalancersIndex200Response` + +NewLoadBalancersIndex200ResponseWithDefaults instantiates a new LoadBalancersIndex200Response object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *LoadBalancersIndex200Response) GetData() []LoadBalancer` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *LoadBalancersIndex200Response) GetDataOk() (*[]LoadBalancer, 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 *LoadBalancersIndex200Response) SetData(v []LoadBalancer)` + +SetData sets Data field to given value. + +### HasData + +`func (o *LoadBalancersIndex200Response) HasData() bool` + +HasData returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/LoadBalancersPoolsIndex200Response.md b/docs/LoadBalancersPoolsIndex200Response.md new file mode 100644 index 0000000..d6e3337 --- /dev/null +++ b/docs/LoadBalancersPoolsIndex200Response.md @@ -0,0 +1,56 @@ +# LoadBalancersPoolsIndex200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**[]LoadBalancerPool**](LoadBalancerPool.md) | | [optional] + +## Methods + +### NewLoadBalancersPoolsIndex200Response + +`func NewLoadBalancersPoolsIndex200Response() *LoadBalancersPoolsIndex200Response` + +NewLoadBalancersPoolsIndex200Response instantiates a new LoadBalancersPoolsIndex200Response object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewLoadBalancersPoolsIndex200ResponseWithDefaults + +`func NewLoadBalancersPoolsIndex200ResponseWithDefaults() *LoadBalancersPoolsIndex200Response` + +NewLoadBalancersPoolsIndex200ResponseWithDefaults instantiates a new LoadBalancersPoolsIndex200Response object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *LoadBalancersPoolsIndex200Response) GetData() []LoadBalancerPool` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *LoadBalancersPoolsIndex200Response) GetDataOk() (*[]LoadBalancerPool, 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 *LoadBalancersPoolsIndex200Response) SetData(v []LoadBalancerPool)` + +SetData sets Data field to given value. + +### HasData + +`func (o *LoadBalancersPoolsIndex200Response) HasData() bool` + +HasData returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/LoadBalancersPoolsOriginsIndex200Response.md b/docs/LoadBalancersPoolsOriginsIndex200Response.md new file mode 100644 index 0000000..f524b36 --- /dev/null +++ b/docs/LoadBalancersPoolsOriginsIndex200Response.md @@ -0,0 +1,56 @@ +# LoadBalancersPoolsOriginsIndex200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**[]LoadBalancerOrigin**](LoadBalancerOrigin.md) | | [optional] + +## Methods + +### NewLoadBalancersPoolsOriginsIndex200Response + +`func NewLoadBalancersPoolsOriginsIndex200Response() *LoadBalancersPoolsOriginsIndex200Response` + +NewLoadBalancersPoolsOriginsIndex200Response instantiates a new LoadBalancersPoolsOriginsIndex200Response object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewLoadBalancersPoolsOriginsIndex200ResponseWithDefaults + +`func NewLoadBalancersPoolsOriginsIndex200ResponseWithDefaults() *LoadBalancersPoolsOriginsIndex200Response` + +NewLoadBalancersPoolsOriginsIndex200ResponseWithDefaults instantiates a new LoadBalancersPoolsOriginsIndex200Response object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *LoadBalancersPoolsOriginsIndex200Response) GetData() []LoadBalancerOrigin` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *LoadBalancersPoolsOriginsIndex200Response) GetDataOk() (*[]LoadBalancerOrigin, 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 *LoadBalancersPoolsOriginsIndex200Response) SetData(v []LoadBalancerOrigin)` + +SetData sets Data field to given value. + +### HasData + +`func (o *LoadBalancersPoolsOriginsIndex200Response) HasData() bool` + +HasData returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/LoadBalancersRegionsIndex200Response.md b/docs/LoadBalancersRegionsIndex200Response.md new file mode 100644 index 0000000..e7c62f1 --- /dev/null +++ b/docs/LoadBalancersRegionsIndex200Response.md @@ -0,0 +1,56 @@ +# LoadBalancersRegionsIndex200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**[]LoadBalancerRegion**](LoadBalancerRegion.md) | | [optional] + +## Methods + +### NewLoadBalancersRegionsIndex200Response + +`func NewLoadBalancersRegionsIndex200Response() *LoadBalancersRegionsIndex200Response` + +NewLoadBalancersRegionsIndex200Response instantiates a new LoadBalancersRegionsIndex200Response object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewLoadBalancersRegionsIndex200ResponseWithDefaults + +`func NewLoadBalancersRegionsIndex200ResponseWithDefaults() *LoadBalancersRegionsIndex200Response` + +NewLoadBalancersRegionsIndex200ResponseWithDefaults instantiates a new LoadBalancersRegionsIndex200Response object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *LoadBalancersRegionsIndex200Response) GetData() []LoadBalancerRegion` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *LoadBalancersRegionsIndex200Response) GetDataOk() (*[]LoadBalancerRegion, 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 *LoadBalancersRegionsIndex200Response) SetData(v []LoadBalancerRegion)` + +SetData sets Data field to given value. + +### HasData + +`func (o *LoadBalancersRegionsIndex200Response) HasData() bool` + +HasData returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/LoadBalancersSettingsUpdate200Response.md b/docs/LoadBalancersSettingsUpdate200Response.md new file mode 100644 index 0000000..74da4df --- /dev/null +++ b/docs/LoadBalancersSettingsUpdate200Response.md @@ -0,0 +1,92 @@ +# LoadBalancersSettingsUpdate200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**LoadBalancerSetting**](LoadBalancerSetting.md) | | [optional] +**Message** | Pointer to **NullableString** | | [optional] + +## Methods + +### NewLoadBalancersSettingsUpdate200Response + +`func NewLoadBalancersSettingsUpdate200Response() *LoadBalancersSettingsUpdate200Response` + +NewLoadBalancersSettingsUpdate200Response instantiates a new LoadBalancersSettingsUpdate200Response object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewLoadBalancersSettingsUpdate200ResponseWithDefaults + +`func NewLoadBalancersSettingsUpdate200ResponseWithDefaults() *LoadBalancersSettingsUpdate200Response` + +NewLoadBalancersSettingsUpdate200ResponseWithDefaults instantiates a new LoadBalancersSettingsUpdate200Response object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *LoadBalancersSettingsUpdate200Response) GetData() LoadBalancerSetting` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *LoadBalancersSettingsUpdate200Response) GetDataOk() (*LoadBalancerSetting, 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 *LoadBalancersSettingsUpdate200Response) SetData(v LoadBalancerSetting)` + +SetData sets Data field to given value. + +### HasData + +`func (o *LoadBalancersSettingsUpdate200Response) HasData() bool` + +HasData returns a boolean if a field has been set. + +### GetMessage + +`func (o *LoadBalancersSettingsUpdate200Response) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *LoadBalancersSettingsUpdate200Response) GetMessageOk() (*string, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessage + +`func (o *LoadBalancersSettingsUpdate200Response) SetMessage(v string)` + +SetMessage sets Message field to given value. + +### HasMessage + +`func (o *LoadBalancersSettingsUpdate200Response) HasMessage() bool` + +HasMessage returns a boolean if a field has been set. + +### SetMessageNil + +`func (o *LoadBalancersSettingsUpdate200Response) SetMessageNil(b bool)` + + SetMessageNil sets the value for Message to be an explicit nil + +### UnsetMessage +`func (o *LoadBalancersSettingsUpdate200Response) UnsetMessage()` + +UnsetMessage ensures that no value is present for Message, not even an explicit nil + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/LoadBalancingApi.md b/docs/LoadBalancingApi.md new file mode 100644 index 0000000..f0edff4 --- /dev/null +++ b/docs/LoadBalancingApi.md @@ -0,0 +1,1478 @@ +# \LoadBalancingApi + +All URIs are relative to *https://napi.arvancloud.ir/cdn/4.0* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**LoadBalancersDestroy**](LoadBalancingApi.md#LoadBalancersDestroy) | **Delete** /domains/{domain}/load-balancers/{loadBalancerId} | Remove a load balancer +[**LoadBalancersIndex**](LoadBalancingApi.md#LoadBalancersIndex) | **Get** /domains/{domain}/load-balancers | Get list of load balancers +[**LoadBalancersPoolsDestroy**](LoadBalancingApi.md#LoadBalancersPoolsDestroy) | **Delete** /domains/{domain}/load-balancers/{loadBalancerId}/pools/{loadBalancerPoolId} | Remove a load balancer pool +[**LoadBalancersPoolsIndex**](LoadBalancingApi.md#LoadBalancersPoolsIndex) | **Get** /domains/{domain}/load-balancers/{loadBalancerId}/pools | Get the list of pools of a load balancers +[**LoadBalancersPoolsOriginsDestroy**](LoadBalancingApi.md#LoadBalancersPoolsOriginsDestroy) | **Delete** /domains/{domain}/load-balancers/{loadBalancerId}/pools/{loadBalancerPoolId}/origins/{loadBalancerPoolOriginId} | Remove an origin from the pool of the load balancer +[**LoadBalancersPoolsOriginsIndex**](LoadBalancingApi.md#LoadBalancersPoolsOriginsIndex) | **Get** /domains/{domain}/load-balancers/{loadBalancerId}/pools/{loadBalancerPoolId}/origins | Get list of origins of a pool +[**LoadBalancersPoolsOriginsShow**](LoadBalancingApi.md#LoadBalancersPoolsOriginsShow) | **Get** /domains/{domain}/load-balancers/{loadBalancerId}/pools/{loadBalancerPoolId}/origins/{loadBalancerPoolOriginId} | Get load balancer origin information +[**LoadBalancersPoolsOriginsStore**](LoadBalancingApi.md#LoadBalancersPoolsOriginsStore) | **Post** /domains/{domain}/load-balancers/{loadBalancerId}/pools/{loadBalancerPoolId}/origins | Create a new origin in the pool of the load balancer +[**LoadBalancersPoolsOriginsUpdate**](LoadBalancingApi.md#LoadBalancersPoolsOriginsUpdate) | **Patch** /domains/{domain}/load-balancers/{loadBalancerId}/pools/{loadBalancerPoolId}/origins/{loadBalancerPoolOriginId} | Update an existing origin of the pool +[**LoadBalancersPoolsShow**](LoadBalancingApi.md#LoadBalancersPoolsShow) | **Get** /domains/{domain}/load-balancers/{loadBalancerId}/pools/{loadBalancerPoolId} | Get load balancer pool information +[**LoadBalancersPoolsStore**](LoadBalancingApi.md#LoadBalancersPoolsStore) | **Post** /domains/{domain}/load-balancers/{loadBalancerId}/pools | Create a new pool for the load balancer +[**LoadBalancersPoolsUpdate**](LoadBalancingApi.md#LoadBalancersPoolsUpdate) | **Put** /domains/{domain}/load-balancers/{loadBalancerId}/pools/{loadBalancerPoolId} | Update an existing load balancer pool with origins +[**LoadBalancersPoolsUpdatePool**](LoadBalancingApi.md#LoadBalancersPoolsUpdatePool) | **Patch** /domains/{domain}/load-balancers/{loadBalancerId}/pools/{loadBalancerPoolId} | Update an existing load balancer pool +[**LoadBalancersPrioritizePool**](LoadBalancingApi.md#LoadBalancersPrioritizePool) | **Post** /domains/{domain}/load-balancers/{loadBalancerId}/prioritize | Reorder the priority of load balancer pools +[**LoadBalancersRegionsIndex**](LoadBalancingApi.md#LoadBalancersRegionsIndex) | **Get** /load-balancers/regions | Get list of regions for load balancers +[**LoadBalancersSettingsShow**](LoadBalancingApi.md#LoadBalancersSettingsShow) | **Get** /domains/{domain}/load-balancers/settings | Get list of domain load balancer global settings +[**LoadBalancersSettingsUpdate**](LoadBalancingApi.md#LoadBalancersSettingsUpdate) | **Patch** /domains/{domain}/load-balancers/settings | Update domain's global load balancer settings +[**LoadBalancersShow**](LoadBalancingApi.md#LoadBalancersShow) | **Get** /domains/{domain}/load-balancers/{loadBalancerId} | Get load balancer information +[**LoadBalancersStore**](LoadBalancingApi.md#LoadBalancersStore) | **Post** /domains/{domain}/load-balancers | Create a new load balancer +[**LoadBalancersUpdate**](LoadBalancingApi.md#LoadBalancersUpdate) | **Patch** /domains/{domain}/load-balancers/{loadBalancerId} | Update a load balancer + + + +## LoadBalancersDestroy + +> MessageResponse LoadBalancersDestroy(ctx, domain, loadBalancerId).Execute() + +Remove a load balancer + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + loadBalancerId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ID of the load balancer + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.LoadBalancingApi.LoadBalancersDestroy(context.Background(), domain, loadBalancerId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `LoadBalancingApi.LoadBalancersDestroy``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `LoadBalancersDestroy`: MessageResponse + fmt.Fprintf(os.Stdout, "Response from `LoadBalancingApi.LoadBalancersDestroy`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | +**loadBalancerId** | **string** | ID of the load balancer | + +### Other Parameters + +Other parameters are passed through a pointer to a apiLoadBalancersDestroyRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + +[**MessageResponse**](MessageResponse.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## LoadBalancersIndex + +> LoadBalancersIndex200Response LoadBalancersIndex(ctx, domain).Execute() + +Get list of load balancers + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.LoadBalancingApi.LoadBalancersIndex(context.Background(), domain).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `LoadBalancingApi.LoadBalancersIndex``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `LoadBalancersIndex`: LoadBalancersIndex200Response + fmt.Fprintf(os.Stdout, "Response from `LoadBalancingApi.LoadBalancersIndex`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiLoadBalancersIndexRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**LoadBalancersIndex200Response**](LoadBalancersIndex200Response.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## LoadBalancersPoolsDestroy + +> MessageResponse LoadBalancersPoolsDestroy(ctx, domain, loadBalancerId, loadBalancerPoolId).Execute() + +Remove a load balancer pool + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + loadBalancerId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ID of the load balancer + loadBalancerPoolId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ID of a pool of the load balancer + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.LoadBalancingApi.LoadBalancersPoolsDestroy(context.Background(), domain, loadBalancerId, loadBalancerPoolId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `LoadBalancingApi.LoadBalancersPoolsDestroy``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `LoadBalancersPoolsDestroy`: MessageResponse + fmt.Fprintf(os.Stdout, "Response from `LoadBalancingApi.LoadBalancersPoolsDestroy`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | +**loadBalancerId** | **string** | ID of the load balancer | +**loadBalancerPoolId** | **string** | ID of a pool of the load balancer | + +### Other Parameters + +Other parameters are passed through a pointer to a apiLoadBalancersPoolsDestroyRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + +### Return type + +[**MessageResponse**](MessageResponse.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## LoadBalancersPoolsIndex + +> LoadBalancersPoolsIndex200Response LoadBalancersPoolsIndex(ctx, domain, loadBalancerId).Execute() + +Get the list of pools of a load balancers + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + loadBalancerId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ID of the load balancer + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.LoadBalancingApi.LoadBalancersPoolsIndex(context.Background(), domain, loadBalancerId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `LoadBalancingApi.LoadBalancersPoolsIndex``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `LoadBalancersPoolsIndex`: LoadBalancersPoolsIndex200Response + fmt.Fprintf(os.Stdout, "Response from `LoadBalancingApi.LoadBalancersPoolsIndex`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | +**loadBalancerId** | **string** | ID of the load balancer | + +### Other Parameters + +Other parameters are passed through a pointer to a apiLoadBalancersPoolsIndexRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + +[**LoadBalancersPoolsIndex200Response**](LoadBalancersPoolsIndex200Response.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## LoadBalancersPoolsOriginsDestroy + +> MessageResponse LoadBalancersPoolsOriginsDestroy(ctx, domain, loadBalancerId, loadBalancerPoolId, loadBalancerPoolOriginId).Execute() + +Remove an origin from the pool of the load balancer + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + loadBalancerId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ID of the load balancer + loadBalancerPoolId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ID of a pool of the load balancer + loadBalancerPoolOriginId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ID of an origin of the pool in the load balancer + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.LoadBalancingApi.LoadBalancersPoolsOriginsDestroy(context.Background(), domain, loadBalancerId, loadBalancerPoolId, loadBalancerPoolOriginId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `LoadBalancingApi.LoadBalancersPoolsOriginsDestroy``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `LoadBalancersPoolsOriginsDestroy`: MessageResponse + fmt.Fprintf(os.Stdout, "Response from `LoadBalancingApi.LoadBalancersPoolsOriginsDestroy`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | +**loadBalancerId** | **string** | ID of the load balancer | +**loadBalancerPoolId** | **string** | ID of a pool of the load balancer | +**loadBalancerPoolOriginId** | **string** | ID of an origin of the pool in the load balancer | + +### Other Parameters + +Other parameters are passed through a pointer to a apiLoadBalancersPoolsOriginsDestroyRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + + +### Return type + +[**MessageResponse**](MessageResponse.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## LoadBalancersPoolsOriginsIndex + +> LoadBalancersPoolsOriginsIndex200Response LoadBalancersPoolsOriginsIndex(ctx, domain, loadBalancerId, loadBalancerPoolId).Execute() + +Get list of origins of a pool + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + loadBalancerId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ID of the load balancer + loadBalancerPoolId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ID of a pool of the load balancer + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.LoadBalancingApi.LoadBalancersPoolsOriginsIndex(context.Background(), domain, loadBalancerId, loadBalancerPoolId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `LoadBalancingApi.LoadBalancersPoolsOriginsIndex``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `LoadBalancersPoolsOriginsIndex`: LoadBalancersPoolsOriginsIndex200Response + fmt.Fprintf(os.Stdout, "Response from `LoadBalancingApi.LoadBalancersPoolsOriginsIndex`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | +**loadBalancerId** | **string** | ID of the load balancer | +**loadBalancerPoolId** | **string** | ID of a pool of the load balancer | + +### Other Parameters + +Other parameters are passed through a pointer to a apiLoadBalancersPoolsOriginsIndexRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + +### Return type + +[**LoadBalancersPoolsOriginsIndex200Response**](LoadBalancersPoolsOriginsIndex200Response.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## LoadBalancersPoolsOriginsShow + +> LoadBalancerOriginData LoadBalancersPoolsOriginsShow(ctx, domain, loadBalancerId, loadBalancerPoolId, loadBalancerPoolOriginId).Execute() + +Get load balancer origin information + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + loadBalancerId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ID of the load balancer + loadBalancerPoolId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ID of a pool of the load balancer + loadBalancerPoolOriginId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ID of an origin of the pool in the load balancer + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.LoadBalancingApi.LoadBalancersPoolsOriginsShow(context.Background(), domain, loadBalancerId, loadBalancerPoolId, loadBalancerPoolOriginId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `LoadBalancingApi.LoadBalancersPoolsOriginsShow``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `LoadBalancersPoolsOriginsShow`: LoadBalancerOriginData + fmt.Fprintf(os.Stdout, "Response from `LoadBalancingApi.LoadBalancersPoolsOriginsShow`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | +**loadBalancerId** | **string** | ID of the load balancer | +**loadBalancerPoolId** | **string** | ID of a pool of the load balancer | +**loadBalancerPoolOriginId** | **string** | ID of an origin of the pool in the load balancer | + +### Other Parameters + +Other parameters are passed through a pointer to a apiLoadBalancersPoolsOriginsShowRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + + +### Return type + +[**LoadBalancerOriginData**](LoadBalancerOriginData.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## LoadBalancersPoolsOriginsStore + +> LoadBalancerOriginResponse LoadBalancersPoolsOriginsStore(ctx, domain, loadBalancerId, loadBalancerPoolId).LoadBalancerOriginStore(loadBalancerOriginStore).Execute() + +Create a new origin in the pool of the load balancer + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + loadBalancerId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ID of the load balancer + loadBalancerPoolId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ID of a pool of the load balancer + loadBalancerOriginStore := *openapiclient.NewLoadBalancerOriginStore(false, "Address_example", int32(123), int32(123), "Protocol_example") // LoadBalancerOriginStore | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.LoadBalancingApi.LoadBalancersPoolsOriginsStore(context.Background(), domain, loadBalancerId, loadBalancerPoolId).LoadBalancerOriginStore(loadBalancerOriginStore).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `LoadBalancingApi.LoadBalancersPoolsOriginsStore``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `LoadBalancersPoolsOriginsStore`: LoadBalancerOriginResponse + fmt.Fprintf(os.Stdout, "Response from `LoadBalancingApi.LoadBalancersPoolsOriginsStore`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | +**loadBalancerId** | **string** | ID of the load balancer | +**loadBalancerPoolId** | **string** | ID of a pool of the load balancer | + +### Other Parameters + +Other parameters are passed through a pointer to a apiLoadBalancersPoolsOriginsStoreRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + **loadBalancerOriginStore** | [**LoadBalancerOriginStore**](LoadBalancerOriginStore.md) | | + +### Return type + +[**LoadBalancerOriginResponse**](LoadBalancerOriginResponse.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## LoadBalancersPoolsOriginsUpdate + +> LoadBalancerOriginResponse LoadBalancersPoolsOriginsUpdate(ctx, domain, loadBalancerId, loadBalancerPoolId, loadBalancerPoolOriginId).LoadBalancerOrigin(loadBalancerOrigin).Execute() + +Update an existing origin of the pool + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + loadBalancerId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ID of the load balancer + loadBalancerPoolId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ID of a pool of the load balancer + loadBalancerPoolOriginId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ID of an origin of the pool in the load balancer + loadBalancerOrigin := *openapiclient.NewLoadBalancerOrigin() // LoadBalancerOrigin | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.LoadBalancingApi.LoadBalancersPoolsOriginsUpdate(context.Background(), domain, loadBalancerId, loadBalancerPoolId, loadBalancerPoolOriginId).LoadBalancerOrigin(loadBalancerOrigin).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `LoadBalancingApi.LoadBalancersPoolsOriginsUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `LoadBalancersPoolsOriginsUpdate`: LoadBalancerOriginResponse + fmt.Fprintf(os.Stdout, "Response from `LoadBalancingApi.LoadBalancersPoolsOriginsUpdate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | +**loadBalancerId** | **string** | ID of the load balancer | +**loadBalancerPoolId** | **string** | ID of a pool of the load balancer | +**loadBalancerPoolOriginId** | **string** | ID of an origin of the pool in the load balancer | + +### Other Parameters + +Other parameters are passed through a pointer to a apiLoadBalancersPoolsOriginsUpdateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + + **loadBalancerOrigin** | [**LoadBalancerOrigin**](LoadBalancerOrigin.md) | | + +### Return type + +[**LoadBalancerOriginResponse**](LoadBalancerOriginResponse.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## LoadBalancersPoolsShow + +> LoadBalancerPoolData LoadBalancersPoolsShow(ctx, domain, loadBalancerId, loadBalancerPoolId).Execute() + +Get load balancer pool information + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + loadBalancerId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ID of the load balancer + loadBalancerPoolId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ID of a pool of the load balancer + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.LoadBalancingApi.LoadBalancersPoolsShow(context.Background(), domain, loadBalancerId, loadBalancerPoolId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `LoadBalancingApi.LoadBalancersPoolsShow``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `LoadBalancersPoolsShow`: LoadBalancerPoolData + fmt.Fprintf(os.Stdout, "Response from `LoadBalancingApi.LoadBalancersPoolsShow`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | +**loadBalancerId** | **string** | ID of the load balancer | +**loadBalancerPoolId** | **string** | ID of a pool of the load balancer | + +### Other Parameters + +Other parameters are passed through a pointer to a apiLoadBalancersPoolsShowRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + +### Return type + +[**LoadBalancerPoolData**](LoadBalancerPoolData.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## LoadBalancersPoolsStore + +> LoadBalancerPoolResponse LoadBalancersPoolsStore(ctx, domain, loadBalancerId).LoadBalancerPoolStore(loadBalancerPoolStore).Execute() + +Create a new pool for the load balancer + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + loadBalancerId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ID of the load balancer + loadBalancerPoolStore := *openapiclient.NewLoadBalancerPoolStore("Name_example", false, "Method_example", "Keepalive_example", "NextUpstreamTcp_example") // LoadBalancerPoolStore | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.LoadBalancingApi.LoadBalancersPoolsStore(context.Background(), domain, loadBalancerId).LoadBalancerPoolStore(loadBalancerPoolStore).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `LoadBalancingApi.LoadBalancersPoolsStore``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `LoadBalancersPoolsStore`: LoadBalancerPoolResponse + fmt.Fprintf(os.Stdout, "Response from `LoadBalancingApi.LoadBalancersPoolsStore`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | +**loadBalancerId** | **string** | ID of the load balancer | + +### Other Parameters + +Other parameters are passed through a pointer to a apiLoadBalancersPoolsStoreRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **loadBalancerPoolStore** | [**LoadBalancerPoolStore**](LoadBalancerPoolStore.md) | | + +### Return type + +[**LoadBalancerPoolResponse**](LoadBalancerPoolResponse.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## LoadBalancersPoolsUpdate + +> LoadBalancerPoolResponse LoadBalancersPoolsUpdate(ctx, domain, loadBalancerId, loadBalancerPoolId).LoadBalancerPoolStore(loadBalancerPoolStore).Execute() + +Update an existing load balancer pool with origins + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + loadBalancerId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ID of the load balancer + loadBalancerPoolId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ID of a pool of the load balancer + loadBalancerPoolStore := *openapiclient.NewLoadBalancerPoolStore("Name_example", false, "Method_example", "Keepalive_example", "NextUpstreamTcp_example") // LoadBalancerPoolStore | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.LoadBalancingApi.LoadBalancersPoolsUpdate(context.Background(), domain, loadBalancerId, loadBalancerPoolId).LoadBalancerPoolStore(loadBalancerPoolStore).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `LoadBalancingApi.LoadBalancersPoolsUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `LoadBalancersPoolsUpdate`: LoadBalancerPoolResponse + fmt.Fprintf(os.Stdout, "Response from `LoadBalancingApi.LoadBalancersPoolsUpdate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | +**loadBalancerId** | **string** | ID of the load balancer | +**loadBalancerPoolId** | **string** | ID of a pool of the load balancer | + +### Other Parameters + +Other parameters are passed through a pointer to a apiLoadBalancersPoolsUpdateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + **loadBalancerPoolStore** | [**LoadBalancerPoolStore**](LoadBalancerPoolStore.md) | | + +### Return type + +[**LoadBalancerPoolResponse**](LoadBalancerPoolResponse.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## LoadBalancersPoolsUpdatePool + +> LoadBalancerPoolResponse LoadBalancersPoolsUpdatePool(ctx, domain, loadBalancerId, loadBalancerPoolId).LoadBalancerPool(loadBalancerPool).Execute() + +Update an existing load balancer pool + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + loadBalancerId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ID of the load balancer + loadBalancerPoolId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ID of a pool of the load balancer + loadBalancerPool := *openapiclient.NewLoadBalancerPool() // LoadBalancerPool | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.LoadBalancingApi.LoadBalancersPoolsUpdatePool(context.Background(), domain, loadBalancerId, loadBalancerPoolId).LoadBalancerPool(loadBalancerPool).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `LoadBalancingApi.LoadBalancersPoolsUpdatePool``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `LoadBalancersPoolsUpdatePool`: LoadBalancerPoolResponse + fmt.Fprintf(os.Stdout, "Response from `LoadBalancingApi.LoadBalancersPoolsUpdatePool`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | +**loadBalancerId** | **string** | ID of the load balancer | +**loadBalancerPoolId** | **string** | ID of a pool of the load balancer | + +### Other Parameters + +Other parameters are passed through a pointer to a apiLoadBalancersPoolsUpdatePoolRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + **loadBalancerPool** | [**LoadBalancerPool**](LoadBalancerPool.md) | | + +### Return type + +[**LoadBalancerPoolResponse**](LoadBalancerPoolResponse.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## LoadBalancersPrioritizePool + +> LoadBalancerResponse LoadBalancersPrioritizePool(ctx, domain, loadBalancerId).PrioritizePool(prioritizePool).Execute() + +Reorder the priority of load balancer pools + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + loadBalancerId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ID of the load balancer + prioritizePool := *openapiclient.NewPrioritizePool("PoolId_example", "AfterPoolId_example", "BeforePoolId_example") // PrioritizePool | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.LoadBalancingApi.LoadBalancersPrioritizePool(context.Background(), domain, loadBalancerId).PrioritizePool(prioritizePool).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `LoadBalancingApi.LoadBalancersPrioritizePool``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `LoadBalancersPrioritizePool`: LoadBalancerResponse + fmt.Fprintf(os.Stdout, "Response from `LoadBalancingApi.LoadBalancersPrioritizePool`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | +**loadBalancerId** | **string** | ID of the load balancer | + +### Other Parameters + +Other parameters are passed through a pointer to a apiLoadBalancersPrioritizePoolRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **prioritizePool** | [**PrioritizePool**](PrioritizePool.md) | | + +### Return type + +[**LoadBalancerResponse**](LoadBalancerResponse.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## LoadBalancersRegionsIndex + +> LoadBalancersRegionsIndex200Response LoadBalancersRegionsIndex(ctx).Execute() + +Get list of regions for load balancers + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.LoadBalancingApi.LoadBalancersRegionsIndex(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `LoadBalancingApi.LoadBalancersRegionsIndex``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `LoadBalancersRegionsIndex`: LoadBalancersRegionsIndex200Response + fmt.Fprintf(os.Stdout, "Response from `LoadBalancingApi.LoadBalancersRegionsIndex`: %v\n", resp) +} +``` + +### Path Parameters + +This endpoint does not need any parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a apiLoadBalancersRegionsIndexRequest struct via the builder pattern + + +### Return type + +[**LoadBalancersRegionsIndex200Response**](LoadBalancersRegionsIndex200Response.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## LoadBalancersSettingsShow + +> LoadBalancerSettingsData LoadBalancersSettingsShow(ctx, domain).Execute() + +Get list of domain load balancer global settings + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.LoadBalancingApi.LoadBalancersSettingsShow(context.Background(), domain).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `LoadBalancingApi.LoadBalancersSettingsShow``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `LoadBalancersSettingsShow`: LoadBalancerSettingsData + fmt.Fprintf(os.Stdout, "Response from `LoadBalancingApi.LoadBalancersSettingsShow`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiLoadBalancersSettingsShowRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**LoadBalancerSettingsData**](LoadBalancerSettingsData.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## LoadBalancersSettingsUpdate + +> LoadBalancersSettingsUpdate200Response LoadBalancersSettingsUpdate(ctx, domain).LoadBalancerSetting(loadBalancerSetting).Execute() + +Update domain's global load balancer settings + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + loadBalancerSetting := *openapiclient.NewLoadBalancerSetting() // LoadBalancerSetting | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.LoadBalancingApi.LoadBalancersSettingsUpdate(context.Background(), domain).LoadBalancerSetting(loadBalancerSetting).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `LoadBalancingApi.LoadBalancersSettingsUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `LoadBalancersSettingsUpdate`: LoadBalancersSettingsUpdate200Response + fmt.Fprintf(os.Stdout, "Response from `LoadBalancingApi.LoadBalancersSettingsUpdate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiLoadBalancersSettingsUpdateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **loadBalancerSetting** | [**LoadBalancerSetting**](LoadBalancerSetting.md) | | + +### Return type + +[**LoadBalancersSettingsUpdate200Response**](LoadBalancersSettingsUpdate200Response.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## LoadBalancersShow + +> LoadBalancerData LoadBalancersShow(ctx, domain, loadBalancerId).Execute() + +Get load balancer information + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + loadBalancerId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ID of the load balancer + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.LoadBalancingApi.LoadBalancersShow(context.Background(), domain, loadBalancerId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `LoadBalancingApi.LoadBalancersShow``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `LoadBalancersShow`: LoadBalancerData + fmt.Fprintf(os.Stdout, "Response from `LoadBalancingApi.LoadBalancersShow`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | +**loadBalancerId** | **string** | ID of the load balancer | + +### Other Parameters + +Other parameters are passed through a pointer to a apiLoadBalancersShowRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + +[**LoadBalancerData**](LoadBalancerData.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## LoadBalancersStore + +> LoadBalancerResponse LoadBalancersStore(ctx, domain).LoadBalancerStore(loadBalancerStore).Execute() + +Create a new load balancer + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + loadBalancerStore := *openapiclient.NewLoadBalancerStore("lb1", false, "Method_example") // LoadBalancerStore | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.LoadBalancingApi.LoadBalancersStore(context.Background(), domain).LoadBalancerStore(loadBalancerStore).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `LoadBalancingApi.LoadBalancersStore``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `LoadBalancersStore`: LoadBalancerResponse + fmt.Fprintf(os.Stdout, "Response from `LoadBalancingApi.LoadBalancersStore`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiLoadBalancersStoreRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **loadBalancerStore** | [**LoadBalancerStore**](LoadBalancerStore.md) | | + +### Return type + +[**LoadBalancerResponse**](LoadBalancerResponse.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## LoadBalancersUpdate + +> LoadBalancerResponse LoadBalancersUpdate(ctx, domain, loadBalancerId).LoadBalancer(loadBalancer).Execute() + +Update a load balancer + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + loadBalancerId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ID of the load balancer + loadBalancer := *openapiclient.NewLoadBalancer() // LoadBalancer | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.LoadBalancingApi.LoadBalancersUpdate(context.Background(), domain, loadBalancerId).LoadBalancer(loadBalancer).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `LoadBalancingApi.LoadBalancersUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `LoadBalancersUpdate`: LoadBalancerResponse + fmt.Fprintf(os.Stdout, "Response from `LoadBalancingApi.LoadBalancersUpdate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | +**loadBalancerId** | **string** | ID of the load balancer | + +### Other Parameters + +Other parameters are passed through a pointer to a apiLoadBalancersUpdateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **loadBalancer** | [**LoadBalancer**](LoadBalancer.md) | | + +### Return type + +[**LoadBalancerResponse**](LoadBalancerResponse.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + diff --git a/docs/LogForwarder.md b/docs/LogForwarder.md new file mode 100644 index 0000000..0a7320b --- /dev/null +++ b/docs/LogForwarder.md @@ -0,0 +1,177 @@ +# LogForwarder + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**Description** | **string** | | +**Type** | **string** | | +**ConnectionType** | **string** | | +**DataFormat** | [**LogForwarderDataFormat**](LogForwarderDataFormat.md) | | +**Settings** | [**LogForwarderSetting**](LogForwarderSetting.md) | | +**Status** | **bool** | | + +## Methods + +### NewLogForwarder + +`func NewLogForwarder(name string, description string, type_ string, connectionType string, dataFormat LogForwarderDataFormat, settings LogForwarderSetting, status bool, ) *LogForwarder` + +NewLogForwarder instantiates a new LogForwarder object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewLogForwarderWithDefaults + +`func NewLogForwarderWithDefaults() *LogForwarder` + +NewLogForwarderWithDefaults instantiates a new LogForwarder object +This 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 *LogForwarder) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *LogForwarder) 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 *LogForwarder) SetName(v string)` + +SetName sets Name field to given value. + + +### GetDescription + +`func (o *LogForwarder) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *LogForwarder) 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 *LogForwarder) SetDescription(v string)` + +SetDescription sets Description field to given value. + + +### GetType + +`func (o *LogForwarder) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *LogForwarder) 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 *LogForwarder) SetType(v string)` + +SetType sets Type field to given value. + + +### GetConnectionType + +`func (o *LogForwarder) GetConnectionType() string` + +GetConnectionType returns the ConnectionType field if non-nil, zero value otherwise. + +### GetConnectionTypeOk + +`func (o *LogForwarder) GetConnectionTypeOk() (*string, bool)` + +GetConnectionTypeOk returns a tuple with the ConnectionType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConnectionType + +`func (o *LogForwarder) SetConnectionType(v string)` + +SetConnectionType sets ConnectionType field to given value. + + +### GetDataFormat + +`func (o *LogForwarder) GetDataFormat() LogForwarderDataFormat` + +GetDataFormat returns the DataFormat field if non-nil, zero value otherwise. + +### GetDataFormatOk + +`func (o *LogForwarder) GetDataFormatOk() (*LogForwarderDataFormat, bool)` + +GetDataFormatOk returns a tuple with the DataFormat field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDataFormat + +`func (o *LogForwarder) SetDataFormat(v LogForwarderDataFormat)` + +SetDataFormat sets DataFormat field to given value. + + +### GetSettings + +`func (o *LogForwarder) GetSettings() LogForwarderSetting` + +GetSettings returns the Settings field if non-nil, zero value otherwise. + +### GetSettingsOk + +`func (o *LogForwarder) GetSettingsOk() (*LogForwarderSetting, bool)` + +GetSettingsOk returns a tuple with the Settings field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSettings + +`func (o *LogForwarder) SetSettings(v LogForwarderSetting)` + +SetSettings sets Settings field to given value. + + +### GetStatus + +`func (o *LogForwarder) GetStatus() bool` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *LogForwarder) GetStatusOk() (*bool, 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 *LogForwarder) SetStatus(v bool)` + +SetStatus sets Status field to given value. + + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/LogForwarderAccessLogType.md b/docs/LogForwarderAccessLogType.md new file mode 100644 index 0000000..3d46143 --- /dev/null +++ b/docs/LogForwarderAccessLogType.md @@ -0,0 +1,498 @@ +# LogForwarderAccessLogType + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Method** | Pointer to **bool** | | [optional] +**Scheme** | Pointer to **bool** | | [optional] +**Domain** | Pointer to **bool** | | [optional] +**Uri** | Pointer to **bool** | | [optional] +**QueryString** | Pointer to **bool** | | [optional] +**Referer** | Pointer to **bool** | | [optional] +**Ip** | Pointer to **bool** | | [optional] +**Ua** | Pointer to **bool** | | [optional] +**Country** | Pointer to **bool** | | [optional] +**Asn** | Pointer to **bool** | | [optional] +**ContentType** | Pointer to **bool** | | [optional] +**Status** | Pointer to **bool** | | [optional] +**ServerPort** | Pointer to **bool** | | [optional] +**BytesSent** | Pointer to **bool** | | [optional] +**BytesReceived** | Pointer to **bool** | | [optional] +**UpstreamTime** | Pointer to **bool** | | [optional] +**Cache** | Pointer to **bool** | | [optional] +**RequestId** | Pointer to **bool** | | [optional] + +## Methods + +### NewLogForwarderAccessLogType + +`func NewLogForwarderAccessLogType() *LogForwarderAccessLogType` + +NewLogForwarderAccessLogType instantiates a new LogForwarderAccessLogType object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewLogForwarderAccessLogTypeWithDefaults + +`func NewLogForwarderAccessLogTypeWithDefaults() *LogForwarderAccessLogType` + +NewLogForwarderAccessLogTypeWithDefaults instantiates a new LogForwarderAccessLogType object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetMethod + +`func (o *LogForwarderAccessLogType) GetMethod() bool` + +GetMethod returns the Method field if non-nil, zero value otherwise. + +### GetMethodOk + +`func (o *LogForwarderAccessLogType) GetMethodOk() (*bool, bool)` + +GetMethodOk returns a tuple with the Method field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMethod + +`func (o *LogForwarderAccessLogType) SetMethod(v bool)` + +SetMethod sets Method field to given value. + +### HasMethod + +`func (o *LogForwarderAccessLogType) HasMethod() bool` + +HasMethod returns a boolean if a field has been set. + +### GetScheme + +`func (o *LogForwarderAccessLogType) GetScheme() bool` + +GetScheme returns the Scheme field if non-nil, zero value otherwise. + +### GetSchemeOk + +`func (o *LogForwarderAccessLogType) GetSchemeOk() (*bool, bool)` + +GetSchemeOk returns a tuple with the Scheme field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetScheme + +`func (o *LogForwarderAccessLogType) SetScheme(v bool)` + +SetScheme sets Scheme field to given value. + +### HasScheme + +`func (o *LogForwarderAccessLogType) HasScheme() bool` + +HasScheme returns a boolean if a field has been set. + +### GetDomain + +`func (o *LogForwarderAccessLogType) GetDomain() bool` + +GetDomain returns the Domain field if non-nil, zero value otherwise. + +### GetDomainOk + +`func (o *LogForwarderAccessLogType) GetDomainOk() (*bool, bool)` + +GetDomainOk returns a tuple with the Domain field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDomain + +`func (o *LogForwarderAccessLogType) SetDomain(v bool)` + +SetDomain sets Domain field to given value. + +### HasDomain + +`func (o *LogForwarderAccessLogType) HasDomain() bool` + +HasDomain returns a boolean if a field has been set. + +### GetUri + +`func (o *LogForwarderAccessLogType) GetUri() bool` + +GetUri returns the Uri field if non-nil, zero value otherwise. + +### GetUriOk + +`func (o *LogForwarderAccessLogType) GetUriOk() (*bool, bool)` + +GetUriOk returns a tuple with the Uri field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUri + +`func (o *LogForwarderAccessLogType) SetUri(v bool)` + +SetUri sets Uri field to given value. + +### HasUri + +`func (o *LogForwarderAccessLogType) HasUri() bool` + +HasUri returns a boolean if a field has been set. + +### GetQueryString + +`func (o *LogForwarderAccessLogType) GetQueryString() bool` + +GetQueryString returns the QueryString field if non-nil, zero value otherwise. + +### GetQueryStringOk + +`func (o *LogForwarderAccessLogType) GetQueryStringOk() (*bool, bool)` + +GetQueryStringOk returns a tuple with the QueryString field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetQueryString + +`func (o *LogForwarderAccessLogType) SetQueryString(v bool)` + +SetQueryString sets QueryString field to given value. + +### HasQueryString + +`func (o *LogForwarderAccessLogType) HasQueryString() bool` + +HasQueryString returns a boolean if a field has been set. + +### GetReferer + +`func (o *LogForwarderAccessLogType) GetReferer() bool` + +GetReferer returns the Referer field if non-nil, zero value otherwise. + +### GetRefererOk + +`func (o *LogForwarderAccessLogType) GetRefererOk() (*bool, bool)` + +GetRefererOk returns a tuple with the Referer field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetReferer + +`func (o *LogForwarderAccessLogType) SetReferer(v bool)` + +SetReferer sets Referer field to given value. + +### HasReferer + +`func (o *LogForwarderAccessLogType) HasReferer() bool` + +HasReferer returns a boolean if a field has been set. + +### GetIp + +`func (o *LogForwarderAccessLogType) GetIp() bool` + +GetIp returns the Ip field if non-nil, zero value otherwise. + +### GetIpOk + +`func (o *LogForwarderAccessLogType) GetIpOk() (*bool, bool)` + +GetIpOk returns a tuple with the Ip field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIp + +`func (o *LogForwarderAccessLogType) SetIp(v bool)` + +SetIp sets Ip field to given value. + +### HasIp + +`func (o *LogForwarderAccessLogType) HasIp() bool` + +HasIp returns a boolean if a field has been set. + +### GetUa + +`func (o *LogForwarderAccessLogType) GetUa() bool` + +GetUa returns the Ua field if non-nil, zero value otherwise. + +### GetUaOk + +`func (o *LogForwarderAccessLogType) GetUaOk() (*bool, bool)` + +GetUaOk returns a tuple with the Ua field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUa + +`func (o *LogForwarderAccessLogType) SetUa(v bool)` + +SetUa sets Ua field to given value. + +### HasUa + +`func (o *LogForwarderAccessLogType) HasUa() bool` + +HasUa returns a boolean if a field has been set. + +### GetCountry + +`func (o *LogForwarderAccessLogType) GetCountry() bool` + +GetCountry returns the Country field if non-nil, zero value otherwise. + +### GetCountryOk + +`func (o *LogForwarderAccessLogType) GetCountryOk() (*bool, 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 *LogForwarderAccessLogType) SetCountry(v bool)` + +SetCountry sets Country field to given value. + +### HasCountry + +`func (o *LogForwarderAccessLogType) HasCountry() bool` + +HasCountry returns a boolean if a field has been set. + +### GetAsn + +`func (o *LogForwarderAccessLogType) GetAsn() bool` + +GetAsn returns the Asn field if non-nil, zero value otherwise. + +### GetAsnOk + +`func (o *LogForwarderAccessLogType) GetAsnOk() (*bool, bool)` + +GetAsnOk returns a tuple with the Asn field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAsn + +`func (o *LogForwarderAccessLogType) SetAsn(v bool)` + +SetAsn sets Asn field to given value. + +### HasAsn + +`func (o *LogForwarderAccessLogType) HasAsn() bool` + +HasAsn returns a boolean if a field has been set. + +### GetContentType + +`func (o *LogForwarderAccessLogType) GetContentType() bool` + +GetContentType returns the ContentType field if non-nil, zero value otherwise. + +### GetContentTypeOk + +`func (o *LogForwarderAccessLogType) GetContentTypeOk() (*bool, bool)` + +GetContentTypeOk returns a tuple with the ContentType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContentType + +`func (o *LogForwarderAccessLogType) SetContentType(v bool)` + +SetContentType sets ContentType field to given value. + +### HasContentType + +`func (o *LogForwarderAccessLogType) HasContentType() bool` + +HasContentType returns a boolean if a field has been set. + +### GetStatus + +`func (o *LogForwarderAccessLogType) GetStatus() bool` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *LogForwarderAccessLogType) GetStatusOk() (*bool, 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 *LogForwarderAccessLogType) SetStatus(v bool)` + +SetStatus sets Status field to given value. + +### HasStatus + +`func (o *LogForwarderAccessLogType) HasStatus() bool` + +HasStatus returns a boolean if a field has been set. + +### GetServerPort + +`func (o *LogForwarderAccessLogType) GetServerPort() bool` + +GetServerPort returns the ServerPort field if non-nil, zero value otherwise. + +### GetServerPortOk + +`func (o *LogForwarderAccessLogType) GetServerPortOk() (*bool, bool)` + +GetServerPortOk returns a tuple with the ServerPort field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetServerPort + +`func (o *LogForwarderAccessLogType) SetServerPort(v bool)` + +SetServerPort sets ServerPort field to given value. + +### HasServerPort + +`func (o *LogForwarderAccessLogType) HasServerPort() bool` + +HasServerPort returns a boolean if a field has been set. + +### GetBytesSent + +`func (o *LogForwarderAccessLogType) GetBytesSent() bool` + +GetBytesSent returns the BytesSent field if non-nil, zero value otherwise. + +### GetBytesSentOk + +`func (o *LogForwarderAccessLogType) GetBytesSentOk() (*bool, bool)` + +GetBytesSentOk returns a tuple with the BytesSent field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBytesSent + +`func (o *LogForwarderAccessLogType) SetBytesSent(v bool)` + +SetBytesSent sets BytesSent field to given value. + +### HasBytesSent + +`func (o *LogForwarderAccessLogType) HasBytesSent() bool` + +HasBytesSent returns a boolean if a field has been set. + +### GetBytesReceived + +`func (o *LogForwarderAccessLogType) GetBytesReceived() bool` + +GetBytesReceived returns the BytesReceived field if non-nil, zero value otherwise. + +### GetBytesReceivedOk + +`func (o *LogForwarderAccessLogType) GetBytesReceivedOk() (*bool, bool)` + +GetBytesReceivedOk returns a tuple with the BytesReceived field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBytesReceived + +`func (o *LogForwarderAccessLogType) SetBytesReceived(v bool)` + +SetBytesReceived sets BytesReceived field to given value. + +### HasBytesReceived + +`func (o *LogForwarderAccessLogType) HasBytesReceived() bool` + +HasBytesReceived returns a boolean if a field has been set. + +### GetUpstreamTime + +`func (o *LogForwarderAccessLogType) GetUpstreamTime() bool` + +GetUpstreamTime returns the UpstreamTime field if non-nil, zero value otherwise. + +### GetUpstreamTimeOk + +`func (o *LogForwarderAccessLogType) GetUpstreamTimeOk() (*bool, bool)` + +GetUpstreamTimeOk returns a tuple with the UpstreamTime field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpstreamTime + +`func (o *LogForwarderAccessLogType) SetUpstreamTime(v bool)` + +SetUpstreamTime sets UpstreamTime field to given value. + +### HasUpstreamTime + +`func (o *LogForwarderAccessLogType) HasUpstreamTime() bool` + +HasUpstreamTime returns a boolean if a field has been set. + +### GetCache + +`func (o *LogForwarderAccessLogType) GetCache() bool` + +GetCache returns the Cache field if non-nil, zero value otherwise. + +### GetCacheOk + +`func (o *LogForwarderAccessLogType) GetCacheOk() (*bool, bool)` + +GetCacheOk returns a tuple with the Cache field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCache + +`func (o *LogForwarderAccessLogType) SetCache(v bool)` + +SetCache sets Cache field to given value. + +### HasCache + +`func (o *LogForwarderAccessLogType) HasCache() bool` + +HasCache returns a boolean if a field has been set. + +### GetRequestId + +`func (o *LogForwarderAccessLogType) GetRequestId() bool` + +GetRequestId returns the RequestId field if non-nil, zero value otherwise. + +### GetRequestIdOk + +`func (o *LogForwarderAccessLogType) GetRequestIdOk() (*bool, bool)` + +GetRequestIdOk returns a tuple with the RequestId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRequestId + +`func (o *LogForwarderAccessLogType) SetRequestId(v bool)` + +SetRequestId sets RequestId field to given value. + +### HasRequestId + +`func (o *LogForwarderAccessLogType) HasRequestId() bool` + +HasRequestId returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/LogForwarderDNSType.md b/docs/LogForwarderDNSType.md new file mode 100644 index 0000000..f1aaa8e --- /dev/null +++ b/docs/LogForwarderDNSType.md @@ -0,0 +1,264 @@ +# LogForwarderDNSType + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Timestamp** | Pointer to **bool** | | [optional] +**Uuid** | Pointer to **bool** | | [optional] +**Record** | Pointer to **bool** | | [optional] +**Type** | Pointer to **bool** | | [optional] +**Ip** | Pointer to **bool** | | [optional] +**Country** | Pointer to **bool** | | [optional] +**Asn** | Pointer to **bool** | | [optional] +**ResponseCode** | Pointer to **bool** | | [optional] +**ProcessTime** | Pointer to **bool** | | [optional] + +## Methods + +### NewLogForwarderDNSType + +`func NewLogForwarderDNSType() *LogForwarderDNSType` + +NewLogForwarderDNSType instantiates a new LogForwarderDNSType object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewLogForwarderDNSTypeWithDefaults + +`func NewLogForwarderDNSTypeWithDefaults() *LogForwarderDNSType` + +NewLogForwarderDNSTypeWithDefaults instantiates a new LogForwarderDNSType object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetTimestamp + +`func (o *LogForwarderDNSType) GetTimestamp() bool` + +GetTimestamp returns the Timestamp field if non-nil, zero value otherwise. + +### GetTimestampOk + +`func (o *LogForwarderDNSType) GetTimestampOk() (*bool, bool)` + +GetTimestampOk returns a tuple with the Timestamp field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTimestamp + +`func (o *LogForwarderDNSType) SetTimestamp(v bool)` + +SetTimestamp sets Timestamp field to given value. + +### HasTimestamp + +`func (o *LogForwarderDNSType) HasTimestamp() bool` + +HasTimestamp returns a boolean if a field has been set. + +### GetUuid + +`func (o *LogForwarderDNSType) GetUuid() bool` + +GetUuid returns the Uuid field if non-nil, zero value otherwise. + +### GetUuidOk + +`func (o *LogForwarderDNSType) GetUuidOk() (*bool, 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 *LogForwarderDNSType) SetUuid(v bool)` + +SetUuid sets Uuid field to given value. + +### HasUuid + +`func (o *LogForwarderDNSType) HasUuid() bool` + +HasUuid returns a boolean if a field has been set. + +### GetRecord + +`func (o *LogForwarderDNSType) GetRecord() bool` + +GetRecord returns the Record field if non-nil, zero value otherwise. + +### GetRecordOk + +`func (o *LogForwarderDNSType) GetRecordOk() (*bool, bool)` + +GetRecordOk returns a tuple with the Record field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRecord + +`func (o *LogForwarderDNSType) SetRecord(v bool)` + +SetRecord sets Record field to given value. + +### HasRecord + +`func (o *LogForwarderDNSType) HasRecord() bool` + +HasRecord returns a boolean if a field has been set. + +### GetType + +`func (o *LogForwarderDNSType) GetType() bool` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *LogForwarderDNSType) GetTypeOk() (*bool, 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 *LogForwarderDNSType) SetType(v bool)` + +SetType sets Type field to given value. + +### HasType + +`func (o *LogForwarderDNSType) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetIp + +`func (o *LogForwarderDNSType) GetIp() bool` + +GetIp returns the Ip field if non-nil, zero value otherwise. + +### GetIpOk + +`func (o *LogForwarderDNSType) GetIpOk() (*bool, bool)` + +GetIpOk returns a tuple with the Ip field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIp + +`func (o *LogForwarderDNSType) SetIp(v bool)` + +SetIp sets Ip field to given value. + +### HasIp + +`func (o *LogForwarderDNSType) HasIp() bool` + +HasIp returns a boolean if a field has been set. + +### GetCountry + +`func (o *LogForwarderDNSType) GetCountry() bool` + +GetCountry returns the Country field if non-nil, zero value otherwise. + +### GetCountryOk + +`func (o *LogForwarderDNSType) GetCountryOk() (*bool, 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 *LogForwarderDNSType) SetCountry(v bool)` + +SetCountry sets Country field to given value. + +### HasCountry + +`func (o *LogForwarderDNSType) HasCountry() bool` + +HasCountry returns a boolean if a field has been set. + +### GetAsn + +`func (o *LogForwarderDNSType) GetAsn() bool` + +GetAsn returns the Asn field if non-nil, zero value otherwise. + +### GetAsnOk + +`func (o *LogForwarderDNSType) GetAsnOk() (*bool, bool)` + +GetAsnOk returns a tuple with the Asn field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAsn + +`func (o *LogForwarderDNSType) SetAsn(v bool)` + +SetAsn sets Asn field to given value. + +### HasAsn + +`func (o *LogForwarderDNSType) HasAsn() bool` + +HasAsn returns a boolean if a field has been set. + +### GetResponseCode + +`func (o *LogForwarderDNSType) GetResponseCode() bool` + +GetResponseCode returns the ResponseCode field if non-nil, zero value otherwise. + +### GetResponseCodeOk + +`func (o *LogForwarderDNSType) GetResponseCodeOk() (*bool, bool)` + +GetResponseCodeOk returns a tuple with the ResponseCode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResponseCode + +`func (o *LogForwarderDNSType) SetResponseCode(v bool)` + +SetResponseCode sets ResponseCode field to given value. + +### HasResponseCode + +`func (o *LogForwarderDNSType) HasResponseCode() bool` + +HasResponseCode returns a boolean if a field has been set. + +### GetProcessTime + +`func (o *LogForwarderDNSType) GetProcessTime() bool` + +GetProcessTime returns the ProcessTime field if non-nil, zero value otherwise. + +### GetProcessTimeOk + +`func (o *LogForwarderDNSType) GetProcessTimeOk() (*bool, bool)` + +GetProcessTimeOk returns a tuple with the ProcessTime field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProcessTime + +`func (o *LogForwarderDNSType) SetProcessTime(v bool)` + +SetProcessTime sets ProcessTime field to given value. + +### HasProcessTime + +`func (o *LogForwarderDNSType) HasProcessTime() bool` + +HasProcessTime returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/LogForwarderDataFormat.md b/docs/LogForwarderDataFormat.md new file mode 100644 index 0000000..029b13e --- /dev/null +++ b/docs/LogForwarderDataFormat.md @@ -0,0 +1,1044 @@ +# LogForwarderDataFormat + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Method** | Pointer to **bool** | | [optional] +**Scheme** | Pointer to **bool** | | [optional] +**Domain** | Pointer to **bool** | | [optional] +**Uri** | Pointer to **bool** | | [optional] +**QueryString** | Pointer to **bool** | | [optional] +**Referer** | Pointer to **bool** | | [optional] +**Ip** | Pointer to **bool** | | [optional] +**Ua** | Pointer to **bool** | | [optional] +**Country** | Pointer to **bool** | | [optional] +**Asn** | Pointer to **bool** | | [optional] +**ContentType** | Pointer to **bool** | | [optional] +**Status** | Pointer to **bool** | | [optional] +**ServerPort** | Pointer to **bool** | | [optional] +**BytesSent** | Pointer to **bool** | | [optional] +**BytesReceived** | Pointer to **bool** | | [optional] +**UpstreamTime** | Pointer to **bool** | | [optional] +**Cache** | Pointer to **bool** | | [optional] +**RequestId** | Pointer to **bool** | | [optional] +**Product** | Pointer to **bool** | | [optional] +**Timestamp** | Pointer to **bool** | | [optional] +**RemoteAddress** | Pointer to **bool** | | [optional] +**Data** | Pointer to **bool** | | [optional] +**Uuid** | Pointer to **bool** | | [optional] +**Record** | Pointer to **bool** | | [optional] +**Type** | Pointer to **bool** | | [optional] +**ResponseCode** | Pointer to **bool** | | [optional] +**ProcessTime** | Pointer to **bool** | | [optional] +**ClientIp** | Pointer to **bool** | | [optional] +**UpstreamProto** | Pointer to **bool** | | [optional] +**UpstreamUri** | Pointer to **bool** | | [optional] +**UpstreamPort** | Pointer to **bool** | | [optional] +**UpstreamIp** | Pointer to **bool** | | [optional] +**DomainName** | Pointer to **bool** | | [optional] +**HttpVersion** | Pointer to **bool** | | [optional] +**RequestMethod** | Pointer to **bool** | | [optional] +**RequestUri** | Pointer to **bool** | | [optional] +**RealTimestamp** | Pointer to **bool** | | [optional] +**ErrorMessage** | Pointer to **bool** | | [optional] +**PopSite** | Pointer to **bool** | | [optional] + +## Methods + +### NewLogForwarderDataFormat + +`func NewLogForwarderDataFormat() *LogForwarderDataFormat` + +NewLogForwarderDataFormat instantiates a new LogForwarderDataFormat object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewLogForwarderDataFormatWithDefaults + +`func NewLogForwarderDataFormatWithDefaults() *LogForwarderDataFormat` + +NewLogForwarderDataFormatWithDefaults instantiates a new LogForwarderDataFormat object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetMethod + +`func (o *LogForwarderDataFormat) GetMethod() bool` + +GetMethod returns the Method field if non-nil, zero value otherwise. + +### GetMethodOk + +`func (o *LogForwarderDataFormat) GetMethodOk() (*bool, bool)` + +GetMethodOk returns a tuple with the Method field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMethod + +`func (o *LogForwarderDataFormat) SetMethod(v bool)` + +SetMethod sets Method field to given value. + +### HasMethod + +`func (o *LogForwarderDataFormat) HasMethod() bool` + +HasMethod returns a boolean if a field has been set. + +### GetScheme + +`func (o *LogForwarderDataFormat) GetScheme() bool` + +GetScheme returns the Scheme field if non-nil, zero value otherwise. + +### GetSchemeOk + +`func (o *LogForwarderDataFormat) GetSchemeOk() (*bool, bool)` + +GetSchemeOk returns a tuple with the Scheme field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetScheme + +`func (o *LogForwarderDataFormat) SetScheme(v bool)` + +SetScheme sets Scheme field to given value. + +### HasScheme + +`func (o *LogForwarderDataFormat) HasScheme() bool` + +HasScheme returns a boolean if a field has been set. + +### GetDomain + +`func (o *LogForwarderDataFormat) GetDomain() bool` + +GetDomain returns the Domain field if non-nil, zero value otherwise. + +### GetDomainOk + +`func (o *LogForwarderDataFormat) GetDomainOk() (*bool, bool)` + +GetDomainOk returns a tuple with the Domain field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDomain + +`func (o *LogForwarderDataFormat) SetDomain(v bool)` + +SetDomain sets Domain field to given value. + +### HasDomain + +`func (o *LogForwarderDataFormat) HasDomain() bool` + +HasDomain returns a boolean if a field has been set. + +### GetUri + +`func (o *LogForwarderDataFormat) GetUri() bool` + +GetUri returns the Uri field if non-nil, zero value otherwise. + +### GetUriOk + +`func (o *LogForwarderDataFormat) GetUriOk() (*bool, bool)` + +GetUriOk returns a tuple with the Uri field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUri + +`func (o *LogForwarderDataFormat) SetUri(v bool)` + +SetUri sets Uri field to given value. + +### HasUri + +`func (o *LogForwarderDataFormat) HasUri() bool` + +HasUri returns a boolean if a field has been set. + +### GetQueryString + +`func (o *LogForwarderDataFormat) GetQueryString() bool` + +GetQueryString returns the QueryString field if non-nil, zero value otherwise. + +### GetQueryStringOk + +`func (o *LogForwarderDataFormat) GetQueryStringOk() (*bool, bool)` + +GetQueryStringOk returns a tuple with the QueryString field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetQueryString + +`func (o *LogForwarderDataFormat) SetQueryString(v bool)` + +SetQueryString sets QueryString field to given value. + +### HasQueryString + +`func (o *LogForwarderDataFormat) HasQueryString() bool` + +HasQueryString returns a boolean if a field has been set. + +### GetReferer + +`func (o *LogForwarderDataFormat) GetReferer() bool` + +GetReferer returns the Referer field if non-nil, zero value otherwise. + +### GetRefererOk + +`func (o *LogForwarderDataFormat) GetRefererOk() (*bool, bool)` + +GetRefererOk returns a tuple with the Referer field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetReferer + +`func (o *LogForwarderDataFormat) SetReferer(v bool)` + +SetReferer sets Referer field to given value. + +### HasReferer + +`func (o *LogForwarderDataFormat) HasReferer() bool` + +HasReferer returns a boolean if a field has been set. + +### GetIp + +`func (o *LogForwarderDataFormat) GetIp() bool` + +GetIp returns the Ip field if non-nil, zero value otherwise. + +### GetIpOk + +`func (o *LogForwarderDataFormat) GetIpOk() (*bool, bool)` + +GetIpOk returns a tuple with the Ip field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIp + +`func (o *LogForwarderDataFormat) SetIp(v bool)` + +SetIp sets Ip field to given value. + +### HasIp + +`func (o *LogForwarderDataFormat) HasIp() bool` + +HasIp returns a boolean if a field has been set. + +### GetUa + +`func (o *LogForwarderDataFormat) GetUa() bool` + +GetUa returns the Ua field if non-nil, zero value otherwise. + +### GetUaOk + +`func (o *LogForwarderDataFormat) GetUaOk() (*bool, bool)` + +GetUaOk returns a tuple with the Ua field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUa + +`func (o *LogForwarderDataFormat) SetUa(v bool)` + +SetUa sets Ua field to given value. + +### HasUa + +`func (o *LogForwarderDataFormat) HasUa() bool` + +HasUa returns a boolean if a field has been set. + +### GetCountry + +`func (o *LogForwarderDataFormat) GetCountry() bool` + +GetCountry returns the Country field if non-nil, zero value otherwise. + +### GetCountryOk + +`func (o *LogForwarderDataFormat) GetCountryOk() (*bool, 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 *LogForwarderDataFormat) SetCountry(v bool)` + +SetCountry sets Country field to given value. + +### HasCountry + +`func (o *LogForwarderDataFormat) HasCountry() bool` + +HasCountry returns a boolean if a field has been set. + +### GetAsn + +`func (o *LogForwarderDataFormat) GetAsn() bool` + +GetAsn returns the Asn field if non-nil, zero value otherwise. + +### GetAsnOk + +`func (o *LogForwarderDataFormat) GetAsnOk() (*bool, bool)` + +GetAsnOk returns a tuple with the Asn field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAsn + +`func (o *LogForwarderDataFormat) SetAsn(v bool)` + +SetAsn sets Asn field to given value. + +### HasAsn + +`func (o *LogForwarderDataFormat) HasAsn() bool` + +HasAsn returns a boolean if a field has been set. + +### GetContentType + +`func (o *LogForwarderDataFormat) GetContentType() bool` + +GetContentType returns the ContentType field if non-nil, zero value otherwise. + +### GetContentTypeOk + +`func (o *LogForwarderDataFormat) GetContentTypeOk() (*bool, bool)` + +GetContentTypeOk returns a tuple with the ContentType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContentType + +`func (o *LogForwarderDataFormat) SetContentType(v bool)` + +SetContentType sets ContentType field to given value. + +### HasContentType + +`func (o *LogForwarderDataFormat) HasContentType() bool` + +HasContentType returns a boolean if a field has been set. + +### GetStatus + +`func (o *LogForwarderDataFormat) GetStatus() bool` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *LogForwarderDataFormat) GetStatusOk() (*bool, 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 *LogForwarderDataFormat) SetStatus(v bool)` + +SetStatus sets Status field to given value. + +### HasStatus + +`func (o *LogForwarderDataFormat) HasStatus() bool` + +HasStatus returns a boolean if a field has been set. + +### GetServerPort + +`func (o *LogForwarderDataFormat) GetServerPort() bool` + +GetServerPort returns the ServerPort field if non-nil, zero value otherwise. + +### GetServerPortOk + +`func (o *LogForwarderDataFormat) GetServerPortOk() (*bool, bool)` + +GetServerPortOk returns a tuple with the ServerPort field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetServerPort + +`func (o *LogForwarderDataFormat) SetServerPort(v bool)` + +SetServerPort sets ServerPort field to given value. + +### HasServerPort + +`func (o *LogForwarderDataFormat) HasServerPort() bool` + +HasServerPort returns a boolean if a field has been set. + +### GetBytesSent + +`func (o *LogForwarderDataFormat) GetBytesSent() bool` + +GetBytesSent returns the BytesSent field if non-nil, zero value otherwise. + +### GetBytesSentOk + +`func (o *LogForwarderDataFormat) GetBytesSentOk() (*bool, bool)` + +GetBytesSentOk returns a tuple with the BytesSent field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBytesSent + +`func (o *LogForwarderDataFormat) SetBytesSent(v bool)` + +SetBytesSent sets BytesSent field to given value. + +### HasBytesSent + +`func (o *LogForwarderDataFormat) HasBytesSent() bool` + +HasBytesSent returns a boolean if a field has been set. + +### GetBytesReceived + +`func (o *LogForwarderDataFormat) GetBytesReceived() bool` + +GetBytesReceived returns the BytesReceived field if non-nil, zero value otherwise. + +### GetBytesReceivedOk + +`func (o *LogForwarderDataFormat) GetBytesReceivedOk() (*bool, bool)` + +GetBytesReceivedOk returns a tuple with the BytesReceived field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBytesReceived + +`func (o *LogForwarderDataFormat) SetBytesReceived(v bool)` + +SetBytesReceived sets BytesReceived field to given value. + +### HasBytesReceived + +`func (o *LogForwarderDataFormat) HasBytesReceived() bool` + +HasBytesReceived returns a boolean if a field has been set. + +### GetUpstreamTime + +`func (o *LogForwarderDataFormat) GetUpstreamTime() bool` + +GetUpstreamTime returns the UpstreamTime field if non-nil, zero value otherwise. + +### GetUpstreamTimeOk + +`func (o *LogForwarderDataFormat) GetUpstreamTimeOk() (*bool, bool)` + +GetUpstreamTimeOk returns a tuple with the UpstreamTime field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpstreamTime + +`func (o *LogForwarderDataFormat) SetUpstreamTime(v bool)` + +SetUpstreamTime sets UpstreamTime field to given value. + +### HasUpstreamTime + +`func (o *LogForwarderDataFormat) HasUpstreamTime() bool` + +HasUpstreamTime returns a boolean if a field has been set. + +### GetCache + +`func (o *LogForwarderDataFormat) GetCache() bool` + +GetCache returns the Cache field if non-nil, zero value otherwise. + +### GetCacheOk + +`func (o *LogForwarderDataFormat) GetCacheOk() (*bool, bool)` + +GetCacheOk returns a tuple with the Cache field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCache + +`func (o *LogForwarderDataFormat) SetCache(v bool)` + +SetCache sets Cache field to given value. + +### HasCache + +`func (o *LogForwarderDataFormat) HasCache() bool` + +HasCache returns a boolean if a field has been set. + +### GetRequestId + +`func (o *LogForwarderDataFormat) GetRequestId() bool` + +GetRequestId returns the RequestId field if non-nil, zero value otherwise. + +### GetRequestIdOk + +`func (o *LogForwarderDataFormat) GetRequestIdOk() (*bool, bool)` + +GetRequestIdOk returns a tuple with the RequestId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRequestId + +`func (o *LogForwarderDataFormat) SetRequestId(v bool)` + +SetRequestId sets RequestId field to given value. + +### HasRequestId + +`func (o *LogForwarderDataFormat) HasRequestId() bool` + +HasRequestId returns a boolean if a field has been set. + +### GetProduct + +`func (o *LogForwarderDataFormat) GetProduct() bool` + +GetProduct returns the Product field if non-nil, zero value otherwise. + +### GetProductOk + +`func (o *LogForwarderDataFormat) GetProductOk() (*bool, bool)` + +GetProductOk returns a tuple with the Product field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProduct + +`func (o *LogForwarderDataFormat) SetProduct(v bool)` + +SetProduct sets Product field to given value. + +### HasProduct + +`func (o *LogForwarderDataFormat) HasProduct() bool` + +HasProduct returns a boolean if a field has been set. + +### GetTimestamp + +`func (o *LogForwarderDataFormat) GetTimestamp() bool` + +GetTimestamp returns the Timestamp field if non-nil, zero value otherwise. + +### GetTimestampOk + +`func (o *LogForwarderDataFormat) GetTimestampOk() (*bool, bool)` + +GetTimestampOk returns a tuple with the Timestamp field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTimestamp + +`func (o *LogForwarderDataFormat) SetTimestamp(v bool)` + +SetTimestamp sets Timestamp field to given value. + +### HasTimestamp + +`func (o *LogForwarderDataFormat) HasTimestamp() bool` + +HasTimestamp returns a boolean if a field has been set. + +### GetRemoteAddress + +`func (o *LogForwarderDataFormat) GetRemoteAddress() bool` + +GetRemoteAddress returns the RemoteAddress field if non-nil, zero value otherwise. + +### GetRemoteAddressOk + +`func (o *LogForwarderDataFormat) GetRemoteAddressOk() (*bool, bool)` + +GetRemoteAddressOk returns a tuple with the RemoteAddress field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRemoteAddress + +`func (o *LogForwarderDataFormat) SetRemoteAddress(v bool)` + +SetRemoteAddress sets RemoteAddress field to given value. + +### HasRemoteAddress + +`func (o *LogForwarderDataFormat) HasRemoteAddress() bool` + +HasRemoteAddress returns a boolean if a field has been set. + +### GetData + +`func (o *LogForwarderDataFormat) GetData() bool` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *LogForwarderDataFormat) GetDataOk() (*bool, 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 *LogForwarderDataFormat) SetData(v bool)` + +SetData sets Data field to given value. + +### HasData + +`func (o *LogForwarderDataFormat) HasData() bool` + +HasData returns a boolean if a field has been set. + +### GetUuid + +`func (o *LogForwarderDataFormat) GetUuid() bool` + +GetUuid returns the Uuid field if non-nil, zero value otherwise. + +### GetUuidOk + +`func (o *LogForwarderDataFormat) GetUuidOk() (*bool, 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 *LogForwarderDataFormat) SetUuid(v bool)` + +SetUuid sets Uuid field to given value. + +### HasUuid + +`func (o *LogForwarderDataFormat) HasUuid() bool` + +HasUuid returns a boolean if a field has been set. + +### GetRecord + +`func (o *LogForwarderDataFormat) GetRecord() bool` + +GetRecord returns the Record field if non-nil, zero value otherwise. + +### GetRecordOk + +`func (o *LogForwarderDataFormat) GetRecordOk() (*bool, bool)` + +GetRecordOk returns a tuple with the Record field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRecord + +`func (o *LogForwarderDataFormat) SetRecord(v bool)` + +SetRecord sets Record field to given value. + +### HasRecord + +`func (o *LogForwarderDataFormat) HasRecord() bool` + +HasRecord returns a boolean if a field has been set. + +### GetType + +`func (o *LogForwarderDataFormat) GetType() bool` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *LogForwarderDataFormat) GetTypeOk() (*bool, 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 *LogForwarderDataFormat) SetType(v bool)` + +SetType sets Type field to given value. + +### HasType + +`func (o *LogForwarderDataFormat) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetResponseCode + +`func (o *LogForwarderDataFormat) GetResponseCode() bool` + +GetResponseCode returns the ResponseCode field if non-nil, zero value otherwise. + +### GetResponseCodeOk + +`func (o *LogForwarderDataFormat) GetResponseCodeOk() (*bool, bool)` + +GetResponseCodeOk returns a tuple with the ResponseCode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResponseCode + +`func (o *LogForwarderDataFormat) SetResponseCode(v bool)` + +SetResponseCode sets ResponseCode field to given value. + +### HasResponseCode + +`func (o *LogForwarderDataFormat) HasResponseCode() bool` + +HasResponseCode returns a boolean if a field has been set. + +### GetProcessTime + +`func (o *LogForwarderDataFormat) GetProcessTime() bool` + +GetProcessTime returns the ProcessTime field if non-nil, zero value otherwise. + +### GetProcessTimeOk + +`func (o *LogForwarderDataFormat) GetProcessTimeOk() (*bool, bool)` + +GetProcessTimeOk returns a tuple with the ProcessTime field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProcessTime + +`func (o *LogForwarderDataFormat) SetProcessTime(v bool)` + +SetProcessTime sets ProcessTime field to given value. + +### HasProcessTime + +`func (o *LogForwarderDataFormat) HasProcessTime() bool` + +HasProcessTime returns a boolean if a field has been set. + +### GetClientIp + +`func (o *LogForwarderDataFormat) GetClientIp() bool` + +GetClientIp returns the ClientIp field if non-nil, zero value otherwise. + +### GetClientIpOk + +`func (o *LogForwarderDataFormat) GetClientIpOk() (*bool, bool)` + +GetClientIpOk returns a tuple with the ClientIp field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetClientIp + +`func (o *LogForwarderDataFormat) SetClientIp(v bool)` + +SetClientIp sets ClientIp field to given value. + +### HasClientIp + +`func (o *LogForwarderDataFormat) HasClientIp() bool` + +HasClientIp returns a boolean if a field has been set. + +### GetUpstreamProto + +`func (o *LogForwarderDataFormat) GetUpstreamProto() bool` + +GetUpstreamProto returns the UpstreamProto field if non-nil, zero value otherwise. + +### GetUpstreamProtoOk + +`func (o *LogForwarderDataFormat) GetUpstreamProtoOk() (*bool, bool)` + +GetUpstreamProtoOk returns a tuple with the UpstreamProto field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpstreamProto + +`func (o *LogForwarderDataFormat) SetUpstreamProto(v bool)` + +SetUpstreamProto sets UpstreamProto field to given value. + +### HasUpstreamProto + +`func (o *LogForwarderDataFormat) HasUpstreamProto() bool` + +HasUpstreamProto returns a boolean if a field has been set. + +### GetUpstreamUri + +`func (o *LogForwarderDataFormat) GetUpstreamUri() bool` + +GetUpstreamUri returns the UpstreamUri field if non-nil, zero value otherwise. + +### GetUpstreamUriOk + +`func (o *LogForwarderDataFormat) GetUpstreamUriOk() (*bool, bool)` + +GetUpstreamUriOk returns a tuple with the UpstreamUri field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpstreamUri + +`func (o *LogForwarderDataFormat) SetUpstreamUri(v bool)` + +SetUpstreamUri sets UpstreamUri field to given value. + +### HasUpstreamUri + +`func (o *LogForwarderDataFormat) HasUpstreamUri() bool` + +HasUpstreamUri returns a boolean if a field has been set. + +### GetUpstreamPort + +`func (o *LogForwarderDataFormat) GetUpstreamPort() bool` + +GetUpstreamPort returns the UpstreamPort field if non-nil, zero value otherwise. + +### GetUpstreamPortOk + +`func (o *LogForwarderDataFormat) GetUpstreamPortOk() (*bool, bool)` + +GetUpstreamPortOk returns a tuple with the UpstreamPort field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpstreamPort + +`func (o *LogForwarderDataFormat) SetUpstreamPort(v bool)` + +SetUpstreamPort sets UpstreamPort field to given value. + +### HasUpstreamPort + +`func (o *LogForwarderDataFormat) HasUpstreamPort() bool` + +HasUpstreamPort returns a boolean if a field has been set. + +### GetUpstreamIp + +`func (o *LogForwarderDataFormat) GetUpstreamIp() bool` + +GetUpstreamIp returns the UpstreamIp field if non-nil, zero value otherwise. + +### GetUpstreamIpOk + +`func (o *LogForwarderDataFormat) GetUpstreamIpOk() (*bool, bool)` + +GetUpstreamIpOk returns a tuple with the UpstreamIp field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpstreamIp + +`func (o *LogForwarderDataFormat) SetUpstreamIp(v bool)` + +SetUpstreamIp sets UpstreamIp field to given value. + +### HasUpstreamIp + +`func (o *LogForwarderDataFormat) HasUpstreamIp() bool` + +HasUpstreamIp returns a boolean if a field has been set. + +### GetDomainName + +`func (o *LogForwarderDataFormat) GetDomainName() bool` + +GetDomainName returns the DomainName field if non-nil, zero value otherwise. + +### GetDomainNameOk + +`func (o *LogForwarderDataFormat) GetDomainNameOk() (*bool, bool)` + +GetDomainNameOk returns a tuple with the DomainName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDomainName + +`func (o *LogForwarderDataFormat) SetDomainName(v bool)` + +SetDomainName sets DomainName field to given value. + +### HasDomainName + +`func (o *LogForwarderDataFormat) HasDomainName() bool` + +HasDomainName returns a boolean if a field has been set. + +### GetHttpVersion + +`func (o *LogForwarderDataFormat) GetHttpVersion() bool` + +GetHttpVersion returns the HttpVersion field if non-nil, zero value otherwise. + +### GetHttpVersionOk + +`func (o *LogForwarderDataFormat) GetHttpVersionOk() (*bool, bool)` + +GetHttpVersionOk returns a tuple with the HttpVersion field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHttpVersion + +`func (o *LogForwarderDataFormat) SetHttpVersion(v bool)` + +SetHttpVersion sets HttpVersion field to given value. + +### HasHttpVersion + +`func (o *LogForwarderDataFormat) HasHttpVersion() bool` + +HasHttpVersion returns a boolean if a field has been set. + +### GetRequestMethod + +`func (o *LogForwarderDataFormat) GetRequestMethod() bool` + +GetRequestMethod returns the RequestMethod field if non-nil, zero value otherwise. + +### GetRequestMethodOk + +`func (o *LogForwarderDataFormat) GetRequestMethodOk() (*bool, bool)` + +GetRequestMethodOk returns a tuple with the RequestMethod field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRequestMethod + +`func (o *LogForwarderDataFormat) SetRequestMethod(v bool)` + +SetRequestMethod sets RequestMethod field to given value. + +### HasRequestMethod + +`func (o *LogForwarderDataFormat) HasRequestMethod() bool` + +HasRequestMethod returns a boolean if a field has been set. + +### GetRequestUri + +`func (o *LogForwarderDataFormat) GetRequestUri() bool` + +GetRequestUri returns the RequestUri field if non-nil, zero value otherwise. + +### GetRequestUriOk + +`func (o *LogForwarderDataFormat) GetRequestUriOk() (*bool, bool)` + +GetRequestUriOk returns a tuple with the RequestUri field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRequestUri + +`func (o *LogForwarderDataFormat) SetRequestUri(v bool)` + +SetRequestUri sets RequestUri field to given value. + +### HasRequestUri + +`func (o *LogForwarderDataFormat) HasRequestUri() bool` + +HasRequestUri returns a boolean if a field has been set. + +### GetRealTimestamp + +`func (o *LogForwarderDataFormat) GetRealTimestamp() bool` + +GetRealTimestamp returns the RealTimestamp field if non-nil, zero value otherwise. + +### GetRealTimestampOk + +`func (o *LogForwarderDataFormat) GetRealTimestampOk() (*bool, bool)` + +GetRealTimestampOk returns a tuple with the RealTimestamp field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRealTimestamp + +`func (o *LogForwarderDataFormat) SetRealTimestamp(v bool)` + +SetRealTimestamp sets RealTimestamp field to given value. + +### HasRealTimestamp + +`func (o *LogForwarderDataFormat) HasRealTimestamp() bool` + +HasRealTimestamp returns a boolean if a field has been set. + +### GetErrorMessage + +`func (o *LogForwarderDataFormat) GetErrorMessage() bool` + +GetErrorMessage returns the ErrorMessage field if non-nil, zero value otherwise. + +### GetErrorMessageOk + +`func (o *LogForwarderDataFormat) GetErrorMessageOk() (*bool, bool)` + +GetErrorMessageOk returns a tuple with the ErrorMessage field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetErrorMessage + +`func (o *LogForwarderDataFormat) SetErrorMessage(v bool)` + +SetErrorMessage sets ErrorMessage field to given value. + +### HasErrorMessage + +`func (o *LogForwarderDataFormat) HasErrorMessage() bool` + +HasErrorMessage returns a boolean if a field has been set. + +### GetPopSite + +`func (o *LogForwarderDataFormat) GetPopSite() bool` + +GetPopSite returns the PopSite field if non-nil, zero value otherwise. + +### GetPopSiteOk + +`func (o *LogForwarderDataFormat) GetPopSiteOk() (*bool, bool)` + +GetPopSiteOk returns a tuple with the PopSite field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPopSite + +`func (o *LogForwarderDataFormat) SetPopSite(v bool)` + +SetPopSite sets PopSite field to given value. + +### HasPopSite + +`func (o *LogForwarderDataFormat) HasPopSite() bool` + +HasPopSite returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/LogForwarderDatadogConnectionType.md b/docs/LogForwarderDatadogConnectionType.md new file mode 100644 index 0000000..496d252 --- /dev/null +++ b/docs/LogForwarderDatadogConnectionType.md @@ -0,0 +1,186 @@ +# LogForwarderDatadogConnectionType + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**SampleRate** | Pointer to **int32** | | [optional] +**Url** | Pointer to **string** | | [optional] +**ApiKey** | Pointer to **string** | | [optional] +**AppKey** | Pointer to **string** | | [optional] +**FlushInterval** | Pointer to **int32** | | [optional] +**BufferSize** | Pointer to **int32** | | [optional] + +## Methods + +### NewLogForwarderDatadogConnectionType + +`func NewLogForwarderDatadogConnectionType() *LogForwarderDatadogConnectionType` + +NewLogForwarderDatadogConnectionType instantiates a new LogForwarderDatadogConnectionType object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewLogForwarderDatadogConnectionTypeWithDefaults + +`func NewLogForwarderDatadogConnectionTypeWithDefaults() *LogForwarderDatadogConnectionType` + +NewLogForwarderDatadogConnectionTypeWithDefaults instantiates a new LogForwarderDatadogConnectionType object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetSampleRate + +`func (o *LogForwarderDatadogConnectionType) GetSampleRate() int32` + +GetSampleRate returns the SampleRate field if non-nil, zero value otherwise. + +### GetSampleRateOk + +`func (o *LogForwarderDatadogConnectionType) GetSampleRateOk() (*int32, bool)` + +GetSampleRateOk returns a tuple with the SampleRate field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSampleRate + +`func (o *LogForwarderDatadogConnectionType) SetSampleRate(v int32)` + +SetSampleRate sets SampleRate field to given value. + +### HasSampleRate + +`func (o *LogForwarderDatadogConnectionType) HasSampleRate() bool` + +HasSampleRate returns a boolean if a field has been set. + +### GetUrl + +`func (o *LogForwarderDatadogConnectionType) GetUrl() string` + +GetUrl returns the Url field if non-nil, zero value otherwise. + +### GetUrlOk + +`func (o *LogForwarderDatadogConnectionType) GetUrlOk() (*string, bool)` + +GetUrlOk returns a tuple with the Url field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUrl + +`func (o *LogForwarderDatadogConnectionType) SetUrl(v string)` + +SetUrl sets Url field to given value. + +### HasUrl + +`func (o *LogForwarderDatadogConnectionType) HasUrl() bool` + +HasUrl returns a boolean if a field has been set. + +### GetApiKey + +`func (o *LogForwarderDatadogConnectionType) GetApiKey() string` + +GetApiKey returns the ApiKey field if non-nil, zero value otherwise. + +### GetApiKeyOk + +`func (o *LogForwarderDatadogConnectionType) 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 *LogForwarderDatadogConnectionType) SetApiKey(v string)` + +SetApiKey sets ApiKey field to given value. + +### HasApiKey + +`func (o *LogForwarderDatadogConnectionType) HasApiKey() bool` + +HasApiKey returns a boolean if a field has been set. + +### GetAppKey + +`func (o *LogForwarderDatadogConnectionType) GetAppKey() string` + +GetAppKey returns the AppKey field if non-nil, zero value otherwise. + +### GetAppKeyOk + +`func (o *LogForwarderDatadogConnectionType) GetAppKeyOk() (*string, bool)` + +GetAppKeyOk returns a tuple with the AppKey field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAppKey + +`func (o *LogForwarderDatadogConnectionType) SetAppKey(v string)` + +SetAppKey sets AppKey field to given value. + +### HasAppKey + +`func (o *LogForwarderDatadogConnectionType) HasAppKey() bool` + +HasAppKey returns a boolean if a field has been set. + +### GetFlushInterval + +`func (o *LogForwarderDatadogConnectionType) GetFlushInterval() int32` + +GetFlushInterval returns the FlushInterval field if non-nil, zero value otherwise. + +### GetFlushIntervalOk + +`func (o *LogForwarderDatadogConnectionType) GetFlushIntervalOk() (*int32, bool)` + +GetFlushIntervalOk returns a tuple with the FlushInterval field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFlushInterval + +`func (o *LogForwarderDatadogConnectionType) SetFlushInterval(v int32)` + +SetFlushInterval sets FlushInterval field to given value. + +### HasFlushInterval + +`func (o *LogForwarderDatadogConnectionType) HasFlushInterval() bool` + +HasFlushInterval returns a boolean if a field has been set. + +### GetBufferSize + +`func (o *LogForwarderDatadogConnectionType) GetBufferSize() int32` + +GetBufferSize returns the BufferSize field if non-nil, zero value otherwise. + +### GetBufferSizeOk + +`func (o *LogForwarderDatadogConnectionType) GetBufferSizeOk() (*int32, bool)` + +GetBufferSizeOk returns a tuple with the BufferSize field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBufferSize + +`func (o *LogForwarderDatadogConnectionType) SetBufferSize(v int32)` + +SetBufferSize sets BufferSize field to given value. + +### HasBufferSize + +`func (o *LogForwarderDatadogConnectionType) HasBufferSize() bool` + +HasBufferSize returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/LogForwarderErrorType.md b/docs/LogForwarderErrorType.md new file mode 100644 index 0000000..0dceba1 --- /dev/null +++ b/docs/LogForwarderErrorType.md @@ -0,0 +1,368 @@ +# LogForwarderErrorType + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ClientIp** | Pointer to **bool** | | [optional] +**UpstreamProto** | Pointer to **bool** | | [optional] +**UpstreamUri** | Pointer to **bool** | | [optional] +**UpstreamPort** | Pointer to **bool** | | [optional] +**UpstreamIp** | Pointer to **bool** | | [optional] +**DomainName** | Pointer to **bool** | | [optional] +**HttpVersion** | Pointer to **bool** | | [optional] +**RequestMethod** | Pointer to **bool** | | [optional] +**RequestUri** | Pointer to **bool** | | [optional] +**RealTimestamp** | Pointer to **bool** | | [optional] +**ErrorMessage** | Pointer to **bool** | | [optional] +**PopSite** | Pointer to **bool** | | [optional] +**RequestId** | Pointer to **bool** | | [optional] + +## Methods + +### NewLogForwarderErrorType + +`func NewLogForwarderErrorType() *LogForwarderErrorType` + +NewLogForwarderErrorType instantiates a new LogForwarderErrorType object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewLogForwarderErrorTypeWithDefaults + +`func NewLogForwarderErrorTypeWithDefaults() *LogForwarderErrorType` + +NewLogForwarderErrorTypeWithDefaults instantiates a new LogForwarderErrorType object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetClientIp + +`func (o *LogForwarderErrorType) GetClientIp() bool` + +GetClientIp returns the ClientIp field if non-nil, zero value otherwise. + +### GetClientIpOk + +`func (o *LogForwarderErrorType) GetClientIpOk() (*bool, bool)` + +GetClientIpOk returns a tuple with the ClientIp field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetClientIp + +`func (o *LogForwarderErrorType) SetClientIp(v bool)` + +SetClientIp sets ClientIp field to given value. + +### HasClientIp + +`func (o *LogForwarderErrorType) HasClientIp() bool` + +HasClientIp returns a boolean if a field has been set. + +### GetUpstreamProto + +`func (o *LogForwarderErrorType) GetUpstreamProto() bool` + +GetUpstreamProto returns the UpstreamProto field if non-nil, zero value otherwise. + +### GetUpstreamProtoOk + +`func (o *LogForwarderErrorType) GetUpstreamProtoOk() (*bool, bool)` + +GetUpstreamProtoOk returns a tuple with the UpstreamProto field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpstreamProto + +`func (o *LogForwarderErrorType) SetUpstreamProto(v bool)` + +SetUpstreamProto sets UpstreamProto field to given value. + +### HasUpstreamProto + +`func (o *LogForwarderErrorType) HasUpstreamProto() bool` + +HasUpstreamProto returns a boolean if a field has been set. + +### GetUpstreamUri + +`func (o *LogForwarderErrorType) GetUpstreamUri() bool` + +GetUpstreamUri returns the UpstreamUri field if non-nil, zero value otherwise. + +### GetUpstreamUriOk + +`func (o *LogForwarderErrorType) GetUpstreamUriOk() (*bool, bool)` + +GetUpstreamUriOk returns a tuple with the UpstreamUri field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpstreamUri + +`func (o *LogForwarderErrorType) SetUpstreamUri(v bool)` + +SetUpstreamUri sets UpstreamUri field to given value. + +### HasUpstreamUri + +`func (o *LogForwarderErrorType) HasUpstreamUri() bool` + +HasUpstreamUri returns a boolean if a field has been set. + +### GetUpstreamPort + +`func (o *LogForwarderErrorType) GetUpstreamPort() bool` + +GetUpstreamPort returns the UpstreamPort field if non-nil, zero value otherwise. + +### GetUpstreamPortOk + +`func (o *LogForwarderErrorType) GetUpstreamPortOk() (*bool, bool)` + +GetUpstreamPortOk returns a tuple with the UpstreamPort field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpstreamPort + +`func (o *LogForwarderErrorType) SetUpstreamPort(v bool)` + +SetUpstreamPort sets UpstreamPort field to given value. + +### HasUpstreamPort + +`func (o *LogForwarderErrorType) HasUpstreamPort() bool` + +HasUpstreamPort returns a boolean if a field has been set. + +### GetUpstreamIp + +`func (o *LogForwarderErrorType) GetUpstreamIp() bool` + +GetUpstreamIp returns the UpstreamIp field if non-nil, zero value otherwise. + +### GetUpstreamIpOk + +`func (o *LogForwarderErrorType) GetUpstreamIpOk() (*bool, bool)` + +GetUpstreamIpOk returns a tuple with the UpstreamIp field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpstreamIp + +`func (o *LogForwarderErrorType) SetUpstreamIp(v bool)` + +SetUpstreamIp sets UpstreamIp field to given value. + +### HasUpstreamIp + +`func (o *LogForwarderErrorType) HasUpstreamIp() bool` + +HasUpstreamIp returns a boolean if a field has been set. + +### GetDomainName + +`func (o *LogForwarderErrorType) GetDomainName() bool` + +GetDomainName returns the DomainName field if non-nil, zero value otherwise. + +### GetDomainNameOk + +`func (o *LogForwarderErrorType) GetDomainNameOk() (*bool, bool)` + +GetDomainNameOk returns a tuple with the DomainName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDomainName + +`func (o *LogForwarderErrorType) SetDomainName(v bool)` + +SetDomainName sets DomainName field to given value. + +### HasDomainName + +`func (o *LogForwarderErrorType) HasDomainName() bool` + +HasDomainName returns a boolean if a field has been set. + +### GetHttpVersion + +`func (o *LogForwarderErrorType) GetHttpVersion() bool` + +GetHttpVersion returns the HttpVersion field if non-nil, zero value otherwise. + +### GetHttpVersionOk + +`func (o *LogForwarderErrorType) GetHttpVersionOk() (*bool, bool)` + +GetHttpVersionOk returns a tuple with the HttpVersion field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHttpVersion + +`func (o *LogForwarderErrorType) SetHttpVersion(v bool)` + +SetHttpVersion sets HttpVersion field to given value. + +### HasHttpVersion + +`func (o *LogForwarderErrorType) HasHttpVersion() bool` + +HasHttpVersion returns a boolean if a field has been set. + +### GetRequestMethod + +`func (o *LogForwarderErrorType) GetRequestMethod() bool` + +GetRequestMethod returns the RequestMethod field if non-nil, zero value otherwise. + +### GetRequestMethodOk + +`func (o *LogForwarderErrorType) GetRequestMethodOk() (*bool, bool)` + +GetRequestMethodOk returns a tuple with the RequestMethod field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRequestMethod + +`func (o *LogForwarderErrorType) SetRequestMethod(v bool)` + +SetRequestMethod sets RequestMethod field to given value. + +### HasRequestMethod + +`func (o *LogForwarderErrorType) HasRequestMethod() bool` + +HasRequestMethod returns a boolean if a field has been set. + +### GetRequestUri + +`func (o *LogForwarderErrorType) GetRequestUri() bool` + +GetRequestUri returns the RequestUri field if non-nil, zero value otherwise. + +### GetRequestUriOk + +`func (o *LogForwarderErrorType) GetRequestUriOk() (*bool, bool)` + +GetRequestUriOk returns a tuple with the RequestUri field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRequestUri + +`func (o *LogForwarderErrorType) SetRequestUri(v bool)` + +SetRequestUri sets RequestUri field to given value. + +### HasRequestUri + +`func (o *LogForwarderErrorType) HasRequestUri() bool` + +HasRequestUri returns a boolean if a field has been set. + +### GetRealTimestamp + +`func (o *LogForwarderErrorType) GetRealTimestamp() bool` + +GetRealTimestamp returns the RealTimestamp field if non-nil, zero value otherwise. + +### GetRealTimestampOk + +`func (o *LogForwarderErrorType) GetRealTimestampOk() (*bool, bool)` + +GetRealTimestampOk returns a tuple with the RealTimestamp field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRealTimestamp + +`func (o *LogForwarderErrorType) SetRealTimestamp(v bool)` + +SetRealTimestamp sets RealTimestamp field to given value. + +### HasRealTimestamp + +`func (o *LogForwarderErrorType) HasRealTimestamp() bool` + +HasRealTimestamp returns a boolean if a field has been set. + +### GetErrorMessage + +`func (o *LogForwarderErrorType) GetErrorMessage() bool` + +GetErrorMessage returns the ErrorMessage field if non-nil, zero value otherwise. + +### GetErrorMessageOk + +`func (o *LogForwarderErrorType) GetErrorMessageOk() (*bool, bool)` + +GetErrorMessageOk returns a tuple with the ErrorMessage field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetErrorMessage + +`func (o *LogForwarderErrorType) SetErrorMessage(v bool)` + +SetErrorMessage sets ErrorMessage field to given value. + +### HasErrorMessage + +`func (o *LogForwarderErrorType) HasErrorMessage() bool` + +HasErrorMessage returns a boolean if a field has been set. + +### GetPopSite + +`func (o *LogForwarderErrorType) GetPopSite() bool` + +GetPopSite returns the PopSite field if non-nil, zero value otherwise. + +### GetPopSiteOk + +`func (o *LogForwarderErrorType) GetPopSiteOk() (*bool, bool)` + +GetPopSiteOk returns a tuple with the PopSite field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPopSite + +`func (o *LogForwarderErrorType) SetPopSite(v bool)` + +SetPopSite sets PopSite field to given value. + +### HasPopSite + +`func (o *LogForwarderErrorType) HasPopSite() bool` + +HasPopSite returns a boolean if a field has been set. + +### GetRequestId + +`func (o *LogForwarderErrorType) GetRequestId() bool` + +GetRequestId returns the RequestId field if non-nil, zero value otherwise. + +### GetRequestIdOk + +`func (o *LogForwarderErrorType) GetRequestIdOk() (*bool, bool)` + +GetRequestIdOk returns a tuple with the RequestId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRequestId + +`func (o *LogForwarderErrorType) SetRequestId(v bool)` + +SetRequestId sets RequestId field to given value. + +### HasRequestId + +`func (o *LogForwarderErrorType) HasRequestId() bool` + +HasRequestId returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/LogForwarderGeneric.md b/docs/LogForwarderGeneric.md new file mode 100644 index 0000000..28d4fb9 --- /dev/null +++ b/docs/LogForwarderGeneric.md @@ -0,0 +1,212 @@ +# LogForwarderGeneric + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **string** | | [optional] +**Description** | Pointer to **string** | | [optional] +**Type** | Pointer to **string** | | [optional] +**ConnectionType** | Pointer to **string** | | [optional] +**DataFormat** | Pointer to **map[string]interface{}** | | [optional] +**Settings** | Pointer to **map[string]interface{}** | | [optional] +**Status** | Pointer to **bool** | | [optional] + +## Methods + +### NewLogForwarderGeneric + +`func NewLogForwarderGeneric() *LogForwarderGeneric` + +NewLogForwarderGeneric instantiates a new LogForwarderGeneric object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewLogForwarderGenericWithDefaults + +`func NewLogForwarderGenericWithDefaults() *LogForwarderGeneric` + +NewLogForwarderGenericWithDefaults instantiates a new LogForwarderGeneric object +This 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 *LogForwarderGeneric) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *LogForwarderGeneric) 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 *LogForwarderGeneric) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *LogForwarderGeneric) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetDescription + +`func (o *LogForwarderGeneric) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *LogForwarderGeneric) 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 *LogForwarderGeneric) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *LogForwarderGeneric) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetType + +`func (o *LogForwarderGeneric) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *LogForwarderGeneric) 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 *LogForwarderGeneric) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *LogForwarderGeneric) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetConnectionType + +`func (o *LogForwarderGeneric) GetConnectionType() string` + +GetConnectionType returns the ConnectionType field if non-nil, zero value otherwise. + +### GetConnectionTypeOk + +`func (o *LogForwarderGeneric) GetConnectionTypeOk() (*string, bool)` + +GetConnectionTypeOk returns a tuple with the ConnectionType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConnectionType + +`func (o *LogForwarderGeneric) SetConnectionType(v string)` + +SetConnectionType sets ConnectionType field to given value. + +### HasConnectionType + +`func (o *LogForwarderGeneric) HasConnectionType() bool` + +HasConnectionType returns a boolean if a field has been set. + +### GetDataFormat + +`func (o *LogForwarderGeneric) GetDataFormat() map[string]interface{}` + +GetDataFormat returns the DataFormat field if non-nil, zero value otherwise. + +### GetDataFormatOk + +`func (o *LogForwarderGeneric) GetDataFormatOk() (*map[string]interface{}, bool)` + +GetDataFormatOk returns a tuple with the DataFormat field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDataFormat + +`func (o *LogForwarderGeneric) SetDataFormat(v map[string]interface{})` + +SetDataFormat sets DataFormat field to given value. + +### HasDataFormat + +`func (o *LogForwarderGeneric) HasDataFormat() bool` + +HasDataFormat returns a boolean if a field has been set. + +### GetSettings + +`func (o *LogForwarderGeneric) GetSettings() map[string]interface{}` + +GetSettings returns the Settings field if non-nil, zero value otherwise. + +### GetSettingsOk + +`func (o *LogForwarderGeneric) GetSettingsOk() (*map[string]interface{}, bool)` + +GetSettingsOk returns a tuple with the Settings field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSettings + +`func (o *LogForwarderGeneric) SetSettings(v map[string]interface{})` + +SetSettings sets Settings field to given value. + +### HasSettings + +`func (o *LogForwarderGeneric) HasSettings() bool` + +HasSettings returns a boolean if a field has been set. + +### GetStatus + +`func (o *LogForwarderGeneric) GetStatus() bool` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *LogForwarderGeneric) GetStatusOk() (*bool, 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 *LogForwarderGeneric) SetStatus(v bool)` + +SetStatus sets Status field to given value. + +### HasStatus + +`func (o *LogForwarderGeneric) HasStatus() bool` + +HasStatus returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/LogForwarderKafkaConnectionType.md b/docs/LogForwarderKafkaConnectionType.md new file mode 100644 index 0000000..045edf2 --- /dev/null +++ b/docs/LogForwarderKafkaConnectionType.md @@ -0,0 +1,186 @@ +# LogForwarderKafkaConnectionType + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**SampleRate** | Pointer to **int32** | | [optional] +**KafkaVersion** | Pointer to **string** | | [optional] +**KafkaBrokers** | Pointer to **[]string** | | [optional] +**KafkaTopicToWrite** | Pointer to **string** | | [optional] +**KafkaProducerBatchSize** | Pointer to **int32** | | [optional] +**KafkaProducerFlushFrequencyMs** | Pointer to **int32** | | [optional] + +## Methods + +### NewLogForwarderKafkaConnectionType + +`func NewLogForwarderKafkaConnectionType() *LogForwarderKafkaConnectionType` + +NewLogForwarderKafkaConnectionType instantiates a new LogForwarderKafkaConnectionType object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewLogForwarderKafkaConnectionTypeWithDefaults + +`func NewLogForwarderKafkaConnectionTypeWithDefaults() *LogForwarderKafkaConnectionType` + +NewLogForwarderKafkaConnectionTypeWithDefaults instantiates a new LogForwarderKafkaConnectionType object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetSampleRate + +`func (o *LogForwarderKafkaConnectionType) GetSampleRate() int32` + +GetSampleRate returns the SampleRate field if non-nil, zero value otherwise. + +### GetSampleRateOk + +`func (o *LogForwarderKafkaConnectionType) GetSampleRateOk() (*int32, bool)` + +GetSampleRateOk returns a tuple with the SampleRate field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSampleRate + +`func (o *LogForwarderKafkaConnectionType) SetSampleRate(v int32)` + +SetSampleRate sets SampleRate field to given value. + +### HasSampleRate + +`func (o *LogForwarderKafkaConnectionType) HasSampleRate() bool` + +HasSampleRate returns a boolean if a field has been set. + +### GetKafkaVersion + +`func (o *LogForwarderKafkaConnectionType) GetKafkaVersion() string` + +GetKafkaVersion returns the KafkaVersion field if non-nil, zero value otherwise. + +### GetKafkaVersionOk + +`func (o *LogForwarderKafkaConnectionType) GetKafkaVersionOk() (*string, bool)` + +GetKafkaVersionOk returns a tuple with the KafkaVersion field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKafkaVersion + +`func (o *LogForwarderKafkaConnectionType) SetKafkaVersion(v string)` + +SetKafkaVersion sets KafkaVersion field to given value. + +### HasKafkaVersion + +`func (o *LogForwarderKafkaConnectionType) HasKafkaVersion() bool` + +HasKafkaVersion returns a boolean if a field has been set. + +### GetKafkaBrokers + +`func (o *LogForwarderKafkaConnectionType) GetKafkaBrokers() []string` + +GetKafkaBrokers returns the KafkaBrokers field if non-nil, zero value otherwise. + +### GetKafkaBrokersOk + +`func (o *LogForwarderKafkaConnectionType) GetKafkaBrokersOk() (*[]string, bool)` + +GetKafkaBrokersOk returns a tuple with the KafkaBrokers field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKafkaBrokers + +`func (o *LogForwarderKafkaConnectionType) SetKafkaBrokers(v []string)` + +SetKafkaBrokers sets KafkaBrokers field to given value. + +### HasKafkaBrokers + +`func (o *LogForwarderKafkaConnectionType) HasKafkaBrokers() bool` + +HasKafkaBrokers returns a boolean if a field has been set. + +### GetKafkaTopicToWrite + +`func (o *LogForwarderKafkaConnectionType) GetKafkaTopicToWrite() string` + +GetKafkaTopicToWrite returns the KafkaTopicToWrite field if non-nil, zero value otherwise. + +### GetKafkaTopicToWriteOk + +`func (o *LogForwarderKafkaConnectionType) GetKafkaTopicToWriteOk() (*string, bool)` + +GetKafkaTopicToWriteOk returns a tuple with the KafkaTopicToWrite field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKafkaTopicToWrite + +`func (o *LogForwarderKafkaConnectionType) SetKafkaTopicToWrite(v string)` + +SetKafkaTopicToWrite sets KafkaTopicToWrite field to given value. + +### HasKafkaTopicToWrite + +`func (o *LogForwarderKafkaConnectionType) HasKafkaTopicToWrite() bool` + +HasKafkaTopicToWrite returns a boolean if a field has been set. + +### GetKafkaProducerBatchSize + +`func (o *LogForwarderKafkaConnectionType) GetKafkaProducerBatchSize() int32` + +GetKafkaProducerBatchSize returns the KafkaProducerBatchSize field if non-nil, zero value otherwise. + +### GetKafkaProducerBatchSizeOk + +`func (o *LogForwarderKafkaConnectionType) GetKafkaProducerBatchSizeOk() (*int32, bool)` + +GetKafkaProducerBatchSizeOk returns a tuple with the KafkaProducerBatchSize field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKafkaProducerBatchSize + +`func (o *LogForwarderKafkaConnectionType) SetKafkaProducerBatchSize(v int32)` + +SetKafkaProducerBatchSize sets KafkaProducerBatchSize field to given value. + +### HasKafkaProducerBatchSize + +`func (o *LogForwarderKafkaConnectionType) HasKafkaProducerBatchSize() bool` + +HasKafkaProducerBatchSize returns a boolean if a field has been set. + +### GetKafkaProducerFlushFrequencyMs + +`func (o *LogForwarderKafkaConnectionType) GetKafkaProducerFlushFrequencyMs() int32` + +GetKafkaProducerFlushFrequencyMs returns the KafkaProducerFlushFrequencyMs field if non-nil, zero value otherwise. + +### GetKafkaProducerFlushFrequencyMsOk + +`func (o *LogForwarderKafkaConnectionType) GetKafkaProducerFlushFrequencyMsOk() (*int32, bool)` + +GetKafkaProducerFlushFrequencyMsOk returns a tuple with the KafkaProducerFlushFrequencyMs field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKafkaProducerFlushFrequencyMs + +`func (o *LogForwarderKafkaConnectionType) SetKafkaProducerFlushFrequencyMs(v int32)` + +SetKafkaProducerFlushFrequencyMs sets KafkaProducerFlushFrequencyMs field to given value. + +### HasKafkaProducerFlushFrequencyMs + +`func (o *LogForwarderKafkaConnectionType) HasKafkaProducerFlushFrequencyMs() bool` + +HasKafkaProducerFlushFrequencyMs returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/LogForwarderLogglyConnectionType.md b/docs/LogForwarderLogglyConnectionType.md new file mode 100644 index 0000000..e54ef0a --- /dev/null +++ b/docs/LogForwarderLogglyConnectionType.md @@ -0,0 +1,160 @@ +# LogForwarderLogglyConnectionType + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**SampleRate** | Pointer to **int32** | | [optional] +**Token** | Pointer to **string** | | [optional] +**Url** | Pointer to **string** | | [optional] +**FlushInterval** | Pointer to **int32** | | [optional] +**BufferSize** | Pointer to **int32** | | [optional] + +## Methods + +### NewLogForwarderLogglyConnectionType + +`func NewLogForwarderLogglyConnectionType() *LogForwarderLogglyConnectionType` + +NewLogForwarderLogglyConnectionType instantiates a new LogForwarderLogglyConnectionType object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewLogForwarderLogglyConnectionTypeWithDefaults + +`func NewLogForwarderLogglyConnectionTypeWithDefaults() *LogForwarderLogglyConnectionType` + +NewLogForwarderLogglyConnectionTypeWithDefaults instantiates a new LogForwarderLogglyConnectionType object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetSampleRate + +`func (o *LogForwarderLogglyConnectionType) GetSampleRate() int32` + +GetSampleRate returns the SampleRate field if non-nil, zero value otherwise. + +### GetSampleRateOk + +`func (o *LogForwarderLogglyConnectionType) GetSampleRateOk() (*int32, bool)` + +GetSampleRateOk returns a tuple with the SampleRate field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSampleRate + +`func (o *LogForwarderLogglyConnectionType) SetSampleRate(v int32)` + +SetSampleRate sets SampleRate field to given value. + +### HasSampleRate + +`func (o *LogForwarderLogglyConnectionType) HasSampleRate() bool` + +HasSampleRate returns a boolean if a field has been set. + +### GetToken + +`func (o *LogForwarderLogglyConnectionType) GetToken() string` + +GetToken returns the Token field if non-nil, zero value otherwise. + +### GetTokenOk + +`func (o *LogForwarderLogglyConnectionType) GetTokenOk() (*string, bool)` + +GetTokenOk returns a tuple with the Token field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetToken + +`func (o *LogForwarderLogglyConnectionType) SetToken(v string)` + +SetToken sets Token field to given value. + +### HasToken + +`func (o *LogForwarderLogglyConnectionType) HasToken() bool` + +HasToken returns a boolean if a field has been set. + +### GetUrl + +`func (o *LogForwarderLogglyConnectionType) GetUrl() string` + +GetUrl returns the Url field if non-nil, zero value otherwise. + +### GetUrlOk + +`func (o *LogForwarderLogglyConnectionType) GetUrlOk() (*string, bool)` + +GetUrlOk returns a tuple with the Url field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUrl + +`func (o *LogForwarderLogglyConnectionType) SetUrl(v string)` + +SetUrl sets Url field to given value. + +### HasUrl + +`func (o *LogForwarderLogglyConnectionType) HasUrl() bool` + +HasUrl returns a boolean if a field has been set. + +### GetFlushInterval + +`func (o *LogForwarderLogglyConnectionType) GetFlushInterval() int32` + +GetFlushInterval returns the FlushInterval field if non-nil, zero value otherwise. + +### GetFlushIntervalOk + +`func (o *LogForwarderLogglyConnectionType) GetFlushIntervalOk() (*int32, bool)` + +GetFlushIntervalOk returns a tuple with the FlushInterval field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFlushInterval + +`func (o *LogForwarderLogglyConnectionType) SetFlushInterval(v int32)` + +SetFlushInterval sets FlushInterval field to given value. + +### HasFlushInterval + +`func (o *LogForwarderLogglyConnectionType) HasFlushInterval() bool` + +HasFlushInterval returns a boolean if a field has been set. + +### GetBufferSize + +`func (o *LogForwarderLogglyConnectionType) GetBufferSize() int32` + +GetBufferSize returns the BufferSize field if non-nil, zero value otherwise. + +### GetBufferSizeOk + +`func (o *LogForwarderLogglyConnectionType) GetBufferSizeOk() (*int32, bool)` + +GetBufferSizeOk returns a tuple with the BufferSize field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBufferSize + +`func (o *LogForwarderLogglyConnectionType) SetBufferSize(v int32)` + +SetBufferSize sets BufferSize field to given value. + +### HasBufferSize + +`func (o *LogForwarderLogglyConnectionType) HasBufferSize() bool` + +HasBufferSize returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/LogForwarderResponse.md b/docs/LogForwarderResponse.md new file mode 100644 index 0000000..bebf747 --- /dev/null +++ b/docs/LogForwarderResponse.md @@ -0,0 +1,92 @@ +# LogForwarderResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**LogForwarderGeneric**](LogForwarderGeneric.md) | | [optional] +**Message** | Pointer to **NullableString** | | [optional] + +## Methods + +### NewLogForwarderResponse + +`func NewLogForwarderResponse() *LogForwarderResponse` + +NewLogForwarderResponse instantiates a new LogForwarderResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewLogForwarderResponseWithDefaults + +`func NewLogForwarderResponseWithDefaults() *LogForwarderResponse` + +NewLogForwarderResponseWithDefaults instantiates a new LogForwarderResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *LogForwarderResponse) GetData() LogForwarderGeneric` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *LogForwarderResponse) GetDataOk() (*LogForwarderGeneric, 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 *LogForwarderResponse) SetData(v LogForwarderGeneric)` + +SetData sets Data field to given value. + +### HasData + +`func (o *LogForwarderResponse) HasData() bool` + +HasData returns a boolean if a field has been set. + +### GetMessage + +`func (o *LogForwarderResponse) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *LogForwarderResponse) GetMessageOk() (*string, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessage + +`func (o *LogForwarderResponse) SetMessage(v string)` + +SetMessage sets Message field to given value. + +### HasMessage + +`func (o *LogForwarderResponse) HasMessage() bool` + +HasMessage returns a boolean if a field has been set. + +### SetMessageNil + +`func (o *LogForwarderResponse) SetMessageNil(b bool)` + + SetMessageNil sets the value for Message to be an explicit nil + +### UnsetMessage +`func (o *LogForwarderResponse) UnsetMessage()` + +UnsetMessage ensures that no value is present for Message, not even an explicit nil + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/LogForwarderS3ConnectionType.md b/docs/LogForwarderS3ConnectionType.md new file mode 100644 index 0000000..809972f --- /dev/null +++ b/docs/LogForwarderS3ConnectionType.md @@ -0,0 +1,212 @@ +# LogForwarderS3ConnectionType + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**SampleRate** | Pointer to **int32** | | [optional] +**S3Endpoint** | Pointer to **string** | | [optional] +**AccessKey** | Pointer to **string** | | [optional] +**SecretKey** | Pointer to **string** | | [optional] +**BucketName** | Pointer to **string** | | [optional] +**ObjectSize** | Pointer to **int32** | | [optional] +**FlushInterval** | Pointer to **int32** | | [optional] + +## Methods + +### NewLogForwarderS3ConnectionType + +`func NewLogForwarderS3ConnectionType() *LogForwarderS3ConnectionType` + +NewLogForwarderS3ConnectionType instantiates a new LogForwarderS3ConnectionType object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewLogForwarderS3ConnectionTypeWithDefaults + +`func NewLogForwarderS3ConnectionTypeWithDefaults() *LogForwarderS3ConnectionType` + +NewLogForwarderS3ConnectionTypeWithDefaults instantiates a new LogForwarderS3ConnectionType object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetSampleRate + +`func (o *LogForwarderS3ConnectionType) GetSampleRate() int32` + +GetSampleRate returns the SampleRate field if non-nil, zero value otherwise. + +### GetSampleRateOk + +`func (o *LogForwarderS3ConnectionType) GetSampleRateOk() (*int32, bool)` + +GetSampleRateOk returns a tuple with the SampleRate field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSampleRate + +`func (o *LogForwarderS3ConnectionType) SetSampleRate(v int32)` + +SetSampleRate sets SampleRate field to given value. + +### HasSampleRate + +`func (o *LogForwarderS3ConnectionType) HasSampleRate() bool` + +HasSampleRate returns a boolean if a field has been set. + +### GetS3Endpoint + +`func (o *LogForwarderS3ConnectionType) GetS3Endpoint() string` + +GetS3Endpoint returns the S3Endpoint field if non-nil, zero value otherwise. + +### GetS3EndpointOk + +`func (o *LogForwarderS3ConnectionType) GetS3EndpointOk() (*string, bool)` + +GetS3EndpointOk returns a tuple with the S3Endpoint field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetS3Endpoint + +`func (o *LogForwarderS3ConnectionType) SetS3Endpoint(v string)` + +SetS3Endpoint sets S3Endpoint field to given value. + +### HasS3Endpoint + +`func (o *LogForwarderS3ConnectionType) HasS3Endpoint() bool` + +HasS3Endpoint returns a boolean if a field has been set. + +### GetAccessKey + +`func (o *LogForwarderS3ConnectionType) GetAccessKey() string` + +GetAccessKey returns the AccessKey field if non-nil, zero value otherwise. + +### GetAccessKeyOk + +`func (o *LogForwarderS3ConnectionType) GetAccessKeyOk() (*string, bool)` + +GetAccessKeyOk returns a tuple with the AccessKey field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccessKey + +`func (o *LogForwarderS3ConnectionType) SetAccessKey(v string)` + +SetAccessKey sets AccessKey field to given value. + +### HasAccessKey + +`func (o *LogForwarderS3ConnectionType) HasAccessKey() bool` + +HasAccessKey returns a boolean if a field has been set. + +### GetSecretKey + +`func (o *LogForwarderS3ConnectionType) GetSecretKey() string` + +GetSecretKey returns the SecretKey field if non-nil, zero value otherwise. + +### GetSecretKeyOk + +`func (o *LogForwarderS3ConnectionType) GetSecretKeyOk() (*string, bool)` + +GetSecretKeyOk returns a tuple with the SecretKey field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSecretKey + +`func (o *LogForwarderS3ConnectionType) SetSecretKey(v string)` + +SetSecretKey sets SecretKey field to given value. + +### HasSecretKey + +`func (o *LogForwarderS3ConnectionType) HasSecretKey() bool` + +HasSecretKey returns a boolean if a field has been set. + +### GetBucketName + +`func (o *LogForwarderS3ConnectionType) GetBucketName() string` + +GetBucketName returns the BucketName field if non-nil, zero value otherwise. + +### GetBucketNameOk + +`func (o *LogForwarderS3ConnectionType) GetBucketNameOk() (*string, bool)` + +GetBucketNameOk returns a tuple with the BucketName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBucketName + +`func (o *LogForwarderS3ConnectionType) SetBucketName(v string)` + +SetBucketName sets BucketName field to given value. + +### HasBucketName + +`func (o *LogForwarderS3ConnectionType) HasBucketName() bool` + +HasBucketName returns a boolean if a field has been set. + +### GetObjectSize + +`func (o *LogForwarderS3ConnectionType) GetObjectSize() int32` + +GetObjectSize returns the ObjectSize field if non-nil, zero value otherwise. + +### GetObjectSizeOk + +`func (o *LogForwarderS3ConnectionType) GetObjectSizeOk() (*int32, bool)` + +GetObjectSizeOk returns a tuple with the ObjectSize field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetObjectSize + +`func (o *LogForwarderS3ConnectionType) SetObjectSize(v int32)` + +SetObjectSize sets ObjectSize field to given value. + +### HasObjectSize + +`func (o *LogForwarderS3ConnectionType) HasObjectSize() bool` + +HasObjectSize returns a boolean if a field has been set. + +### GetFlushInterval + +`func (o *LogForwarderS3ConnectionType) GetFlushInterval() int32` + +GetFlushInterval returns the FlushInterval field if non-nil, zero value otherwise. + +### GetFlushIntervalOk + +`func (o *LogForwarderS3ConnectionType) GetFlushIntervalOk() (*int32, bool)` + +GetFlushIntervalOk returns a tuple with the FlushInterval field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFlushInterval + +`func (o *LogForwarderS3ConnectionType) SetFlushInterval(v int32)` + +SetFlushInterval sets FlushInterval field to given value. + +### HasFlushInterval + +`func (o *LogForwarderS3ConnectionType) HasFlushInterval() bool` + +HasFlushInterval returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/LogForwarderSetting.md b/docs/LogForwarderSetting.md new file mode 100644 index 0000000..66ad8c7 --- /dev/null +++ b/docs/LogForwarderSetting.md @@ -0,0 +1,628 @@ +# LogForwarderSetting + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**SampleRate** | Pointer to **int32** | | [optional] +**S3Endpoint** | Pointer to **string** | | [optional] +**AccessKey** | Pointer to **string** | | [optional] +**SecretKey** | Pointer to **string** | | [optional] +**BucketName** | Pointer to **string** | | [optional] +**ObjectSize** | Pointer to **int32** | | [optional] +**FlushInterval** | Pointer to **int32** | | [optional] +**Url** | Pointer to **string** | | [optional] +**ApiKey** | Pointer to **string** | | [optional] +**AppKey** | Pointer to **string** | | [optional] +**BufferSize** | Pointer to **int32** | | [optional] +**KafkaVersion** | Pointer to **string** | | [optional] +**KafkaBrokers** | Pointer to **[]string** | | [optional] +**KafkaTopicToWrite** | Pointer to **string** | | [optional] +**KafkaProducerBatchSize** | Pointer to **int32** | | [optional] +**KafkaProducerFlushFrequencyMs** | Pointer to **int32** | | [optional] +**Token** | Pointer to **string** | | [optional] +**Logtype** | Pointer to **string** | | [optional] +**Host** | Pointer to **string** | | [optional] +**Port** | Pointer to **int32** | | [optional] +**Tls** | Pointer to **bool** | | [optional] +**Cert** | Pointer to **string** | | [optional] +**RetryTime** | Pointer to **int32** | | [optional] + +## Methods + +### NewLogForwarderSetting + +`func NewLogForwarderSetting() *LogForwarderSetting` + +NewLogForwarderSetting instantiates a new LogForwarderSetting object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewLogForwarderSettingWithDefaults + +`func NewLogForwarderSettingWithDefaults() *LogForwarderSetting` + +NewLogForwarderSettingWithDefaults instantiates a new LogForwarderSetting object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetSampleRate + +`func (o *LogForwarderSetting) GetSampleRate() int32` + +GetSampleRate returns the SampleRate field if non-nil, zero value otherwise. + +### GetSampleRateOk + +`func (o *LogForwarderSetting) GetSampleRateOk() (*int32, bool)` + +GetSampleRateOk returns a tuple with the SampleRate field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSampleRate + +`func (o *LogForwarderSetting) SetSampleRate(v int32)` + +SetSampleRate sets SampleRate field to given value. + +### HasSampleRate + +`func (o *LogForwarderSetting) HasSampleRate() bool` + +HasSampleRate returns a boolean if a field has been set. + +### GetS3Endpoint + +`func (o *LogForwarderSetting) GetS3Endpoint() string` + +GetS3Endpoint returns the S3Endpoint field if non-nil, zero value otherwise. + +### GetS3EndpointOk + +`func (o *LogForwarderSetting) GetS3EndpointOk() (*string, bool)` + +GetS3EndpointOk returns a tuple with the S3Endpoint field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetS3Endpoint + +`func (o *LogForwarderSetting) SetS3Endpoint(v string)` + +SetS3Endpoint sets S3Endpoint field to given value. + +### HasS3Endpoint + +`func (o *LogForwarderSetting) HasS3Endpoint() bool` + +HasS3Endpoint returns a boolean if a field has been set. + +### GetAccessKey + +`func (o *LogForwarderSetting) GetAccessKey() string` + +GetAccessKey returns the AccessKey field if non-nil, zero value otherwise. + +### GetAccessKeyOk + +`func (o *LogForwarderSetting) GetAccessKeyOk() (*string, bool)` + +GetAccessKeyOk returns a tuple with the AccessKey field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccessKey + +`func (o *LogForwarderSetting) SetAccessKey(v string)` + +SetAccessKey sets AccessKey field to given value. + +### HasAccessKey + +`func (o *LogForwarderSetting) HasAccessKey() bool` + +HasAccessKey returns a boolean if a field has been set. + +### GetSecretKey + +`func (o *LogForwarderSetting) GetSecretKey() string` + +GetSecretKey returns the SecretKey field if non-nil, zero value otherwise. + +### GetSecretKeyOk + +`func (o *LogForwarderSetting) GetSecretKeyOk() (*string, bool)` + +GetSecretKeyOk returns a tuple with the SecretKey field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSecretKey + +`func (o *LogForwarderSetting) SetSecretKey(v string)` + +SetSecretKey sets SecretKey field to given value. + +### HasSecretKey + +`func (o *LogForwarderSetting) HasSecretKey() bool` + +HasSecretKey returns a boolean if a field has been set. + +### GetBucketName + +`func (o *LogForwarderSetting) GetBucketName() string` + +GetBucketName returns the BucketName field if non-nil, zero value otherwise. + +### GetBucketNameOk + +`func (o *LogForwarderSetting) GetBucketNameOk() (*string, bool)` + +GetBucketNameOk returns a tuple with the BucketName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBucketName + +`func (o *LogForwarderSetting) SetBucketName(v string)` + +SetBucketName sets BucketName field to given value. + +### HasBucketName + +`func (o *LogForwarderSetting) HasBucketName() bool` + +HasBucketName returns a boolean if a field has been set. + +### GetObjectSize + +`func (o *LogForwarderSetting) GetObjectSize() int32` + +GetObjectSize returns the ObjectSize field if non-nil, zero value otherwise. + +### GetObjectSizeOk + +`func (o *LogForwarderSetting) GetObjectSizeOk() (*int32, bool)` + +GetObjectSizeOk returns a tuple with the ObjectSize field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetObjectSize + +`func (o *LogForwarderSetting) SetObjectSize(v int32)` + +SetObjectSize sets ObjectSize field to given value. + +### HasObjectSize + +`func (o *LogForwarderSetting) HasObjectSize() bool` + +HasObjectSize returns a boolean if a field has been set. + +### GetFlushInterval + +`func (o *LogForwarderSetting) GetFlushInterval() int32` + +GetFlushInterval returns the FlushInterval field if non-nil, zero value otherwise. + +### GetFlushIntervalOk + +`func (o *LogForwarderSetting) GetFlushIntervalOk() (*int32, bool)` + +GetFlushIntervalOk returns a tuple with the FlushInterval field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFlushInterval + +`func (o *LogForwarderSetting) SetFlushInterval(v int32)` + +SetFlushInterval sets FlushInterval field to given value. + +### HasFlushInterval + +`func (o *LogForwarderSetting) HasFlushInterval() bool` + +HasFlushInterval returns a boolean if a field has been set. + +### GetUrl + +`func (o *LogForwarderSetting) GetUrl() string` + +GetUrl returns the Url field if non-nil, zero value otherwise. + +### GetUrlOk + +`func (o *LogForwarderSetting) GetUrlOk() (*string, bool)` + +GetUrlOk returns a tuple with the Url field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUrl + +`func (o *LogForwarderSetting) SetUrl(v string)` + +SetUrl sets Url field to given value. + +### HasUrl + +`func (o *LogForwarderSetting) HasUrl() bool` + +HasUrl returns a boolean if a field has been set. + +### GetApiKey + +`func (o *LogForwarderSetting) GetApiKey() string` + +GetApiKey returns the ApiKey field if non-nil, zero value otherwise. + +### GetApiKeyOk + +`func (o *LogForwarderSetting) 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 *LogForwarderSetting) SetApiKey(v string)` + +SetApiKey sets ApiKey field to given value. + +### HasApiKey + +`func (o *LogForwarderSetting) HasApiKey() bool` + +HasApiKey returns a boolean if a field has been set. + +### GetAppKey + +`func (o *LogForwarderSetting) GetAppKey() string` + +GetAppKey returns the AppKey field if non-nil, zero value otherwise. + +### GetAppKeyOk + +`func (o *LogForwarderSetting) GetAppKeyOk() (*string, bool)` + +GetAppKeyOk returns a tuple with the AppKey field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAppKey + +`func (o *LogForwarderSetting) SetAppKey(v string)` + +SetAppKey sets AppKey field to given value. + +### HasAppKey + +`func (o *LogForwarderSetting) HasAppKey() bool` + +HasAppKey returns a boolean if a field has been set. + +### GetBufferSize + +`func (o *LogForwarderSetting) GetBufferSize() int32` + +GetBufferSize returns the BufferSize field if non-nil, zero value otherwise. + +### GetBufferSizeOk + +`func (o *LogForwarderSetting) GetBufferSizeOk() (*int32, bool)` + +GetBufferSizeOk returns a tuple with the BufferSize field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBufferSize + +`func (o *LogForwarderSetting) SetBufferSize(v int32)` + +SetBufferSize sets BufferSize field to given value. + +### HasBufferSize + +`func (o *LogForwarderSetting) HasBufferSize() bool` + +HasBufferSize returns a boolean if a field has been set. + +### GetKafkaVersion + +`func (o *LogForwarderSetting) GetKafkaVersion() string` + +GetKafkaVersion returns the KafkaVersion field if non-nil, zero value otherwise. + +### GetKafkaVersionOk + +`func (o *LogForwarderSetting) GetKafkaVersionOk() (*string, bool)` + +GetKafkaVersionOk returns a tuple with the KafkaVersion field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKafkaVersion + +`func (o *LogForwarderSetting) SetKafkaVersion(v string)` + +SetKafkaVersion sets KafkaVersion field to given value. + +### HasKafkaVersion + +`func (o *LogForwarderSetting) HasKafkaVersion() bool` + +HasKafkaVersion returns a boolean if a field has been set. + +### GetKafkaBrokers + +`func (o *LogForwarderSetting) GetKafkaBrokers() []string` + +GetKafkaBrokers returns the KafkaBrokers field if non-nil, zero value otherwise. + +### GetKafkaBrokersOk + +`func (o *LogForwarderSetting) GetKafkaBrokersOk() (*[]string, bool)` + +GetKafkaBrokersOk returns a tuple with the KafkaBrokers field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKafkaBrokers + +`func (o *LogForwarderSetting) SetKafkaBrokers(v []string)` + +SetKafkaBrokers sets KafkaBrokers field to given value. + +### HasKafkaBrokers + +`func (o *LogForwarderSetting) HasKafkaBrokers() bool` + +HasKafkaBrokers returns a boolean if a field has been set. + +### GetKafkaTopicToWrite + +`func (o *LogForwarderSetting) GetKafkaTopicToWrite() string` + +GetKafkaTopicToWrite returns the KafkaTopicToWrite field if non-nil, zero value otherwise. + +### GetKafkaTopicToWriteOk + +`func (o *LogForwarderSetting) GetKafkaTopicToWriteOk() (*string, bool)` + +GetKafkaTopicToWriteOk returns a tuple with the KafkaTopicToWrite field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKafkaTopicToWrite + +`func (o *LogForwarderSetting) SetKafkaTopicToWrite(v string)` + +SetKafkaTopicToWrite sets KafkaTopicToWrite field to given value. + +### HasKafkaTopicToWrite + +`func (o *LogForwarderSetting) HasKafkaTopicToWrite() bool` + +HasKafkaTopicToWrite returns a boolean if a field has been set. + +### GetKafkaProducerBatchSize + +`func (o *LogForwarderSetting) GetKafkaProducerBatchSize() int32` + +GetKafkaProducerBatchSize returns the KafkaProducerBatchSize field if non-nil, zero value otherwise. + +### GetKafkaProducerBatchSizeOk + +`func (o *LogForwarderSetting) GetKafkaProducerBatchSizeOk() (*int32, bool)` + +GetKafkaProducerBatchSizeOk returns a tuple with the KafkaProducerBatchSize field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKafkaProducerBatchSize + +`func (o *LogForwarderSetting) SetKafkaProducerBatchSize(v int32)` + +SetKafkaProducerBatchSize sets KafkaProducerBatchSize field to given value. + +### HasKafkaProducerBatchSize + +`func (o *LogForwarderSetting) HasKafkaProducerBatchSize() bool` + +HasKafkaProducerBatchSize returns a boolean if a field has been set. + +### GetKafkaProducerFlushFrequencyMs + +`func (o *LogForwarderSetting) GetKafkaProducerFlushFrequencyMs() int32` + +GetKafkaProducerFlushFrequencyMs returns the KafkaProducerFlushFrequencyMs field if non-nil, zero value otherwise. + +### GetKafkaProducerFlushFrequencyMsOk + +`func (o *LogForwarderSetting) GetKafkaProducerFlushFrequencyMsOk() (*int32, bool)` + +GetKafkaProducerFlushFrequencyMsOk returns a tuple with the KafkaProducerFlushFrequencyMs field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKafkaProducerFlushFrequencyMs + +`func (o *LogForwarderSetting) SetKafkaProducerFlushFrequencyMs(v int32)` + +SetKafkaProducerFlushFrequencyMs sets KafkaProducerFlushFrequencyMs field to given value. + +### HasKafkaProducerFlushFrequencyMs + +`func (o *LogForwarderSetting) HasKafkaProducerFlushFrequencyMs() bool` + +HasKafkaProducerFlushFrequencyMs returns a boolean if a field has been set. + +### GetToken + +`func (o *LogForwarderSetting) GetToken() string` + +GetToken returns the Token field if non-nil, zero value otherwise. + +### GetTokenOk + +`func (o *LogForwarderSetting) GetTokenOk() (*string, bool)` + +GetTokenOk returns a tuple with the Token field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetToken + +`func (o *LogForwarderSetting) SetToken(v string)` + +SetToken sets Token field to given value. + +### HasToken + +`func (o *LogForwarderSetting) HasToken() bool` + +HasToken returns a boolean if a field has been set. + +### GetLogtype + +`func (o *LogForwarderSetting) GetLogtype() string` + +GetLogtype returns the Logtype field if non-nil, zero value otherwise. + +### GetLogtypeOk + +`func (o *LogForwarderSetting) GetLogtypeOk() (*string, bool)` + +GetLogtypeOk returns a tuple with the Logtype field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLogtype + +`func (o *LogForwarderSetting) SetLogtype(v string)` + +SetLogtype sets Logtype field to given value. + +### HasLogtype + +`func (o *LogForwarderSetting) HasLogtype() bool` + +HasLogtype returns a boolean if a field has been set. + +### GetHost + +`func (o *LogForwarderSetting) GetHost() string` + +GetHost returns the Host field if non-nil, zero value otherwise. + +### GetHostOk + +`func (o *LogForwarderSetting) GetHostOk() (*string, bool)` + +GetHostOk returns a tuple with the Host field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHost + +`func (o *LogForwarderSetting) SetHost(v string)` + +SetHost sets Host field to given value. + +### HasHost + +`func (o *LogForwarderSetting) HasHost() bool` + +HasHost returns a boolean if a field has been set. + +### GetPort + +`func (o *LogForwarderSetting) GetPort() int32` + +GetPort returns the Port field if non-nil, zero value otherwise. + +### GetPortOk + +`func (o *LogForwarderSetting) GetPortOk() (*int32, bool)` + +GetPortOk returns a tuple with the Port field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPort + +`func (o *LogForwarderSetting) SetPort(v int32)` + +SetPort sets Port field to given value. + +### HasPort + +`func (o *LogForwarderSetting) HasPort() bool` + +HasPort returns a boolean if a field has been set. + +### GetTls + +`func (o *LogForwarderSetting) GetTls() bool` + +GetTls returns the Tls field if non-nil, zero value otherwise. + +### GetTlsOk + +`func (o *LogForwarderSetting) GetTlsOk() (*bool, bool)` + +GetTlsOk returns a tuple with the Tls field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTls + +`func (o *LogForwarderSetting) SetTls(v bool)` + +SetTls sets Tls field to given value. + +### HasTls + +`func (o *LogForwarderSetting) HasTls() bool` + +HasTls returns a boolean if a field has been set. + +### GetCert + +`func (o *LogForwarderSetting) GetCert() string` + +GetCert returns the Cert field if non-nil, zero value otherwise. + +### GetCertOk + +`func (o *LogForwarderSetting) GetCertOk() (*string, bool)` + +GetCertOk returns a tuple with the Cert field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCert + +`func (o *LogForwarderSetting) SetCert(v string)` + +SetCert sets Cert field to given value. + +### HasCert + +`func (o *LogForwarderSetting) HasCert() bool` + +HasCert returns a boolean if a field has been set. + +### GetRetryTime + +`func (o *LogForwarderSetting) GetRetryTime() int32` + +GetRetryTime returns the RetryTime field if non-nil, zero value otherwise. + +### GetRetryTimeOk + +`func (o *LogForwarderSetting) GetRetryTimeOk() (*int32, bool)` + +GetRetryTimeOk returns a tuple with the RetryTime field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRetryTime + +`func (o *LogForwarderSetting) SetRetryTime(v int32)` + +SetRetryTime sets RetryTime field to given value. + +### HasRetryTime + +`func (o *LogForwarderSetting) HasRetryTime() bool` + +HasRetryTime returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/LogForwarderSummary.md b/docs/LogForwarderSummary.md new file mode 100644 index 0000000..8abe93b --- /dev/null +++ b/docs/LogForwarderSummary.md @@ -0,0 +1,186 @@ +# LogForwarderSummary + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **string** | | [optional] +**Type** | Pointer to **string** | | [optional] +**ConnectionType** | Pointer to **string** | | [optional] +**Name** | Pointer to **string** | | [optional] +**Description** | Pointer to **string** | | [optional] +**Status** | Pointer to **bool** | | [optional] + +## Methods + +### NewLogForwarderSummary + +`func NewLogForwarderSummary() *LogForwarderSummary` + +NewLogForwarderSummary instantiates a new LogForwarderSummary object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewLogForwarderSummaryWithDefaults + +`func NewLogForwarderSummaryWithDefaults() *LogForwarderSummary` + +NewLogForwarderSummaryWithDefaults instantiates a new LogForwarderSummary object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *LogForwarderSummary) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *LogForwarderSummary) 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 *LogForwarderSummary) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *LogForwarderSummary) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetType + +`func (o *LogForwarderSummary) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *LogForwarderSummary) 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 *LogForwarderSummary) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *LogForwarderSummary) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetConnectionType + +`func (o *LogForwarderSummary) GetConnectionType() string` + +GetConnectionType returns the ConnectionType field if non-nil, zero value otherwise. + +### GetConnectionTypeOk + +`func (o *LogForwarderSummary) GetConnectionTypeOk() (*string, bool)` + +GetConnectionTypeOk returns a tuple with the ConnectionType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConnectionType + +`func (o *LogForwarderSummary) SetConnectionType(v string)` + +SetConnectionType sets ConnectionType field to given value. + +### HasConnectionType + +`func (o *LogForwarderSummary) HasConnectionType() bool` + +HasConnectionType returns a boolean if a field has been set. + +### GetName + +`func (o *LogForwarderSummary) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *LogForwarderSummary) 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 *LogForwarderSummary) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *LogForwarderSummary) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetDescription + +`func (o *LogForwarderSummary) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *LogForwarderSummary) 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 *LogForwarderSummary) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *LogForwarderSummary) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetStatus + +`func (o *LogForwarderSummary) GetStatus() bool` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *LogForwarderSummary) GetStatusOk() (*bool, 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 *LogForwarderSummary) SetStatus(v bool)` + +SetStatus sets Status field to given value. + +### HasStatus + +`func (o *LogForwarderSummary) HasStatus() bool` + +HasStatus returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/LogForwarderSyslogConnectionType.md b/docs/LogForwarderSyslogConnectionType.md new file mode 100644 index 0000000..5a3d4c7 --- /dev/null +++ b/docs/LogForwarderSyslogConnectionType.md @@ -0,0 +1,212 @@ +# LogForwarderSyslogConnectionType + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**SampleRate** | Pointer to **int32** | | [optional] +**Logtype** | Pointer to **string** | | [optional] +**Host** | Pointer to **string** | | [optional] +**Port** | Pointer to **int32** | | [optional] +**Tls** | Pointer to **bool** | | [optional] +**Cert** | Pointer to **string** | | [optional] +**RetryTime** | Pointer to **int32** | | [optional] + +## Methods + +### NewLogForwarderSyslogConnectionType + +`func NewLogForwarderSyslogConnectionType() *LogForwarderSyslogConnectionType` + +NewLogForwarderSyslogConnectionType instantiates a new LogForwarderSyslogConnectionType object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewLogForwarderSyslogConnectionTypeWithDefaults + +`func NewLogForwarderSyslogConnectionTypeWithDefaults() *LogForwarderSyslogConnectionType` + +NewLogForwarderSyslogConnectionTypeWithDefaults instantiates a new LogForwarderSyslogConnectionType object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetSampleRate + +`func (o *LogForwarderSyslogConnectionType) GetSampleRate() int32` + +GetSampleRate returns the SampleRate field if non-nil, zero value otherwise. + +### GetSampleRateOk + +`func (o *LogForwarderSyslogConnectionType) GetSampleRateOk() (*int32, bool)` + +GetSampleRateOk returns a tuple with the SampleRate field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSampleRate + +`func (o *LogForwarderSyslogConnectionType) SetSampleRate(v int32)` + +SetSampleRate sets SampleRate field to given value. + +### HasSampleRate + +`func (o *LogForwarderSyslogConnectionType) HasSampleRate() bool` + +HasSampleRate returns a boolean if a field has been set. + +### GetLogtype + +`func (o *LogForwarderSyslogConnectionType) GetLogtype() string` + +GetLogtype returns the Logtype field if non-nil, zero value otherwise. + +### GetLogtypeOk + +`func (o *LogForwarderSyslogConnectionType) GetLogtypeOk() (*string, bool)` + +GetLogtypeOk returns a tuple with the Logtype field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLogtype + +`func (o *LogForwarderSyslogConnectionType) SetLogtype(v string)` + +SetLogtype sets Logtype field to given value. + +### HasLogtype + +`func (o *LogForwarderSyslogConnectionType) HasLogtype() bool` + +HasLogtype returns a boolean if a field has been set. + +### GetHost + +`func (o *LogForwarderSyslogConnectionType) GetHost() string` + +GetHost returns the Host field if non-nil, zero value otherwise. + +### GetHostOk + +`func (o *LogForwarderSyslogConnectionType) GetHostOk() (*string, bool)` + +GetHostOk returns a tuple with the Host field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHost + +`func (o *LogForwarderSyslogConnectionType) SetHost(v string)` + +SetHost sets Host field to given value. + +### HasHost + +`func (o *LogForwarderSyslogConnectionType) HasHost() bool` + +HasHost returns a boolean if a field has been set. + +### GetPort + +`func (o *LogForwarderSyslogConnectionType) GetPort() int32` + +GetPort returns the Port field if non-nil, zero value otherwise. + +### GetPortOk + +`func (o *LogForwarderSyslogConnectionType) GetPortOk() (*int32, bool)` + +GetPortOk returns a tuple with the Port field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPort + +`func (o *LogForwarderSyslogConnectionType) SetPort(v int32)` + +SetPort sets Port field to given value. + +### HasPort + +`func (o *LogForwarderSyslogConnectionType) HasPort() bool` + +HasPort returns a boolean if a field has been set. + +### GetTls + +`func (o *LogForwarderSyslogConnectionType) GetTls() bool` + +GetTls returns the Tls field if non-nil, zero value otherwise. + +### GetTlsOk + +`func (o *LogForwarderSyslogConnectionType) GetTlsOk() (*bool, bool)` + +GetTlsOk returns a tuple with the Tls field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTls + +`func (o *LogForwarderSyslogConnectionType) SetTls(v bool)` + +SetTls sets Tls field to given value. + +### HasTls + +`func (o *LogForwarderSyslogConnectionType) HasTls() bool` + +HasTls returns a boolean if a field has been set. + +### GetCert + +`func (o *LogForwarderSyslogConnectionType) GetCert() string` + +GetCert returns the Cert field if non-nil, zero value otherwise. + +### GetCertOk + +`func (o *LogForwarderSyslogConnectionType) GetCertOk() (*string, bool)` + +GetCertOk returns a tuple with the Cert field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCert + +`func (o *LogForwarderSyslogConnectionType) SetCert(v string)` + +SetCert sets Cert field to given value. + +### HasCert + +`func (o *LogForwarderSyslogConnectionType) HasCert() bool` + +HasCert returns a boolean if a field has been set. + +### GetRetryTime + +`func (o *LogForwarderSyslogConnectionType) GetRetryTime() int32` + +GetRetryTime returns the RetryTime field if non-nil, zero value otherwise. + +### GetRetryTimeOk + +`func (o *LogForwarderSyslogConnectionType) GetRetryTimeOk() (*int32, bool)` + +GetRetryTimeOk returns a tuple with the RetryTime field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRetryTime + +`func (o *LogForwarderSyslogConnectionType) SetRetryTime(v int32)` + +SetRetryTime sets RetryTime field to given value. + +### HasRetryTime + +`func (o *LogForwarderSyslogConnectionType) HasRetryTime() bool` + +HasRetryTime returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/LogForwarderWAFType.md b/docs/LogForwarderWAFType.md new file mode 100644 index 0000000..c93f553 --- /dev/null +++ b/docs/LogForwarderWAFType.md @@ -0,0 +1,160 @@ +# LogForwarderWAFType + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Product** | Pointer to **bool** | | [optional] +**Timestamp** | Pointer to **bool** | | [optional] +**RemoteAddress** | Pointer to **bool** | | [optional] +**Domain** | Pointer to **bool** | | [optional] +**Data** | Pointer to **bool** | | [optional] + +## Methods + +### NewLogForwarderWAFType + +`func NewLogForwarderWAFType() *LogForwarderWAFType` + +NewLogForwarderWAFType instantiates a new LogForwarderWAFType object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewLogForwarderWAFTypeWithDefaults + +`func NewLogForwarderWAFTypeWithDefaults() *LogForwarderWAFType` + +NewLogForwarderWAFTypeWithDefaults instantiates a new LogForwarderWAFType object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetProduct + +`func (o *LogForwarderWAFType) GetProduct() bool` + +GetProduct returns the Product field if non-nil, zero value otherwise. + +### GetProductOk + +`func (o *LogForwarderWAFType) GetProductOk() (*bool, bool)` + +GetProductOk returns a tuple with the Product field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProduct + +`func (o *LogForwarderWAFType) SetProduct(v bool)` + +SetProduct sets Product field to given value. + +### HasProduct + +`func (o *LogForwarderWAFType) HasProduct() bool` + +HasProduct returns a boolean if a field has been set. + +### GetTimestamp + +`func (o *LogForwarderWAFType) GetTimestamp() bool` + +GetTimestamp returns the Timestamp field if non-nil, zero value otherwise. + +### GetTimestampOk + +`func (o *LogForwarderWAFType) GetTimestampOk() (*bool, bool)` + +GetTimestampOk returns a tuple with the Timestamp field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTimestamp + +`func (o *LogForwarderWAFType) SetTimestamp(v bool)` + +SetTimestamp sets Timestamp field to given value. + +### HasTimestamp + +`func (o *LogForwarderWAFType) HasTimestamp() bool` + +HasTimestamp returns a boolean if a field has been set. + +### GetRemoteAddress + +`func (o *LogForwarderWAFType) GetRemoteAddress() bool` + +GetRemoteAddress returns the RemoteAddress field if non-nil, zero value otherwise. + +### GetRemoteAddressOk + +`func (o *LogForwarderWAFType) GetRemoteAddressOk() (*bool, bool)` + +GetRemoteAddressOk returns a tuple with the RemoteAddress field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRemoteAddress + +`func (o *LogForwarderWAFType) SetRemoteAddress(v bool)` + +SetRemoteAddress sets RemoteAddress field to given value. + +### HasRemoteAddress + +`func (o *LogForwarderWAFType) HasRemoteAddress() bool` + +HasRemoteAddress returns a boolean if a field has been set. + +### GetDomain + +`func (o *LogForwarderWAFType) GetDomain() bool` + +GetDomain returns the Domain field if non-nil, zero value otherwise. + +### GetDomainOk + +`func (o *LogForwarderWAFType) GetDomainOk() (*bool, bool)` + +GetDomainOk returns a tuple with the Domain field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDomain + +`func (o *LogForwarderWAFType) SetDomain(v bool)` + +SetDomain sets Domain field to given value. + +### HasDomain + +`func (o *LogForwarderWAFType) HasDomain() bool` + +HasDomain returns a boolean if a field has been set. + +### GetData + +`func (o *LogForwarderWAFType) GetData() bool` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *LogForwarderWAFType) GetDataOk() (*bool, 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 *LogForwarderWAFType) SetData(v bool)` + +SetData sets Data field to given value. + +### HasData + +`func (o *LogForwarderWAFType) HasData() bool` + +HasData returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/LogForwardersApi.md b/docs/LogForwardersApi.md new file mode 100644 index 0000000..d1d3f78 --- /dev/null +++ b/docs/LogForwardersApi.md @@ -0,0 +1,444 @@ +# \LogForwardersApi + +All URIs are relative to *https://napi.arvancloud.ir/cdn/4.0* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**LogForwardersDestroy**](LogForwardersApi.md#LogForwardersDestroy) | **Delete** /domains/{domain}/log-forwarders/{logForwarderId} | delete a log forwarder +[**LogForwardersIndex**](LogForwardersApi.md#LogForwardersIndex) | **Get** /domains/{domain}/log-forwarders | Show list of log forwarders for given domain +[**LogForwardersShow**](LogForwardersApi.md#LogForwardersShow) | **Get** /domains/{domain}/log-forwarders/{logForwarderId} | Show a log forwarder's details based on given id +[**LogForwardersStore**](LogForwardersApi.md#LogForwardersStore) | **Post** /domains/{domain}/log-forwarders | Create new log forwarder +[**LogForwardersUpdate**](LogForwardersApi.md#LogForwardersUpdate) | **Put** /domains/{domain}/log-forwarders/{logForwarderId} | Update a log forwarder +[**LogForwardersUpdateStatus**](LogForwardersApi.md#LogForwardersUpdateStatus) | **Patch** /domains/{domain}/log-forwarders/{logForwarderId}/status | Update a log forwarder's status + + + +## LogForwardersDestroy + +> MessageResponse LogForwardersDestroy(ctx, domain, logForwarderId).Execute() + +delete a log forwarder + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + logForwarderId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Log Forwarder Id + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.LogForwardersApi.LogForwardersDestroy(context.Background(), domain, logForwarderId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `LogForwardersApi.LogForwardersDestroy``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `LogForwardersDestroy`: MessageResponse + fmt.Fprintf(os.Stdout, "Response from `LogForwardersApi.LogForwardersDestroy`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | +**logForwarderId** | **string** | Log Forwarder Id | + +### Other Parameters + +Other parameters are passed through a pointer to a apiLogForwardersDestroyRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + +[**MessageResponse**](MessageResponse.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## LogForwardersIndex + +> LogForwardersIndex200Response LogForwardersIndex(ctx, domain).PerPage(perPage).Page(page).Execute() + +Show list of log forwarders for given domain + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + perPage := int32(56) // int32 | Set how many items returned per page (optional) + page := int32(56) // int32 | Set the desired page number (optional) (default to 1) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.LogForwardersApi.LogForwardersIndex(context.Background(), domain).PerPage(perPage).Page(page).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `LogForwardersApi.LogForwardersIndex``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `LogForwardersIndex`: LogForwardersIndex200Response + fmt.Fprintf(os.Stdout, "Response from `LogForwardersApi.LogForwardersIndex`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiLogForwardersIndexRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **perPage** | **int32** | Set how many items returned per page | + **page** | **int32** | Set the desired page number | [default to 1] + +### Return type + +[**LogForwardersIndex200Response**](LogForwardersIndex200Response.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## LogForwardersShow + +> LogForwarderResponse LogForwardersShow(ctx, domain, logForwarderId).Execute() + +Show a log forwarder's details based on given id + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + logForwarderId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Log Forwarder Id + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.LogForwardersApi.LogForwardersShow(context.Background(), domain, logForwarderId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `LogForwardersApi.LogForwardersShow``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `LogForwardersShow`: LogForwarderResponse + fmt.Fprintf(os.Stdout, "Response from `LogForwardersApi.LogForwardersShow`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | +**logForwarderId** | **string** | Log Forwarder Id | + +### Other Parameters + +Other parameters are passed through a pointer to a apiLogForwardersShowRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + +[**LogForwarderResponse**](LogForwarderResponse.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## LogForwardersStore + +> LogForwarderResponse LogForwardersStore(ctx, domain).LogForwarder(logForwarder).Execute() + +Create new log forwarder + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + logForwarder := *openapiclient.NewLogForwarder("Name_example", "Description_example", "Type_example", "ConnectionType_example", openapiclient.LogForwarderDataFormat{LogForwarderAccessLogType: openapiclient.NewLogForwarderAccessLogType()}, openapiclient.LogForwarderSetting{LogForwarderDatadogConnectionType: openapiclient.NewLogForwarderDatadogConnectionType()}, false) // LogForwarder | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.LogForwardersApi.LogForwardersStore(context.Background(), domain).LogForwarder(logForwarder).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `LogForwardersApi.LogForwardersStore``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `LogForwardersStore`: LogForwarderResponse + fmt.Fprintf(os.Stdout, "Response from `LogForwardersApi.LogForwardersStore`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiLogForwardersStoreRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **logForwarder** | [**LogForwarder**](LogForwarder.md) | | + +### Return type + +[**LogForwarderResponse**](LogForwarderResponse.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## LogForwardersUpdate + +> LogForwarderResponse LogForwardersUpdate(ctx, domain, logForwarderId).LogForwarder(logForwarder).Execute() + +Update a log forwarder + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + logForwarderId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Log Forwarder Id + logForwarder := *openapiclient.NewLogForwarder("Name_example", "Description_example", "Type_example", "ConnectionType_example", openapiclient.LogForwarderDataFormat{LogForwarderAccessLogType: openapiclient.NewLogForwarderAccessLogType()}, openapiclient.LogForwarderSetting{LogForwarderDatadogConnectionType: openapiclient.NewLogForwarderDatadogConnectionType()}, false) // LogForwarder | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.LogForwardersApi.LogForwardersUpdate(context.Background(), domain, logForwarderId).LogForwarder(logForwarder).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `LogForwardersApi.LogForwardersUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `LogForwardersUpdate`: LogForwarderResponse + fmt.Fprintf(os.Stdout, "Response from `LogForwardersApi.LogForwardersUpdate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | +**logForwarderId** | **string** | Log Forwarder Id | + +### Other Parameters + +Other parameters are passed through a pointer to a apiLogForwardersUpdateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **logForwarder** | [**LogForwarder**](LogForwarder.md) | | + +### Return type + +[**LogForwarderResponse**](LogForwarderResponse.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## LogForwardersUpdateStatus + +> LogForwarderResponse LogForwardersUpdateStatus(ctx, domain, logForwarderId).UpdateBooleanStatus(updateBooleanStatus).Execute() + +Update a log forwarder's status + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + logForwarderId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Log Forwarder Id + updateBooleanStatus := *openapiclient.NewUpdateBooleanStatus() // UpdateBooleanStatus | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.LogForwardersApi.LogForwardersUpdateStatus(context.Background(), domain, logForwarderId).UpdateBooleanStatus(updateBooleanStatus).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `LogForwardersApi.LogForwardersUpdateStatus``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `LogForwardersUpdateStatus`: LogForwarderResponse + fmt.Fprintf(os.Stdout, "Response from `LogForwardersApi.LogForwardersUpdateStatus`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | +**logForwarderId** | **string** | Log Forwarder Id | + +### Other Parameters + +Other parameters are passed through a pointer to a apiLogForwardersUpdateStatusRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **updateBooleanStatus** | [**UpdateBooleanStatus**](UpdateBooleanStatus.md) | | + +### Return type + +[**LogForwarderResponse**](LogForwarderResponse.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + diff --git a/docs/LogForwardersIndex200Response.md b/docs/LogForwardersIndex200Response.md new file mode 100644 index 0000000..9972518 --- /dev/null +++ b/docs/LogForwardersIndex200Response.md @@ -0,0 +1,108 @@ +# LogForwardersIndex200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**[]LogForwarderSummary**](LogForwarderSummary.md) | | [optional] +**Links** | Pointer to [**PaginatedResponseLinks**](PaginatedResponseLinks.md) | | [optional] +**Meta** | Pointer to [**PaginatedResponseMeta**](PaginatedResponseMeta.md) | | [optional] + +## Methods + +### NewLogForwardersIndex200Response + +`func NewLogForwardersIndex200Response() *LogForwardersIndex200Response` + +NewLogForwardersIndex200Response instantiates a new LogForwardersIndex200Response object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewLogForwardersIndex200ResponseWithDefaults + +`func NewLogForwardersIndex200ResponseWithDefaults() *LogForwardersIndex200Response` + +NewLogForwardersIndex200ResponseWithDefaults instantiates a new LogForwardersIndex200Response object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *LogForwardersIndex200Response) GetData() []LogForwarderSummary` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *LogForwardersIndex200Response) GetDataOk() (*[]LogForwarderSummary, 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 *LogForwardersIndex200Response) SetData(v []LogForwarderSummary)` + +SetData sets Data field to given value. + +### HasData + +`func (o *LogForwardersIndex200Response) HasData() bool` + +HasData returns a boolean if a field has been set. + +### GetLinks + +`func (o *LogForwardersIndex200Response) GetLinks() PaginatedResponseLinks` + +GetLinks returns the Links field if non-nil, zero value otherwise. + +### GetLinksOk + +`func (o *LogForwardersIndex200Response) GetLinksOk() (*PaginatedResponseLinks, bool)` + +GetLinksOk returns a tuple with the Links field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLinks + +`func (o *LogForwardersIndex200Response) SetLinks(v PaginatedResponseLinks)` + +SetLinks sets Links field to given value. + +### HasLinks + +`func (o *LogForwardersIndex200Response) HasLinks() bool` + +HasLinks returns a boolean if a field has been set. + +### GetMeta + +`func (o *LogForwardersIndex200Response) GetMeta() PaginatedResponseMeta` + +GetMeta returns the Meta field if non-nil, zero value otherwise. + +### GetMetaOk + +`func (o *LogForwardersIndex200Response) GetMetaOk() (*PaginatedResponseMeta, bool)` + +GetMetaOk returns a tuple with the Meta field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMeta + +`func (o *LogForwardersIndex200Response) SetMeta(v PaginatedResponseMeta)` + +SetMeta sets Meta field to given value. + +### HasMeta + +`func (o *LogForwardersIndex200Response) HasMeta() bool` + +HasMeta returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/MXRecord.md b/docs/MXRecord.md new file mode 100644 index 0000000..ca7dc85 --- /dev/null +++ b/docs/MXRecord.md @@ -0,0 +1,342 @@ +# MXRecord + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | Pointer to [**MXRecordValue**](MXRecordValue.md) | | [optional] +**Type** | Pointer to **string** | | [optional] [default to "mx"] +**Id** | Pointer to **string** | | [optional] [readonly] +**Name** | Pointer to **string** | | [optional] +**Ttl** | Pointer to **int32** | | [optional] +**Cloud** | Pointer to **bool** | | [optional] [default to false] +**UpstreamHttps** | Pointer to **string** | | [optional] +**IpFilterMode** | Pointer to [**DnsRecordIpFilterMode**](DnsRecordIpFilterMode.md) | | [optional] +**IsProtected** | Pointer to **bool** | Protected records cannot be modified or deleted by user. | [optional] [readonly] [default to false] +**Usage** | Pointer to **[]string** | | [optional] [readonly] [default to []] +**CreatedAt** | Pointer to **time.Time** | | [optional] [readonly] +**UpdatedAt** | Pointer to **time.Time** | | [optional] [readonly] + +## Methods + +### NewMXRecord + +`func NewMXRecord() *MXRecord` + +NewMXRecord instantiates a new MXRecord object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewMXRecordWithDefaults + +`func NewMXRecordWithDefaults() *MXRecord` + +NewMXRecordWithDefaults instantiates a new MXRecord object +This 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 *MXRecord) GetValue() MXRecordValue` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *MXRecord) GetValueOk() (*MXRecordValue, 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 *MXRecord) SetValue(v MXRecordValue)` + +SetValue sets Value field to given value. + +### HasValue + +`func (o *MXRecord) HasValue() bool` + +HasValue returns a boolean if a field has been set. + +### GetType + +`func (o *MXRecord) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *MXRecord) 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 *MXRecord) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *MXRecord) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetId + +`func (o *MXRecord) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *MXRecord) 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 *MXRecord) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *MXRecord) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetName + +`func (o *MXRecord) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *MXRecord) 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 *MXRecord) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *MXRecord) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetTtl + +`func (o *MXRecord) GetTtl() int32` + +GetTtl returns the Ttl field if non-nil, zero value otherwise. + +### GetTtlOk + +`func (o *MXRecord) GetTtlOk() (*int32, bool)` + +GetTtlOk returns a tuple with the Ttl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTtl + +`func (o *MXRecord) SetTtl(v int32)` + +SetTtl sets Ttl field to given value. + +### HasTtl + +`func (o *MXRecord) HasTtl() bool` + +HasTtl returns a boolean if a field has been set. + +### GetCloud + +`func (o *MXRecord) GetCloud() bool` + +GetCloud returns the Cloud field if non-nil, zero value otherwise. + +### GetCloudOk + +`func (o *MXRecord) GetCloudOk() (*bool, bool)` + +GetCloudOk returns a tuple with the Cloud field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCloud + +`func (o *MXRecord) SetCloud(v bool)` + +SetCloud sets Cloud field to given value. + +### HasCloud + +`func (o *MXRecord) HasCloud() bool` + +HasCloud returns a boolean if a field has been set. + +### GetUpstreamHttps + +`func (o *MXRecord) GetUpstreamHttps() string` + +GetUpstreamHttps returns the UpstreamHttps field if non-nil, zero value otherwise. + +### GetUpstreamHttpsOk + +`func (o *MXRecord) GetUpstreamHttpsOk() (*string, bool)` + +GetUpstreamHttpsOk returns a tuple with the UpstreamHttps field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpstreamHttps + +`func (o *MXRecord) SetUpstreamHttps(v string)` + +SetUpstreamHttps sets UpstreamHttps field to given value. + +### HasUpstreamHttps + +`func (o *MXRecord) HasUpstreamHttps() bool` + +HasUpstreamHttps returns a boolean if a field has been set. + +### GetIpFilterMode + +`func (o *MXRecord) GetIpFilterMode() DnsRecordIpFilterMode` + +GetIpFilterMode returns the IpFilterMode field if non-nil, zero value otherwise. + +### GetIpFilterModeOk + +`func (o *MXRecord) GetIpFilterModeOk() (*DnsRecordIpFilterMode, bool)` + +GetIpFilterModeOk returns a tuple with the IpFilterMode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIpFilterMode + +`func (o *MXRecord) SetIpFilterMode(v DnsRecordIpFilterMode)` + +SetIpFilterMode sets IpFilterMode field to given value. + +### HasIpFilterMode + +`func (o *MXRecord) HasIpFilterMode() bool` + +HasIpFilterMode returns a boolean if a field has been set. + +### GetIsProtected + +`func (o *MXRecord) GetIsProtected() bool` + +GetIsProtected returns the IsProtected field if non-nil, zero value otherwise. + +### GetIsProtectedOk + +`func (o *MXRecord) GetIsProtectedOk() (*bool, bool)` + +GetIsProtectedOk returns a tuple with the IsProtected field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsProtected + +`func (o *MXRecord) SetIsProtected(v bool)` + +SetIsProtected sets IsProtected field to given value. + +### HasIsProtected + +`func (o *MXRecord) HasIsProtected() bool` + +HasIsProtected returns a boolean if a field has been set. + +### GetUsage + +`func (o *MXRecord) GetUsage() []string` + +GetUsage returns the Usage field if non-nil, zero value otherwise. + +### GetUsageOk + +`func (o *MXRecord) GetUsageOk() (*[]string, bool)` + +GetUsageOk returns a tuple with the Usage field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUsage + +`func (o *MXRecord) SetUsage(v []string)` + +SetUsage sets Usage field to given value. + +### HasUsage + +`func (o *MXRecord) HasUsage() bool` + +HasUsage returns a boolean if a field has been set. + +### GetCreatedAt + +`func (o *MXRecord) GetCreatedAt() time.Time` + +GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. + +### GetCreatedAtOk + +`func (o *MXRecord) GetCreatedAtOk() (*time.Time, bool)` + +GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedAt + +`func (o *MXRecord) SetCreatedAt(v time.Time)` + +SetCreatedAt sets CreatedAt field to given value. + +### HasCreatedAt + +`func (o *MXRecord) HasCreatedAt() bool` + +HasCreatedAt returns a boolean if a field has been set. + +### GetUpdatedAt + +`func (o *MXRecord) GetUpdatedAt() time.Time` + +GetUpdatedAt returns the UpdatedAt field if non-nil, zero value otherwise. + +### GetUpdatedAtOk + +`func (o *MXRecord) GetUpdatedAtOk() (*time.Time, bool)` + +GetUpdatedAtOk returns a tuple with the UpdatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpdatedAt + +`func (o *MXRecord) SetUpdatedAt(v time.Time)` + +SetUpdatedAt sets UpdatedAt field to given value. + +### HasUpdatedAt + +`func (o *MXRecord) HasUpdatedAt() bool` + +HasUpdatedAt returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/MXRecordValue.md b/docs/MXRecordValue.md new file mode 100644 index 0000000..5feea1b --- /dev/null +++ b/docs/MXRecordValue.md @@ -0,0 +1,82 @@ +# MXRecordValue + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Host** | **string** | | +**Priority** | **NullableInt32** | | + +## Methods + +### NewMXRecordValue + +`func NewMXRecordValue(host string, priority NullableInt32, ) *MXRecordValue` + +NewMXRecordValue instantiates a new MXRecordValue object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewMXRecordValueWithDefaults + +`func NewMXRecordValueWithDefaults() *MXRecordValue` + +NewMXRecordValueWithDefaults instantiates a new MXRecordValue object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetHost + +`func (o *MXRecordValue) GetHost() string` + +GetHost returns the Host field if non-nil, zero value otherwise. + +### GetHostOk + +`func (o *MXRecordValue) GetHostOk() (*string, bool)` + +GetHostOk returns a tuple with the Host field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHost + +`func (o *MXRecordValue) SetHost(v string)` + +SetHost sets Host field to given value. + + +### GetPriority + +`func (o *MXRecordValue) GetPriority() int32` + +GetPriority returns the Priority field if non-nil, zero value otherwise. + +### GetPriorityOk + +`func (o *MXRecordValue) GetPriorityOk() (*int32, bool)` + +GetPriorityOk returns a tuple with the Priority field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPriority + +`func (o *MXRecordValue) SetPriority(v int32)` + +SetPriority sets Priority field to given value. + + +### SetPriorityNil + +`func (o *MXRecordValue) SetPriorityNil(b bool)` + + SetPriorityNil sets the value for Priority to be an explicit nil + +### UnsetPriority +`func (o *MXRecordValue) UnsetPriority()` + +UnsetPriority ensures that no value is present for Priority, not even an explicit nil + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/MapTrafficsData.md b/docs/MapTrafficsData.md new file mode 100644 index 0000000..4c18b01 --- /dev/null +++ b/docs/MapTrafficsData.md @@ -0,0 +1,82 @@ +# MapTrafficsData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to **map[string]interface{}** | | [optional] +**Lists** | Pointer to [**[]CountryList**](CountryList.md) | | [optional] + +## Methods + +### NewMapTrafficsData + +`func NewMapTrafficsData() *MapTrafficsData` + +NewMapTrafficsData instantiates a new MapTrafficsData object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewMapTrafficsDataWithDefaults + +`func NewMapTrafficsDataWithDefaults() *MapTrafficsData` + +NewMapTrafficsDataWithDefaults instantiates a new MapTrafficsData object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *MapTrafficsData) GetData() map[string]interface{}` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *MapTrafficsData) GetDataOk() (*map[string]interface{}, 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 *MapTrafficsData) SetData(v map[string]interface{})` + +SetData sets Data field to given value. + +### HasData + +`func (o *MapTrafficsData) HasData() bool` + +HasData returns a boolean if a field has been set. + +### GetLists + +`func (o *MapTrafficsData) GetLists() []CountryList` + +GetLists returns the Lists field if non-nil, zero value otherwise. + +### GetListsOk + +`func (o *MapTrafficsData) GetListsOk() (*[]CountryList, bool)` + +GetListsOk returns a tuple with the Lists field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLists + +`func (o *MapTrafficsData) SetLists(v []CountryList)` + +SetLists sets Lists field to given value. + +### HasLists + +`func (o *MapTrafficsData) HasLists() bool` + +HasLists returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/MessageResponse.md b/docs/MessageResponse.md new file mode 100644 index 0000000..5c48875 --- /dev/null +++ b/docs/MessageResponse.md @@ -0,0 +1,56 @@ +# MessageResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | Pointer to **string** | | [optional] + +## Methods + +### NewMessageResponse + +`func NewMessageResponse() *MessageResponse` + +NewMessageResponse instantiates a new MessageResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewMessageResponseWithDefaults + +`func NewMessageResponseWithDefaults() *MessageResponse` + +NewMessageResponseWithDefaults instantiates a new MessageResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetMessage + +`func (o *MessageResponse) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *MessageResponse) GetMessageOk() (*string, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessage + +`func (o *MessageResponse) SetMessage(v string)` + +SetMessage sets Message field to given value. + +### HasMessage + +`func (o *MessageResponse) HasMessage() bool` + +HasMessage returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/MonitoringStatus.md b/docs/MonitoringStatus.md new file mode 100644 index 0000000..dade1f6 --- /dev/null +++ b/docs/MonitoringStatus.md @@ -0,0 +1,17 @@ +# MonitoringStatus + +## Enum + + +* `OFF` (value: `"off"`) + +* `NO_DATA` (value: `"no-data"`) + +* `HEALTHY` (value: `"healthy"`) + +* `UNHEALTHY` (value: `"unhealthy"`) + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/NSRecord.md b/docs/NSRecord.md new file mode 100644 index 0000000..1793443 --- /dev/null +++ b/docs/NSRecord.md @@ -0,0 +1,342 @@ +# NSRecord + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | Pointer to [**NSRecordValue**](NSRecordValue.md) | | [optional] +**Type** | Pointer to **string** | | [optional] [default to "ns"] +**Id** | Pointer to **string** | | [optional] [readonly] +**Name** | Pointer to **string** | | [optional] +**Ttl** | Pointer to **int32** | | [optional] +**Cloud** | Pointer to **bool** | | [optional] [default to false] +**UpstreamHttps** | Pointer to **string** | | [optional] +**IpFilterMode** | Pointer to [**DnsRecordIpFilterMode**](DnsRecordIpFilterMode.md) | | [optional] +**IsProtected** | Pointer to **bool** | Protected records cannot be modified or deleted by user. | [optional] [readonly] [default to false] +**Usage** | Pointer to **[]string** | | [optional] [readonly] [default to []] +**CreatedAt** | Pointer to **time.Time** | | [optional] [readonly] +**UpdatedAt** | Pointer to **time.Time** | | [optional] [readonly] + +## Methods + +### NewNSRecord + +`func NewNSRecord() *NSRecord` + +NewNSRecord instantiates a new NSRecord object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewNSRecordWithDefaults + +`func NewNSRecordWithDefaults() *NSRecord` + +NewNSRecordWithDefaults instantiates a new NSRecord object +This 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 *NSRecord) GetValue() NSRecordValue` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *NSRecord) GetValueOk() (*NSRecordValue, 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 *NSRecord) SetValue(v NSRecordValue)` + +SetValue sets Value field to given value. + +### HasValue + +`func (o *NSRecord) HasValue() bool` + +HasValue returns a boolean if a field has been set. + +### GetType + +`func (o *NSRecord) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *NSRecord) 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 *NSRecord) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *NSRecord) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetId + +`func (o *NSRecord) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *NSRecord) 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 *NSRecord) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *NSRecord) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetName + +`func (o *NSRecord) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *NSRecord) 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 *NSRecord) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *NSRecord) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetTtl + +`func (o *NSRecord) GetTtl() int32` + +GetTtl returns the Ttl field if non-nil, zero value otherwise. + +### GetTtlOk + +`func (o *NSRecord) GetTtlOk() (*int32, bool)` + +GetTtlOk returns a tuple with the Ttl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTtl + +`func (o *NSRecord) SetTtl(v int32)` + +SetTtl sets Ttl field to given value. + +### HasTtl + +`func (o *NSRecord) HasTtl() bool` + +HasTtl returns a boolean if a field has been set. + +### GetCloud + +`func (o *NSRecord) GetCloud() bool` + +GetCloud returns the Cloud field if non-nil, zero value otherwise. + +### GetCloudOk + +`func (o *NSRecord) GetCloudOk() (*bool, bool)` + +GetCloudOk returns a tuple with the Cloud field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCloud + +`func (o *NSRecord) SetCloud(v bool)` + +SetCloud sets Cloud field to given value. + +### HasCloud + +`func (o *NSRecord) HasCloud() bool` + +HasCloud returns a boolean if a field has been set. + +### GetUpstreamHttps + +`func (o *NSRecord) GetUpstreamHttps() string` + +GetUpstreamHttps returns the UpstreamHttps field if non-nil, zero value otherwise. + +### GetUpstreamHttpsOk + +`func (o *NSRecord) GetUpstreamHttpsOk() (*string, bool)` + +GetUpstreamHttpsOk returns a tuple with the UpstreamHttps field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpstreamHttps + +`func (o *NSRecord) SetUpstreamHttps(v string)` + +SetUpstreamHttps sets UpstreamHttps field to given value. + +### HasUpstreamHttps + +`func (o *NSRecord) HasUpstreamHttps() bool` + +HasUpstreamHttps returns a boolean if a field has been set. + +### GetIpFilterMode + +`func (o *NSRecord) GetIpFilterMode() DnsRecordIpFilterMode` + +GetIpFilterMode returns the IpFilterMode field if non-nil, zero value otherwise. + +### GetIpFilterModeOk + +`func (o *NSRecord) GetIpFilterModeOk() (*DnsRecordIpFilterMode, bool)` + +GetIpFilterModeOk returns a tuple with the IpFilterMode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIpFilterMode + +`func (o *NSRecord) SetIpFilterMode(v DnsRecordIpFilterMode)` + +SetIpFilterMode sets IpFilterMode field to given value. + +### HasIpFilterMode + +`func (o *NSRecord) HasIpFilterMode() bool` + +HasIpFilterMode returns a boolean if a field has been set. + +### GetIsProtected + +`func (o *NSRecord) GetIsProtected() bool` + +GetIsProtected returns the IsProtected field if non-nil, zero value otherwise. + +### GetIsProtectedOk + +`func (o *NSRecord) GetIsProtectedOk() (*bool, bool)` + +GetIsProtectedOk returns a tuple with the IsProtected field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsProtected + +`func (o *NSRecord) SetIsProtected(v bool)` + +SetIsProtected sets IsProtected field to given value. + +### HasIsProtected + +`func (o *NSRecord) HasIsProtected() bool` + +HasIsProtected returns a boolean if a field has been set. + +### GetUsage + +`func (o *NSRecord) GetUsage() []string` + +GetUsage returns the Usage field if non-nil, zero value otherwise. + +### GetUsageOk + +`func (o *NSRecord) GetUsageOk() (*[]string, bool)` + +GetUsageOk returns a tuple with the Usage field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUsage + +`func (o *NSRecord) SetUsage(v []string)` + +SetUsage sets Usage field to given value. + +### HasUsage + +`func (o *NSRecord) HasUsage() bool` + +HasUsage returns a boolean if a field has been set. + +### GetCreatedAt + +`func (o *NSRecord) GetCreatedAt() time.Time` + +GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. + +### GetCreatedAtOk + +`func (o *NSRecord) GetCreatedAtOk() (*time.Time, bool)` + +GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedAt + +`func (o *NSRecord) SetCreatedAt(v time.Time)` + +SetCreatedAt sets CreatedAt field to given value. + +### HasCreatedAt + +`func (o *NSRecord) HasCreatedAt() bool` + +HasCreatedAt returns a boolean if a field has been set. + +### GetUpdatedAt + +`func (o *NSRecord) GetUpdatedAt() time.Time` + +GetUpdatedAt returns the UpdatedAt field if non-nil, zero value otherwise. + +### GetUpdatedAtOk + +`func (o *NSRecord) GetUpdatedAtOk() (*time.Time, bool)` + +GetUpdatedAtOk returns a tuple with the UpdatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpdatedAt + +`func (o *NSRecord) SetUpdatedAt(v time.Time)` + +SetUpdatedAt sets UpdatedAt field to given value. + +### HasUpdatedAt + +`func (o *NSRecord) HasUpdatedAt() bool` + +HasUpdatedAt returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/NSRecordValue.md b/docs/NSRecordValue.md new file mode 100644 index 0000000..1410cdd --- /dev/null +++ b/docs/NSRecordValue.md @@ -0,0 +1,51 @@ +# NSRecordValue + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Host** | **string** | | + +## Methods + +### NewNSRecordValue + +`func NewNSRecordValue(host string, ) *NSRecordValue` + +NewNSRecordValue instantiates a new NSRecordValue object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewNSRecordValueWithDefaults + +`func NewNSRecordValueWithDefaults() *NSRecordValue` + +NewNSRecordValueWithDefaults instantiates a new NSRecordValue object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetHost + +`func (o *NSRecordValue) GetHost() string` + +GetHost returns the Host field if non-nil, zero value otherwise. + +### GetHostOk + +`func (o *NSRecordValue) GetHostOk() (*string, bool)` + +GetHostOk returns a tuple with the Host field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHost + +`func (o *NSRecordValue) SetHost(v string)` + +SetHost sets Host field to given value. + + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/NsDomain.md b/docs/NsDomain.md new file mode 100644 index 0000000..1e6a259 --- /dev/null +++ b/docs/NsDomain.md @@ -0,0 +1,82 @@ +# NsDomain + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**NsDomain** | Pointer to **[]string** | Current NS records of the domain | [optional] +**NsKeys** | Pointer to **[]string** | Desired NS values for the domain | [optional] + +## Methods + +### NewNsDomain + +`func NewNsDomain() *NsDomain` + +NewNsDomain instantiates a new NsDomain object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewNsDomainWithDefaults + +`func NewNsDomainWithDefaults() *NsDomain` + +NewNsDomainWithDefaults instantiates a new NsDomain object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetNsDomain + +`func (o *NsDomain) GetNsDomain() []string` + +GetNsDomain returns the NsDomain field if non-nil, zero value otherwise. + +### GetNsDomainOk + +`func (o *NsDomain) GetNsDomainOk() (*[]string, bool)` + +GetNsDomainOk returns a tuple with the NsDomain field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNsDomain + +`func (o *NsDomain) SetNsDomain(v []string)` + +SetNsDomain sets NsDomain field to given value. + +### HasNsDomain + +`func (o *NsDomain) HasNsDomain() bool` + +HasNsDomain returns a boolean if a field has been set. + +### GetNsKeys + +`func (o *NsDomain) GetNsKeys() []string` + +GetNsKeys returns the NsKeys field if non-nil, zero value otherwise. + +### GetNsKeysOk + +`func (o *NsDomain) GetNsKeysOk() (*[]string, bool)` + +GetNsKeysOk returns a tuple with the NsKeys field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNsKeys + +`func (o *NsDomain) SetNsKeys(v []string)` + +SetNsKeys sets NsKeys field to given value. + +### HasNsKeys + +`func (o *NsDomain) HasNsKeys() bool` + +HasNsKeys returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/NsKeys.md b/docs/NsKeys.md new file mode 100644 index 0000000..fb437c2 --- /dev/null +++ b/docs/NsKeys.md @@ -0,0 +1,56 @@ +# NsKeys + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**NsKeys** | Pointer to **[]string** | Desired NS values for the domain | [optional] + +## Methods + +### NewNsKeys + +`func NewNsKeys() *NsKeys` + +NewNsKeys instantiates a new NsKeys object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewNsKeysWithDefaults + +`func NewNsKeysWithDefaults() *NsKeys` + +NewNsKeysWithDefaults instantiates a new NsKeys object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetNsKeys + +`func (o *NsKeys) GetNsKeys() []string` + +GetNsKeys returns the NsKeys field if non-nil, zero value otherwise. + +### GetNsKeysOk + +`func (o *NsKeys) GetNsKeysOk() (*[]string, bool)` + +GetNsKeysOk returns a tuple with the NsKeys field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNsKeys + +`func (o *NsKeys) SetNsKeys(v []string)` + +SetNsKeys sets NsKeys field to given value. + +### HasNsKeys + +`func (o *NsKeys) HasNsKeys() bool` + +HasNsKeys returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/NsKeysResponse.md b/docs/NsKeysResponse.md new file mode 100644 index 0000000..ec142c6 --- /dev/null +++ b/docs/NsKeysResponse.md @@ -0,0 +1,92 @@ +# NsKeysResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to **map[string]interface{}** | | [optional] +**Message** | Pointer to **NullableString** | | [optional] + +## Methods + +### NewNsKeysResponse + +`func NewNsKeysResponse() *NsKeysResponse` + +NewNsKeysResponse instantiates a new NsKeysResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewNsKeysResponseWithDefaults + +`func NewNsKeysResponseWithDefaults() *NsKeysResponse` + +NewNsKeysResponseWithDefaults instantiates a new NsKeysResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *NsKeysResponse) GetData() map[string]interface{}` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *NsKeysResponse) GetDataOk() (*map[string]interface{}, 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 *NsKeysResponse) SetData(v map[string]interface{})` + +SetData sets Data field to given value. + +### HasData + +`func (o *NsKeysResponse) HasData() bool` + +HasData returns a boolean if a field has been set. + +### GetMessage + +`func (o *NsKeysResponse) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *NsKeysResponse) GetMessageOk() (*string, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessage + +`func (o *NsKeysResponse) SetMessage(v string)` + +SetMessage sets Message field to given value. + +### HasMessage + +`func (o *NsKeysResponse) HasMessage() bool` + +HasMessage returns a boolean if a field has been set. + +### SetMessageNil + +`func (o *NsKeysResponse) SetMessageNil(b bool)` + + SetMessageNil sets the value for Message to be an explicit nil + +### UnsetMessage +`func (o *NsKeysResponse) UnsetMessage()` + +UnsetMessage ensures that no value is present for Message, not even an explicit nil + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/PTRRecord.md b/docs/PTRRecord.md new file mode 100644 index 0000000..3696697 --- /dev/null +++ b/docs/PTRRecord.md @@ -0,0 +1,342 @@ +# PTRRecord + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | Pointer to [**PTRRecordValue**](PTRRecordValue.md) | | [optional] +**Type** | Pointer to **string** | | [optional] [default to "ptr"] +**Id** | Pointer to **string** | | [optional] [readonly] +**Name** | Pointer to **string** | | [optional] +**Ttl** | Pointer to **int32** | | [optional] +**Cloud** | Pointer to **bool** | | [optional] [default to false] +**UpstreamHttps** | Pointer to **string** | | [optional] +**IpFilterMode** | Pointer to [**DnsRecordIpFilterMode**](DnsRecordIpFilterMode.md) | | [optional] +**IsProtected** | Pointer to **bool** | Protected records cannot be modified or deleted by user. | [optional] [readonly] [default to false] +**Usage** | Pointer to **[]string** | | [optional] [readonly] [default to []] +**CreatedAt** | Pointer to **time.Time** | | [optional] [readonly] +**UpdatedAt** | Pointer to **time.Time** | | [optional] [readonly] + +## Methods + +### NewPTRRecord + +`func NewPTRRecord() *PTRRecord` + +NewPTRRecord instantiates a new PTRRecord object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPTRRecordWithDefaults + +`func NewPTRRecordWithDefaults() *PTRRecord` + +NewPTRRecordWithDefaults instantiates a new PTRRecord object +This 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 *PTRRecord) GetValue() PTRRecordValue` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *PTRRecord) GetValueOk() (*PTRRecordValue, 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 *PTRRecord) SetValue(v PTRRecordValue)` + +SetValue sets Value field to given value. + +### HasValue + +`func (o *PTRRecord) HasValue() bool` + +HasValue returns a boolean if a field has been set. + +### GetType + +`func (o *PTRRecord) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *PTRRecord) 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 *PTRRecord) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *PTRRecord) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetId + +`func (o *PTRRecord) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *PTRRecord) 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 *PTRRecord) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *PTRRecord) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetName + +`func (o *PTRRecord) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *PTRRecord) 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 *PTRRecord) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *PTRRecord) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetTtl + +`func (o *PTRRecord) GetTtl() int32` + +GetTtl returns the Ttl field if non-nil, zero value otherwise. + +### GetTtlOk + +`func (o *PTRRecord) GetTtlOk() (*int32, bool)` + +GetTtlOk returns a tuple with the Ttl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTtl + +`func (o *PTRRecord) SetTtl(v int32)` + +SetTtl sets Ttl field to given value. + +### HasTtl + +`func (o *PTRRecord) HasTtl() bool` + +HasTtl returns a boolean if a field has been set. + +### GetCloud + +`func (o *PTRRecord) GetCloud() bool` + +GetCloud returns the Cloud field if non-nil, zero value otherwise. + +### GetCloudOk + +`func (o *PTRRecord) GetCloudOk() (*bool, bool)` + +GetCloudOk returns a tuple with the Cloud field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCloud + +`func (o *PTRRecord) SetCloud(v bool)` + +SetCloud sets Cloud field to given value. + +### HasCloud + +`func (o *PTRRecord) HasCloud() bool` + +HasCloud returns a boolean if a field has been set. + +### GetUpstreamHttps + +`func (o *PTRRecord) GetUpstreamHttps() string` + +GetUpstreamHttps returns the UpstreamHttps field if non-nil, zero value otherwise. + +### GetUpstreamHttpsOk + +`func (o *PTRRecord) GetUpstreamHttpsOk() (*string, bool)` + +GetUpstreamHttpsOk returns a tuple with the UpstreamHttps field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpstreamHttps + +`func (o *PTRRecord) SetUpstreamHttps(v string)` + +SetUpstreamHttps sets UpstreamHttps field to given value. + +### HasUpstreamHttps + +`func (o *PTRRecord) HasUpstreamHttps() bool` + +HasUpstreamHttps returns a boolean if a field has been set. + +### GetIpFilterMode + +`func (o *PTRRecord) GetIpFilterMode() DnsRecordIpFilterMode` + +GetIpFilterMode returns the IpFilterMode field if non-nil, zero value otherwise. + +### GetIpFilterModeOk + +`func (o *PTRRecord) GetIpFilterModeOk() (*DnsRecordIpFilterMode, bool)` + +GetIpFilterModeOk returns a tuple with the IpFilterMode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIpFilterMode + +`func (o *PTRRecord) SetIpFilterMode(v DnsRecordIpFilterMode)` + +SetIpFilterMode sets IpFilterMode field to given value. + +### HasIpFilterMode + +`func (o *PTRRecord) HasIpFilterMode() bool` + +HasIpFilterMode returns a boolean if a field has been set. + +### GetIsProtected + +`func (o *PTRRecord) GetIsProtected() bool` + +GetIsProtected returns the IsProtected field if non-nil, zero value otherwise. + +### GetIsProtectedOk + +`func (o *PTRRecord) GetIsProtectedOk() (*bool, bool)` + +GetIsProtectedOk returns a tuple with the IsProtected field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsProtected + +`func (o *PTRRecord) SetIsProtected(v bool)` + +SetIsProtected sets IsProtected field to given value. + +### HasIsProtected + +`func (o *PTRRecord) HasIsProtected() bool` + +HasIsProtected returns a boolean if a field has been set. + +### GetUsage + +`func (o *PTRRecord) GetUsage() []string` + +GetUsage returns the Usage field if non-nil, zero value otherwise. + +### GetUsageOk + +`func (o *PTRRecord) GetUsageOk() (*[]string, bool)` + +GetUsageOk returns a tuple with the Usage field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUsage + +`func (o *PTRRecord) SetUsage(v []string)` + +SetUsage sets Usage field to given value. + +### HasUsage + +`func (o *PTRRecord) HasUsage() bool` + +HasUsage returns a boolean if a field has been set. + +### GetCreatedAt + +`func (o *PTRRecord) GetCreatedAt() time.Time` + +GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. + +### GetCreatedAtOk + +`func (o *PTRRecord) GetCreatedAtOk() (*time.Time, bool)` + +GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedAt + +`func (o *PTRRecord) SetCreatedAt(v time.Time)` + +SetCreatedAt sets CreatedAt field to given value. + +### HasCreatedAt + +`func (o *PTRRecord) HasCreatedAt() bool` + +HasCreatedAt returns a boolean if a field has been set. + +### GetUpdatedAt + +`func (o *PTRRecord) GetUpdatedAt() time.Time` + +GetUpdatedAt returns the UpdatedAt field if non-nil, zero value otherwise. + +### GetUpdatedAtOk + +`func (o *PTRRecord) GetUpdatedAtOk() (*time.Time, bool)` + +GetUpdatedAtOk returns a tuple with the UpdatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpdatedAt + +`func (o *PTRRecord) SetUpdatedAt(v time.Time)` + +SetUpdatedAt sets UpdatedAt field to given value. + +### HasUpdatedAt + +`func (o *PTRRecord) HasUpdatedAt() bool` + +HasUpdatedAt returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/PTRRecordValue.md b/docs/PTRRecordValue.md new file mode 100644 index 0000000..f6c2b4a --- /dev/null +++ b/docs/PTRRecordValue.md @@ -0,0 +1,56 @@ +# PTRRecordValue + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Domain** | Pointer to **string** | | [optional] + +## Methods + +### NewPTRRecordValue + +`func NewPTRRecordValue() *PTRRecordValue` + +NewPTRRecordValue instantiates a new PTRRecordValue object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPTRRecordValueWithDefaults + +`func NewPTRRecordValueWithDefaults() *PTRRecordValue` + +NewPTRRecordValueWithDefaults instantiates a new PTRRecordValue object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetDomain + +`func (o *PTRRecordValue) GetDomain() string` + +GetDomain returns the Domain field if non-nil, zero value otherwise. + +### GetDomainOk + +`func (o *PTRRecordValue) GetDomainOk() (*string, bool)` + +GetDomainOk returns a tuple with the Domain field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDomain + +`func (o *PTRRecordValue) SetDomain(v string)` + +SetDomain sets Domain field to given value. + +### HasDomain + +`func (o *PTRRecordValue) HasDomain() bool` + +HasDomain returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/PageRule.md b/docs/PageRule.md new file mode 100644 index 0000000..f8464ed --- /dev/null +++ b/docs/PageRule.md @@ -0,0 +1,1100 @@ +# PageRule + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Cache200** | Pointer to **string** | | [optional] [default to "30m"] +**CacheAny** | Pointer to **string** | | [optional] [default to "0s"] +**CacheCookie** | Pointer to **string** | Cookie variables to consider in cache (comma separaterd values) | [optional] [default to ""] +**CacheDeviceType** | Pointer to **bool** | | [optional] [default to false] +**CacheArgs** | Pointer to **bool** | | [optional] [default to true] +**CacheArg** | Pointer to **string** | Query string arguments to consider in cache (& seperated values) | [optional] [default to ""] +**CacheScheme** | Pointer to **bool** | | [optional] [default to true] +**CacheBrowser** | Pointer to **string** | | [optional] [default to "default"] +**CacheIgnoreSc** | Pointer to **bool** | Ignore default behavior in caching set-cookie header | [optional] [default to false] +**CacheIgnoreVary** | Pointer to **bool** | Ignore default behavior in caching vary header | [optional] [default to true] +**CacheIgnoreCc** | Pointer to **bool** | | [optional] [default to true] +**CorsHeader** | Pointer to **string** | | [optional] [default to "-"] +**RewriteUrl** | Pointer to **string** | | [optional] [default to "-"] +**SlinkSecret** | Pointer to **string** | | [optional] [default to ""] +**SlinkMd5** | Pointer to **[]string** | | [optional] [default to ["remote_addr","file","expires"]] +**LoadBalancer** | Pointer to **NullableString** | Name or ID of the load balancer | [optional] +**ClusterStatus** | Pointer to **bool** | | [optional] [default to false] +**ImageResize** | Pointer to [**PageRuleImageResize**](PageRuleImageResize.md) | | [optional] +**ClusterId** | Pointer to **NullableString** | | [optional] +**UpstreamTimeout** | Pointer to [**UpstreamTimeout**](UpstreamTimeout.md) | | [optional] +**ReqCustomHeaders** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**ResCustomHeaders** | Pointer to **[]map[string]interface{}** | | [optional] [default to []] +**ReqHideHeaders** | Pointer to **[]string** | | [optional] [default to []] +**ResHideHeaders** | Pointer to **[]string** | | [optional] [default to []] +**CustomHostHeader** | Pointer to **string** | | [optional] [default to ""] +**Redirect** | Pointer to [**PageRuleRedirect**](PageRuleRedirect.md) | | [optional] +**Id** | Pointer to **string** | | [optional] [readonly] +**DomainId** | Pointer to **string** | | [optional] +**Seq** | Pointer to **int32** | Order of the page-rule | [optional] +**UrlType** | Pointer to **string** | This flag is deprecated in favor of is_protected flag | [optional] [default to "default"] +**IsProtected** | Pointer to **bool** | Protected records cannot be modified or deleted by user. | [optional] [readonly] [default to false] +**Url** | Pointer to **string** | URL pattern of target pages | [optional] +**CacheLevel** | Pointer to **string** | | [optional] [default to "query_string"] +**WafStatus** | Pointer to **bool** | | [optional] [default to true] +**FwStatus** | Pointer to **bool** | Shows whether firewall is enabled or not | [optional] [default to true] +**Acceleration** | Pointer to [**Acceleration**](Acceleration.md) | | [optional] +**SlinkStatus** | Pointer to **bool** | Secure link is enabled or not | [optional] [default to false] +**Status** | Pointer to **bool** | Is the page-rule enabled? | [optional] [default to true] +**CreatedAt** | Pointer to **time.Time** | | [optional] [readonly] +**UpdatedAt** | Pointer to **time.Time** | | [optional] [readonly] + +## Methods + +### NewPageRule + +`func NewPageRule() *PageRule` + +NewPageRule instantiates a new PageRule object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPageRuleWithDefaults + +`func NewPageRuleWithDefaults() *PageRule` + +NewPageRuleWithDefaults instantiates a new PageRule object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCache200 + +`func (o *PageRule) GetCache200() string` + +GetCache200 returns the Cache200 field if non-nil, zero value otherwise. + +### GetCache200Ok + +`func (o *PageRule) GetCache200Ok() (*string, bool)` + +GetCache200Ok returns a tuple with the Cache200 field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCache200 + +`func (o *PageRule) SetCache200(v string)` + +SetCache200 sets Cache200 field to given value. + +### HasCache200 + +`func (o *PageRule) HasCache200() bool` + +HasCache200 returns a boolean if a field has been set. + +### GetCacheAny + +`func (o *PageRule) GetCacheAny() string` + +GetCacheAny returns the CacheAny field if non-nil, zero value otherwise. + +### GetCacheAnyOk + +`func (o *PageRule) GetCacheAnyOk() (*string, bool)` + +GetCacheAnyOk returns a tuple with the CacheAny field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCacheAny + +`func (o *PageRule) SetCacheAny(v string)` + +SetCacheAny sets CacheAny field to given value. + +### HasCacheAny + +`func (o *PageRule) HasCacheAny() bool` + +HasCacheAny returns a boolean if a field has been set. + +### GetCacheCookie + +`func (o *PageRule) GetCacheCookie() string` + +GetCacheCookie returns the CacheCookie field if non-nil, zero value otherwise. + +### GetCacheCookieOk + +`func (o *PageRule) GetCacheCookieOk() (*string, bool)` + +GetCacheCookieOk returns a tuple with the CacheCookie field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCacheCookie + +`func (o *PageRule) SetCacheCookie(v string)` + +SetCacheCookie sets CacheCookie field to given value. + +### HasCacheCookie + +`func (o *PageRule) HasCacheCookie() bool` + +HasCacheCookie returns a boolean if a field has been set. + +### GetCacheDeviceType + +`func (o *PageRule) GetCacheDeviceType() bool` + +GetCacheDeviceType returns the CacheDeviceType field if non-nil, zero value otherwise. + +### GetCacheDeviceTypeOk + +`func (o *PageRule) GetCacheDeviceTypeOk() (*bool, bool)` + +GetCacheDeviceTypeOk returns a tuple with the CacheDeviceType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCacheDeviceType + +`func (o *PageRule) SetCacheDeviceType(v bool)` + +SetCacheDeviceType sets CacheDeviceType field to given value. + +### HasCacheDeviceType + +`func (o *PageRule) HasCacheDeviceType() bool` + +HasCacheDeviceType returns a boolean if a field has been set. + +### GetCacheArgs + +`func (o *PageRule) GetCacheArgs() bool` + +GetCacheArgs returns the CacheArgs field if non-nil, zero value otherwise. + +### GetCacheArgsOk + +`func (o *PageRule) GetCacheArgsOk() (*bool, bool)` + +GetCacheArgsOk returns a tuple with the CacheArgs field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCacheArgs + +`func (o *PageRule) SetCacheArgs(v bool)` + +SetCacheArgs sets CacheArgs field to given value. + +### HasCacheArgs + +`func (o *PageRule) HasCacheArgs() bool` + +HasCacheArgs returns a boolean if a field has been set. + +### GetCacheArg + +`func (o *PageRule) GetCacheArg() string` + +GetCacheArg returns the CacheArg field if non-nil, zero value otherwise. + +### GetCacheArgOk + +`func (o *PageRule) GetCacheArgOk() (*string, bool)` + +GetCacheArgOk returns a tuple with the CacheArg field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCacheArg + +`func (o *PageRule) SetCacheArg(v string)` + +SetCacheArg sets CacheArg field to given value. + +### HasCacheArg + +`func (o *PageRule) HasCacheArg() bool` + +HasCacheArg returns a boolean if a field has been set. + +### GetCacheScheme + +`func (o *PageRule) GetCacheScheme() bool` + +GetCacheScheme returns the CacheScheme field if non-nil, zero value otherwise. + +### GetCacheSchemeOk + +`func (o *PageRule) GetCacheSchemeOk() (*bool, bool)` + +GetCacheSchemeOk returns a tuple with the CacheScheme field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCacheScheme + +`func (o *PageRule) SetCacheScheme(v bool)` + +SetCacheScheme sets CacheScheme field to given value. + +### HasCacheScheme + +`func (o *PageRule) HasCacheScheme() bool` + +HasCacheScheme returns a boolean if a field has been set. + +### GetCacheBrowser + +`func (o *PageRule) GetCacheBrowser() string` + +GetCacheBrowser returns the CacheBrowser field if non-nil, zero value otherwise. + +### GetCacheBrowserOk + +`func (o *PageRule) GetCacheBrowserOk() (*string, bool)` + +GetCacheBrowserOk returns a tuple with the CacheBrowser field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCacheBrowser + +`func (o *PageRule) SetCacheBrowser(v string)` + +SetCacheBrowser sets CacheBrowser field to given value. + +### HasCacheBrowser + +`func (o *PageRule) HasCacheBrowser() bool` + +HasCacheBrowser returns a boolean if a field has been set. + +### GetCacheIgnoreSc + +`func (o *PageRule) GetCacheIgnoreSc() bool` + +GetCacheIgnoreSc returns the CacheIgnoreSc field if non-nil, zero value otherwise. + +### GetCacheIgnoreScOk + +`func (o *PageRule) GetCacheIgnoreScOk() (*bool, bool)` + +GetCacheIgnoreScOk returns a tuple with the CacheIgnoreSc field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCacheIgnoreSc + +`func (o *PageRule) SetCacheIgnoreSc(v bool)` + +SetCacheIgnoreSc sets CacheIgnoreSc field to given value. + +### HasCacheIgnoreSc + +`func (o *PageRule) HasCacheIgnoreSc() bool` + +HasCacheIgnoreSc returns a boolean if a field has been set. + +### GetCacheIgnoreVary + +`func (o *PageRule) GetCacheIgnoreVary() bool` + +GetCacheIgnoreVary returns the CacheIgnoreVary field if non-nil, zero value otherwise. + +### GetCacheIgnoreVaryOk + +`func (o *PageRule) GetCacheIgnoreVaryOk() (*bool, bool)` + +GetCacheIgnoreVaryOk returns a tuple with the CacheIgnoreVary field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCacheIgnoreVary + +`func (o *PageRule) SetCacheIgnoreVary(v bool)` + +SetCacheIgnoreVary sets CacheIgnoreVary field to given value. + +### HasCacheIgnoreVary + +`func (o *PageRule) HasCacheIgnoreVary() bool` + +HasCacheIgnoreVary returns a boolean if a field has been set. + +### GetCacheIgnoreCc + +`func (o *PageRule) GetCacheIgnoreCc() bool` + +GetCacheIgnoreCc returns the CacheIgnoreCc field if non-nil, zero value otherwise. + +### GetCacheIgnoreCcOk + +`func (o *PageRule) GetCacheIgnoreCcOk() (*bool, bool)` + +GetCacheIgnoreCcOk returns a tuple with the CacheIgnoreCc field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCacheIgnoreCc + +`func (o *PageRule) SetCacheIgnoreCc(v bool)` + +SetCacheIgnoreCc sets CacheIgnoreCc field to given value. + +### HasCacheIgnoreCc + +`func (o *PageRule) HasCacheIgnoreCc() bool` + +HasCacheIgnoreCc returns a boolean if a field has been set. + +### GetCorsHeader + +`func (o *PageRule) GetCorsHeader() string` + +GetCorsHeader returns the CorsHeader field if non-nil, zero value otherwise. + +### GetCorsHeaderOk + +`func (o *PageRule) GetCorsHeaderOk() (*string, bool)` + +GetCorsHeaderOk returns a tuple with the CorsHeader field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCorsHeader + +`func (o *PageRule) SetCorsHeader(v string)` + +SetCorsHeader sets CorsHeader field to given value. + +### HasCorsHeader + +`func (o *PageRule) HasCorsHeader() bool` + +HasCorsHeader returns a boolean if a field has been set. + +### GetRewriteUrl + +`func (o *PageRule) GetRewriteUrl() string` + +GetRewriteUrl returns the RewriteUrl field if non-nil, zero value otherwise. + +### GetRewriteUrlOk + +`func (o *PageRule) GetRewriteUrlOk() (*string, bool)` + +GetRewriteUrlOk returns a tuple with the RewriteUrl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRewriteUrl + +`func (o *PageRule) SetRewriteUrl(v string)` + +SetRewriteUrl sets RewriteUrl field to given value. + +### HasRewriteUrl + +`func (o *PageRule) HasRewriteUrl() bool` + +HasRewriteUrl returns a boolean if a field has been set. + +### GetSlinkSecret + +`func (o *PageRule) GetSlinkSecret() string` + +GetSlinkSecret returns the SlinkSecret field if non-nil, zero value otherwise. + +### GetSlinkSecretOk + +`func (o *PageRule) GetSlinkSecretOk() (*string, bool)` + +GetSlinkSecretOk returns a tuple with the SlinkSecret field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSlinkSecret + +`func (o *PageRule) SetSlinkSecret(v string)` + +SetSlinkSecret sets SlinkSecret field to given value. + +### HasSlinkSecret + +`func (o *PageRule) HasSlinkSecret() bool` + +HasSlinkSecret returns a boolean if a field has been set. + +### GetSlinkMd5 + +`func (o *PageRule) GetSlinkMd5() []string` + +GetSlinkMd5 returns the SlinkMd5 field if non-nil, zero value otherwise. + +### GetSlinkMd5Ok + +`func (o *PageRule) GetSlinkMd5Ok() (*[]string, bool)` + +GetSlinkMd5Ok returns a tuple with the SlinkMd5 field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSlinkMd5 + +`func (o *PageRule) SetSlinkMd5(v []string)` + +SetSlinkMd5 sets SlinkMd5 field to given value. + +### HasSlinkMd5 + +`func (o *PageRule) HasSlinkMd5() bool` + +HasSlinkMd5 returns a boolean if a field has been set. + +### SetSlinkMd5Nil + +`func (o *PageRule) SetSlinkMd5Nil(b bool)` + + SetSlinkMd5Nil sets the value for SlinkMd5 to be an explicit nil + +### UnsetSlinkMd5 +`func (o *PageRule) UnsetSlinkMd5()` + +UnsetSlinkMd5 ensures that no value is present for SlinkMd5, not even an explicit nil +### GetLoadBalancer + +`func (o *PageRule) GetLoadBalancer() string` + +GetLoadBalancer returns the LoadBalancer field if non-nil, zero value otherwise. + +### GetLoadBalancerOk + +`func (o *PageRule) GetLoadBalancerOk() (*string, bool)` + +GetLoadBalancerOk returns a tuple with the LoadBalancer field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLoadBalancer + +`func (o *PageRule) SetLoadBalancer(v string)` + +SetLoadBalancer sets LoadBalancer field to given value. + +### HasLoadBalancer + +`func (o *PageRule) HasLoadBalancer() bool` + +HasLoadBalancer returns a boolean if a field has been set. + +### SetLoadBalancerNil + +`func (o *PageRule) SetLoadBalancerNil(b bool)` + + SetLoadBalancerNil sets the value for LoadBalancer to be an explicit nil + +### UnsetLoadBalancer +`func (o *PageRule) UnsetLoadBalancer()` + +UnsetLoadBalancer ensures that no value is present for LoadBalancer, not even an explicit nil +### GetClusterStatus + +`func (o *PageRule) GetClusterStatus() bool` + +GetClusterStatus returns the ClusterStatus field if non-nil, zero value otherwise. + +### GetClusterStatusOk + +`func (o *PageRule) GetClusterStatusOk() (*bool, bool)` + +GetClusterStatusOk returns a tuple with the ClusterStatus field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetClusterStatus + +`func (o *PageRule) SetClusterStatus(v bool)` + +SetClusterStatus sets ClusterStatus field to given value. + +### HasClusterStatus + +`func (o *PageRule) HasClusterStatus() bool` + +HasClusterStatus returns a boolean if a field has been set. + +### GetImageResize + +`func (o *PageRule) GetImageResize() PageRuleImageResize` + +GetImageResize returns the ImageResize field if non-nil, zero value otherwise. + +### GetImageResizeOk + +`func (o *PageRule) GetImageResizeOk() (*PageRuleImageResize, bool)` + +GetImageResizeOk returns a tuple with the ImageResize field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetImageResize + +`func (o *PageRule) SetImageResize(v PageRuleImageResize)` + +SetImageResize sets ImageResize field to given value. + +### HasImageResize + +`func (o *PageRule) HasImageResize() bool` + +HasImageResize returns a boolean if a field has been set. + +### GetClusterId + +`func (o *PageRule) GetClusterId() string` + +GetClusterId returns the ClusterId field if non-nil, zero value otherwise. + +### GetClusterIdOk + +`func (o *PageRule) GetClusterIdOk() (*string, bool)` + +GetClusterIdOk returns a tuple with the ClusterId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetClusterId + +`func (o *PageRule) SetClusterId(v string)` + +SetClusterId sets ClusterId field to given value. + +### HasClusterId + +`func (o *PageRule) HasClusterId() bool` + +HasClusterId returns a boolean if a field has been set. + +### SetClusterIdNil + +`func (o *PageRule) SetClusterIdNil(b bool)` + + SetClusterIdNil sets the value for ClusterId to be an explicit nil + +### UnsetClusterId +`func (o *PageRule) UnsetClusterId()` + +UnsetClusterId ensures that no value is present for ClusterId, not even an explicit nil +### GetUpstreamTimeout + +`func (o *PageRule) GetUpstreamTimeout() UpstreamTimeout` + +GetUpstreamTimeout returns the UpstreamTimeout field if non-nil, zero value otherwise. + +### GetUpstreamTimeoutOk + +`func (o *PageRule) GetUpstreamTimeoutOk() (*UpstreamTimeout, bool)` + +GetUpstreamTimeoutOk returns a tuple with the UpstreamTimeout field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpstreamTimeout + +`func (o *PageRule) SetUpstreamTimeout(v UpstreamTimeout)` + +SetUpstreamTimeout sets UpstreamTimeout field to given value. + +### HasUpstreamTimeout + +`func (o *PageRule) HasUpstreamTimeout() bool` + +HasUpstreamTimeout returns a boolean if a field has been set. + +### GetReqCustomHeaders + +`func (o *PageRule) GetReqCustomHeaders() []map[string]interface{}` + +GetReqCustomHeaders returns the ReqCustomHeaders field if non-nil, zero value otherwise. + +### GetReqCustomHeadersOk + +`func (o *PageRule) GetReqCustomHeadersOk() (*[]map[string]interface{}, bool)` + +GetReqCustomHeadersOk returns a tuple with the ReqCustomHeaders field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetReqCustomHeaders + +`func (o *PageRule) SetReqCustomHeaders(v []map[string]interface{})` + +SetReqCustomHeaders sets ReqCustomHeaders field to given value. + +### HasReqCustomHeaders + +`func (o *PageRule) HasReqCustomHeaders() bool` + +HasReqCustomHeaders returns a boolean if a field has been set. + +### GetResCustomHeaders + +`func (o *PageRule) GetResCustomHeaders() []map[string]interface{}` + +GetResCustomHeaders returns the ResCustomHeaders field if non-nil, zero value otherwise. + +### GetResCustomHeadersOk + +`func (o *PageRule) GetResCustomHeadersOk() (*[]map[string]interface{}, bool)` + +GetResCustomHeadersOk returns a tuple with the ResCustomHeaders field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResCustomHeaders + +`func (o *PageRule) SetResCustomHeaders(v []map[string]interface{})` + +SetResCustomHeaders sets ResCustomHeaders field to given value. + +### HasResCustomHeaders + +`func (o *PageRule) HasResCustomHeaders() bool` + +HasResCustomHeaders returns a boolean if a field has been set. + +### GetReqHideHeaders + +`func (o *PageRule) GetReqHideHeaders() []string` + +GetReqHideHeaders returns the ReqHideHeaders field if non-nil, zero value otherwise. + +### GetReqHideHeadersOk + +`func (o *PageRule) GetReqHideHeadersOk() (*[]string, bool)` + +GetReqHideHeadersOk returns a tuple with the ReqHideHeaders field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetReqHideHeaders + +`func (o *PageRule) SetReqHideHeaders(v []string)` + +SetReqHideHeaders sets ReqHideHeaders field to given value. + +### HasReqHideHeaders + +`func (o *PageRule) HasReqHideHeaders() bool` + +HasReqHideHeaders returns a boolean if a field has been set. + +### GetResHideHeaders + +`func (o *PageRule) GetResHideHeaders() []string` + +GetResHideHeaders returns the ResHideHeaders field if non-nil, zero value otherwise. + +### GetResHideHeadersOk + +`func (o *PageRule) GetResHideHeadersOk() (*[]string, bool)` + +GetResHideHeadersOk returns a tuple with the ResHideHeaders field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResHideHeaders + +`func (o *PageRule) SetResHideHeaders(v []string)` + +SetResHideHeaders sets ResHideHeaders field to given value. + +### HasResHideHeaders + +`func (o *PageRule) HasResHideHeaders() bool` + +HasResHideHeaders returns a boolean if a field has been set. + +### GetCustomHostHeader + +`func (o *PageRule) GetCustomHostHeader() string` + +GetCustomHostHeader returns the CustomHostHeader field if non-nil, zero value otherwise. + +### GetCustomHostHeaderOk + +`func (o *PageRule) GetCustomHostHeaderOk() (*string, bool)` + +GetCustomHostHeaderOk returns a tuple with the CustomHostHeader field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCustomHostHeader + +`func (o *PageRule) SetCustomHostHeader(v string)` + +SetCustomHostHeader sets CustomHostHeader field to given value. + +### HasCustomHostHeader + +`func (o *PageRule) HasCustomHostHeader() bool` + +HasCustomHostHeader returns a boolean if a field has been set. + +### GetRedirect + +`func (o *PageRule) GetRedirect() PageRuleRedirect` + +GetRedirect returns the Redirect field if non-nil, zero value otherwise. + +### GetRedirectOk + +`func (o *PageRule) GetRedirectOk() (*PageRuleRedirect, bool)` + +GetRedirectOk returns a tuple with the Redirect field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRedirect + +`func (o *PageRule) SetRedirect(v PageRuleRedirect)` + +SetRedirect sets Redirect field to given value. + +### HasRedirect + +`func (o *PageRule) HasRedirect() bool` + +HasRedirect returns a boolean if a field has been set. + +### GetId + +`func (o *PageRule) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *PageRule) 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 *PageRule) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *PageRule) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetDomainId + +`func (o *PageRule) GetDomainId() string` + +GetDomainId returns the DomainId field if non-nil, zero value otherwise. + +### GetDomainIdOk + +`func (o *PageRule) GetDomainIdOk() (*string, bool)` + +GetDomainIdOk returns a tuple with the DomainId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDomainId + +`func (o *PageRule) SetDomainId(v string)` + +SetDomainId sets DomainId field to given value. + +### HasDomainId + +`func (o *PageRule) HasDomainId() bool` + +HasDomainId returns a boolean if a field has been set. + +### GetSeq + +`func (o *PageRule) GetSeq() int32` + +GetSeq returns the Seq field if non-nil, zero value otherwise. + +### GetSeqOk + +`func (o *PageRule) GetSeqOk() (*int32, bool)` + +GetSeqOk returns a tuple with the Seq field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSeq + +`func (o *PageRule) SetSeq(v int32)` + +SetSeq sets Seq field to given value. + +### HasSeq + +`func (o *PageRule) HasSeq() bool` + +HasSeq returns a boolean if a field has been set. + +### GetUrlType + +`func (o *PageRule) GetUrlType() string` + +GetUrlType returns the UrlType field if non-nil, zero value otherwise. + +### GetUrlTypeOk + +`func (o *PageRule) GetUrlTypeOk() (*string, bool)` + +GetUrlTypeOk returns a tuple with the UrlType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUrlType + +`func (o *PageRule) SetUrlType(v string)` + +SetUrlType sets UrlType field to given value. + +### HasUrlType + +`func (o *PageRule) HasUrlType() bool` + +HasUrlType returns a boolean if a field has been set. + +### GetIsProtected + +`func (o *PageRule) GetIsProtected() bool` + +GetIsProtected returns the IsProtected field if non-nil, zero value otherwise. + +### GetIsProtectedOk + +`func (o *PageRule) GetIsProtectedOk() (*bool, bool)` + +GetIsProtectedOk returns a tuple with the IsProtected field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsProtected + +`func (o *PageRule) SetIsProtected(v bool)` + +SetIsProtected sets IsProtected field to given value. + +### HasIsProtected + +`func (o *PageRule) HasIsProtected() bool` + +HasIsProtected returns a boolean if a field has been set. + +### GetUrl + +`func (o *PageRule) GetUrl() string` + +GetUrl returns the Url field if non-nil, zero value otherwise. + +### GetUrlOk + +`func (o *PageRule) GetUrlOk() (*string, bool)` + +GetUrlOk returns a tuple with the Url field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUrl + +`func (o *PageRule) SetUrl(v string)` + +SetUrl sets Url field to given value. + +### HasUrl + +`func (o *PageRule) HasUrl() bool` + +HasUrl returns a boolean if a field has been set. + +### GetCacheLevel + +`func (o *PageRule) GetCacheLevel() string` + +GetCacheLevel returns the CacheLevel field if non-nil, zero value otherwise. + +### GetCacheLevelOk + +`func (o *PageRule) GetCacheLevelOk() (*string, bool)` + +GetCacheLevelOk returns a tuple with the CacheLevel field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCacheLevel + +`func (o *PageRule) SetCacheLevel(v string)` + +SetCacheLevel sets CacheLevel field to given value. + +### HasCacheLevel + +`func (o *PageRule) HasCacheLevel() bool` + +HasCacheLevel returns a boolean if a field has been set. + +### GetWafStatus + +`func (o *PageRule) GetWafStatus() bool` + +GetWafStatus returns the WafStatus field if non-nil, zero value otherwise. + +### GetWafStatusOk + +`func (o *PageRule) GetWafStatusOk() (*bool, bool)` + +GetWafStatusOk returns a tuple with the WafStatus field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetWafStatus + +`func (o *PageRule) SetWafStatus(v bool)` + +SetWafStatus sets WafStatus field to given value. + +### HasWafStatus + +`func (o *PageRule) HasWafStatus() bool` + +HasWafStatus returns a boolean if a field has been set. + +### GetFwStatus + +`func (o *PageRule) GetFwStatus() bool` + +GetFwStatus returns the FwStatus field if non-nil, zero value otherwise. + +### GetFwStatusOk + +`func (o *PageRule) GetFwStatusOk() (*bool, bool)` + +GetFwStatusOk returns a tuple with the FwStatus field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFwStatus + +`func (o *PageRule) SetFwStatus(v bool)` + +SetFwStatus sets FwStatus field to given value. + +### HasFwStatus + +`func (o *PageRule) HasFwStatus() bool` + +HasFwStatus returns a boolean if a field has been set. + +### GetAcceleration + +`func (o *PageRule) GetAcceleration() Acceleration` + +GetAcceleration returns the Acceleration field if non-nil, zero value otherwise. + +### GetAccelerationOk + +`func (o *PageRule) GetAccelerationOk() (*Acceleration, bool)` + +GetAccelerationOk returns a tuple with the Acceleration field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAcceleration + +`func (o *PageRule) SetAcceleration(v Acceleration)` + +SetAcceleration sets Acceleration field to given value. + +### HasAcceleration + +`func (o *PageRule) HasAcceleration() bool` + +HasAcceleration returns a boolean if a field has been set. + +### GetSlinkStatus + +`func (o *PageRule) GetSlinkStatus() bool` + +GetSlinkStatus returns the SlinkStatus field if non-nil, zero value otherwise. + +### GetSlinkStatusOk + +`func (o *PageRule) GetSlinkStatusOk() (*bool, bool)` + +GetSlinkStatusOk returns a tuple with the SlinkStatus field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSlinkStatus + +`func (o *PageRule) SetSlinkStatus(v bool)` + +SetSlinkStatus sets SlinkStatus field to given value. + +### HasSlinkStatus + +`func (o *PageRule) HasSlinkStatus() bool` + +HasSlinkStatus returns a boolean if a field has been set. + +### GetStatus + +`func (o *PageRule) GetStatus() bool` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *PageRule) GetStatusOk() (*bool, 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 *PageRule) SetStatus(v bool)` + +SetStatus sets Status field to given value. + +### HasStatus + +`func (o *PageRule) HasStatus() bool` + +HasStatus returns a boolean if a field has been set. + +### GetCreatedAt + +`func (o *PageRule) GetCreatedAt() time.Time` + +GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. + +### GetCreatedAtOk + +`func (o *PageRule) GetCreatedAtOk() (*time.Time, bool)` + +GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedAt + +`func (o *PageRule) SetCreatedAt(v time.Time)` + +SetCreatedAt sets CreatedAt field to given value. + +### HasCreatedAt + +`func (o *PageRule) HasCreatedAt() bool` + +HasCreatedAt returns a boolean if a field has been set. + +### GetUpdatedAt + +`func (o *PageRule) GetUpdatedAt() time.Time` + +GetUpdatedAt returns the UpdatedAt field if non-nil, zero value otherwise. + +### GetUpdatedAtOk + +`func (o *PageRule) GetUpdatedAtOk() (*time.Time, bool)` + +GetUpdatedAtOk returns a tuple with the UpdatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpdatedAt + +`func (o *PageRule) SetUpdatedAt(v time.Time)` + +SetUpdatedAt sets UpdatedAt field to given value. + +### HasUpdatedAt + +`func (o *PageRule) HasUpdatedAt() bool` + +HasUpdatedAt returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/PageRuleApi.md b/docs/PageRuleApi.md new file mode 100644 index 0000000..8d877fe --- /dev/null +++ b/docs/PageRuleApi.md @@ -0,0 +1,666 @@ +# \PageRuleApi + +All URIs are relative to *https://napi.arvancloud.ir/cdn/4.0* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**PageRulesDestroy**](PageRuleApi.md#PageRulesDestroy) | **Delete** /domains/{domain}/page-rules/{id} | Delete the page-rule +[**PageRulesDiffShow**](PageRuleApi.md#PageRulesDiffShow) | **Get** /domains/{domain}/page-rules/{id}/diff | Get the page-rule's exceptions +[**PageRulesDiffUpdate**](PageRuleApi.md#PageRulesDiffUpdate) | **Patch** /domains/{domain}/page-rules/{id}/diff | Update the page-rule's exceptions +[**PageRulesIndex**](PageRuleApi.md#PageRulesIndex) | **Get** /domains/{domain}/page-rules | Get list of page-rules +[**PageRulesPurge**](PageRuleApi.md#PageRulesPurge) | **Delete** /domains/{domain}/page-rules/{id}/purge | Purge the page-rule +[**PageRulesShow**](PageRuleApi.md#PageRulesShow) | **Get** /domains/{domain}/page-rules/{id} | Get the page-rule's information +[**PageRulesStatusUpdate**](PageRuleApi.md#PageRulesStatusUpdate) | **Patch** /domains/{domain}/page-rules/{id} | Toggle status of the page-rule +[**PageRulesStore**](PageRuleApi.md#PageRulesStore) | **Post** /domains/{domain}/page-rules | Create new page-rule +[**PageRulesUpdate**](PageRuleApi.md#PageRulesUpdate) | **Put** /domains/{domain}/page-rules/{id} | Update the page-rule + + + +## PageRulesDestroy + +> MessageResponse PageRulesDestroy(ctx, domain, id).Execute() + +Delete the page-rule + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.PageRuleApi.PageRulesDestroy(context.Background(), domain, id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `PageRuleApi.PageRulesDestroy``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `PageRulesDestroy`: MessageResponse + fmt.Fprintf(os.Stdout, "Response from `PageRuleApi.PageRulesDestroy`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | +**id** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiPageRulesDestroyRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + +[**MessageResponse**](MessageResponse.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## PageRulesDiffShow + +> PageRuleDiffData PageRulesDiffShow(ctx, domain, id).Execute() + +Get the page-rule's exceptions + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.PageRuleApi.PageRulesDiffShow(context.Background(), domain, id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `PageRuleApi.PageRulesDiffShow``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `PageRulesDiffShow`: PageRuleDiffData + fmt.Fprintf(os.Stdout, "Response from `PageRuleApi.PageRulesDiffShow`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | +**id** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiPageRulesDiffShowRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + +[**PageRuleDiffData**](PageRuleDiffData.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## PageRulesDiffUpdate + +> PageRulesDiffUpdate200Response PageRulesDiffUpdate(ctx, domain, id).PageRule(pageRule).Execute() + +Update the page-rule's exceptions + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | + pageRule := *openapiclient.NewPageRule() // PageRule | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.PageRuleApi.PageRulesDiffUpdate(context.Background(), domain, id).PageRule(pageRule).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `PageRuleApi.PageRulesDiffUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `PageRulesDiffUpdate`: PageRulesDiffUpdate200Response + fmt.Fprintf(os.Stdout, "Response from `PageRuleApi.PageRulesDiffUpdate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | +**id** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiPageRulesDiffUpdateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **pageRule** | [**PageRule**](PageRule.md) | | + +### Return type + +[**PageRulesDiffUpdate200Response**](PageRulesDiffUpdate200Response.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## PageRulesIndex + +> PageRulesIndex200Response PageRulesIndex(ctx, domain).Search(search).PerPage(perPage).Page(page).Order(order).Execute() + +Get list of page-rules + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + search := "search_example" // string | Search term (optional) + perPage := int32(56) // int32 | Set how many items returned per page (optional) + page := int32(56) // int32 | Set the desired page number (optional) (default to 1) + order := "order_example" // string | Sort page rules in ascending or descending order base on seq (optional) (default to "desc") + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.PageRuleApi.PageRulesIndex(context.Background(), domain).Search(search).PerPage(perPage).Page(page).Order(order).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `PageRuleApi.PageRulesIndex``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `PageRulesIndex`: PageRulesIndex200Response + fmt.Fprintf(os.Stdout, "Response from `PageRuleApi.PageRulesIndex`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiPageRulesIndexRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **search** | **string** | Search term | + **perPage** | **int32** | Set how many items returned per page | + **page** | **int32** | Set the desired page number | [default to 1] + **order** | **string** | Sort page rules in ascending or descending order base on seq | [default to "desc"] + +### Return type + +[**PageRulesIndex200Response**](PageRulesIndex200Response.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## PageRulesPurge + +> MessageResponse PageRulesPurge(ctx, domain, id).Execute() + +Purge the page-rule + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.PageRuleApi.PageRulesPurge(context.Background(), domain, id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `PageRuleApi.PageRulesPurge``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `PageRulesPurge`: MessageResponse + fmt.Fprintf(os.Stdout, "Response from `PageRuleApi.PageRulesPurge`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | +**id** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiPageRulesPurgeRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + +[**MessageResponse**](MessageResponse.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## PageRulesShow + +> PageRuleData PageRulesShow(ctx, domain, id).Execute() + +Get the page-rule's information + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.PageRuleApi.PageRulesShow(context.Background(), domain, id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `PageRuleApi.PageRulesShow``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `PageRulesShow`: PageRuleData + fmt.Fprintf(os.Stdout, "Response from `PageRuleApi.PageRulesShow`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | +**id** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiPageRulesShowRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + +[**PageRuleData**](PageRuleData.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## PageRulesStatusUpdate + +> MessageResponse PageRulesStatusUpdate(ctx, domain, id).UpdateBooleanStatus(updateBooleanStatus).Execute() + +Toggle status of the page-rule + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | + updateBooleanStatus := *openapiclient.NewUpdateBooleanStatus() // UpdateBooleanStatus | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.PageRuleApi.PageRulesStatusUpdate(context.Background(), domain, id).UpdateBooleanStatus(updateBooleanStatus).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `PageRuleApi.PageRulesStatusUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `PageRulesStatusUpdate`: MessageResponse + fmt.Fprintf(os.Stdout, "Response from `PageRuleApi.PageRulesStatusUpdate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | +**id** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiPageRulesStatusUpdateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **updateBooleanStatus** | [**UpdateBooleanStatus**](UpdateBooleanStatus.md) | | + +### Return type + +[**MessageResponse**](MessageResponse.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## PageRulesStore + +> PageRuleResponse PageRulesStore(ctx, domain).PageRule(pageRule).Execute() + +Create new page-rule + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + pageRule := *openapiclient.NewPageRule() // PageRule | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.PageRuleApi.PageRulesStore(context.Background(), domain).PageRule(pageRule).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `PageRuleApi.PageRulesStore``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `PageRulesStore`: PageRuleResponse + fmt.Fprintf(os.Stdout, "Response from `PageRuleApi.PageRulesStore`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiPageRulesStoreRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **pageRule** | [**PageRule**](PageRule.md) | | + +### Return type + +[**PageRuleResponse**](PageRuleResponse.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## PageRulesUpdate + +> PageRuleResponse PageRulesUpdate(ctx, domain, id).PageRule(pageRule).Execute() + +Update the page-rule + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | + pageRule := *openapiclient.NewPageRule() // PageRule | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.PageRuleApi.PageRulesUpdate(context.Background(), domain, id).PageRule(pageRule).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `PageRuleApi.PageRulesUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `PageRulesUpdate`: PageRuleResponse + fmt.Fprintf(os.Stdout, "Response from `PageRuleApi.PageRulesUpdate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | +**id** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiPageRulesUpdateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **pageRule** | [**PageRule**](PageRule.md) | | + +### Return type + +[**PageRuleResponse**](PageRuleResponse.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + diff --git a/docs/PageRuleData.md b/docs/PageRuleData.md new file mode 100644 index 0000000..50c5269 --- /dev/null +++ b/docs/PageRuleData.md @@ -0,0 +1,56 @@ +# PageRuleData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**PageRule**](PageRule.md) | | [optional] + +## Methods + +### NewPageRuleData + +`func NewPageRuleData() *PageRuleData` + +NewPageRuleData instantiates a new PageRuleData object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPageRuleDataWithDefaults + +`func NewPageRuleDataWithDefaults() *PageRuleData` + +NewPageRuleDataWithDefaults instantiates a new PageRuleData object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *PageRuleData) GetData() PageRule` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *PageRuleData) GetDataOk() (*PageRule, 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 *PageRuleData) SetData(v PageRule)` + +SetData sets Data field to given value. + +### HasData + +`func (o *PageRuleData) HasData() bool` + +HasData returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/PageRuleDiff.md b/docs/PageRuleDiff.md new file mode 100644 index 0000000..9b6329d --- /dev/null +++ b/docs/PageRuleDiff.md @@ -0,0 +1,830 @@ +# PageRuleDiff + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Url** | Pointer to **string** | URL pattern of target pages | [optional] +**CacheLevel** | Pointer to **string** | | [optional] +**WafStatus** | Pointer to **bool** | | [optional] +**FwStatus** | Pointer to **bool** | Shows whether firewall is enabled or not | [optional] +**Acceleration** | Pointer to [**Acceleration**](Acceleration.md) | | [optional] +**SlinkStatus** | Pointer to **bool** | Secure link is enabled or not | [optional] +**Status** | Pointer to **bool** | Is the page-rule enabled? | [optional] +**Cache200** | Pointer to **string** | | [optional] +**CacheAny** | Pointer to **string** | | [optional] +**CacheCookie** | Pointer to **string** | Cookie variables to consider in cache (comma separaterd values) | [optional] +**CacheArgs** | Pointer to **bool** | | [optional] +**CacheArg** | Pointer to **string** | Query string arguments to consider in cache (& seperated values) | [optional] [default to ""] +**CacheScheme** | Pointer to **bool** | | [optional] +**CacheBrowser** | Pointer to **string** | | [optional] +**CacheIgnoreSc** | Pointer to **bool** | Ignore default behavior in caching set-cookie header | [optional] +**CacheIgnoreVary** | Pointer to **bool** | Ignore default behavior in caching vary header | [optional] +**CacheIgnoreCc** | Pointer to **bool** | | [optional] +**CorsHeader** | Pointer to **string** | | [optional] +**RewriteUrl** | Pointer to **string** | | [optional] +**SlinkSecret** | Pointer to **string** | | [optional] +**SlinkMd5** | Pointer to **[]string** | | [optional] +**ClusterStatus** | Pointer to **bool** | | [optional] +**ClusterId** | Pointer to **NullableString** | | [optional] +**UpstreamTimeout** | Pointer to [**UpstreamTimeout**](UpstreamTimeout.md) | | [optional] +**ReqCustomHeaders** | Pointer to [**[]PageRuleDiffReqCustomHeadersInner**](PageRuleDiffReqCustomHeadersInner.md) | | [optional] [default to []] +**ResCustomHeaders** | Pointer to [**[]PageRuleDiffReqCustomHeadersInner**](PageRuleDiffReqCustomHeadersInner.md) | | [optional] [default to []] +**ReqHideHeaders** | Pointer to **[]string** | | [optional] [default to []] +**ResHideHeaders** | Pointer to **[]string** | | [optional] +**CustomHostHeader** | Pointer to **string** | | [optional] +**Redirect** | Pointer to [**PageRuleDiffRedirect**](PageRuleDiffRedirect.md) | | [optional] + +## Methods + +### NewPageRuleDiff + +`func NewPageRuleDiff() *PageRuleDiff` + +NewPageRuleDiff instantiates a new PageRuleDiff object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPageRuleDiffWithDefaults + +`func NewPageRuleDiffWithDefaults() *PageRuleDiff` + +NewPageRuleDiffWithDefaults instantiates a new PageRuleDiff object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetUrl + +`func (o *PageRuleDiff) GetUrl() string` + +GetUrl returns the Url field if non-nil, zero value otherwise. + +### GetUrlOk + +`func (o *PageRuleDiff) GetUrlOk() (*string, bool)` + +GetUrlOk returns a tuple with the Url field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUrl + +`func (o *PageRuleDiff) SetUrl(v string)` + +SetUrl sets Url field to given value. + +### HasUrl + +`func (o *PageRuleDiff) HasUrl() bool` + +HasUrl returns a boolean if a field has been set. + +### GetCacheLevel + +`func (o *PageRuleDiff) GetCacheLevel() string` + +GetCacheLevel returns the CacheLevel field if non-nil, zero value otherwise. + +### GetCacheLevelOk + +`func (o *PageRuleDiff) GetCacheLevelOk() (*string, bool)` + +GetCacheLevelOk returns a tuple with the CacheLevel field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCacheLevel + +`func (o *PageRuleDiff) SetCacheLevel(v string)` + +SetCacheLevel sets CacheLevel field to given value. + +### HasCacheLevel + +`func (o *PageRuleDiff) HasCacheLevel() bool` + +HasCacheLevel returns a boolean if a field has been set. + +### GetWafStatus + +`func (o *PageRuleDiff) GetWafStatus() bool` + +GetWafStatus returns the WafStatus field if non-nil, zero value otherwise. + +### GetWafStatusOk + +`func (o *PageRuleDiff) GetWafStatusOk() (*bool, bool)` + +GetWafStatusOk returns a tuple with the WafStatus field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetWafStatus + +`func (o *PageRuleDiff) SetWafStatus(v bool)` + +SetWafStatus sets WafStatus field to given value. + +### HasWafStatus + +`func (o *PageRuleDiff) HasWafStatus() bool` + +HasWafStatus returns a boolean if a field has been set. + +### GetFwStatus + +`func (o *PageRuleDiff) GetFwStatus() bool` + +GetFwStatus returns the FwStatus field if non-nil, zero value otherwise. + +### GetFwStatusOk + +`func (o *PageRuleDiff) GetFwStatusOk() (*bool, bool)` + +GetFwStatusOk returns a tuple with the FwStatus field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFwStatus + +`func (o *PageRuleDiff) SetFwStatus(v bool)` + +SetFwStatus sets FwStatus field to given value. + +### HasFwStatus + +`func (o *PageRuleDiff) HasFwStatus() bool` + +HasFwStatus returns a boolean if a field has been set. + +### GetAcceleration + +`func (o *PageRuleDiff) GetAcceleration() Acceleration` + +GetAcceleration returns the Acceleration field if non-nil, zero value otherwise. + +### GetAccelerationOk + +`func (o *PageRuleDiff) GetAccelerationOk() (*Acceleration, bool)` + +GetAccelerationOk returns a tuple with the Acceleration field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAcceleration + +`func (o *PageRuleDiff) SetAcceleration(v Acceleration)` + +SetAcceleration sets Acceleration field to given value. + +### HasAcceleration + +`func (o *PageRuleDiff) HasAcceleration() bool` + +HasAcceleration returns a boolean if a field has been set. + +### GetSlinkStatus + +`func (o *PageRuleDiff) GetSlinkStatus() bool` + +GetSlinkStatus returns the SlinkStatus field if non-nil, zero value otherwise. + +### GetSlinkStatusOk + +`func (o *PageRuleDiff) GetSlinkStatusOk() (*bool, bool)` + +GetSlinkStatusOk returns a tuple with the SlinkStatus field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSlinkStatus + +`func (o *PageRuleDiff) SetSlinkStatus(v bool)` + +SetSlinkStatus sets SlinkStatus field to given value. + +### HasSlinkStatus + +`func (o *PageRuleDiff) HasSlinkStatus() bool` + +HasSlinkStatus returns a boolean if a field has been set. + +### GetStatus + +`func (o *PageRuleDiff) GetStatus() bool` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *PageRuleDiff) GetStatusOk() (*bool, 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 *PageRuleDiff) SetStatus(v bool)` + +SetStatus sets Status field to given value. + +### HasStatus + +`func (o *PageRuleDiff) HasStatus() bool` + +HasStatus returns a boolean if a field has been set. + +### GetCache200 + +`func (o *PageRuleDiff) GetCache200() string` + +GetCache200 returns the Cache200 field if non-nil, zero value otherwise. + +### GetCache200Ok + +`func (o *PageRuleDiff) GetCache200Ok() (*string, bool)` + +GetCache200Ok returns a tuple with the Cache200 field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCache200 + +`func (o *PageRuleDiff) SetCache200(v string)` + +SetCache200 sets Cache200 field to given value. + +### HasCache200 + +`func (o *PageRuleDiff) HasCache200() bool` + +HasCache200 returns a boolean if a field has been set. + +### GetCacheAny + +`func (o *PageRuleDiff) GetCacheAny() string` + +GetCacheAny returns the CacheAny field if non-nil, zero value otherwise. + +### GetCacheAnyOk + +`func (o *PageRuleDiff) GetCacheAnyOk() (*string, bool)` + +GetCacheAnyOk returns a tuple with the CacheAny field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCacheAny + +`func (o *PageRuleDiff) SetCacheAny(v string)` + +SetCacheAny sets CacheAny field to given value. + +### HasCacheAny + +`func (o *PageRuleDiff) HasCacheAny() bool` + +HasCacheAny returns a boolean if a field has been set. + +### GetCacheCookie + +`func (o *PageRuleDiff) GetCacheCookie() string` + +GetCacheCookie returns the CacheCookie field if non-nil, zero value otherwise. + +### GetCacheCookieOk + +`func (o *PageRuleDiff) GetCacheCookieOk() (*string, bool)` + +GetCacheCookieOk returns a tuple with the CacheCookie field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCacheCookie + +`func (o *PageRuleDiff) SetCacheCookie(v string)` + +SetCacheCookie sets CacheCookie field to given value. + +### HasCacheCookie + +`func (o *PageRuleDiff) HasCacheCookie() bool` + +HasCacheCookie returns a boolean if a field has been set. + +### GetCacheArgs + +`func (o *PageRuleDiff) GetCacheArgs() bool` + +GetCacheArgs returns the CacheArgs field if non-nil, zero value otherwise. + +### GetCacheArgsOk + +`func (o *PageRuleDiff) GetCacheArgsOk() (*bool, bool)` + +GetCacheArgsOk returns a tuple with the CacheArgs field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCacheArgs + +`func (o *PageRuleDiff) SetCacheArgs(v bool)` + +SetCacheArgs sets CacheArgs field to given value. + +### HasCacheArgs + +`func (o *PageRuleDiff) HasCacheArgs() bool` + +HasCacheArgs returns a boolean if a field has been set. + +### GetCacheArg + +`func (o *PageRuleDiff) GetCacheArg() string` + +GetCacheArg returns the CacheArg field if non-nil, zero value otherwise. + +### GetCacheArgOk + +`func (o *PageRuleDiff) GetCacheArgOk() (*string, bool)` + +GetCacheArgOk returns a tuple with the CacheArg field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCacheArg + +`func (o *PageRuleDiff) SetCacheArg(v string)` + +SetCacheArg sets CacheArg field to given value. + +### HasCacheArg + +`func (o *PageRuleDiff) HasCacheArg() bool` + +HasCacheArg returns a boolean if a field has been set. + +### GetCacheScheme + +`func (o *PageRuleDiff) GetCacheScheme() bool` + +GetCacheScheme returns the CacheScheme field if non-nil, zero value otherwise. + +### GetCacheSchemeOk + +`func (o *PageRuleDiff) GetCacheSchemeOk() (*bool, bool)` + +GetCacheSchemeOk returns a tuple with the CacheScheme field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCacheScheme + +`func (o *PageRuleDiff) SetCacheScheme(v bool)` + +SetCacheScheme sets CacheScheme field to given value. + +### HasCacheScheme + +`func (o *PageRuleDiff) HasCacheScheme() bool` + +HasCacheScheme returns a boolean if a field has been set. + +### GetCacheBrowser + +`func (o *PageRuleDiff) GetCacheBrowser() string` + +GetCacheBrowser returns the CacheBrowser field if non-nil, zero value otherwise. + +### GetCacheBrowserOk + +`func (o *PageRuleDiff) GetCacheBrowserOk() (*string, bool)` + +GetCacheBrowserOk returns a tuple with the CacheBrowser field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCacheBrowser + +`func (o *PageRuleDiff) SetCacheBrowser(v string)` + +SetCacheBrowser sets CacheBrowser field to given value. + +### HasCacheBrowser + +`func (o *PageRuleDiff) HasCacheBrowser() bool` + +HasCacheBrowser returns a boolean if a field has been set. + +### GetCacheIgnoreSc + +`func (o *PageRuleDiff) GetCacheIgnoreSc() bool` + +GetCacheIgnoreSc returns the CacheIgnoreSc field if non-nil, zero value otherwise. + +### GetCacheIgnoreScOk + +`func (o *PageRuleDiff) GetCacheIgnoreScOk() (*bool, bool)` + +GetCacheIgnoreScOk returns a tuple with the CacheIgnoreSc field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCacheIgnoreSc + +`func (o *PageRuleDiff) SetCacheIgnoreSc(v bool)` + +SetCacheIgnoreSc sets CacheIgnoreSc field to given value. + +### HasCacheIgnoreSc + +`func (o *PageRuleDiff) HasCacheIgnoreSc() bool` + +HasCacheIgnoreSc returns a boolean if a field has been set. + +### GetCacheIgnoreVary + +`func (o *PageRuleDiff) GetCacheIgnoreVary() bool` + +GetCacheIgnoreVary returns the CacheIgnoreVary field if non-nil, zero value otherwise. + +### GetCacheIgnoreVaryOk + +`func (o *PageRuleDiff) GetCacheIgnoreVaryOk() (*bool, bool)` + +GetCacheIgnoreVaryOk returns a tuple with the CacheIgnoreVary field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCacheIgnoreVary + +`func (o *PageRuleDiff) SetCacheIgnoreVary(v bool)` + +SetCacheIgnoreVary sets CacheIgnoreVary field to given value. + +### HasCacheIgnoreVary + +`func (o *PageRuleDiff) HasCacheIgnoreVary() bool` + +HasCacheIgnoreVary returns a boolean if a field has been set. + +### GetCacheIgnoreCc + +`func (o *PageRuleDiff) GetCacheIgnoreCc() bool` + +GetCacheIgnoreCc returns the CacheIgnoreCc field if non-nil, zero value otherwise. + +### GetCacheIgnoreCcOk + +`func (o *PageRuleDiff) GetCacheIgnoreCcOk() (*bool, bool)` + +GetCacheIgnoreCcOk returns a tuple with the CacheIgnoreCc field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCacheIgnoreCc + +`func (o *PageRuleDiff) SetCacheIgnoreCc(v bool)` + +SetCacheIgnoreCc sets CacheIgnoreCc field to given value. + +### HasCacheIgnoreCc + +`func (o *PageRuleDiff) HasCacheIgnoreCc() bool` + +HasCacheIgnoreCc returns a boolean if a field has been set. + +### GetCorsHeader + +`func (o *PageRuleDiff) GetCorsHeader() string` + +GetCorsHeader returns the CorsHeader field if non-nil, zero value otherwise. + +### GetCorsHeaderOk + +`func (o *PageRuleDiff) GetCorsHeaderOk() (*string, bool)` + +GetCorsHeaderOk returns a tuple with the CorsHeader field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCorsHeader + +`func (o *PageRuleDiff) SetCorsHeader(v string)` + +SetCorsHeader sets CorsHeader field to given value. + +### HasCorsHeader + +`func (o *PageRuleDiff) HasCorsHeader() bool` + +HasCorsHeader returns a boolean if a field has been set. + +### GetRewriteUrl + +`func (o *PageRuleDiff) GetRewriteUrl() string` + +GetRewriteUrl returns the RewriteUrl field if non-nil, zero value otherwise. + +### GetRewriteUrlOk + +`func (o *PageRuleDiff) GetRewriteUrlOk() (*string, bool)` + +GetRewriteUrlOk returns a tuple with the RewriteUrl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRewriteUrl + +`func (o *PageRuleDiff) SetRewriteUrl(v string)` + +SetRewriteUrl sets RewriteUrl field to given value. + +### HasRewriteUrl + +`func (o *PageRuleDiff) HasRewriteUrl() bool` + +HasRewriteUrl returns a boolean if a field has been set. + +### GetSlinkSecret + +`func (o *PageRuleDiff) GetSlinkSecret() string` + +GetSlinkSecret returns the SlinkSecret field if non-nil, zero value otherwise. + +### GetSlinkSecretOk + +`func (o *PageRuleDiff) GetSlinkSecretOk() (*string, bool)` + +GetSlinkSecretOk returns a tuple with the SlinkSecret field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSlinkSecret + +`func (o *PageRuleDiff) SetSlinkSecret(v string)` + +SetSlinkSecret sets SlinkSecret field to given value. + +### HasSlinkSecret + +`func (o *PageRuleDiff) HasSlinkSecret() bool` + +HasSlinkSecret returns a boolean if a field has been set. + +### GetSlinkMd5 + +`func (o *PageRuleDiff) GetSlinkMd5() []string` + +GetSlinkMd5 returns the SlinkMd5 field if non-nil, zero value otherwise. + +### GetSlinkMd5Ok + +`func (o *PageRuleDiff) GetSlinkMd5Ok() (*[]string, bool)` + +GetSlinkMd5Ok returns a tuple with the SlinkMd5 field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSlinkMd5 + +`func (o *PageRuleDiff) SetSlinkMd5(v []string)` + +SetSlinkMd5 sets SlinkMd5 field to given value. + +### HasSlinkMd5 + +`func (o *PageRuleDiff) HasSlinkMd5() bool` + +HasSlinkMd5 returns a boolean if a field has been set. + +### SetSlinkMd5Nil + +`func (o *PageRuleDiff) SetSlinkMd5Nil(b bool)` + + SetSlinkMd5Nil sets the value for SlinkMd5 to be an explicit nil + +### UnsetSlinkMd5 +`func (o *PageRuleDiff) UnsetSlinkMd5()` + +UnsetSlinkMd5 ensures that no value is present for SlinkMd5, not even an explicit nil +### GetClusterStatus + +`func (o *PageRuleDiff) GetClusterStatus() bool` + +GetClusterStatus returns the ClusterStatus field if non-nil, zero value otherwise. + +### GetClusterStatusOk + +`func (o *PageRuleDiff) GetClusterStatusOk() (*bool, bool)` + +GetClusterStatusOk returns a tuple with the ClusterStatus field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetClusterStatus + +`func (o *PageRuleDiff) SetClusterStatus(v bool)` + +SetClusterStatus sets ClusterStatus field to given value. + +### HasClusterStatus + +`func (o *PageRuleDiff) HasClusterStatus() bool` + +HasClusterStatus returns a boolean if a field has been set. + +### GetClusterId + +`func (o *PageRuleDiff) GetClusterId() string` + +GetClusterId returns the ClusterId field if non-nil, zero value otherwise. + +### GetClusterIdOk + +`func (o *PageRuleDiff) GetClusterIdOk() (*string, bool)` + +GetClusterIdOk returns a tuple with the ClusterId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetClusterId + +`func (o *PageRuleDiff) SetClusterId(v string)` + +SetClusterId sets ClusterId field to given value. + +### HasClusterId + +`func (o *PageRuleDiff) HasClusterId() bool` + +HasClusterId returns a boolean if a field has been set. + +### SetClusterIdNil + +`func (o *PageRuleDiff) SetClusterIdNil(b bool)` + + SetClusterIdNil sets the value for ClusterId to be an explicit nil + +### UnsetClusterId +`func (o *PageRuleDiff) UnsetClusterId()` + +UnsetClusterId ensures that no value is present for ClusterId, not even an explicit nil +### GetUpstreamTimeout + +`func (o *PageRuleDiff) GetUpstreamTimeout() UpstreamTimeout` + +GetUpstreamTimeout returns the UpstreamTimeout field if non-nil, zero value otherwise. + +### GetUpstreamTimeoutOk + +`func (o *PageRuleDiff) GetUpstreamTimeoutOk() (*UpstreamTimeout, bool)` + +GetUpstreamTimeoutOk returns a tuple with the UpstreamTimeout field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpstreamTimeout + +`func (o *PageRuleDiff) SetUpstreamTimeout(v UpstreamTimeout)` + +SetUpstreamTimeout sets UpstreamTimeout field to given value. + +### HasUpstreamTimeout + +`func (o *PageRuleDiff) HasUpstreamTimeout() bool` + +HasUpstreamTimeout returns a boolean if a field has been set. + +### GetReqCustomHeaders + +`func (o *PageRuleDiff) GetReqCustomHeaders() []PageRuleDiffReqCustomHeadersInner` + +GetReqCustomHeaders returns the ReqCustomHeaders field if non-nil, zero value otherwise. + +### GetReqCustomHeadersOk + +`func (o *PageRuleDiff) GetReqCustomHeadersOk() (*[]PageRuleDiffReqCustomHeadersInner, bool)` + +GetReqCustomHeadersOk returns a tuple with the ReqCustomHeaders field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetReqCustomHeaders + +`func (o *PageRuleDiff) SetReqCustomHeaders(v []PageRuleDiffReqCustomHeadersInner)` + +SetReqCustomHeaders sets ReqCustomHeaders field to given value. + +### HasReqCustomHeaders + +`func (o *PageRuleDiff) HasReqCustomHeaders() bool` + +HasReqCustomHeaders returns a boolean if a field has been set. + +### GetResCustomHeaders + +`func (o *PageRuleDiff) GetResCustomHeaders() []PageRuleDiffReqCustomHeadersInner` + +GetResCustomHeaders returns the ResCustomHeaders field if non-nil, zero value otherwise. + +### GetResCustomHeadersOk + +`func (o *PageRuleDiff) GetResCustomHeadersOk() (*[]PageRuleDiffReqCustomHeadersInner, bool)` + +GetResCustomHeadersOk returns a tuple with the ResCustomHeaders field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResCustomHeaders + +`func (o *PageRuleDiff) SetResCustomHeaders(v []PageRuleDiffReqCustomHeadersInner)` + +SetResCustomHeaders sets ResCustomHeaders field to given value. + +### HasResCustomHeaders + +`func (o *PageRuleDiff) HasResCustomHeaders() bool` + +HasResCustomHeaders returns a boolean if a field has been set. + +### GetReqHideHeaders + +`func (o *PageRuleDiff) GetReqHideHeaders() []string` + +GetReqHideHeaders returns the ReqHideHeaders field if non-nil, zero value otherwise. + +### GetReqHideHeadersOk + +`func (o *PageRuleDiff) GetReqHideHeadersOk() (*[]string, bool)` + +GetReqHideHeadersOk returns a tuple with the ReqHideHeaders field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetReqHideHeaders + +`func (o *PageRuleDiff) SetReqHideHeaders(v []string)` + +SetReqHideHeaders sets ReqHideHeaders field to given value. + +### HasReqHideHeaders + +`func (o *PageRuleDiff) HasReqHideHeaders() bool` + +HasReqHideHeaders returns a boolean if a field has been set. + +### GetResHideHeaders + +`func (o *PageRuleDiff) GetResHideHeaders() []string` + +GetResHideHeaders returns the ResHideHeaders field if non-nil, zero value otherwise. + +### GetResHideHeadersOk + +`func (o *PageRuleDiff) GetResHideHeadersOk() (*[]string, bool)` + +GetResHideHeadersOk returns a tuple with the ResHideHeaders field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResHideHeaders + +`func (o *PageRuleDiff) SetResHideHeaders(v []string)` + +SetResHideHeaders sets ResHideHeaders field to given value. + +### HasResHideHeaders + +`func (o *PageRuleDiff) HasResHideHeaders() bool` + +HasResHideHeaders returns a boolean if a field has been set. + +### GetCustomHostHeader + +`func (o *PageRuleDiff) GetCustomHostHeader() string` + +GetCustomHostHeader returns the CustomHostHeader field if non-nil, zero value otherwise. + +### GetCustomHostHeaderOk + +`func (o *PageRuleDiff) GetCustomHostHeaderOk() (*string, bool)` + +GetCustomHostHeaderOk returns a tuple with the CustomHostHeader field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCustomHostHeader + +`func (o *PageRuleDiff) SetCustomHostHeader(v string)` + +SetCustomHostHeader sets CustomHostHeader field to given value. + +### HasCustomHostHeader + +`func (o *PageRuleDiff) HasCustomHostHeader() bool` + +HasCustomHostHeader returns a boolean if a field has been set. + +### GetRedirect + +`func (o *PageRuleDiff) GetRedirect() PageRuleDiffRedirect` + +GetRedirect returns the Redirect field if non-nil, zero value otherwise. + +### GetRedirectOk + +`func (o *PageRuleDiff) GetRedirectOk() (*PageRuleDiffRedirect, bool)` + +GetRedirectOk returns a tuple with the Redirect field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRedirect + +`func (o *PageRuleDiff) SetRedirect(v PageRuleDiffRedirect)` + +SetRedirect sets Redirect field to given value. + +### HasRedirect + +`func (o *PageRuleDiff) HasRedirect() bool` + +HasRedirect returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/PageRuleDiffData.md b/docs/PageRuleDiffData.md new file mode 100644 index 0000000..1ffaac1 --- /dev/null +++ b/docs/PageRuleDiffData.md @@ -0,0 +1,56 @@ +# PageRuleDiffData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**PageRuleDiff**](PageRuleDiff.md) | | [optional] + +## Methods + +### NewPageRuleDiffData + +`func NewPageRuleDiffData() *PageRuleDiffData` + +NewPageRuleDiffData instantiates a new PageRuleDiffData object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPageRuleDiffDataWithDefaults + +`func NewPageRuleDiffDataWithDefaults() *PageRuleDiffData` + +NewPageRuleDiffDataWithDefaults instantiates a new PageRuleDiffData object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *PageRuleDiffData) GetData() PageRuleDiff` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *PageRuleDiffData) GetDataOk() (*PageRuleDiff, 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 *PageRuleDiffData) SetData(v PageRuleDiff)` + +SetData sets Data field to given value. + +### HasData + +`func (o *PageRuleDiffData) HasData() bool` + +HasData returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/PageRuleDiffRedirect.md b/docs/PageRuleDiffRedirect.md new file mode 100644 index 0000000..413ff7d --- /dev/null +++ b/docs/PageRuleDiffRedirect.md @@ -0,0 +1,118 @@ +# PageRuleDiffRedirect + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enable** | Pointer to **bool** | | [optional] +**StatusCode** | Pointer to **int32** | | [optional] +**Url** | Pointer to **NullableString** | | [optional] + +## Methods + +### NewPageRuleDiffRedirect + +`func NewPageRuleDiffRedirect() *PageRuleDiffRedirect` + +NewPageRuleDiffRedirect instantiates a new PageRuleDiffRedirect object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPageRuleDiffRedirectWithDefaults + +`func NewPageRuleDiffRedirectWithDefaults() *PageRuleDiffRedirect` + +NewPageRuleDiffRedirectWithDefaults instantiates a new PageRuleDiffRedirect object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetEnable + +`func (o *PageRuleDiffRedirect) GetEnable() bool` + +GetEnable returns the Enable field if non-nil, zero value otherwise. + +### GetEnableOk + +`func (o *PageRuleDiffRedirect) GetEnableOk() (*bool, bool)` + +GetEnableOk returns a tuple with the Enable field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEnable + +`func (o *PageRuleDiffRedirect) SetEnable(v bool)` + +SetEnable sets Enable field to given value. + +### HasEnable + +`func (o *PageRuleDiffRedirect) HasEnable() bool` + +HasEnable returns a boolean if a field has been set. + +### GetStatusCode + +`func (o *PageRuleDiffRedirect) GetStatusCode() int32` + +GetStatusCode returns the StatusCode field if non-nil, zero value otherwise. + +### GetStatusCodeOk + +`func (o *PageRuleDiffRedirect) GetStatusCodeOk() (*int32, bool)` + +GetStatusCodeOk returns a tuple with the StatusCode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatusCode + +`func (o *PageRuleDiffRedirect) SetStatusCode(v int32)` + +SetStatusCode sets StatusCode field to given value. + +### HasStatusCode + +`func (o *PageRuleDiffRedirect) HasStatusCode() bool` + +HasStatusCode returns a boolean if a field has been set. + +### GetUrl + +`func (o *PageRuleDiffRedirect) GetUrl() string` + +GetUrl returns the Url field if non-nil, zero value otherwise. + +### GetUrlOk + +`func (o *PageRuleDiffRedirect) GetUrlOk() (*string, bool)` + +GetUrlOk returns a tuple with the Url field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUrl + +`func (o *PageRuleDiffRedirect) SetUrl(v string)` + +SetUrl sets Url field to given value. + +### HasUrl + +`func (o *PageRuleDiffRedirect) HasUrl() bool` + +HasUrl returns a boolean if a field has been set. + +### SetUrlNil + +`func (o *PageRuleDiffRedirect) SetUrlNil(b bool)` + + SetUrlNil sets the value for Url to be an explicit nil + +### UnsetUrl +`func (o *PageRuleDiffRedirect) UnsetUrl()` + +UnsetUrl ensures that no value is present for Url, not even an explicit nil + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/PageRuleDiffReqCustomHeadersInner.md b/docs/PageRuleDiffReqCustomHeadersInner.md new file mode 100644 index 0000000..b273a13 --- /dev/null +++ b/docs/PageRuleDiffReqCustomHeadersInner.md @@ -0,0 +1,108 @@ +# PageRuleDiffReqCustomHeadersInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **string** | | [optional] +**Value** | Pointer to **string** | | [optional] +**IsVar** | Pointer to **bool** | | [optional] + +## Methods + +### NewPageRuleDiffReqCustomHeadersInner + +`func NewPageRuleDiffReqCustomHeadersInner() *PageRuleDiffReqCustomHeadersInner` + +NewPageRuleDiffReqCustomHeadersInner instantiates a new PageRuleDiffReqCustomHeadersInner object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPageRuleDiffReqCustomHeadersInnerWithDefaults + +`func NewPageRuleDiffReqCustomHeadersInnerWithDefaults() *PageRuleDiffReqCustomHeadersInner` + +NewPageRuleDiffReqCustomHeadersInnerWithDefaults instantiates a new PageRuleDiffReqCustomHeadersInner object +This 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 *PageRuleDiffReqCustomHeadersInner) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *PageRuleDiffReqCustomHeadersInner) 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 *PageRuleDiffReqCustomHeadersInner) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *PageRuleDiffReqCustomHeadersInner) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetValue + +`func (o *PageRuleDiffReqCustomHeadersInner) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *PageRuleDiffReqCustomHeadersInner) 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 *PageRuleDiffReqCustomHeadersInner) SetValue(v string)` + +SetValue sets Value field to given value. + +### HasValue + +`func (o *PageRuleDiffReqCustomHeadersInner) HasValue() bool` + +HasValue returns a boolean if a field has been set. + +### GetIsVar + +`func (o *PageRuleDiffReqCustomHeadersInner) GetIsVar() bool` + +GetIsVar returns the IsVar field if non-nil, zero value otherwise. + +### GetIsVarOk + +`func (o *PageRuleDiffReqCustomHeadersInner) GetIsVarOk() (*bool, bool)` + +GetIsVarOk returns a tuple with the IsVar field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsVar + +`func (o *PageRuleDiffReqCustomHeadersInner) SetIsVar(v bool)` + +SetIsVar sets IsVar field to given value. + +### HasIsVar + +`func (o *PageRuleDiffReqCustomHeadersInner) HasIsVar() bool` + +HasIsVar returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/PageRuleImageResize.md b/docs/PageRuleImageResize.md new file mode 100644 index 0000000..36245c0 --- /dev/null +++ b/docs/PageRuleImageResize.md @@ -0,0 +1,108 @@ +# PageRuleImageResize + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Status** | Pointer to **string** | | [optional] +**HeightBy** | Pointer to **string** | | [optional] [default to "height"] +**WidthBy** | Pointer to **string** | | [optional] [default to "width"] + +## Methods + +### NewPageRuleImageResize + +`func NewPageRuleImageResize() *PageRuleImageResize` + +NewPageRuleImageResize instantiates a new PageRuleImageResize object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPageRuleImageResizeWithDefaults + +`func NewPageRuleImageResizeWithDefaults() *PageRuleImageResize` + +NewPageRuleImageResizeWithDefaults instantiates a new PageRuleImageResize object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetStatus + +`func (o *PageRuleImageResize) GetStatus() string` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *PageRuleImageResize) GetStatusOk() (*string, 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 *PageRuleImageResize) SetStatus(v string)` + +SetStatus sets Status field to given value. + +### HasStatus + +`func (o *PageRuleImageResize) HasStatus() bool` + +HasStatus returns a boolean if a field has been set. + +### GetHeightBy + +`func (o *PageRuleImageResize) GetHeightBy() string` + +GetHeightBy returns the HeightBy field if non-nil, zero value otherwise. + +### GetHeightByOk + +`func (o *PageRuleImageResize) GetHeightByOk() (*string, bool)` + +GetHeightByOk returns a tuple with the HeightBy field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHeightBy + +`func (o *PageRuleImageResize) SetHeightBy(v string)` + +SetHeightBy sets HeightBy field to given value. + +### HasHeightBy + +`func (o *PageRuleImageResize) HasHeightBy() bool` + +HasHeightBy returns a boolean if a field has been set. + +### GetWidthBy + +`func (o *PageRuleImageResize) GetWidthBy() string` + +GetWidthBy returns the WidthBy field if non-nil, zero value otherwise. + +### GetWidthByOk + +`func (o *PageRuleImageResize) GetWidthByOk() (*string, bool)` + +GetWidthByOk returns a tuple with the WidthBy field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetWidthBy + +`func (o *PageRuleImageResize) SetWidthBy(v string)` + +SetWidthBy sets WidthBy field to given value. + +### HasWidthBy + +`func (o *PageRuleImageResize) HasWidthBy() bool` + +HasWidthBy returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/PageRuleRedirect.md b/docs/PageRuleRedirect.md new file mode 100644 index 0000000..8f899fd --- /dev/null +++ b/docs/PageRuleRedirect.md @@ -0,0 +1,118 @@ +# PageRuleRedirect + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enable** | Pointer to **bool** | | [optional] [default to false] +**StatusCode** | Pointer to **int32** | | [optional] [default to 301] +**Url** | Pointer to **NullableString** | | [optional] + +## Methods + +### NewPageRuleRedirect + +`func NewPageRuleRedirect() *PageRuleRedirect` + +NewPageRuleRedirect instantiates a new PageRuleRedirect object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPageRuleRedirectWithDefaults + +`func NewPageRuleRedirectWithDefaults() *PageRuleRedirect` + +NewPageRuleRedirectWithDefaults instantiates a new PageRuleRedirect object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetEnable + +`func (o *PageRuleRedirect) GetEnable() bool` + +GetEnable returns the Enable field if non-nil, zero value otherwise. + +### GetEnableOk + +`func (o *PageRuleRedirect) GetEnableOk() (*bool, bool)` + +GetEnableOk returns a tuple with the Enable field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEnable + +`func (o *PageRuleRedirect) SetEnable(v bool)` + +SetEnable sets Enable field to given value. + +### HasEnable + +`func (o *PageRuleRedirect) HasEnable() bool` + +HasEnable returns a boolean if a field has been set. + +### GetStatusCode + +`func (o *PageRuleRedirect) GetStatusCode() int32` + +GetStatusCode returns the StatusCode field if non-nil, zero value otherwise. + +### GetStatusCodeOk + +`func (o *PageRuleRedirect) GetStatusCodeOk() (*int32, bool)` + +GetStatusCodeOk returns a tuple with the StatusCode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatusCode + +`func (o *PageRuleRedirect) SetStatusCode(v int32)` + +SetStatusCode sets StatusCode field to given value. + +### HasStatusCode + +`func (o *PageRuleRedirect) HasStatusCode() bool` + +HasStatusCode returns a boolean if a field has been set. + +### GetUrl + +`func (o *PageRuleRedirect) GetUrl() string` + +GetUrl returns the Url field if non-nil, zero value otherwise. + +### GetUrlOk + +`func (o *PageRuleRedirect) GetUrlOk() (*string, bool)` + +GetUrlOk returns a tuple with the Url field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUrl + +`func (o *PageRuleRedirect) SetUrl(v string)` + +SetUrl sets Url field to given value. + +### HasUrl + +`func (o *PageRuleRedirect) HasUrl() bool` + +HasUrl returns a boolean if a field has been set. + +### SetUrlNil + +`func (o *PageRuleRedirect) SetUrlNil(b bool)` + + SetUrlNil sets the value for Url to be an explicit nil + +### UnsetUrl +`func (o *PageRuleRedirect) UnsetUrl()` + +UnsetUrl ensures that no value is present for Url, not even an explicit nil + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/PageRuleResponse.md b/docs/PageRuleResponse.md new file mode 100644 index 0000000..b3b1a3e --- /dev/null +++ b/docs/PageRuleResponse.md @@ -0,0 +1,92 @@ +# PageRuleResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**PageRule**](PageRule.md) | | [optional] +**Message** | Pointer to **NullableString** | | [optional] + +## Methods + +### NewPageRuleResponse + +`func NewPageRuleResponse() *PageRuleResponse` + +NewPageRuleResponse instantiates a new PageRuleResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPageRuleResponseWithDefaults + +`func NewPageRuleResponseWithDefaults() *PageRuleResponse` + +NewPageRuleResponseWithDefaults instantiates a new PageRuleResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *PageRuleResponse) GetData() PageRule` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *PageRuleResponse) GetDataOk() (*PageRule, 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 *PageRuleResponse) SetData(v PageRule)` + +SetData sets Data field to given value. + +### HasData + +`func (o *PageRuleResponse) HasData() bool` + +HasData returns a boolean if a field has been set. + +### GetMessage + +`func (o *PageRuleResponse) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *PageRuleResponse) GetMessageOk() (*string, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessage + +`func (o *PageRuleResponse) SetMessage(v string)` + +SetMessage sets Message field to given value. + +### HasMessage + +`func (o *PageRuleResponse) HasMessage() bool` + +HasMessage returns a boolean if a field has been set. + +### SetMessageNil + +`func (o *PageRuleResponse) SetMessageNil(b bool)` + + SetMessageNil sets the value for Message to be an explicit nil + +### UnsetMessage +`func (o *PageRuleResponse) UnsetMessage()` + +UnsetMessage ensures that no value is present for Message, not even an explicit nil + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/PageRuleSummary.md b/docs/PageRuleSummary.md new file mode 100644 index 0000000..9811685 --- /dev/null +++ b/docs/PageRuleSummary.md @@ -0,0 +1,394 @@ +# PageRuleSummary + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **string** | | [optional] [readonly] +**DomainId** | Pointer to **string** | | [optional] +**Seq** | Pointer to **int32** | Order of the page-rule | [optional] +**UrlType** | Pointer to **string** | This flag is deprecated in favor of is_protected flag | [optional] [default to "default"] +**IsProtected** | Pointer to **bool** | Protected records cannot be modified or deleted by user. | [optional] [readonly] [default to false] +**Url** | Pointer to **string** | URL pattern of target pages | [optional] +**CacheLevel** | Pointer to **string** | | [optional] [default to "query_string"] +**WafStatus** | Pointer to **bool** | | [optional] [default to true] +**FwStatus** | Pointer to **bool** | Shows whether firewall is enabled or not | [optional] [default to true] +**Acceleration** | Pointer to [**Acceleration**](Acceleration.md) | | [optional] +**SlinkStatus** | Pointer to **bool** | Secure link is enabled or not | [optional] [default to false] +**Status** | Pointer to **bool** | Is the page-rule enabled? | [optional] [default to true] +**CreatedAt** | Pointer to **time.Time** | | [optional] [readonly] +**UpdatedAt** | Pointer to **time.Time** | | [optional] [readonly] + +## Methods + +### NewPageRuleSummary + +`func NewPageRuleSummary() *PageRuleSummary` + +NewPageRuleSummary instantiates a new PageRuleSummary object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPageRuleSummaryWithDefaults + +`func NewPageRuleSummaryWithDefaults() *PageRuleSummary` + +NewPageRuleSummaryWithDefaults instantiates a new PageRuleSummary object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *PageRuleSummary) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *PageRuleSummary) 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 *PageRuleSummary) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *PageRuleSummary) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetDomainId + +`func (o *PageRuleSummary) GetDomainId() string` + +GetDomainId returns the DomainId field if non-nil, zero value otherwise. + +### GetDomainIdOk + +`func (o *PageRuleSummary) GetDomainIdOk() (*string, bool)` + +GetDomainIdOk returns a tuple with the DomainId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDomainId + +`func (o *PageRuleSummary) SetDomainId(v string)` + +SetDomainId sets DomainId field to given value. + +### HasDomainId + +`func (o *PageRuleSummary) HasDomainId() bool` + +HasDomainId returns a boolean if a field has been set. + +### GetSeq + +`func (o *PageRuleSummary) GetSeq() int32` + +GetSeq returns the Seq field if non-nil, zero value otherwise. + +### GetSeqOk + +`func (o *PageRuleSummary) GetSeqOk() (*int32, bool)` + +GetSeqOk returns a tuple with the Seq field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSeq + +`func (o *PageRuleSummary) SetSeq(v int32)` + +SetSeq sets Seq field to given value. + +### HasSeq + +`func (o *PageRuleSummary) HasSeq() bool` + +HasSeq returns a boolean if a field has been set. + +### GetUrlType + +`func (o *PageRuleSummary) GetUrlType() string` + +GetUrlType returns the UrlType field if non-nil, zero value otherwise. + +### GetUrlTypeOk + +`func (o *PageRuleSummary) GetUrlTypeOk() (*string, bool)` + +GetUrlTypeOk returns a tuple with the UrlType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUrlType + +`func (o *PageRuleSummary) SetUrlType(v string)` + +SetUrlType sets UrlType field to given value. + +### HasUrlType + +`func (o *PageRuleSummary) HasUrlType() bool` + +HasUrlType returns a boolean if a field has been set. + +### GetIsProtected + +`func (o *PageRuleSummary) GetIsProtected() bool` + +GetIsProtected returns the IsProtected field if non-nil, zero value otherwise. + +### GetIsProtectedOk + +`func (o *PageRuleSummary) GetIsProtectedOk() (*bool, bool)` + +GetIsProtectedOk returns a tuple with the IsProtected field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsProtected + +`func (o *PageRuleSummary) SetIsProtected(v bool)` + +SetIsProtected sets IsProtected field to given value. + +### HasIsProtected + +`func (o *PageRuleSummary) HasIsProtected() bool` + +HasIsProtected returns a boolean if a field has been set. + +### GetUrl + +`func (o *PageRuleSummary) GetUrl() string` + +GetUrl returns the Url field if non-nil, zero value otherwise. + +### GetUrlOk + +`func (o *PageRuleSummary) GetUrlOk() (*string, bool)` + +GetUrlOk returns a tuple with the Url field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUrl + +`func (o *PageRuleSummary) SetUrl(v string)` + +SetUrl sets Url field to given value. + +### HasUrl + +`func (o *PageRuleSummary) HasUrl() bool` + +HasUrl returns a boolean if a field has been set. + +### GetCacheLevel + +`func (o *PageRuleSummary) GetCacheLevel() string` + +GetCacheLevel returns the CacheLevel field if non-nil, zero value otherwise. + +### GetCacheLevelOk + +`func (o *PageRuleSummary) GetCacheLevelOk() (*string, bool)` + +GetCacheLevelOk returns a tuple with the CacheLevel field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCacheLevel + +`func (o *PageRuleSummary) SetCacheLevel(v string)` + +SetCacheLevel sets CacheLevel field to given value. + +### HasCacheLevel + +`func (o *PageRuleSummary) HasCacheLevel() bool` + +HasCacheLevel returns a boolean if a field has been set. + +### GetWafStatus + +`func (o *PageRuleSummary) GetWafStatus() bool` + +GetWafStatus returns the WafStatus field if non-nil, zero value otherwise. + +### GetWafStatusOk + +`func (o *PageRuleSummary) GetWafStatusOk() (*bool, bool)` + +GetWafStatusOk returns a tuple with the WafStatus field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetWafStatus + +`func (o *PageRuleSummary) SetWafStatus(v bool)` + +SetWafStatus sets WafStatus field to given value. + +### HasWafStatus + +`func (o *PageRuleSummary) HasWafStatus() bool` + +HasWafStatus returns a boolean if a field has been set. + +### GetFwStatus + +`func (o *PageRuleSummary) GetFwStatus() bool` + +GetFwStatus returns the FwStatus field if non-nil, zero value otherwise. + +### GetFwStatusOk + +`func (o *PageRuleSummary) GetFwStatusOk() (*bool, bool)` + +GetFwStatusOk returns a tuple with the FwStatus field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFwStatus + +`func (o *PageRuleSummary) SetFwStatus(v bool)` + +SetFwStatus sets FwStatus field to given value. + +### HasFwStatus + +`func (o *PageRuleSummary) HasFwStatus() bool` + +HasFwStatus returns a boolean if a field has been set. + +### GetAcceleration + +`func (o *PageRuleSummary) GetAcceleration() Acceleration` + +GetAcceleration returns the Acceleration field if non-nil, zero value otherwise. + +### GetAccelerationOk + +`func (o *PageRuleSummary) GetAccelerationOk() (*Acceleration, bool)` + +GetAccelerationOk returns a tuple with the Acceleration field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAcceleration + +`func (o *PageRuleSummary) SetAcceleration(v Acceleration)` + +SetAcceleration sets Acceleration field to given value. + +### HasAcceleration + +`func (o *PageRuleSummary) HasAcceleration() bool` + +HasAcceleration returns a boolean if a field has been set. + +### GetSlinkStatus + +`func (o *PageRuleSummary) GetSlinkStatus() bool` + +GetSlinkStatus returns the SlinkStatus field if non-nil, zero value otherwise. + +### GetSlinkStatusOk + +`func (o *PageRuleSummary) GetSlinkStatusOk() (*bool, bool)` + +GetSlinkStatusOk returns a tuple with the SlinkStatus field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSlinkStatus + +`func (o *PageRuleSummary) SetSlinkStatus(v bool)` + +SetSlinkStatus sets SlinkStatus field to given value. + +### HasSlinkStatus + +`func (o *PageRuleSummary) HasSlinkStatus() bool` + +HasSlinkStatus returns a boolean if a field has been set. + +### GetStatus + +`func (o *PageRuleSummary) GetStatus() bool` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *PageRuleSummary) GetStatusOk() (*bool, 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 *PageRuleSummary) SetStatus(v bool)` + +SetStatus sets Status field to given value. + +### HasStatus + +`func (o *PageRuleSummary) HasStatus() bool` + +HasStatus returns a boolean if a field has been set. + +### GetCreatedAt + +`func (o *PageRuleSummary) GetCreatedAt() time.Time` + +GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. + +### GetCreatedAtOk + +`func (o *PageRuleSummary) GetCreatedAtOk() (*time.Time, bool)` + +GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedAt + +`func (o *PageRuleSummary) SetCreatedAt(v time.Time)` + +SetCreatedAt sets CreatedAt field to given value. + +### HasCreatedAt + +`func (o *PageRuleSummary) HasCreatedAt() bool` + +HasCreatedAt returns a boolean if a field has been set. + +### GetUpdatedAt + +`func (o *PageRuleSummary) GetUpdatedAt() time.Time` + +GetUpdatedAt returns the UpdatedAt field if non-nil, zero value otherwise. + +### GetUpdatedAtOk + +`func (o *PageRuleSummary) GetUpdatedAtOk() (*time.Time, bool)` + +GetUpdatedAtOk returns a tuple with the UpdatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpdatedAt + +`func (o *PageRuleSummary) SetUpdatedAt(v time.Time)` + +SetUpdatedAt sets UpdatedAt field to given value. + +### HasUpdatedAt + +`func (o *PageRuleSummary) HasUpdatedAt() bool` + +HasUpdatedAt returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/PageRulesDiffUpdate200Response.md b/docs/PageRulesDiffUpdate200Response.md new file mode 100644 index 0000000..3d448c8 --- /dev/null +++ b/docs/PageRulesDiffUpdate200Response.md @@ -0,0 +1,92 @@ +# PageRulesDiffUpdate200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**PageRuleDiff**](PageRuleDiff.md) | | [optional] +**Message** | Pointer to **NullableString** | | [optional] + +## Methods + +### NewPageRulesDiffUpdate200Response + +`func NewPageRulesDiffUpdate200Response() *PageRulesDiffUpdate200Response` + +NewPageRulesDiffUpdate200Response instantiates a new PageRulesDiffUpdate200Response object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPageRulesDiffUpdate200ResponseWithDefaults + +`func NewPageRulesDiffUpdate200ResponseWithDefaults() *PageRulesDiffUpdate200Response` + +NewPageRulesDiffUpdate200ResponseWithDefaults instantiates a new PageRulesDiffUpdate200Response object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *PageRulesDiffUpdate200Response) GetData() PageRuleDiff` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *PageRulesDiffUpdate200Response) GetDataOk() (*PageRuleDiff, 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 *PageRulesDiffUpdate200Response) SetData(v PageRuleDiff)` + +SetData sets Data field to given value. + +### HasData + +`func (o *PageRulesDiffUpdate200Response) HasData() bool` + +HasData returns a boolean if a field has been set. + +### GetMessage + +`func (o *PageRulesDiffUpdate200Response) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *PageRulesDiffUpdate200Response) GetMessageOk() (*string, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessage + +`func (o *PageRulesDiffUpdate200Response) SetMessage(v string)` + +SetMessage sets Message field to given value. + +### HasMessage + +`func (o *PageRulesDiffUpdate200Response) HasMessage() bool` + +HasMessage returns a boolean if a field has been set. + +### SetMessageNil + +`func (o *PageRulesDiffUpdate200Response) SetMessageNil(b bool)` + + SetMessageNil sets the value for Message to be an explicit nil + +### UnsetMessage +`func (o *PageRulesDiffUpdate200Response) UnsetMessage()` + +UnsetMessage ensures that no value is present for Message, not even an explicit nil + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/PageRulesIndex200Response.md b/docs/PageRulesIndex200Response.md new file mode 100644 index 0000000..7fc9b73 --- /dev/null +++ b/docs/PageRulesIndex200Response.md @@ -0,0 +1,108 @@ +# PageRulesIndex200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**[]PageRuleSummary**](PageRuleSummary.md) | | [optional] +**Links** | Pointer to [**PaginatedResponseLinks**](PaginatedResponseLinks.md) | | [optional] +**Meta** | Pointer to [**PaginatedResponseMeta**](PaginatedResponseMeta.md) | | [optional] + +## Methods + +### NewPageRulesIndex200Response + +`func NewPageRulesIndex200Response() *PageRulesIndex200Response` + +NewPageRulesIndex200Response instantiates a new PageRulesIndex200Response object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPageRulesIndex200ResponseWithDefaults + +`func NewPageRulesIndex200ResponseWithDefaults() *PageRulesIndex200Response` + +NewPageRulesIndex200ResponseWithDefaults instantiates a new PageRulesIndex200Response object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *PageRulesIndex200Response) GetData() []PageRuleSummary` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *PageRulesIndex200Response) GetDataOk() (*[]PageRuleSummary, 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 *PageRulesIndex200Response) SetData(v []PageRuleSummary)` + +SetData sets Data field to given value. + +### HasData + +`func (o *PageRulesIndex200Response) HasData() bool` + +HasData returns a boolean if a field has been set. + +### GetLinks + +`func (o *PageRulesIndex200Response) GetLinks() PaginatedResponseLinks` + +GetLinks returns the Links field if non-nil, zero value otherwise. + +### GetLinksOk + +`func (o *PageRulesIndex200Response) GetLinksOk() (*PaginatedResponseLinks, bool)` + +GetLinksOk returns a tuple with the Links field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLinks + +`func (o *PageRulesIndex200Response) SetLinks(v PaginatedResponseLinks)` + +SetLinks sets Links field to given value. + +### HasLinks + +`func (o *PageRulesIndex200Response) HasLinks() bool` + +HasLinks returns a boolean if a field has been set. + +### GetMeta + +`func (o *PageRulesIndex200Response) GetMeta() PaginatedResponseMeta` + +GetMeta returns the Meta field if non-nil, zero value otherwise. + +### GetMetaOk + +`func (o *PageRulesIndex200Response) GetMetaOk() (*PaginatedResponseMeta, bool)` + +GetMetaOk returns a tuple with the Meta field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMeta + +`func (o *PageRulesIndex200Response) SetMeta(v PaginatedResponseMeta)` + +SetMeta sets Meta field to given value. + +### HasMeta + +`func (o *PageRulesIndex200Response) HasMeta() bool` + +HasMeta returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/PaginatedResponse.md b/docs/PaginatedResponse.md new file mode 100644 index 0000000..8b1bbaa --- /dev/null +++ b/docs/PaginatedResponse.md @@ -0,0 +1,108 @@ +# PaginatedResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to **[]map[string]interface{}** | | [optional] +**Links** | Pointer to [**PaginatedResponseLinks**](PaginatedResponseLinks.md) | | [optional] +**Meta** | Pointer to [**PaginatedResponseMeta**](PaginatedResponseMeta.md) | | [optional] + +## Methods + +### NewPaginatedResponse + +`func NewPaginatedResponse() *PaginatedResponse` + +NewPaginatedResponse instantiates a new PaginatedResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPaginatedResponseWithDefaults + +`func NewPaginatedResponseWithDefaults() *PaginatedResponse` + +NewPaginatedResponseWithDefaults instantiates a new PaginatedResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *PaginatedResponse) GetData() []map[string]interface{}` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *PaginatedResponse) GetDataOk() (*[]map[string]interface{}, 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 *PaginatedResponse) SetData(v []map[string]interface{})` + +SetData sets Data field to given value. + +### HasData + +`func (o *PaginatedResponse) HasData() bool` + +HasData returns a boolean if a field has been set. + +### GetLinks + +`func (o *PaginatedResponse) GetLinks() PaginatedResponseLinks` + +GetLinks returns the Links field if non-nil, zero value otherwise. + +### GetLinksOk + +`func (o *PaginatedResponse) GetLinksOk() (*PaginatedResponseLinks, bool)` + +GetLinksOk returns a tuple with the Links field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLinks + +`func (o *PaginatedResponse) SetLinks(v PaginatedResponseLinks)` + +SetLinks sets Links field to given value. + +### HasLinks + +`func (o *PaginatedResponse) HasLinks() bool` + +HasLinks returns a boolean if a field has been set. + +### GetMeta + +`func (o *PaginatedResponse) GetMeta() PaginatedResponseMeta` + +GetMeta returns the Meta field if non-nil, zero value otherwise. + +### GetMetaOk + +`func (o *PaginatedResponse) GetMetaOk() (*PaginatedResponseMeta, bool)` + +GetMetaOk returns a tuple with the Meta field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMeta + +`func (o *PaginatedResponse) SetMeta(v PaginatedResponseMeta)` + +SetMeta sets Meta field to given value. + +### HasMeta + +`func (o *PaginatedResponse) HasMeta() bool` + +HasMeta returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/PaginatedResponseLinks.md b/docs/PaginatedResponseLinks.md new file mode 100644 index 0000000..85869ff --- /dev/null +++ b/docs/PaginatedResponseLinks.md @@ -0,0 +1,149 @@ +# PaginatedResponseLinks + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**First** | **string** | | +**Last** | Pointer to **NullableString** | | [optional] +**Prev** | **NullableString** | | +**Next** | **NullableString** | | + +## Methods + +### NewPaginatedResponseLinks + +`func NewPaginatedResponseLinks(first string, prev NullableString, next NullableString, ) *PaginatedResponseLinks` + +NewPaginatedResponseLinks instantiates a new PaginatedResponseLinks object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPaginatedResponseLinksWithDefaults + +`func NewPaginatedResponseLinksWithDefaults() *PaginatedResponseLinks` + +NewPaginatedResponseLinksWithDefaults instantiates a new PaginatedResponseLinks object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetFirst + +`func (o *PaginatedResponseLinks) GetFirst() string` + +GetFirst returns the First field if non-nil, zero value otherwise. + +### GetFirstOk + +`func (o *PaginatedResponseLinks) GetFirstOk() (*string, bool)` + +GetFirstOk returns a tuple with the First field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFirst + +`func (o *PaginatedResponseLinks) SetFirst(v string)` + +SetFirst sets First field to given value. + + +### GetLast + +`func (o *PaginatedResponseLinks) GetLast() string` + +GetLast returns the Last field if non-nil, zero value otherwise. + +### GetLastOk + +`func (o *PaginatedResponseLinks) GetLastOk() (*string, bool)` + +GetLastOk returns a tuple with the Last field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLast + +`func (o *PaginatedResponseLinks) SetLast(v string)` + +SetLast sets Last field to given value. + +### HasLast + +`func (o *PaginatedResponseLinks) HasLast() bool` + +HasLast returns a boolean if a field has been set. + +### SetLastNil + +`func (o *PaginatedResponseLinks) SetLastNil(b bool)` + + SetLastNil sets the value for Last to be an explicit nil + +### UnsetLast +`func (o *PaginatedResponseLinks) UnsetLast()` + +UnsetLast ensures that no value is present for Last, not even an explicit nil +### GetPrev + +`func (o *PaginatedResponseLinks) GetPrev() string` + +GetPrev returns the Prev field if non-nil, zero value otherwise. + +### GetPrevOk + +`func (o *PaginatedResponseLinks) GetPrevOk() (*string, bool)` + +GetPrevOk returns a tuple with the Prev field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPrev + +`func (o *PaginatedResponseLinks) SetPrev(v string)` + +SetPrev sets Prev field to given value. + + +### SetPrevNil + +`func (o *PaginatedResponseLinks) SetPrevNil(b bool)` + + SetPrevNil sets the value for Prev to be an explicit nil + +### UnsetPrev +`func (o *PaginatedResponseLinks) UnsetPrev()` + +UnsetPrev ensures that no value is present for Prev, not even an explicit nil +### GetNext + +`func (o *PaginatedResponseLinks) GetNext() string` + +GetNext returns the Next field if non-nil, zero value otherwise. + +### GetNextOk + +`func (o *PaginatedResponseLinks) GetNextOk() (*string, bool)` + +GetNextOk returns a tuple with the Next field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNext + +`func (o *PaginatedResponseLinks) SetNext(v string)` + +SetNext sets Next field to given value. + + +### SetNextNil + +`func (o *PaginatedResponseLinks) SetNextNil(b bool)` + + SetNextNil sets the value for Next to be an explicit nil + +### UnsetNext +`func (o *PaginatedResponseLinks) UnsetNext()` + +UnsetNext ensures that no value is present for Next, not even an explicit nil + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/PaginatedResponseMeta.md b/docs/PaginatedResponseMeta.md new file mode 100644 index 0000000..46e8ece --- /dev/null +++ b/docs/PaginatedResponseMeta.md @@ -0,0 +1,212 @@ +# PaginatedResponseMeta + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CurrentPage** | Pointer to **int32** | | [optional] +**From** | Pointer to **int32** | | [optional] +**LastPage** | Pointer to **int32** | | [optional] +**Path** | Pointer to **string** | | [optional] +**PerPage** | Pointer to **int32** | | [optional] +**To** | Pointer to **int32** | | [optional] +**Total** | Pointer to **int32** | | [optional] + +## Methods + +### NewPaginatedResponseMeta + +`func NewPaginatedResponseMeta() *PaginatedResponseMeta` + +NewPaginatedResponseMeta instantiates a new PaginatedResponseMeta object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPaginatedResponseMetaWithDefaults + +`func NewPaginatedResponseMetaWithDefaults() *PaginatedResponseMeta` + +NewPaginatedResponseMetaWithDefaults instantiates a new PaginatedResponseMeta object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCurrentPage + +`func (o *PaginatedResponseMeta) GetCurrentPage() int32` + +GetCurrentPage returns the CurrentPage field if non-nil, zero value otherwise. + +### GetCurrentPageOk + +`func (o *PaginatedResponseMeta) GetCurrentPageOk() (*int32, bool)` + +GetCurrentPageOk returns a tuple with the CurrentPage field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCurrentPage + +`func (o *PaginatedResponseMeta) SetCurrentPage(v int32)` + +SetCurrentPage sets CurrentPage field to given value. + +### HasCurrentPage + +`func (o *PaginatedResponseMeta) HasCurrentPage() bool` + +HasCurrentPage returns a boolean if a field has been set. + +### GetFrom + +`func (o *PaginatedResponseMeta) GetFrom() int32` + +GetFrom returns the From field if non-nil, zero value otherwise. + +### GetFromOk + +`func (o *PaginatedResponseMeta) GetFromOk() (*int32, bool)` + +GetFromOk returns a tuple with the From field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFrom + +`func (o *PaginatedResponseMeta) SetFrom(v int32)` + +SetFrom sets From field to given value. + +### HasFrom + +`func (o *PaginatedResponseMeta) HasFrom() bool` + +HasFrom returns a boolean if a field has been set. + +### GetLastPage + +`func (o *PaginatedResponseMeta) GetLastPage() int32` + +GetLastPage returns the LastPage field if non-nil, zero value otherwise. + +### GetLastPageOk + +`func (o *PaginatedResponseMeta) GetLastPageOk() (*int32, bool)` + +GetLastPageOk returns a tuple with the LastPage field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastPage + +`func (o *PaginatedResponseMeta) SetLastPage(v int32)` + +SetLastPage sets LastPage field to given value. + +### HasLastPage + +`func (o *PaginatedResponseMeta) HasLastPage() bool` + +HasLastPage returns a boolean if a field has been set. + +### GetPath + +`func (o *PaginatedResponseMeta) GetPath() string` + +GetPath returns the Path field if non-nil, zero value otherwise. + +### GetPathOk + +`func (o *PaginatedResponseMeta) GetPathOk() (*string, bool)` + +GetPathOk returns a tuple with the Path field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPath + +`func (o *PaginatedResponseMeta) SetPath(v string)` + +SetPath sets Path field to given value. + +### HasPath + +`func (o *PaginatedResponseMeta) HasPath() bool` + +HasPath returns a boolean if a field has been set. + +### GetPerPage + +`func (o *PaginatedResponseMeta) GetPerPage() int32` + +GetPerPage returns the PerPage field if non-nil, zero value otherwise. + +### GetPerPageOk + +`func (o *PaginatedResponseMeta) GetPerPageOk() (*int32, bool)` + +GetPerPageOk returns a tuple with the PerPage field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPerPage + +`func (o *PaginatedResponseMeta) SetPerPage(v int32)` + +SetPerPage sets PerPage field to given value. + +### HasPerPage + +`func (o *PaginatedResponseMeta) HasPerPage() bool` + +HasPerPage returns a boolean if a field has been set. + +### GetTo + +`func (o *PaginatedResponseMeta) GetTo() int32` + +GetTo returns the To field if non-nil, zero value otherwise. + +### GetToOk + +`func (o *PaginatedResponseMeta) GetToOk() (*int32, bool)` + +GetToOk returns a tuple with the To field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTo + +`func (o *PaginatedResponseMeta) SetTo(v int32)` + +SetTo sets To field to given value. + +### HasTo + +`func (o *PaginatedResponseMeta) HasTo() bool` + +HasTo returns a boolean if a field has been set. + +### GetTotal + +`func (o *PaginatedResponseMeta) GetTotal() int32` + +GetTotal returns the Total field if non-nil, zero value otherwise. + +### GetTotalOk + +`func (o *PaginatedResponseMeta) 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 *PaginatedResponseMeta) SetTotal(v int32)` + +SetTotal sets Total field to given value. + +### HasTotal + +`func (o *PaginatedResponseMeta) HasTotal() bool` + +HasTotal returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/PlanApi.md b/docs/PlanApi.md new file mode 100644 index 0000000..cad38ab --- /dev/null +++ b/docs/PlanApi.md @@ -0,0 +1,357 @@ +# \PlanApi + +All URIs are relative to *https://napi.arvancloud.ir/cdn/4.0* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DomainsPlans**](PlanApi.md#DomainsPlans) | **Get** /domains/{domain}/plans | Get the list of feature defintions for plans based on different sets +[**DomainsPlansUpdate**](PlanApi.md#DomainsPlansUpdate) | **Put** /domains/{domain}/plan | Update the domain's plan +[**DomainsPlansUsages**](PlanApi.md#DomainsPlansUsages) | **Get** /domains/{domain}/plan/usages | Get usages based on features and an estimated cost +[**DomainsPlansViolations**](PlanApi.md#DomainsPlansViolations) | **Get** /domains/{domain}/plan/violations | Get violations based on plans +[**PlansIndex**](PlanApi.md#PlansIndex) | **Get** /plans | Get the list of feature defintions for plans based on different sets + + + +## DomainsPlans + +> PlanResponse DomainsPlans(ctx, domain).IgnoredPlans(ignoredPlans).Execute() + +Get the list of feature defintions for plans based on different sets + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + ignoredPlans := "0,1" // string | Comma separaterd plan levels to ignore (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.PlanApi.DomainsPlans(context.Background(), domain).IgnoredPlans(ignoredPlans).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `PlanApi.DomainsPlans``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DomainsPlans`: PlanResponse + fmt.Fprintf(os.Stdout, "Response from `PlanApi.DomainsPlans`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDomainsPlansRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **ignoredPlans** | **string** | Comma separaterd plan levels to ignore | + +### Return type + +[**PlanResponse**](PlanResponse.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## DomainsPlansUpdate + +> MessageResponse DomainsPlansUpdate(ctx, domain).PlanUpdate(planUpdate).Execute() + +Update the domain's plan + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + planUpdate := *openapiclient.NewPlanUpdate(int32(123)) // PlanUpdate | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.PlanApi.DomainsPlansUpdate(context.Background(), domain).PlanUpdate(planUpdate).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `PlanApi.DomainsPlansUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DomainsPlansUpdate`: MessageResponse + fmt.Fprintf(os.Stdout, "Response from `PlanApi.DomainsPlansUpdate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDomainsPlansUpdateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **planUpdate** | [**PlanUpdate**](PlanUpdate.md) | | + +### Return type + +[**MessageResponse**](MessageResponse.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## DomainsPlansUsages + +> DomainsPlansUsages200Response DomainsPlansUsages(ctx, domain).TargetPlan(targetPlan).Execute() + +Get usages based on features and an estimated cost + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + targetPlan := int32(56) // int32 | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.PlanApi.DomainsPlansUsages(context.Background(), domain).TargetPlan(targetPlan).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `PlanApi.DomainsPlansUsages``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DomainsPlansUsages`: DomainsPlansUsages200Response + fmt.Fprintf(os.Stdout, "Response from `PlanApi.DomainsPlansUsages`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDomainsPlansUsagesRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **targetPlan** | **int32** | | + +### Return type + +[**DomainsPlansUsages200Response**](DomainsPlansUsages200Response.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## DomainsPlansViolations + +> DomainsPlansViolations200Response DomainsPlansViolations(ctx, domain).Execute() + +Get violations based on plans + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.PlanApi.DomainsPlansViolations(context.Background(), domain).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `PlanApi.DomainsPlansViolations``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DomainsPlansViolations`: DomainsPlansViolations200Response + fmt.Fprintf(os.Stdout, "Response from `PlanApi.DomainsPlansViolations`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDomainsPlansViolationsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**DomainsPlansViolations200Response**](DomainsPlansViolations200Response.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## PlansIndex + +> PlanResponse PlansIndex(ctx).Domain(domain).IgnoredPlans(ignoredPlans).Execute() + +Get the list of feature defintions for plans based on different sets + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := *openapiclient.NewPlansIndexDomainParameter() // PlansIndexDomainParameter | Domain name or id (optional) + ignoredPlans := "0,1" // string | Comma separaterd plan levels to ignore (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.PlanApi.PlansIndex(context.Background()).Domain(domain).IgnoredPlans(ignoredPlans).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `PlanApi.PlansIndex``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `PlansIndex`: PlanResponse + fmt.Fprintf(os.Stdout, "Response from `PlanApi.PlansIndex`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiPlansIndexRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **domain** | [**PlansIndexDomainParameter**](PlansIndexDomainParameter.md) | Domain name or id | + **ignoredPlans** | **string** | Comma separaterd plan levels to ignore | + +### Return type + +[**PlanResponse**](PlanResponse.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + diff --git a/docs/PlanInfo.md b/docs/PlanInfo.md new file mode 100644 index 0000000..bb202e9 --- /dev/null +++ b/docs/PlanInfo.md @@ -0,0 +1,134 @@ +# PlanInfo + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **string** | | [optional] +**MonthlyCost** | Pointer to **float32** | | [optional] +**Discount** | Pointer to **float32** | between 0 to 100 is the percentage of the discount | [optional] +**NeededBalance** | Pointer to **float32** | How much balance the account needs for selected plan | [optional] + +## Methods + +### NewPlanInfo + +`func NewPlanInfo() *PlanInfo` + +NewPlanInfo instantiates a new PlanInfo object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPlanInfoWithDefaults + +`func NewPlanInfoWithDefaults() *PlanInfo` + +NewPlanInfoWithDefaults instantiates a new PlanInfo object +This 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 *PlanInfo) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *PlanInfo) 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 *PlanInfo) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *PlanInfo) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetMonthlyCost + +`func (o *PlanInfo) GetMonthlyCost() float32` + +GetMonthlyCost returns the MonthlyCost field if non-nil, zero value otherwise. + +### GetMonthlyCostOk + +`func (o *PlanInfo) GetMonthlyCostOk() (*float32, bool)` + +GetMonthlyCostOk returns a tuple with the MonthlyCost field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMonthlyCost + +`func (o *PlanInfo) SetMonthlyCost(v float32)` + +SetMonthlyCost sets MonthlyCost field to given value. + +### HasMonthlyCost + +`func (o *PlanInfo) HasMonthlyCost() bool` + +HasMonthlyCost returns a boolean if a field has been set. + +### GetDiscount + +`func (o *PlanInfo) GetDiscount() float32` + +GetDiscount returns the Discount field if non-nil, zero value otherwise. + +### GetDiscountOk + +`func (o *PlanInfo) GetDiscountOk() (*float32, bool)` + +GetDiscountOk returns a tuple with the Discount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDiscount + +`func (o *PlanInfo) SetDiscount(v float32)` + +SetDiscount sets Discount field to given value. + +### HasDiscount + +`func (o *PlanInfo) HasDiscount() bool` + +HasDiscount returns a boolean if a field has been set. + +### GetNeededBalance + +`func (o *PlanInfo) GetNeededBalance() float32` + +GetNeededBalance returns the NeededBalance field if non-nil, zero value otherwise. + +### GetNeededBalanceOk + +`func (o *PlanInfo) GetNeededBalanceOk() (*float32, bool)` + +GetNeededBalanceOk returns a tuple with the NeededBalance field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNeededBalance + +`func (o *PlanInfo) SetNeededBalance(v float32)` + +SetNeededBalance sets NeededBalance field to given value. + +### HasNeededBalance + +`func (o *PlanInfo) HasNeededBalance() bool` + +HasNeededBalance returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/PlanResponse.md b/docs/PlanResponse.md new file mode 100644 index 0000000..fccb4e1 --- /dev/null +++ b/docs/PlanResponse.md @@ -0,0 +1,92 @@ +# PlanResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**FeatureSets**](FeatureSets.md) | | [optional] +**Message** | Pointer to **NullableString** | | [optional] + +## Methods + +### NewPlanResponse + +`func NewPlanResponse() *PlanResponse` + +NewPlanResponse instantiates a new PlanResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPlanResponseWithDefaults + +`func NewPlanResponseWithDefaults() *PlanResponse` + +NewPlanResponseWithDefaults instantiates a new PlanResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *PlanResponse) GetData() FeatureSets` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *PlanResponse) GetDataOk() (*FeatureSets, 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 *PlanResponse) SetData(v FeatureSets)` + +SetData sets Data field to given value. + +### HasData + +`func (o *PlanResponse) HasData() bool` + +HasData returns a boolean if a field has been set. + +### GetMessage + +`func (o *PlanResponse) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *PlanResponse) GetMessageOk() (*string, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessage + +`func (o *PlanResponse) SetMessage(v string)` + +SetMessage sets Message field to given value. + +### HasMessage + +`func (o *PlanResponse) HasMessage() bool` + +HasMessage returns a boolean if a field has been set. + +### SetMessageNil + +`func (o *PlanResponse) SetMessageNil(b bool)` + + SetMessageNil sets the value for Message to be an explicit nil + +### UnsetMessage +`func (o *PlanResponse) UnsetMessage()` + +UnsetMessage ensures that no value is present for Message, not even an explicit nil + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/PlanUpdate.md b/docs/PlanUpdate.md new file mode 100644 index 0000000..1bfce3a --- /dev/null +++ b/docs/PlanUpdate.md @@ -0,0 +1,51 @@ +# PlanUpdate + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**PlanLevel** | **int32** | - `0` - Traffic - `1` - Basic - `2` - Growth - `3` - Professional - `4` - Enterprise | + +## Methods + +### NewPlanUpdate + +`func NewPlanUpdate(planLevel int32, ) *PlanUpdate` + +NewPlanUpdate instantiates a new PlanUpdate object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPlanUpdateWithDefaults + +`func NewPlanUpdateWithDefaults() *PlanUpdate` + +NewPlanUpdateWithDefaults instantiates a new PlanUpdate object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetPlanLevel + +`func (o *PlanUpdate) GetPlanLevel() int32` + +GetPlanLevel returns the PlanLevel field if non-nil, zero value otherwise. + +### GetPlanLevelOk + +`func (o *PlanUpdate) GetPlanLevelOk() (*int32, bool)` + +GetPlanLevelOk returns a tuple with the PlanLevel field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPlanLevel + +`func (o *PlanUpdate) SetPlanLevel(v int32)` + +SetPlanLevel sets PlanLevel field to given value. + + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/PlansIndexDomainParameter.md b/docs/PlansIndexDomainParameter.md new file mode 100644 index 0000000..91d934c --- /dev/null +++ b/docs/PlansIndexDomainParameter.md @@ -0,0 +1,30 @@ +# PlansIndexDomainParameter + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Methods + +### NewPlansIndexDomainParameter + +`func NewPlansIndexDomainParameter() *PlansIndexDomainParameter` + +NewPlansIndexDomainParameter instantiates a new PlansIndexDomainParameter object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPlansIndexDomainParameterWithDefaults + +`func NewPlansIndexDomainParameterWithDefaults() *PlansIndexDomainParameter` + +NewPlansIndexDomainParameterWithDefaults instantiates a new PlansIndexDomainParameter object +This 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]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/PrioritizePool.md b/docs/PrioritizePool.md new file mode 100644 index 0000000..53fb264 --- /dev/null +++ b/docs/PrioritizePool.md @@ -0,0 +1,93 @@ +# PrioritizePool + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**PoolId** | **string** | ID of the pool you want to move | +**AfterPoolId** | **string** | ID of the pool you want to be prior to the selected pool | +**BeforePoolId** | **string** | ID of the pool you want to follow the selected pool | + +## Methods + +### NewPrioritizePool + +`func NewPrioritizePool(poolId string, afterPoolId string, beforePoolId string, ) *PrioritizePool` + +NewPrioritizePool instantiates a new PrioritizePool object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPrioritizePoolWithDefaults + +`func NewPrioritizePoolWithDefaults() *PrioritizePool` + +NewPrioritizePoolWithDefaults instantiates a new PrioritizePool object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetPoolId + +`func (o *PrioritizePool) GetPoolId() string` + +GetPoolId returns the PoolId field if non-nil, zero value otherwise. + +### GetPoolIdOk + +`func (o *PrioritizePool) GetPoolIdOk() (*string, bool)` + +GetPoolIdOk returns a tuple with the PoolId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPoolId + +`func (o *PrioritizePool) SetPoolId(v string)` + +SetPoolId sets PoolId field to given value. + + +### GetAfterPoolId + +`func (o *PrioritizePool) GetAfterPoolId() string` + +GetAfterPoolId returns the AfterPoolId field if non-nil, zero value otherwise. + +### GetAfterPoolIdOk + +`func (o *PrioritizePool) GetAfterPoolIdOk() (*string, bool)` + +GetAfterPoolIdOk returns a tuple with the AfterPoolId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAfterPoolId + +`func (o *PrioritizePool) SetAfterPoolId(v string)` + +SetAfterPoolId sets AfterPoolId field to given value. + + +### GetBeforePoolId + +`func (o *PrioritizePool) GetBeforePoolId() string` + +GetBeforePoolId returns the BeforePoolId field if non-nil, zero value otherwise. + +### GetBeforePoolIdOk + +`func (o *PrioritizePool) GetBeforePoolIdOk() (*string, bool)` + +GetBeforePoolIdOk returns a tuple with the BeforePoolId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBeforePoolId + +`func (o *PrioritizePool) SetBeforePoolId(v string)` + +SetBeforePoolId sets BeforePoolId field to given value. + + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/PrioritizePoolAfter.md b/docs/PrioritizePoolAfter.md new file mode 100644 index 0000000..f52547e --- /dev/null +++ b/docs/PrioritizePoolAfter.md @@ -0,0 +1,72 @@ +# PrioritizePoolAfter + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**PoolId** | **string** | ID of the pool you want to move | +**AfterPoolId** | **string** | ID of the pool you want to be prior to the selected pool | + +## Methods + +### NewPrioritizePoolAfter + +`func NewPrioritizePoolAfter(poolId string, afterPoolId string, ) *PrioritizePoolAfter` + +NewPrioritizePoolAfter instantiates a new PrioritizePoolAfter object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPrioritizePoolAfterWithDefaults + +`func NewPrioritizePoolAfterWithDefaults() *PrioritizePoolAfter` + +NewPrioritizePoolAfterWithDefaults instantiates a new PrioritizePoolAfter object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetPoolId + +`func (o *PrioritizePoolAfter) GetPoolId() string` + +GetPoolId returns the PoolId field if non-nil, zero value otherwise. + +### GetPoolIdOk + +`func (o *PrioritizePoolAfter) GetPoolIdOk() (*string, bool)` + +GetPoolIdOk returns a tuple with the PoolId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPoolId + +`func (o *PrioritizePoolAfter) SetPoolId(v string)` + +SetPoolId sets PoolId field to given value. + + +### GetAfterPoolId + +`func (o *PrioritizePoolAfter) GetAfterPoolId() string` + +GetAfterPoolId returns the AfterPoolId field if non-nil, zero value otherwise. + +### GetAfterPoolIdOk + +`func (o *PrioritizePoolAfter) GetAfterPoolIdOk() (*string, bool)` + +GetAfterPoolIdOk returns a tuple with the AfterPoolId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAfterPoolId + +`func (o *PrioritizePoolAfter) SetAfterPoolId(v string)` + +SetAfterPoolId sets AfterPoolId field to given value. + + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/PrioritizePoolBefore.md b/docs/PrioritizePoolBefore.md new file mode 100644 index 0000000..b6dab5f --- /dev/null +++ b/docs/PrioritizePoolBefore.md @@ -0,0 +1,72 @@ +# PrioritizePoolBefore + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**PoolId** | **string** | ID of the pool you want to move | +**BeforePoolId** | **string** | ID of the pool you want to follow the selected pool | + +## Methods + +### NewPrioritizePoolBefore + +`func NewPrioritizePoolBefore(poolId string, beforePoolId string, ) *PrioritizePoolBefore` + +NewPrioritizePoolBefore instantiates a new PrioritizePoolBefore object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPrioritizePoolBeforeWithDefaults + +`func NewPrioritizePoolBeforeWithDefaults() *PrioritizePoolBefore` + +NewPrioritizePoolBeforeWithDefaults instantiates a new PrioritizePoolBefore object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetPoolId + +`func (o *PrioritizePoolBefore) GetPoolId() string` + +GetPoolId returns the PoolId field if non-nil, zero value otherwise. + +### GetPoolIdOk + +`func (o *PrioritizePoolBefore) GetPoolIdOk() (*string, bool)` + +GetPoolIdOk returns a tuple with the PoolId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPoolId + +`func (o *PrioritizePoolBefore) SetPoolId(v string)` + +SetPoolId sets PoolId field to given value. + + +### GetBeforePoolId + +`func (o *PrioritizePoolBefore) GetBeforePoolId() string` + +GetBeforePoolId returns the BeforePoolId field if non-nil, zero value otherwise. + +### GetBeforePoolIdOk + +`func (o *PrioritizePoolBefore) GetBeforePoolIdOk() (*string, bool)` + +GetBeforePoolIdOk returns a tuple with the BeforePoolId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBeforePoolId + +`func (o *PrioritizePoolBefore) SetBeforePoolId(v string)` + +SetBeforePoolId sets BeforePoolId field to given value. + + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/PurgeTagsIndex200Response.md b/docs/PurgeTagsIndex200Response.md new file mode 100644 index 0000000..ec72211 --- /dev/null +++ b/docs/PurgeTagsIndex200Response.md @@ -0,0 +1,56 @@ +# PurgeTagsIndex200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**DomainPurgeTags**](DomainPurgeTags.md) | | [optional] + +## Methods + +### NewPurgeTagsIndex200Response + +`func NewPurgeTagsIndex200Response() *PurgeTagsIndex200Response` + +NewPurgeTagsIndex200Response instantiates a new PurgeTagsIndex200Response object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPurgeTagsIndex200ResponseWithDefaults + +`func NewPurgeTagsIndex200ResponseWithDefaults() *PurgeTagsIndex200Response` + +NewPurgeTagsIndex200ResponseWithDefaults instantiates a new PurgeTagsIndex200Response object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *PurgeTagsIndex200Response) GetData() DomainPurgeTags` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *PurgeTagsIndex200Response) GetDataOk() (*DomainPurgeTags, 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 *PurgeTagsIndex200Response) SetData(v DomainPurgeTags)` + +SetData sets Data field to given value. + +### HasData + +`func (o *PurgeTagsIndex200Response) HasData() bool` + +HasData returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/RateLimit.md b/docs/RateLimit.md new file mode 100644 index 0000000..3a36ce8 --- /dev/null +++ b/docs/RateLimit.md @@ -0,0 +1,108 @@ +# RateLimit + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DdosDetection** | Pointer to **bool** | | [optional] +**ExcludeSources** | Pointer to **[]string** | | [optional] +**Rules** | Pointer to [**[]RateLimitRuleView**](RateLimitRuleView.md) | | [optional] [readonly] + +## Methods + +### NewRateLimit + +`func NewRateLimit() *RateLimit` + +NewRateLimit instantiates a new RateLimit object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewRateLimitWithDefaults + +`func NewRateLimitWithDefaults() *RateLimit` + +NewRateLimitWithDefaults instantiates a new RateLimit object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetDdosDetection + +`func (o *RateLimit) GetDdosDetection() bool` + +GetDdosDetection returns the DdosDetection field if non-nil, zero value otherwise. + +### GetDdosDetectionOk + +`func (o *RateLimit) GetDdosDetectionOk() (*bool, bool)` + +GetDdosDetectionOk returns a tuple with the DdosDetection field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDdosDetection + +`func (o *RateLimit) SetDdosDetection(v bool)` + +SetDdosDetection sets DdosDetection field to given value. + +### HasDdosDetection + +`func (o *RateLimit) HasDdosDetection() bool` + +HasDdosDetection returns a boolean if a field has been set. + +### GetExcludeSources + +`func (o *RateLimit) GetExcludeSources() []string` + +GetExcludeSources returns the ExcludeSources field if non-nil, zero value otherwise. + +### GetExcludeSourcesOk + +`func (o *RateLimit) GetExcludeSourcesOk() (*[]string, bool)` + +GetExcludeSourcesOk returns a tuple with the ExcludeSources field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExcludeSources + +`func (o *RateLimit) SetExcludeSources(v []string)` + +SetExcludeSources sets ExcludeSources field to given value. + +### HasExcludeSources + +`func (o *RateLimit) HasExcludeSources() bool` + +HasExcludeSources returns a boolean if a field has been set. + +### GetRules + +`func (o *RateLimit) GetRules() []RateLimitRuleView` + +GetRules returns the Rules field if non-nil, zero value otherwise. + +### GetRulesOk + +`func (o *RateLimit) GetRulesOk() (*[]RateLimitRuleView, bool)` + +GetRulesOk returns a tuple with the Rules field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRules + +`func (o *RateLimit) SetRules(v []RateLimitRuleView)` + +SetRules sets Rules field to given value. + +### HasRules + +`func (o *RateLimit) HasRules() bool` + +HasRules returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/RateLimitData.md b/docs/RateLimitData.md new file mode 100644 index 0000000..ed39f50 --- /dev/null +++ b/docs/RateLimitData.md @@ -0,0 +1,56 @@ +# RateLimitData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**RateLimit**](RateLimit.md) | | [optional] + +## Methods + +### NewRateLimitData + +`func NewRateLimitData() *RateLimitData` + +NewRateLimitData instantiates a new RateLimitData object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewRateLimitDataWithDefaults + +`func NewRateLimitDataWithDefaults() *RateLimitData` + +NewRateLimitDataWithDefaults instantiates a new RateLimitData object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *RateLimitData) GetData() RateLimit` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *RateLimitData) GetDataOk() (*RateLimit, 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 *RateLimitData) SetData(v RateLimit)` + +SetData sets Data field to given value. + +### HasData + +`func (o *RateLimitData) HasData() bool` + +HasData returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/RateLimitRule.md b/docs/RateLimitRule.md new file mode 100644 index 0000000..228fd17 --- /dev/null +++ b/docs/RateLimitRule.md @@ -0,0 +1,337 @@ +# RateLimitRule + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ActionDetails** | Pointer to [**ChallengeAction**](ChallengeAction.md) | | [optional] +**Id** | Pointer to **string** | | [optional] [readonly] +**Action** | Pointer to **string** | | [optional] [default to "block"] +**IsEnabled** | Pointer to **bool** | | [optional] +**UrlPattern** | **string** | - `?` matches any single character. - `*` matches any (possibly empty) sequence of characters. - `**` matches the current directory and arbitrary subdirectories. This sequence must form a single path component, so both `**a` and `b**` are invalid and will result in an error. A sequence of more than two consecutive `*` characters is also invalid. - `[...]` matches any character inside the brackets. Character sequences can also specify ranges of characters, as ordered by Unicode, so e.g. `[0-9]` specifies any character between 0 and 9 inclusive. An unclosed bracket is invalid. - `[!...]` is the negation of `[...]`, i.e. it matches any characters not in the brackets. - The metacharacters `?`, `*`, `[`, `] `can be matched by using brackets (e.g. `[?]`). When a `]` occurs immediately following `[` or `[!` then it is interpreted as being part of, rather then ending, the character set, so `]` and NOT `]` can be matched by `[]]` and `[!]]` respectively. The - character can be specified inside a character sequence pattern by placing it at the start or the end, e.g. `[abc-]`. | +**Description** | Pointer to **NullableString** | | [optional] +**ExcludeSources** | Pointer to **[]string** | | [optional] +**Rate** | **int32** | | +**Burst** | Pointer to **int32** | | [optional] +**BlockDuration** | Pointer to **int32** | | [optional] +**TimeDuration** | **int32** | | +**AllowedMethods** | Pointer to **[]string** | | [optional] + +## Methods + +### NewRateLimitRule + +`func NewRateLimitRule(urlPattern string, rate int32, timeDuration int32, ) *RateLimitRule` + +NewRateLimitRule instantiates a new RateLimitRule object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewRateLimitRuleWithDefaults + +`func NewRateLimitRuleWithDefaults() *RateLimitRule` + +NewRateLimitRuleWithDefaults instantiates a new RateLimitRule object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetActionDetails + +`func (o *RateLimitRule) GetActionDetails() ChallengeAction` + +GetActionDetails returns the ActionDetails field if non-nil, zero value otherwise. + +### GetActionDetailsOk + +`func (o *RateLimitRule) GetActionDetailsOk() (*ChallengeAction, bool)` + +GetActionDetailsOk returns a tuple with the ActionDetails field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActionDetails + +`func (o *RateLimitRule) SetActionDetails(v ChallengeAction)` + +SetActionDetails sets ActionDetails field to given value. + +### HasActionDetails + +`func (o *RateLimitRule) HasActionDetails() bool` + +HasActionDetails returns a boolean if a field has been set. + +### GetId + +`func (o *RateLimitRule) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *RateLimitRule) 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 *RateLimitRule) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *RateLimitRule) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetAction + +`func (o *RateLimitRule) GetAction() string` + +GetAction returns the Action field if non-nil, zero value otherwise. + +### GetActionOk + +`func (o *RateLimitRule) GetActionOk() (*string, bool)` + +GetActionOk returns a tuple with the Action field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAction + +`func (o *RateLimitRule) SetAction(v string)` + +SetAction sets Action field to given value. + +### HasAction + +`func (o *RateLimitRule) HasAction() bool` + +HasAction returns a boolean if a field has been set. + +### GetIsEnabled + +`func (o *RateLimitRule) GetIsEnabled() bool` + +GetIsEnabled returns the IsEnabled field if non-nil, zero value otherwise. + +### GetIsEnabledOk + +`func (o *RateLimitRule) GetIsEnabledOk() (*bool, bool)` + +GetIsEnabledOk returns a tuple with the IsEnabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsEnabled + +`func (o *RateLimitRule) SetIsEnabled(v bool)` + +SetIsEnabled sets IsEnabled field to given value. + +### HasIsEnabled + +`func (o *RateLimitRule) HasIsEnabled() bool` + +HasIsEnabled returns a boolean if a field has been set. + +### GetUrlPattern + +`func (o *RateLimitRule) GetUrlPattern() string` + +GetUrlPattern returns the UrlPattern field if non-nil, zero value otherwise. + +### GetUrlPatternOk + +`func (o *RateLimitRule) GetUrlPatternOk() (*string, bool)` + +GetUrlPatternOk returns a tuple with the UrlPattern field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUrlPattern + +`func (o *RateLimitRule) SetUrlPattern(v string)` + +SetUrlPattern sets UrlPattern field to given value. + + +### GetDescription + +`func (o *RateLimitRule) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *RateLimitRule) 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 *RateLimitRule) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *RateLimitRule) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### SetDescriptionNil + +`func (o *RateLimitRule) SetDescriptionNil(b bool)` + + SetDescriptionNil sets the value for Description to be an explicit nil + +### UnsetDescription +`func (o *RateLimitRule) UnsetDescription()` + +UnsetDescription ensures that no value is present for Description, not even an explicit nil +### GetExcludeSources + +`func (o *RateLimitRule) GetExcludeSources() []string` + +GetExcludeSources returns the ExcludeSources field if non-nil, zero value otherwise. + +### GetExcludeSourcesOk + +`func (o *RateLimitRule) GetExcludeSourcesOk() (*[]string, bool)` + +GetExcludeSourcesOk returns a tuple with the ExcludeSources field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExcludeSources + +`func (o *RateLimitRule) SetExcludeSources(v []string)` + +SetExcludeSources sets ExcludeSources field to given value. + +### HasExcludeSources + +`func (o *RateLimitRule) HasExcludeSources() bool` + +HasExcludeSources returns a boolean if a field has been set. + +### GetRate + +`func (o *RateLimitRule) GetRate() int32` + +GetRate returns the Rate field if non-nil, zero value otherwise. + +### GetRateOk + +`func (o *RateLimitRule) GetRateOk() (*int32, bool)` + +GetRateOk returns a tuple with the Rate field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRate + +`func (o *RateLimitRule) SetRate(v int32)` + +SetRate sets Rate field to given value. + + +### GetBurst + +`func (o *RateLimitRule) GetBurst() int32` + +GetBurst returns the Burst field if non-nil, zero value otherwise. + +### GetBurstOk + +`func (o *RateLimitRule) GetBurstOk() (*int32, bool)` + +GetBurstOk returns a tuple with the Burst field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBurst + +`func (o *RateLimitRule) SetBurst(v int32)` + +SetBurst sets Burst field to given value. + +### HasBurst + +`func (o *RateLimitRule) HasBurst() bool` + +HasBurst returns a boolean if a field has been set. + +### GetBlockDuration + +`func (o *RateLimitRule) GetBlockDuration() int32` + +GetBlockDuration returns the BlockDuration field if non-nil, zero value otherwise. + +### GetBlockDurationOk + +`func (o *RateLimitRule) GetBlockDurationOk() (*int32, bool)` + +GetBlockDurationOk returns a tuple with the BlockDuration field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBlockDuration + +`func (o *RateLimitRule) SetBlockDuration(v int32)` + +SetBlockDuration sets BlockDuration field to given value. + +### HasBlockDuration + +`func (o *RateLimitRule) HasBlockDuration() bool` + +HasBlockDuration returns a boolean if a field has been set. + +### GetTimeDuration + +`func (o *RateLimitRule) GetTimeDuration() int32` + +GetTimeDuration returns the TimeDuration field if non-nil, zero value otherwise. + +### GetTimeDurationOk + +`func (o *RateLimitRule) GetTimeDurationOk() (*int32, bool)` + +GetTimeDurationOk returns a tuple with the TimeDuration field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTimeDuration + +`func (o *RateLimitRule) SetTimeDuration(v int32)` + +SetTimeDuration sets TimeDuration field to given value. + + +### GetAllowedMethods + +`func (o *RateLimitRule) GetAllowedMethods() []string` + +GetAllowedMethods returns the AllowedMethods field if non-nil, zero value otherwise. + +### GetAllowedMethodsOk + +`func (o *RateLimitRule) GetAllowedMethodsOk() (*[]string, bool)` + +GetAllowedMethodsOk returns a tuple with the AllowedMethods field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAllowedMethods + +`func (o *RateLimitRule) SetAllowedMethods(v []string)` + +SetAllowedMethods sets AllowedMethods field to given value. + +### HasAllowedMethods + +`func (o *RateLimitRule) HasAllowedMethods() bool` + +HasAllowedMethods returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/RateLimitRuleData.md b/docs/RateLimitRuleData.md new file mode 100644 index 0000000..ef6fb15 --- /dev/null +++ b/docs/RateLimitRuleData.md @@ -0,0 +1,56 @@ +# RateLimitRuleData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**RateLimitRuleView**](RateLimitRuleView.md) | | [optional] + +## Methods + +### NewRateLimitRuleData + +`func NewRateLimitRuleData() *RateLimitRuleData` + +NewRateLimitRuleData instantiates a new RateLimitRuleData object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewRateLimitRuleDataWithDefaults + +`func NewRateLimitRuleDataWithDefaults() *RateLimitRuleData` + +NewRateLimitRuleDataWithDefaults instantiates a new RateLimitRuleData object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *RateLimitRuleData) GetData() RateLimitRuleView` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *RateLimitRuleData) GetDataOk() (*RateLimitRuleView, 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 *RateLimitRuleData) SetData(v RateLimitRuleView)` + +SetData sets Data field to given value. + +### HasData + +`func (o *RateLimitRuleData) HasData() bool` + +HasData returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/RateLimitRuleView.md b/docs/RateLimitRuleView.md new file mode 100644 index 0000000..6e32958 --- /dev/null +++ b/docs/RateLimitRuleView.md @@ -0,0 +1,337 @@ +# RateLimitRuleView + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ActionDetails** | Pointer to **map[string]interface{}** | | [optional] +**Id** | Pointer to **string** | | [optional] [readonly] +**Action** | Pointer to **string** | | [optional] [default to "block"] +**IsEnabled** | Pointer to **bool** | | [optional] +**UrlPattern** | **string** | - `?` matches any single character. - `*` matches any (possibly empty) sequence of characters. - `**` matches the current directory and arbitrary subdirectories. This sequence must form a single path component, so both `**a` and `b**` are invalid and will result in an error. A sequence of more than two consecutive `*` characters is also invalid. - `[...]` matches any character inside the brackets. Character sequences can also specify ranges of characters, as ordered by Unicode, so e.g. `[0-9]` specifies any character between 0 and 9 inclusive. An unclosed bracket is invalid. - `[!...]` is the negation of `[...]`, i.e. it matches any characters not in the brackets. - The metacharacters `?`, `*`, `[`, `] `can be matched by using brackets (e.g. `[?]`). When a `]` occurs immediately following `[` or `[!` then it is interpreted as being part of, rather then ending, the character set, so `]` and NOT `]` can be matched by `[]]` and `[!]]` respectively. The - character can be specified inside a character sequence pattern by placing it at the start or the end, e.g. `[abc-]`. | +**Description** | Pointer to **NullableString** | | [optional] +**ExcludeSources** | Pointer to **[]string** | | [optional] +**Rate** | **int32** | | +**Burst** | Pointer to **int32** | | [optional] +**BlockDuration** | Pointer to **int32** | | [optional] +**TimeDuration** | **int32** | | +**AllowedMethods** | Pointer to **[]string** | | [optional] + +## Methods + +### NewRateLimitRuleView + +`func NewRateLimitRuleView(urlPattern string, rate int32, timeDuration int32, ) *RateLimitRuleView` + +NewRateLimitRuleView instantiates a new RateLimitRuleView object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewRateLimitRuleViewWithDefaults + +`func NewRateLimitRuleViewWithDefaults() *RateLimitRuleView` + +NewRateLimitRuleViewWithDefaults instantiates a new RateLimitRuleView object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetActionDetails + +`func (o *RateLimitRuleView) GetActionDetails() map[string]interface{}` + +GetActionDetails returns the ActionDetails field if non-nil, zero value otherwise. + +### GetActionDetailsOk + +`func (o *RateLimitRuleView) GetActionDetailsOk() (*map[string]interface{}, bool)` + +GetActionDetailsOk returns a tuple with the ActionDetails field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActionDetails + +`func (o *RateLimitRuleView) SetActionDetails(v map[string]interface{})` + +SetActionDetails sets ActionDetails field to given value. + +### HasActionDetails + +`func (o *RateLimitRuleView) HasActionDetails() bool` + +HasActionDetails returns a boolean if a field has been set. + +### GetId + +`func (o *RateLimitRuleView) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *RateLimitRuleView) 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 *RateLimitRuleView) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *RateLimitRuleView) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetAction + +`func (o *RateLimitRuleView) GetAction() string` + +GetAction returns the Action field if non-nil, zero value otherwise. + +### GetActionOk + +`func (o *RateLimitRuleView) GetActionOk() (*string, bool)` + +GetActionOk returns a tuple with the Action field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAction + +`func (o *RateLimitRuleView) SetAction(v string)` + +SetAction sets Action field to given value. + +### HasAction + +`func (o *RateLimitRuleView) HasAction() bool` + +HasAction returns a boolean if a field has been set. + +### GetIsEnabled + +`func (o *RateLimitRuleView) GetIsEnabled() bool` + +GetIsEnabled returns the IsEnabled field if non-nil, zero value otherwise. + +### GetIsEnabledOk + +`func (o *RateLimitRuleView) GetIsEnabledOk() (*bool, bool)` + +GetIsEnabledOk returns a tuple with the IsEnabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsEnabled + +`func (o *RateLimitRuleView) SetIsEnabled(v bool)` + +SetIsEnabled sets IsEnabled field to given value. + +### HasIsEnabled + +`func (o *RateLimitRuleView) HasIsEnabled() bool` + +HasIsEnabled returns a boolean if a field has been set. + +### GetUrlPattern + +`func (o *RateLimitRuleView) GetUrlPattern() string` + +GetUrlPattern returns the UrlPattern field if non-nil, zero value otherwise. + +### GetUrlPatternOk + +`func (o *RateLimitRuleView) GetUrlPatternOk() (*string, bool)` + +GetUrlPatternOk returns a tuple with the UrlPattern field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUrlPattern + +`func (o *RateLimitRuleView) SetUrlPattern(v string)` + +SetUrlPattern sets UrlPattern field to given value. + + +### GetDescription + +`func (o *RateLimitRuleView) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *RateLimitRuleView) 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 *RateLimitRuleView) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *RateLimitRuleView) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### SetDescriptionNil + +`func (o *RateLimitRuleView) SetDescriptionNil(b bool)` + + SetDescriptionNil sets the value for Description to be an explicit nil + +### UnsetDescription +`func (o *RateLimitRuleView) UnsetDescription()` + +UnsetDescription ensures that no value is present for Description, not even an explicit nil +### GetExcludeSources + +`func (o *RateLimitRuleView) GetExcludeSources() []string` + +GetExcludeSources returns the ExcludeSources field if non-nil, zero value otherwise. + +### GetExcludeSourcesOk + +`func (o *RateLimitRuleView) GetExcludeSourcesOk() (*[]string, bool)` + +GetExcludeSourcesOk returns a tuple with the ExcludeSources field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExcludeSources + +`func (o *RateLimitRuleView) SetExcludeSources(v []string)` + +SetExcludeSources sets ExcludeSources field to given value. + +### HasExcludeSources + +`func (o *RateLimitRuleView) HasExcludeSources() bool` + +HasExcludeSources returns a boolean if a field has been set. + +### GetRate + +`func (o *RateLimitRuleView) GetRate() int32` + +GetRate returns the Rate field if non-nil, zero value otherwise. + +### GetRateOk + +`func (o *RateLimitRuleView) GetRateOk() (*int32, bool)` + +GetRateOk returns a tuple with the Rate field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRate + +`func (o *RateLimitRuleView) SetRate(v int32)` + +SetRate sets Rate field to given value. + + +### GetBurst + +`func (o *RateLimitRuleView) GetBurst() int32` + +GetBurst returns the Burst field if non-nil, zero value otherwise. + +### GetBurstOk + +`func (o *RateLimitRuleView) GetBurstOk() (*int32, bool)` + +GetBurstOk returns a tuple with the Burst field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBurst + +`func (o *RateLimitRuleView) SetBurst(v int32)` + +SetBurst sets Burst field to given value. + +### HasBurst + +`func (o *RateLimitRuleView) HasBurst() bool` + +HasBurst returns a boolean if a field has been set. + +### GetBlockDuration + +`func (o *RateLimitRuleView) GetBlockDuration() int32` + +GetBlockDuration returns the BlockDuration field if non-nil, zero value otherwise. + +### GetBlockDurationOk + +`func (o *RateLimitRuleView) GetBlockDurationOk() (*int32, bool)` + +GetBlockDurationOk returns a tuple with the BlockDuration field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBlockDuration + +`func (o *RateLimitRuleView) SetBlockDuration(v int32)` + +SetBlockDuration sets BlockDuration field to given value. + +### HasBlockDuration + +`func (o *RateLimitRuleView) HasBlockDuration() bool` + +HasBlockDuration returns a boolean if a field has been set. + +### GetTimeDuration + +`func (o *RateLimitRuleView) GetTimeDuration() int32` + +GetTimeDuration returns the TimeDuration field if non-nil, zero value otherwise. + +### GetTimeDurationOk + +`func (o *RateLimitRuleView) GetTimeDurationOk() (*int32, bool)` + +GetTimeDurationOk returns a tuple with the TimeDuration field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTimeDuration + +`func (o *RateLimitRuleView) SetTimeDuration(v int32)` + +SetTimeDuration sets TimeDuration field to given value. + + +### GetAllowedMethods + +`func (o *RateLimitRuleView) GetAllowedMethods() []string` + +GetAllowedMethods returns the AllowedMethods field if non-nil, zero value otherwise. + +### GetAllowedMethodsOk + +`func (o *RateLimitRuleView) GetAllowedMethodsOk() (*[]string, bool)` + +GetAllowedMethodsOk returns a tuple with the AllowedMethods field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAllowedMethods + +`func (o *RateLimitRuleView) SetAllowedMethods(v []string)` + +SetAllowedMethods sets AllowedMethods field to given value. + +### HasAllowedMethods + +`func (o *RateLimitRuleView) HasAllowedMethods() bool` + +HasAllowedMethods returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/RateLimitSettings.md b/docs/RateLimitSettings.md new file mode 100644 index 0000000..5a32296 --- /dev/null +++ b/docs/RateLimitSettings.md @@ -0,0 +1,82 @@ +# RateLimitSettings + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DdosDetection** | Pointer to **bool** | | [optional] +**ExcludeSources** | Pointer to **[]string** | | [optional] + +## Methods + +### NewRateLimitSettings + +`func NewRateLimitSettings() *RateLimitSettings` + +NewRateLimitSettings instantiates a new RateLimitSettings object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewRateLimitSettingsWithDefaults + +`func NewRateLimitSettingsWithDefaults() *RateLimitSettings` + +NewRateLimitSettingsWithDefaults instantiates a new RateLimitSettings object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetDdosDetection + +`func (o *RateLimitSettings) GetDdosDetection() bool` + +GetDdosDetection returns the DdosDetection field if non-nil, zero value otherwise. + +### GetDdosDetectionOk + +`func (o *RateLimitSettings) GetDdosDetectionOk() (*bool, bool)` + +GetDdosDetectionOk returns a tuple with the DdosDetection field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDdosDetection + +`func (o *RateLimitSettings) SetDdosDetection(v bool)` + +SetDdosDetection sets DdosDetection field to given value. + +### HasDdosDetection + +`func (o *RateLimitSettings) HasDdosDetection() bool` + +HasDdosDetection returns a boolean if a field has been set. + +### GetExcludeSources + +`func (o *RateLimitSettings) GetExcludeSources() []string` + +GetExcludeSources returns the ExcludeSources field if non-nil, zero value otherwise. + +### GetExcludeSourcesOk + +`func (o *RateLimitSettings) GetExcludeSourcesOk() (*[]string, bool)` + +GetExcludeSourcesOk returns a tuple with the ExcludeSources field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExcludeSources + +`func (o *RateLimitSettings) SetExcludeSources(v []string)` + +SetExcludeSources sets ExcludeSources field to given value. + +### HasExcludeSources + +`func (o *RateLimitSettings) HasExcludeSources() bool` + +HasExcludeSources returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/RateLimitSettingsData.md b/docs/RateLimitSettingsData.md new file mode 100644 index 0000000..8ecc488 --- /dev/null +++ b/docs/RateLimitSettingsData.md @@ -0,0 +1,56 @@ +# RateLimitSettingsData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**RateLimitSettings**](RateLimitSettings.md) | | [optional] + +## Methods + +### NewRateLimitSettingsData + +`func NewRateLimitSettingsData() *RateLimitSettingsData` + +NewRateLimitSettingsData instantiates a new RateLimitSettingsData object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewRateLimitSettingsDataWithDefaults + +`func NewRateLimitSettingsDataWithDefaults() *RateLimitSettingsData` + +NewRateLimitSettingsDataWithDefaults instantiates a new RateLimitSettingsData object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *RateLimitSettingsData) GetData() RateLimitSettings` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *RateLimitSettingsData) GetDataOk() (*RateLimitSettings, 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 *RateLimitSettingsData) SetData(v RateLimitSettings)` + +SetData sets Data field to given value. + +### HasData + +`func (o *RateLimitSettingsData) HasData() bool` + +HasData returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/RateLimitingApi.md b/docs/RateLimitingApi.md new file mode 100644 index 0000000..c26c380 --- /dev/null +++ b/docs/RateLimitingApi.md @@ -0,0 +1,727 @@ +# \RateLimitingApi + +All URIs are relative to *https://napi.arvancloud.ir/cdn/4.0* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**RateLimitingIndex**](RateLimitingApi.md#RateLimitingIndex) | **Get** /domains/{domain}/rate-limit | Get Rate-Limit settings +[**RateLimitingReprioritize**](RateLimitingApi.md#RateLimitingReprioritize) | **Post** /domains/{domain}/rate-limit/actions/reprioritize | Change priority of Rate limiting's rules +[**RateLimitingRulesDestroy**](RateLimitingApi.md#RateLimitingRulesDestroy) | **Delete** /domains/{domain}/rate-limit/rules/{id} | Delete Rate limiting's rule +[**RateLimitingRulesIndex**](RateLimitingApi.md#RateLimitingRulesIndex) | **Get** /domains/{domain}/rate-limit/rules | Get Rate limiting rules +[**RateLimitingRulesShow**](RateLimitingApi.md#RateLimitingRulesShow) | **Get** /domains/{domain}/rate-limit/rules/{id} | Get Rate limiting's rule information +[**RateLimitingRulesStore**](RateLimitingApi.md#RateLimitingRulesStore) | **Post** /domains/{domain}/rate-limit/rules | Store new Rate limiting rule +[**RateLimitingRulesUpdate**](RateLimitingApi.md#RateLimitingRulesUpdate) | **Patch** /domains/{domain}/rate-limit/rules/{id} | Update the Rate limiting's rule +[**RateLimitingSettingsIndex**](RateLimitingApi.md#RateLimitingSettingsIndex) | **Get** /domains/{domain}/rate-limit/settings | Get Rate limiting settings +[**RateLimitingSettingsUpdate**](RateLimitingApi.md#RateLimitingSettingsUpdate) | **Patch** /domains/{domain}/rate-limit/settings | Update domain's Rate limiting configuration +[**RateLimitingUpdate**](RateLimitingApi.md#RateLimitingUpdate) | **Patch** /domains/{domain}/rate-limit | Update domain's Rate limiting configuration + + + +## RateLimitingIndex + +> RateLimitData RateLimitingIndex(ctx, domain).Execute() + +Get Rate-Limit settings + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.RateLimitingApi.RateLimitingIndex(context.Background(), domain).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RateLimitingApi.RateLimitingIndex``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RateLimitingIndex`: RateLimitData + fmt.Fprintf(os.Stdout, "Response from `RateLimitingApi.RateLimitingIndex`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiRateLimitingIndexRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**RateLimitData**](RateLimitData.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## RateLimitingReprioritize + +> MessageResponse RateLimitingReprioritize(ctx, domain).ReprioritizeRuleRequest(reprioritizeRuleRequest).Execute() + +Change priority of Rate limiting's rules + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + reprioritizeRuleRequest := *openapiclient.NewReprioritizeRuleRequest("RuleId_example") // ReprioritizeRuleRequest | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.RateLimitingApi.RateLimitingReprioritize(context.Background(), domain).ReprioritizeRuleRequest(reprioritizeRuleRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RateLimitingApi.RateLimitingReprioritize``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RateLimitingReprioritize`: MessageResponse + fmt.Fprintf(os.Stdout, "Response from `RateLimitingApi.RateLimitingReprioritize`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiRateLimitingReprioritizeRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **reprioritizeRuleRequest** | [**ReprioritizeRuleRequest**](ReprioritizeRuleRequest.md) | | + +### Return type + +[**MessageResponse**](MessageResponse.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## RateLimitingRulesDestroy + +> MessageResponse RateLimitingRulesDestroy(ctx, domain, id).Execute() + +Delete Rate limiting's rule + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.RateLimitingApi.RateLimitingRulesDestroy(context.Background(), domain, id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RateLimitingApi.RateLimitingRulesDestroy``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RateLimitingRulesDestroy`: MessageResponse + fmt.Fprintf(os.Stdout, "Response from `RateLimitingApi.RateLimitingRulesDestroy`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | +**id** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiRateLimitingRulesDestroyRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + +[**MessageResponse**](MessageResponse.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## RateLimitingRulesIndex + +> RateLimitingRulesIndex200Response RateLimitingRulesIndex(ctx, domain).PerPage(perPage).OrderBy(orderBy).OrderType(orderType).Search(search).Execute() + +Get Rate limiting rules + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + perPage := int32(56) // int32 | (optional) + orderBy := "orderBy_example" // string | (optional) + orderType := "orderType_example" // string | (optional) + search := "search_example" // string | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.RateLimitingApi.RateLimitingRulesIndex(context.Background(), domain).PerPage(perPage).OrderBy(orderBy).OrderType(orderType).Search(search).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RateLimitingApi.RateLimitingRulesIndex``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RateLimitingRulesIndex`: RateLimitingRulesIndex200Response + fmt.Fprintf(os.Stdout, "Response from `RateLimitingApi.RateLimitingRulesIndex`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiRateLimitingRulesIndexRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **perPage** | **int32** | | + **orderBy** | **string** | | + **orderType** | **string** | | + **search** | **string** | | + +### Return type + +[**RateLimitingRulesIndex200Response**](RateLimitingRulesIndex200Response.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## RateLimitingRulesShow + +> RateLimitRuleData RateLimitingRulesShow(ctx, domain, id).Execute() + +Get Rate limiting's rule information + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.RateLimitingApi.RateLimitingRulesShow(context.Background(), domain, id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RateLimitingApi.RateLimitingRulesShow``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RateLimitingRulesShow`: RateLimitRuleData + fmt.Fprintf(os.Stdout, "Response from `RateLimitingApi.RateLimitingRulesShow`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | +**id** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiRateLimitingRulesShowRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + +[**RateLimitRuleData**](RateLimitRuleData.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## RateLimitingRulesStore + +> RateLimitRuleData RateLimitingRulesStore(ctx, domain).RateLimitRule(rateLimitRule).Execute() + +Store new Rate limiting rule + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + rateLimitRule := *openapiclient.NewRateLimitRule("UrlPattern_example", int32(123), int32(123)) // RateLimitRule | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.RateLimitingApi.RateLimitingRulesStore(context.Background(), domain).RateLimitRule(rateLimitRule).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RateLimitingApi.RateLimitingRulesStore``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RateLimitingRulesStore`: RateLimitRuleData + fmt.Fprintf(os.Stdout, "Response from `RateLimitingApi.RateLimitingRulesStore`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiRateLimitingRulesStoreRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **rateLimitRule** | [**RateLimitRule**](RateLimitRule.md) | | + +### Return type + +[**RateLimitRuleData**](RateLimitRuleData.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## RateLimitingRulesUpdate + +> RateLimitingRulesUpdate200Response RateLimitingRulesUpdate(ctx, domain, id).RateLimitRule(rateLimitRule).Execute() + +Update the Rate limiting's rule + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | + rateLimitRule := *openapiclient.NewRateLimitRule("UrlPattern_example", int32(123), int32(123)) // RateLimitRule | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.RateLimitingApi.RateLimitingRulesUpdate(context.Background(), domain, id).RateLimitRule(rateLimitRule).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RateLimitingApi.RateLimitingRulesUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RateLimitingRulesUpdate`: RateLimitingRulesUpdate200Response + fmt.Fprintf(os.Stdout, "Response from `RateLimitingApi.RateLimitingRulesUpdate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | +**id** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiRateLimitingRulesUpdateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **rateLimitRule** | [**RateLimitRule**](RateLimitRule.md) | | + +### Return type + +[**RateLimitingRulesUpdate200Response**](RateLimitingRulesUpdate200Response.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## RateLimitingSettingsIndex + +> RateLimitSettingsData RateLimitingSettingsIndex(ctx, domain).Execute() + +Get Rate limiting settings + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.RateLimitingApi.RateLimitingSettingsIndex(context.Background(), domain).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RateLimitingApi.RateLimitingSettingsIndex``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RateLimitingSettingsIndex`: RateLimitSettingsData + fmt.Fprintf(os.Stdout, "Response from `RateLimitingApi.RateLimitingSettingsIndex`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiRateLimitingSettingsIndexRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**RateLimitSettingsData**](RateLimitSettingsData.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## RateLimitingSettingsUpdate + +> RateLimitingSettingsUpdate200Response RateLimitingSettingsUpdate(ctx, domain).RateLimitSettings(rateLimitSettings).Execute() + +Update domain's Rate limiting configuration + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + rateLimitSettings := *openapiclient.NewRateLimitSettings() // RateLimitSettings | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.RateLimitingApi.RateLimitingSettingsUpdate(context.Background(), domain).RateLimitSettings(rateLimitSettings).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RateLimitingApi.RateLimitingSettingsUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RateLimitingSettingsUpdate`: RateLimitingSettingsUpdate200Response + fmt.Fprintf(os.Stdout, "Response from `RateLimitingApi.RateLimitingSettingsUpdate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiRateLimitingSettingsUpdateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **rateLimitSettings** | [**RateLimitSettings**](RateLimitSettings.md) | | + +### Return type + +[**RateLimitingSettingsUpdate200Response**](RateLimitingSettingsUpdate200Response.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## RateLimitingUpdate + +> RateLimitingUpdate200Response RateLimitingUpdate(ctx, domain).RateLimit(rateLimit).Execute() + +Update domain's Rate limiting configuration + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + rateLimit := *openapiclient.NewRateLimit() // RateLimit | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.RateLimitingApi.RateLimitingUpdate(context.Background(), domain).RateLimit(rateLimit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RateLimitingApi.RateLimitingUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RateLimitingUpdate`: RateLimitingUpdate200Response + fmt.Fprintf(os.Stdout, "Response from `RateLimitingApi.RateLimitingUpdate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiRateLimitingUpdateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **rateLimit** | [**RateLimit**](RateLimit.md) | | + +### Return type + +[**RateLimitingUpdate200Response**](RateLimitingUpdate200Response.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + diff --git a/docs/RateLimitingRulesIndex200Response.md b/docs/RateLimitingRulesIndex200Response.md new file mode 100644 index 0000000..b254c7d --- /dev/null +++ b/docs/RateLimitingRulesIndex200Response.md @@ -0,0 +1,108 @@ +# RateLimitingRulesIndex200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**[]RateLimitRuleView**](RateLimitRuleView.md) | | [optional] +**Links** | Pointer to [**PaginatedResponseLinks**](PaginatedResponseLinks.md) | | [optional] +**Meta** | Pointer to [**PaginatedResponseMeta**](PaginatedResponseMeta.md) | | [optional] + +## Methods + +### NewRateLimitingRulesIndex200Response + +`func NewRateLimitingRulesIndex200Response() *RateLimitingRulesIndex200Response` + +NewRateLimitingRulesIndex200Response instantiates a new RateLimitingRulesIndex200Response object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewRateLimitingRulesIndex200ResponseWithDefaults + +`func NewRateLimitingRulesIndex200ResponseWithDefaults() *RateLimitingRulesIndex200Response` + +NewRateLimitingRulesIndex200ResponseWithDefaults instantiates a new RateLimitingRulesIndex200Response object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *RateLimitingRulesIndex200Response) GetData() []RateLimitRuleView` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *RateLimitingRulesIndex200Response) GetDataOk() (*[]RateLimitRuleView, 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 *RateLimitingRulesIndex200Response) SetData(v []RateLimitRuleView)` + +SetData sets Data field to given value. + +### HasData + +`func (o *RateLimitingRulesIndex200Response) HasData() bool` + +HasData returns a boolean if a field has been set. + +### GetLinks + +`func (o *RateLimitingRulesIndex200Response) GetLinks() PaginatedResponseLinks` + +GetLinks returns the Links field if non-nil, zero value otherwise. + +### GetLinksOk + +`func (o *RateLimitingRulesIndex200Response) GetLinksOk() (*PaginatedResponseLinks, bool)` + +GetLinksOk returns a tuple with the Links field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLinks + +`func (o *RateLimitingRulesIndex200Response) SetLinks(v PaginatedResponseLinks)` + +SetLinks sets Links field to given value. + +### HasLinks + +`func (o *RateLimitingRulesIndex200Response) HasLinks() bool` + +HasLinks returns a boolean if a field has been set. + +### GetMeta + +`func (o *RateLimitingRulesIndex200Response) GetMeta() PaginatedResponseMeta` + +GetMeta returns the Meta field if non-nil, zero value otherwise. + +### GetMetaOk + +`func (o *RateLimitingRulesIndex200Response) GetMetaOk() (*PaginatedResponseMeta, bool)` + +GetMetaOk returns a tuple with the Meta field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMeta + +`func (o *RateLimitingRulesIndex200Response) SetMeta(v PaginatedResponseMeta)` + +SetMeta sets Meta field to given value. + +### HasMeta + +`func (o *RateLimitingRulesIndex200Response) HasMeta() bool` + +HasMeta returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/RateLimitingRulesUpdate200Response.md b/docs/RateLimitingRulesUpdate200Response.md new file mode 100644 index 0000000..19cf621 --- /dev/null +++ b/docs/RateLimitingRulesUpdate200Response.md @@ -0,0 +1,92 @@ +# RateLimitingRulesUpdate200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**RateLimitRuleView**](RateLimitRuleView.md) | | [optional] +**Message** | Pointer to **NullableString** | | [optional] + +## Methods + +### NewRateLimitingRulesUpdate200Response + +`func NewRateLimitingRulesUpdate200Response() *RateLimitingRulesUpdate200Response` + +NewRateLimitingRulesUpdate200Response instantiates a new RateLimitingRulesUpdate200Response object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewRateLimitingRulesUpdate200ResponseWithDefaults + +`func NewRateLimitingRulesUpdate200ResponseWithDefaults() *RateLimitingRulesUpdate200Response` + +NewRateLimitingRulesUpdate200ResponseWithDefaults instantiates a new RateLimitingRulesUpdate200Response object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *RateLimitingRulesUpdate200Response) GetData() RateLimitRuleView` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *RateLimitingRulesUpdate200Response) GetDataOk() (*RateLimitRuleView, 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 *RateLimitingRulesUpdate200Response) SetData(v RateLimitRuleView)` + +SetData sets Data field to given value. + +### HasData + +`func (o *RateLimitingRulesUpdate200Response) HasData() bool` + +HasData returns a boolean if a field has been set. + +### GetMessage + +`func (o *RateLimitingRulesUpdate200Response) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *RateLimitingRulesUpdate200Response) GetMessageOk() (*string, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessage + +`func (o *RateLimitingRulesUpdate200Response) SetMessage(v string)` + +SetMessage sets Message field to given value. + +### HasMessage + +`func (o *RateLimitingRulesUpdate200Response) HasMessage() bool` + +HasMessage returns a boolean if a field has been set. + +### SetMessageNil + +`func (o *RateLimitingRulesUpdate200Response) SetMessageNil(b bool)` + + SetMessageNil sets the value for Message to be an explicit nil + +### UnsetMessage +`func (o *RateLimitingRulesUpdate200Response) UnsetMessage()` + +UnsetMessage ensures that no value is present for Message, not even an explicit nil + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/RateLimitingSettingsUpdate200Response.md b/docs/RateLimitingSettingsUpdate200Response.md new file mode 100644 index 0000000..28025c5 --- /dev/null +++ b/docs/RateLimitingSettingsUpdate200Response.md @@ -0,0 +1,92 @@ +# RateLimitingSettingsUpdate200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**RateLimitSettings**](RateLimitSettings.md) | | [optional] +**Message** | Pointer to **NullableString** | | [optional] + +## Methods + +### NewRateLimitingSettingsUpdate200Response + +`func NewRateLimitingSettingsUpdate200Response() *RateLimitingSettingsUpdate200Response` + +NewRateLimitingSettingsUpdate200Response instantiates a new RateLimitingSettingsUpdate200Response object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewRateLimitingSettingsUpdate200ResponseWithDefaults + +`func NewRateLimitingSettingsUpdate200ResponseWithDefaults() *RateLimitingSettingsUpdate200Response` + +NewRateLimitingSettingsUpdate200ResponseWithDefaults instantiates a new RateLimitingSettingsUpdate200Response object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *RateLimitingSettingsUpdate200Response) GetData() RateLimitSettings` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *RateLimitingSettingsUpdate200Response) GetDataOk() (*RateLimitSettings, 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 *RateLimitingSettingsUpdate200Response) SetData(v RateLimitSettings)` + +SetData sets Data field to given value. + +### HasData + +`func (o *RateLimitingSettingsUpdate200Response) HasData() bool` + +HasData returns a boolean if a field has been set. + +### GetMessage + +`func (o *RateLimitingSettingsUpdate200Response) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *RateLimitingSettingsUpdate200Response) GetMessageOk() (*string, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessage + +`func (o *RateLimitingSettingsUpdate200Response) SetMessage(v string)` + +SetMessage sets Message field to given value. + +### HasMessage + +`func (o *RateLimitingSettingsUpdate200Response) HasMessage() bool` + +HasMessage returns a boolean if a field has been set. + +### SetMessageNil + +`func (o *RateLimitingSettingsUpdate200Response) SetMessageNil(b bool)` + + SetMessageNil sets the value for Message to be an explicit nil + +### UnsetMessage +`func (o *RateLimitingSettingsUpdate200Response) UnsetMessage()` + +UnsetMessage ensures that no value is present for Message, not even an explicit nil + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/RateLimitingUpdate200Response.md b/docs/RateLimitingUpdate200Response.md new file mode 100644 index 0000000..2d82500 --- /dev/null +++ b/docs/RateLimitingUpdate200Response.md @@ -0,0 +1,92 @@ +# RateLimitingUpdate200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**RateLimit**](RateLimit.md) | | [optional] +**Message** | Pointer to **NullableString** | | [optional] + +## Methods + +### NewRateLimitingUpdate200Response + +`func NewRateLimitingUpdate200Response() *RateLimitingUpdate200Response` + +NewRateLimitingUpdate200Response instantiates a new RateLimitingUpdate200Response object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewRateLimitingUpdate200ResponseWithDefaults + +`func NewRateLimitingUpdate200ResponseWithDefaults() *RateLimitingUpdate200Response` + +NewRateLimitingUpdate200ResponseWithDefaults instantiates a new RateLimitingUpdate200Response object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *RateLimitingUpdate200Response) GetData() RateLimit` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *RateLimitingUpdate200Response) GetDataOk() (*RateLimit, 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 *RateLimitingUpdate200Response) SetData(v RateLimit)` + +SetData sets Data field to given value. + +### HasData + +`func (o *RateLimitingUpdate200Response) HasData() bool` + +HasData returns a boolean if a field has been set. + +### GetMessage + +`func (o *RateLimitingUpdate200Response) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *RateLimitingUpdate200Response) GetMessageOk() (*string, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessage + +`func (o *RateLimitingUpdate200Response) SetMessage(v string)` + +SetMessage sets Message field to given value. + +### HasMessage + +`func (o *RateLimitingUpdate200Response) HasMessage() bool` + +HasMessage returns a boolean if a field has been set. + +### SetMessageNil + +`func (o *RateLimitingUpdate200Response) SetMessageNil(b bool)` + + SetMessageNil sets the value for Message to be an explicit nil + +### UnsetMessage +`func (o *RateLimitingUpdate200Response) UnsetMessage()` + +UnsetMessage ensures that no value is present for Message, not even an explicit nil + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/Redirect.md b/docs/Redirect.md new file mode 100644 index 0000000..ac7bbcb --- /dev/null +++ b/docs/Redirect.md @@ -0,0 +1,56 @@ +# Redirect + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FRedirectToWww** | Pointer to **string** | | [optional] + +## Methods + +### NewRedirect + +`func NewRedirect() *Redirect` + +NewRedirect instantiates a new Redirect object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewRedirectWithDefaults + +`func NewRedirectWithDefaults() *Redirect` + +NewRedirectWithDefaults instantiates a new Redirect object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetFRedirectToWww + +`func (o *Redirect) GetFRedirectToWww() string` + +GetFRedirectToWww returns the FRedirectToWww field if non-nil, zero value otherwise. + +### GetFRedirectToWwwOk + +`func (o *Redirect) GetFRedirectToWwwOk() (*string, bool)` + +GetFRedirectToWwwOk returns a tuple with the FRedirectToWww field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFRedirectToWww + +`func (o *Redirect) SetFRedirectToWww(v string)` + +SetFRedirectToWww sets FRedirectToWww field to given value. + +### HasFRedirectToWww + +`func (o *Redirect) HasFRedirectToWww() bool` + +HasFRedirectToWww returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/RedirectApi.md b/docs/RedirectApi.md new file mode 100644 index 0000000..96ea959 --- /dev/null +++ b/docs/RedirectApi.md @@ -0,0 +1,148 @@ +# \RedirectApi + +All URIs are relative to *https://napi.arvancloud.ir/cdn/4.0* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**RedirectShow**](RedirectApi.md#RedirectShow) | **Get** /domains/{domain}/settings/www-redirect | Get redirect settings +[**RedirectUpdate**](RedirectApi.md#RedirectUpdate) | **Put** /domains/{domain}/settings/www-redirect | Update redirect settings + + + +## RedirectShow + +> RedirectData RedirectShow(ctx, domain).Execute() + +Get redirect settings + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.RedirectApi.RedirectShow(context.Background(), domain).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RedirectApi.RedirectShow``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RedirectShow`: RedirectData + fmt.Fprintf(os.Stdout, "Response from `RedirectApi.RedirectShow`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiRedirectShowRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**RedirectData**](RedirectData.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## RedirectUpdate + +> MessageResponse RedirectUpdate(ctx, domain).Redirect(redirect).Execute() + +Update redirect settings + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + redirect := *openapiclient.NewRedirect() // Redirect | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.RedirectApi.RedirectUpdate(context.Background(), domain).Redirect(redirect).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RedirectApi.RedirectUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RedirectUpdate`: MessageResponse + fmt.Fprintf(os.Stdout, "Response from `RedirectApi.RedirectUpdate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiRedirectUpdateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **redirect** | [**Redirect**](Redirect.md) | | + +### Return type + +[**MessageResponse**](MessageResponse.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + diff --git a/docs/RedirectData.md b/docs/RedirectData.md new file mode 100644 index 0000000..4d09c4e --- /dev/null +++ b/docs/RedirectData.md @@ -0,0 +1,56 @@ +# RedirectData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**Redirect**](Redirect.md) | | [optional] + +## Methods + +### NewRedirectData + +`func NewRedirectData() *RedirectData` + +NewRedirectData instantiates a new RedirectData object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewRedirectDataWithDefaults + +`func NewRedirectDataWithDefaults() *RedirectData` + +NewRedirectDataWithDefaults instantiates a new RedirectData object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *RedirectData) GetData() Redirect` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *RedirectData) GetDataOk() (*Redirect, 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 *RedirectData) SetData(v Redirect)` + +SetData sets Data field to given value. + +### HasData + +`func (o *RedirectData) HasData() bool` + +HasData returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/ReportsApi.md b/docs/ReportsApi.md new file mode 100644 index 0000000..0257d5d --- /dev/null +++ b/docs/ReportsApi.md @@ -0,0 +1,1515 @@ +# \ReportsApi + +All URIs are relative to *https://napi.arvancloud.ir/cdn/4.0* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**BulkReportsTrafficsTotal**](ReportsApi.md#BulkReportsTrafficsTotal) | **Post** /bulk/reports/traffics | Get traffic report for multiple domains +[**BulkReportsVisitorsTotal**](ReportsApi.md#BulkReportsVisitorsTotal) | **Post** /bulk/reports/visitors | Get visitor report for multiple domains +[**ReportsAttacksAttackers**](ReportsApi.md#ReportsAttacksAttackers) | **Get** /domains/{domain}/reports/attacks/attackers | Get list of attackers information +[**ReportsAttacksIndex**](ReportsApi.md#ReportsAttacksIndex) | **Get** /domains/{domain}/reports/attacks/list | Get list of attacks details +[**ReportsAttacksMap**](ReportsApi.md#ReportsAttacksMap) | **Get** /domains/{domain}/reports/attacks/map | Get geo-map of attacks +[**ReportsAttacksShow**](ReportsApi.md#ReportsAttacksShow) | **Get** /domains/{domain}/reports/attacks | Get report of attacks +[**ReportsAttacksUri**](ReportsApi.md#ReportsAttacksUri) | **Get** /domains/{domain}/reports/attacks/uri | Get list of URLs under attack +[**ReportsDnsGeo**](ReportsApi.md#ReportsDnsGeo) | **Get** /domains/{domain}/reports/dns-geo | Get DNS requests as geo-map +[**ReportsDnsRequests**](ReportsApi.md#ReportsDnsRequests) | **Get** /domains/{domain}/reports/dns-requests | Get response time report +[**ReportsErrorLogDetails**](ReportsApi.md#ReportsErrorLogDetails) | **Get** /domains/{domain}/reports/error-log-details | Get detail of an error +[**ReportsErrorLogs**](ReportsApi.md#ReportsErrorLogs) | **Get** /domains/{domain}/reports/error-logs | Get list of errors +[**ReportsErrorLogsChart**](ReportsApi.md#ReportsErrorLogsChart) | **Get** /domains/{domain}/reports/error-logs/chart | Get chart view of errors +[**ReportsResponseTimeIndex**](ReportsApi.md#ReportsResponseTimeIndex) | **Get** /domains/{domain}/reports/response-time | Get response time report +[**ReportsStatusIndex**](ReportsApi.md#ReportsStatusIndex) | **Get** /domains/{domain}/reports/status | Get status codes pie chart +[**ReportsStatusSummary**](ReportsApi.md#ReportsStatusSummary) | **Get** /domains/{domain}/reports/status/summary | Get an overview of status codes pie chart +[**ReportsTrafficsMap**](ReportsApi.md#ReportsTrafficsMap) | **Get** /domains/{domain}/reports/traffics/map | Get traffic as geo-map +[**ReportsTrafficsSaved**](ReportsApi.md#ReportsTrafficsSaved) | **Get** /domains/{domain}/reports/traffics/saved | Get traffic saved to total pie chart +[**ReportsTrafficsTotal**](ReportsApi.md#ReportsTrafficsTotal) | **Get** /domains/{domain}/reports/traffics | Get traffic report for domain +[**ReportsVisitorsHighRequestIps**](ReportsApi.md#ReportsVisitorsHighRequestIps) | **Get** /domains/{domain}/reports/high-request-ips | Get report of IPs with highest number of requests +[**ReportsVisitorsIndex**](ReportsApi.md#ReportsVisitorsIndex) | **Get** /domains/{domain}/reports/visitors | Get report of visitors for domain + + + +## BulkReportsTrafficsTotal + +> BulkTrafficReportData BulkReportsTrafficsTotal(ctx).Period(period).Since(since).Until(until).BulkReportsTrafficsTotalRequest(bulkReportsTrafficsTotalRequest).Execute() + +Get traffic report for multiple domains + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + "time" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + period := "period_example" // string | Select period -ending now- for report (optional) + since := time.Now() // time.Time | (optional) + until := time.Now() // time.Time | (optional) + bulkReportsTrafficsTotalRequest := *openapiclient.NewBulkReportsTrafficsTotalRequest() // BulkReportsTrafficsTotalRequest | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ReportsApi.BulkReportsTrafficsTotal(context.Background()).Period(period).Since(since).Until(until).BulkReportsTrafficsTotalRequest(bulkReportsTrafficsTotalRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ReportsApi.BulkReportsTrafficsTotal``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `BulkReportsTrafficsTotal`: BulkTrafficReportData + fmt.Fprintf(os.Stdout, "Response from `ReportsApi.BulkReportsTrafficsTotal`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiBulkReportsTrafficsTotalRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **period** | **string** | Select period -ending now- for report | + **since** | **time.Time** | | + **until** | **time.Time** | | + **bulkReportsTrafficsTotalRequest** | [**BulkReportsTrafficsTotalRequest**](BulkReportsTrafficsTotalRequest.md) | | + +### Return type + +[**BulkTrafficReportData**](BulkTrafficReportData.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## BulkReportsVisitorsTotal + +> BulkVisitorReportData BulkReportsVisitorsTotal(ctx).Period(period).Since(since).Until(until).BulkReportsVisitorsTotalRequest(bulkReportsVisitorsTotalRequest).Execute() + +Get visitor report for multiple domains + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + "time" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + period := "period_example" // string | Select period -ending now- for report (optional) + since := time.Now() // time.Time | (optional) + until := time.Now() // time.Time | (optional) + bulkReportsVisitorsTotalRequest := *openapiclient.NewBulkReportsVisitorsTotalRequest() // BulkReportsVisitorsTotalRequest | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ReportsApi.BulkReportsVisitorsTotal(context.Background()).Period(period).Since(since).Until(until).BulkReportsVisitorsTotalRequest(bulkReportsVisitorsTotalRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ReportsApi.BulkReportsVisitorsTotal``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `BulkReportsVisitorsTotal`: BulkVisitorReportData + fmt.Fprintf(os.Stdout, "Response from `ReportsApi.BulkReportsVisitorsTotal`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiBulkReportsVisitorsTotalRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **period** | **string** | Select period -ending now- for report | + **since** | **time.Time** | | + **until** | **time.Time** | | + **bulkReportsVisitorsTotalRequest** | [**BulkReportsVisitorsTotalRequest**](BulkReportsVisitorsTotalRequest.md) | | + +### Return type + +[**BulkVisitorReportData**](BulkVisitorReportData.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## ReportsAttacksAttackers + +> ReportsAttacksAttackers200Response ReportsAttacksAttackers(ctx, domain).Period(period).Execute() + +Get list of attackers information + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + period := "period_example" // string | Select period -ending now- for report (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ReportsApi.ReportsAttacksAttackers(context.Background(), domain).Period(period).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ReportsApi.ReportsAttacksAttackers``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ReportsAttacksAttackers`: ReportsAttacksAttackers200Response + fmt.Fprintf(os.Stdout, "Response from `ReportsApi.ReportsAttacksAttackers`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiReportsAttacksAttackersRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **period** | **string** | Select period -ending now- for report | + +### Return type + +[**ReportsAttacksAttackers200Response**](ReportsAttacksAttackers200Response.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## ReportsAttacksIndex + +> ReportsAttacksIndex200Response ReportsAttacksIndex(ctx, domain).Period(period).PerPage(perPage).Page(page).Execute() + +Get list of attacks details + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + period := "period_example" // string | Select period -ending now- for report (optional) + perPage := int32(56) // int32 | Set how many items returned per page (optional) + page := int32(56) // int32 | Set the desired page number (optional) (default to 1) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ReportsApi.ReportsAttacksIndex(context.Background(), domain).Period(period).PerPage(perPage).Page(page).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ReportsApi.ReportsAttacksIndex``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ReportsAttacksIndex`: ReportsAttacksIndex200Response + fmt.Fprintf(os.Stdout, "Response from `ReportsApi.ReportsAttacksIndex`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiReportsAttacksIndexRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **period** | **string** | Select period -ending now- for report | + **perPage** | **int32** | Set how many items returned per page | + **page** | **int32** | Set the desired page number | [default to 1] + +### Return type + +[**ReportsAttacksIndex200Response**](ReportsAttacksIndex200Response.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## ReportsAttacksMap + +> AttackReportMapData ReportsAttacksMap(ctx, domain).Period(period).Execute() + +Get geo-map of attacks + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + period := "period_example" // string | Select period -ending now- for report (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ReportsApi.ReportsAttacksMap(context.Background(), domain).Period(period).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ReportsApi.ReportsAttacksMap``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ReportsAttacksMap`: AttackReportMapData + fmt.Fprintf(os.Stdout, "Response from `ReportsApi.ReportsAttacksMap`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiReportsAttacksMapRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **period** | **string** | Select period -ending now- for report | + +### Return type + +[**AttackReportMapData**](AttackReportMapData.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## ReportsAttacksShow + +> ReportsAttacksShow200Response ReportsAttacksShow(ctx, domain).Period(period).Execute() + +Get report of attacks + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + period := "period_example" // string | Select period -ending now- for report (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ReportsApi.ReportsAttacksShow(context.Background(), domain).Period(period).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ReportsApi.ReportsAttacksShow``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ReportsAttacksShow`: ReportsAttacksShow200Response + fmt.Fprintf(os.Stdout, "Response from `ReportsApi.ReportsAttacksShow`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiReportsAttacksShowRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **period** | **string** | Select period -ending now- for report | + +### Return type + +[**ReportsAttacksShow200Response**](ReportsAttacksShow200Response.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## ReportsAttacksUri + +> AttackReportUriData ReportsAttacksUri(ctx, domain).Period(period).Execute() + +Get list of URLs under attack + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + period := "period_example" // string | Select period -ending now- for report (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ReportsApi.ReportsAttacksUri(context.Background(), domain).Period(period).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ReportsApi.ReportsAttacksUri``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ReportsAttacksUri`: AttackReportUriData + fmt.Fprintf(os.Stdout, "Response from `ReportsApi.ReportsAttacksUri`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiReportsAttacksUriRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **period** | **string** | Select period -ending now- for report | + +### Return type + +[**AttackReportUriData**](AttackReportUriData.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## ReportsDnsGeo + +> DnsGeoReportData ReportsDnsGeo(ctx, domain).Period(period).Since(since).Until(until).Execute() + +Get DNS requests as geo-map + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + "time" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + period := "period_example" // string | Select period -ending now- for report (optional) + since := time.Now() // time.Time | (optional) + until := time.Now() // time.Time | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ReportsApi.ReportsDnsGeo(context.Background(), domain).Period(period).Since(since).Until(until).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ReportsApi.ReportsDnsGeo``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ReportsDnsGeo`: DnsGeoReportData + fmt.Fprintf(os.Stdout, "Response from `ReportsApi.ReportsDnsGeo`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiReportsDnsGeoRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **period** | **string** | Select period -ending now- for report | + **since** | **time.Time** | | + **until** | **time.Time** | | + +### Return type + +[**DnsGeoReportData**](DnsGeoReportData.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## ReportsDnsRequests + +> DnsRequestReportData ReportsDnsRequests(ctx, domain).Period(period).Since(since).Until(until).Execute() + +Get response time report + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + "time" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + period := "period_example" // string | Select period -ending now- for report (optional) + since := time.Now() // time.Time | (optional) + until := time.Now() // time.Time | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ReportsApi.ReportsDnsRequests(context.Background(), domain).Period(period).Since(since).Until(until).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ReportsApi.ReportsDnsRequests``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ReportsDnsRequests`: DnsRequestReportData + fmt.Fprintf(os.Stdout, "Response from `ReportsApi.ReportsDnsRequests`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiReportsDnsRequestsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **period** | **string** | Select period -ending now- for report | + **since** | **time.Time** | | + **until** | **time.Time** | | + +### Return type + +[**DnsRequestReportData**](DnsRequestReportData.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## ReportsErrorLogDetails + +> ReportsErrorLogDetails200Response ReportsErrorLogDetails(ctx, domain).Period(period).Since(since).Until(until).Error_(error_).Execute() + +Get detail of an error + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + "time" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + period := "period_example" // string | Select period -ending now- for report (optional) + since := time.Now() // time.Time | (optional) + until := time.Now() // time.Time | (optional) + error_ := "error__example" // string | Error message to search for (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ReportsApi.ReportsErrorLogDetails(context.Background(), domain).Period(period).Since(since).Until(until).Error_(error_).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ReportsApi.ReportsErrorLogDetails``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ReportsErrorLogDetails`: ReportsErrorLogDetails200Response + fmt.Fprintf(os.Stdout, "Response from `ReportsApi.ReportsErrorLogDetails`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiReportsErrorLogDetailsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **period** | **string** | Select period -ending now- for report | + **since** | **time.Time** | | + **until** | **time.Time** | | + **error_** | **string** | Error message to search for | + +### Return type + +[**ReportsErrorLogDetails200Response**](ReportsErrorLogDetails200Response.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## ReportsErrorLogs + +> ErrorLogsData ReportsErrorLogs(ctx, domain).Period(period).Since(since).Until(until).Execute() + +Get list of errors + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + "time" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + period := "period_example" // string | Select period -ending now- for report (optional) + since := time.Now() // time.Time | (optional) + until := time.Now() // time.Time | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ReportsApi.ReportsErrorLogs(context.Background(), domain).Period(period).Since(since).Until(until).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ReportsApi.ReportsErrorLogs``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ReportsErrorLogs`: ErrorLogsData + fmt.Fprintf(os.Stdout, "Response from `ReportsApi.ReportsErrorLogs`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiReportsErrorLogsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **period** | **string** | Select period -ending now- for report | + **since** | **time.Time** | | + **until** | **time.Time** | | + +### Return type + +[**ErrorLogsData**](ErrorLogsData.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## ReportsErrorLogsChart + +> ErrorLogChartData ReportsErrorLogsChart(ctx, domain).Period(period).Since(since).Until(until).Execute() + +Get chart view of errors + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + "time" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + period := "period_example" // string | Select period -ending now- for report (optional) + since := time.Now() // time.Time | (optional) + until := time.Now() // time.Time | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ReportsApi.ReportsErrorLogsChart(context.Background(), domain).Period(period).Since(since).Until(until).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ReportsApi.ReportsErrorLogsChart``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ReportsErrorLogsChart`: ErrorLogChartData + fmt.Fprintf(os.Stdout, "Response from `ReportsApi.ReportsErrorLogsChart`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiReportsErrorLogsChartRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **period** | **string** | Select period -ending now- for report | + **since** | **time.Time** | | + **until** | **time.Time** | | + +### Return type + +[**ErrorLogChartData**](ErrorLogChartData.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## ReportsResponseTimeIndex + +> ResponseTimeData ReportsResponseTimeIndex(ctx, domain).Period(period).Since(since).Until(until).FilterSubdomain(filterSubdomain).Execute() + +Get response time report + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + "time" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + period := "period_example" // string | Select period -ending now- for report (optional) + since := time.Now() // time.Time | (optional) + until := time.Now() // time.Time | (optional) + filterSubdomain := "filterSubdomain_example" // string | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ReportsApi.ReportsResponseTimeIndex(context.Background(), domain).Period(period).Since(since).Until(until).FilterSubdomain(filterSubdomain).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ReportsApi.ReportsResponseTimeIndex``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ReportsResponseTimeIndex`: ResponseTimeData + fmt.Fprintf(os.Stdout, "Response from `ReportsApi.ReportsResponseTimeIndex`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiReportsResponseTimeIndexRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **period** | **string** | Select period -ending now- for report | + **since** | **time.Time** | | + **until** | **time.Time** | | + **filterSubdomain** | **string** | | + +### Return type + +[**ResponseTimeData**](ResponseTimeData.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## ReportsStatusIndex + +> StatusCodeReportData ReportsStatusIndex(ctx, domain).Period(period).Since(since).Until(until).Execute() + +Get status codes pie chart + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + "time" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + period := "period_example" // string | Select period -ending now- for report (optional) + since := time.Now() // time.Time | (optional) + until := time.Now() // time.Time | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ReportsApi.ReportsStatusIndex(context.Background(), domain).Period(period).Since(since).Until(until).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ReportsApi.ReportsStatusIndex``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ReportsStatusIndex`: StatusCodeReportData + fmt.Fprintf(os.Stdout, "Response from `ReportsApi.ReportsStatusIndex`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiReportsStatusIndexRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **period** | **string** | Select period -ending now- for report | + **since** | **time.Time** | | + **until** | **time.Time** | | + +### Return type + +[**StatusCodeReportData**](StatusCodeReportData.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## ReportsStatusSummary + +> StatusCodeSummaryData ReportsStatusSummary(ctx, domain).Period(period).Since(since).Until(until).Execute() + +Get an overview of status codes pie chart + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + "time" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + period := "period_example" // string | Select period -ending now- for report (optional) + since := time.Now() // time.Time | (optional) + until := time.Now() // time.Time | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ReportsApi.ReportsStatusSummary(context.Background(), domain).Period(period).Since(since).Until(until).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ReportsApi.ReportsStatusSummary``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ReportsStatusSummary`: StatusCodeSummaryData + fmt.Fprintf(os.Stdout, "Response from `ReportsApi.ReportsStatusSummary`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiReportsStatusSummaryRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **period** | **string** | Select period -ending now- for report | + **since** | **time.Time** | | + **until** | **time.Time** | | + +### Return type + +[**StatusCodeSummaryData**](StatusCodeSummaryData.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## ReportsTrafficsMap + +> MapTrafficsData ReportsTrafficsMap(ctx, domain).Period(period).Since(since).Until(until).FilterSubdomain(filterSubdomain).Execute() + +Get traffic as geo-map + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + "time" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + period := "period_example" // string | Select period -ending now- for report (optional) + since := time.Now() // time.Time | (optional) + until := time.Now() // time.Time | (optional) + filterSubdomain := "filterSubdomain_example" // string | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ReportsApi.ReportsTrafficsMap(context.Background(), domain).Period(period).Since(since).Until(until).FilterSubdomain(filterSubdomain).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ReportsApi.ReportsTrafficsMap``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ReportsTrafficsMap`: MapTrafficsData + fmt.Fprintf(os.Stdout, "Response from `ReportsApi.ReportsTrafficsMap`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiReportsTrafficsMapRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **period** | **string** | Select period -ending now- for report | + **since** | **time.Time** | | + **until** | **time.Time** | | + **filterSubdomain** | **string** | | + +### Return type + +[**MapTrafficsData**](MapTrafficsData.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## ReportsTrafficsSaved + +> SavedTrafficsData ReportsTrafficsSaved(ctx, domain).Period(period).Since(since).Until(until).FilterSubdomain(filterSubdomain).Execute() + +Get traffic saved to total pie chart + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + "time" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + period := "period_example" // string | Select period -ending now- for report (optional) + since := time.Now() // time.Time | (optional) + until := time.Now() // time.Time | (optional) + filterSubdomain := "filterSubdomain_example" // string | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ReportsApi.ReportsTrafficsSaved(context.Background(), domain).Period(period).Since(since).Until(until).FilterSubdomain(filterSubdomain).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ReportsApi.ReportsTrafficsSaved``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ReportsTrafficsSaved`: SavedTrafficsData + fmt.Fprintf(os.Stdout, "Response from `ReportsApi.ReportsTrafficsSaved`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiReportsTrafficsSavedRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **period** | **string** | Select period -ending now- for report | + **since** | **time.Time** | | + **until** | **time.Time** | | + **filterSubdomain** | **string** | | + +### Return type + +[**SavedTrafficsData**](SavedTrafficsData.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## ReportsTrafficsTotal + +> TrafficsData ReportsTrafficsTotal(ctx, domain).Period(period).Since(since).Until(until).FilterSubdomain(filterSubdomain).Execute() + +Get traffic report for domain + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + "time" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + period := "period_example" // string | Select period -ending now- for report (optional) + since := time.Now() // time.Time | (optional) + until := time.Now() // time.Time | (optional) + filterSubdomain := "filterSubdomain_example" // string | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ReportsApi.ReportsTrafficsTotal(context.Background(), domain).Period(period).Since(since).Until(until).FilterSubdomain(filterSubdomain).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ReportsApi.ReportsTrafficsTotal``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ReportsTrafficsTotal`: TrafficsData + fmt.Fprintf(os.Stdout, "Response from `ReportsApi.ReportsTrafficsTotal`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiReportsTrafficsTotalRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **period** | **string** | Select period -ending now- for report | + **since** | **time.Time** | | + **until** | **time.Time** | | + **filterSubdomain** | **string** | | + +### Return type + +[**TrafficsData**](TrafficsData.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## ReportsVisitorsHighRequestIps + +> ReportsVisitorsHighRequestIps200Response ReportsVisitorsHighRequestIps(ctx, domain).Period(period).Since(since).Until(until).PerPage(perPage).Page(page).Execute() + +Get report of IPs with highest number of requests + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + "time" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + period := "period_example" // string | Select period -ending now- for report (optional) + since := time.Now() // time.Time | (optional) + until := time.Now() // time.Time | (optional) + perPage := int32(56) // int32 | Set how many items returned per page (optional) + page := int32(56) // int32 | Set the desired page number (optional) (default to 1) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ReportsApi.ReportsVisitorsHighRequestIps(context.Background(), domain).Period(period).Since(since).Until(until).PerPage(perPage).Page(page).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ReportsApi.ReportsVisitorsHighRequestIps``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ReportsVisitorsHighRequestIps`: ReportsVisitorsHighRequestIps200Response + fmt.Fprintf(os.Stdout, "Response from `ReportsApi.ReportsVisitorsHighRequestIps`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiReportsVisitorsHighRequestIpsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **period** | **string** | Select period -ending now- for report | + **since** | **time.Time** | | + **until** | **time.Time** | | + **perPage** | **int32** | Set how many items returned per page | + **page** | **int32** | Set the desired page number | [default to 1] + +### Return type + +[**ReportsVisitorsHighRequestIps200Response**](ReportsVisitorsHighRequestIps200Response.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## ReportsVisitorsIndex + +> VisitorsData ReportsVisitorsIndex(ctx, domain).Period(period).Since(since).Until(until).FilterSubdomain(filterSubdomain).Execute() + +Get report of visitors for domain + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + "time" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + period := "period_example" // string | Select period -ending now- for report (optional) + since := time.Now() // time.Time | (optional) + until := time.Now() // time.Time | (optional) + filterSubdomain := "filterSubdomain_example" // string | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ReportsApi.ReportsVisitorsIndex(context.Background(), domain).Period(period).Since(since).Until(until).FilterSubdomain(filterSubdomain).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ReportsApi.ReportsVisitorsIndex``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ReportsVisitorsIndex`: VisitorsData + fmt.Fprintf(os.Stdout, "Response from `ReportsApi.ReportsVisitorsIndex`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiReportsVisitorsIndexRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **period** | **string** | Select period -ending now- for report | + **since** | **time.Time** | | + **until** | **time.Time** | | + **filterSubdomain** | **string** | | + +### Return type + +[**VisitorsData**](VisitorsData.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + diff --git a/docs/ReportsAttacksAttackers200Response.md b/docs/ReportsAttacksAttackers200Response.md new file mode 100644 index 0000000..6233e11 --- /dev/null +++ b/docs/ReportsAttacksAttackers200Response.md @@ -0,0 +1,56 @@ +# ReportsAttacksAttackers200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**[]ReportsAttacksAttackers200ResponseDataInner**](ReportsAttacksAttackers200ResponseDataInner.md) | | [optional] + +## Methods + +### NewReportsAttacksAttackers200Response + +`func NewReportsAttacksAttackers200Response() *ReportsAttacksAttackers200Response` + +NewReportsAttacksAttackers200Response instantiates a new ReportsAttacksAttackers200Response object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewReportsAttacksAttackers200ResponseWithDefaults + +`func NewReportsAttacksAttackers200ResponseWithDefaults() *ReportsAttacksAttackers200Response` + +NewReportsAttacksAttackers200ResponseWithDefaults instantiates a new ReportsAttacksAttackers200Response object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *ReportsAttacksAttackers200Response) GetData() []ReportsAttacksAttackers200ResponseDataInner` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ReportsAttacksAttackers200Response) GetDataOk() (*[]ReportsAttacksAttackers200ResponseDataInner, 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 *ReportsAttacksAttackers200Response) SetData(v []ReportsAttacksAttackers200ResponseDataInner)` + +SetData sets Data field to given value. + +### HasData + +`func (o *ReportsAttacksAttackers200Response) HasData() bool` + +HasData returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/ReportsAttacksAttackers200ResponseDataInner.md b/docs/ReportsAttacksAttackers200ResponseDataInner.md new file mode 100644 index 0000000..0bc582f --- /dev/null +++ b/docs/ReportsAttacksAttackers200ResponseDataInner.md @@ -0,0 +1,82 @@ +# ReportsAttacksAttackers200ResponseDataInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Ip** | Pointer to **string** | | [optional] +**Count** | Pointer to **int32** | | [optional] + +## Methods + +### NewReportsAttacksAttackers200ResponseDataInner + +`func NewReportsAttacksAttackers200ResponseDataInner() *ReportsAttacksAttackers200ResponseDataInner` + +NewReportsAttacksAttackers200ResponseDataInner instantiates a new ReportsAttacksAttackers200ResponseDataInner object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewReportsAttacksAttackers200ResponseDataInnerWithDefaults + +`func NewReportsAttacksAttackers200ResponseDataInnerWithDefaults() *ReportsAttacksAttackers200ResponseDataInner` + +NewReportsAttacksAttackers200ResponseDataInnerWithDefaults instantiates a new ReportsAttacksAttackers200ResponseDataInner object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetIp + +`func (o *ReportsAttacksAttackers200ResponseDataInner) GetIp() string` + +GetIp returns the Ip field if non-nil, zero value otherwise. + +### GetIpOk + +`func (o *ReportsAttacksAttackers200ResponseDataInner) GetIpOk() (*string, bool)` + +GetIpOk returns a tuple with the Ip field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIp + +`func (o *ReportsAttacksAttackers200ResponseDataInner) SetIp(v string)` + +SetIp sets Ip field to given value. + +### HasIp + +`func (o *ReportsAttacksAttackers200ResponseDataInner) HasIp() bool` + +HasIp returns a boolean if a field has been set. + +### GetCount + +`func (o *ReportsAttacksAttackers200ResponseDataInner) GetCount() int32` + +GetCount returns the Count field if non-nil, zero value otherwise. + +### GetCountOk + +`func (o *ReportsAttacksAttackers200ResponseDataInner) 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 *ReportsAttacksAttackers200ResponseDataInner) SetCount(v int32)` + +SetCount sets Count field to given value. + +### HasCount + +`func (o *ReportsAttacksAttackers200ResponseDataInner) HasCount() bool` + +HasCount returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/ReportsAttacksIndex200Response.md b/docs/ReportsAttacksIndex200Response.md new file mode 100644 index 0000000..4427f0e --- /dev/null +++ b/docs/ReportsAttacksIndex200Response.md @@ -0,0 +1,108 @@ +# ReportsAttacksIndex200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**[]AttackReportItem**](AttackReportItem.md) | | [optional] +**Links** | Pointer to [**PaginatedResponseLinks**](PaginatedResponseLinks.md) | | [optional] +**Meta** | Pointer to [**PaginatedResponseMeta**](PaginatedResponseMeta.md) | | [optional] + +## Methods + +### NewReportsAttacksIndex200Response + +`func NewReportsAttacksIndex200Response() *ReportsAttacksIndex200Response` + +NewReportsAttacksIndex200Response instantiates a new ReportsAttacksIndex200Response object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewReportsAttacksIndex200ResponseWithDefaults + +`func NewReportsAttacksIndex200ResponseWithDefaults() *ReportsAttacksIndex200Response` + +NewReportsAttacksIndex200ResponseWithDefaults instantiates a new ReportsAttacksIndex200Response object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *ReportsAttacksIndex200Response) GetData() []AttackReportItem` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ReportsAttacksIndex200Response) GetDataOk() (*[]AttackReportItem, 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 *ReportsAttacksIndex200Response) SetData(v []AttackReportItem)` + +SetData sets Data field to given value. + +### HasData + +`func (o *ReportsAttacksIndex200Response) HasData() bool` + +HasData returns a boolean if a field has been set. + +### GetLinks + +`func (o *ReportsAttacksIndex200Response) GetLinks() PaginatedResponseLinks` + +GetLinks returns the Links field if non-nil, zero value otherwise. + +### GetLinksOk + +`func (o *ReportsAttacksIndex200Response) GetLinksOk() (*PaginatedResponseLinks, bool)` + +GetLinksOk returns a tuple with the Links field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLinks + +`func (o *ReportsAttacksIndex200Response) SetLinks(v PaginatedResponseLinks)` + +SetLinks sets Links field to given value. + +### HasLinks + +`func (o *ReportsAttacksIndex200Response) HasLinks() bool` + +HasLinks returns a boolean if a field has been set. + +### GetMeta + +`func (o *ReportsAttacksIndex200Response) GetMeta() PaginatedResponseMeta` + +GetMeta returns the Meta field if non-nil, zero value otherwise. + +### GetMetaOk + +`func (o *ReportsAttacksIndex200Response) GetMetaOk() (*PaginatedResponseMeta, bool)` + +GetMetaOk returns a tuple with the Meta field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMeta + +`func (o *ReportsAttacksIndex200Response) SetMeta(v PaginatedResponseMeta)` + +SetMeta sets Meta field to given value. + +### HasMeta + +`func (o *ReportsAttacksIndex200Response) HasMeta() bool` + +HasMeta returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/ReportsAttacksShow200Response.md b/docs/ReportsAttacksShow200Response.md new file mode 100644 index 0000000..dd223b5 --- /dev/null +++ b/docs/ReportsAttacksShow200Response.md @@ -0,0 +1,56 @@ +# ReportsAttacksShow200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**AttackReport**](AttackReport.md) | | [optional] + +## Methods + +### NewReportsAttacksShow200Response + +`func NewReportsAttacksShow200Response() *ReportsAttacksShow200Response` + +NewReportsAttacksShow200Response instantiates a new ReportsAttacksShow200Response object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewReportsAttacksShow200ResponseWithDefaults + +`func NewReportsAttacksShow200ResponseWithDefaults() *ReportsAttacksShow200Response` + +NewReportsAttacksShow200ResponseWithDefaults instantiates a new ReportsAttacksShow200Response object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *ReportsAttacksShow200Response) GetData() AttackReport` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ReportsAttacksShow200Response) GetDataOk() (*AttackReport, 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 *ReportsAttacksShow200Response) SetData(v AttackReport)` + +SetData sets Data field to given value. + +### HasData + +`func (o *ReportsAttacksShow200Response) HasData() bool` + +HasData returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/ReportsErrorLogDetails200Response.md b/docs/ReportsErrorLogDetails200Response.md new file mode 100644 index 0000000..ed6521e --- /dev/null +++ b/docs/ReportsErrorLogDetails200Response.md @@ -0,0 +1,56 @@ +# ReportsErrorLogDetails200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to **map[string]interface{}** | | [optional] + +## Methods + +### NewReportsErrorLogDetails200Response + +`func NewReportsErrorLogDetails200Response() *ReportsErrorLogDetails200Response` + +NewReportsErrorLogDetails200Response instantiates a new ReportsErrorLogDetails200Response object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewReportsErrorLogDetails200ResponseWithDefaults + +`func NewReportsErrorLogDetails200ResponseWithDefaults() *ReportsErrorLogDetails200Response` + +NewReportsErrorLogDetails200ResponseWithDefaults instantiates a new ReportsErrorLogDetails200Response object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *ReportsErrorLogDetails200Response) GetData() map[string]interface{}` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ReportsErrorLogDetails200Response) GetDataOk() (*map[string]interface{}, 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 *ReportsErrorLogDetails200Response) SetData(v map[string]interface{})` + +SetData sets Data field to given value. + +### HasData + +`func (o *ReportsErrorLogDetails200Response) HasData() bool` + +HasData returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/ReportsVisitorsHighRequestIps200Response.md b/docs/ReportsVisitorsHighRequestIps200Response.md new file mode 100644 index 0000000..2620e48 --- /dev/null +++ b/docs/ReportsVisitorsHighRequestIps200Response.md @@ -0,0 +1,108 @@ +# ReportsVisitorsHighRequestIps200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**[]HighRequestedIp**](HighRequestedIp.md) | | [optional] +**Links** | Pointer to [**PaginatedResponseLinks**](PaginatedResponseLinks.md) | | [optional] +**Meta** | Pointer to [**PaginatedResponseMeta**](PaginatedResponseMeta.md) | | [optional] + +## Methods + +### NewReportsVisitorsHighRequestIps200Response + +`func NewReportsVisitorsHighRequestIps200Response() *ReportsVisitorsHighRequestIps200Response` + +NewReportsVisitorsHighRequestIps200Response instantiates a new ReportsVisitorsHighRequestIps200Response object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewReportsVisitorsHighRequestIps200ResponseWithDefaults + +`func NewReportsVisitorsHighRequestIps200ResponseWithDefaults() *ReportsVisitorsHighRequestIps200Response` + +NewReportsVisitorsHighRequestIps200ResponseWithDefaults instantiates a new ReportsVisitorsHighRequestIps200Response object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *ReportsVisitorsHighRequestIps200Response) GetData() []HighRequestedIp` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ReportsVisitorsHighRequestIps200Response) GetDataOk() (*[]HighRequestedIp, 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 *ReportsVisitorsHighRequestIps200Response) SetData(v []HighRequestedIp)` + +SetData sets Data field to given value. + +### HasData + +`func (o *ReportsVisitorsHighRequestIps200Response) HasData() bool` + +HasData returns a boolean if a field has been set. + +### GetLinks + +`func (o *ReportsVisitorsHighRequestIps200Response) GetLinks() PaginatedResponseLinks` + +GetLinks returns the Links field if non-nil, zero value otherwise. + +### GetLinksOk + +`func (o *ReportsVisitorsHighRequestIps200Response) GetLinksOk() (*PaginatedResponseLinks, bool)` + +GetLinksOk returns a tuple with the Links field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLinks + +`func (o *ReportsVisitorsHighRequestIps200Response) SetLinks(v PaginatedResponseLinks)` + +SetLinks sets Links field to given value. + +### HasLinks + +`func (o *ReportsVisitorsHighRequestIps200Response) HasLinks() bool` + +HasLinks returns a boolean if a field has been set. + +### GetMeta + +`func (o *ReportsVisitorsHighRequestIps200Response) GetMeta() PaginatedResponseMeta` + +GetMeta returns the Meta field if non-nil, zero value otherwise. + +### GetMetaOk + +`func (o *ReportsVisitorsHighRequestIps200Response) GetMetaOk() (*PaginatedResponseMeta, bool)` + +GetMetaOk returns a tuple with the Meta field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMeta + +`func (o *ReportsVisitorsHighRequestIps200Response) SetMeta(v PaginatedResponseMeta)` + +SetMeta sets Meta field to given value. + +### HasMeta + +`func (o *ReportsVisitorsHighRequestIps200Response) HasMeta() bool` + +HasMeta returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/ReprioritizeRuleRequest.md b/docs/ReprioritizeRuleRequest.md new file mode 100644 index 0000000..94235da --- /dev/null +++ b/docs/ReprioritizeRuleRequest.md @@ -0,0 +1,103 @@ +# ReprioritizeRuleRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**RuleId** | **string** | ID of the rule you want to move | +**AfterRuleId** | Pointer to **string** | ID of the rule you want to be prior to the selected rule | [optional] +**BeforeRuleId** | Pointer to **string** | ID of the rule you want to follow the selected rule | [optional] + +## Methods + +### NewReprioritizeRuleRequest + +`func NewReprioritizeRuleRequest(ruleId string, ) *ReprioritizeRuleRequest` + +NewReprioritizeRuleRequest instantiates a new ReprioritizeRuleRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewReprioritizeRuleRequestWithDefaults + +`func NewReprioritizeRuleRequestWithDefaults() *ReprioritizeRuleRequest` + +NewReprioritizeRuleRequestWithDefaults instantiates a new ReprioritizeRuleRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetRuleId + +`func (o *ReprioritizeRuleRequest) GetRuleId() string` + +GetRuleId returns the RuleId field if non-nil, zero value otherwise. + +### GetRuleIdOk + +`func (o *ReprioritizeRuleRequest) GetRuleIdOk() (*string, bool)` + +GetRuleIdOk returns a tuple with the RuleId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRuleId + +`func (o *ReprioritizeRuleRequest) SetRuleId(v string)` + +SetRuleId sets RuleId field to given value. + + +### GetAfterRuleId + +`func (o *ReprioritizeRuleRequest) GetAfterRuleId() string` + +GetAfterRuleId returns the AfterRuleId field if non-nil, zero value otherwise. + +### GetAfterRuleIdOk + +`func (o *ReprioritizeRuleRequest) GetAfterRuleIdOk() (*string, bool)` + +GetAfterRuleIdOk returns a tuple with the AfterRuleId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAfterRuleId + +`func (o *ReprioritizeRuleRequest) SetAfterRuleId(v string)` + +SetAfterRuleId sets AfterRuleId field to given value. + +### HasAfterRuleId + +`func (o *ReprioritizeRuleRequest) HasAfterRuleId() bool` + +HasAfterRuleId returns a boolean if a field has been set. + +### GetBeforeRuleId + +`func (o *ReprioritizeRuleRequest) GetBeforeRuleId() string` + +GetBeforeRuleId returns the BeforeRuleId field if non-nil, zero value otherwise. + +### GetBeforeRuleIdOk + +`func (o *ReprioritizeRuleRequest) GetBeforeRuleIdOk() (*string, bool)` + +GetBeforeRuleIdOk returns a tuple with the BeforeRuleId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBeforeRuleId + +`func (o *ReprioritizeRuleRequest) SetBeforeRuleId(v string)` + +SetBeforeRuleId sets BeforeRuleId field to given value. + +### HasBeforeRuleId + +`func (o *ReprioritizeRuleRequest) HasBeforeRuleId() bool` + +HasBeforeRuleId returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/ResponseTime.md b/docs/ResponseTime.md new file mode 100644 index 0000000..16c01f7 --- /dev/null +++ b/docs/ResponseTime.md @@ -0,0 +1,82 @@ +# ResponseTime + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Statistics** | Pointer to [**ResponseTimeStatistics**](ResponseTimeStatistics.md) | | [optional] +**Charts** | Pointer to [**ResponseTimeCharts**](ResponseTimeCharts.md) | | [optional] + +## Methods + +### NewResponseTime + +`func NewResponseTime() *ResponseTime` + +NewResponseTime instantiates a new ResponseTime object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseTimeWithDefaults + +`func NewResponseTimeWithDefaults() *ResponseTime` + +NewResponseTimeWithDefaults instantiates a new ResponseTime object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetStatistics + +`func (o *ResponseTime) GetStatistics() ResponseTimeStatistics` + +GetStatistics returns the Statistics field if non-nil, zero value otherwise. + +### GetStatisticsOk + +`func (o *ResponseTime) GetStatisticsOk() (*ResponseTimeStatistics, bool)` + +GetStatisticsOk returns a tuple with the Statistics field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatistics + +`func (o *ResponseTime) SetStatistics(v ResponseTimeStatistics)` + +SetStatistics sets Statistics field to given value. + +### HasStatistics + +`func (o *ResponseTime) HasStatistics() bool` + +HasStatistics returns a boolean if a field has been set. + +### GetCharts + +`func (o *ResponseTime) GetCharts() ResponseTimeCharts` + +GetCharts returns the Charts field if non-nil, zero value otherwise. + +### GetChartsOk + +`func (o *ResponseTime) GetChartsOk() (*ResponseTimeCharts, bool)` + +GetChartsOk returns a tuple with the Charts field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCharts + +`func (o *ResponseTime) SetCharts(v ResponseTimeCharts)` + +SetCharts sets Charts field to given value. + +### HasCharts + +`func (o *ResponseTime) HasCharts() bool` + +HasCharts returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/ResponseTimeCharts.md b/docs/ResponseTimeCharts.md new file mode 100644 index 0000000..33f63cb --- /dev/null +++ b/docs/ResponseTimeCharts.md @@ -0,0 +1,56 @@ +# ResponseTimeCharts + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Ir** | Pointer to [**ResponseTimeChartsIr**](ResponseTimeChartsIr.md) | | [optional] + +## Methods + +### NewResponseTimeCharts + +`func NewResponseTimeCharts() *ResponseTimeCharts` + +NewResponseTimeCharts instantiates a new ResponseTimeCharts object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseTimeChartsWithDefaults + +`func NewResponseTimeChartsWithDefaults() *ResponseTimeCharts` + +NewResponseTimeChartsWithDefaults instantiates a new ResponseTimeCharts object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetIr + +`func (o *ResponseTimeCharts) GetIr() ResponseTimeChartsIr` + +GetIr returns the Ir field if non-nil, zero value otherwise. + +### GetIrOk + +`func (o *ResponseTimeCharts) GetIrOk() (*ResponseTimeChartsIr, bool)` + +GetIrOk returns a tuple with the Ir field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIr + +`func (o *ResponseTimeCharts) SetIr(v ResponseTimeChartsIr)` + +SetIr sets Ir field to given value. + +### HasIr + +`func (o *ResponseTimeCharts) HasIr() bool` + +HasIr returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/ResponseTimeChartsIr.md b/docs/ResponseTimeChartsIr.md new file mode 100644 index 0000000..925267d --- /dev/null +++ b/docs/ResponseTimeChartsIr.md @@ -0,0 +1,108 @@ +# ResponseTimeChartsIr + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Title** | Pointer to **string** | | [optional] +**Categories** | Pointer to [**[]time.Time**](time.Time.md) | | [optional] +**Series** | Pointer to [**[]ResponseTimeChartsIrSeriesInner**](ResponseTimeChartsIrSeriesInner.md) | | [optional] + +## Methods + +### NewResponseTimeChartsIr + +`func NewResponseTimeChartsIr() *ResponseTimeChartsIr` + +NewResponseTimeChartsIr instantiates a new ResponseTimeChartsIr object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseTimeChartsIrWithDefaults + +`func NewResponseTimeChartsIrWithDefaults() *ResponseTimeChartsIr` + +NewResponseTimeChartsIrWithDefaults instantiates a new ResponseTimeChartsIr object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetTitle + +`func (o *ResponseTimeChartsIr) GetTitle() string` + +GetTitle returns the Title field if non-nil, zero value otherwise. + +### GetTitleOk + +`func (o *ResponseTimeChartsIr) 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 *ResponseTimeChartsIr) SetTitle(v string)` + +SetTitle sets Title field to given value. + +### HasTitle + +`func (o *ResponseTimeChartsIr) HasTitle() bool` + +HasTitle returns a boolean if a field has been set. + +### GetCategories + +`func (o *ResponseTimeChartsIr) GetCategories() []time.Time` + +GetCategories returns the Categories field if non-nil, zero value otherwise. + +### GetCategoriesOk + +`func (o *ResponseTimeChartsIr) GetCategoriesOk() (*[]time.Time, bool)` + +GetCategoriesOk returns a tuple with the Categories field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCategories + +`func (o *ResponseTimeChartsIr) SetCategories(v []time.Time)` + +SetCategories sets Categories field to given value. + +### HasCategories + +`func (o *ResponseTimeChartsIr) HasCategories() bool` + +HasCategories returns a boolean if a field has been set. + +### GetSeries + +`func (o *ResponseTimeChartsIr) GetSeries() []ResponseTimeChartsIrSeriesInner` + +GetSeries returns the Series field if non-nil, zero value otherwise. + +### GetSeriesOk + +`func (o *ResponseTimeChartsIr) GetSeriesOk() (*[]ResponseTimeChartsIrSeriesInner, bool)` + +GetSeriesOk returns a tuple with the Series field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSeries + +`func (o *ResponseTimeChartsIr) SetSeries(v []ResponseTimeChartsIrSeriesInner)` + +SetSeries sets Series field to given value. + +### HasSeries + +`func (o *ResponseTimeChartsIr) HasSeries() bool` + +HasSeries returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/ResponseTimeChartsIrSeriesInner.md b/docs/ResponseTimeChartsIrSeriesInner.md new file mode 100644 index 0000000..8a65ff7 --- /dev/null +++ b/docs/ResponseTimeChartsIrSeriesInner.md @@ -0,0 +1,82 @@ +# ResponseTimeChartsIrSeriesInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **string** | | [optional] +**Data** | Pointer to **[]int32** | | [optional] + +## Methods + +### NewResponseTimeChartsIrSeriesInner + +`func NewResponseTimeChartsIrSeriesInner() *ResponseTimeChartsIrSeriesInner` + +NewResponseTimeChartsIrSeriesInner instantiates a new ResponseTimeChartsIrSeriesInner object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseTimeChartsIrSeriesInnerWithDefaults + +`func NewResponseTimeChartsIrSeriesInnerWithDefaults() *ResponseTimeChartsIrSeriesInner` + +NewResponseTimeChartsIrSeriesInnerWithDefaults instantiates a new ResponseTimeChartsIrSeriesInner object +This 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 *ResponseTimeChartsIrSeriesInner) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ResponseTimeChartsIrSeriesInner) 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 *ResponseTimeChartsIrSeriesInner) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *ResponseTimeChartsIrSeriesInner) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetData + +`func (o *ResponseTimeChartsIrSeriesInner) GetData() []int32` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ResponseTimeChartsIrSeriesInner) GetDataOk() (*[]int32, 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 *ResponseTimeChartsIrSeriesInner) SetData(v []int32)` + +SetData sets Data field to given value. + +### HasData + +`func (o *ResponseTimeChartsIrSeriesInner) HasData() bool` + +HasData returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/ResponseTimeData.md b/docs/ResponseTimeData.md new file mode 100644 index 0000000..b81f59e --- /dev/null +++ b/docs/ResponseTimeData.md @@ -0,0 +1,56 @@ +# ResponseTimeData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**ResponseTime**](ResponseTime.md) | | [optional] + +## Methods + +### NewResponseTimeData + +`func NewResponseTimeData() *ResponseTimeData` + +NewResponseTimeData instantiates a new ResponseTimeData object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseTimeDataWithDefaults + +`func NewResponseTimeDataWithDefaults() *ResponseTimeData` + +NewResponseTimeDataWithDefaults instantiates a new ResponseTimeData object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *ResponseTimeData) GetData() ResponseTime` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ResponseTimeData) GetDataOk() (*ResponseTime, 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 *ResponseTimeData) SetData(v ResponseTime)` + +SetData sets Data field to given value. + +### HasData + +`func (o *ResponseTimeData) HasData() bool` + +HasData returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/ResponseTimeStatistics.md b/docs/ResponseTimeStatistics.md new file mode 100644 index 0000000..6970a6e --- /dev/null +++ b/docs/ResponseTimeStatistics.md @@ -0,0 +1,66 @@ +# ResponseTimeStatistics + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ResponseTime** | Pointer to **interface{}** | | [optional] + +## Methods + +### NewResponseTimeStatistics + +`func NewResponseTimeStatistics() *ResponseTimeStatistics` + +NewResponseTimeStatistics instantiates a new ResponseTimeStatistics object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseTimeStatisticsWithDefaults + +`func NewResponseTimeStatisticsWithDefaults() *ResponseTimeStatistics` + +NewResponseTimeStatisticsWithDefaults instantiates a new ResponseTimeStatistics object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetResponseTime + +`func (o *ResponseTimeStatistics) GetResponseTime() interface{}` + +GetResponseTime returns the ResponseTime field if non-nil, zero value otherwise. + +### GetResponseTimeOk + +`func (o *ResponseTimeStatistics) GetResponseTimeOk() (*interface{}, bool)` + +GetResponseTimeOk returns a tuple with the ResponseTime field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResponseTime + +`func (o *ResponseTimeStatistics) SetResponseTime(v interface{})` + +SetResponseTime sets ResponseTime field to given value. + +### HasResponseTime + +`func (o *ResponseTimeStatistics) HasResponseTime() bool` + +HasResponseTime returns a boolean if a field has been set. + +### SetResponseTimeNil + +`func (o *ResponseTimeStatistics) SetResponseTimeNil(b bool)` + + SetResponseTimeNil sets the value for ResponseTime to be an explicit nil + +### UnsetResponseTime +`func (o *ResponseTimeStatistics) UnsetResponseTime()` + +UnsetResponseTime ensures that no value is present for ResponseTime, not even an explicit nil + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/SPFRecord.md b/docs/SPFRecord.md new file mode 100644 index 0000000..5d91d11 --- /dev/null +++ b/docs/SPFRecord.md @@ -0,0 +1,342 @@ +# SPFRecord + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | Pointer to [**TXTRecordValue**](TXTRecordValue.md) | | [optional] +**Type** | Pointer to **string** | | [optional] [default to "spf"] +**Id** | Pointer to **string** | | [optional] [readonly] +**Name** | Pointer to **string** | | [optional] +**Ttl** | Pointer to **int32** | | [optional] +**Cloud** | Pointer to **bool** | | [optional] [default to false] +**UpstreamHttps** | Pointer to **string** | | [optional] +**IpFilterMode** | Pointer to [**DnsRecordIpFilterMode**](DnsRecordIpFilterMode.md) | | [optional] +**IsProtected** | Pointer to **bool** | Protected records cannot be modified or deleted by user. | [optional] [readonly] [default to false] +**Usage** | Pointer to **[]string** | | [optional] [readonly] [default to []] +**CreatedAt** | Pointer to **time.Time** | | [optional] [readonly] +**UpdatedAt** | Pointer to **time.Time** | | [optional] [readonly] + +## Methods + +### NewSPFRecord + +`func NewSPFRecord() *SPFRecord` + +NewSPFRecord instantiates a new SPFRecord object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewSPFRecordWithDefaults + +`func NewSPFRecordWithDefaults() *SPFRecord` + +NewSPFRecordWithDefaults instantiates a new SPFRecord object +This 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 *SPFRecord) GetValue() TXTRecordValue` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *SPFRecord) GetValueOk() (*TXTRecordValue, 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 *SPFRecord) SetValue(v TXTRecordValue)` + +SetValue sets Value field to given value. + +### HasValue + +`func (o *SPFRecord) HasValue() bool` + +HasValue returns a boolean if a field has been set. + +### GetType + +`func (o *SPFRecord) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *SPFRecord) 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 *SPFRecord) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *SPFRecord) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetId + +`func (o *SPFRecord) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *SPFRecord) 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 *SPFRecord) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *SPFRecord) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetName + +`func (o *SPFRecord) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *SPFRecord) 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 *SPFRecord) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *SPFRecord) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetTtl + +`func (o *SPFRecord) GetTtl() int32` + +GetTtl returns the Ttl field if non-nil, zero value otherwise. + +### GetTtlOk + +`func (o *SPFRecord) GetTtlOk() (*int32, bool)` + +GetTtlOk returns a tuple with the Ttl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTtl + +`func (o *SPFRecord) SetTtl(v int32)` + +SetTtl sets Ttl field to given value. + +### HasTtl + +`func (o *SPFRecord) HasTtl() bool` + +HasTtl returns a boolean if a field has been set. + +### GetCloud + +`func (o *SPFRecord) GetCloud() bool` + +GetCloud returns the Cloud field if non-nil, zero value otherwise. + +### GetCloudOk + +`func (o *SPFRecord) GetCloudOk() (*bool, bool)` + +GetCloudOk returns a tuple with the Cloud field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCloud + +`func (o *SPFRecord) SetCloud(v bool)` + +SetCloud sets Cloud field to given value. + +### HasCloud + +`func (o *SPFRecord) HasCloud() bool` + +HasCloud returns a boolean if a field has been set. + +### GetUpstreamHttps + +`func (o *SPFRecord) GetUpstreamHttps() string` + +GetUpstreamHttps returns the UpstreamHttps field if non-nil, zero value otherwise. + +### GetUpstreamHttpsOk + +`func (o *SPFRecord) GetUpstreamHttpsOk() (*string, bool)` + +GetUpstreamHttpsOk returns a tuple with the UpstreamHttps field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpstreamHttps + +`func (o *SPFRecord) SetUpstreamHttps(v string)` + +SetUpstreamHttps sets UpstreamHttps field to given value. + +### HasUpstreamHttps + +`func (o *SPFRecord) HasUpstreamHttps() bool` + +HasUpstreamHttps returns a boolean if a field has been set. + +### GetIpFilterMode + +`func (o *SPFRecord) GetIpFilterMode() DnsRecordIpFilterMode` + +GetIpFilterMode returns the IpFilterMode field if non-nil, zero value otherwise. + +### GetIpFilterModeOk + +`func (o *SPFRecord) GetIpFilterModeOk() (*DnsRecordIpFilterMode, bool)` + +GetIpFilterModeOk returns a tuple with the IpFilterMode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIpFilterMode + +`func (o *SPFRecord) SetIpFilterMode(v DnsRecordIpFilterMode)` + +SetIpFilterMode sets IpFilterMode field to given value. + +### HasIpFilterMode + +`func (o *SPFRecord) HasIpFilterMode() bool` + +HasIpFilterMode returns a boolean if a field has been set. + +### GetIsProtected + +`func (o *SPFRecord) GetIsProtected() bool` + +GetIsProtected returns the IsProtected field if non-nil, zero value otherwise. + +### GetIsProtectedOk + +`func (o *SPFRecord) GetIsProtectedOk() (*bool, bool)` + +GetIsProtectedOk returns a tuple with the IsProtected field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsProtected + +`func (o *SPFRecord) SetIsProtected(v bool)` + +SetIsProtected sets IsProtected field to given value. + +### HasIsProtected + +`func (o *SPFRecord) HasIsProtected() bool` + +HasIsProtected returns a boolean if a field has been set. + +### GetUsage + +`func (o *SPFRecord) GetUsage() []string` + +GetUsage returns the Usage field if non-nil, zero value otherwise. + +### GetUsageOk + +`func (o *SPFRecord) GetUsageOk() (*[]string, bool)` + +GetUsageOk returns a tuple with the Usage field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUsage + +`func (o *SPFRecord) SetUsage(v []string)` + +SetUsage sets Usage field to given value. + +### HasUsage + +`func (o *SPFRecord) HasUsage() bool` + +HasUsage returns a boolean if a field has been set. + +### GetCreatedAt + +`func (o *SPFRecord) GetCreatedAt() time.Time` + +GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. + +### GetCreatedAtOk + +`func (o *SPFRecord) GetCreatedAtOk() (*time.Time, bool)` + +GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedAt + +`func (o *SPFRecord) SetCreatedAt(v time.Time)` + +SetCreatedAt sets CreatedAt field to given value. + +### HasCreatedAt + +`func (o *SPFRecord) HasCreatedAt() bool` + +HasCreatedAt returns a boolean if a field has been set. + +### GetUpdatedAt + +`func (o *SPFRecord) GetUpdatedAt() time.Time` + +GetUpdatedAt returns the UpdatedAt field if non-nil, zero value otherwise. + +### GetUpdatedAtOk + +`func (o *SPFRecord) GetUpdatedAtOk() (*time.Time, bool)` + +GetUpdatedAtOk returns a tuple with the UpdatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpdatedAt + +`func (o *SPFRecord) SetUpdatedAt(v time.Time)` + +SetUpdatedAt sets UpdatedAt field to given value. + +### HasUpdatedAt + +`func (o *SPFRecord) HasUpdatedAt() bool` + +HasUpdatedAt returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/SRVRecord.md b/docs/SRVRecord.md new file mode 100644 index 0000000..1d05ae1 --- /dev/null +++ b/docs/SRVRecord.md @@ -0,0 +1,342 @@ +# SRVRecord + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | Pointer to [**SRVRecordValue**](SRVRecordValue.md) | | [optional] +**Type** | Pointer to **string** | | [optional] [default to "srv"] +**Id** | Pointer to **string** | | [optional] [readonly] +**Name** | Pointer to **string** | | [optional] +**Ttl** | Pointer to **int32** | | [optional] +**Cloud** | Pointer to **bool** | | [optional] [default to false] +**UpstreamHttps** | Pointer to **string** | | [optional] +**IpFilterMode** | Pointer to [**DnsRecordIpFilterMode**](DnsRecordIpFilterMode.md) | | [optional] +**IsProtected** | Pointer to **bool** | Protected records cannot be modified or deleted by user. | [optional] [readonly] [default to false] +**Usage** | Pointer to **[]string** | | [optional] [readonly] [default to []] +**CreatedAt** | Pointer to **time.Time** | | [optional] [readonly] +**UpdatedAt** | Pointer to **time.Time** | | [optional] [readonly] + +## Methods + +### NewSRVRecord + +`func NewSRVRecord() *SRVRecord` + +NewSRVRecord instantiates a new SRVRecord object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewSRVRecordWithDefaults + +`func NewSRVRecordWithDefaults() *SRVRecord` + +NewSRVRecordWithDefaults instantiates a new SRVRecord object +This 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 *SRVRecord) GetValue() SRVRecordValue` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *SRVRecord) GetValueOk() (*SRVRecordValue, 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 *SRVRecord) SetValue(v SRVRecordValue)` + +SetValue sets Value field to given value. + +### HasValue + +`func (o *SRVRecord) HasValue() bool` + +HasValue returns a boolean if a field has been set. + +### GetType + +`func (o *SRVRecord) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *SRVRecord) 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 *SRVRecord) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *SRVRecord) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetId + +`func (o *SRVRecord) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *SRVRecord) 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 *SRVRecord) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *SRVRecord) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetName + +`func (o *SRVRecord) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *SRVRecord) 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 *SRVRecord) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *SRVRecord) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetTtl + +`func (o *SRVRecord) GetTtl() int32` + +GetTtl returns the Ttl field if non-nil, zero value otherwise. + +### GetTtlOk + +`func (o *SRVRecord) GetTtlOk() (*int32, bool)` + +GetTtlOk returns a tuple with the Ttl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTtl + +`func (o *SRVRecord) SetTtl(v int32)` + +SetTtl sets Ttl field to given value. + +### HasTtl + +`func (o *SRVRecord) HasTtl() bool` + +HasTtl returns a boolean if a field has been set. + +### GetCloud + +`func (o *SRVRecord) GetCloud() bool` + +GetCloud returns the Cloud field if non-nil, zero value otherwise. + +### GetCloudOk + +`func (o *SRVRecord) GetCloudOk() (*bool, bool)` + +GetCloudOk returns a tuple with the Cloud field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCloud + +`func (o *SRVRecord) SetCloud(v bool)` + +SetCloud sets Cloud field to given value. + +### HasCloud + +`func (o *SRVRecord) HasCloud() bool` + +HasCloud returns a boolean if a field has been set. + +### GetUpstreamHttps + +`func (o *SRVRecord) GetUpstreamHttps() string` + +GetUpstreamHttps returns the UpstreamHttps field if non-nil, zero value otherwise. + +### GetUpstreamHttpsOk + +`func (o *SRVRecord) GetUpstreamHttpsOk() (*string, bool)` + +GetUpstreamHttpsOk returns a tuple with the UpstreamHttps field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpstreamHttps + +`func (o *SRVRecord) SetUpstreamHttps(v string)` + +SetUpstreamHttps sets UpstreamHttps field to given value. + +### HasUpstreamHttps + +`func (o *SRVRecord) HasUpstreamHttps() bool` + +HasUpstreamHttps returns a boolean if a field has been set. + +### GetIpFilterMode + +`func (o *SRVRecord) GetIpFilterMode() DnsRecordIpFilterMode` + +GetIpFilterMode returns the IpFilterMode field if non-nil, zero value otherwise. + +### GetIpFilterModeOk + +`func (o *SRVRecord) GetIpFilterModeOk() (*DnsRecordIpFilterMode, bool)` + +GetIpFilterModeOk returns a tuple with the IpFilterMode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIpFilterMode + +`func (o *SRVRecord) SetIpFilterMode(v DnsRecordIpFilterMode)` + +SetIpFilterMode sets IpFilterMode field to given value. + +### HasIpFilterMode + +`func (o *SRVRecord) HasIpFilterMode() bool` + +HasIpFilterMode returns a boolean if a field has been set. + +### GetIsProtected + +`func (o *SRVRecord) GetIsProtected() bool` + +GetIsProtected returns the IsProtected field if non-nil, zero value otherwise. + +### GetIsProtectedOk + +`func (o *SRVRecord) GetIsProtectedOk() (*bool, bool)` + +GetIsProtectedOk returns a tuple with the IsProtected field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsProtected + +`func (o *SRVRecord) SetIsProtected(v bool)` + +SetIsProtected sets IsProtected field to given value. + +### HasIsProtected + +`func (o *SRVRecord) HasIsProtected() bool` + +HasIsProtected returns a boolean if a field has been set. + +### GetUsage + +`func (o *SRVRecord) GetUsage() []string` + +GetUsage returns the Usage field if non-nil, zero value otherwise. + +### GetUsageOk + +`func (o *SRVRecord) GetUsageOk() (*[]string, bool)` + +GetUsageOk returns a tuple with the Usage field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUsage + +`func (o *SRVRecord) SetUsage(v []string)` + +SetUsage sets Usage field to given value. + +### HasUsage + +`func (o *SRVRecord) HasUsage() bool` + +HasUsage returns a boolean if a field has been set. + +### GetCreatedAt + +`func (o *SRVRecord) GetCreatedAt() time.Time` + +GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. + +### GetCreatedAtOk + +`func (o *SRVRecord) GetCreatedAtOk() (*time.Time, bool)` + +GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedAt + +`func (o *SRVRecord) SetCreatedAt(v time.Time)` + +SetCreatedAt sets CreatedAt field to given value. + +### HasCreatedAt + +`func (o *SRVRecord) HasCreatedAt() bool` + +HasCreatedAt returns a boolean if a field has been set. + +### GetUpdatedAt + +`func (o *SRVRecord) GetUpdatedAt() time.Time` + +GetUpdatedAt returns the UpdatedAt field if non-nil, zero value otherwise. + +### GetUpdatedAtOk + +`func (o *SRVRecord) GetUpdatedAtOk() (*time.Time, bool)` + +GetUpdatedAtOk returns a tuple with the UpdatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpdatedAt + +`func (o *SRVRecord) SetUpdatedAt(v time.Time)` + +SetUpdatedAt sets UpdatedAt field to given value. + +### HasUpdatedAt + +`func (o *SRVRecord) HasUpdatedAt() bool` + +HasUpdatedAt returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/SRVRecordValue.md b/docs/SRVRecordValue.md new file mode 100644 index 0000000..c15ac64 --- /dev/null +++ b/docs/SRVRecordValue.md @@ -0,0 +1,154 @@ +# SRVRecordValue + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Target** | **string** | | +**Port** | **NullableInt32** | | +**Weight** | Pointer to **NullableInt32** | | [optional] +**Priority** | Pointer to **NullableInt32** | | [optional] + +## Methods + +### NewSRVRecordValue + +`func NewSRVRecordValue(target string, port NullableInt32, ) *SRVRecordValue` + +NewSRVRecordValue instantiates a new SRVRecordValue object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewSRVRecordValueWithDefaults + +`func NewSRVRecordValueWithDefaults() *SRVRecordValue` + +NewSRVRecordValueWithDefaults instantiates a new SRVRecordValue object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetTarget + +`func (o *SRVRecordValue) GetTarget() string` + +GetTarget returns the Target field if non-nil, zero value otherwise. + +### GetTargetOk + +`func (o *SRVRecordValue) 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 *SRVRecordValue) SetTarget(v string)` + +SetTarget sets Target field to given value. + + +### GetPort + +`func (o *SRVRecordValue) GetPort() int32` + +GetPort returns the Port field if non-nil, zero value otherwise. + +### GetPortOk + +`func (o *SRVRecordValue) GetPortOk() (*int32, bool)` + +GetPortOk returns a tuple with the Port field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPort + +`func (o *SRVRecordValue) SetPort(v int32)` + +SetPort sets Port field to given value. + + +### SetPortNil + +`func (o *SRVRecordValue) SetPortNil(b bool)` + + SetPortNil sets the value for Port to be an explicit nil + +### UnsetPort +`func (o *SRVRecordValue) UnsetPort()` + +UnsetPort ensures that no value is present for Port, not even an explicit nil +### GetWeight + +`func (o *SRVRecordValue) GetWeight() int32` + +GetWeight returns the Weight field if non-nil, zero value otherwise. + +### GetWeightOk + +`func (o *SRVRecordValue) GetWeightOk() (*int32, bool)` + +GetWeightOk returns a tuple with the Weight field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetWeight + +`func (o *SRVRecordValue) SetWeight(v int32)` + +SetWeight sets Weight field to given value. + +### HasWeight + +`func (o *SRVRecordValue) HasWeight() bool` + +HasWeight returns a boolean if a field has been set. + +### SetWeightNil + +`func (o *SRVRecordValue) SetWeightNil(b bool)` + + SetWeightNil sets the value for Weight to be an explicit nil + +### UnsetWeight +`func (o *SRVRecordValue) UnsetWeight()` + +UnsetWeight ensures that no value is present for Weight, not even an explicit nil +### GetPriority + +`func (o *SRVRecordValue) GetPriority() int32` + +GetPriority returns the Priority field if non-nil, zero value otherwise. + +### GetPriorityOk + +`func (o *SRVRecordValue) GetPriorityOk() (*int32, bool)` + +GetPriorityOk returns a tuple with the Priority field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPriority + +`func (o *SRVRecordValue) SetPriority(v int32)` + +SetPriority sets Priority field to given value. + +### HasPriority + +`func (o *SRVRecordValue) HasPriority() bool` + +HasPriority returns a boolean if a field has been set. + +### SetPriorityNil + +`func (o *SRVRecordValue) SetPriorityNil(b bool)` + + SetPriorityNil sets the value for Priority to be an explicit nil + +### UnsetPriority +`func (o *SRVRecordValue) UnsetPriority()` + +UnsetPriority ensures that no value is present for Priority, not even an explicit nil + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/SSLTLSApi.md b/docs/SSLTLSApi.md new file mode 100644 index 0000000..992c3c0 --- /dev/null +++ b/docs/SSLTLSApi.md @@ -0,0 +1,431 @@ +# \SSLTLSApi + +All URIs are relative to *https://napi.arvancloud.ir/cdn/4.0* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**SslCertDestroy**](SSLTLSApi.md#SslCertDestroy) | **Delete** /domains/{domain}/ssl/certificates/{id} | Delete an unused customer certificate +[**SslCertOrderIndex**](SSLTLSApi.md#SslCertOrderIndex) | **Get** /domains/{domain}/ssl/orders | Get All Managed certificate orders history +[**SslCertOrderRetry**](SSLTLSApi.md#SslCertOrderRetry) | **Post** /domains/{domain}/ssl/orders/action/retry | Retry a previously `killed` order +[**SslCertStore**](SSLTLSApi.md#SslCertStore) | **Post** /domains/{domain}/ssl/certificates | Upload Certificate +[**SslIndex**](SSLTLSApi.md#SslIndex) | **Get** /domains/{domain}/ssl | Get SSL settings +[**SslUpdate**](SSLTLSApi.md#SslUpdate) | **Patch** /domains/{domain}/ssl | Update domain's SSL configuration + + + +## SslCertDestroy + +> MessageResponse SslCertDestroy(ctx, domain, id).Execute() + +Delete an unused customer certificate + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SSLTLSApi.SslCertDestroy(context.Background(), domain, id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SSLTLSApi.SslCertDestroy``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SslCertDestroy`: MessageResponse + fmt.Fprintf(os.Stdout, "Response from `SSLTLSApi.SslCertDestroy`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | +**id** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiSslCertDestroyRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + +[**MessageResponse**](MessageResponse.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## SslCertOrderIndex + +> SslCertOrderIndex200Response SslCertOrderIndex(ctx, domain).Execute() + +Get All Managed certificate orders history + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SSLTLSApi.SslCertOrderIndex(context.Background(), domain).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SSLTLSApi.SslCertOrderIndex``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SslCertOrderIndex`: SslCertOrderIndex200Response + fmt.Fprintf(os.Stdout, "Response from `SSLTLSApi.SslCertOrderIndex`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiSslCertOrderIndexRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**SslCertOrderIndex200Response**](SslCertOrderIndex200Response.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## SslCertOrderRetry + +> MessageResponse SslCertOrderRetry(ctx, domain).Execute() + +Retry a previously `killed` order + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SSLTLSApi.SslCertOrderRetry(context.Background(), domain).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SSLTLSApi.SslCertOrderRetry``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SslCertOrderRetry`: MessageResponse + fmt.Fprintf(os.Stdout, "Response from `SSLTLSApi.SslCertOrderRetry`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiSslCertOrderRetryRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**MessageResponse**](MessageResponse.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## SslCertStore + +> MessageResponse SslCertStore(ctx, domain).Certificate(certificate).PrivateKey(privateKey).Execute() + +Upload Certificate + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + certificate := os.NewFile(1234, "some_file") // *os.File | (optional) + privateKey := os.NewFile(1234, "some_file") // *os.File | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SSLTLSApi.SslCertStore(context.Background(), domain).Certificate(certificate).PrivateKey(privateKey).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SSLTLSApi.SslCertStore``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SslCertStore`: MessageResponse + fmt.Fprintf(os.Stdout, "Response from `SSLTLSApi.SslCertStore`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiSslCertStoreRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **certificate** | ***os.File** | | + **privateKey** | ***os.File** | | + +### Return type + +[**MessageResponse**](MessageResponse.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: multipart/form-data +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## SslIndex + +> SslResponse SslIndex(ctx, domain).Execute() + +Get SSL settings + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SSLTLSApi.SslIndex(context.Background(), domain).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SSLTLSApi.SslIndex``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SslIndex`: SslResponse + fmt.Fprintf(os.Stdout, "Response from `SSLTLSApi.SslIndex`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiSslIndexRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**SslResponse**](SslResponse.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## SslUpdate + +> SslResponse SslUpdate(ctx, domain).SslUpdate(sslUpdate).Execute() + +Update domain's SSL configuration + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + sslUpdate := *openapiclient.NewSslUpdate() // SslUpdate | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SSLTLSApi.SslUpdate(context.Background(), domain).SslUpdate(sslUpdate).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SSLTLSApi.SslUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SslUpdate`: SslResponse + fmt.Fprintf(os.Stdout, "Response from `SSLTLSApi.SslUpdate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiSslUpdateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **sslUpdate** | [**SslUpdate**](SslUpdate.md) | | + +### Return type + +[**SslResponse**](SslResponse.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + diff --git a/docs/SavedTrafficsCharts.md b/docs/SavedTrafficsCharts.md new file mode 100644 index 0000000..c6fbff8 --- /dev/null +++ b/docs/SavedTrafficsCharts.md @@ -0,0 +1,82 @@ +# SavedTrafficsCharts + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Request** | Pointer to [**[]SavedTrafficsChartsRequestInner**](SavedTrafficsChartsRequestInner.md) | | [optional] +**Traffic** | Pointer to [**[]SavedTrafficsChartsTrafficInner**](SavedTrafficsChartsTrafficInner.md) | | [optional] + +## Methods + +### NewSavedTrafficsCharts + +`func NewSavedTrafficsCharts() *SavedTrafficsCharts` + +NewSavedTrafficsCharts instantiates a new SavedTrafficsCharts object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewSavedTrafficsChartsWithDefaults + +`func NewSavedTrafficsChartsWithDefaults() *SavedTrafficsCharts` + +NewSavedTrafficsChartsWithDefaults instantiates a new SavedTrafficsCharts object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetRequest + +`func (o *SavedTrafficsCharts) GetRequest() []SavedTrafficsChartsRequestInner` + +GetRequest returns the Request field if non-nil, zero value otherwise. + +### GetRequestOk + +`func (o *SavedTrafficsCharts) GetRequestOk() (*[]SavedTrafficsChartsRequestInner, bool)` + +GetRequestOk returns a tuple with the Request field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRequest + +`func (o *SavedTrafficsCharts) SetRequest(v []SavedTrafficsChartsRequestInner)` + +SetRequest sets Request field to given value. + +### HasRequest + +`func (o *SavedTrafficsCharts) HasRequest() bool` + +HasRequest returns a boolean if a field has been set. + +### GetTraffic + +`func (o *SavedTrafficsCharts) GetTraffic() []SavedTrafficsChartsTrafficInner` + +GetTraffic returns the Traffic field if non-nil, zero value otherwise. + +### GetTrafficOk + +`func (o *SavedTrafficsCharts) GetTrafficOk() (*[]SavedTrafficsChartsTrafficInner, bool)` + +GetTrafficOk returns a tuple with the Traffic field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTraffic + +`func (o *SavedTrafficsCharts) SetTraffic(v []SavedTrafficsChartsTrafficInner)` + +SetTraffic sets Traffic field to given value. + +### HasTraffic + +`func (o *SavedTrafficsCharts) HasTraffic() bool` + +HasTraffic returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/SavedTrafficsChartsRequestInner.md b/docs/SavedTrafficsChartsRequestInner.md new file mode 100644 index 0000000..7b27a88 --- /dev/null +++ b/docs/SavedTrafficsChartsRequestInner.md @@ -0,0 +1,82 @@ +# SavedTrafficsChartsRequestInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **string** | | [optional] +**Y** | Pointer to **int32** | | [optional] + +## Methods + +### NewSavedTrafficsChartsRequestInner + +`func NewSavedTrafficsChartsRequestInner() *SavedTrafficsChartsRequestInner` + +NewSavedTrafficsChartsRequestInner instantiates a new SavedTrafficsChartsRequestInner object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewSavedTrafficsChartsRequestInnerWithDefaults + +`func NewSavedTrafficsChartsRequestInnerWithDefaults() *SavedTrafficsChartsRequestInner` + +NewSavedTrafficsChartsRequestInnerWithDefaults instantiates a new SavedTrafficsChartsRequestInner object +This 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 *SavedTrafficsChartsRequestInner) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *SavedTrafficsChartsRequestInner) 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 *SavedTrafficsChartsRequestInner) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *SavedTrafficsChartsRequestInner) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetY + +`func (o *SavedTrafficsChartsRequestInner) GetY() int32` + +GetY returns the Y field if non-nil, zero value otherwise. + +### GetYOk + +`func (o *SavedTrafficsChartsRequestInner) GetYOk() (*int32, bool)` + +GetYOk returns a tuple with the Y field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetY + +`func (o *SavedTrafficsChartsRequestInner) SetY(v int32)` + +SetY sets Y field to given value. + +### HasY + +`func (o *SavedTrafficsChartsRequestInner) HasY() bool` + +HasY returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/SavedTrafficsChartsTrafficInner.md b/docs/SavedTrafficsChartsTrafficInner.md new file mode 100644 index 0000000..036d6a0 --- /dev/null +++ b/docs/SavedTrafficsChartsTrafficInner.md @@ -0,0 +1,82 @@ +# SavedTrafficsChartsTrafficInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **string** | | [optional] +**Y** | Pointer to **int32** | | [optional] + +## Methods + +### NewSavedTrafficsChartsTrafficInner + +`func NewSavedTrafficsChartsTrafficInner() *SavedTrafficsChartsTrafficInner` + +NewSavedTrafficsChartsTrafficInner instantiates a new SavedTrafficsChartsTrafficInner object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewSavedTrafficsChartsTrafficInnerWithDefaults + +`func NewSavedTrafficsChartsTrafficInnerWithDefaults() *SavedTrafficsChartsTrafficInner` + +NewSavedTrafficsChartsTrafficInnerWithDefaults instantiates a new SavedTrafficsChartsTrafficInner object +This 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 *SavedTrafficsChartsTrafficInner) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *SavedTrafficsChartsTrafficInner) 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 *SavedTrafficsChartsTrafficInner) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *SavedTrafficsChartsTrafficInner) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetY + +`func (o *SavedTrafficsChartsTrafficInner) GetY() int32` + +GetY returns the Y field if non-nil, zero value otherwise. + +### GetYOk + +`func (o *SavedTrafficsChartsTrafficInner) GetYOk() (*int32, bool)` + +GetYOk returns a tuple with the Y field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetY + +`func (o *SavedTrafficsChartsTrafficInner) SetY(v int32)` + +SetY sets Y field to given value. + +### HasY + +`func (o *SavedTrafficsChartsTrafficInner) HasY() bool` + +HasY returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/SavedTrafficsData.md b/docs/SavedTrafficsData.md new file mode 100644 index 0000000..1c84495 --- /dev/null +++ b/docs/SavedTrafficsData.md @@ -0,0 +1,56 @@ +# SavedTrafficsData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to **map[string]interface{}** | | [optional] + +## Methods + +### NewSavedTrafficsData + +`func NewSavedTrafficsData() *SavedTrafficsData` + +NewSavedTrafficsData instantiates a new SavedTrafficsData object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewSavedTrafficsDataWithDefaults + +`func NewSavedTrafficsDataWithDefaults() *SavedTrafficsData` + +NewSavedTrafficsDataWithDefaults instantiates a new SavedTrafficsData object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *SavedTrafficsData) GetData() map[string]interface{}` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *SavedTrafficsData) GetDataOk() (*map[string]interface{}, 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 *SavedTrafficsData) SetData(v map[string]interface{})` + +SetData sets Data field to given value. + +### HasData + +`func (o *SavedTrafficsData) HasData() bool` + +HasData returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/SavedTrafficsStatistics.md b/docs/SavedTrafficsStatistics.md new file mode 100644 index 0000000..39d4c0e --- /dev/null +++ b/docs/SavedTrafficsStatistics.md @@ -0,0 +1,82 @@ +# SavedTrafficsStatistics + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Traffic** | Pointer to [**SavedTrafficsStatisticsTraffic**](SavedTrafficsStatisticsTraffic.md) | | [optional] +**Request** | Pointer to [**SavedTrafficsStatisticsTraffic**](SavedTrafficsStatisticsTraffic.md) | | [optional] + +## Methods + +### NewSavedTrafficsStatistics + +`func NewSavedTrafficsStatistics() *SavedTrafficsStatistics` + +NewSavedTrafficsStatistics instantiates a new SavedTrafficsStatistics object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewSavedTrafficsStatisticsWithDefaults + +`func NewSavedTrafficsStatisticsWithDefaults() *SavedTrafficsStatistics` + +NewSavedTrafficsStatisticsWithDefaults instantiates a new SavedTrafficsStatistics object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetTraffic + +`func (o *SavedTrafficsStatistics) GetTraffic() SavedTrafficsStatisticsTraffic` + +GetTraffic returns the Traffic field if non-nil, zero value otherwise. + +### GetTrafficOk + +`func (o *SavedTrafficsStatistics) GetTrafficOk() (*SavedTrafficsStatisticsTraffic, bool)` + +GetTrafficOk returns a tuple with the Traffic field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTraffic + +`func (o *SavedTrafficsStatistics) SetTraffic(v SavedTrafficsStatisticsTraffic)` + +SetTraffic sets Traffic field to given value. + +### HasTraffic + +`func (o *SavedTrafficsStatistics) HasTraffic() bool` + +HasTraffic returns a boolean if a field has been set. + +### GetRequest + +`func (o *SavedTrafficsStatistics) GetRequest() SavedTrafficsStatisticsTraffic` + +GetRequest returns the Request field if non-nil, zero value otherwise. + +### GetRequestOk + +`func (o *SavedTrafficsStatistics) GetRequestOk() (*SavedTrafficsStatisticsTraffic, bool)` + +GetRequestOk returns a tuple with the Request field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRequest + +`func (o *SavedTrafficsStatistics) SetRequest(v SavedTrafficsStatisticsTraffic)` + +SetRequest sets Request field to given value. + +### HasRequest + +`func (o *SavedTrafficsStatistics) HasRequest() bool` + +HasRequest returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/SavedTrafficsStatisticsTraffic.md b/docs/SavedTrafficsStatisticsTraffic.md new file mode 100644 index 0000000..4f06052 --- /dev/null +++ b/docs/SavedTrafficsStatisticsTraffic.md @@ -0,0 +1,82 @@ +# SavedTrafficsStatisticsTraffic + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Saved** | Pointer to **int32** | | [optional] +**Total** | Pointer to **int32** | | [optional] + +## Methods + +### NewSavedTrafficsStatisticsTraffic + +`func NewSavedTrafficsStatisticsTraffic() *SavedTrafficsStatisticsTraffic` + +NewSavedTrafficsStatisticsTraffic instantiates a new SavedTrafficsStatisticsTraffic object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewSavedTrafficsStatisticsTrafficWithDefaults + +`func NewSavedTrafficsStatisticsTrafficWithDefaults() *SavedTrafficsStatisticsTraffic` + +NewSavedTrafficsStatisticsTrafficWithDefaults instantiates a new SavedTrafficsStatisticsTraffic object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetSaved + +`func (o *SavedTrafficsStatisticsTraffic) GetSaved() int32` + +GetSaved returns the Saved field if non-nil, zero value otherwise. + +### GetSavedOk + +`func (o *SavedTrafficsStatisticsTraffic) GetSavedOk() (*int32, bool)` + +GetSavedOk returns a tuple with the Saved field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSaved + +`func (o *SavedTrafficsStatisticsTraffic) SetSaved(v int32)` + +SetSaved sets Saved field to given value. + +### HasSaved + +`func (o *SavedTrafficsStatisticsTraffic) HasSaved() bool` + +HasSaved returns a boolean if a field has been set. + +### GetTotal + +`func (o *SavedTrafficsStatisticsTraffic) GetTotal() int32` + +GetTotal returns the Total field if non-nil, zero value otherwise. + +### GetTotalOk + +`func (o *SavedTrafficsStatisticsTraffic) 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 *SavedTrafficsStatisticsTraffic) SetTotal(v int32)` + +SetTotal sets Total field to given value. + +### HasTotal + +`func (o *SavedTrafficsStatisticsTraffic) HasTotal() bool` + +HasTotal returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/Ssl.md b/docs/Ssl.md new file mode 100644 index 0000000..a5e7ea7 --- /dev/null +++ b/docs/Ssl.md @@ -0,0 +1,326 @@ +# Ssl + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**SslStatus** | Pointer to **bool** | Whether Domain is using ssl module or not | [optional] +**CertificateMode** | Pointer to **string** | Indicates certificate is managed by arvan, or its up to the user | [optional] [readonly] +**TlsVersion** | Pointer to **string** | Minimum version of TLS. Empty ('') means default. | [optional] +**HstsStatus** | Pointer to **bool** | Whether HSTS is enabled | [optional] +**HstsMaxAge** | Pointer to **string** | HSTS max age directive | [optional] +**HstsSubdomain** | Pointer to **bool** | | [optional] +**HstsPreload** | Pointer to **bool** | | [optional] +**HttpsRedirect** | Pointer to **bool** | | [optional] +**ReplaceHttp** | Pointer to **bool** | Replace HTTP with HTTPs in HTML and JS sources | [optional] +**Certificates** | Pointer to [**[]Certificate**](Certificate.md) | | [optional] [readonly] +**Orders** | Pointer to [**[]CertificateOrder**](CertificateOrder.md) | returns all \"certificate orders\" since the last invalid or canceled order | [optional] [readonly] + +## Methods + +### NewSsl + +`func NewSsl() *Ssl` + +NewSsl instantiates a new Ssl object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewSslWithDefaults + +`func NewSslWithDefaults() *Ssl` + +NewSslWithDefaults instantiates a new Ssl object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetSslStatus + +`func (o *Ssl) GetSslStatus() bool` + +GetSslStatus returns the SslStatus field if non-nil, zero value otherwise. + +### GetSslStatusOk + +`func (o *Ssl) GetSslStatusOk() (*bool, bool)` + +GetSslStatusOk returns a tuple with the SslStatus field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSslStatus + +`func (o *Ssl) SetSslStatus(v bool)` + +SetSslStatus sets SslStatus field to given value. + +### HasSslStatus + +`func (o *Ssl) HasSslStatus() bool` + +HasSslStatus returns a boolean if a field has been set. + +### GetCertificateMode + +`func (o *Ssl) GetCertificateMode() string` + +GetCertificateMode returns the CertificateMode field if non-nil, zero value otherwise. + +### GetCertificateModeOk + +`func (o *Ssl) GetCertificateModeOk() (*string, bool)` + +GetCertificateModeOk returns a tuple with the CertificateMode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCertificateMode + +`func (o *Ssl) SetCertificateMode(v string)` + +SetCertificateMode sets CertificateMode field to given value. + +### HasCertificateMode + +`func (o *Ssl) HasCertificateMode() bool` + +HasCertificateMode returns a boolean if a field has been set. + +### GetTlsVersion + +`func (o *Ssl) GetTlsVersion() string` + +GetTlsVersion returns the TlsVersion field if non-nil, zero value otherwise. + +### GetTlsVersionOk + +`func (o *Ssl) GetTlsVersionOk() (*string, bool)` + +GetTlsVersionOk returns a tuple with the TlsVersion field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTlsVersion + +`func (o *Ssl) SetTlsVersion(v string)` + +SetTlsVersion sets TlsVersion field to given value. + +### HasTlsVersion + +`func (o *Ssl) HasTlsVersion() bool` + +HasTlsVersion returns a boolean if a field has been set. + +### GetHstsStatus + +`func (o *Ssl) GetHstsStatus() bool` + +GetHstsStatus returns the HstsStatus field if non-nil, zero value otherwise. + +### GetHstsStatusOk + +`func (o *Ssl) GetHstsStatusOk() (*bool, bool)` + +GetHstsStatusOk returns a tuple with the HstsStatus field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHstsStatus + +`func (o *Ssl) SetHstsStatus(v bool)` + +SetHstsStatus sets HstsStatus field to given value. + +### HasHstsStatus + +`func (o *Ssl) HasHstsStatus() bool` + +HasHstsStatus returns a boolean if a field has been set. + +### GetHstsMaxAge + +`func (o *Ssl) GetHstsMaxAge() string` + +GetHstsMaxAge returns the HstsMaxAge field if non-nil, zero value otherwise. + +### GetHstsMaxAgeOk + +`func (o *Ssl) GetHstsMaxAgeOk() (*string, bool)` + +GetHstsMaxAgeOk returns a tuple with the HstsMaxAge field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHstsMaxAge + +`func (o *Ssl) SetHstsMaxAge(v string)` + +SetHstsMaxAge sets HstsMaxAge field to given value. + +### HasHstsMaxAge + +`func (o *Ssl) HasHstsMaxAge() bool` + +HasHstsMaxAge returns a boolean if a field has been set. + +### GetHstsSubdomain + +`func (o *Ssl) GetHstsSubdomain() bool` + +GetHstsSubdomain returns the HstsSubdomain field if non-nil, zero value otherwise. + +### GetHstsSubdomainOk + +`func (o *Ssl) GetHstsSubdomainOk() (*bool, bool)` + +GetHstsSubdomainOk returns a tuple with the HstsSubdomain field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHstsSubdomain + +`func (o *Ssl) SetHstsSubdomain(v bool)` + +SetHstsSubdomain sets HstsSubdomain field to given value. + +### HasHstsSubdomain + +`func (o *Ssl) HasHstsSubdomain() bool` + +HasHstsSubdomain returns a boolean if a field has been set. + +### GetHstsPreload + +`func (o *Ssl) GetHstsPreload() bool` + +GetHstsPreload returns the HstsPreload field if non-nil, zero value otherwise. + +### GetHstsPreloadOk + +`func (o *Ssl) GetHstsPreloadOk() (*bool, bool)` + +GetHstsPreloadOk returns a tuple with the HstsPreload field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHstsPreload + +`func (o *Ssl) SetHstsPreload(v bool)` + +SetHstsPreload sets HstsPreload field to given value. + +### HasHstsPreload + +`func (o *Ssl) HasHstsPreload() bool` + +HasHstsPreload returns a boolean if a field has been set. + +### GetHttpsRedirect + +`func (o *Ssl) GetHttpsRedirect() bool` + +GetHttpsRedirect returns the HttpsRedirect field if non-nil, zero value otherwise. + +### GetHttpsRedirectOk + +`func (o *Ssl) GetHttpsRedirectOk() (*bool, bool)` + +GetHttpsRedirectOk returns a tuple with the HttpsRedirect field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHttpsRedirect + +`func (o *Ssl) SetHttpsRedirect(v bool)` + +SetHttpsRedirect sets HttpsRedirect field to given value. + +### HasHttpsRedirect + +`func (o *Ssl) HasHttpsRedirect() bool` + +HasHttpsRedirect returns a boolean if a field has been set. + +### GetReplaceHttp + +`func (o *Ssl) GetReplaceHttp() bool` + +GetReplaceHttp returns the ReplaceHttp field if non-nil, zero value otherwise. + +### GetReplaceHttpOk + +`func (o *Ssl) GetReplaceHttpOk() (*bool, bool)` + +GetReplaceHttpOk returns a tuple with the ReplaceHttp field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetReplaceHttp + +`func (o *Ssl) SetReplaceHttp(v bool)` + +SetReplaceHttp sets ReplaceHttp field to given value. + +### HasReplaceHttp + +`func (o *Ssl) HasReplaceHttp() bool` + +HasReplaceHttp returns a boolean if a field has been set. + +### GetCertificates + +`func (o *Ssl) GetCertificates() []Certificate` + +GetCertificates returns the Certificates field if non-nil, zero value otherwise. + +### GetCertificatesOk + +`func (o *Ssl) GetCertificatesOk() (*[]Certificate, bool)` + +GetCertificatesOk returns a tuple with the Certificates field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCertificates + +`func (o *Ssl) SetCertificates(v []Certificate)` + +SetCertificates sets Certificates field to given value. + +### HasCertificates + +`func (o *Ssl) HasCertificates() bool` + +HasCertificates returns a boolean if a field has been set. + +### GetOrders + +`func (o *Ssl) GetOrders() []CertificateOrder` + +GetOrders returns the Orders field if non-nil, zero value otherwise. + +### GetOrdersOk + +`func (o *Ssl) GetOrdersOk() (*[]CertificateOrder, bool)` + +GetOrdersOk returns a tuple with the Orders field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOrders + +`func (o *Ssl) SetOrders(v []CertificateOrder)` + +SetOrders sets Orders field to given value. + +### HasOrders + +`func (o *Ssl) HasOrders() bool` + +HasOrders returns a boolean if a field has been set. + +### SetOrdersNil + +`func (o *Ssl) SetOrdersNil(b bool)` + + SetOrdersNil sets the value for Orders to be an explicit nil + +### UnsetOrders +`func (o *Ssl) UnsetOrders()` + +UnsetOrders ensures that no value is present for Orders, not even an explicit nil + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/SslCertOrderIndex200Response.md b/docs/SslCertOrderIndex200Response.md new file mode 100644 index 0000000..012e937 --- /dev/null +++ b/docs/SslCertOrderIndex200Response.md @@ -0,0 +1,92 @@ +# SslCertOrderIndex200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**[]CertificateOrder**](CertificateOrder.md) | | [optional] +**Message** | Pointer to **NullableString** | | [optional] + +## Methods + +### NewSslCertOrderIndex200Response + +`func NewSslCertOrderIndex200Response() *SslCertOrderIndex200Response` + +NewSslCertOrderIndex200Response instantiates a new SslCertOrderIndex200Response object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewSslCertOrderIndex200ResponseWithDefaults + +`func NewSslCertOrderIndex200ResponseWithDefaults() *SslCertOrderIndex200Response` + +NewSslCertOrderIndex200ResponseWithDefaults instantiates a new SslCertOrderIndex200Response object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *SslCertOrderIndex200Response) GetData() []CertificateOrder` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *SslCertOrderIndex200Response) GetDataOk() (*[]CertificateOrder, 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 *SslCertOrderIndex200Response) SetData(v []CertificateOrder)` + +SetData sets Data field to given value. + +### HasData + +`func (o *SslCertOrderIndex200Response) HasData() bool` + +HasData returns a boolean if a field has been set. + +### GetMessage + +`func (o *SslCertOrderIndex200Response) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *SslCertOrderIndex200Response) GetMessageOk() (*string, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessage + +`func (o *SslCertOrderIndex200Response) SetMessage(v string)` + +SetMessage sets Message field to given value. + +### HasMessage + +`func (o *SslCertOrderIndex200Response) HasMessage() bool` + +HasMessage returns a boolean if a field has been set. + +### SetMessageNil + +`func (o *SslCertOrderIndex200Response) SetMessageNil(b bool)` + + SetMessageNil sets the value for Message to be an explicit nil + +### UnsetMessage +`func (o *SslCertOrderIndex200Response) UnsetMessage()` + +UnsetMessage ensures that no value is present for Message, not even an explicit nil + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/SslResponse.md b/docs/SslResponse.md new file mode 100644 index 0000000..1d69284 --- /dev/null +++ b/docs/SslResponse.md @@ -0,0 +1,92 @@ +# SslResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**Ssl**](Ssl.md) | | [optional] +**Message** | Pointer to **NullableString** | | [optional] + +## Methods + +### NewSslResponse + +`func NewSslResponse() *SslResponse` + +NewSslResponse instantiates a new SslResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewSslResponseWithDefaults + +`func NewSslResponseWithDefaults() *SslResponse` + +NewSslResponseWithDefaults instantiates a new SslResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *SslResponse) GetData() Ssl` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *SslResponse) GetDataOk() (*Ssl, 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 *SslResponse) SetData(v Ssl)` + +SetData sets Data field to given value. + +### HasData + +`func (o *SslResponse) HasData() bool` + +HasData returns a boolean if a field has been set. + +### GetMessage + +`func (o *SslResponse) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *SslResponse) GetMessageOk() (*string, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessage + +`func (o *SslResponse) SetMessage(v string)` + +SetMessage sets Message field to given value. + +### HasMessage + +`func (o *SslResponse) HasMessage() bool` + +HasMessage returns a boolean if a field has been set. + +### SetMessageNil + +`func (o *SslResponse) SetMessageNil(b bool)` + + SetMessageNil sets the value for Message to be an explicit nil + +### UnsetMessage +`func (o *SslResponse) UnsetMessage()` + +UnsetMessage ensures that no value is present for Message, not even an explicit nil + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/SslUpdate.md b/docs/SslUpdate.md new file mode 100644 index 0000000..3897875 --- /dev/null +++ b/docs/SslUpdate.md @@ -0,0 +1,378 @@ +# SslUpdate + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Certificate** | Pointer to **string** | a user uploaded certificate's uuid or `managed` | [optional] +**CertificateKeyType** | Pointer to **string** | | [optional] +**SslStatus** | Pointer to **bool** | Whether Domain is using ssl module or not | [optional] +**CertificateMode** | Pointer to **string** | Indicates certificate is managed by arvan, or its up to the user | [optional] [readonly] +**TlsVersion** | Pointer to **string** | Minimum version of TLS. Empty ('') means default. | [optional] +**HstsStatus** | Pointer to **bool** | Whether HSTS is enabled | [optional] +**HstsMaxAge** | Pointer to **string** | HSTS max age directive | [optional] +**HstsSubdomain** | Pointer to **bool** | | [optional] +**HstsPreload** | Pointer to **bool** | | [optional] +**HttpsRedirect** | Pointer to **bool** | | [optional] +**ReplaceHttp** | Pointer to **bool** | Replace HTTP with HTTPs in HTML and JS sources | [optional] +**Certificates** | Pointer to [**[]Certificate**](Certificate.md) | | [optional] [readonly] +**Orders** | Pointer to [**[]CertificateOrder**](CertificateOrder.md) | returns all \"certificate orders\" since the last invalid or canceled order | [optional] [readonly] + +## Methods + +### NewSslUpdate + +`func NewSslUpdate() *SslUpdate` + +NewSslUpdate instantiates a new SslUpdate object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewSslUpdateWithDefaults + +`func NewSslUpdateWithDefaults() *SslUpdate` + +NewSslUpdateWithDefaults instantiates a new SslUpdate object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCertificate + +`func (o *SslUpdate) GetCertificate() string` + +GetCertificate returns the Certificate field if non-nil, zero value otherwise. + +### GetCertificateOk + +`func (o *SslUpdate) GetCertificateOk() (*string, bool)` + +GetCertificateOk returns a tuple with the Certificate field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCertificate + +`func (o *SslUpdate) SetCertificate(v string)` + +SetCertificate sets Certificate field to given value. + +### HasCertificate + +`func (o *SslUpdate) HasCertificate() bool` + +HasCertificate returns a boolean if a field has been set. + +### GetCertificateKeyType + +`func (o *SslUpdate) GetCertificateKeyType() string` + +GetCertificateKeyType returns the CertificateKeyType field if non-nil, zero value otherwise. + +### GetCertificateKeyTypeOk + +`func (o *SslUpdate) GetCertificateKeyTypeOk() (*string, bool)` + +GetCertificateKeyTypeOk returns a tuple with the CertificateKeyType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCertificateKeyType + +`func (o *SslUpdate) SetCertificateKeyType(v string)` + +SetCertificateKeyType sets CertificateKeyType field to given value. + +### HasCertificateKeyType + +`func (o *SslUpdate) HasCertificateKeyType() bool` + +HasCertificateKeyType returns a boolean if a field has been set. + +### GetSslStatus + +`func (o *SslUpdate) GetSslStatus() bool` + +GetSslStatus returns the SslStatus field if non-nil, zero value otherwise. + +### GetSslStatusOk + +`func (o *SslUpdate) GetSslStatusOk() (*bool, bool)` + +GetSslStatusOk returns a tuple with the SslStatus field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSslStatus + +`func (o *SslUpdate) SetSslStatus(v bool)` + +SetSslStatus sets SslStatus field to given value. + +### HasSslStatus + +`func (o *SslUpdate) HasSslStatus() bool` + +HasSslStatus returns a boolean if a field has been set. + +### GetCertificateMode + +`func (o *SslUpdate) GetCertificateMode() string` + +GetCertificateMode returns the CertificateMode field if non-nil, zero value otherwise. + +### GetCertificateModeOk + +`func (o *SslUpdate) GetCertificateModeOk() (*string, bool)` + +GetCertificateModeOk returns a tuple with the CertificateMode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCertificateMode + +`func (o *SslUpdate) SetCertificateMode(v string)` + +SetCertificateMode sets CertificateMode field to given value. + +### HasCertificateMode + +`func (o *SslUpdate) HasCertificateMode() bool` + +HasCertificateMode returns a boolean if a field has been set. + +### GetTlsVersion + +`func (o *SslUpdate) GetTlsVersion() string` + +GetTlsVersion returns the TlsVersion field if non-nil, zero value otherwise. + +### GetTlsVersionOk + +`func (o *SslUpdate) GetTlsVersionOk() (*string, bool)` + +GetTlsVersionOk returns a tuple with the TlsVersion field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTlsVersion + +`func (o *SslUpdate) SetTlsVersion(v string)` + +SetTlsVersion sets TlsVersion field to given value. + +### HasTlsVersion + +`func (o *SslUpdate) HasTlsVersion() bool` + +HasTlsVersion returns a boolean if a field has been set. + +### GetHstsStatus + +`func (o *SslUpdate) GetHstsStatus() bool` + +GetHstsStatus returns the HstsStatus field if non-nil, zero value otherwise. + +### GetHstsStatusOk + +`func (o *SslUpdate) GetHstsStatusOk() (*bool, bool)` + +GetHstsStatusOk returns a tuple with the HstsStatus field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHstsStatus + +`func (o *SslUpdate) SetHstsStatus(v bool)` + +SetHstsStatus sets HstsStatus field to given value. + +### HasHstsStatus + +`func (o *SslUpdate) HasHstsStatus() bool` + +HasHstsStatus returns a boolean if a field has been set. + +### GetHstsMaxAge + +`func (o *SslUpdate) GetHstsMaxAge() string` + +GetHstsMaxAge returns the HstsMaxAge field if non-nil, zero value otherwise. + +### GetHstsMaxAgeOk + +`func (o *SslUpdate) GetHstsMaxAgeOk() (*string, bool)` + +GetHstsMaxAgeOk returns a tuple with the HstsMaxAge field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHstsMaxAge + +`func (o *SslUpdate) SetHstsMaxAge(v string)` + +SetHstsMaxAge sets HstsMaxAge field to given value. + +### HasHstsMaxAge + +`func (o *SslUpdate) HasHstsMaxAge() bool` + +HasHstsMaxAge returns a boolean if a field has been set. + +### GetHstsSubdomain + +`func (o *SslUpdate) GetHstsSubdomain() bool` + +GetHstsSubdomain returns the HstsSubdomain field if non-nil, zero value otherwise. + +### GetHstsSubdomainOk + +`func (o *SslUpdate) GetHstsSubdomainOk() (*bool, bool)` + +GetHstsSubdomainOk returns a tuple with the HstsSubdomain field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHstsSubdomain + +`func (o *SslUpdate) SetHstsSubdomain(v bool)` + +SetHstsSubdomain sets HstsSubdomain field to given value. + +### HasHstsSubdomain + +`func (o *SslUpdate) HasHstsSubdomain() bool` + +HasHstsSubdomain returns a boolean if a field has been set. + +### GetHstsPreload + +`func (o *SslUpdate) GetHstsPreload() bool` + +GetHstsPreload returns the HstsPreload field if non-nil, zero value otherwise. + +### GetHstsPreloadOk + +`func (o *SslUpdate) GetHstsPreloadOk() (*bool, bool)` + +GetHstsPreloadOk returns a tuple with the HstsPreload field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHstsPreload + +`func (o *SslUpdate) SetHstsPreload(v bool)` + +SetHstsPreload sets HstsPreload field to given value. + +### HasHstsPreload + +`func (o *SslUpdate) HasHstsPreload() bool` + +HasHstsPreload returns a boolean if a field has been set. + +### GetHttpsRedirect + +`func (o *SslUpdate) GetHttpsRedirect() bool` + +GetHttpsRedirect returns the HttpsRedirect field if non-nil, zero value otherwise. + +### GetHttpsRedirectOk + +`func (o *SslUpdate) GetHttpsRedirectOk() (*bool, bool)` + +GetHttpsRedirectOk returns a tuple with the HttpsRedirect field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHttpsRedirect + +`func (o *SslUpdate) SetHttpsRedirect(v bool)` + +SetHttpsRedirect sets HttpsRedirect field to given value. + +### HasHttpsRedirect + +`func (o *SslUpdate) HasHttpsRedirect() bool` + +HasHttpsRedirect returns a boolean if a field has been set. + +### GetReplaceHttp + +`func (o *SslUpdate) GetReplaceHttp() bool` + +GetReplaceHttp returns the ReplaceHttp field if non-nil, zero value otherwise. + +### GetReplaceHttpOk + +`func (o *SslUpdate) GetReplaceHttpOk() (*bool, bool)` + +GetReplaceHttpOk returns a tuple with the ReplaceHttp field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetReplaceHttp + +`func (o *SslUpdate) SetReplaceHttp(v bool)` + +SetReplaceHttp sets ReplaceHttp field to given value. + +### HasReplaceHttp + +`func (o *SslUpdate) HasReplaceHttp() bool` + +HasReplaceHttp returns a boolean if a field has been set. + +### GetCertificates + +`func (o *SslUpdate) GetCertificates() []Certificate` + +GetCertificates returns the Certificates field if non-nil, zero value otherwise. + +### GetCertificatesOk + +`func (o *SslUpdate) GetCertificatesOk() (*[]Certificate, bool)` + +GetCertificatesOk returns a tuple with the Certificates field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCertificates + +`func (o *SslUpdate) SetCertificates(v []Certificate)` + +SetCertificates sets Certificates field to given value. + +### HasCertificates + +`func (o *SslUpdate) HasCertificates() bool` + +HasCertificates returns a boolean if a field has been set. + +### GetOrders + +`func (o *SslUpdate) GetOrders() []CertificateOrder` + +GetOrders returns the Orders field if non-nil, zero value otherwise. + +### GetOrdersOk + +`func (o *SslUpdate) GetOrdersOk() (*[]CertificateOrder, bool)` + +GetOrdersOk returns a tuple with the Orders field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOrders + +`func (o *SslUpdate) SetOrders(v []CertificateOrder)` + +SetOrders sets Orders field to given value. + +### HasOrders + +`func (o *SslUpdate) HasOrders() bool` + +HasOrders returns a boolean if a field has been set. + +### SetOrdersNil + +`func (o *SslUpdate) SetOrdersNil(b bool)` + + SetOrdersNil sets the value for Orders to be an explicit nil + +### UnsetOrders +`func (o *SslUpdate) UnsetOrders()` + +UnsetOrders ensures that no value is present for Orders, not even an explicit nil + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/StatusCodeReport.md b/docs/StatusCodeReport.md new file mode 100644 index 0000000..8cf0f1c --- /dev/null +++ b/docs/StatusCodeReport.md @@ -0,0 +1,82 @@ +# StatusCodeReport + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Statistics** | Pointer to [**StatusCodeReportStatistics**](StatusCodeReportStatistics.md) | | [optional] +**Charts** | Pointer to [**StatusCodeReportCharts**](StatusCodeReportCharts.md) | | [optional] + +## Methods + +### NewStatusCodeReport + +`func NewStatusCodeReport() *StatusCodeReport` + +NewStatusCodeReport instantiates a new StatusCodeReport object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewStatusCodeReportWithDefaults + +`func NewStatusCodeReportWithDefaults() *StatusCodeReport` + +NewStatusCodeReportWithDefaults instantiates a new StatusCodeReport object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetStatistics + +`func (o *StatusCodeReport) GetStatistics() StatusCodeReportStatistics` + +GetStatistics returns the Statistics field if non-nil, zero value otherwise. + +### GetStatisticsOk + +`func (o *StatusCodeReport) GetStatisticsOk() (*StatusCodeReportStatistics, bool)` + +GetStatisticsOk returns a tuple with the Statistics field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatistics + +`func (o *StatusCodeReport) SetStatistics(v StatusCodeReportStatistics)` + +SetStatistics sets Statistics field to given value. + +### HasStatistics + +`func (o *StatusCodeReport) HasStatistics() bool` + +HasStatistics returns a boolean if a field has been set. + +### GetCharts + +`func (o *StatusCodeReport) GetCharts() StatusCodeReportCharts` + +GetCharts returns the Charts field if non-nil, zero value otherwise. + +### GetChartsOk + +`func (o *StatusCodeReport) GetChartsOk() (*StatusCodeReportCharts, bool)` + +GetChartsOk returns a tuple with the Charts field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCharts + +`func (o *StatusCodeReport) SetCharts(v StatusCodeReportCharts)` + +SetCharts sets Charts field to given value. + +### HasCharts + +`func (o *StatusCodeReport) HasCharts() bool` + +HasCharts returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/StatusCodeReportCharts.md b/docs/StatusCodeReportCharts.md new file mode 100644 index 0000000..bd23dfa --- /dev/null +++ b/docs/StatusCodeReportCharts.md @@ -0,0 +1,56 @@ +# StatusCodeReportCharts + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**StatusCode** | Pointer to [**StatusCodeReportChartsStatusCode**](StatusCodeReportChartsStatusCode.md) | | [optional] + +## Methods + +### NewStatusCodeReportCharts + +`func NewStatusCodeReportCharts() *StatusCodeReportCharts` + +NewStatusCodeReportCharts instantiates a new StatusCodeReportCharts object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewStatusCodeReportChartsWithDefaults + +`func NewStatusCodeReportChartsWithDefaults() *StatusCodeReportCharts` + +NewStatusCodeReportChartsWithDefaults instantiates a new StatusCodeReportCharts object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetStatusCode + +`func (o *StatusCodeReportCharts) GetStatusCode() StatusCodeReportChartsStatusCode` + +GetStatusCode returns the StatusCode field if non-nil, zero value otherwise. + +### GetStatusCodeOk + +`func (o *StatusCodeReportCharts) GetStatusCodeOk() (*StatusCodeReportChartsStatusCode, bool)` + +GetStatusCodeOk returns a tuple with the StatusCode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatusCode + +`func (o *StatusCodeReportCharts) SetStatusCode(v StatusCodeReportChartsStatusCode)` + +SetStatusCode sets StatusCode field to given value. + +### HasStatusCode + +`func (o *StatusCodeReportCharts) HasStatusCode() bool` + +HasStatusCode returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/StatusCodeReportChartsStatusCode.md b/docs/StatusCodeReportChartsStatusCode.md new file mode 100644 index 0000000..c773976 --- /dev/null +++ b/docs/StatusCodeReportChartsStatusCode.md @@ -0,0 +1,108 @@ +# StatusCodeReportChartsStatusCode + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **string** | | [optional] +**Categories** | Pointer to [**[]time.Time**](time.Time.md) | | [optional] +**Series** | Pointer to [**[]StatusCodeReportChartsStatusCodeSeriesInner**](StatusCodeReportChartsStatusCodeSeriesInner.md) | | [optional] + +## Methods + +### NewStatusCodeReportChartsStatusCode + +`func NewStatusCodeReportChartsStatusCode() *StatusCodeReportChartsStatusCode` + +NewStatusCodeReportChartsStatusCode instantiates a new StatusCodeReportChartsStatusCode object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewStatusCodeReportChartsStatusCodeWithDefaults + +`func NewStatusCodeReportChartsStatusCodeWithDefaults() *StatusCodeReportChartsStatusCode` + +NewStatusCodeReportChartsStatusCodeWithDefaults instantiates a new StatusCodeReportChartsStatusCode object +This 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 *StatusCodeReportChartsStatusCode) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *StatusCodeReportChartsStatusCode) 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 *StatusCodeReportChartsStatusCode) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *StatusCodeReportChartsStatusCode) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetCategories + +`func (o *StatusCodeReportChartsStatusCode) GetCategories() []time.Time` + +GetCategories returns the Categories field if non-nil, zero value otherwise. + +### GetCategoriesOk + +`func (o *StatusCodeReportChartsStatusCode) GetCategoriesOk() (*[]time.Time, bool)` + +GetCategoriesOk returns a tuple with the Categories field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCategories + +`func (o *StatusCodeReportChartsStatusCode) SetCategories(v []time.Time)` + +SetCategories sets Categories field to given value. + +### HasCategories + +`func (o *StatusCodeReportChartsStatusCode) HasCategories() bool` + +HasCategories returns a boolean if a field has been set. + +### GetSeries + +`func (o *StatusCodeReportChartsStatusCode) GetSeries() []StatusCodeReportChartsStatusCodeSeriesInner` + +GetSeries returns the Series field if non-nil, zero value otherwise. + +### GetSeriesOk + +`func (o *StatusCodeReportChartsStatusCode) GetSeriesOk() (*[]StatusCodeReportChartsStatusCodeSeriesInner, bool)` + +GetSeriesOk returns a tuple with the Series field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSeries + +`func (o *StatusCodeReportChartsStatusCode) SetSeries(v []StatusCodeReportChartsStatusCodeSeriesInner)` + +SetSeries sets Series field to given value. + +### HasSeries + +`func (o *StatusCodeReportChartsStatusCode) HasSeries() bool` + +HasSeries returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/StatusCodeReportChartsStatusCodeSeriesInner.md b/docs/StatusCodeReportChartsStatusCodeSeriesInner.md new file mode 100644 index 0000000..866e946 --- /dev/null +++ b/docs/StatusCodeReportChartsStatusCodeSeriesInner.md @@ -0,0 +1,82 @@ +# StatusCodeReportChartsStatusCodeSeriesInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **string** | | [optional] +**Data** | Pointer to **[]float64** | | [optional] + +## Methods + +### NewStatusCodeReportChartsStatusCodeSeriesInner + +`func NewStatusCodeReportChartsStatusCodeSeriesInner() *StatusCodeReportChartsStatusCodeSeriesInner` + +NewStatusCodeReportChartsStatusCodeSeriesInner instantiates a new StatusCodeReportChartsStatusCodeSeriesInner object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewStatusCodeReportChartsStatusCodeSeriesInnerWithDefaults + +`func NewStatusCodeReportChartsStatusCodeSeriesInnerWithDefaults() *StatusCodeReportChartsStatusCodeSeriesInner` + +NewStatusCodeReportChartsStatusCodeSeriesInnerWithDefaults instantiates a new StatusCodeReportChartsStatusCodeSeriesInner object +This 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 *StatusCodeReportChartsStatusCodeSeriesInner) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *StatusCodeReportChartsStatusCodeSeriesInner) 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 *StatusCodeReportChartsStatusCodeSeriesInner) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *StatusCodeReportChartsStatusCodeSeriesInner) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetData + +`func (o *StatusCodeReportChartsStatusCodeSeriesInner) GetData() []float64` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *StatusCodeReportChartsStatusCodeSeriesInner) GetDataOk() (*[]float64, 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 *StatusCodeReportChartsStatusCodeSeriesInner) SetData(v []float64)` + +SetData sets Data field to given value. + +### HasData + +`func (o *StatusCodeReportChartsStatusCodeSeriesInner) HasData() bool` + +HasData returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/StatusCodeReportData.md b/docs/StatusCodeReportData.md new file mode 100644 index 0000000..0f08c25 --- /dev/null +++ b/docs/StatusCodeReportData.md @@ -0,0 +1,56 @@ +# StatusCodeReportData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**StatusCodeReport**](StatusCodeReport.md) | | [optional] + +## Methods + +### NewStatusCodeReportData + +`func NewStatusCodeReportData() *StatusCodeReportData` + +NewStatusCodeReportData instantiates a new StatusCodeReportData object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewStatusCodeReportDataWithDefaults + +`func NewStatusCodeReportDataWithDefaults() *StatusCodeReportData` + +NewStatusCodeReportDataWithDefaults instantiates a new StatusCodeReportData object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *StatusCodeReportData) GetData() StatusCodeReport` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *StatusCodeReportData) GetDataOk() (*StatusCodeReport, 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 *StatusCodeReportData) SetData(v StatusCodeReport)` + +SetData sets Data field to given value. + +### HasData + +`func (o *StatusCodeReportData) HasData() bool` + +HasData returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/StatusCodeReportStatistics.md b/docs/StatusCodeReportStatistics.md new file mode 100644 index 0000000..ffa2d07 --- /dev/null +++ b/docs/StatusCodeReportStatistics.md @@ -0,0 +1,56 @@ +# StatusCodeReportStatistics + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**StatusCodes** | Pointer to [**StatusCodeReportStatisticsStatusCodes**](StatusCodeReportStatisticsStatusCodes.md) | | [optional] + +## Methods + +### NewStatusCodeReportStatistics + +`func NewStatusCodeReportStatistics() *StatusCodeReportStatistics` + +NewStatusCodeReportStatistics instantiates a new StatusCodeReportStatistics object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewStatusCodeReportStatisticsWithDefaults + +`func NewStatusCodeReportStatisticsWithDefaults() *StatusCodeReportStatistics` + +NewStatusCodeReportStatisticsWithDefaults instantiates a new StatusCodeReportStatistics object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetStatusCodes + +`func (o *StatusCodeReportStatistics) GetStatusCodes() StatusCodeReportStatisticsStatusCodes` + +GetStatusCodes returns the StatusCodes field if non-nil, zero value otherwise. + +### GetStatusCodesOk + +`func (o *StatusCodeReportStatistics) GetStatusCodesOk() (*StatusCodeReportStatisticsStatusCodes, bool)` + +GetStatusCodesOk returns a tuple with the StatusCodes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatusCodes + +`func (o *StatusCodeReportStatistics) SetStatusCodes(v StatusCodeReportStatisticsStatusCodes)` + +SetStatusCodes sets StatusCodes field to given value. + +### HasStatusCodes + +`func (o *StatusCodeReportStatistics) HasStatusCodes() bool` + +HasStatusCodes returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/StatusCodeReportStatisticsStatusCodes.md b/docs/StatusCodeReportStatisticsStatusCodes.md new file mode 100644 index 0000000..79e2d6d --- /dev/null +++ b/docs/StatusCodeReportStatisticsStatusCodes.md @@ -0,0 +1,134 @@ +# StatusCodeReportStatisticsStatusCodes + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Var2xxSum** | Pointer to **int32** | | [optional] +**Var3xxSum** | Pointer to **int32** | | [optional] +**Var4xxSum** | Pointer to **int32** | | [optional] +**Var5xxSum** | Pointer to **int32** | | [optional] + +## Methods + +### NewStatusCodeReportStatisticsStatusCodes + +`func NewStatusCodeReportStatisticsStatusCodes() *StatusCodeReportStatisticsStatusCodes` + +NewStatusCodeReportStatisticsStatusCodes instantiates a new StatusCodeReportStatisticsStatusCodes object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewStatusCodeReportStatisticsStatusCodesWithDefaults + +`func NewStatusCodeReportStatisticsStatusCodesWithDefaults() *StatusCodeReportStatisticsStatusCodes` + +NewStatusCodeReportStatisticsStatusCodesWithDefaults instantiates a new StatusCodeReportStatisticsStatusCodes object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetVar2xxSum + +`func (o *StatusCodeReportStatisticsStatusCodes) GetVar2xxSum() int32` + +GetVar2xxSum returns the Var2xxSum field if non-nil, zero value otherwise. + +### GetVar2xxSumOk + +`func (o *StatusCodeReportStatisticsStatusCodes) GetVar2xxSumOk() (*int32, bool)` + +GetVar2xxSumOk returns a tuple with the Var2xxSum field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVar2xxSum + +`func (o *StatusCodeReportStatisticsStatusCodes) SetVar2xxSum(v int32)` + +SetVar2xxSum sets Var2xxSum field to given value. + +### HasVar2xxSum + +`func (o *StatusCodeReportStatisticsStatusCodes) HasVar2xxSum() bool` + +HasVar2xxSum returns a boolean if a field has been set. + +### GetVar3xxSum + +`func (o *StatusCodeReportStatisticsStatusCodes) GetVar3xxSum() int32` + +GetVar3xxSum returns the Var3xxSum field if non-nil, zero value otherwise. + +### GetVar3xxSumOk + +`func (o *StatusCodeReportStatisticsStatusCodes) GetVar3xxSumOk() (*int32, bool)` + +GetVar3xxSumOk returns a tuple with the Var3xxSum field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVar3xxSum + +`func (o *StatusCodeReportStatisticsStatusCodes) SetVar3xxSum(v int32)` + +SetVar3xxSum sets Var3xxSum field to given value. + +### HasVar3xxSum + +`func (o *StatusCodeReportStatisticsStatusCodes) HasVar3xxSum() bool` + +HasVar3xxSum returns a boolean if a field has been set. + +### GetVar4xxSum + +`func (o *StatusCodeReportStatisticsStatusCodes) GetVar4xxSum() int32` + +GetVar4xxSum returns the Var4xxSum field if non-nil, zero value otherwise. + +### GetVar4xxSumOk + +`func (o *StatusCodeReportStatisticsStatusCodes) GetVar4xxSumOk() (*int32, bool)` + +GetVar4xxSumOk returns a tuple with the Var4xxSum field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVar4xxSum + +`func (o *StatusCodeReportStatisticsStatusCodes) SetVar4xxSum(v int32)` + +SetVar4xxSum sets Var4xxSum field to given value. + +### HasVar4xxSum + +`func (o *StatusCodeReportStatisticsStatusCodes) HasVar4xxSum() bool` + +HasVar4xxSum returns a boolean if a field has been set. + +### GetVar5xxSum + +`func (o *StatusCodeReportStatisticsStatusCodes) GetVar5xxSum() int32` + +GetVar5xxSum returns the Var5xxSum field if non-nil, zero value otherwise. + +### GetVar5xxSumOk + +`func (o *StatusCodeReportStatisticsStatusCodes) GetVar5xxSumOk() (*int32, bool)` + +GetVar5xxSumOk returns a tuple with the Var5xxSum field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVar5xxSum + +`func (o *StatusCodeReportStatisticsStatusCodes) SetVar5xxSum(v int32)` + +SetVar5xxSum sets Var5xxSum field to given value. + +### HasVar5xxSum + +`func (o *StatusCodeReportStatisticsStatusCodes) HasVar5xxSum() bool` + +HasVar5xxSum returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/StatusCodeSummary.md b/docs/StatusCodeSummary.md new file mode 100644 index 0000000..67d7b60 --- /dev/null +++ b/docs/StatusCodeSummary.md @@ -0,0 +1,82 @@ +# StatusCodeSummary + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Statistics** | Pointer to **map[string]interface{}** | | [optional] +**Charts** | Pointer to [**StatusCodeSummaryCharts**](StatusCodeSummaryCharts.md) | | [optional] + +## Methods + +### NewStatusCodeSummary + +`func NewStatusCodeSummary() *StatusCodeSummary` + +NewStatusCodeSummary instantiates a new StatusCodeSummary object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewStatusCodeSummaryWithDefaults + +`func NewStatusCodeSummaryWithDefaults() *StatusCodeSummary` + +NewStatusCodeSummaryWithDefaults instantiates a new StatusCodeSummary object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetStatistics + +`func (o *StatusCodeSummary) GetStatistics() map[string]interface{}` + +GetStatistics returns the Statistics field if non-nil, zero value otherwise. + +### GetStatisticsOk + +`func (o *StatusCodeSummary) GetStatisticsOk() (*map[string]interface{}, bool)` + +GetStatisticsOk returns a tuple with the Statistics field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatistics + +`func (o *StatusCodeSummary) SetStatistics(v map[string]interface{})` + +SetStatistics sets Statistics field to given value. + +### HasStatistics + +`func (o *StatusCodeSummary) HasStatistics() bool` + +HasStatistics returns a boolean if a field has been set. + +### GetCharts + +`func (o *StatusCodeSummary) GetCharts() StatusCodeSummaryCharts` + +GetCharts returns the Charts field if non-nil, zero value otherwise. + +### GetChartsOk + +`func (o *StatusCodeSummary) GetChartsOk() (*StatusCodeSummaryCharts, bool)` + +GetChartsOk returns a tuple with the Charts field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCharts + +`func (o *StatusCodeSummary) SetCharts(v StatusCodeSummaryCharts)` + +SetCharts sets Charts field to given value. + +### HasCharts + +`func (o *StatusCodeSummary) HasCharts() bool` + +HasCharts returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/StatusCodeSummaryCharts.md b/docs/StatusCodeSummaryCharts.md new file mode 100644 index 0000000..b084be1 --- /dev/null +++ b/docs/StatusCodeSummaryCharts.md @@ -0,0 +1,56 @@ +# StatusCodeSummaryCharts + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**StatusCode** | Pointer to [**[]StatusCodeSummaryChartsStatusCodeInner**](StatusCodeSummaryChartsStatusCodeInner.md) | | [optional] + +## Methods + +### NewStatusCodeSummaryCharts + +`func NewStatusCodeSummaryCharts() *StatusCodeSummaryCharts` + +NewStatusCodeSummaryCharts instantiates a new StatusCodeSummaryCharts object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewStatusCodeSummaryChartsWithDefaults + +`func NewStatusCodeSummaryChartsWithDefaults() *StatusCodeSummaryCharts` + +NewStatusCodeSummaryChartsWithDefaults instantiates a new StatusCodeSummaryCharts object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetStatusCode + +`func (o *StatusCodeSummaryCharts) GetStatusCode() []StatusCodeSummaryChartsStatusCodeInner` + +GetStatusCode returns the StatusCode field if non-nil, zero value otherwise. + +### GetStatusCodeOk + +`func (o *StatusCodeSummaryCharts) GetStatusCodeOk() (*[]StatusCodeSummaryChartsStatusCodeInner, bool)` + +GetStatusCodeOk returns a tuple with the StatusCode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatusCode + +`func (o *StatusCodeSummaryCharts) SetStatusCode(v []StatusCodeSummaryChartsStatusCodeInner)` + +SetStatusCode sets StatusCode field to given value. + +### HasStatusCode + +`func (o *StatusCodeSummaryCharts) HasStatusCode() bool` + +HasStatusCode returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/StatusCodeSummaryChartsStatusCodeInner.md b/docs/StatusCodeSummaryChartsStatusCodeInner.md new file mode 100644 index 0000000..3f75b20 --- /dev/null +++ b/docs/StatusCodeSummaryChartsStatusCodeInner.md @@ -0,0 +1,82 @@ +# StatusCodeSummaryChartsStatusCodeInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **string** | | [optional] +**Y** | Pointer to **int32** | | [optional] + +## Methods + +### NewStatusCodeSummaryChartsStatusCodeInner + +`func NewStatusCodeSummaryChartsStatusCodeInner() *StatusCodeSummaryChartsStatusCodeInner` + +NewStatusCodeSummaryChartsStatusCodeInner instantiates a new StatusCodeSummaryChartsStatusCodeInner object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewStatusCodeSummaryChartsStatusCodeInnerWithDefaults + +`func NewStatusCodeSummaryChartsStatusCodeInnerWithDefaults() *StatusCodeSummaryChartsStatusCodeInner` + +NewStatusCodeSummaryChartsStatusCodeInnerWithDefaults instantiates a new StatusCodeSummaryChartsStatusCodeInner object +This 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 *StatusCodeSummaryChartsStatusCodeInner) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *StatusCodeSummaryChartsStatusCodeInner) 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 *StatusCodeSummaryChartsStatusCodeInner) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *StatusCodeSummaryChartsStatusCodeInner) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetY + +`func (o *StatusCodeSummaryChartsStatusCodeInner) GetY() int32` + +GetY returns the Y field if non-nil, zero value otherwise. + +### GetYOk + +`func (o *StatusCodeSummaryChartsStatusCodeInner) GetYOk() (*int32, bool)` + +GetYOk returns a tuple with the Y field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetY + +`func (o *StatusCodeSummaryChartsStatusCodeInner) SetY(v int32)` + +SetY sets Y field to given value. + +### HasY + +`func (o *StatusCodeSummaryChartsStatusCodeInner) HasY() bool` + +HasY returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/StatusCodeSummaryData.md b/docs/StatusCodeSummaryData.md new file mode 100644 index 0000000..cbe300c --- /dev/null +++ b/docs/StatusCodeSummaryData.md @@ -0,0 +1,56 @@ +# StatusCodeSummaryData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**StatusCodeSummary**](StatusCodeSummary.md) | | [optional] + +## Methods + +### NewStatusCodeSummaryData + +`func NewStatusCodeSummaryData() *StatusCodeSummaryData` + +NewStatusCodeSummaryData instantiates a new StatusCodeSummaryData object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewStatusCodeSummaryDataWithDefaults + +`func NewStatusCodeSummaryDataWithDefaults() *StatusCodeSummaryData` + +NewStatusCodeSummaryDataWithDefaults instantiates a new StatusCodeSummaryData object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *StatusCodeSummaryData) GetData() StatusCodeSummary` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *StatusCodeSummaryData) GetDataOk() (*StatusCodeSummary, 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 *StatusCodeSummaryData) SetData(v StatusCodeSummary)` + +SetData sets Data field to given value. + +### HasData + +`func (o *StatusCodeSummaryData) HasData() bool` + +HasData returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/TLSARecord.md b/docs/TLSARecord.md new file mode 100644 index 0000000..0b555e4 --- /dev/null +++ b/docs/TLSARecord.md @@ -0,0 +1,342 @@ +# TLSARecord + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | Pointer to [**TLSARecordValue**](TLSARecordValue.md) | | [optional] +**Type** | Pointer to **string** | | [optional] [default to "tlsa"] +**Id** | Pointer to **string** | | [optional] [readonly] +**Name** | Pointer to **string** | | [optional] +**Ttl** | Pointer to **int32** | | [optional] +**Cloud** | Pointer to **bool** | | [optional] [default to false] +**UpstreamHttps** | Pointer to **string** | | [optional] +**IpFilterMode** | Pointer to [**DnsRecordIpFilterMode**](DnsRecordIpFilterMode.md) | | [optional] +**IsProtected** | Pointer to **bool** | Protected records cannot be modified or deleted by user. | [optional] [readonly] [default to false] +**Usage** | Pointer to **[]string** | | [optional] [readonly] [default to []] +**CreatedAt** | Pointer to **time.Time** | | [optional] [readonly] +**UpdatedAt** | Pointer to **time.Time** | | [optional] [readonly] + +## Methods + +### NewTLSARecord + +`func NewTLSARecord() *TLSARecord` + +NewTLSARecord instantiates a new TLSARecord object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTLSARecordWithDefaults + +`func NewTLSARecordWithDefaults() *TLSARecord` + +NewTLSARecordWithDefaults instantiates a new TLSARecord object +This 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 *TLSARecord) GetValue() TLSARecordValue` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *TLSARecord) GetValueOk() (*TLSARecordValue, 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 *TLSARecord) SetValue(v TLSARecordValue)` + +SetValue sets Value field to given value. + +### HasValue + +`func (o *TLSARecord) HasValue() bool` + +HasValue returns a boolean if a field has been set. + +### GetType + +`func (o *TLSARecord) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *TLSARecord) 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 *TLSARecord) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *TLSARecord) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetId + +`func (o *TLSARecord) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *TLSARecord) 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 *TLSARecord) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *TLSARecord) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetName + +`func (o *TLSARecord) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *TLSARecord) 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 *TLSARecord) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *TLSARecord) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetTtl + +`func (o *TLSARecord) GetTtl() int32` + +GetTtl returns the Ttl field if non-nil, zero value otherwise. + +### GetTtlOk + +`func (o *TLSARecord) GetTtlOk() (*int32, bool)` + +GetTtlOk returns a tuple with the Ttl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTtl + +`func (o *TLSARecord) SetTtl(v int32)` + +SetTtl sets Ttl field to given value. + +### HasTtl + +`func (o *TLSARecord) HasTtl() bool` + +HasTtl returns a boolean if a field has been set. + +### GetCloud + +`func (o *TLSARecord) GetCloud() bool` + +GetCloud returns the Cloud field if non-nil, zero value otherwise. + +### GetCloudOk + +`func (o *TLSARecord) GetCloudOk() (*bool, bool)` + +GetCloudOk returns a tuple with the Cloud field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCloud + +`func (o *TLSARecord) SetCloud(v bool)` + +SetCloud sets Cloud field to given value. + +### HasCloud + +`func (o *TLSARecord) HasCloud() bool` + +HasCloud returns a boolean if a field has been set. + +### GetUpstreamHttps + +`func (o *TLSARecord) GetUpstreamHttps() string` + +GetUpstreamHttps returns the UpstreamHttps field if non-nil, zero value otherwise. + +### GetUpstreamHttpsOk + +`func (o *TLSARecord) GetUpstreamHttpsOk() (*string, bool)` + +GetUpstreamHttpsOk returns a tuple with the UpstreamHttps field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpstreamHttps + +`func (o *TLSARecord) SetUpstreamHttps(v string)` + +SetUpstreamHttps sets UpstreamHttps field to given value. + +### HasUpstreamHttps + +`func (o *TLSARecord) HasUpstreamHttps() bool` + +HasUpstreamHttps returns a boolean if a field has been set. + +### GetIpFilterMode + +`func (o *TLSARecord) GetIpFilterMode() DnsRecordIpFilterMode` + +GetIpFilterMode returns the IpFilterMode field if non-nil, zero value otherwise. + +### GetIpFilterModeOk + +`func (o *TLSARecord) GetIpFilterModeOk() (*DnsRecordIpFilterMode, bool)` + +GetIpFilterModeOk returns a tuple with the IpFilterMode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIpFilterMode + +`func (o *TLSARecord) SetIpFilterMode(v DnsRecordIpFilterMode)` + +SetIpFilterMode sets IpFilterMode field to given value. + +### HasIpFilterMode + +`func (o *TLSARecord) HasIpFilterMode() bool` + +HasIpFilterMode returns a boolean if a field has been set. + +### GetIsProtected + +`func (o *TLSARecord) GetIsProtected() bool` + +GetIsProtected returns the IsProtected field if non-nil, zero value otherwise. + +### GetIsProtectedOk + +`func (o *TLSARecord) GetIsProtectedOk() (*bool, bool)` + +GetIsProtectedOk returns a tuple with the IsProtected field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsProtected + +`func (o *TLSARecord) SetIsProtected(v bool)` + +SetIsProtected sets IsProtected field to given value. + +### HasIsProtected + +`func (o *TLSARecord) HasIsProtected() bool` + +HasIsProtected returns a boolean if a field has been set. + +### GetUsage + +`func (o *TLSARecord) GetUsage() []string` + +GetUsage returns the Usage field if non-nil, zero value otherwise. + +### GetUsageOk + +`func (o *TLSARecord) GetUsageOk() (*[]string, bool)` + +GetUsageOk returns a tuple with the Usage field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUsage + +`func (o *TLSARecord) SetUsage(v []string)` + +SetUsage sets Usage field to given value. + +### HasUsage + +`func (o *TLSARecord) HasUsage() bool` + +HasUsage returns a boolean if a field has been set. + +### GetCreatedAt + +`func (o *TLSARecord) GetCreatedAt() time.Time` + +GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. + +### GetCreatedAtOk + +`func (o *TLSARecord) GetCreatedAtOk() (*time.Time, bool)` + +GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedAt + +`func (o *TLSARecord) SetCreatedAt(v time.Time)` + +SetCreatedAt sets CreatedAt field to given value. + +### HasCreatedAt + +`func (o *TLSARecord) HasCreatedAt() bool` + +HasCreatedAt returns a boolean if a field has been set. + +### GetUpdatedAt + +`func (o *TLSARecord) GetUpdatedAt() time.Time` + +GetUpdatedAt returns the UpdatedAt field if non-nil, zero value otherwise. + +### GetUpdatedAtOk + +`func (o *TLSARecord) GetUpdatedAtOk() (*time.Time, bool)` + +GetUpdatedAtOk returns a tuple with the UpdatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpdatedAt + +`func (o *TLSARecord) SetUpdatedAt(v time.Time)` + +SetUpdatedAt sets UpdatedAt field to given value. + +### HasUpdatedAt + +`func (o *TLSARecord) HasUpdatedAt() bool` + +HasUpdatedAt returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/TLSARecordValue.md b/docs/TLSARecordValue.md new file mode 100644 index 0000000..c466342 --- /dev/null +++ b/docs/TLSARecordValue.md @@ -0,0 +1,114 @@ +# TLSARecordValue + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Usage** | **string** | | +**Selector** | **string** | | +**MatchingType** | **string** | | +**Certificate** | **string** | | + +## Methods + +### NewTLSARecordValue + +`func NewTLSARecordValue(usage string, selector string, matchingType string, certificate string, ) *TLSARecordValue` + +NewTLSARecordValue instantiates a new TLSARecordValue object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTLSARecordValueWithDefaults + +`func NewTLSARecordValueWithDefaults() *TLSARecordValue` + +NewTLSARecordValueWithDefaults instantiates a new TLSARecordValue object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetUsage + +`func (o *TLSARecordValue) GetUsage() string` + +GetUsage returns the Usage field if non-nil, zero value otherwise. + +### GetUsageOk + +`func (o *TLSARecordValue) GetUsageOk() (*string, bool)` + +GetUsageOk returns a tuple with the Usage field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUsage + +`func (o *TLSARecordValue) SetUsage(v string)` + +SetUsage sets Usage field to given value. + + +### GetSelector + +`func (o *TLSARecordValue) GetSelector() string` + +GetSelector returns the Selector field if non-nil, zero value otherwise. + +### GetSelectorOk + +`func (o *TLSARecordValue) GetSelectorOk() (*string, bool)` + +GetSelectorOk returns a tuple with the Selector field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSelector + +`func (o *TLSARecordValue) SetSelector(v string)` + +SetSelector sets Selector field to given value. + + +### GetMatchingType + +`func (o *TLSARecordValue) GetMatchingType() string` + +GetMatchingType returns the MatchingType field if non-nil, zero value otherwise. + +### GetMatchingTypeOk + +`func (o *TLSARecordValue) GetMatchingTypeOk() (*string, bool)` + +GetMatchingTypeOk returns a tuple with the MatchingType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMatchingType + +`func (o *TLSARecordValue) SetMatchingType(v string)` + +SetMatchingType sets MatchingType field to given value. + + +### GetCertificate + +`func (o *TLSARecordValue) GetCertificate() string` + +GetCertificate returns the Certificate field if non-nil, zero value otherwise. + +### GetCertificateOk + +`func (o *TLSARecordValue) GetCertificateOk() (*string, bool)` + +GetCertificateOk returns a tuple with the Certificate field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCertificate + +`func (o *TLSARecordValue) SetCertificate(v string)` + +SetCertificate sets Certificate field to given value. + + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/TXTRecord.md b/docs/TXTRecord.md new file mode 100644 index 0000000..bd2e4c1 --- /dev/null +++ b/docs/TXTRecord.md @@ -0,0 +1,342 @@ +# TXTRecord + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | Pointer to [**TXTRecordValue**](TXTRecordValue.md) | | [optional] +**Type** | Pointer to **string** | | [optional] [default to "txt"] +**Id** | Pointer to **string** | | [optional] [readonly] +**Name** | Pointer to **string** | | [optional] +**Ttl** | Pointer to **int32** | | [optional] +**Cloud** | Pointer to **bool** | | [optional] [default to false] +**UpstreamHttps** | Pointer to **string** | | [optional] +**IpFilterMode** | Pointer to [**DnsRecordIpFilterMode**](DnsRecordIpFilterMode.md) | | [optional] +**IsProtected** | Pointer to **bool** | Protected records cannot be modified or deleted by user. | [optional] [readonly] [default to false] +**Usage** | Pointer to **[]string** | | [optional] [readonly] [default to []] +**CreatedAt** | Pointer to **time.Time** | | [optional] [readonly] +**UpdatedAt** | Pointer to **time.Time** | | [optional] [readonly] + +## Methods + +### NewTXTRecord + +`func NewTXTRecord() *TXTRecord` + +NewTXTRecord instantiates a new TXTRecord object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTXTRecordWithDefaults + +`func NewTXTRecordWithDefaults() *TXTRecord` + +NewTXTRecordWithDefaults instantiates a new TXTRecord object +This 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 *TXTRecord) GetValue() TXTRecordValue` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *TXTRecord) GetValueOk() (*TXTRecordValue, 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 *TXTRecord) SetValue(v TXTRecordValue)` + +SetValue sets Value field to given value. + +### HasValue + +`func (o *TXTRecord) HasValue() bool` + +HasValue returns a boolean if a field has been set. + +### GetType + +`func (o *TXTRecord) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *TXTRecord) 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 *TXTRecord) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *TXTRecord) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetId + +`func (o *TXTRecord) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *TXTRecord) 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 *TXTRecord) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *TXTRecord) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetName + +`func (o *TXTRecord) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *TXTRecord) 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 *TXTRecord) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *TXTRecord) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetTtl + +`func (o *TXTRecord) GetTtl() int32` + +GetTtl returns the Ttl field if non-nil, zero value otherwise. + +### GetTtlOk + +`func (o *TXTRecord) GetTtlOk() (*int32, bool)` + +GetTtlOk returns a tuple with the Ttl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTtl + +`func (o *TXTRecord) SetTtl(v int32)` + +SetTtl sets Ttl field to given value. + +### HasTtl + +`func (o *TXTRecord) HasTtl() bool` + +HasTtl returns a boolean if a field has been set. + +### GetCloud + +`func (o *TXTRecord) GetCloud() bool` + +GetCloud returns the Cloud field if non-nil, zero value otherwise. + +### GetCloudOk + +`func (o *TXTRecord) GetCloudOk() (*bool, bool)` + +GetCloudOk returns a tuple with the Cloud field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCloud + +`func (o *TXTRecord) SetCloud(v bool)` + +SetCloud sets Cloud field to given value. + +### HasCloud + +`func (o *TXTRecord) HasCloud() bool` + +HasCloud returns a boolean if a field has been set. + +### GetUpstreamHttps + +`func (o *TXTRecord) GetUpstreamHttps() string` + +GetUpstreamHttps returns the UpstreamHttps field if non-nil, zero value otherwise. + +### GetUpstreamHttpsOk + +`func (o *TXTRecord) GetUpstreamHttpsOk() (*string, bool)` + +GetUpstreamHttpsOk returns a tuple with the UpstreamHttps field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpstreamHttps + +`func (o *TXTRecord) SetUpstreamHttps(v string)` + +SetUpstreamHttps sets UpstreamHttps field to given value. + +### HasUpstreamHttps + +`func (o *TXTRecord) HasUpstreamHttps() bool` + +HasUpstreamHttps returns a boolean if a field has been set. + +### GetIpFilterMode + +`func (o *TXTRecord) GetIpFilterMode() DnsRecordIpFilterMode` + +GetIpFilterMode returns the IpFilterMode field if non-nil, zero value otherwise. + +### GetIpFilterModeOk + +`func (o *TXTRecord) GetIpFilterModeOk() (*DnsRecordIpFilterMode, bool)` + +GetIpFilterModeOk returns a tuple with the IpFilterMode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIpFilterMode + +`func (o *TXTRecord) SetIpFilterMode(v DnsRecordIpFilterMode)` + +SetIpFilterMode sets IpFilterMode field to given value. + +### HasIpFilterMode + +`func (o *TXTRecord) HasIpFilterMode() bool` + +HasIpFilterMode returns a boolean if a field has been set. + +### GetIsProtected + +`func (o *TXTRecord) GetIsProtected() bool` + +GetIsProtected returns the IsProtected field if non-nil, zero value otherwise. + +### GetIsProtectedOk + +`func (o *TXTRecord) GetIsProtectedOk() (*bool, bool)` + +GetIsProtectedOk returns a tuple with the IsProtected field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsProtected + +`func (o *TXTRecord) SetIsProtected(v bool)` + +SetIsProtected sets IsProtected field to given value. + +### HasIsProtected + +`func (o *TXTRecord) HasIsProtected() bool` + +HasIsProtected returns a boolean if a field has been set. + +### GetUsage + +`func (o *TXTRecord) GetUsage() []string` + +GetUsage returns the Usage field if non-nil, zero value otherwise. + +### GetUsageOk + +`func (o *TXTRecord) GetUsageOk() (*[]string, bool)` + +GetUsageOk returns a tuple with the Usage field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUsage + +`func (o *TXTRecord) SetUsage(v []string)` + +SetUsage sets Usage field to given value. + +### HasUsage + +`func (o *TXTRecord) HasUsage() bool` + +HasUsage returns a boolean if a field has been set. + +### GetCreatedAt + +`func (o *TXTRecord) GetCreatedAt() time.Time` + +GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. + +### GetCreatedAtOk + +`func (o *TXTRecord) GetCreatedAtOk() (*time.Time, bool)` + +GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedAt + +`func (o *TXTRecord) SetCreatedAt(v time.Time)` + +SetCreatedAt sets CreatedAt field to given value. + +### HasCreatedAt + +`func (o *TXTRecord) HasCreatedAt() bool` + +HasCreatedAt returns a boolean if a field has been set. + +### GetUpdatedAt + +`func (o *TXTRecord) GetUpdatedAt() time.Time` + +GetUpdatedAt returns the UpdatedAt field if non-nil, zero value otherwise. + +### GetUpdatedAtOk + +`func (o *TXTRecord) GetUpdatedAtOk() (*time.Time, bool)` + +GetUpdatedAtOk returns a tuple with the UpdatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpdatedAt + +`func (o *TXTRecord) SetUpdatedAt(v time.Time)` + +SetUpdatedAt sets UpdatedAt field to given value. + +### HasUpdatedAt + +`func (o *TXTRecord) HasUpdatedAt() bool` + +HasUpdatedAt returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/TXTRecordValue.md b/docs/TXTRecordValue.md new file mode 100644 index 0000000..ed50c7c --- /dev/null +++ b/docs/TXTRecordValue.md @@ -0,0 +1,51 @@ +# TXTRecordValue + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Text** | **string** | | + +## Methods + +### NewTXTRecordValue + +`func NewTXTRecordValue(text string, ) *TXTRecordValue` + +NewTXTRecordValue instantiates a new TXTRecordValue object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTXTRecordValueWithDefaults + +`func NewTXTRecordValueWithDefaults() *TXTRecordValue` + +NewTXTRecordValueWithDefaults instantiates a new TXTRecordValue object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetText + +`func (o *TXTRecordValue) GetText() string` + +GetText returns the Text field if non-nil, zero value otherwise. + +### GetTextOk + +`func (o *TXTRecordValue) 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 *TXTRecordValue) SetText(v string)` + +SetText sets Text field to given value. + + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/TcpConfig.md b/docs/TcpConfig.md new file mode 100644 index 0000000..9ad7149 --- /dev/null +++ b/docs/TcpConfig.md @@ -0,0 +1,72 @@ +# TcpConfig + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Port** | **int32** | | +**Timeout** | **int32** | In milliseconds | + +## Methods + +### NewTcpConfig + +`func NewTcpConfig(port int32, timeout int32, ) *TcpConfig` + +NewTcpConfig instantiates a new TcpConfig object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTcpConfigWithDefaults + +`func NewTcpConfigWithDefaults() *TcpConfig` + +NewTcpConfigWithDefaults instantiates a new TcpConfig object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetPort + +`func (o *TcpConfig) GetPort() int32` + +GetPort returns the Port field if non-nil, zero value otherwise. + +### GetPortOk + +`func (o *TcpConfig) GetPortOk() (*int32, bool)` + +GetPortOk returns a tuple with the Port field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPort + +`func (o *TcpConfig) SetPort(v int32)` + +SetPort sets Port field to given value. + + +### GetTimeout + +`func (o *TcpConfig) GetTimeout() int32` + +GetTimeout returns the Timeout field if non-nil, zero value otherwise. + +### GetTimeoutOk + +`func (o *TcpConfig) GetTimeoutOk() (*int32, bool)` + +GetTimeoutOk returns a tuple with the Timeout field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTimeout + +`func (o *TcpConfig) SetTimeout(v int32)` + +SetTimeout sets Timeout field to given value. + + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/TrafficCharts.md b/docs/TrafficCharts.md new file mode 100644 index 0000000..c2cb3fa --- /dev/null +++ b/docs/TrafficCharts.md @@ -0,0 +1,82 @@ +# TrafficCharts + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Requests** | Pointer to [**TrafficChartsRequests**](TrafficChartsRequests.md) | | [optional] +**Traffics** | Pointer to [**TrafficChartsTraffics**](TrafficChartsTraffics.md) | | [optional] + +## Methods + +### NewTrafficCharts + +`func NewTrafficCharts() *TrafficCharts` + +NewTrafficCharts instantiates a new TrafficCharts object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTrafficChartsWithDefaults + +`func NewTrafficChartsWithDefaults() *TrafficCharts` + +NewTrafficChartsWithDefaults instantiates a new TrafficCharts object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetRequests + +`func (o *TrafficCharts) GetRequests() TrafficChartsRequests` + +GetRequests returns the Requests field if non-nil, zero value otherwise. + +### GetRequestsOk + +`func (o *TrafficCharts) GetRequestsOk() (*TrafficChartsRequests, bool)` + +GetRequestsOk returns a tuple with the Requests field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRequests + +`func (o *TrafficCharts) SetRequests(v TrafficChartsRequests)` + +SetRequests sets Requests field to given value. + +### HasRequests + +`func (o *TrafficCharts) HasRequests() bool` + +HasRequests returns a boolean if a field has been set. + +### GetTraffics + +`func (o *TrafficCharts) GetTraffics() TrafficChartsTraffics` + +GetTraffics returns the Traffics field if non-nil, zero value otherwise. + +### GetTrafficsOk + +`func (o *TrafficCharts) GetTrafficsOk() (*TrafficChartsTraffics, bool)` + +GetTrafficsOk returns a tuple with the Traffics field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTraffics + +`func (o *TrafficCharts) SetTraffics(v TrafficChartsTraffics)` + +SetTraffics sets Traffics field to given value. + +### HasTraffics + +`func (o *TrafficCharts) HasTraffics() bool` + +HasTraffics returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/TrafficChartsRequests.md b/docs/TrafficChartsRequests.md new file mode 100644 index 0000000..47cf326 --- /dev/null +++ b/docs/TrafficChartsRequests.md @@ -0,0 +1,108 @@ +# TrafficChartsRequests + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Title** | Pointer to **string** | | [optional] +**Categories** | Pointer to [**[]time.Time**](time.Time.md) | | [optional] +**Series** | Pointer to [**[]TrafficChartsRequestsSeriesInner**](TrafficChartsRequestsSeriesInner.md) | | [optional] + +## Methods + +### NewTrafficChartsRequests + +`func NewTrafficChartsRequests() *TrafficChartsRequests` + +NewTrafficChartsRequests instantiates a new TrafficChartsRequests object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTrafficChartsRequestsWithDefaults + +`func NewTrafficChartsRequestsWithDefaults() *TrafficChartsRequests` + +NewTrafficChartsRequestsWithDefaults instantiates a new TrafficChartsRequests object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetTitle + +`func (o *TrafficChartsRequests) GetTitle() string` + +GetTitle returns the Title field if non-nil, zero value otherwise. + +### GetTitleOk + +`func (o *TrafficChartsRequests) 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 *TrafficChartsRequests) SetTitle(v string)` + +SetTitle sets Title field to given value. + +### HasTitle + +`func (o *TrafficChartsRequests) HasTitle() bool` + +HasTitle returns a boolean if a field has been set. + +### GetCategories + +`func (o *TrafficChartsRequests) GetCategories() []time.Time` + +GetCategories returns the Categories field if non-nil, zero value otherwise. + +### GetCategoriesOk + +`func (o *TrafficChartsRequests) GetCategoriesOk() (*[]time.Time, bool)` + +GetCategoriesOk returns a tuple with the Categories field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCategories + +`func (o *TrafficChartsRequests) SetCategories(v []time.Time)` + +SetCategories sets Categories field to given value. + +### HasCategories + +`func (o *TrafficChartsRequests) HasCategories() bool` + +HasCategories returns a boolean if a field has been set. + +### GetSeries + +`func (o *TrafficChartsRequests) GetSeries() []TrafficChartsRequestsSeriesInner` + +GetSeries returns the Series field if non-nil, zero value otherwise. + +### GetSeriesOk + +`func (o *TrafficChartsRequests) GetSeriesOk() (*[]TrafficChartsRequestsSeriesInner, bool)` + +GetSeriesOk returns a tuple with the Series field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSeries + +`func (o *TrafficChartsRequests) SetSeries(v []TrafficChartsRequestsSeriesInner)` + +SetSeries sets Series field to given value. + +### HasSeries + +`func (o *TrafficChartsRequests) HasSeries() bool` + +HasSeries returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/TrafficChartsRequestsSeriesInner.md b/docs/TrafficChartsRequestsSeriesInner.md new file mode 100644 index 0000000..4f1c791 --- /dev/null +++ b/docs/TrafficChartsRequestsSeriesInner.md @@ -0,0 +1,82 @@ +# TrafficChartsRequestsSeriesInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **string** | | [optional] +**Data** | Pointer to **[]int32** | | [optional] + +## Methods + +### NewTrafficChartsRequestsSeriesInner + +`func NewTrafficChartsRequestsSeriesInner() *TrafficChartsRequestsSeriesInner` + +NewTrafficChartsRequestsSeriesInner instantiates a new TrafficChartsRequestsSeriesInner object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTrafficChartsRequestsSeriesInnerWithDefaults + +`func NewTrafficChartsRequestsSeriesInnerWithDefaults() *TrafficChartsRequestsSeriesInner` + +NewTrafficChartsRequestsSeriesInnerWithDefaults instantiates a new TrafficChartsRequestsSeriesInner object +This 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 *TrafficChartsRequestsSeriesInner) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *TrafficChartsRequestsSeriesInner) 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 *TrafficChartsRequestsSeriesInner) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *TrafficChartsRequestsSeriesInner) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetData + +`func (o *TrafficChartsRequestsSeriesInner) GetData() []int32` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *TrafficChartsRequestsSeriesInner) GetDataOk() (*[]int32, 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 *TrafficChartsRequestsSeriesInner) SetData(v []int32)` + +SetData sets Data field to given value. + +### HasData + +`func (o *TrafficChartsRequestsSeriesInner) HasData() bool` + +HasData returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/TrafficChartsTraffics.md b/docs/TrafficChartsTraffics.md new file mode 100644 index 0000000..347286a --- /dev/null +++ b/docs/TrafficChartsTraffics.md @@ -0,0 +1,108 @@ +# TrafficChartsTraffics + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Title** | Pointer to **string** | | [optional] +**Categories** | Pointer to [**[]time.Time**](time.Time.md) | | [optional] +**Series** | Pointer to [**[]TrafficChartsTrafficsSeriesInner**](TrafficChartsTrafficsSeriesInner.md) | | [optional] + +## Methods + +### NewTrafficChartsTraffics + +`func NewTrafficChartsTraffics() *TrafficChartsTraffics` + +NewTrafficChartsTraffics instantiates a new TrafficChartsTraffics object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTrafficChartsTrafficsWithDefaults + +`func NewTrafficChartsTrafficsWithDefaults() *TrafficChartsTraffics` + +NewTrafficChartsTrafficsWithDefaults instantiates a new TrafficChartsTraffics object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetTitle + +`func (o *TrafficChartsTraffics) GetTitle() string` + +GetTitle returns the Title field if non-nil, zero value otherwise. + +### GetTitleOk + +`func (o *TrafficChartsTraffics) 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 *TrafficChartsTraffics) SetTitle(v string)` + +SetTitle sets Title field to given value. + +### HasTitle + +`func (o *TrafficChartsTraffics) HasTitle() bool` + +HasTitle returns a boolean if a field has been set. + +### GetCategories + +`func (o *TrafficChartsTraffics) GetCategories() []time.Time` + +GetCategories returns the Categories field if non-nil, zero value otherwise. + +### GetCategoriesOk + +`func (o *TrafficChartsTraffics) GetCategoriesOk() (*[]time.Time, bool)` + +GetCategoriesOk returns a tuple with the Categories field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCategories + +`func (o *TrafficChartsTraffics) SetCategories(v []time.Time)` + +SetCategories sets Categories field to given value. + +### HasCategories + +`func (o *TrafficChartsTraffics) HasCategories() bool` + +HasCategories returns a boolean if a field has been set. + +### GetSeries + +`func (o *TrafficChartsTraffics) GetSeries() []TrafficChartsTrafficsSeriesInner` + +GetSeries returns the Series field if non-nil, zero value otherwise. + +### GetSeriesOk + +`func (o *TrafficChartsTraffics) GetSeriesOk() (*[]TrafficChartsTrafficsSeriesInner, bool)` + +GetSeriesOk returns a tuple with the Series field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSeries + +`func (o *TrafficChartsTraffics) SetSeries(v []TrafficChartsTrafficsSeriesInner)` + +SetSeries sets Series field to given value. + +### HasSeries + +`func (o *TrafficChartsTraffics) HasSeries() bool` + +HasSeries returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/TrafficChartsTrafficsSeriesInner.md b/docs/TrafficChartsTrafficsSeriesInner.md new file mode 100644 index 0000000..d2cbc43 --- /dev/null +++ b/docs/TrafficChartsTrafficsSeriesInner.md @@ -0,0 +1,82 @@ +# TrafficChartsTrafficsSeriesInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **string** | | [optional] +**Data** | Pointer to **[]int32** | | [optional] + +## Methods + +### NewTrafficChartsTrafficsSeriesInner + +`func NewTrafficChartsTrafficsSeriesInner() *TrafficChartsTrafficsSeriesInner` + +NewTrafficChartsTrafficsSeriesInner instantiates a new TrafficChartsTrafficsSeriesInner object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTrafficChartsTrafficsSeriesInnerWithDefaults + +`func NewTrafficChartsTrafficsSeriesInnerWithDefaults() *TrafficChartsTrafficsSeriesInner` + +NewTrafficChartsTrafficsSeriesInnerWithDefaults instantiates a new TrafficChartsTrafficsSeriesInner object +This 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 *TrafficChartsTrafficsSeriesInner) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *TrafficChartsTrafficsSeriesInner) 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 *TrafficChartsTrafficsSeriesInner) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *TrafficChartsTrafficsSeriesInner) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetData + +`func (o *TrafficChartsTrafficsSeriesInner) GetData() []int32` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *TrafficChartsTrafficsSeriesInner) GetDataOk() (*[]int32, 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 *TrafficChartsTrafficsSeriesInner) SetData(v []int32)` + +SetData sets Data field to given value. + +### HasData + +`func (o *TrafficChartsTrafficsSeriesInner) HasData() bool` + +HasData returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/TrafficStatistics.md b/docs/TrafficStatistics.md new file mode 100644 index 0000000..9df81c2 --- /dev/null +++ b/docs/TrafficStatistics.md @@ -0,0 +1,82 @@ +# TrafficStatistics + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Traffics** | Pointer to [**TrafficStatisticsTraffics**](TrafficStatisticsTraffics.md) | | [optional] +**Requests** | Pointer to [**TrafficStatisticsTraffics**](TrafficStatisticsTraffics.md) | | [optional] + +## Methods + +### NewTrafficStatistics + +`func NewTrafficStatistics() *TrafficStatistics` + +NewTrafficStatistics instantiates a new TrafficStatistics object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTrafficStatisticsWithDefaults + +`func NewTrafficStatisticsWithDefaults() *TrafficStatistics` + +NewTrafficStatisticsWithDefaults instantiates a new TrafficStatistics object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetTraffics + +`func (o *TrafficStatistics) GetTraffics() TrafficStatisticsTraffics` + +GetTraffics returns the Traffics field if non-nil, zero value otherwise. + +### GetTrafficsOk + +`func (o *TrafficStatistics) GetTrafficsOk() (*TrafficStatisticsTraffics, bool)` + +GetTrafficsOk returns a tuple with the Traffics field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTraffics + +`func (o *TrafficStatistics) SetTraffics(v TrafficStatisticsTraffics)` + +SetTraffics sets Traffics field to given value. + +### HasTraffics + +`func (o *TrafficStatistics) HasTraffics() bool` + +HasTraffics returns a boolean if a field has been set. + +### GetRequests + +`func (o *TrafficStatistics) GetRequests() TrafficStatisticsTraffics` + +GetRequests returns the Requests field if non-nil, zero value otherwise. + +### GetRequestsOk + +`func (o *TrafficStatistics) GetRequestsOk() (*TrafficStatisticsTraffics, bool)` + +GetRequestsOk returns a tuple with the Requests field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRequests + +`func (o *TrafficStatistics) SetRequests(v TrafficStatisticsTraffics)` + +SetRequests sets Requests field to given value. + +### HasRequests + +`func (o *TrafficStatistics) HasRequests() bool` + +HasRequests returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/TrafficStatisticsTraffics.md b/docs/TrafficStatisticsTraffics.md new file mode 100644 index 0000000..2fb8c54 --- /dev/null +++ b/docs/TrafficStatisticsTraffics.md @@ -0,0 +1,93 @@ +# TrafficStatisticsTraffics + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Saved** | **int32** | | +**Top** | **time.Time** | | +**Total** | **int32** | | + +## Methods + +### NewTrafficStatisticsTraffics + +`func NewTrafficStatisticsTraffics(saved int32, top time.Time, total int32, ) *TrafficStatisticsTraffics` + +NewTrafficStatisticsTraffics instantiates a new TrafficStatisticsTraffics object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTrafficStatisticsTrafficsWithDefaults + +`func NewTrafficStatisticsTrafficsWithDefaults() *TrafficStatisticsTraffics` + +NewTrafficStatisticsTrafficsWithDefaults instantiates a new TrafficStatisticsTraffics object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetSaved + +`func (o *TrafficStatisticsTraffics) GetSaved() int32` + +GetSaved returns the Saved field if non-nil, zero value otherwise. + +### GetSavedOk + +`func (o *TrafficStatisticsTraffics) GetSavedOk() (*int32, bool)` + +GetSavedOk returns a tuple with the Saved field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSaved + +`func (o *TrafficStatisticsTraffics) SetSaved(v int32)` + +SetSaved sets Saved field to given value. + + +### GetTop + +`func (o *TrafficStatisticsTraffics) GetTop() time.Time` + +GetTop returns the Top field if non-nil, zero value otherwise. + +### GetTopOk + +`func (o *TrafficStatisticsTraffics) GetTopOk() (*time.Time, bool)` + +GetTopOk returns a tuple with the Top field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTop + +`func (o *TrafficStatisticsTraffics) SetTop(v time.Time)` + +SetTop sets Top field to given value. + + +### GetTotal + +`func (o *TrafficStatisticsTraffics) GetTotal() int32` + +GetTotal returns the Total field if non-nil, zero value otherwise. + +### GetTotalOk + +`func (o *TrafficStatisticsTraffics) 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 *TrafficStatisticsTraffics) SetTotal(v int32)` + +SetTotal sets Total field to given value. + + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/TrafficsData.md b/docs/TrafficsData.md new file mode 100644 index 0000000..2e9e817 --- /dev/null +++ b/docs/TrafficsData.md @@ -0,0 +1,56 @@ +# TrafficsData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to **map[string]interface{}** | | [optional] + +## Methods + +### NewTrafficsData + +`func NewTrafficsData() *TrafficsData` + +NewTrafficsData instantiates a new TrafficsData object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTrafficsDataWithDefaults + +`func NewTrafficsDataWithDefaults() *TrafficsData` + +NewTrafficsDataWithDefaults instantiates a new TrafficsData object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *TrafficsData) GetData() map[string]interface{}` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *TrafficsData) GetDataOk() (*map[string]interface{}, 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 *TrafficsData) SetData(v map[string]interface{})` + +SetData sets Data field to given value. + +### HasData + +`func (o *TrafficsData) HasData() bool` + +HasData returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/TransferDomain.md b/docs/TransferDomain.md new file mode 100644 index 0000000..540843c --- /dev/null +++ b/docs/TransferDomain.md @@ -0,0 +1,51 @@ +# TransferDomain + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountId** | **string** | | + +## Methods + +### NewTransferDomain + +`func NewTransferDomain(accountId string, ) *TransferDomain` + +NewTransferDomain instantiates a new TransferDomain object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTransferDomainWithDefaults + +`func NewTransferDomainWithDefaults() *TransferDomain` + +NewTransferDomainWithDefaults instantiates a new TransferDomain object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetAccountId + +`func (o *TransferDomain) GetAccountId() string` + +GetAccountId returns the AccountId field if non-nil, zero value otherwise. + +### GetAccountIdOk + +`func (o *TransferDomain) GetAccountIdOk() (*string, bool)` + +GetAccountIdOk returns a tuple with the AccountId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccountId + +`func (o *TransferDomain) SetAccountId(v string)` + +SetAccountId sets AccountId field to given value. + + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/TransferDomainChangeStatus.md b/docs/TransferDomainChangeStatus.md new file mode 100644 index 0000000..faee42f --- /dev/null +++ b/docs/TransferDomainChangeStatus.md @@ -0,0 +1,98 @@ +# TransferDomainChangeStatus + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Domain** | **string** | | +**Status** | **string** | | +**PreserveState** | Pointer to **bool** | | [optional] [default to false] + +## Methods + +### NewTransferDomainChangeStatus + +`func NewTransferDomainChangeStatus(domain string, status string, ) *TransferDomainChangeStatus` + +NewTransferDomainChangeStatus instantiates a new TransferDomainChangeStatus object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTransferDomainChangeStatusWithDefaults + +`func NewTransferDomainChangeStatusWithDefaults() *TransferDomainChangeStatus` + +NewTransferDomainChangeStatusWithDefaults instantiates a new TransferDomainChangeStatus object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetDomain + +`func (o *TransferDomainChangeStatus) GetDomain() string` + +GetDomain returns the Domain field if non-nil, zero value otherwise. + +### GetDomainOk + +`func (o *TransferDomainChangeStatus) GetDomainOk() (*string, bool)` + +GetDomainOk returns a tuple with the Domain field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDomain + +`func (o *TransferDomainChangeStatus) SetDomain(v string)` + +SetDomain sets Domain field to given value. + + +### GetStatus + +`func (o *TransferDomainChangeStatus) GetStatus() string` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *TransferDomainChangeStatus) GetStatusOk() (*string, 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 *TransferDomainChangeStatus) SetStatus(v string)` + +SetStatus sets Status field to given value. + + +### GetPreserveState + +`func (o *TransferDomainChangeStatus) GetPreserveState() bool` + +GetPreserveState returns the PreserveState field if non-nil, zero value otherwise. + +### GetPreserveStateOk + +`func (o *TransferDomainChangeStatus) GetPreserveStateOk() (*bool, bool)` + +GetPreserveStateOk returns a tuple with the PreserveState field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPreserveState + +`func (o *TransferDomainChangeStatus) SetPreserveState(v bool)` + +SetPreserveState sets PreserveState field to given value. + +### HasPreserveState + +`func (o *TransferDomainChangeStatus) HasPreserveState() bool` + +HasPreserveState returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/TransportLayerProxiesIndex200Response.md b/docs/TransportLayerProxiesIndex200Response.md new file mode 100644 index 0000000..b957691 --- /dev/null +++ b/docs/TransportLayerProxiesIndex200Response.md @@ -0,0 +1,108 @@ +# TransportLayerProxiesIndex200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**[]TransportLayerProxy**](TransportLayerProxy.md) | | [optional] +**Links** | Pointer to [**PaginatedResponseLinks**](PaginatedResponseLinks.md) | | [optional] +**Meta** | Pointer to [**PaginatedResponseMeta**](PaginatedResponseMeta.md) | | [optional] + +## Methods + +### NewTransportLayerProxiesIndex200Response + +`func NewTransportLayerProxiesIndex200Response() *TransportLayerProxiesIndex200Response` + +NewTransportLayerProxiesIndex200Response instantiates a new TransportLayerProxiesIndex200Response object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTransportLayerProxiesIndex200ResponseWithDefaults + +`func NewTransportLayerProxiesIndex200ResponseWithDefaults() *TransportLayerProxiesIndex200Response` + +NewTransportLayerProxiesIndex200ResponseWithDefaults instantiates a new TransportLayerProxiesIndex200Response object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *TransportLayerProxiesIndex200Response) GetData() []TransportLayerProxy` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *TransportLayerProxiesIndex200Response) GetDataOk() (*[]TransportLayerProxy, 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 *TransportLayerProxiesIndex200Response) SetData(v []TransportLayerProxy)` + +SetData sets Data field to given value. + +### HasData + +`func (o *TransportLayerProxiesIndex200Response) HasData() bool` + +HasData returns a boolean if a field has been set. + +### GetLinks + +`func (o *TransportLayerProxiesIndex200Response) GetLinks() PaginatedResponseLinks` + +GetLinks returns the Links field if non-nil, zero value otherwise. + +### GetLinksOk + +`func (o *TransportLayerProxiesIndex200Response) GetLinksOk() (*PaginatedResponseLinks, bool)` + +GetLinksOk returns a tuple with the Links field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLinks + +`func (o *TransportLayerProxiesIndex200Response) SetLinks(v PaginatedResponseLinks)` + +SetLinks sets Links field to given value. + +### HasLinks + +`func (o *TransportLayerProxiesIndex200Response) HasLinks() bool` + +HasLinks returns a boolean if a field has been set. + +### GetMeta + +`func (o *TransportLayerProxiesIndex200Response) GetMeta() PaginatedResponseMeta` + +GetMeta returns the Meta field if non-nil, zero value otherwise. + +### GetMetaOk + +`func (o *TransportLayerProxiesIndex200Response) GetMetaOk() (*PaginatedResponseMeta, bool)` + +GetMetaOk returns a tuple with the Meta field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMeta + +`func (o *TransportLayerProxiesIndex200Response) SetMeta(v PaginatedResponseMeta)` + +SetMeta sets Meta field to given value. + +### HasMeta + +`func (o *TransportLayerProxiesIndex200Response) HasMeta() bool` + +HasMeta returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/TransportLayerProxy.md b/docs/TransportLayerProxy.md new file mode 100644 index 0000000..f2178a1 --- /dev/null +++ b/docs/TransportLayerProxy.md @@ -0,0 +1,378 @@ +# TransportLayerProxy + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **string** | | [optional] [readonly] +**CreatedAt** | Pointer to **time.Time** | | [optional] [readonly] +**Status** | Pointer to **string** | | [optional] [readonly] +**AppName** | Pointer to **string** | | [optional] +**Description** | Pointer to **string** | | [optional] +**Domain** | Pointer to **string** | | [optional] +**Port** | Pointer to **int32** | | [optional] +**Ip** | Pointer to **NullableString** | | [optional] +**ProxyProtocol** | Pointer to **string** | | [optional] +**BalanceAlgorithm** | Pointer to **string** | | [optional] +**Servers** | Pointer to [**[]TransportLayerProxyServersInner**](TransportLayerProxyServersInner.md) | | [optional] +**FirewallDefaultAction** | Pointer to **string** | | [optional] +**Firewalls** | Pointer to [**[]TransportLayerProxyFirewallsInner**](TransportLayerProxyFirewallsInner.md) | | [optional] + +## Methods + +### NewTransportLayerProxy + +`func NewTransportLayerProxy() *TransportLayerProxy` + +NewTransportLayerProxy instantiates a new TransportLayerProxy object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTransportLayerProxyWithDefaults + +`func NewTransportLayerProxyWithDefaults() *TransportLayerProxy` + +NewTransportLayerProxyWithDefaults instantiates a new TransportLayerProxy object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *TransportLayerProxy) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *TransportLayerProxy) 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 *TransportLayerProxy) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *TransportLayerProxy) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetCreatedAt + +`func (o *TransportLayerProxy) GetCreatedAt() time.Time` + +GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. + +### GetCreatedAtOk + +`func (o *TransportLayerProxy) GetCreatedAtOk() (*time.Time, bool)` + +GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedAt + +`func (o *TransportLayerProxy) SetCreatedAt(v time.Time)` + +SetCreatedAt sets CreatedAt field to given value. + +### HasCreatedAt + +`func (o *TransportLayerProxy) HasCreatedAt() bool` + +HasCreatedAt returns a boolean if a field has been set. + +### GetStatus + +`func (o *TransportLayerProxy) GetStatus() string` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *TransportLayerProxy) GetStatusOk() (*string, 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 *TransportLayerProxy) SetStatus(v string)` + +SetStatus sets Status field to given value. + +### HasStatus + +`func (o *TransportLayerProxy) HasStatus() bool` + +HasStatus returns a boolean if a field has been set. + +### GetAppName + +`func (o *TransportLayerProxy) GetAppName() string` + +GetAppName returns the AppName field if non-nil, zero value otherwise. + +### GetAppNameOk + +`func (o *TransportLayerProxy) GetAppNameOk() (*string, bool)` + +GetAppNameOk returns a tuple with the AppName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAppName + +`func (o *TransportLayerProxy) SetAppName(v string)` + +SetAppName sets AppName field to given value. + +### HasAppName + +`func (o *TransportLayerProxy) HasAppName() bool` + +HasAppName returns a boolean if a field has been set. + +### GetDescription + +`func (o *TransportLayerProxy) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *TransportLayerProxy) 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 *TransportLayerProxy) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *TransportLayerProxy) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetDomain + +`func (o *TransportLayerProxy) GetDomain() string` + +GetDomain returns the Domain field if non-nil, zero value otherwise. + +### GetDomainOk + +`func (o *TransportLayerProxy) GetDomainOk() (*string, bool)` + +GetDomainOk returns a tuple with the Domain field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDomain + +`func (o *TransportLayerProxy) SetDomain(v string)` + +SetDomain sets Domain field to given value. + +### HasDomain + +`func (o *TransportLayerProxy) HasDomain() bool` + +HasDomain returns a boolean if a field has been set. + +### GetPort + +`func (o *TransportLayerProxy) GetPort() int32` + +GetPort returns the Port field if non-nil, zero value otherwise. + +### GetPortOk + +`func (o *TransportLayerProxy) GetPortOk() (*int32, bool)` + +GetPortOk returns a tuple with the Port field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPort + +`func (o *TransportLayerProxy) SetPort(v int32)` + +SetPort sets Port field to given value. + +### HasPort + +`func (o *TransportLayerProxy) HasPort() bool` + +HasPort returns a boolean if a field has been set. + +### GetIp + +`func (o *TransportLayerProxy) GetIp() string` + +GetIp returns the Ip field if non-nil, zero value otherwise. + +### GetIpOk + +`func (o *TransportLayerProxy) GetIpOk() (*string, bool)` + +GetIpOk returns a tuple with the Ip field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIp + +`func (o *TransportLayerProxy) SetIp(v string)` + +SetIp sets Ip field to given value. + +### HasIp + +`func (o *TransportLayerProxy) HasIp() bool` + +HasIp returns a boolean if a field has been set. + +### SetIpNil + +`func (o *TransportLayerProxy) SetIpNil(b bool)` + + SetIpNil sets the value for Ip to be an explicit nil + +### UnsetIp +`func (o *TransportLayerProxy) UnsetIp()` + +UnsetIp ensures that no value is present for Ip, not even an explicit nil +### GetProxyProtocol + +`func (o *TransportLayerProxy) GetProxyProtocol() string` + +GetProxyProtocol returns the ProxyProtocol field if non-nil, zero value otherwise. + +### GetProxyProtocolOk + +`func (o *TransportLayerProxy) GetProxyProtocolOk() (*string, bool)` + +GetProxyProtocolOk returns a tuple with the ProxyProtocol field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProxyProtocol + +`func (o *TransportLayerProxy) SetProxyProtocol(v string)` + +SetProxyProtocol sets ProxyProtocol field to given value. + +### HasProxyProtocol + +`func (o *TransportLayerProxy) HasProxyProtocol() bool` + +HasProxyProtocol returns a boolean if a field has been set. + +### GetBalanceAlgorithm + +`func (o *TransportLayerProxy) GetBalanceAlgorithm() string` + +GetBalanceAlgorithm returns the BalanceAlgorithm field if non-nil, zero value otherwise. + +### GetBalanceAlgorithmOk + +`func (o *TransportLayerProxy) GetBalanceAlgorithmOk() (*string, bool)` + +GetBalanceAlgorithmOk returns a tuple with the BalanceAlgorithm field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBalanceAlgorithm + +`func (o *TransportLayerProxy) SetBalanceAlgorithm(v string)` + +SetBalanceAlgorithm sets BalanceAlgorithm field to given value. + +### HasBalanceAlgorithm + +`func (o *TransportLayerProxy) HasBalanceAlgorithm() bool` + +HasBalanceAlgorithm returns a boolean if a field has been set. + +### GetServers + +`func (o *TransportLayerProxy) GetServers() []TransportLayerProxyServersInner` + +GetServers returns the Servers field if non-nil, zero value otherwise. + +### GetServersOk + +`func (o *TransportLayerProxy) GetServersOk() (*[]TransportLayerProxyServersInner, bool)` + +GetServersOk returns a tuple with the Servers field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetServers + +`func (o *TransportLayerProxy) SetServers(v []TransportLayerProxyServersInner)` + +SetServers sets Servers field to given value. + +### HasServers + +`func (o *TransportLayerProxy) HasServers() bool` + +HasServers returns a boolean if a field has been set. + +### GetFirewallDefaultAction + +`func (o *TransportLayerProxy) GetFirewallDefaultAction() string` + +GetFirewallDefaultAction returns the FirewallDefaultAction field if non-nil, zero value otherwise. + +### GetFirewallDefaultActionOk + +`func (o *TransportLayerProxy) GetFirewallDefaultActionOk() (*string, bool)` + +GetFirewallDefaultActionOk returns a tuple with the FirewallDefaultAction field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFirewallDefaultAction + +`func (o *TransportLayerProxy) SetFirewallDefaultAction(v string)` + +SetFirewallDefaultAction sets FirewallDefaultAction field to given value. + +### HasFirewallDefaultAction + +`func (o *TransportLayerProxy) HasFirewallDefaultAction() bool` + +HasFirewallDefaultAction returns a boolean if a field has been set. + +### GetFirewalls + +`func (o *TransportLayerProxy) GetFirewalls() []TransportLayerProxyFirewallsInner` + +GetFirewalls returns the Firewalls field if non-nil, zero value otherwise. + +### GetFirewallsOk + +`func (o *TransportLayerProxy) GetFirewallsOk() (*[]TransportLayerProxyFirewallsInner, bool)` + +GetFirewallsOk returns a tuple with the Firewalls field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFirewalls + +`func (o *TransportLayerProxy) SetFirewalls(v []TransportLayerProxyFirewallsInner)` + +SetFirewalls sets Firewalls field to given value. + +### HasFirewalls + +`func (o *TransportLayerProxy) HasFirewalls() bool` + +HasFirewalls returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/TransportLayerProxyApi.md b/docs/TransportLayerProxyApi.md new file mode 100644 index 0000000..a8d95ab --- /dev/null +++ b/docs/TransportLayerProxyApi.md @@ -0,0 +1,370 @@ +# \TransportLayerProxyApi + +All URIs are relative to *https://napi.arvancloud.ir/cdn/4.0* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**TransportLayerProxiesDestroy**](TransportLayerProxyApi.md#TransportLayerProxiesDestroy) | **Delete** /domains/{domain}/transport-layer-proxies/{transportLayerProxyId} | delete a transport layer proxy +[**TransportLayerProxiesIndex**](TransportLayerProxyApi.md#TransportLayerProxiesIndex) | **Get** /domains/{domain}/transport-layer-proxies | Show list of transport layer proxies for given domain +[**TransportLayerProxiesShow**](TransportLayerProxyApi.md#TransportLayerProxiesShow) | **Get** /domains/{domain}/transport-layer-proxies/{transportLayerProxyId} | Show a transport layer proxy's details based on given id +[**TransportLayerProxiesStore**](TransportLayerProxyApi.md#TransportLayerProxiesStore) | **Post** /domains/{domain}/transport-layer-proxies | Create new transport layer proxy +[**TransportLayerProxiesUpdate**](TransportLayerProxyApi.md#TransportLayerProxiesUpdate) | **Put** /domains/{domain}/transport-layer-proxies/{transportLayerProxyId} | Update a transport layer proxy + + + +## TransportLayerProxiesDestroy + +> MessageResponse TransportLayerProxiesDestroy(ctx, domain, transportLayerProxyId).Execute() + +delete a transport layer proxy + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + transportLayerProxyId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Transport layer proxy id + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.TransportLayerProxyApi.TransportLayerProxiesDestroy(context.Background(), domain, transportLayerProxyId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TransportLayerProxyApi.TransportLayerProxiesDestroy``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `TransportLayerProxiesDestroy`: MessageResponse + fmt.Fprintf(os.Stdout, "Response from `TransportLayerProxyApi.TransportLayerProxiesDestroy`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | +**transportLayerProxyId** | **string** | Transport layer proxy id | + +### Other Parameters + +Other parameters are passed through a pointer to a apiTransportLayerProxiesDestroyRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + +[**MessageResponse**](MessageResponse.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## TransportLayerProxiesIndex + +> TransportLayerProxiesIndex200Response TransportLayerProxiesIndex(ctx, domain).PerPage(perPage).Page(page).Execute() + +Show list of transport layer proxies for given domain + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + perPage := int32(56) // int32 | Set how many items returned per page (optional) + page := int32(56) // int32 | Set the desired page number (optional) (default to 1) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.TransportLayerProxyApi.TransportLayerProxiesIndex(context.Background(), domain).PerPage(perPage).Page(page).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TransportLayerProxyApi.TransportLayerProxiesIndex``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `TransportLayerProxiesIndex`: TransportLayerProxiesIndex200Response + fmt.Fprintf(os.Stdout, "Response from `TransportLayerProxyApi.TransportLayerProxiesIndex`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiTransportLayerProxiesIndexRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **perPage** | **int32** | Set how many items returned per page | + **page** | **int32** | Set the desired page number | [default to 1] + +### Return type + +[**TransportLayerProxiesIndex200Response**](TransportLayerProxiesIndex200Response.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## TransportLayerProxiesShow + +> TransportLayerProxyResponse TransportLayerProxiesShow(ctx, domain, transportLayerProxyId).Execute() + +Show a transport layer proxy's details based on given id + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + transportLayerProxyId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Transport layer proxy id + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.TransportLayerProxyApi.TransportLayerProxiesShow(context.Background(), domain, transportLayerProxyId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TransportLayerProxyApi.TransportLayerProxiesShow``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `TransportLayerProxiesShow`: TransportLayerProxyResponse + fmt.Fprintf(os.Stdout, "Response from `TransportLayerProxyApi.TransportLayerProxiesShow`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | +**transportLayerProxyId** | **string** | Transport layer proxy id | + +### Other Parameters + +Other parameters are passed through a pointer to a apiTransportLayerProxiesShowRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + +[**TransportLayerProxyResponse**](TransportLayerProxyResponse.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## TransportLayerProxiesStore + +> TransportLayerProxyResponse TransportLayerProxiesStore(ctx, domain).TransportLayerProxyStore(transportLayerProxyStore).Execute() + +Create new transport layer proxy + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + transportLayerProxyStore := *openapiclient.NewTransportLayerProxyStore("AppName_example", "sub.example.com", int32(123), "ProxyProtocol_example", "BalanceAlgorithm_example", "FirewallDefaultAction_example") // TransportLayerProxyStore | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.TransportLayerProxyApi.TransportLayerProxiesStore(context.Background(), domain).TransportLayerProxyStore(transportLayerProxyStore).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TransportLayerProxyApi.TransportLayerProxiesStore``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `TransportLayerProxiesStore`: TransportLayerProxyResponse + fmt.Fprintf(os.Stdout, "Response from `TransportLayerProxyApi.TransportLayerProxiesStore`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiTransportLayerProxiesStoreRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **transportLayerProxyStore** | [**TransportLayerProxyStore**](TransportLayerProxyStore.md) | | + +### Return type + +[**TransportLayerProxyResponse**](TransportLayerProxyResponse.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## TransportLayerProxiesUpdate + +> TransportLayerProxyResponse TransportLayerProxiesUpdate(ctx, domain, transportLayerProxyId).TransportLayerProxyUpdate(transportLayerProxyUpdate).Execute() + +Update a transport layer proxy + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + transportLayerProxyId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Transport layer proxy id + transportLayerProxyUpdate := *openapiclient.NewTransportLayerProxyUpdate("AppName_example", "ProxyProtocol_example", "BalanceAlgorithm_example") // TransportLayerProxyUpdate | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.TransportLayerProxyApi.TransportLayerProxiesUpdate(context.Background(), domain, transportLayerProxyId).TransportLayerProxyUpdate(transportLayerProxyUpdate).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TransportLayerProxyApi.TransportLayerProxiesUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `TransportLayerProxiesUpdate`: TransportLayerProxyResponse + fmt.Fprintf(os.Stdout, "Response from `TransportLayerProxyApi.TransportLayerProxiesUpdate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | +**transportLayerProxyId** | **string** | Transport layer proxy id | + +### Other Parameters + +Other parameters are passed through a pointer to a apiTransportLayerProxiesUpdateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **transportLayerProxyUpdate** | [**TransportLayerProxyUpdate**](TransportLayerProxyUpdate.md) | | + +### Return type + +[**TransportLayerProxyResponse**](TransportLayerProxyResponse.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + diff --git a/docs/TransportLayerProxyFirewall.md b/docs/TransportLayerProxyFirewall.md new file mode 100644 index 0000000..9413dda --- /dev/null +++ b/docs/TransportLayerProxyFirewall.md @@ -0,0 +1,186 @@ +# TransportLayerProxyFirewall + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Access** | Pointer to **string** | | [optional] +**Name** | Pointer to **string** | | [optional] +**Description** | Pointer to **string** | | [optional] +**Type** | Pointer to **string** | | [optional] +**Match** | Pointer to [**TransportLayerProxyMatch**](TransportLayerProxyMatch.md) | | [optional] +**Active** | Pointer to **bool** | | [optional] + +## Methods + +### NewTransportLayerProxyFirewall + +`func NewTransportLayerProxyFirewall() *TransportLayerProxyFirewall` + +NewTransportLayerProxyFirewall instantiates a new TransportLayerProxyFirewall object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTransportLayerProxyFirewallWithDefaults + +`func NewTransportLayerProxyFirewallWithDefaults() *TransportLayerProxyFirewall` + +NewTransportLayerProxyFirewallWithDefaults instantiates a new TransportLayerProxyFirewall object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetAccess + +`func (o *TransportLayerProxyFirewall) GetAccess() string` + +GetAccess returns the Access field if non-nil, zero value otherwise. + +### GetAccessOk + +`func (o *TransportLayerProxyFirewall) GetAccessOk() (*string, bool)` + +GetAccessOk returns a tuple with the Access field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccess + +`func (o *TransportLayerProxyFirewall) SetAccess(v string)` + +SetAccess sets Access field to given value. + +### HasAccess + +`func (o *TransportLayerProxyFirewall) HasAccess() bool` + +HasAccess returns a boolean if a field has been set. + +### GetName + +`func (o *TransportLayerProxyFirewall) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *TransportLayerProxyFirewall) 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 *TransportLayerProxyFirewall) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *TransportLayerProxyFirewall) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetDescription + +`func (o *TransportLayerProxyFirewall) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *TransportLayerProxyFirewall) 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 *TransportLayerProxyFirewall) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *TransportLayerProxyFirewall) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetType + +`func (o *TransportLayerProxyFirewall) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *TransportLayerProxyFirewall) 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 *TransportLayerProxyFirewall) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *TransportLayerProxyFirewall) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetMatch + +`func (o *TransportLayerProxyFirewall) GetMatch() TransportLayerProxyMatch` + +GetMatch returns the Match field if non-nil, zero value otherwise. + +### GetMatchOk + +`func (o *TransportLayerProxyFirewall) GetMatchOk() (*TransportLayerProxyMatch, bool)` + +GetMatchOk returns a tuple with the Match field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMatch + +`func (o *TransportLayerProxyFirewall) SetMatch(v TransportLayerProxyMatch)` + +SetMatch sets Match field to given value. + +### HasMatch + +`func (o *TransportLayerProxyFirewall) HasMatch() bool` + +HasMatch returns a boolean if a field has been set. + +### GetActive + +`func (o *TransportLayerProxyFirewall) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *TransportLayerProxyFirewall) GetActiveOk() (*bool, 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 *TransportLayerProxyFirewall) SetActive(v bool)` + +SetActive sets Active field to given value. + +### HasActive + +`func (o *TransportLayerProxyFirewall) HasActive() bool` + +HasActive returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/TransportLayerProxyFirewallsInner.md b/docs/TransportLayerProxyFirewallsInner.md new file mode 100644 index 0000000..34fd484 --- /dev/null +++ b/docs/TransportLayerProxyFirewallsInner.md @@ -0,0 +1,186 @@ +# TransportLayerProxyFirewallsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Access** | Pointer to **string** | | [optional] +**Name** | Pointer to **string** | | [optional] +**Description** | Pointer to **string** | | [optional] +**Type** | Pointer to **string** | | [optional] +**Match** | Pointer to [**TransportLayerProxyMatch**](TransportLayerProxyMatch.md) | | [optional] +**Active** | Pointer to **bool** | | [optional] + +## Methods + +### NewTransportLayerProxyFirewallsInner + +`func NewTransportLayerProxyFirewallsInner() *TransportLayerProxyFirewallsInner` + +NewTransportLayerProxyFirewallsInner instantiates a new TransportLayerProxyFirewallsInner object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTransportLayerProxyFirewallsInnerWithDefaults + +`func NewTransportLayerProxyFirewallsInnerWithDefaults() *TransportLayerProxyFirewallsInner` + +NewTransportLayerProxyFirewallsInnerWithDefaults instantiates a new TransportLayerProxyFirewallsInner object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetAccess + +`func (o *TransportLayerProxyFirewallsInner) GetAccess() string` + +GetAccess returns the Access field if non-nil, zero value otherwise. + +### GetAccessOk + +`func (o *TransportLayerProxyFirewallsInner) GetAccessOk() (*string, bool)` + +GetAccessOk returns a tuple with the Access field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccess + +`func (o *TransportLayerProxyFirewallsInner) SetAccess(v string)` + +SetAccess sets Access field to given value. + +### HasAccess + +`func (o *TransportLayerProxyFirewallsInner) HasAccess() bool` + +HasAccess returns a boolean if a field has been set. + +### GetName + +`func (o *TransportLayerProxyFirewallsInner) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *TransportLayerProxyFirewallsInner) 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 *TransportLayerProxyFirewallsInner) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *TransportLayerProxyFirewallsInner) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetDescription + +`func (o *TransportLayerProxyFirewallsInner) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *TransportLayerProxyFirewallsInner) 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 *TransportLayerProxyFirewallsInner) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *TransportLayerProxyFirewallsInner) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetType + +`func (o *TransportLayerProxyFirewallsInner) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *TransportLayerProxyFirewallsInner) 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 *TransportLayerProxyFirewallsInner) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *TransportLayerProxyFirewallsInner) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetMatch + +`func (o *TransportLayerProxyFirewallsInner) GetMatch() TransportLayerProxyMatch` + +GetMatch returns the Match field if non-nil, zero value otherwise. + +### GetMatchOk + +`func (o *TransportLayerProxyFirewallsInner) GetMatchOk() (*TransportLayerProxyMatch, bool)` + +GetMatchOk returns a tuple with the Match field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMatch + +`func (o *TransportLayerProxyFirewallsInner) SetMatch(v TransportLayerProxyMatch)` + +SetMatch sets Match field to given value. + +### HasMatch + +`func (o *TransportLayerProxyFirewallsInner) HasMatch() bool` + +HasMatch returns a boolean if a field has been set. + +### GetActive + +`func (o *TransportLayerProxyFirewallsInner) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *TransportLayerProxyFirewallsInner) GetActiveOk() (*bool, 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 *TransportLayerProxyFirewallsInner) SetActive(v bool)` + +SetActive sets Active field to given value. + +### HasActive + +`func (o *TransportLayerProxyFirewallsInner) HasActive() bool` + +HasActive returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/TransportLayerProxyMatch.md b/docs/TransportLayerProxyMatch.md new file mode 100644 index 0000000..93eeb37 --- /dev/null +++ b/docs/TransportLayerProxyMatch.md @@ -0,0 +1,30 @@ +# TransportLayerProxyMatch + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Methods + +### NewTransportLayerProxyMatch + +`func NewTransportLayerProxyMatch() *TransportLayerProxyMatch` + +NewTransportLayerProxyMatch instantiates a new TransportLayerProxyMatch object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTransportLayerProxyMatchWithDefaults + +`func NewTransportLayerProxyMatchWithDefaults() *TransportLayerProxyMatch` + +NewTransportLayerProxyMatchWithDefaults instantiates a new TransportLayerProxyMatch object +This 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]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/TransportLayerProxyResponse.md b/docs/TransportLayerProxyResponse.md new file mode 100644 index 0000000..71bd878 --- /dev/null +++ b/docs/TransportLayerProxyResponse.md @@ -0,0 +1,92 @@ +# TransportLayerProxyResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**TransportLayerProxy**](TransportLayerProxy.md) | | [optional] +**Message** | Pointer to **NullableString** | | [optional] + +## Methods + +### NewTransportLayerProxyResponse + +`func NewTransportLayerProxyResponse() *TransportLayerProxyResponse` + +NewTransportLayerProxyResponse instantiates a new TransportLayerProxyResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTransportLayerProxyResponseWithDefaults + +`func NewTransportLayerProxyResponseWithDefaults() *TransportLayerProxyResponse` + +NewTransportLayerProxyResponseWithDefaults instantiates a new TransportLayerProxyResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *TransportLayerProxyResponse) GetData() TransportLayerProxy` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *TransportLayerProxyResponse) GetDataOk() (*TransportLayerProxy, 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 *TransportLayerProxyResponse) SetData(v TransportLayerProxy)` + +SetData sets Data field to given value. + +### HasData + +`func (o *TransportLayerProxyResponse) HasData() bool` + +HasData returns a boolean if a field has been set. + +### GetMessage + +`func (o *TransportLayerProxyResponse) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *TransportLayerProxyResponse) GetMessageOk() (*string, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessage + +`func (o *TransportLayerProxyResponse) SetMessage(v string)` + +SetMessage sets Message field to given value. + +### HasMessage + +`func (o *TransportLayerProxyResponse) HasMessage() bool` + +HasMessage returns a boolean if a field has been set. + +### SetMessageNil + +`func (o *TransportLayerProxyResponse) SetMessageNil(b bool)` + + SetMessageNil sets the value for Message to be an explicit nil + +### UnsetMessage +`func (o *TransportLayerProxyResponse) UnsetMessage()` + +UnsetMessage ensures that no value is present for Message, not even an explicit nil + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/TransportLayerProxyServer.md b/docs/TransportLayerProxyServer.md new file mode 100644 index 0000000..6bf118c --- /dev/null +++ b/docs/TransportLayerProxyServer.md @@ -0,0 +1,192 @@ +# TransportLayerProxyServer + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Address** | **string** | | +**Port** | **int32** | | +**Weight** | **int32** | | +**Check** | **string** | | +**Fall** | Pointer to **int32** | | [optional] +**Inter** | Pointer to **int32** | | [optional] +**Rise** | Pointer to **int32** | | [optional] + +## Methods + +### NewTransportLayerProxyServer + +`func NewTransportLayerProxyServer(address string, port int32, weight int32, check string, ) *TransportLayerProxyServer` + +NewTransportLayerProxyServer instantiates a new TransportLayerProxyServer object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTransportLayerProxyServerWithDefaults + +`func NewTransportLayerProxyServerWithDefaults() *TransportLayerProxyServer` + +NewTransportLayerProxyServerWithDefaults instantiates a new TransportLayerProxyServer object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetAddress + +`func (o *TransportLayerProxyServer) GetAddress() string` + +GetAddress returns the Address field if non-nil, zero value otherwise. + +### GetAddressOk + +`func (o *TransportLayerProxyServer) 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 *TransportLayerProxyServer) SetAddress(v string)` + +SetAddress sets Address field to given value. + + +### GetPort + +`func (o *TransportLayerProxyServer) GetPort() int32` + +GetPort returns the Port field if non-nil, zero value otherwise. + +### GetPortOk + +`func (o *TransportLayerProxyServer) GetPortOk() (*int32, bool)` + +GetPortOk returns a tuple with the Port field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPort + +`func (o *TransportLayerProxyServer) SetPort(v int32)` + +SetPort sets Port field to given value. + + +### GetWeight + +`func (o *TransportLayerProxyServer) GetWeight() int32` + +GetWeight returns the Weight field if non-nil, zero value otherwise. + +### GetWeightOk + +`func (o *TransportLayerProxyServer) GetWeightOk() (*int32, bool)` + +GetWeightOk returns a tuple with the Weight field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetWeight + +`func (o *TransportLayerProxyServer) SetWeight(v int32)` + +SetWeight sets Weight field to given value. + + +### GetCheck + +`func (o *TransportLayerProxyServer) GetCheck() string` + +GetCheck returns the Check field if non-nil, zero value otherwise. + +### GetCheckOk + +`func (o *TransportLayerProxyServer) GetCheckOk() (*string, bool)` + +GetCheckOk returns a tuple with the Check field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCheck + +`func (o *TransportLayerProxyServer) SetCheck(v string)` + +SetCheck sets Check field to given value. + + +### GetFall + +`func (o *TransportLayerProxyServer) GetFall() int32` + +GetFall returns the Fall field if non-nil, zero value otherwise. + +### GetFallOk + +`func (o *TransportLayerProxyServer) GetFallOk() (*int32, bool)` + +GetFallOk returns a tuple with the Fall field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFall + +`func (o *TransportLayerProxyServer) SetFall(v int32)` + +SetFall sets Fall field to given value. + +### HasFall + +`func (o *TransportLayerProxyServer) HasFall() bool` + +HasFall returns a boolean if a field has been set. + +### GetInter + +`func (o *TransportLayerProxyServer) GetInter() int32` + +GetInter returns the Inter field if non-nil, zero value otherwise. + +### GetInterOk + +`func (o *TransportLayerProxyServer) GetInterOk() (*int32, bool)` + +GetInterOk returns a tuple with the Inter field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetInter + +`func (o *TransportLayerProxyServer) SetInter(v int32)` + +SetInter sets Inter field to given value. + +### HasInter + +`func (o *TransportLayerProxyServer) HasInter() bool` + +HasInter returns a boolean if a field has been set. + +### GetRise + +`func (o *TransportLayerProxyServer) GetRise() int32` + +GetRise returns the Rise field if non-nil, zero value otherwise. + +### GetRiseOk + +`func (o *TransportLayerProxyServer) GetRiseOk() (*int32, bool)` + +GetRiseOk returns a tuple with the Rise field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRise + +`func (o *TransportLayerProxyServer) SetRise(v int32)` + +SetRise sets Rise field to given value. + +### HasRise + +`func (o *TransportLayerProxyServer) HasRise() bool` + +HasRise returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/TransportLayerProxyServersInner.md b/docs/TransportLayerProxyServersInner.md new file mode 100644 index 0000000..36e12d6 --- /dev/null +++ b/docs/TransportLayerProxyServersInner.md @@ -0,0 +1,212 @@ +# TransportLayerProxyServersInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Address** | Pointer to **string** | | [optional] +**Port** | Pointer to **int32** | | [optional] +**Weight** | Pointer to **int32** | | [optional] +**Check** | Pointer to **string** | | [optional] +**Fall** | Pointer to **int32** | | [optional] +**Inter** | Pointer to **int32** | | [optional] +**Rise** | Pointer to **int32** | | [optional] + +## Methods + +### NewTransportLayerProxyServersInner + +`func NewTransportLayerProxyServersInner() *TransportLayerProxyServersInner` + +NewTransportLayerProxyServersInner instantiates a new TransportLayerProxyServersInner object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTransportLayerProxyServersInnerWithDefaults + +`func NewTransportLayerProxyServersInnerWithDefaults() *TransportLayerProxyServersInner` + +NewTransportLayerProxyServersInnerWithDefaults instantiates a new TransportLayerProxyServersInner object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetAddress + +`func (o *TransportLayerProxyServersInner) GetAddress() string` + +GetAddress returns the Address field if non-nil, zero value otherwise. + +### GetAddressOk + +`func (o *TransportLayerProxyServersInner) 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 *TransportLayerProxyServersInner) SetAddress(v string)` + +SetAddress sets Address field to given value. + +### HasAddress + +`func (o *TransportLayerProxyServersInner) HasAddress() bool` + +HasAddress returns a boolean if a field has been set. + +### GetPort + +`func (o *TransportLayerProxyServersInner) GetPort() int32` + +GetPort returns the Port field if non-nil, zero value otherwise. + +### GetPortOk + +`func (o *TransportLayerProxyServersInner) GetPortOk() (*int32, bool)` + +GetPortOk returns a tuple with the Port field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPort + +`func (o *TransportLayerProxyServersInner) SetPort(v int32)` + +SetPort sets Port field to given value. + +### HasPort + +`func (o *TransportLayerProxyServersInner) HasPort() bool` + +HasPort returns a boolean if a field has been set. + +### GetWeight + +`func (o *TransportLayerProxyServersInner) GetWeight() int32` + +GetWeight returns the Weight field if non-nil, zero value otherwise. + +### GetWeightOk + +`func (o *TransportLayerProxyServersInner) GetWeightOk() (*int32, bool)` + +GetWeightOk returns a tuple with the Weight field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetWeight + +`func (o *TransportLayerProxyServersInner) SetWeight(v int32)` + +SetWeight sets Weight field to given value. + +### HasWeight + +`func (o *TransportLayerProxyServersInner) HasWeight() bool` + +HasWeight returns a boolean if a field has been set. + +### GetCheck + +`func (o *TransportLayerProxyServersInner) GetCheck() string` + +GetCheck returns the Check field if non-nil, zero value otherwise. + +### GetCheckOk + +`func (o *TransportLayerProxyServersInner) GetCheckOk() (*string, bool)` + +GetCheckOk returns a tuple with the Check field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCheck + +`func (o *TransportLayerProxyServersInner) SetCheck(v string)` + +SetCheck sets Check field to given value. + +### HasCheck + +`func (o *TransportLayerProxyServersInner) HasCheck() bool` + +HasCheck returns a boolean if a field has been set. + +### GetFall + +`func (o *TransportLayerProxyServersInner) GetFall() int32` + +GetFall returns the Fall field if non-nil, zero value otherwise. + +### GetFallOk + +`func (o *TransportLayerProxyServersInner) GetFallOk() (*int32, bool)` + +GetFallOk returns a tuple with the Fall field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFall + +`func (o *TransportLayerProxyServersInner) SetFall(v int32)` + +SetFall sets Fall field to given value. + +### HasFall + +`func (o *TransportLayerProxyServersInner) HasFall() bool` + +HasFall returns a boolean if a field has been set. + +### GetInter + +`func (o *TransportLayerProxyServersInner) GetInter() int32` + +GetInter returns the Inter field if non-nil, zero value otherwise. + +### GetInterOk + +`func (o *TransportLayerProxyServersInner) GetInterOk() (*int32, bool)` + +GetInterOk returns a tuple with the Inter field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetInter + +`func (o *TransportLayerProxyServersInner) SetInter(v int32)` + +SetInter sets Inter field to given value. + +### HasInter + +`func (o *TransportLayerProxyServersInner) HasInter() bool` + +HasInter returns a boolean if a field has been set. + +### GetRise + +`func (o *TransportLayerProxyServersInner) GetRise() int32` + +GetRise returns the Rise field if non-nil, zero value otherwise. + +### GetRiseOk + +`func (o *TransportLayerProxyServersInner) GetRiseOk() (*int32, bool)` + +GetRiseOk returns a tuple with the Rise field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRise + +`func (o *TransportLayerProxyServersInner) SetRise(v int32)` + +SetRise sets Rise field to given value. + +### HasRise + +`func (o *TransportLayerProxyServersInner) HasRise() bool` + +HasRise returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/TransportLayerProxyStore.md b/docs/TransportLayerProxyStore.md new file mode 100644 index 0000000..4189a73 --- /dev/null +++ b/docs/TransportLayerProxyStore.md @@ -0,0 +1,234 @@ +# TransportLayerProxyStore + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AppName** | **string** | | +**Description** | Pointer to **string** | | [optional] +**Domain** | **string** | | +**Port** | **int32** | | +**ProxyProtocol** | **string** | | +**BalanceAlgorithm** | **string** | | +**Servers** | Pointer to [**[]TransportLayerProxyServer**](TransportLayerProxyServer.md) | | [optional] +**FirewallDefaultAction** | **string** | | +**Firewalls** | Pointer to [**[]TransportLayerProxyFirewall**](TransportLayerProxyFirewall.md) | | [optional] + +## Methods + +### NewTransportLayerProxyStore + +`func NewTransportLayerProxyStore(appName string, domain string, port int32, proxyProtocol string, balanceAlgorithm string, firewallDefaultAction string, ) *TransportLayerProxyStore` + +NewTransportLayerProxyStore instantiates a new TransportLayerProxyStore object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTransportLayerProxyStoreWithDefaults + +`func NewTransportLayerProxyStoreWithDefaults() *TransportLayerProxyStore` + +NewTransportLayerProxyStoreWithDefaults instantiates a new TransportLayerProxyStore object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetAppName + +`func (o *TransportLayerProxyStore) GetAppName() string` + +GetAppName returns the AppName field if non-nil, zero value otherwise. + +### GetAppNameOk + +`func (o *TransportLayerProxyStore) GetAppNameOk() (*string, bool)` + +GetAppNameOk returns a tuple with the AppName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAppName + +`func (o *TransportLayerProxyStore) SetAppName(v string)` + +SetAppName sets AppName field to given value. + + +### GetDescription + +`func (o *TransportLayerProxyStore) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *TransportLayerProxyStore) 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 *TransportLayerProxyStore) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *TransportLayerProxyStore) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetDomain + +`func (o *TransportLayerProxyStore) GetDomain() string` + +GetDomain returns the Domain field if non-nil, zero value otherwise. + +### GetDomainOk + +`func (o *TransportLayerProxyStore) GetDomainOk() (*string, bool)` + +GetDomainOk returns a tuple with the Domain field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDomain + +`func (o *TransportLayerProxyStore) SetDomain(v string)` + +SetDomain sets Domain field to given value. + + +### GetPort + +`func (o *TransportLayerProxyStore) GetPort() int32` + +GetPort returns the Port field if non-nil, zero value otherwise. + +### GetPortOk + +`func (o *TransportLayerProxyStore) GetPortOk() (*int32, bool)` + +GetPortOk returns a tuple with the Port field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPort + +`func (o *TransportLayerProxyStore) SetPort(v int32)` + +SetPort sets Port field to given value. + + +### GetProxyProtocol + +`func (o *TransportLayerProxyStore) GetProxyProtocol() string` + +GetProxyProtocol returns the ProxyProtocol field if non-nil, zero value otherwise. + +### GetProxyProtocolOk + +`func (o *TransportLayerProxyStore) GetProxyProtocolOk() (*string, bool)` + +GetProxyProtocolOk returns a tuple with the ProxyProtocol field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProxyProtocol + +`func (o *TransportLayerProxyStore) SetProxyProtocol(v string)` + +SetProxyProtocol sets ProxyProtocol field to given value. + + +### GetBalanceAlgorithm + +`func (o *TransportLayerProxyStore) GetBalanceAlgorithm() string` + +GetBalanceAlgorithm returns the BalanceAlgorithm field if non-nil, zero value otherwise. + +### GetBalanceAlgorithmOk + +`func (o *TransportLayerProxyStore) GetBalanceAlgorithmOk() (*string, bool)` + +GetBalanceAlgorithmOk returns a tuple with the BalanceAlgorithm field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBalanceAlgorithm + +`func (o *TransportLayerProxyStore) SetBalanceAlgorithm(v string)` + +SetBalanceAlgorithm sets BalanceAlgorithm field to given value. + + +### GetServers + +`func (o *TransportLayerProxyStore) GetServers() []TransportLayerProxyServer` + +GetServers returns the Servers field if non-nil, zero value otherwise. + +### GetServersOk + +`func (o *TransportLayerProxyStore) GetServersOk() (*[]TransportLayerProxyServer, bool)` + +GetServersOk returns a tuple with the Servers field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetServers + +`func (o *TransportLayerProxyStore) SetServers(v []TransportLayerProxyServer)` + +SetServers sets Servers field to given value. + +### HasServers + +`func (o *TransportLayerProxyStore) HasServers() bool` + +HasServers returns a boolean if a field has been set. + +### GetFirewallDefaultAction + +`func (o *TransportLayerProxyStore) GetFirewallDefaultAction() string` + +GetFirewallDefaultAction returns the FirewallDefaultAction field if non-nil, zero value otherwise. + +### GetFirewallDefaultActionOk + +`func (o *TransportLayerProxyStore) GetFirewallDefaultActionOk() (*string, bool)` + +GetFirewallDefaultActionOk returns a tuple with the FirewallDefaultAction field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFirewallDefaultAction + +`func (o *TransportLayerProxyStore) SetFirewallDefaultAction(v string)` + +SetFirewallDefaultAction sets FirewallDefaultAction field to given value. + + +### GetFirewalls + +`func (o *TransportLayerProxyStore) GetFirewalls() []TransportLayerProxyFirewall` + +GetFirewalls returns the Firewalls field if non-nil, zero value otherwise. + +### GetFirewallsOk + +`func (o *TransportLayerProxyStore) GetFirewallsOk() (*[]TransportLayerProxyFirewall, bool)` + +GetFirewallsOk returns a tuple with the Firewalls field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFirewalls + +`func (o *TransportLayerProxyStore) SetFirewalls(v []TransportLayerProxyFirewall)` + +SetFirewalls sets Firewalls field to given value. + +### HasFirewalls + +`func (o *TransportLayerProxyStore) HasFirewalls() bool` + +HasFirewalls returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/TransportLayerProxyUpdate.md b/docs/TransportLayerProxyUpdate.md new file mode 100644 index 0000000..7d688a4 --- /dev/null +++ b/docs/TransportLayerProxyUpdate.md @@ -0,0 +1,249 @@ +# TransportLayerProxyUpdate + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AppName** | **string** | | +**Description** | Pointer to **string** | | [optional] +**Domain** | Pointer to **string** | | [optional] +**Port** | Pointer to **int32** | | [optional] +**ProxyProtocol** | **string** | | +**BalanceAlgorithm** | **string** | | +**Servers** | Pointer to [**[]TransportLayerProxyServer**](TransportLayerProxyServer.md) | | [optional] +**FirewallDefaultAction** | Pointer to **string** | | [optional] +**Firewalls** | Pointer to [**[]TransportLayerProxyFirewall**](TransportLayerProxyFirewall.md) | | [optional] + +## Methods + +### NewTransportLayerProxyUpdate + +`func NewTransportLayerProxyUpdate(appName string, proxyProtocol string, balanceAlgorithm string, ) *TransportLayerProxyUpdate` + +NewTransportLayerProxyUpdate instantiates a new TransportLayerProxyUpdate object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTransportLayerProxyUpdateWithDefaults + +`func NewTransportLayerProxyUpdateWithDefaults() *TransportLayerProxyUpdate` + +NewTransportLayerProxyUpdateWithDefaults instantiates a new TransportLayerProxyUpdate object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetAppName + +`func (o *TransportLayerProxyUpdate) GetAppName() string` + +GetAppName returns the AppName field if non-nil, zero value otherwise. + +### GetAppNameOk + +`func (o *TransportLayerProxyUpdate) GetAppNameOk() (*string, bool)` + +GetAppNameOk returns a tuple with the AppName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAppName + +`func (o *TransportLayerProxyUpdate) SetAppName(v string)` + +SetAppName sets AppName field to given value. + + +### GetDescription + +`func (o *TransportLayerProxyUpdate) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *TransportLayerProxyUpdate) 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 *TransportLayerProxyUpdate) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *TransportLayerProxyUpdate) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetDomain + +`func (o *TransportLayerProxyUpdate) GetDomain() string` + +GetDomain returns the Domain field if non-nil, zero value otherwise. + +### GetDomainOk + +`func (o *TransportLayerProxyUpdate) GetDomainOk() (*string, bool)` + +GetDomainOk returns a tuple with the Domain field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDomain + +`func (o *TransportLayerProxyUpdate) SetDomain(v string)` + +SetDomain sets Domain field to given value. + +### HasDomain + +`func (o *TransportLayerProxyUpdate) HasDomain() bool` + +HasDomain returns a boolean if a field has been set. + +### GetPort + +`func (o *TransportLayerProxyUpdate) GetPort() int32` + +GetPort returns the Port field if non-nil, zero value otherwise. + +### GetPortOk + +`func (o *TransportLayerProxyUpdate) GetPortOk() (*int32, bool)` + +GetPortOk returns a tuple with the Port field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPort + +`func (o *TransportLayerProxyUpdate) SetPort(v int32)` + +SetPort sets Port field to given value. + +### HasPort + +`func (o *TransportLayerProxyUpdate) HasPort() bool` + +HasPort returns a boolean if a field has been set. + +### GetProxyProtocol + +`func (o *TransportLayerProxyUpdate) GetProxyProtocol() string` + +GetProxyProtocol returns the ProxyProtocol field if non-nil, zero value otherwise. + +### GetProxyProtocolOk + +`func (o *TransportLayerProxyUpdate) GetProxyProtocolOk() (*string, bool)` + +GetProxyProtocolOk returns a tuple with the ProxyProtocol field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProxyProtocol + +`func (o *TransportLayerProxyUpdate) SetProxyProtocol(v string)` + +SetProxyProtocol sets ProxyProtocol field to given value. + + +### GetBalanceAlgorithm + +`func (o *TransportLayerProxyUpdate) GetBalanceAlgorithm() string` + +GetBalanceAlgorithm returns the BalanceAlgorithm field if non-nil, zero value otherwise. + +### GetBalanceAlgorithmOk + +`func (o *TransportLayerProxyUpdate) GetBalanceAlgorithmOk() (*string, bool)` + +GetBalanceAlgorithmOk returns a tuple with the BalanceAlgorithm field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBalanceAlgorithm + +`func (o *TransportLayerProxyUpdate) SetBalanceAlgorithm(v string)` + +SetBalanceAlgorithm sets BalanceAlgorithm field to given value. + + +### GetServers + +`func (o *TransportLayerProxyUpdate) GetServers() []TransportLayerProxyServer` + +GetServers returns the Servers field if non-nil, zero value otherwise. + +### GetServersOk + +`func (o *TransportLayerProxyUpdate) GetServersOk() (*[]TransportLayerProxyServer, bool)` + +GetServersOk returns a tuple with the Servers field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetServers + +`func (o *TransportLayerProxyUpdate) SetServers(v []TransportLayerProxyServer)` + +SetServers sets Servers field to given value. + +### HasServers + +`func (o *TransportLayerProxyUpdate) HasServers() bool` + +HasServers returns a boolean if a field has been set. + +### GetFirewallDefaultAction + +`func (o *TransportLayerProxyUpdate) GetFirewallDefaultAction() string` + +GetFirewallDefaultAction returns the FirewallDefaultAction field if non-nil, zero value otherwise. + +### GetFirewallDefaultActionOk + +`func (o *TransportLayerProxyUpdate) GetFirewallDefaultActionOk() (*string, bool)` + +GetFirewallDefaultActionOk returns a tuple with the FirewallDefaultAction field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFirewallDefaultAction + +`func (o *TransportLayerProxyUpdate) SetFirewallDefaultAction(v string)` + +SetFirewallDefaultAction sets FirewallDefaultAction field to given value. + +### HasFirewallDefaultAction + +`func (o *TransportLayerProxyUpdate) HasFirewallDefaultAction() bool` + +HasFirewallDefaultAction returns a boolean if a field has been set. + +### GetFirewalls + +`func (o *TransportLayerProxyUpdate) GetFirewalls() []TransportLayerProxyFirewall` + +GetFirewalls returns the Firewalls field if non-nil, zero value otherwise. + +### GetFirewallsOk + +`func (o *TransportLayerProxyUpdate) GetFirewallsOk() (*[]TransportLayerProxyFirewall, bool)` + +GetFirewallsOk returns a tuple with the Firewalls field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFirewalls + +`func (o *TransportLayerProxyUpdate) SetFirewalls(v []TransportLayerProxyFirewall)` + +SetFirewalls sets Firewalls field to given value. + +### HasFirewalls + +`func (o *TransportLayerProxyUpdate) HasFirewalls() bool` + +HasFirewalls returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/Troubleshoot.md b/docs/Troubleshoot.md new file mode 100644 index 0000000..d52cd53 --- /dev/null +++ b/docs/Troubleshoot.md @@ -0,0 +1,108 @@ +# Troubleshoot + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **string** | | [optional] +**Details** | Pointer to [**[]TroubleshootDetailsInner**](TroubleshootDetailsInner.md) | | [optional] +**CreatedAt** | Pointer to **string** | | [optional] + +## Methods + +### NewTroubleshoot + +`func NewTroubleshoot() *Troubleshoot` + +NewTroubleshoot instantiates a new Troubleshoot object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTroubleshootWithDefaults + +`func NewTroubleshootWithDefaults() *Troubleshoot` + +NewTroubleshootWithDefaults instantiates a new Troubleshoot object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *Troubleshoot) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *Troubleshoot) 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 *Troubleshoot) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *Troubleshoot) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetDetails + +`func (o *Troubleshoot) GetDetails() []TroubleshootDetailsInner` + +GetDetails returns the Details field if non-nil, zero value otherwise. + +### GetDetailsOk + +`func (o *Troubleshoot) GetDetailsOk() (*[]TroubleshootDetailsInner, bool)` + +GetDetailsOk returns a tuple with the Details field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDetails + +`func (o *Troubleshoot) SetDetails(v []TroubleshootDetailsInner)` + +SetDetails sets Details field to given value. + +### HasDetails + +`func (o *Troubleshoot) HasDetails() bool` + +HasDetails returns a boolean if a field has been set. + +### GetCreatedAt + +`func (o *Troubleshoot) GetCreatedAt() string` + +GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. + +### GetCreatedAtOk + +`func (o *Troubleshoot) GetCreatedAtOk() (*string, bool)` + +GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedAt + +`func (o *Troubleshoot) SetCreatedAt(v string)` + +SetCreatedAt sets CreatedAt field to given value. + +### HasCreatedAt + +`func (o *Troubleshoot) HasCreatedAt() bool` + +HasCreatedAt returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/TroubleshootApi.md b/docs/TroubleshootApi.md new file mode 100644 index 0000000..ec16544 --- /dev/null +++ b/docs/TroubleshootApi.md @@ -0,0 +1,219 @@ +# \TroubleshootApi + +All URIs are relative to *https://napi.arvancloud.ir/cdn/4.0* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**TroubleshootsIndex**](TroubleshootApi.md#TroubleshootsIndex) | **Get** /domains/{domain}/troubleshoots | Show list of troubleshoots for given domain +[**TroubleshootsLatest**](TroubleshootApi.md#TroubleshootsLatest) | **Get** /domains/{domain}/troubleshoots/latest | Show the latest troubleshoot for given domain +[**TroubleshootsStore**](TroubleshootApi.md#TroubleshootsStore) | **Post** /domains/{domain}/troubleshoots | Create new troubleshoot + + + +## TroubleshootsIndex + +> TroubleshootsIndex200Response TroubleshootsIndex(ctx, domain).PerPage(perPage).Page(page).Execute() + +Show list of troubleshoots for given domain + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + perPage := int32(56) // int32 | Set how many items returned per page (optional) + page := int32(56) // int32 | Set the desired page number (optional) (default to 1) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.TroubleshootApi.TroubleshootsIndex(context.Background(), domain).PerPage(perPage).Page(page).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TroubleshootApi.TroubleshootsIndex``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `TroubleshootsIndex`: TroubleshootsIndex200Response + fmt.Fprintf(os.Stdout, "Response from `TroubleshootApi.TroubleshootsIndex`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiTroubleshootsIndexRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **perPage** | **int32** | Set how many items returned per page | + **page** | **int32** | Set the desired page number | [default to 1] + +### Return type + +[**TroubleshootsIndex200Response**](TroubleshootsIndex200Response.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## TroubleshootsLatest + +> TroubleshootsStore201Response TroubleshootsLatest(ctx, domain).Execute() + +Show the latest troubleshoot for given domain + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.TroubleshootApi.TroubleshootsLatest(context.Background(), domain).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TroubleshootApi.TroubleshootsLatest``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `TroubleshootsLatest`: TroubleshootsStore201Response + fmt.Fprintf(os.Stdout, "Response from `TroubleshootApi.TroubleshootsLatest`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiTroubleshootsLatestRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**TroubleshootsStore201Response**](TroubleshootsStore201Response.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## TroubleshootsStore + +> TroubleshootsStore201Response TroubleshootsStore(ctx, domain).Execute() + +Create new troubleshoot + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.TroubleshootApi.TroubleshootsStore(context.Background(), domain).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TroubleshootApi.TroubleshootsStore``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `TroubleshootsStore`: TroubleshootsStore201Response + fmt.Fprintf(os.Stdout, "Response from `TroubleshootApi.TroubleshootsStore`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiTroubleshootsStoreRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**TroubleshootsStore201Response**](TroubleshootsStore201Response.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + diff --git a/docs/TroubleshootDetailsInner.md b/docs/TroubleshootDetailsInner.md new file mode 100644 index 0000000..c8af145 --- /dev/null +++ b/docs/TroubleshootDetailsInner.md @@ -0,0 +1,108 @@ +# TroubleshootDetailsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **string** | | [optional] +**Status** | Pointer to **string** | | [optional] +**Details** | Pointer to **string** | | [optional] + +## Methods + +### NewTroubleshootDetailsInner + +`func NewTroubleshootDetailsInner() *TroubleshootDetailsInner` + +NewTroubleshootDetailsInner instantiates a new TroubleshootDetailsInner object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTroubleshootDetailsInnerWithDefaults + +`func NewTroubleshootDetailsInnerWithDefaults() *TroubleshootDetailsInner` + +NewTroubleshootDetailsInnerWithDefaults instantiates a new TroubleshootDetailsInner object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *TroubleshootDetailsInner) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *TroubleshootDetailsInner) 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 *TroubleshootDetailsInner) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *TroubleshootDetailsInner) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetStatus + +`func (o *TroubleshootDetailsInner) GetStatus() string` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *TroubleshootDetailsInner) GetStatusOk() (*string, 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 *TroubleshootDetailsInner) SetStatus(v string)` + +SetStatus sets Status field to given value. + +### HasStatus + +`func (o *TroubleshootDetailsInner) HasStatus() bool` + +HasStatus returns a boolean if a field has been set. + +### GetDetails + +`func (o *TroubleshootDetailsInner) GetDetails() string` + +GetDetails returns the Details field if non-nil, zero value otherwise. + +### GetDetailsOk + +`func (o *TroubleshootDetailsInner) GetDetailsOk() (*string, bool)` + +GetDetailsOk returns a tuple with the Details field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDetails + +`func (o *TroubleshootDetailsInner) SetDetails(v string)` + +SetDetails sets Details field to given value. + +### HasDetails + +`func (o *TroubleshootDetailsInner) HasDetails() bool` + +HasDetails returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/TroubleshootsIndex200Response.md b/docs/TroubleshootsIndex200Response.md new file mode 100644 index 0000000..74136c7 --- /dev/null +++ b/docs/TroubleshootsIndex200Response.md @@ -0,0 +1,56 @@ +# TroubleshootsIndex200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**[]Troubleshoot**](Troubleshoot.md) | | [optional] + +## Methods + +### NewTroubleshootsIndex200Response + +`func NewTroubleshootsIndex200Response() *TroubleshootsIndex200Response` + +NewTroubleshootsIndex200Response instantiates a new TroubleshootsIndex200Response object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTroubleshootsIndex200ResponseWithDefaults + +`func NewTroubleshootsIndex200ResponseWithDefaults() *TroubleshootsIndex200Response` + +NewTroubleshootsIndex200ResponseWithDefaults instantiates a new TroubleshootsIndex200Response object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *TroubleshootsIndex200Response) GetData() []Troubleshoot` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *TroubleshootsIndex200Response) GetDataOk() (*[]Troubleshoot, 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 *TroubleshootsIndex200Response) SetData(v []Troubleshoot)` + +SetData sets Data field to given value. + +### HasData + +`func (o *TroubleshootsIndex200Response) HasData() bool` + +HasData returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/TroubleshootsStore201Response.md b/docs/TroubleshootsStore201Response.md new file mode 100644 index 0000000..39814df --- /dev/null +++ b/docs/TroubleshootsStore201Response.md @@ -0,0 +1,56 @@ +# TroubleshootsStore201Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**Troubleshoot**](Troubleshoot.md) | | [optional] + +## Methods + +### NewTroubleshootsStore201Response + +`func NewTroubleshootsStore201Response() *TroubleshootsStore201Response` + +NewTroubleshootsStore201Response instantiates a new TroubleshootsStore201Response object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTroubleshootsStore201ResponseWithDefaults + +`func NewTroubleshootsStore201ResponseWithDefaults() *TroubleshootsStore201Response` + +NewTroubleshootsStore201ResponseWithDefaults instantiates a new TroubleshootsStore201Response object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *TroubleshootsStore201Response) GetData() Troubleshoot` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *TroubleshootsStore201Response) GetDataOk() (*Troubleshoot, 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 *TroubleshootsStore201Response) SetData(v Troubleshoot)` + +SetData sets Data field to given value. + +### HasData + +`func (o *TroubleshootsStore201Response) HasData() bool` + +HasData returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/UpdateBooleanStatus.md b/docs/UpdateBooleanStatus.md new file mode 100644 index 0000000..0c1e156 --- /dev/null +++ b/docs/UpdateBooleanStatus.md @@ -0,0 +1,56 @@ +# UpdateBooleanStatus + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Status** | Pointer to **bool** | | [optional] + +## Methods + +### NewUpdateBooleanStatus + +`func NewUpdateBooleanStatus() *UpdateBooleanStatus` + +NewUpdateBooleanStatus instantiates a new UpdateBooleanStatus object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewUpdateBooleanStatusWithDefaults + +`func NewUpdateBooleanStatusWithDefaults() *UpdateBooleanStatus` + +NewUpdateBooleanStatusWithDefaults instantiates a new UpdateBooleanStatus object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetStatus + +`func (o *UpdateBooleanStatus) GetStatus() bool` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *UpdateBooleanStatus) GetStatusOk() (*bool, 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 *UpdateBooleanStatus) SetStatus(v bool)` + +SetStatus sets Status field to given value. + +### HasStatus + +`func (o *UpdateBooleanStatus) HasStatus() bool` + +HasStatus returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/UpstreamTimeout.md b/docs/UpstreamTimeout.md new file mode 100644 index 0000000..9edeb06 --- /dev/null +++ b/docs/UpstreamTimeout.md @@ -0,0 +1,108 @@ +# UpstreamTimeout + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ConnectTimeout** | Pointer to **int32** | Seconds to timeout | [optional] [default to 30] +**ReadTimeout** | Pointer to **int32** | Seconds to timeout | [optional] [default to 100] +**SendTimeout** | Pointer to **int32** | Seconds to timeout | [optional] [default to 300] + +## Methods + +### NewUpstreamTimeout + +`func NewUpstreamTimeout() *UpstreamTimeout` + +NewUpstreamTimeout instantiates a new UpstreamTimeout object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewUpstreamTimeoutWithDefaults + +`func NewUpstreamTimeoutWithDefaults() *UpstreamTimeout` + +NewUpstreamTimeoutWithDefaults instantiates a new UpstreamTimeout object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetConnectTimeout + +`func (o *UpstreamTimeout) GetConnectTimeout() int32` + +GetConnectTimeout returns the ConnectTimeout field if non-nil, zero value otherwise. + +### GetConnectTimeoutOk + +`func (o *UpstreamTimeout) GetConnectTimeoutOk() (*int32, bool)` + +GetConnectTimeoutOk returns a tuple with the ConnectTimeout field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConnectTimeout + +`func (o *UpstreamTimeout) SetConnectTimeout(v int32)` + +SetConnectTimeout sets ConnectTimeout field to given value. + +### HasConnectTimeout + +`func (o *UpstreamTimeout) HasConnectTimeout() bool` + +HasConnectTimeout returns a boolean if a field has been set. + +### GetReadTimeout + +`func (o *UpstreamTimeout) GetReadTimeout() int32` + +GetReadTimeout returns the ReadTimeout field if non-nil, zero value otherwise. + +### GetReadTimeoutOk + +`func (o *UpstreamTimeout) GetReadTimeoutOk() (*int32, bool)` + +GetReadTimeoutOk returns a tuple with the ReadTimeout field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetReadTimeout + +`func (o *UpstreamTimeout) SetReadTimeout(v int32)` + +SetReadTimeout sets ReadTimeout field to given value. + +### HasReadTimeout + +`func (o *UpstreamTimeout) HasReadTimeout() bool` + +HasReadTimeout returns a boolean if a field has been set. + +### GetSendTimeout + +`func (o *UpstreamTimeout) GetSendTimeout() int32` + +GetSendTimeout returns the SendTimeout field if non-nil, zero value otherwise. + +### GetSendTimeoutOk + +`func (o *UpstreamTimeout) GetSendTimeoutOk() (*int32, bool)` + +GetSendTimeoutOk returns a tuple with the SendTimeout field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSendTimeout + +`func (o *UpstreamTimeout) SetSendTimeout(v int32)` + +SetSendTimeout sets SendTimeout field to given value. + +### HasSendTimeout + +`func (o *UpstreamTimeout) HasSendTimeout() bool` + +HasSendTimeout returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/UsageLimit.md b/docs/UsageLimit.md new file mode 100644 index 0000000..ba48855 --- /dev/null +++ b/docs/UsageLimit.md @@ -0,0 +1,82 @@ +# UsageLimit + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Min** | Pointer to **int32** | | [optional] +**Max** | Pointer to **int32** | | [optional] + +## Methods + +### NewUsageLimit + +`func NewUsageLimit() *UsageLimit` + +NewUsageLimit instantiates a new UsageLimit object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewUsageLimitWithDefaults + +`func NewUsageLimitWithDefaults() *UsageLimit` + +NewUsageLimitWithDefaults instantiates a new UsageLimit object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetMin + +`func (o *UsageLimit) GetMin() int32` + +GetMin returns the Min field if non-nil, zero value otherwise. + +### GetMinOk + +`func (o *UsageLimit) GetMinOk() (*int32, bool)` + +GetMinOk returns a tuple with the Min field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMin + +`func (o *UsageLimit) SetMin(v int32)` + +SetMin sets Min field to given value. + +### HasMin + +`func (o *UsageLimit) HasMin() bool` + +HasMin returns a boolean if a field has been set. + +### GetMax + +`func (o *UsageLimit) GetMax() int32` + +GetMax returns the Max field if non-nil, zero value otherwise. + +### GetMaxOk + +`func (o *UsageLimit) GetMaxOk() (*int32, bool)` + +GetMaxOk returns a tuple with the Max field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMax + +`func (o *UsageLimit) SetMax(v int32)` + +SetMax sets Max field to given value. + +### HasMax + +`func (o *UsageLimit) HasMax() bool` + +HasMax returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/Usages.md b/docs/Usages.md new file mode 100644 index 0000000..a9702d9 --- /dev/null +++ b/docs/Usages.md @@ -0,0 +1,82 @@ +# Usages + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FeatureUsages** | Pointer to [**[]FeatureUsage**](FeatureUsage.md) | | [optional] +**EstimatedCost** | Pointer to [**EstimatedCost**](EstimatedCost.md) | | [optional] + +## Methods + +### NewUsages + +`func NewUsages() *Usages` + +NewUsages instantiates a new Usages object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewUsagesWithDefaults + +`func NewUsagesWithDefaults() *Usages` + +NewUsagesWithDefaults instantiates a new Usages object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetFeatureUsages + +`func (o *Usages) GetFeatureUsages() []FeatureUsage` + +GetFeatureUsages returns the FeatureUsages field if non-nil, zero value otherwise. + +### GetFeatureUsagesOk + +`func (o *Usages) GetFeatureUsagesOk() (*[]FeatureUsage, bool)` + +GetFeatureUsagesOk returns a tuple with the FeatureUsages field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFeatureUsages + +`func (o *Usages) SetFeatureUsages(v []FeatureUsage)` + +SetFeatureUsages sets FeatureUsages field to given value. + +### HasFeatureUsages + +`func (o *Usages) HasFeatureUsages() bool` + +HasFeatureUsages returns a boolean if a field has been set. + +### GetEstimatedCost + +`func (o *Usages) GetEstimatedCost() EstimatedCost` + +GetEstimatedCost returns the EstimatedCost field if non-nil, zero value otherwise. + +### GetEstimatedCostOk + +`func (o *Usages) GetEstimatedCostOk() (*EstimatedCost, bool)` + +GetEstimatedCostOk returns a tuple with the EstimatedCost field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEstimatedCost + +`func (o *Usages) SetEstimatedCost(v EstimatedCost)` + +SetEstimatedCost sets EstimatedCost field to given value. + +### HasEstimatedCost + +`func (o *Usages) HasEstimatedCost() bool` + +HasEstimatedCost returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/Violations.md b/docs/Violations.md new file mode 100644 index 0000000..6b5455d --- /dev/null +++ b/docs/Violations.md @@ -0,0 +1,56 @@ +# Violations + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Violations** | Pointer to [**ViolationsViolations**](ViolationsViolations.md) | | [optional] + +## Methods + +### NewViolations + +`func NewViolations() *Violations` + +NewViolations instantiates a new Violations object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewViolationsWithDefaults + +`func NewViolationsWithDefaults() *Violations` + +NewViolationsWithDefaults instantiates a new Violations object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetViolations + +`func (o *Violations) GetViolations() ViolationsViolations` + +GetViolations returns the Violations field if non-nil, zero value otherwise. + +### GetViolationsOk + +`func (o *Violations) GetViolationsOk() (*ViolationsViolations, bool)` + +GetViolationsOk returns a tuple with the Violations field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetViolations + +`func (o *Violations) SetViolations(v ViolationsViolations)` + +SetViolations sets Violations field to given value. + +### HasViolations + +`func (o *Violations) HasViolations() bool` + +HasViolations returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/ViolationsViolations.md b/docs/ViolationsViolations.md new file mode 100644 index 0000000..1cf0e9e --- /dev/null +++ b/docs/ViolationsViolations.md @@ -0,0 +1,160 @@ +# ViolationsViolations + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Paygo** | Pointer to **[]string** | | [optional] +**Basic** | Pointer to **[]string** | | [optional] +**Growth** | Pointer to **[]string** | | [optional] +**Professional** | Pointer to **[]string** | | [optional] +**Enterprise** | Pointer to **[]string** | | [optional] + +## Methods + +### NewViolationsViolations + +`func NewViolationsViolations() *ViolationsViolations` + +NewViolationsViolations instantiates a new ViolationsViolations object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewViolationsViolationsWithDefaults + +`func NewViolationsViolationsWithDefaults() *ViolationsViolations` + +NewViolationsViolationsWithDefaults instantiates a new ViolationsViolations object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetPaygo + +`func (o *ViolationsViolations) GetPaygo() []string` + +GetPaygo returns the Paygo field if non-nil, zero value otherwise. + +### GetPaygoOk + +`func (o *ViolationsViolations) GetPaygoOk() (*[]string, bool)` + +GetPaygoOk returns a tuple with the Paygo field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPaygo + +`func (o *ViolationsViolations) SetPaygo(v []string)` + +SetPaygo sets Paygo field to given value. + +### HasPaygo + +`func (o *ViolationsViolations) HasPaygo() bool` + +HasPaygo returns a boolean if a field has been set. + +### GetBasic + +`func (o *ViolationsViolations) GetBasic() []string` + +GetBasic returns the Basic field if non-nil, zero value otherwise. + +### GetBasicOk + +`func (o *ViolationsViolations) GetBasicOk() (*[]string, bool)` + +GetBasicOk returns a tuple with the Basic field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBasic + +`func (o *ViolationsViolations) SetBasic(v []string)` + +SetBasic sets Basic field to given value. + +### HasBasic + +`func (o *ViolationsViolations) HasBasic() bool` + +HasBasic returns a boolean if a field has been set. + +### GetGrowth + +`func (o *ViolationsViolations) GetGrowth() []string` + +GetGrowth returns the Growth field if non-nil, zero value otherwise. + +### GetGrowthOk + +`func (o *ViolationsViolations) GetGrowthOk() (*[]string, bool)` + +GetGrowthOk returns a tuple with the Growth field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetGrowth + +`func (o *ViolationsViolations) SetGrowth(v []string)` + +SetGrowth sets Growth field to given value. + +### HasGrowth + +`func (o *ViolationsViolations) HasGrowth() bool` + +HasGrowth returns a boolean if a field has been set. + +### GetProfessional + +`func (o *ViolationsViolations) GetProfessional() []string` + +GetProfessional returns the Professional field if non-nil, zero value otherwise. + +### GetProfessionalOk + +`func (o *ViolationsViolations) GetProfessionalOk() (*[]string, bool)` + +GetProfessionalOk returns a tuple with the Professional field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProfessional + +`func (o *ViolationsViolations) SetProfessional(v []string)` + +SetProfessional sets Professional field to given value. + +### HasProfessional + +`func (o *ViolationsViolations) HasProfessional() bool` + +HasProfessional returns a boolean if a field has been set. + +### GetEnterprise + +`func (o *ViolationsViolations) GetEnterprise() []string` + +GetEnterprise returns the Enterprise field if non-nil, zero value otherwise. + +### GetEnterpriseOk + +`func (o *ViolationsViolations) GetEnterpriseOk() (*[]string, bool)` + +GetEnterpriseOk returns a tuple with the Enterprise field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEnterprise + +`func (o *ViolationsViolations) SetEnterprise(v []string)` + +SetEnterprise sets Enterprise field to given value. + +### HasEnterprise + +`func (o *ViolationsViolations) HasEnterprise() bool` + +HasEnterprise returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/Visitors.md b/docs/Visitors.md new file mode 100644 index 0000000..9fd23d3 --- /dev/null +++ b/docs/Visitors.md @@ -0,0 +1,82 @@ +# Visitors + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Statistics** | Pointer to [**VisitorsStatistics**](VisitorsStatistics.md) | | [optional] +**Charts** | Pointer to [**VisitorsCharts**](VisitorsCharts.md) | | [optional] + +## Methods + +### NewVisitors + +`func NewVisitors() *Visitors` + +NewVisitors instantiates a new Visitors object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewVisitorsWithDefaults + +`func NewVisitorsWithDefaults() *Visitors` + +NewVisitorsWithDefaults instantiates a new Visitors object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetStatistics + +`func (o *Visitors) GetStatistics() VisitorsStatistics` + +GetStatistics returns the Statistics field if non-nil, zero value otherwise. + +### GetStatisticsOk + +`func (o *Visitors) GetStatisticsOk() (*VisitorsStatistics, bool)` + +GetStatisticsOk returns a tuple with the Statistics field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatistics + +`func (o *Visitors) SetStatistics(v VisitorsStatistics)` + +SetStatistics sets Statistics field to given value. + +### HasStatistics + +`func (o *Visitors) HasStatistics() bool` + +HasStatistics returns a boolean if a field has been set. + +### GetCharts + +`func (o *Visitors) GetCharts() VisitorsCharts` + +GetCharts returns the Charts field if non-nil, zero value otherwise. + +### GetChartsOk + +`func (o *Visitors) GetChartsOk() (*VisitorsCharts, bool)` + +GetChartsOk returns a tuple with the Charts field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCharts + +`func (o *Visitors) SetCharts(v VisitorsCharts)` + +SetCharts sets Charts field to given value. + +### HasCharts + +`func (o *Visitors) HasCharts() bool` + +HasCharts returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/VisitorsCharts.md b/docs/VisitorsCharts.md new file mode 100644 index 0000000..d64d402 --- /dev/null +++ b/docs/VisitorsCharts.md @@ -0,0 +1,56 @@ +# VisitorsCharts + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Visitors** | Pointer to [**VisitorsChartsVisitors**](VisitorsChartsVisitors.md) | | [optional] + +## Methods + +### NewVisitorsCharts + +`func NewVisitorsCharts() *VisitorsCharts` + +NewVisitorsCharts instantiates a new VisitorsCharts object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewVisitorsChartsWithDefaults + +`func NewVisitorsChartsWithDefaults() *VisitorsCharts` + +NewVisitorsChartsWithDefaults instantiates a new VisitorsCharts object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetVisitors + +`func (o *VisitorsCharts) GetVisitors() VisitorsChartsVisitors` + +GetVisitors returns the Visitors field if non-nil, zero value otherwise. + +### GetVisitorsOk + +`func (o *VisitorsCharts) GetVisitorsOk() (*VisitorsChartsVisitors, bool)` + +GetVisitorsOk returns a tuple with the Visitors field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVisitors + +`func (o *VisitorsCharts) SetVisitors(v VisitorsChartsVisitors)` + +SetVisitors sets Visitors field to given value. + +### HasVisitors + +`func (o *VisitorsCharts) HasVisitors() bool` + +HasVisitors returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/VisitorsChartsVisitors.md b/docs/VisitorsChartsVisitors.md new file mode 100644 index 0000000..dcd6d38 --- /dev/null +++ b/docs/VisitorsChartsVisitors.md @@ -0,0 +1,108 @@ +# VisitorsChartsVisitors + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Title** | Pointer to **string** | | [optional] +**Categories** | Pointer to [**[]time.Time**](time.Time.md) | | [optional] +**Series** | Pointer to [**[]VisitorsChartsVisitorsSeriesInner**](VisitorsChartsVisitorsSeriesInner.md) | | [optional] + +## Methods + +### NewVisitorsChartsVisitors + +`func NewVisitorsChartsVisitors() *VisitorsChartsVisitors` + +NewVisitorsChartsVisitors instantiates a new VisitorsChartsVisitors object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewVisitorsChartsVisitorsWithDefaults + +`func NewVisitorsChartsVisitorsWithDefaults() *VisitorsChartsVisitors` + +NewVisitorsChartsVisitorsWithDefaults instantiates a new VisitorsChartsVisitors object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetTitle + +`func (o *VisitorsChartsVisitors) GetTitle() string` + +GetTitle returns the Title field if non-nil, zero value otherwise. + +### GetTitleOk + +`func (o *VisitorsChartsVisitors) 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 *VisitorsChartsVisitors) SetTitle(v string)` + +SetTitle sets Title field to given value. + +### HasTitle + +`func (o *VisitorsChartsVisitors) HasTitle() bool` + +HasTitle returns a boolean if a field has been set. + +### GetCategories + +`func (o *VisitorsChartsVisitors) GetCategories() []time.Time` + +GetCategories returns the Categories field if non-nil, zero value otherwise. + +### GetCategoriesOk + +`func (o *VisitorsChartsVisitors) GetCategoriesOk() (*[]time.Time, bool)` + +GetCategoriesOk returns a tuple with the Categories field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCategories + +`func (o *VisitorsChartsVisitors) SetCategories(v []time.Time)` + +SetCategories sets Categories field to given value. + +### HasCategories + +`func (o *VisitorsChartsVisitors) HasCategories() bool` + +HasCategories returns a boolean if a field has been set. + +### GetSeries + +`func (o *VisitorsChartsVisitors) GetSeries() []VisitorsChartsVisitorsSeriesInner` + +GetSeries returns the Series field if non-nil, zero value otherwise. + +### GetSeriesOk + +`func (o *VisitorsChartsVisitors) GetSeriesOk() (*[]VisitorsChartsVisitorsSeriesInner, bool)` + +GetSeriesOk returns a tuple with the Series field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSeries + +`func (o *VisitorsChartsVisitors) SetSeries(v []VisitorsChartsVisitorsSeriesInner)` + +SetSeries sets Series field to given value. + +### HasSeries + +`func (o *VisitorsChartsVisitors) HasSeries() bool` + +HasSeries returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/VisitorsChartsVisitorsSeriesInner.md b/docs/VisitorsChartsVisitorsSeriesInner.md new file mode 100644 index 0000000..bbf618c --- /dev/null +++ b/docs/VisitorsChartsVisitorsSeriesInner.md @@ -0,0 +1,82 @@ +# VisitorsChartsVisitorsSeriesInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **string** | | [optional] +**Data** | Pointer to **[]int32** | | [optional] + +## Methods + +### NewVisitorsChartsVisitorsSeriesInner + +`func NewVisitorsChartsVisitorsSeriesInner() *VisitorsChartsVisitorsSeriesInner` + +NewVisitorsChartsVisitorsSeriesInner instantiates a new VisitorsChartsVisitorsSeriesInner object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewVisitorsChartsVisitorsSeriesInnerWithDefaults + +`func NewVisitorsChartsVisitorsSeriesInnerWithDefaults() *VisitorsChartsVisitorsSeriesInner` + +NewVisitorsChartsVisitorsSeriesInnerWithDefaults instantiates a new VisitorsChartsVisitorsSeriesInner object +This 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 *VisitorsChartsVisitorsSeriesInner) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *VisitorsChartsVisitorsSeriesInner) 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 *VisitorsChartsVisitorsSeriesInner) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *VisitorsChartsVisitorsSeriesInner) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetData + +`func (o *VisitorsChartsVisitorsSeriesInner) GetData() []int32` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *VisitorsChartsVisitorsSeriesInner) GetDataOk() (*[]int32, 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 *VisitorsChartsVisitorsSeriesInner) SetData(v []int32)` + +SetData sets Data field to given value. + +### HasData + +`func (o *VisitorsChartsVisitorsSeriesInner) HasData() bool` + +HasData returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/VisitorsData.md b/docs/VisitorsData.md new file mode 100644 index 0000000..d06e70c --- /dev/null +++ b/docs/VisitorsData.md @@ -0,0 +1,56 @@ +# VisitorsData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**Visitors**](Visitors.md) | | [optional] + +## Methods + +### NewVisitorsData + +`func NewVisitorsData() *VisitorsData` + +NewVisitorsData instantiates a new VisitorsData object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewVisitorsDataWithDefaults + +`func NewVisitorsDataWithDefaults() *VisitorsData` + +NewVisitorsDataWithDefaults instantiates a new VisitorsData object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *VisitorsData) GetData() Visitors` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *VisitorsData) GetDataOk() (*Visitors, 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 *VisitorsData) SetData(v Visitors)` + +SetData sets Data field to given value. + +### HasData + +`func (o *VisitorsData) HasData() bool` + +HasData returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/VisitorsStatistics.md b/docs/VisitorsStatistics.md new file mode 100644 index 0000000..047aa8e --- /dev/null +++ b/docs/VisitorsStatistics.md @@ -0,0 +1,56 @@ +# VisitorsStatistics + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Visitors** | Pointer to [**VisitorsStatisticsVisitors**](VisitorsStatisticsVisitors.md) | | [optional] + +## Methods + +### NewVisitorsStatistics + +`func NewVisitorsStatistics() *VisitorsStatistics` + +NewVisitorsStatistics instantiates a new VisitorsStatistics object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewVisitorsStatisticsWithDefaults + +`func NewVisitorsStatisticsWithDefaults() *VisitorsStatistics` + +NewVisitorsStatisticsWithDefaults instantiates a new VisitorsStatistics object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetVisitors + +`func (o *VisitorsStatistics) GetVisitors() VisitorsStatisticsVisitors` + +GetVisitors returns the Visitors field if non-nil, zero value otherwise. + +### GetVisitorsOk + +`func (o *VisitorsStatistics) GetVisitorsOk() (*VisitorsStatisticsVisitors, bool)` + +GetVisitorsOk returns a tuple with the Visitors field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVisitors + +`func (o *VisitorsStatistics) SetVisitors(v VisitorsStatisticsVisitors)` + +SetVisitors sets Visitors field to given value. + +### HasVisitors + +`func (o *VisitorsStatistics) HasVisitors() bool` + +HasVisitors returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/VisitorsStatisticsVisitors.md b/docs/VisitorsStatisticsVisitors.md new file mode 100644 index 0000000..bd00dbc --- /dev/null +++ b/docs/VisitorsStatisticsVisitors.md @@ -0,0 +1,72 @@ +# VisitorsStatisticsVisitors + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**TopVisitors** | **time.Time** | | +**TotalVisitors** | **int32** | | + +## Methods + +### NewVisitorsStatisticsVisitors + +`func NewVisitorsStatisticsVisitors(topVisitors time.Time, totalVisitors int32, ) *VisitorsStatisticsVisitors` + +NewVisitorsStatisticsVisitors instantiates a new VisitorsStatisticsVisitors object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewVisitorsStatisticsVisitorsWithDefaults + +`func NewVisitorsStatisticsVisitorsWithDefaults() *VisitorsStatisticsVisitors` + +NewVisitorsStatisticsVisitorsWithDefaults instantiates a new VisitorsStatisticsVisitors object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetTopVisitors + +`func (o *VisitorsStatisticsVisitors) GetTopVisitors() time.Time` + +GetTopVisitors returns the TopVisitors field if non-nil, zero value otherwise. + +### GetTopVisitorsOk + +`func (o *VisitorsStatisticsVisitors) GetTopVisitorsOk() (*time.Time, bool)` + +GetTopVisitorsOk returns a tuple with the TopVisitors field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTopVisitors + +`func (o *VisitorsStatisticsVisitors) SetTopVisitors(v time.Time)` + +SetTopVisitors sets TopVisitors field to given value. + + +### GetTotalVisitors + +`func (o *VisitorsStatisticsVisitors) GetTotalVisitors() int32` + +GetTotalVisitors returns the TotalVisitors field if non-nil, zero value otherwise. + +### GetTotalVisitorsOk + +`func (o *VisitorsStatisticsVisitors) GetTotalVisitorsOk() (*int32, bool)` + +GetTotalVisitorsOk returns a tuple with the TotalVisitors field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTotalVisitors + +`func (o *VisitorsStatisticsVisitors) SetTotalVisitors(v int32)` + +SetTotalVisitors sets TotalVisitors field to given value. + + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/WAFApi.md b/docs/WAFApi.md new file mode 100644 index 0000000..3faa69e --- /dev/null +++ b/docs/WAFApi.md @@ -0,0 +1,1364 @@ +# \WAFApi + +All URIs are relative to *https://napi.arvancloud.ir/cdn/4.0* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GlobalWafIndex**](WAFApi.md#GlobalWafIndex) | **Get** /waf | Get WAF presets +[**GlobalWafShowPackage**](WAFApi.md#GlobalWafShowPackage) | **Get** /waf/packages/{packageId} | Get WAF package details +[**WafIndex**](WAFApi.md#WafIndex) | **Get** /domains/{domain}/waf | Get WAF configuration +[**WafPackageReprioritize**](WAFApi.md#WafPackageReprioritize) | **Post** /domains/{domain}/waf/actions/reprioritize-package | Change priority of WAF packages +[**WafPackagesDestroy**](WAFApi.md#WafPackagesDestroy) | **Delete** /domains/{domain}/waf/packages/{id} | Delete WAF package from domain +[**WafPackagesIndex**](WAFApi.md#WafPackagesIndex) | **Get** /domains/{domain}/waf/packages | Get WAF packages +[**WafPackagesShow**](WAFApi.md#WafPackagesShow) | **Get** /domains/{domain}/waf/packages/{id} | Get WAF package information +[**WafPackagesStore**](WAFApi.md#WafPackagesStore) | **Post** /domains/{domain}/waf/packages | Add new WAF package to domain +[**WafPackagesUpdate**](WAFApi.md#WafPackagesUpdate) | **Patch** /domains/{domain}/waf/packages/{id} | Update the WAF package +[**WafReconfigure**](WAFApi.md#WafReconfigure) | **Post** /domains/{domain}/waf/actions/reconfigure | Reconfigure WAF module using a preset +[**WafReprioritize**](WAFApi.md#WafReprioritize) | **Post** /domains/{domain}/waf/actions/reprioritize | Change priority of WAF rules +[**WafRulesDestroy**](WAFApi.md#WafRulesDestroy) | **Delete** /domains/{domain}/waf/rules/{id} | Delete WAF rule +[**WafRulesIndex**](WAFApi.md#WafRulesIndex) | **Get** /domains/{domain}/waf/rules | Get WAF Rules +[**WafRulesShow**](WAFApi.md#WafRulesShow) | **Get** /domains/{domain}/waf/rules/{id} | Get WAF rule information +[**WafRulesStore**](WAFApi.md#WafRulesStore) | **Post** /domains/{domain}/waf/rules | Create new WAF rule +[**WafRulesUpdate**](WAFApi.md#WafRulesUpdate) | **Patch** /domains/{domain}/waf/rules/{id} | Update the WAF rule +[**WafSettingsIndex**](WAFApi.md#WafSettingsIndex) | **Get** /domains/{domain}/waf/settings | Get WAF configuration +[**WafSettingsUpdate**](WAFApi.md#WafSettingsUpdate) | **Patch** /domains/{domain}/waf/settings | Configure WAF module of the domain +[**WafUpdate**](WAFApi.md#WafUpdate) | **Patch** /domains/{domain}/waf | Configure WAF module of the domain + + + +## GlobalWafIndex + +> WafPresetsData GlobalWafIndex(ctx).Execute() + +Get WAF presets + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.WAFApi.GlobalWafIndex(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `WAFApi.GlobalWafIndex``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GlobalWafIndex`: WafPresetsData + fmt.Fprintf(os.Stdout, "Response from `WAFApi.GlobalWafIndex`: %v\n", resp) +} +``` + +### Path Parameters + +This endpoint does not need any parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a apiGlobalWafIndexRequest struct via the builder pattern + + +### Return type + +[**WafPresetsData**](WafPresetsData.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## GlobalWafShowPackage + +> WafPackageDetailsData GlobalWafShowPackage(ctx, packageId).Execute() + +Get WAF package details + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + packageId := "packageId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.WAFApi.GlobalWafShowPackage(context.Background(), packageId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `WAFApi.GlobalWafShowPackage``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GlobalWafShowPackage`: WafPackageDetailsData + fmt.Fprintf(os.Stdout, "Response from `WAFApi.GlobalWafShowPackage`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**packageId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGlobalWafShowPackageRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**WafPackageDetailsData**](WafPackageDetailsData.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## WafIndex + +> DomainWafData WafIndex(ctx, domain).Execute() + +Get WAF configuration + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.WAFApi.WafIndex(context.Background(), domain).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `WAFApi.WafIndex``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `WafIndex`: DomainWafData + fmt.Fprintf(os.Stdout, "Response from `WAFApi.WafIndex`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiWafIndexRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**DomainWafData**](DomainWafData.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## WafPackageReprioritize + +> MessageResponse WafPackageReprioritize(ctx, domain).WafReprioritize(wafReprioritize).Execute() + +Change priority of WAF packages + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + wafReprioritize := *openapiclient.NewWafReprioritize("PackageId_example") // WafReprioritize | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.WAFApi.WafPackageReprioritize(context.Background(), domain).WafReprioritize(wafReprioritize).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `WAFApi.WafPackageReprioritize``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `WafPackageReprioritize`: MessageResponse + fmt.Fprintf(os.Stdout, "Response from `WAFApi.WafPackageReprioritize`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiWafPackageReprioritizeRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **wafReprioritize** | [**WafReprioritize**](WafReprioritize.md) | | + +### Return type + +[**MessageResponse**](MessageResponse.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## WafPackagesDestroy + +> MessageResponse WafPackagesDestroy(ctx, domain, id).Execute() + +Delete WAF package from domain + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + id := "id_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.WAFApi.WafPackagesDestroy(context.Background(), domain, id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `WAFApi.WafPackagesDestroy``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `WafPackagesDestroy`: MessageResponse + fmt.Fprintf(os.Stdout, "Response from `WAFApi.WafPackagesDestroy`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | +**id** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiWafPackagesDestroyRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + +[**MessageResponse**](MessageResponse.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## WafPackagesIndex + +> DomainWafPackagesData WafPackagesIndex(ctx, domain).Available(available).Execute() + +Get WAF packages + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + available := true // bool | (optional) (default to false) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.WAFApi.WafPackagesIndex(context.Background(), domain).Available(available).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `WAFApi.WafPackagesIndex``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `WafPackagesIndex`: DomainWafPackagesData + fmt.Fprintf(os.Stdout, "Response from `WAFApi.WafPackagesIndex`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiWafPackagesIndexRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **available** | **bool** | | [default to false] + +### Return type + +[**DomainWafPackagesData**](DomainWafPackagesData.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## WafPackagesShow + +> DomainWafPackageDetailsData WafPackagesShow(ctx, domain, id).Execute() + +Get WAF package information + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + id := "id_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.WAFApi.WafPackagesShow(context.Background(), domain, id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `WAFApi.WafPackagesShow``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `WafPackagesShow`: DomainWafPackageDetailsData + fmt.Fprintf(os.Stdout, "Response from `WAFApi.WafPackagesShow`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | +**id** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiWafPackagesShowRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + +[**DomainWafPackageDetailsData**](DomainWafPackageDetailsData.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## WafPackagesStore + +> WafPackagesStore200Response WafPackagesStore(ctx, domain).DomainWafPackageStore(domainWafPackageStore).Execute() + +Add new WAF package to domain + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + domainWafPackageStore := *openapiclient.NewDomainWafPackageStore("Id_example") // DomainWafPackageStore | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.WAFApi.WafPackagesStore(context.Background(), domain).DomainWafPackageStore(domainWafPackageStore).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `WAFApi.WafPackagesStore``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `WafPackagesStore`: WafPackagesStore200Response + fmt.Fprintf(os.Stdout, "Response from `WAFApi.WafPackagesStore`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiWafPackagesStoreRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **domainWafPackageStore** | [**DomainWafPackageStore**](DomainWafPackageStore.md) | | + +### Return type + +[**WafPackagesStore200Response**](WafPackagesStore200Response.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## WafPackagesUpdate + +> WafPackagesUpdate200Response WafPackagesUpdate(ctx, domain, id).DomainWafPackage(domainWafPackage).Execute() + +Update the WAF package + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + id := "id_example" // string | + domainWafPackage := *openapiclient.NewDomainWafPackage() // DomainWafPackage | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.WAFApi.WafPackagesUpdate(context.Background(), domain, id).DomainWafPackage(domainWafPackage).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `WAFApi.WafPackagesUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `WafPackagesUpdate`: WafPackagesUpdate200Response + fmt.Fprintf(os.Stdout, "Response from `WAFApi.WafPackagesUpdate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | +**id** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiWafPackagesUpdateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **domainWafPackage** | [**DomainWafPackage**](DomainWafPackage.md) | | + +### Return type + +[**WafPackagesUpdate200Response**](WafPackagesUpdate200Response.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## WafReconfigure + +> MessageResponse WafReconfigure(ctx, domain).WafReconfigure(wafReconfigure).Execute() + +Reconfigure WAF module using a preset + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + wafReconfigure := *openapiclient.NewWafReconfigure() // WafReconfigure | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.WAFApi.WafReconfigure(context.Background(), domain).WafReconfigure(wafReconfigure).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `WAFApi.WafReconfigure``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `WafReconfigure`: MessageResponse + fmt.Fprintf(os.Stdout, "Response from `WAFApi.WafReconfigure`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiWafReconfigureRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **wafReconfigure** | [**WafReconfigure**](WafReconfigure.md) | | + +### Return type + +[**MessageResponse**](MessageResponse.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## WafReprioritize + +> MessageResponse WafReprioritize(ctx, domain).ReprioritizeRuleRequest(reprioritizeRuleRequest).Execute() + +Change priority of WAF rules + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + reprioritizeRuleRequest := *openapiclient.NewReprioritizeRuleRequest("RuleId_example") // ReprioritizeRuleRequest | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.WAFApi.WafReprioritize(context.Background(), domain).ReprioritizeRuleRequest(reprioritizeRuleRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `WAFApi.WafReprioritize``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `WafReprioritize`: MessageResponse + fmt.Fprintf(os.Stdout, "Response from `WAFApi.WafReprioritize`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiWafReprioritizeRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **reprioritizeRuleRequest** | [**ReprioritizeRuleRequest**](ReprioritizeRuleRequest.md) | | + +### Return type + +[**MessageResponse**](MessageResponse.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## WafRulesDestroy + +> MessageResponse WafRulesDestroy(ctx, domain, id).Execute() + +Delete WAF rule + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.WAFApi.WafRulesDestroy(context.Background(), domain, id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `WAFApi.WafRulesDestroy``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `WafRulesDestroy`: MessageResponse + fmt.Fprintf(os.Stdout, "Response from `WAFApi.WafRulesDestroy`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | +**id** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiWafRulesDestroyRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + +[**MessageResponse**](MessageResponse.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## WafRulesIndex + +> WafRulesIndex200Response WafRulesIndex(ctx, domain).PerPage(perPage).OrderBy(orderBy).OrderType(orderType).Search(search).Execute() + +Get WAF Rules + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + perPage := int32(56) // int32 | (optional) + orderBy := "orderBy_example" // string | (optional) + orderType := "orderType_example" // string | (optional) + search := "search_example" // string | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.WAFApi.WafRulesIndex(context.Background(), domain).PerPage(perPage).OrderBy(orderBy).OrderType(orderType).Search(search).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `WAFApi.WafRulesIndex``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `WafRulesIndex`: WafRulesIndex200Response + fmt.Fprintf(os.Stdout, "Response from `WAFApi.WafRulesIndex`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiWafRulesIndexRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **perPage** | **int32** | | + **orderBy** | **string** | | + **orderType** | **string** | | + **search** | **string** | | + +### Return type + +[**WafRulesIndex200Response**](WafRulesIndex200Response.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## WafRulesShow + +> WafRuleResponse WafRulesShow(ctx, domain, id).Execute() + +Get WAF rule information + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.WAFApi.WafRulesShow(context.Background(), domain, id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `WAFApi.WafRulesShow``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `WafRulesShow`: WafRuleResponse + fmt.Fprintf(os.Stdout, "Response from `WAFApi.WafRulesShow`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | +**id** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiWafRulesShowRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + +[**WafRuleResponse**](WafRuleResponse.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## WafRulesStore + +> WafRuleResponse WafRulesStore(ctx, domain).WafRule(wafRule).Execute() + +Create new WAF rule + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + wafRule := *openapiclient.NewWafRule() // WafRule | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.WAFApi.WafRulesStore(context.Background(), domain).WafRule(wafRule).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `WAFApi.WafRulesStore``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `WafRulesStore`: WafRuleResponse + fmt.Fprintf(os.Stdout, "Response from `WAFApi.WafRulesStore`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiWafRulesStoreRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **wafRule** | [**WafRule**](WafRule.md) | | + +### Return type + +[**WafRuleResponse**](WafRuleResponse.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## WafRulesUpdate + +> WafRuleResponse WafRulesUpdate(ctx, domain, id).WafRule(wafRule).Execute() + +Update the WAF rule + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | + wafRule := *openapiclient.NewWafRule() // WafRule | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.WAFApi.WafRulesUpdate(context.Background(), domain, id).WafRule(wafRule).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `WAFApi.WafRulesUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `WafRulesUpdate`: WafRuleResponse + fmt.Fprintf(os.Stdout, "Response from `WAFApi.WafRulesUpdate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | +**id** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiWafRulesUpdateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **wafRule** | [**WafRule**](WafRule.md) | | + +### Return type + +[**WafRuleResponse**](WafRuleResponse.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## WafSettingsIndex + +> WafSettingsData WafSettingsIndex(ctx, domain).Execute() + +Get WAF configuration + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.WAFApi.WafSettingsIndex(context.Background(), domain).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `WAFApi.WafSettingsIndex``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `WafSettingsIndex`: WafSettingsData + fmt.Fprintf(os.Stdout, "Response from `WAFApi.WafSettingsIndex`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiWafSettingsIndexRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**WafSettingsData**](WafSettingsData.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## WafSettingsUpdate + +> WafSettingsData WafSettingsUpdate(ctx, domain).WafSettings(wafSettings).Execute() + +Configure WAF module of the domain + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + wafSettings := *openapiclient.NewWafSettings() // WafSettings | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.WAFApi.WafSettingsUpdate(context.Background(), domain).WafSettings(wafSettings).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `WAFApi.WafSettingsUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `WafSettingsUpdate`: WafSettingsData + fmt.Fprintf(os.Stdout, "Response from `WAFApi.WafSettingsUpdate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiWafSettingsUpdateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **wafSettings** | [**WafSettings**](WafSettings.md) | | + +### Return type + +[**WafSettingsData**](WafSettingsData.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + + +## WafUpdate + +> DomainWafData WafUpdate(ctx, domain).Waf(waf).Execute() + +Configure WAF module of the domain + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/arvancloud/cdn-go" +) + +func main() { + domain := "example.com" // string | Domain name + waf := *openapiclient.NewWaf() // Waf | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.WAFApi.WafUpdate(context.Background(), domain).Waf(waf).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `WAFApi.WafUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `WafUpdate`: DomainWafData + fmt.Fprintf(os.Stdout, "Response from `WAFApi.WafUpdate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**domain** | **string** | Domain name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiWafUpdateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **waf** | [**Waf**](Waf.md) | | + +### Return type + +[**DomainWafData**](DomainWafData.md) + +### Authorization + +[ApiKey](HOW-TO.md#ApiKey), [UserToken](HOW-TO.md#UserToken) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) +[[Back to Model list]](HOW-TO.md#documentation-for-models) +[[Back to README]](HOW-TO.md) + diff --git a/docs/Waf.md b/docs/Waf.md new file mode 100644 index 0000000..2341b2a --- /dev/null +++ b/docs/Waf.md @@ -0,0 +1,134 @@ +# Waf + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**IsEnabled** | Pointer to **bool** | | [optional] [readonly] +**Mode** | Pointer to **string** | | [optional] +**Packages** | Pointer to [**[]DomainWafPackage**](DomainWafPackage.md) | Pacakges and their configurations that are used to configure WAF. | [optional] [readonly] +**Rules** | Pointer to [**[]WafRule**](WafRule.md) | | [optional] [readonly] + +## Methods + +### NewWaf + +`func NewWaf() *Waf` + +NewWaf instantiates a new Waf object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewWafWithDefaults + +`func NewWafWithDefaults() *Waf` + +NewWafWithDefaults instantiates a new Waf object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetIsEnabled + +`func (o *Waf) GetIsEnabled() bool` + +GetIsEnabled returns the IsEnabled field if non-nil, zero value otherwise. + +### GetIsEnabledOk + +`func (o *Waf) GetIsEnabledOk() (*bool, bool)` + +GetIsEnabledOk returns a tuple with the IsEnabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsEnabled + +`func (o *Waf) SetIsEnabled(v bool)` + +SetIsEnabled sets IsEnabled field to given value. + +### HasIsEnabled + +`func (o *Waf) HasIsEnabled() bool` + +HasIsEnabled returns a boolean if a field has been set. + +### GetMode + +`func (o *Waf) GetMode() string` + +GetMode returns the Mode field if non-nil, zero value otherwise. + +### GetModeOk + +`func (o *Waf) GetModeOk() (*string, bool)` + +GetModeOk returns a tuple with the Mode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMode + +`func (o *Waf) SetMode(v string)` + +SetMode sets Mode field to given value. + +### HasMode + +`func (o *Waf) HasMode() bool` + +HasMode returns a boolean if a field has been set. + +### GetPackages + +`func (o *Waf) GetPackages() []DomainWafPackage` + +GetPackages returns the Packages field if non-nil, zero value otherwise. + +### GetPackagesOk + +`func (o *Waf) GetPackagesOk() (*[]DomainWafPackage, bool)` + +GetPackagesOk returns a tuple with the Packages field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPackages + +`func (o *Waf) SetPackages(v []DomainWafPackage)` + +SetPackages sets Packages field to given value. + +### HasPackages + +`func (o *Waf) HasPackages() bool` + +HasPackages returns a boolean if a field has been set. + +### GetRules + +`func (o *Waf) GetRules() []WafRule` + +GetRules returns the Rules field if non-nil, zero value otherwise. + +### GetRulesOk + +`func (o *Waf) GetRulesOk() (*[]WafRule, bool)` + +GetRulesOk returns a tuple with the Rules field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRules + +`func (o *Waf) SetRules(v []WafRule)` + +SetRules sets Rules field to given value. + +### HasRules + +`func (o *Waf) HasRules() bool` + +HasRules returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/WafPackage.md b/docs/WafPackage.md new file mode 100644 index 0000000..62bb398 --- /dev/null +++ b/docs/WafPackage.md @@ -0,0 +1,186 @@ +# WafPackage + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **string** | | [optional] [readonly] +**Name** | Pointer to **string** | | [optional] [readonly] +**Provider** | Pointer to [**WafPackageProvider**](WafPackageProvider.md) | | [optional] +**ParamsSchema** | Pointer to **map[string]interface{}** | JSON-schema of parameters of the package | [optional] +**DisabledRules** | Pointer to **[]string** | It will be filled by default disabled rules when it's not provided | [optional] +**DisabledRulesets** | Pointer to **[]string** | It will be filled by default disabled rulesets when it's not provided | [optional] + +## Methods + +### NewWafPackage + +`func NewWafPackage() *WafPackage` + +NewWafPackage instantiates a new WafPackage object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewWafPackageWithDefaults + +`func NewWafPackageWithDefaults() *WafPackage` + +NewWafPackageWithDefaults instantiates a new WafPackage object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *WafPackage) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *WafPackage) 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 *WafPackage) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *WafPackage) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetName + +`func (o *WafPackage) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *WafPackage) 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 *WafPackage) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *WafPackage) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetProvider + +`func (o *WafPackage) GetProvider() WafPackageProvider` + +GetProvider returns the Provider field if non-nil, zero value otherwise. + +### GetProviderOk + +`func (o *WafPackage) GetProviderOk() (*WafPackageProvider, bool)` + +GetProviderOk returns a tuple with the Provider field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProvider + +`func (o *WafPackage) SetProvider(v WafPackageProvider)` + +SetProvider sets Provider field to given value. + +### HasProvider + +`func (o *WafPackage) HasProvider() bool` + +HasProvider returns a boolean if a field has been set. + +### GetParamsSchema + +`func (o *WafPackage) GetParamsSchema() map[string]interface{}` + +GetParamsSchema returns the ParamsSchema field if non-nil, zero value otherwise. + +### GetParamsSchemaOk + +`func (o *WafPackage) GetParamsSchemaOk() (*map[string]interface{}, bool)` + +GetParamsSchemaOk returns a tuple with the ParamsSchema field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetParamsSchema + +`func (o *WafPackage) SetParamsSchema(v map[string]interface{})` + +SetParamsSchema sets ParamsSchema field to given value. + +### HasParamsSchema + +`func (o *WafPackage) HasParamsSchema() bool` + +HasParamsSchema returns a boolean if a field has been set. + +### GetDisabledRules + +`func (o *WafPackage) GetDisabledRules() []string` + +GetDisabledRules returns the DisabledRules field if non-nil, zero value otherwise. + +### GetDisabledRulesOk + +`func (o *WafPackage) GetDisabledRulesOk() (*[]string, bool)` + +GetDisabledRulesOk returns a tuple with the DisabledRules field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDisabledRules + +`func (o *WafPackage) SetDisabledRules(v []string)` + +SetDisabledRules sets DisabledRules field to given value. + +### HasDisabledRules + +`func (o *WafPackage) HasDisabledRules() bool` + +HasDisabledRules returns a boolean if a field has been set. + +### GetDisabledRulesets + +`func (o *WafPackage) GetDisabledRulesets() []string` + +GetDisabledRulesets returns the DisabledRulesets field if non-nil, zero value otherwise. + +### GetDisabledRulesetsOk + +`func (o *WafPackage) GetDisabledRulesetsOk() (*[]string, bool)` + +GetDisabledRulesetsOk returns a tuple with the DisabledRulesets field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDisabledRulesets + +`func (o *WafPackage) SetDisabledRulesets(v []string)` + +SetDisabledRulesets sets DisabledRulesets field to given value. + +### HasDisabledRulesets + +`func (o *WafPackage) HasDisabledRulesets() bool` + +HasDisabledRulesets returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/WafPackageDetails.md b/docs/WafPackageDetails.md new file mode 100644 index 0000000..6f3169e --- /dev/null +++ b/docs/WafPackageDetails.md @@ -0,0 +1,212 @@ +# WafPackageDetails + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **string** | | [optional] [readonly] +**Name** | Pointer to **string** | | [optional] [readonly] +**Provider** | Pointer to [**WafPackageProvider**](WafPackageProvider.md) | | [optional] +**ParamsSchema** | Pointer to **map[string]interface{}** | JSON-schema of parameters of the package | [optional] +**DisabledRules** | Pointer to **[]string** | It will be filled by default disabled rules when it's not provided | [optional] +**DisabledRulesets** | Pointer to **[]string** | It will be filled by default disabled rulesets when it's not provided | [optional] +**Rulesets** | Pointer to [**[]WafRuleset**](WafRuleset.md) | | [optional] + +## Methods + +### NewWafPackageDetails + +`func NewWafPackageDetails() *WafPackageDetails` + +NewWafPackageDetails instantiates a new WafPackageDetails object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewWafPackageDetailsWithDefaults + +`func NewWafPackageDetailsWithDefaults() *WafPackageDetails` + +NewWafPackageDetailsWithDefaults instantiates a new WafPackageDetails object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *WafPackageDetails) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *WafPackageDetails) 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 *WafPackageDetails) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *WafPackageDetails) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetName + +`func (o *WafPackageDetails) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *WafPackageDetails) 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 *WafPackageDetails) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *WafPackageDetails) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetProvider + +`func (o *WafPackageDetails) GetProvider() WafPackageProvider` + +GetProvider returns the Provider field if non-nil, zero value otherwise. + +### GetProviderOk + +`func (o *WafPackageDetails) GetProviderOk() (*WafPackageProvider, bool)` + +GetProviderOk returns a tuple with the Provider field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProvider + +`func (o *WafPackageDetails) SetProvider(v WafPackageProvider)` + +SetProvider sets Provider field to given value. + +### HasProvider + +`func (o *WafPackageDetails) HasProvider() bool` + +HasProvider returns a boolean if a field has been set. + +### GetParamsSchema + +`func (o *WafPackageDetails) GetParamsSchema() map[string]interface{}` + +GetParamsSchema returns the ParamsSchema field if non-nil, zero value otherwise. + +### GetParamsSchemaOk + +`func (o *WafPackageDetails) GetParamsSchemaOk() (*map[string]interface{}, bool)` + +GetParamsSchemaOk returns a tuple with the ParamsSchema field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetParamsSchema + +`func (o *WafPackageDetails) SetParamsSchema(v map[string]interface{})` + +SetParamsSchema sets ParamsSchema field to given value. + +### HasParamsSchema + +`func (o *WafPackageDetails) HasParamsSchema() bool` + +HasParamsSchema returns a boolean if a field has been set. + +### GetDisabledRules + +`func (o *WafPackageDetails) GetDisabledRules() []string` + +GetDisabledRules returns the DisabledRules field if non-nil, zero value otherwise. + +### GetDisabledRulesOk + +`func (o *WafPackageDetails) GetDisabledRulesOk() (*[]string, bool)` + +GetDisabledRulesOk returns a tuple with the DisabledRules field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDisabledRules + +`func (o *WafPackageDetails) SetDisabledRules(v []string)` + +SetDisabledRules sets DisabledRules field to given value. + +### HasDisabledRules + +`func (o *WafPackageDetails) HasDisabledRules() bool` + +HasDisabledRules returns a boolean if a field has been set. + +### GetDisabledRulesets + +`func (o *WafPackageDetails) GetDisabledRulesets() []string` + +GetDisabledRulesets returns the DisabledRulesets field if non-nil, zero value otherwise. + +### GetDisabledRulesetsOk + +`func (o *WafPackageDetails) GetDisabledRulesetsOk() (*[]string, bool)` + +GetDisabledRulesetsOk returns a tuple with the DisabledRulesets field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDisabledRulesets + +`func (o *WafPackageDetails) SetDisabledRulesets(v []string)` + +SetDisabledRulesets sets DisabledRulesets field to given value. + +### HasDisabledRulesets + +`func (o *WafPackageDetails) HasDisabledRulesets() bool` + +HasDisabledRulesets returns a boolean if a field has been set. + +### GetRulesets + +`func (o *WafPackageDetails) GetRulesets() []WafRuleset` + +GetRulesets returns the Rulesets field if non-nil, zero value otherwise. + +### GetRulesetsOk + +`func (o *WafPackageDetails) GetRulesetsOk() (*[]WafRuleset, bool)` + +GetRulesetsOk returns a tuple with the Rulesets field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRulesets + +`func (o *WafPackageDetails) SetRulesets(v []WafRuleset)` + +SetRulesets sets Rulesets field to given value. + +### HasRulesets + +`func (o *WafPackageDetails) HasRulesets() bool` + +HasRulesets returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/WafPackageDetailsData.md b/docs/WafPackageDetailsData.md new file mode 100644 index 0000000..5b1705c --- /dev/null +++ b/docs/WafPackageDetailsData.md @@ -0,0 +1,56 @@ +# WafPackageDetailsData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**WafPackageDetails**](WafPackageDetails.md) | | [optional] + +## Methods + +### NewWafPackageDetailsData + +`func NewWafPackageDetailsData() *WafPackageDetailsData` + +NewWafPackageDetailsData instantiates a new WafPackageDetailsData object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewWafPackageDetailsDataWithDefaults + +`func NewWafPackageDetailsDataWithDefaults() *WafPackageDetailsData` + +NewWafPackageDetailsDataWithDefaults instantiates a new WafPackageDetailsData object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *WafPackageDetailsData) GetData() WafPackageDetails` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *WafPackageDetailsData) GetDataOk() (*WafPackageDetails, 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 *WafPackageDetailsData) SetData(v WafPackageDetails)` + +SetData sets Data field to given value. + +### HasData + +`func (o *WafPackageDetailsData) HasData() bool` + +HasData returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/WafPackageProvider.md b/docs/WafPackageProvider.md new file mode 100644 index 0000000..aca8802 --- /dev/null +++ b/docs/WafPackageProvider.md @@ -0,0 +1,82 @@ +# WafPackageProvider + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **string** | | [optional] +**Logo** | Pointer to **string** | | [optional] + +## Methods + +### NewWafPackageProvider + +`func NewWafPackageProvider() *WafPackageProvider` + +NewWafPackageProvider instantiates a new WafPackageProvider object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewWafPackageProviderWithDefaults + +`func NewWafPackageProviderWithDefaults() *WafPackageProvider` + +NewWafPackageProviderWithDefaults instantiates a new WafPackageProvider object +This 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 *WafPackageProvider) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *WafPackageProvider) 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 *WafPackageProvider) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *WafPackageProvider) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetLogo + +`func (o *WafPackageProvider) GetLogo() string` + +GetLogo returns the Logo field if non-nil, zero value otherwise. + +### GetLogoOk + +`func (o *WafPackageProvider) GetLogoOk() (*string, bool)` + +GetLogoOk returns a tuple with the Logo field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLogo + +`func (o *WafPackageProvider) SetLogo(v string)` + +SetLogo sets Logo field to given value. + +### HasLogo + +`func (o *WafPackageProvider) HasLogo() bool` + +HasLogo returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/WafPackagesStore200Response.md b/docs/WafPackagesStore200Response.md new file mode 100644 index 0000000..30e3cc8 --- /dev/null +++ b/docs/WafPackagesStore200Response.md @@ -0,0 +1,92 @@ +# WafPackagesStore200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**DomainWafPackage**](DomainWafPackage.md) | | [optional] +**Message** | Pointer to **NullableString** | | [optional] + +## Methods + +### NewWafPackagesStore200Response + +`func NewWafPackagesStore200Response() *WafPackagesStore200Response` + +NewWafPackagesStore200Response instantiates a new WafPackagesStore200Response object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewWafPackagesStore200ResponseWithDefaults + +`func NewWafPackagesStore200ResponseWithDefaults() *WafPackagesStore200Response` + +NewWafPackagesStore200ResponseWithDefaults instantiates a new WafPackagesStore200Response object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *WafPackagesStore200Response) GetData() DomainWafPackage` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *WafPackagesStore200Response) GetDataOk() (*DomainWafPackage, 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 *WafPackagesStore200Response) SetData(v DomainWafPackage)` + +SetData sets Data field to given value. + +### HasData + +`func (o *WafPackagesStore200Response) HasData() bool` + +HasData returns a boolean if a field has been set. + +### GetMessage + +`func (o *WafPackagesStore200Response) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *WafPackagesStore200Response) GetMessageOk() (*string, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessage + +`func (o *WafPackagesStore200Response) SetMessage(v string)` + +SetMessage sets Message field to given value. + +### HasMessage + +`func (o *WafPackagesStore200Response) HasMessage() bool` + +HasMessage returns a boolean if a field has been set. + +### SetMessageNil + +`func (o *WafPackagesStore200Response) SetMessageNil(b bool)` + + SetMessageNil sets the value for Message to be an explicit nil + +### UnsetMessage +`func (o *WafPackagesStore200Response) UnsetMessage()` + +UnsetMessage ensures that no value is present for Message, not even an explicit nil + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/WafPackagesUpdate200Response.md b/docs/WafPackagesUpdate200Response.md new file mode 100644 index 0000000..ef4d332 --- /dev/null +++ b/docs/WafPackagesUpdate200Response.md @@ -0,0 +1,92 @@ +# WafPackagesUpdate200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**DomainWafPackageDetails**](DomainWafPackageDetails.md) | | [optional] +**Message** | Pointer to **NullableString** | | [optional] + +## Methods + +### NewWafPackagesUpdate200Response + +`func NewWafPackagesUpdate200Response() *WafPackagesUpdate200Response` + +NewWafPackagesUpdate200Response instantiates a new WafPackagesUpdate200Response object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewWafPackagesUpdate200ResponseWithDefaults + +`func NewWafPackagesUpdate200ResponseWithDefaults() *WafPackagesUpdate200Response` + +NewWafPackagesUpdate200ResponseWithDefaults instantiates a new WafPackagesUpdate200Response object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *WafPackagesUpdate200Response) GetData() DomainWafPackageDetails` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *WafPackagesUpdate200Response) GetDataOk() (*DomainWafPackageDetails, 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 *WafPackagesUpdate200Response) SetData(v DomainWafPackageDetails)` + +SetData sets Data field to given value. + +### HasData + +`func (o *WafPackagesUpdate200Response) HasData() bool` + +HasData returns a boolean if a field has been set. + +### GetMessage + +`func (o *WafPackagesUpdate200Response) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *WafPackagesUpdate200Response) GetMessageOk() (*string, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessage + +`func (o *WafPackagesUpdate200Response) SetMessage(v string)` + +SetMessage sets Message field to given value. + +### HasMessage + +`func (o *WafPackagesUpdate200Response) HasMessage() bool` + +HasMessage returns a boolean if a field has been set. + +### SetMessageNil + +`func (o *WafPackagesUpdate200Response) SetMessageNil(b bool)` + + SetMessageNil sets the value for Message to be an explicit nil + +### UnsetMessage +`func (o *WafPackagesUpdate200Response) UnsetMessage()` + +UnsetMessage ensures that no value is present for Message, not even an explicit nil + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/WafPreset.md b/docs/WafPreset.md new file mode 100644 index 0000000..fd5e68d --- /dev/null +++ b/docs/WafPreset.md @@ -0,0 +1,134 @@ +# WafPreset + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **string** | | [optional] +**Name** | Pointer to **string** | | [optional] +**Description** | Pointer to **string** | | [optional] +**Packages** | Pointer to [**[]WafPresetPackagesInner**](WafPresetPackagesInner.md) | | [optional] + +## Methods + +### NewWafPreset + +`func NewWafPreset() *WafPreset` + +NewWafPreset instantiates a new WafPreset object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewWafPresetWithDefaults + +`func NewWafPresetWithDefaults() *WafPreset` + +NewWafPresetWithDefaults instantiates a new WafPreset object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *WafPreset) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *WafPreset) 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 *WafPreset) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *WafPreset) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetName + +`func (o *WafPreset) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *WafPreset) 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 *WafPreset) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *WafPreset) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetDescription + +`func (o *WafPreset) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *WafPreset) 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 *WafPreset) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *WafPreset) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetPackages + +`func (o *WafPreset) GetPackages() []WafPresetPackagesInner` + +GetPackages returns the Packages field if non-nil, zero value otherwise. + +### GetPackagesOk + +`func (o *WafPreset) GetPackagesOk() (*[]WafPresetPackagesInner, bool)` + +GetPackagesOk returns a tuple with the Packages field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPackages + +`func (o *WafPreset) SetPackages(v []WafPresetPackagesInner)` + +SetPackages sets Packages field to given value. + +### HasPackages + +`func (o *WafPreset) HasPackages() bool` + +HasPackages returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/WafPresetPackagesInner.md b/docs/WafPresetPackagesInner.md new file mode 100644 index 0000000..da50297 --- /dev/null +++ b/docs/WafPresetPackagesInner.md @@ -0,0 +1,82 @@ +# WafPresetPackagesInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **string** | | [optional] +**Provider** | Pointer to [**WafPresetPackagesInnerProvider**](WafPresetPackagesInnerProvider.md) | | [optional] + +## Methods + +### NewWafPresetPackagesInner + +`func NewWafPresetPackagesInner() *WafPresetPackagesInner` + +NewWafPresetPackagesInner instantiates a new WafPresetPackagesInner object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewWafPresetPackagesInnerWithDefaults + +`func NewWafPresetPackagesInnerWithDefaults() *WafPresetPackagesInner` + +NewWafPresetPackagesInnerWithDefaults instantiates a new WafPresetPackagesInner object +This 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 *WafPresetPackagesInner) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *WafPresetPackagesInner) 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 *WafPresetPackagesInner) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *WafPresetPackagesInner) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetProvider + +`func (o *WafPresetPackagesInner) GetProvider() WafPresetPackagesInnerProvider` + +GetProvider returns the Provider field if non-nil, zero value otherwise. + +### GetProviderOk + +`func (o *WafPresetPackagesInner) GetProviderOk() (*WafPresetPackagesInnerProvider, bool)` + +GetProviderOk returns a tuple with the Provider field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProvider + +`func (o *WafPresetPackagesInner) SetProvider(v WafPresetPackagesInnerProvider)` + +SetProvider sets Provider field to given value. + +### HasProvider + +`func (o *WafPresetPackagesInner) HasProvider() bool` + +HasProvider returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/WafPresetPackagesInnerProvider.md b/docs/WafPresetPackagesInnerProvider.md new file mode 100644 index 0000000..009575d --- /dev/null +++ b/docs/WafPresetPackagesInnerProvider.md @@ -0,0 +1,82 @@ +# WafPresetPackagesInnerProvider + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **string** | | [optional] +**Logo** | Pointer to **string** | | [optional] + +## Methods + +### NewWafPresetPackagesInnerProvider + +`func NewWafPresetPackagesInnerProvider() *WafPresetPackagesInnerProvider` + +NewWafPresetPackagesInnerProvider instantiates a new WafPresetPackagesInnerProvider object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewWafPresetPackagesInnerProviderWithDefaults + +`func NewWafPresetPackagesInnerProviderWithDefaults() *WafPresetPackagesInnerProvider` + +NewWafPresetPackagesInnerProviderWithDefaults instantiates a new WafPresetPackagesInnerProvider object +This 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 *WafPresetPackagesInnerProvider) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *WafPresetPackagesInnerProvider) 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 *WafPresetPackagesInnerProvider) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *WafPresetPackagesInnerProvider) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetLogo + +`func (o *WafPresetPackagesInnerProvider) GetLogo() string` + +GetLogo returns the Logo field if non-nil, zero value otherwise. + +### GetLogoOk + +`func (o *WafPresetPackagesInnerProvider) GetLogoOk() (*string, bool)` + +GetLogoOk returns a tuple with the Logo field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLogo + +`func (o *WafPresetPackagesInnerProvider) SetLogo(v string)` + +SetLogo sets Logo field to given value. + +### HasLogo + +`func (o *WafPresetPackagesInnerProvider) HasLogo() bool` + +HasLogo returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/WafPresets.md b/docs/WafPresets.md new file mode 100644 index 0000000..283b765 --- /dev/null +++ b/docs/WafPresets.md @@ -0,0 +1,82 @@ +# WafPresets + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Presets** | Pointer to [**[]WafPreset**](WafPreset.md) | | [optional] +**Packages** | Pointer to [**[]WafPackage**](WafPackage.md) | | [optional] + +## Methods + +### NewWafPresets + +`func NewWafPresets() *WafPresets` + +NewWafPresets instantiates a new WafPresets object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewWafPresetsWithDefaults + +`func NewWafPresetsWithDefaults() *WafPresets` + +NewWafPresetsWithDefaults instantiates a new WafPresets object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetPresets + +`func (o *WafPresets) GetPresets() []WafPreset` + +GetPresets returns the Presets field if non-nil, zero value otherwise. + +### GetPresetsOk + +`func (o *WafPresets) GetPresetsOk() (*[]WafPreset, bool)` + +GetPresetsOk returns a tuple with the Presets field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPresets + +`func (o *WafPresets) SetPresets(v []WafPreset)` + +SetPresets sets Presets field to given value. + +### HasPresets + +`func (o *WafPresets) HasPresets() bool` + +HasPresets returns a boolean if a field has been set. + +### GetPackages + +`func (o *WafPresets) GetPackages() []WafPackage` + +GetPackages returns the Packages field if non-nil, zero value otherwise. + +### GetPackagesOk + +`func (o *WafPresets) GetPackagesOk() (*[]WafPackage, bool)` + +GetPackagesOk returns a tuple with the Packages field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPackages + +`func (o *WafPresets) SetPackages(v []WafPackage)` + +SetPackages sets Packages field to given value. + +### HasPackages + +`func (o *WafPresets) HasPackages() bool` + +HasPackages returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/WafPresetsData.md b/docs/WafPresetsData.md new file mode 100644 index 0000000..64bd7c8 --- /dev/null +++ b/docs/WafPresetsData.md @@ -0,0 +1,56 @@ +# WafPresetsData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**WafPresets**](WafPresets.md) | | [optional] + +## Methods + +### NewWafPresetsData + +`func NewWafPresetsData() *WafPresetsData` + +NewWafPresetsData instantiates a new WafPresetsData object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewWafPresetsDataWithDefaults + +`func NewWafPresetsDataWithDefaults() *WafPresetsData` + +NewWafPresetsDataWithDefaults instantiates a new WafPresetsData object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *WafPresetsData) GetData() WafPresets` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *WafPresetsData) GetDataOk() (*WafPresets, 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 *WafPresetsData) SetData(v WafPresets)` + +SetData sets Data field to given value. + +### HasData + +`func (o *WafPresetsData) HasData() bool` + +HasData returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/WafReconfigure.md b/docs/WafReconfigure.md new file mode 100644 index 0000000..0cd6a4b --- /dev/null +++ b/docs/WafReconfigure.md @@ -0,0 +1,56 @@ +# WafReconfigure + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**PresetId** | Pointer to **string** | | [optional] + +## Methods + +### NewWafReconfigure + +`func NewWafReconfigure() *WafReconfigure` + +NewWafReconfigure instantiates a new WafReconfigure object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewWafReconfigureWithDefaults + +`func NewWafReconfigureWithDefaults() *WafReconfigure` + +NewWafReconfigureWithDefaults instantiates a new WafReconfigure object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetPresetId + +`func (o *WafReconfigure) GetPresetId() string` + +GetPresetId returns the PresetId field if non-nil, zero value otherwise. + +### GetPresetIdOk + +`func (o *WafReconfigure) GetPresetIdOk() (*string, bool)` + +GetPresetIdOk returns a tuple with the PresetId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPresetId + +`func (o *WafReconfigure) SetPresetId(v string)` + +SetPresetId sets PresetId field to given value. + +### HasPresetId + +`func (o *WafReconfigure) HasPresetId() bool` + +HasPresetId returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/WafReprioritize.md b/docs/WafReprioritize.md new file mode 100644 index 0000000..1caecb6 --- /dev/null +++ b/docs/WafReprioritize.md @@ -0,0 +1,103 @@ +# WafReprioritize + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**PackageId** | **string** | ID of the package you want to move | +**AfterPackageId** | Pointer to **string** | ID of the package you want to be prior to the selected package | [optional] +**BeforePackageId** | Pointer to **string** | ID of the package you want to follow the selected package | [optional] + +## Methods + +### NewWafReprioritize + +`func NewWafReprioritize(packageId string, ) *WafReprioritize` + +NewWafReprioritize instantiates a new WafReprioritize object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewWafReprioritizeWithDefaults + +`func NewWafReprioritizeWithDefaults() *WafReprioritize` + +NewWafReprioritizeWithDefaults instantiates a new WafReprioritize object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetPackageId + +`func (o *WafReprioritize) GetPackageId() string` + +GetPackageId returns the PackageId field if non-nil, zero value otherwise. + +### GetPackageIdOk + +`func (o *WafReprioritize) GetPackageIdOk() (*string, bool)` + +GetPackageIdOk returns a tuple with the PackageId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPackageId + +`func (o *WafReprioritize) SetPackageId(v string)` + +SetPackageId sets PackageId field to given value. + + +### GetAfterPackageId + +`func (o *WafReprioritize) GetAfterPackageId() string` + +GetAfterPackageId returns the AfterPackageId field if non-nil, zero value otherwise. + +### GetAfterPackageIdOk + +`func (o *WafReprioritize) GetAfterPackageIdOk() (*string, bool)` + +GetAfterPackageIdOk returns a tuple with the AfterPackageId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAfterPackageId + +`func (o *WafReprioritize) SetAfterPackageId(v string)` + +SetAfterPackageId sets AfterPackageId field to given value. + +### HasAfterPackageId + +`func (o *WafReprioritize) HasAfterPackageId() bool` + +HasAfterPackageId returns a boolean if a field has been set. + +### GetBeforePackageId + +`func (o *WafReprioritize) GetBeforePackageId() string` + +GetBeforePackageId returns the BeforePackageId field if non-nil, zero value otherwise. + +### GetBeforePackageIdOk + +`func (o *WafReprioritize) GetBeforePackageIdOk() (*string, bool)` + +GetBeforePackageIdOk returns a tuple with the BeforePackageId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBeforePackageId + +`func (o *WafReprioritize) SetBeforePackageId(v string)` + +SetBeforePackageId sets BeforePackageId field to given value. + +### HasBeforePackageId + +`func (o *WafReprioritize) HasBeforePackageId() bool` + +HasBeforePackageId returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/WafRule.md b/docs/WafRule.md new file mode 100644 index 0000000..9e4525e --- /dev/null +++ b/docs/WafRule.md @@ -0,0 +1,186 @@ +# WafRule + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **string** | | [optional] [readonly] +**UrlPattern** | Pointer to **string** | - `?` matches any single character. - `*` matches any (possibly empty) sequence of characters. - `**` matches the current directory and arbitrary subdirectories. This sequence must form a single path component, so both `**a` and `b**` are invalid and will result in an error. A sequence of more than two consecutive `*` characters is also invalid. - `[...]` matches any character inside the brackets. Character sequences can also specify ranges of characters, as ordered by Unicode, so e.g. `[0-9]` specifies any character between 0 and 9 inclusive. An unclosed bracket is invalid. - `[!...]` is the negation of `[...]`, i.e. it matches any characters not in the brackets. - The metacharacters `?`, `*`, `[`, `] `can be matched by using brackets (e.g. `[?]`). When a `]` occurs immediately following `[` or `[!` then it is interpreted as being part of, rather then ending, the character set, so `]` and NOT `]` can be matched by `[]]` and `[!]]` respectively. The - character can be specified inside a character sequence pattern by placing it at the start or the end, e.g. `[abc-]`. | [optional] +**Sources** | Pointer to **[]string** | | [optional] +**Action** | Pointer to **string** | | [optional] +**Description** | Pointer to **string** | | [optional] +**IsEnabled** | Pointer to **bool** | | [optional] + +## Methods + +### NewWafRule + +`func NewWafRule() *WafRule` + +NewWafRule instantiates a new WafRule object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewWafRuleWithDefaults + +`func NewWafRuleWithDefaults() *WafRule` + +NewWafRuleWithDefaults instantiates a new WafRule object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *WafRule) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *WafRule) 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 *WafRule) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *WafRule) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetUrlPattern + +`func (o *WafRule) GetUrlPattern() string` + +GetUrlPattern returns the UrlPattern field if non-nil, zero value otherwise. + +### GetUrlPatternOk + +`func (o *WafRule) GetUrlPatternOk() (*string, bool)` + +GetUrlPatternOk returns a tuple with the UrlPattern field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUrlPattern + +`func (o *WafRule) SetUrlPattern(v string)` + +SetUrlPattern sets UrlPattern field to given value. + +### HasUrlPattern + +`func (o *WafRule) HasUrlPattern() bool` + +HasUrlPattern returns a boolean if a field has been set. + +### GetSources + +`func (o *WafRule) GetSources() []string` + +GetSources returns the Sources field if non-nil, zero value otherwise. + +### GetSourcesOk + +`func (o *WafRule) GetSourcesOk() (*[]string, 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 *WafRule) SetSources(v []string)` + +SetSources sets Sources field to given value. + +### HasSources + +`func (o *WafRule) HasSources() bool` + +HasSources returns a boolean if a field has been set. + +### GetAction + +`func (o *WafRule) GetAction() string` + +GetAction returns the Action field if non-nil, zero value otherwise. + +### GetActionOk + +`func (o *WafRule) GetActionOk() (*string, bool)` + +GetActionOk returns a tuple with the Action field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAction + +`func (o *WafRule) SetAction(v string)` + +SetAction sets Action field to given value. + +### HasAction + +`func (o *WafRule) HasAction() bool` + +HasAction returns a boolean if a field has been set. + +### GetDescription + +`func (o *WafRule) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *WafRule) 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 *WafRule) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *WafRule) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetIsEnabled + +`func (o *WafRule) GetIsEnabled() bool` + +GetIsEnabled returns the IsEnabled field if non-nil, zero value otherwise. + +### GetIsEnabledOk + +`func (o *WafRule) GetIsEnabledOk() (*bool, bool)` + +GetIsEnabledOk returns a tuple with the IsEnabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsEnabled + +`func (o *WafRule) SetIsEnabled(v bool)` + +SetIsEnabled sets IsEnabled field to given value. + +### HasIsEnabled + +`func (o *WafRule) HasIsEnabled() bool` + +HasIsEnabled returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/WafRuleResponse.md b/docs/WafRuleResponse.md new file mode 100644 index 0000000..9553af4 --- /dev/null +++ b/docs/WafRuleResponse.md @@ -0,0 +1,92 @@ +# WafRuleResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**WafRule**](WafRule.md) | | [optional] +**Message** | Pointer to **NullableString** | | [optional] + +## Methods + +### NewWafRuleResponse + +`func NewWafRuleResponse() *WafRuleResponse` + +NewWafRuleResponse instantiates a new WafRuleResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewWafRuleResponseWithDefaults + +`func NewWafRuleResponseWithDefaults() *WafRuleResponse` + +NewWafRuleResponseWithDefaults instantiates a new WafRuleResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *WafRuleResponse) GetData() WafRule` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *WafRuleResponse) GetDataOk() (*WafRule, 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 *WafRuleResponse) SetData(v WafRule)` + +SetData sets Data field to given value. + +### HasData + +`func (o *WafRuleResponse) HasData() bool` + +HasData returns a boolean if a field has been set. + +### GetMessage + +`func (o *WafRuleResponse) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *WafRuleResponse) GetMessageOk() (*string, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessage + +`func (o *WafRuleResponse) SetMessage(v string)` + +SetMessage sets Message field to given value. + +### HasMessage + +`func (o *WafRuleResponse) HasMessage() bool` + +HasMessage returns a boolean if a field has been set. + +### SetMessageNil + +`func (o *WafRuleResponse) SetMessageNil(b bool)` + + SetMessageNil sets the value for Message to be an explicit nil + +### UnsetMessage +`func (o *WafRuleResponse) UnsetMessage()` + +UnsetMessage ensures that no value is present for Message, not even an explicit nil + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/WafRulesIndex200Response.md b/docs/WafRulesIndex200Response.md new file mode 100644 index 0000000..6fd899b --- /dev/null +++ b/docs/WafRulesIndex200Response.md @@ -0,0 +1,108 @@ +# WafRulesIndex200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**[]WafRule**](WafRule.md) | | [optional] +**Links** | Pointer to [**PaginatedResponseLinks**](PaginatedResponseLinks.md) | | [optional] +**Meta** | Pointer to [**PaginatedResponseMeta**](PaginatedResponseMeta.md) | | [optional] + +## Methods + +### NewWafRulesIndex200Response + +`func NewWafRulesIndex200Response() *WafRulesIndex200Response` + +NewWafRulesIndex200Response instantiates a new WafRulesIndex200Response object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewWafRulesIndex200ResponseWithDefaults + +`func NewWafRulesIndex200ResponseWithDefaults() *WafRulesIndex200Response` + +NewWafRulesIndex200ResponseWithDefaults instantiates a new WafRulesIndex200Response object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *WafRulesIndex200Response) GetData() []WafRule` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *WafRulesIndex200Response) GetDataOk() (*[]WafRule, 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 *WafRulesIndex200Response) SetData(v []WafRule)` + +SetData sets Data field to given value. + +### HasData + +`func (o *WafRulesIndex200Response) HasData() bool` + +HasData returns a boolean if a field has been set. + +### GetLinks + +`func (o *WafRulesIndex200Response) GetLinks() PaginatedResponseLinks` + +GetLinks returns the Links field if non-nil, zero value otherwise. + +### GetLinksOk + +`func (o *WafRulesIndex200Response) GetLinksOk() (*PaginatedResponseLinks, bool)` + +GetLinksOk returns a tuple with the Links field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLinks + +`func (o *WafRulesIndex200Response) SetLinks(v PaginatedResponseLinks)` + +SetLinks sets Links field to given value. + +### HasLinks + +`func (o *WafRulesIndex200Response) HasLinks() bool` + +HasLinks returns a boolean if a field has been set. + +### GetMeta + +`func (o *WafRulesIndex200Response) GetMeta() PaginatedResponseMeta` + +GetMeta returns the Meta field if non-nil, zero value otherwise. + +### GetMetaOk + +`func (o *WafRulesIndex200Response) GetMetaOk() (*PaginatedResponseMeta, bool)` + +GetMetaOk returns a tuple with the Meta field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMeta + +`func (o *WafRulesIndex200Response) SetMeta(v PaginatedResponseMeta)` + +SetMeta sets Meta field to given value. + +### HasMeta + +`func (o *WafRulesIndex200Response) HasMeta() bool` + +HasMeta returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/WafRuleset.md b/docs/WafRuleset.md new file mode 100644 index 0000000..47f8803 --- /dev/null +++ b/docs/WafRuleset.md @@ -0,0 +1,108 @@ +# WafRuleset + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **string** | | [optional] +**Name** | Pointer to **string** | | [optional] +**Rules** | Pointer to [**[]WafRulesetRulesInner**](WafRulesetRulesInner.md) | | [optional] + +## Methods + +### NewWafRuleset + +`func NewWafRuleset() *WafRuleset` + +NewWafRuleset instantiates a new WafRuleset object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewWafRulesetWithDefaults + +`func NewWafRulesetWithDefaults() *WafRuleset` + +NewWafRulesetWithDefaults instantiates a new WafRuleset object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *WafRuleset) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *WafRuleset) 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 *WafRuleset) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *WafRuleset) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetName + +`func (o *WafRuleset) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *WafRuleset) 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 *WafRuleset) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *WafRuleset) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetRules + +`func (o *WafRuleset) GetRules() []WafRulesetRulesInner` + +GetRules returns the Rules field if non-nil, zero value otherwise. + +### GetRulesOk + +`func (o *WafRuleset) GetRulesOk() (*[]WafRulesetRulesInner, bool)` + +GetRulesOk returns a tuple with the Rules field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRules + +`func (o *WafRuleset) SetRules(v []WafRulesetRulesInner)` + +SetRules sets Rules field to given value. + +### HasRules + +`func (o *WafRuleset) HasRules() bool` + +HasRules returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/WafRulesetRulesInner.md b/docs/WafRulesetRulesInner.md new file mode 100644 index 0000000..d621e31 --- /dev/null +++ b/docs/WafRulesetRulesInner.md @@ -0,0 +1,108 @@ +# WafRulesetRulesInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **string** | | [optional] +**Name** | Pointer to **string** | | [optional] +**Params** | Pointer to **map[string]interface{}** | | [optional] + +## Methods + +### NewWafRulesetRulesInner + +`func NewWafRulesetRulesInner() *WafRulesetRulesInner` + +NewWafRulesetRulesInner instantiates a new WafRulesetRulesInner object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewWafRulesetRulesInnerWithDefaults + +`func NewWafRulesetRulesInnerWithDefaults() *WafRulesetRulesInner` + +NewWafRulesetRulesInnerWithDefaults instantiates a new WafRulesetRulesInner object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *WafRulesetRulesInner) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *WafRulesetRulesInner) 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 *WafRulesetRulesInner) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *WafRulesetRulesInner) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetName + +`func (o *WafRulesetRulesInner) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *WafRulesetRulesInner) 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 *WafRulesetRulesInner) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *WafRulesetRulesInner) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetParams + +`func (o *WafRulesetRulesInner) GetParams() map[string]interface{}` + +GetParams returns the Params field if non-nil, zero value otherwise. + +### GetParamsOk + +`func (o *WafRulesetRulesInner) 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 *WafRulesetRulesInner) SetParams(v map[string]interface{})` + +SetParams sets Params field to given value. + +### HasParams + +`func (o *WafRulesetRulesInner) HasParams() bool` + +HasParams returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/WafRulesets.md b/docs/WafRulesets.md new file mode 100644 index 0000000..e0399e5 --- /dev/null +++ b/docs/WafRulesets.md @@ -0,0 +1,56 @@ +# WafRulesets + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Rulesets** | Pointer to [**[]WafRuleset**](WafRuleset.md) | | [optional] + +## Methods + +### NewWafRulesets + +`func NewWafRulesets() *WafRulesets` + +NewWafRulesets instantiates a new WafRulesets object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewWafRulesetsWithDefaults + +`func NewWafRulesetsWithDefaults() *WafRulesets` + +NewWafRulesetsWithDefaults instantiates a new WafRulesets object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetRulesets + +`func (o *WafRulesets) GetRulesets() []WafRuleset` + +GetRulesets returns the Rulesets field if non-nil, zero value otherwise. + +### GetRulesetsOk + +`func (o *WafRulesets) GetRulesetsOk() (*[]WafRuleset, bool)` + +GetRulesetsOk returns a tuple with the Rulesets field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRulesets + +`func (o *WafRulesets) SetRulesets(v []WafRuleset)` + +SetRulesets sets Rulesets field to given value. + +### HasRulesets + +`func (o *WafRulesets) HasRulesets() bool` + +HasRulesets returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/WafSettings.md b/docs/WafSettings.md new file mode 100644 index 0000000..8d2cc13 --- /dev/null +++ b/docs/WafSettings.md @@ -0,0 +1,108 @@ +# WafSettings + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**IsEnabled** | Pointer to **bool** | | [optional] [readonly] +**Mode** | Pointer to **string** | | [optional] +**Packages** | Pointer to [**[]DomainWafPackage**](DomainWafPackage.md) | Pacakges and their configurations that are used to configure WAF. | [optional] [readonly] + +## Methods + +### NewWafSettings + +`func NewWafSettings() *WafSettings` + +NewWafSettings instantiates a new WafSettings object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewWafSettingsWithDefaults + +`func NewWafSettingsWithDefaults() *WafSettings` + +NewWafSettingsWithDefaults instantiates a new WafSettings object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetIsEnabled + +`func (o *WafSettings) GetIsEnabled() bool` + +GetIsEnabled returns the IsEnabled field if non-nil, zero value otherwise. + +### GetIsEnabledOk + +`func (o *WafSettings) GetIsEnabledOk() (*bool, bool)` + +GetIsEnabledOk returns a tuple with the IsEnabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsEnabled + +`func (o *WafSettings) SetIsEnabled(v bool)` + +SetIsEnabled sets IsEnabled field to given value. + +### HasIsEnabled + +`func (o *WafSettings) HasIsEnabled() bool` + +HasIsEnabled returns a boolean if a field has been set. + +### GetMode + +`func (o *WafSettings) GetMode() string` + +GetMode returns the Mode field if non-nil, zero value otherwise. + +### GetModeOk + +`func (o *WafSettings) GetModeOk() (*string, bool)` + +GetModeOk returns a tuple with the Mode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMode + +`func (o *WafSettings) SetMode(v string)` + +SetMode sets Mode field to given value. + +### HasMode + +`func (o *WafSettings) HasMode() bool` + +HasMode returns a boolean if a field has been set. + +### GetPackages + +`func (o *WafSettings) GetPackages() []DomainWafPackage` + +GetPackages returns the Packages field if non-nil, zero value otherwise. + +### GetPackagesOk + +`func (o *WafSettings) GetPackagesOk() (*[]DomainWafPackage, bool)` + +GetPackagesOk returns a tuple with the Packages field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPackages + +`func (o *WafSettings) SetPackages(v []DomainWafPackage)` + +SetPackages sets Packages field to given value. + +### HasPackages + +`func (o *WafSettings) HasPackages() bool` + +HasPackages returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/docs/WafSettingsData.md b/docs/WafSettingsData.md new file mode 100644 index 0000000..866d366 --- /dev/null +++ b/docs/WafSettingsData.md @@ -0,0 +1,56 @@ +# WafSettingsData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**WafSettings**](WafSettings.md) | | [optional] + +## Methods + +### NewWafSettingsData + +`func NewWafSettingsData() *WafSettingsData` + +NewWafSettingsData instantiates a new WafSettingsData object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewWafSettingsDataWithDefaults + +`func NewWafSettingsDataWithDefaults() *WafSettingsData` + +NewWafSettingsDataWithDefaults instantiates a new WafSettingsData object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *WafSettingsData) GetData() WafSettings` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *WafSettingsData) GetDataOk() (*WafSettings, 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 *WafSettingsData) SetData(v WafSettings)` + +SetData sets Data field to given value. + +### HasData + +`func (o *WafSettingsData) HasData() bool` + +HasData returns a boolean if a field has been set. + + +[[Back to Model list]](HOW-TO.md#documentation-for-models) [[Back to API list]](HOW-TO.md#documentation-for-api-endpoints) [[Back to README]](HOW-TO.md) + + diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..b7f314d --- /dev/null +++ b/go.mod @@ -0,0 +1,11 @@ +module github.com/arvancloud/cdn-go + +go 1.18 + +require ( + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/stretchr/testify v1.8.4 // indirect + golang.org/x/net v0.11.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..4637b98 --- /dev/null +++ b/go.sum @@ -0,0 +1,22 @@ +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +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/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +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.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +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= +golang.org/x/net v0.11.0 h1:Gi2tvZIJyBtO9SDr1q9h5hEQCp/4L2RQ+ar0qjx2oNU= +golang.org/x/net v0.11.0/go.mod h1:2L/ixqYpgIVXmeoSA/4Lu7BzTG4KIyPIryS4IsOd1oQ= +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= +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= diff --git a/model_a_record.go b/model_a_record.go new file mode 100644 index 0000000..a45ab8a --- /dev/null +++ b/model_a_record.go @@ -0,0 +1,520 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" + "time" +) + +// checks if the ARecord type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ARecord{} + +// ARecord struct for ARecord +type ARecord struct { + Value []ARecordValue `json:"value,omitempty"` + Type *string `json:"type,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Ttl *int32 `json:"ttl,omitempty"` + Cloud *bool `json:"cloud,omitempty"` + UpstreamHttps *string `json:"upstream_https,omitempty"` + IpFilterMode *DnsRecordIpFilterMode `json:"ip_filter_mode,omitempty"` + // Protected records cannot be modified or deleted by user. + IsProtected *bool `json:"is_protected,omitempty"` + Usage []string `json:"usage,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty"` + UpdatedAt *time.Time `json:"updated_at,omitempty"` +} + +// NewARecord instantiates a new ARecord object +// This constructor will assign default values to properties that have it defined, +// 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 NewARecord() *ARecord { + this := ARecord{} + var cloud bool = false + this.Cloud = &cloud + return &this +} + +// NewARecordWithDefaults instantiates a new ARecord object +// This 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 NewARecordWithDefaults() *ARecord { + this := ARecord{} + var type_ string = "a" + this.Type = &type_ + var cloud bool = false + this.Cloud = &cloud + return &this +} + +// GetValue returns the Value field value if set, zero value otherwise. +func (o *ARecord) GetValue() []ARecordValue { + if o == nil || IsNil(o.Value) { + var ret []ARecordValue + return ret + } + return o.Value +} + +// GetValueOk returns a tuple with the Value field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ARecord) GetValueOk() ([]ARecordValue, bool) { + if o == nil || IsNil(o.Value) { + return nil, false + } + return o.Value, true +} + +// HasValue returns a boolean if a field has been set. +func (o *ARecord) HasValue() bool { + if o != nil && !IsNil(o.Value) { + return true + } + + return false +} + +// SetValue gets a reference to the given []ARecordValue and assigns it to the Value field. +func (o *ARecord) SetValue(v []ARecordValue) { + o.Value = v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *ARecord) 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 *ARecord) 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 *ARecord) 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 *ARecord) SetType(v string) { + o.Type = &v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *ARecord) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ARecord) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *ARecord) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *ARecord) SetId(v string) { + o.Id = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *ARecord) 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 *ARecord) 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 *ARecord) 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 *ARecord) SetName(v string) { + o.Name = &v +} + +// GetTtl returns the Ttl field value if set, zero value otherwise. +func (o *ARecord) GetTtl() int32 { + if o == nil || IsNil(o.Ttl) { + var ret int32 + return ret + } + return *o.Ttl +} + +// GetTtlOk returns a tuple with the Ttl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ARecord) GetTtlOk() (*int32, bool) { + if o == nil || IsNil(o.Ttl) { + return nil, false + } + return o.Ttl, true +} + +// HasTtl returns a boolean if a field has been set. +func (o *ARecord) HasTtl() bool { + if o != nil && !IsNil(o.Ttl) { + return true + } + + return false +} + +// SetTtl gets a reference to the given int32 and assigns it to the Ttl field. +func (o *ARecord) SetTtl(v int32) { + o.Ttl = &v +} + +// GetCloud returns the Cloud field value if set, zero value otherwise. +func (o *ARecord) GetCloud() bool { + if o == nil || IsNil(o.Cloud) { + var ret bool + return ret + } + return *o.Cloud +} + +// GetCloudOk returns a tuple with the Cloud field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ARecord) GetCloudOk() (*bool, bool) { + if o == nil || IsNil(o.Cloud) { + return nil, false + } + return o.Cloud, true +} + +// HasCloud returns a boolean if a field has been set. +func (o *ARecord) HasCloud() bool { + if o != nil && !IsNil(o.Cloud) { + return true + } + + return false +} + +// SetCloud gets a reference to the given bool and assigns it to the Cloud field. +func (o *ARecord) SetCloud(v bool) { + o.Cloud = &v +} + +// GetUpstreamHttps returns the UpstreamHttps field value if set, zero value otherwise. +func (o *ARecord) GetUpstreamHttps() string { + if o == nil || IsNil(o.UpstreamHttps) { + var ret string + return ret + } + return *o.UpstreamHttps +} + +// GetUpstreamHttpsOk returns a tuple with the UpstreamHttps field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ARecord) GetUpstreamHttpsOk() (*string, bool) { + if o == nil || IsNil(o.UpstreamHttps) { + return nil, false + } + return o.UpstreamHttps, true +} + +// HasUpstreamHttps returns a boolean if a field has been set. +func (o *ARecord) HasUpstreamHttps() bool { + if o != nil && !IsNil(o.UpstreamHttps) { + return true + } + + return false +} + +// SetUpstreamHttps gets a reference to the given string and assigns it to the UpstreamHttps field. +func (o *ARecord) SetUpstreamHttps(v string) { + o.UpstreamHttps = &v +} + +// GetIpFilterMode returns the IpFilterMode field value if set, zero value otherwise. +func (o *ARecord) GetIpFilterMode() DnsRecordIpFilterMode { + if o == nil || IsNil(o.IpFilterMode) { + var ret DnsRecordIpFilterMode + return ret + } + return *o.IpFilterMode +} + +// GetIpFilterModeOk returns a tuple with the IpFilterMode field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ARecord) GetIpFilterModeOk() (*DnsRecordIpFilterMode, bool) { + if o == nil || IsNil(o.IpFilterMode) { + return nil, false + } + return o.IpFilterMode, true +} + +// HasIpFilterMode returns a boolean if a field has been set. +func (o *ARecord) HasIpFilterMode() bool { + if o != nil && !IsNil(o.IpFilterMode) { + return true + } + + return false +} + +// SetIpFilterMode gets a reference to the given DnsRecordIpFilterMode and assigns it to the IpFilterMode field. +func (o *ARecord) SetIpFilterMode(v DnsRecordIpFilterMode) { + o.IpFilterMode = &v +} + +// GetIsProtected returns the IsProtected field value if set, zero value otherwise. +func (o *ARecord) GetIsProtected() bool { + if o == nil || IsNil(o.IsProtected) { + var ret bool + return ret + } + return *o.IsProtected +} + +// GetIsProtectedOk returns a tuple with the IsProtected field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ARecord) GetIsProtectedOk() (*bool, bool) { + if o == nil || IsNil(o.IsProtected) { + return nil, false + } + return o.IsProtected, true +} + +// HasIsProtected returns a boolean if a field has been set. +func (o *ARecord) HasIsProtected() bool { + if o != nil && !IsNil(o.IsProtected) { + return true + } + + return false +} + +// SetIsProtected gets a reference to the given bool and assigns it to the IsProtected field. +func (o *ARecord) SetIsProtected(v bool) { + o.IsProtected = &v +} + +// GetUsage returns the Usage field value if set, zero value otherwise. +func (o *ARecord) GetUsage() []string { + if o == nil || IsNil(o.Usage) { + var ret []string + return ret + } + return o.Usage +} + +// GetUsageOk returns a tuple with the Usage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ARecord) GetUsageOk() ([]string, bool) { + if o == nil || IsNil(o.Usage) { + return nil, false + } + return o.Usage, true +} + +// HasUsage returns a boolean if a field has been set. +func (o *ARecord) HasUsage() bool { + if o != nil && !IsNil(o.Usage) { + return true + } + + return false +} + +// SetUsage gets a reference to the given []string and assigns it to the Usage field. +func (o *ARecord) SetUsage(v []string) { + o.Usage = v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *ARecord) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ARecord) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *ARecord) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *ARecord) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *ARecord) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ARecord) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *ARecord) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *ARecord) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +func (o ARecord) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ARecord) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Value) { + toSerialize["value"] = o.Value + } + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + // skip: id is readOnly + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Ttl) { + toSerialize["ttl"] = o.Ttl + } + if !IsNil(o.Cloud) { + toSerialize["cloud"] = o.Cloud + } + if !IsNil(o.UpstreamHttps) { + toSerialize["upstream_https"] = o.UpstreamHttps + } + if !IsNil(o.IpFilterMode) { + toSerialize["ip_filter_mode"] = o.IpFilterMode + } + // skip: is_protected is readOnly + // skip: usage is readOnly + // skip: created_at is readOnly + // skip: updated_at is readOnly + return toSerialize, nil +} + +type NullableARecord struct { + value *ARecord + isSet bool +} + +func (v NullableARecord) Get() *ARecord { + return v.value +} + +func (v *NullableARecord) Set(val *ARecord) { + v.value = val + v.isSet = true +} + +func (v NullableARecord) IsSet() bool { + return v.isSet +} + +func (v *NullableARecord) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableARecord(val *ARecord) *NullableARecord { + return &NullableARecord{value: val, isSet: true} +} + +func (v NullableARecord) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableARecord) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_a_record_value.go b/model_a_record_value.go new file mode 100644 index 0000000..8065ee6 --- /dev/null +++ b/model_a_record_value.go @@ -0,0 +1,300 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the ARecordValue type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ARecordValue{} + +// ARecordValue struct for ARecordValue +type ARecordValue struct { + Ip *string `json:"ip,omitempty"` + Port NullableInt32 `json:"port,omitempty"` + Weight NullableInt32 `json:"weight,omitempty"` + // This key shows itself here if the weight have been changed by Health Check. + OriginalWeight *int32 `json:"original_weight,omitempty"` + // ISO 3166 alpha-2 country code + Country NullableString `json:"country,omitempty"` +} + +// NewARecordValue instantiates a new ARecordValue object +// This constructor will assign default values to properties that have it defined, +// 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 NewARecordValue() *ARecordValue { + this := ARecordValue{} + return &this +} + +// NewARecordValueWithDefaults instantiates a new ARecordValue object +// This 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 NewARecordValueWithDefaults() *ARecordValue { + this := ARecordValue{} + return &this +} + +// GetIp returns the Ip field value if set, zero value otherwise. +func (o *ARecordValue) GetIp() string { + if o == nil || IsNil(o.Ip) { + var ret string + return ret + } + return *o.Ip +} + +// GetIpOk returns a tuple with the Ip field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ARecordValue) GetIpOk() (*string, bool) { + if o == nil || IsNil(o.Ip) { + return nil, false + } + return o.Ip, true +} + +// HasIp returns a boolean if a field has been set. +func (o *ARecordValue) HasIp() bool { + if o != nil && !IsNil(o.Ip) { + return true + } + + return false +} + +// SetIp gets a reference to the given string and assigns it to the Ip field. +func (o *ARecordValue) SetIp(v string) { + o.Ip = &v +} + +// GetPort returns the Port field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ARecordValue) GetPort() int32 { + if o == nil || IsNil(o.Port.Get()) { + var ret int32 + return ret + } + return *o.Port.Get() +} + +// GetPortOk returns a tuple with the Port 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 *ARecordValue) GetPortOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.Port.Get(), o.Port.IsSet() +} + +// HasPort returns a boolean if a field has been set. +func (o *ARecordValue) HasPort() bool { + if o != nil && o.Port.IsSet() { + return true + } + + return false +} + +// SetPort gets a reference to the given NullableInt32 and assigns it to the Port field. +func (o *ARecordValue) SetPort(v int32) { + o.Port.Set(&v) +} +// SetPortNil sets the value for Port to be an explicit nil +func (o *ARecordValue) SetPortNil() { + o.Port.Set(nil) +} + +// UnsetPort ensures that no value is present for Port, not even an explicit nil +func (o *ARecordValue) UnsetPort() { + o.Port.Unset() +} + +// GetWeight returns the Weight field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ARecordValue) GetWeight() int32 { + if o == nil || IsNil(o.Weight.Get()) { + var ret int32 + return ret + } + return *o.Weight.Get() +} + +// GetWeightOk returns a tuple with the Weight 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 *ARecordValue) GetWeightOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.Weight.Get(), o.Weight.IsSet() +} + +// HasWeight returns a boolean if a field has been set. +func (o *ARecordValue) HasWeight() bool { + if o != nil && o.Weight.IsSet() { + return true + } + + return false +} + +// SetWeight gets a reference to the given NullableInt32 and assigns it to the Weight field. +func (o *ARecordValue) SetWeight(v int32) { + o.Weight.Set(&v) +} +// SetWeightNil sets the value for Weight to be an explicit nil +func (o *ARecordValue) SetWeightNil() { + o.Weight.Set(nil) +} + +// UnsetWeight ensures that no value is present for Weight, not even an explicit nil +func (o *ARecordValue) UnsetWeight() { + o.Weight.Unset() +} + +// GetOriginalWeight returns the OriginalWeight field value if set, zero value otherwise. +func (o *ARecordValue) GetOriginalWeight() int32 { + if o == nil || IsNil(o.OriginalWeight) { + var ret int32 + return ret + } + return *o.OriginalWeight +} + +// GetOriginalWeightOk returns a tuple with the OriginalWeight field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ARecordValue) GetOriginalWeightOk() (*int32, bool) { + if o == nil || IsNil(o.OriginalWeight) { + return nil, false + } + return o.OriginalWeight, true +} + +// HasOriginalWeight returns a boolean if a field has been set. +func (o *ARecordValue) HasOriginalWeight() bool { + if o != nil && !IsNil(o.OriginalWeight) { + return true + } + + return false +} + +// SetOriginalWeight gets a reference to the given int32 and assigns it to the OriginalWeight field. +func (o *ARecordValue) SetOriginalWeight(v int32) { + o.OriginalWeight = &v +} + +// GetCountry returns the Country field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ARecordValue) 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 *ARecordValue) 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 *ARecordValue) 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 *ARecordValue) SetCountry(v string) { + o.Country.Set(&v) +} +// SetCountryNil sets the value for Country to be an explicit nil +func (o *ARecordValue) SetCountryNil() { + o.Country.Set(nil) +} + +// UnsetCountry ensures that no value is present for Country, not even an explicit nil +func (o *ARecordValue) UnsetCountry() { + o.Country.Unset() +} + +func (o ARecordValue) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ARecordValue) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Ip) { + toSerialize["ip"] = o.Ip + } + if o.Port.IsSet() { + toSerialize["port"] = o.Port.Get() + } + if o.Weight.IsSet() { + toSerialize["weight"] = o.Weight.Get() + } + // skip: original_weight is readOnly + if o.Country.IsSet() { + toSerialize["country"] = o.Country.Get() + } + return toSerialize, nil +} + +type NullableARecordValue struct { + value *ARecordValue + isSet bool +} + +func (v NullableARecordValue) Get() *ARecordValue { + return v.value +} + +func (v *NullableARecordValue) Set(val *ARecordValue) { + v.value = val + v.isSet = true +} + +func (v NullableARecordValue) IsSet() bool { + return v.isSet +} + +func (v *NullableARecordValue) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableARecordValue(val *ARecordValue) *NullableARecordValue { + return &NullableARecordValue{value: val, isSet: true} +} + +func (v NullableARecordValue) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableARecordValue) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_aaaa_record.go b/model_aaaa_record.go new file mode 100644 index 0000000..1b17b65 --- /dev/null +++ b/model_aaaa_record.go @@ -0,0 +1,520 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" + "time" +) + +// checks if the AAAARecord type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AAAARecord{} + +// AAAARecord struct for AAAARecord +type AAAARecord struct { + Value []AAAARecordValue `json:"value,omitempty"` + Type *string `json:"type,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Ttl *int32 `json:"ttl,omitempty"` + Cloud *bool `json:"cloud,omitempty"` + UpstreamHttps *string `json:"upstream_https,omitempty"` + IpFilterMode *DnsRecordIpFilterMode `json:"ip_filter_mode,omitempty"` + // Protected records cannot be modified or deleted by user. + IsProtected *bool `json:"is_protected,omitempty"` + Usage []string `json:"usage,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty"` + UpdatedAt *time.Time `json:"updated_at,omitempty"` +} + +// NewAAAARecord instantiates a new AAAARecord object +// This constructor will assign default values to properties that have it defined, +// 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 NewAAAARecord() *AAAARecord { + this := AAAARecord{} + var cloud bool = false + this.Cloud = &cloud + return &this +} + +// NewAAAARecordWithDefaults instantiates a new AAAARecord object +// This 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 NewAAAARecordWithDefaults() *AAAARecord { + this := AAAARecord{} + var type_ string = "aaaa" + this.Type = &type_ + var cloud bool = false + this.Cloud = &cloud + return &this +} + +// GetValue returns the Value field value if set, zero value otherwise. +func (o *AAAARecord) GetValue() []AAAARecordValue { + if o == nil || IsNil(o.Value) { + var ret []AAAARecordValue + return ret + } + return o.Value +} + +// GetValueOk returns a tuple with the Value field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AAAARecord) GetValueOk() ([]AAAARecordValue, bool) { + if o == nil || IsNil(o.Value) { + return nil, false + } + return o.Value, true +} + +// HasValue returns a boolean if a field has been set. +func (o *AAAARecord) HasValue() bool { + if o != nil && !IsNil(o.Value) { + return true + } + + return false +} + +// SetValue gets a reference to the given []AAAARecordValue and assigns it to the Value field. +func (o *AAAARecord) SetValue(v []AAAARecordValue) { + o.Value = v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *AAAARecord) 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 *AAAARecord) 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 *AAAARecord) 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 *AAAARecord) SetType(v string) { + o.Type = &v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *AAAARecord) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AAAARecord) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *AAAARecord) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *AAAARecord) SetId(v string) { + o.Id = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *AAAARecord) 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 *AAAARecord) 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 *AAAARecord) 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 *AAAARecord) SetName(v string) { + o.Name = &v +} + +// GetTtl returns the Ttl field value if set, zero value otherwise. +func (o *AAAARecord) GetTtl() int32 { + if o == nil || IsNil(o.Ttl) { + var ret int32 + return ret + } + return *o.Ttl +} + +// GetTtlOk returns a tuple with the Ttl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AAAARecord) GetTtlOk() (*int32, bool) { + if o == nil || IsNil(o.Ttl) { + return nil, false + } + return o.Ttl, true +} + +// HasTtl returns a boolean if a field has been set. +func (o *AAAARecord) HasTtl() bool { + if o != nil && !IsNil(o.Ttl) { + return true + } + + return false +} + +// SetTtl gets a reference to the given int32 and assigns it to the Ttl field. +func (o *AAAARecord) SetTtl(v int32) { + o.Ttl = &v +} + +// GetCloud returns the Cloud field value if set, zero value otherwise. +func (o *AAAARecord) GetCloud() bool { + if o == nil || IsNil(o.Cloud) { + var ret bool + return ret + } + return *o.Cloud +} + +// GetCloudOk returns a tuple with the Cloud field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AAAARecord) GetCloudOk() (*bool, bool) { + if o == nil || IsNil(o.Cloud) { + return nil, false + } + return o.Cloud, true +} + +// HasCloud returns a boolean if a field has been set. +func (o *AAAARecord) HasCloud() bool { + if o != nil && !IsNil(o.Cloud) { + return true + } + + return false +} + +// SetCloud gets a reference to the given bool and assigns it to the Cloud field. +func (o *AAAARecord) SetCloud(v bool) { + o.Cloud = &v +} + +// GetUpstreamHttps returns the UpstreamHttps field value if set, zero value otherwise. +func (o *AAAARecord) GetUpstreamHttps() string { + if o == nil || IsNil(o.UpstreamHttps) { + var ret string + return ret + } + return *o.UpstreamHttps +} + +// GetUpstreamHttpsOk returns a tuple with the UpstreamHttps field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AAAARecord) GetUpstreamHttpsOk() (*string, bool) { + if o == nil || IsNil(o.UpstreamHttps) { + return nil, false + } + return o.UpstreamHttps, true +} + +// HasUpstreamHttps returns a boolean if a field has been set. +func (o *AAAARecord) HasUpstreamHttps() bool { + if o != nil && !IsNil(o.UpstreamHttps) { + return true + } + + return false +} + +// SetUpstreamHttps gets a reference to the given string and assigns it to the UpstreamHttps field. +func (o *AAAARecord) SetUpstreamHttps(v string) { + o.UpstreamHttps = &v +} + +// GetIpFilterMode returns the IpFilterMode field value if set, zero value otherwise. +func (o *AAAARecord) GetIpFilterMode() DnsRecordIpFilterMode { + if o == nil || IsNil(o.IpFilterMode) { + var ret DnsRecordIpFilterMode + return ret + } + return *o.IpFilterMode +} + +// GetIpFilterModeOk returns a tuple with the IpFilterMode field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AAAARecord) GetIpFilterModeOk() (*DnsRecordIpFilterMode, bool) { + if o == nil || IsNil(o.IpFilterMode) { + return nil, false + } + return o.IpFilterMode, true +} + +// HasIpFilterMode returns a boolean if a field has been set. +func (o *AAAARecord) HasIpFilterMode() bool { + if o != nil && !IsNil(o.IpFilterMode) { + return true + } + + return false +} + +// SetIpFilterMode gets a reference to the given DnsRecordIpFilterMode and assigns it to the IpFilterMode field. +func (o *AAAARecord) SetIpFilterMode(v DnsRecordIpFilterMode) { + o.IpFilterMode = &v +} + +// GetIsProtected returns the IsProtected field value if set, zero value otherwise. +func (o *AAAARecord) GetIsProtected() bool { + if o == nil || IsNil(o.IsProtected) { + var ret bool + return ret + } + return *o.IsProtected +} + +// GetIsProtectedOk returns a tuple with the IsProtected field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AAAARecord) GetIsProtectedOk() (*bool, bool) { + if o == nil || IsNil(o.IsProtected) { + return nil, false + } + return o.IsProtected, true +} + +// HasIsProtected returns a boolean if a field has been set. +func (o *AAAARecord) HasIsProtected() bool { + if o != nil && !IsNil(o.IsProtected) { + return true + } + + return false +} + +// SetIsProtected gets a reference to the given bool and assigns it to the IsProtected field. +func (o *AAAARecord) SetIsProtected(v bool) { + o.IsProtected = &v +} + +// GetUsage returns the Usage field value if set, zero value otherwise. +func (o *AAAARecord) GetUsage() []string { + if o == nil || IsNil(o.Usage) { + var ret []string + return ret + } + return o.Usage +} + +// GetUsageOk returns a tuple with the Usage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AAAARecord) GetUsageOk() ([]string, bool) { + if o == nil || IsNil(o.Usage) { + return nil, false + } + return o.Usage, true +} + +// HasUsage returns a boolean if a field has been set. +func (o *AAAARecord) HasUsage() bool { + if o != nil && !IsNil(o.Usage) { + return true + } + + return false +} + +// SetUsage gets a reference to the given []string and assigns it to the Usage field. +func (o *AAAARecord) SetUsage(v []string) { + o.Usage = v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *AAAARecord) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AAAARecord) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *AAAARecord) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *AAAARecord) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *AAAARecord) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AAAARecord) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *AAAARecord) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *AAAARecord) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +func (o AAAARecord) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AAAARecord) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Value) { + toSerialize["value"] = o.Value + } + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + // skip: id is readOnly + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Ttl) { + toSerialize["ttl"] = o.Ttl + } + if !IsNil(o.Cloud) { + toSerialize["cloud"] = o.Cloud + } + if !IsNil(o.UpstreamHttps) { + toSerialize["upstream_https"] = o.UpstreamHttps + } + if !IsNil(o.IpFilterMode) { + toSerialize["ip_filter_mode"] = o.IpFilterMode + } + // skip: is_protected is readOnly + // skip: usage is readOnly + // skip: created_at is readOnly + // skip: updated_at is readOnly + return toSerialize, nil +} + +type NullableAAAARecord struct { + value *AAAARecord + isSet bool +} + +func (v NullableAAAARecord) Get() *AAAARecord { + return v.value +} + +func (v *NullableAAAARecord) Set(val *AAAARecord) { + v.value = val + v.isSet = true +} + +func (v NullableAAAARecord) IsSet() bool { + return v.isSet +} + +func (v *NullableAAAARecord) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAAAARecord(val *AAAARecord) *NullableAAAARecord { + return &NullableAAAARecord{value: val, isSet: true} +} + +func (v NullableAAAARecord) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAAAARecord) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_aaaa_record_value.go b/model_aaaa_record_value.go new file mode 100644 index 0000000..b8ed26f --- /dev/null +++ b/model_aaaa_record_value.go @@ -0,0 +1,291 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the AAAARecordValue type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AAAARecordValue{} + +// AAAARecordValue struct for AAAARecordValue +type AAAARecordValue struct { + Ip string `json:"ip"` + Port NullableInt32 `json:"port,omitempty"` + Weight NullableInt32 `json:"weight,omitempty"` + // This key shows itself here if the weights have been changed by Health Check. + OriginalWeight *int32 `json:"original_weight,omitempty"` + // ISO 3166 alpha-2 country code + Country NullableString `json:"country,omitempty"` +} + +// NewAAAARecordValue instantiates a new AAAARecordValue object +// This constructor will assign default values to properties that have it defined, +// 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 NewAAAARecordValue(ip string) *AAAARecordValue { + this := AAAARecordValue{} + this.Ip = ip + return &this +} + +// NewAAAARecordValueWithDefaults instantiates a new AAAARecordValue object +// This 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 NewAAAARecordValueWithDefaults() *AAAARecordValue { + this := AAAARecordValue{} + return &this +} + +// GetIp returns the Ip field value +func (o *AAAARecordValue) GetIp() string { + if o == nil { + var ret string + return ret + } + + return o.Ip +} + +// GetIpOk returns a tuple with the Ip field value +// and a boolean to check if the value has been set. +func (o *AAAARecordValue) GetIpOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Ip, true +} + +// SetIp sets field value +func (o *AAAARecordValue) SetIp(v string) { + o.Ip = v +} + +// GetPort returns the Port field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AAAARecordValue) GetPort() int32 { + if o == nil || IsNil(o.Port.Get()) { + var ret int32 + return ret + } + return *o.Port.Get() +} + +// GetPortOk returns a tuple with the Port 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 *AAAARecordValue) GetPortOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.Port.Get(), o.Port.IsSet() +} + +// HasPort returns a boolean if a field has been set. +func (o *AAAARecordValue) HasPort() bool { + if o != nil && o.Port.IsSet() { + return true + } + + return false +} + +// SetPort gets a reference to the given NullableInt32 and assigns it to the Port field. +func (o *AAAARecordValue) SetPort(v int32) { + o.Port.Set(&v) +} +// SetPortNil sets the value for Port to be an explicit nil +func (o *AAAARecordValue) SetPortNil() { + o.Port.Set(nil) +} + +// UnsetPort ensures that no value is present for Port, not even an explicit nil +func (o *AAAARecordValue) UnsetPort() { + o.Port.Unset() +} + +// GetWeight returns the Weight field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AAAARecordValue) GetWeight() int32 { + if o == nil || IsNil(o.Weight.Get()) { + var ret int32 + return ret + } + return *o.Weight.Get() +} + +// GetWeightOk returns a tuple with the Weight 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 *AAAARecordValue) GetWeightOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.Weight.Get(), o.Weight.IsSet() +} + +// HasWeight returns a boolean if a field has been set. +func (o *AAAARecordValue) HasWeight() bool { + if o != nil && o.Weight.IsSet() { + return true + } + + return false +} + +// SetWeight gets a reference to the given NullableInt32 and assigns it to the Weight field. +func (o *AAAARecordValue) SetWeight(v int32) { + o.Weight.Set(&v) +} +// SetWeightNil sets the value for Weight to be an explicit nil +func (o *AAAARecordValue) SetWeightNil() { + o.Weight.Set(nil) +} + +// UnsetWeight ensures that no value is present for Weight, not even an explicit nil +func (o *AAAARecordValue) UnsetWeight() { + o.Weight.Unset() +} + +// GetOriginalWeight returns the OriginalWeight field value if set, zero value otherwise. +func (o *AAAARecordValue) GetOriginalWeight() int32 { + if o == nil || IsNil(o.OriginalWeight) { + var ret int32 + return ret + } + return *o.OriginalWeight +} + +// GetOriginalWeightOk returns a tuple with the OriginalWeight field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AAAARecordValue) GetOriginalWeightOk() (*int32, bool) { + if o == nil || IsNil(o.OriginalWeight) { + return nil, false + } + return o.OriginalWeight, true +} + +// HasOriginalWeight returns a boolean if a field has been set. +func (o *AAAARecordValue) HasOriginalWeight() bool { + if o != nil && !IsNil(o.OriginalWeight) { + return true + } + + return false +} + +// SetOriginalWeight gets a reference to the given int32 and assigns it to the OriginalWeight field. +func (o *AAAARecordValue) SetOriginalWeight(v int32) { + o.OriginalWeight = &v +} + +// GetCountry returns the Country field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AAAARecordValue) 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 *AAAARecordValue) 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 *AAAARecordValue) 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 *AAAARecordValue) SetCountry(v string) { + o.Country.Set(&v) +} +// SetCountryNil sets the value for Country to be an explicit nil +func (o *AAAARecordValue) SetCountryNil() { + o.Country.Set(nil) +} + +// UnsetCountry ensures that no value is present for Country, not even an explicit nil +func (o *AAAARecordValue) UnsetCountry() { + o.Country.Unset() +} + +func (o AAAARecordValue) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AAAARecordValue) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["ip"] = o.Ip + if o.Port.IsSet() { + toSerialize["port"] = o.Port.Get() + } + if o.Weight.IsSet() { + toSerialize["weight"] = o.Weight.Get() + } + // skip: original_weight is readOnly + if o.Country.IsSet() { + toSerialize["country"] = o.Country.Get() + } + return toSerialize, nil +} + +type NullableAAAARecordValue struct { + value *AAAARecordValue + isSet bool +} + +func (v NullableAAAARecordValue) Get() *AAAARecordValue { + return v.value +} + +func (v *NullableAAAARecordValue) Set(val *AAAARecordValue) { + v.value = val + v.isSet = true +} + +func (v NullableAAAARecordValue) IsSet() bool { + return v.isSet +} + +func (v *NullableAAAARecordValue) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAAAARecordValue(val *AAAARecordValue) *NullableAAAARecordValue { + return &NullableAAAARecordValue{value: val, isSet: true} +} + +func (v NullableAAAARecordValue) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAAAARecordValue) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_acceleration.go b/model_acceleration.go new file mode 100644 index 0000000..5922329 --- /dev/null +++ b/model_acceleration.go @@ -0,0 +1,162 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the Acceleration type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Acceleration{} + +// Acceleration struct for Acceleration +type Acceleration struct { + Status *string `json:"status,omitempty"` + Extensions []string `json:"extensions,omitempty"` +} + +// NewAcceleration instantiates a new Acceleration object +// This constructor will assign default values to properties that have it defined, +// 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 NewAcceleration() *Acceleration { + this := Acceleration{} + return &this +} + +// NewAccelerationWithDefaults instantiates a new Acceleration object +// This 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 NewAccelerationWithDefaults() *Acceleration { + this := Acceleration{} + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *Acceleration) GetStatus() string { + if o == nil || IsNil(o.Status) { + var ret string + 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 *Acceleration) GetStatusOk() (*string, 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 *Acceleration) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *Acceleration) SetStatus(v string) { + o.Status = &v +} + +// GetExtensions returns the Extensions field value if set, zero value otherwise. +func (o *Acceleration) GetExtensions() []string { + if o == nil || IsNil(o.Extensions) { + var ret []string + return ret + } + return o.Extensions +} + +// GetExtensionsOk returns a tuple with the Extensions field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Acceleration) GetExtensionsOk() ([]string, bool) { + if o == nil || IsNil(o.Extensions) { + return nil, false + } + return o.Extensions, true +} + +// HasExtensions returns a boolean if a field has been set. +func (o *Acceleration) HasExtensions() bool { + if o != nil && !IsNil(o.Extensions) { + return true + } + + return false +} + +// SetExtensions gets a reference to the given []string and assigns it to the Extensions field. +func (o *Acceleration) SetExtensions(v []string) { + o.Extensions = v +} + +func (o Acceleration) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Acceleration) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + if !IsNil(o.Extensions) { + toSerialize["extensions"] = o.Extensions + } + return toSerialize, nil +} + +type NullableAcceleration struct { + value *Acceleration + isSet bool +} + +func (v NullableAcceleration) Get() *Acceleration { + return v.value +} + +func (v *NullableAcceleration) Set(val *Acceleration) { + v.value = val + v.isSet = true +} + +func (v NullableAcceleration) IsSet() bool { + return v.isSet +} + +func (v *NullableAcceleration) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAcceleration(val *Acceleration) *NullableAcceleration { + return &NullableAcceleration{value: val, isSet: true} +} + +func (v NullableAcceleration) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAcceleration) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_acceleration_response.go b/model_acceleration_response.go new file mode 100644 index 0000000..7aae92b --- /dev/null +++ b/model_acceleration_response.go @@ -0,0 +1,172 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the AccelerationResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AccelerationResponse{} + +// AccelerationResponse struct for AccelerationResponse +type AccelerationResponse struct { + Data *Acceleration `json:"data,omitempty"` + Message NullableString `json:"message,omitempty"` +} + +// NewAccelerationResponse instantiates a new AccelerationResponse object +// This constructor will assign default values to properties that have it defined, +// 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 NewAccelerationResponse() *AccelerationResponse { + this := AccelerationResponse{} + return &this +} + +// NewAccelerationResponseWithDefaults instantiates a new AccelerationResponse object +// This 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 NewAccelerationResponseWithDefaults() *AccelerationResponse { + this := AccelerationResponse{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *AccelerationResponse) GetData() Acceleration { + if o == nil || IsNil(o.Data) { + var ret Acceleration + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AccelerationResponse) GetDataOk() (*Acceleration, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *AccelerationResponse) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given Acceleration and assigns it to the Data field. +func (o *AccelerationResponse) SetData(v Acceleration) { + o.Data = &v +} + +// GetMessage returns the Message field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AccelerationResponse) GetMessage() string { + if o == nil || IsNil(o.Message.Get()) { + var ret string + return ret + } + return *o.Message.Get() +} + +// GetMessageOk returns a tuple with the Message 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 *AccelerationResponse) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Message.Get(), o.Message.IsSet() +} + +// HasMessage returns a boolean if a field has been set. +func (o *AccelerationResponse) HasMessage() bool { + if o != nil && o.Message.IsSet() { + return true + } + + return false +} + +// SetMessage gets a reference to the given NullableString and assigns it to the Message field. +func (o *AccelerationResponse) SetMessage(v string) { + o.Message.Set(&v) +} +// SetMessageNil sets the value for Message to be an explicit nil +func (o *AccelerationResponse) SetMessageNil() { + o.Message.Set(nil) +} + +// UnsetMessage ensures that no value is present for Message, not even an explicit nil +func (o *AccelerationResponse) UnsetMessage() { + o.Message.Unset() +} + +func (o AccelerationResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AccelerationResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + if o.Message.IsSet() { + toSerialize["message"] = o.Message.Get() + } + return toSerialize, nil +} + +type NullableAccelerationResponse struct { + value *AccelerationResponse + isSet bool +} + +func (v NullableAccelerationResponse) Get() *AccelerationResponse { + return v.value +} + +func (v *NullableAccelerationResponse) Set(val *AccelerationResponse) { + v.value = val + v.isSet = true +} + +func (v NullableAccelerationResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableAccelerationResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAccelerationResponse(val *AccelerationResponse) *NullableAccelerationResponse { + return &NullableAccelerationResponse{value: val, isSet: true} +} + +func (v NullableAccelerationResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAccelerationResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_acceleration_update.go b/model_acceleration_update.go new file mode 100644 index 0000000..4fe8be1 --- /dev/null +++ b/model_acceleration_update.go @@ -0,0 +1,162 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the AccelerationUpdate type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AccelerationUpdate{} + +// AccelerationUpdate struct for AccelerationUpdate +type AccelerationUpdate struct { + Status *string `json:"status,omitempty"` + Extensions []string `json:"extensions,omitempty"` +} + +// NewAccelerationUpdate instantiates a new AccelerationUpdate object +// This constructor will assign default values to properties that have it defined, +// 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 NewAccelerationUpdate() *AccelerationUpdate { + this := AccelerationUpdate{} + return &this +} + +// NewAccelerationUpdateWithDefaults instantiates a new AccelerationUpdate object +// This 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 NewAccelerationUpdateWithDefaults() *AccelerationUpdate { + this := AccelerationUpdate{} + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *AccelerationUpdate) GetStatus() string { + if o == nil || IsNil(o.Status) { + var ret string + 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 *AccelerationUpdate) GetStatusOk() (*string, 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 *AccelerationUpdate) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *AccelerationUpdate) SetStatus(v string) { + o.Status = &v +} + +// GetExtensions returns the Extensions field value if set, zero value otherwise. +func (o *AccelerationUpdate) GetExtensions() []string { + if o == nil || IsNil(o.Extensions) { + var ret []string + return ret + } + return o.Extensions +} + +// GetExtensionsOk returns a tuple with the Extensions field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AccelerationUpdate) GetExtensionsOk() ([]string, bool) { + if o == nil || IsNil(o.Extensions) { + return nil, false + } + return o.Extensions, true +} + +// HasExtensions returns a boolean if a field has been set. +func (o *AccelerationUpdate) HasExtensions() bool { + if o != nil && !IsNil(o.Extensions) { + return true + } + + return false +} + +// SetExtensions gets a reference to the given []string and assigns it to the Extensions field. +func (o *AccelerationUpdate) SetExtensions(v []string) { + o.Extensions = v +} + +func (o AccelerationUpdate) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AccelerationUpdate) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + if !IsNil(o.Extensions) { + toSerialize["extensions"] = o.Extensions + } + return toSerialize, nil +} + +type NullableAccelerationUpdate struct { + value *AccelerationUpdate + isSet bool +} + +func (v NullableAccelerationUpdate) Get() *AccelerationUpdate { + return v.value +} + +func (v *NullableAccelerationUpdate) Set(val *AccelerationUpdate) { + v.value = val + v.isSet = true +} + +func (v NullableAccelerationUpdate) IsSet() bool { + return v.isSet +} + +func (v *NullableAccelerationUpdate) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAccelerationUpdate(val *AccelerationUpdate) *NullableAccelerationUpdate { + return &NullableAccelerationUpdate{value: val, isSet: true} +} + +func (v NullableAccelerationUpdate) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAccelerationUpdate) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_active_health_check_index_200_response.go b/model_active_health_check_index_200_response.go new file mode 100644 index 0000000..ff20ed3 --- /dev/null +++ b/model_active_health_check_index_200_response.go @@ -0,0 +1,172 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the ActiveHealthCheckIndex200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ActiveHealthCheckIndex200Response{} + +// ActiveHealthCheckIndex200Response struct for ActiveHealthCheckIndex200Response +type ActiveHealthCheckIndex200Response struct { + Data []HealthCheckView `json:"data,omitempty"` + Message NullableString `json:"message,omitempty"` +} + +// NewActiveHealthCheckIndex200Response instantiates a new ActiveHealthCheckIndex200Response object +// This constructor will assign default values to properties that have it defined, +// 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 NewActiveHealthCheckIndex200Response() *ActiveHealthCheckIndex200Response { + this := ActiveHealthCheckIndex200Response{} + return &this +} + +// NewActiveHealthCheckIndex200ResponseWithDefaults instantiates a new ActiveHealthCheckIndex200Response object +// This 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 NewActiveHealthCheckIndex200ResponseWithDefaults() *ActiveHealthCheckIndex200Response { + this := ActiveHealthCheckIndex200Response{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *ActiveHealthCheckIndex200Response) GetData() []HealthCheckView { + if o == nil || IsNil(o.Data) { + var ret []HealthCheckView + return ret + } + return o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ActiveHealthCheckIndex200Response) GetDataOk() ([]HealthCheckView, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *ActiveHealthCheckIndex200Response) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given []HealthCheckView and assigns it to the Data field. +func (o *ActiveHealthCheckIndex200Response) SetData(v []HealthCheckView) { + o.Data = v +} + +// GetMessage returns the Message field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ActiveHealthCheckIndex200Response) GetMessage() string { + if o == nil || IsNil(o.Message.Get()) { + var ret string + return ret + } + return *o.Message.Get() +} + +// GetMessageOk returns a tuple with the Message 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 *ActiveHealthCheckIndex200Response) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Message.Get(), o.Message.IsSet() +} + +// HasMessage returns a boolean if a field has been set. +func (o *ActiveHealthCheckIndex200Response) HasMessage() bool { + if o != nil && o.Message.IsSet() { + return true + } + + return false +} + +// SetMessage gets a reference to the given NullableString and assigns it to the Message field. +func (o *ActiveHealthCheckIndex200Response) SetMessage(v string) { + o.Message.Set(&v) +} +// SetMessageNil sets the value for Message to be an explicit nil +func (o *ActiveHealthCheckIndex200Response) SetMessageNil() { + o.Message.Set(nil) +} + +// UnsetMessage ensures that no value is present for Message, not even an explicit nil +func (o *ActiveHealthCheckIndex200Response) UnsetMessage() { + o.Message.Unset() +} + +func (o ActiveHealthCheckIndex200Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ActiveHealthCheckIndex200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + if o.Message.IsSet() { + toSerialize["message"] = o.Message.Get() + } + return toSerialize, nil +} + +type NullableActiveHealthCheckIndex200Response struct { + value *ActiveHealthCheckIndex200Response + isSet bool +} + +func (v NullableActiveHealthCheckIndex200Response) Get() *ActiveHealthCheckIndex200Response { + return v.value +} + +func (v *NullableActiveHealthCheckIndex200Response) Set(val *ActiveHealthCheckIndex200Response) { + v.value = val + v.isSet = true +} + +func (v NullableActiveHealthCheckIndex200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableActiveHealthCheckIndex200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableActiveHealthCheckIndex200Response(val *ActiveHealthCheckIndex200Response) *NullableActiveHealthCheckIndex200Response { + return &NullableActiveHealthCheckIndex200Response{value: val, isSet: true} +} + +func (v NullableActiveHealthCheckIndex200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableActiveHealthCheckIndex200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_active_health_check_reports_details_200_response.go b/model_active_health_check_reports_details_200_response.go new file mode 100644 index 0000000..4d51b79 --- /dev/null +++ b/model_active_health_check_reports_details_200_response.go @@ -0,0 +1,198 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the ActiveHealthCheckReportsDetails200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ActiveHealthCheckReportsDetails200Response{} + +// ActiveHealthCheckReportsDetails200Response struct for ActiveHealthCheckReportsDetails200Response +type ActiveHealthCheckReportsDetails200Response struct { + Data []HealthCheckReportDetail `json:"data,omitempty"` + Links *PaginatedResponseLinks `json:"links,omitempty"` + Meta *PaginatedResponseMeta `json:"meta,omitempty"` +} + +// NewActiveHealthCheckReportsDetails200Response instantiates a new ActiveHealthCheckReportsDetails200Response object +// This constructor will assign default values to properties that have it defined, +// 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 NewActiveHealthCheckReportsDetails200Response() *ActiveHealthCheckReportsDetails200Response { + this := ActiveHealthCheckReportsDetails200Response{} + return &this +} + +// NewActiveHealthCheckReportsDetails200ResponseWithDefaults instantiates a new ActiveHealthCheckReportsDetails200Response object +// This 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 NewActiveHealthCheckReportsDetails200ResponseWithDefaults() *ActiveHealthCheckReportsDetails200Response { + this := ActiveHealthCheckReportsDetails200Response{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *ActiveHealthCheckReportsDetails200Response) GetData() []HealthCheckReportDetail { + if o == nil || IsNil(o.Data) { + var ret []HealthCheckReportDetail + return ret + } + return o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ActiveHealthCheckReportsDetails200Response) GetDataOk() ([]HealthCheckReportDetail, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *ActiveHealthCheckReportsDetails200Response) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given []HealthCheckReportDetail and assigns it to the Data field. +func (o *ActiveHealthCheckReportsDetails200Response) SetData(v []HealthCheckReportDetail) { + o.Data = v +} + +// GetLinks returns the Links field value if set, zero value otherwise. +func (o *ActiveHealthCheckReportsDetails200Response) GetLinks() PaginatedResponseLinks { + if o == nil || IsNil(o.Links) { + var ret PaginatedResponseLinks + return ret + } + return *o.Links +} + +// GetLinksOk returns a tuple with the Links field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ActiveHealthCheckReportsDetails200Response) GetLinksOk() (*PaginatedResponseLinks, bool) { + if o == nil || IsNil(o.Links) { + return nil, false + } + return o.Links, true +} + +// HasLinks returns a boolean if a field has been set. +func (o *ActiveHealthCheckReportsDetails200Response) HasLinks() bool { + if o != nil && !IsNil(o.Links) { + return true + } + + return false +} + +// SetLinks gets a reference to the given PaginatedResponseLinks and assigns it to the Links field. +func (o *ActiveHealthCheckReportsDetails200Response) SetLinks(v PaginatedResponseLinks) { + o.Links = &v +} + +// GetMeta returns the Meta field value if set, zero value otherwise. +func (o *ActiveHealthCheckReportsDetails200Response) GetMeta() PaginatedResponseMeta { + if o == nil || IsNil(o.Meta) { + var ret PaginatedResponseMeta + return ret + } + return *o.Meta +} + +// GetMetaOk returns a tuple with the Meta field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ActiveHealthCheckReportsDetails200Response) GetMetaOk() (*PaginatedResponseMeta, bool) { + if o == nil || IsNil(o.Meta) { + return nil, false + } + return o.Meta, true +} + +// HasMeta returns a boolean if a field has been set. +func (o *ActiveHealthCheckReportsDetails200Response) HasMeta() bool { + if o != nil && !IsNil(o.Meta) { + return true + } + + return false +} + +// SetMeta gets a reference to the given PaginatedResponseMeta and assigns it to the Meta field. +func (o *ActiveHealthCheckReportsDetails200Response) SetMeta(v PaginatedResponseMeta) { + o.Meta = &v +} + +func (o ActiveHealthCheckReportsDetails200Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ActiveHealthCheckReportsDetails200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + if !IsNil(o.Links) { + toSerialize["links"] = o.Links + } + if !IsNil(o.Meta) { + toSerialize["meta"] = o.Meta + } + return toSerialize, nil +} + +type NullableActiveHealthCheckReportsDetails200Response struct { + value *ActiveHealthCheckReportsDetails200Response + isSet bool +} + +func (v NullableActiveHealthCheckReportsDetails200Response) Get() *ActiveHealthCheckReportsDetails200Response { + return v.value +} + +func (v *NullableActiveHealthCheckReportsDetails200Response) Set(val *ActiveHealthCheckReportsDetails200Response) { + v.value = val + v.isSet = true +} + +func (v NullableActiveHealthCheckReportsDetails200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableActiveHealthCheckReportsDetails200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableActiveHealthCheckReportsDetails200Response(val *ActiveHealthCheckReportsDetails200Response) *NullableActiveHealthCheckReportsDetails200Response { + return &NullableActiveHealthCheckReportsDetails200Response{value: val, isSet: true} +} + +func (v NullableActiveHealthCheckReportsDetails200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableActiveHealthCheckReportsDetails200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_active_health_check_reports_summary_200_response.go b/model_active_health_check_reports_summary_200_response.go new file mode 100644 index 0000000..53b795b --- /dev/null +++ b/model_active_health_check_reports_summary_200_response.go @@ -0,0 +1,172 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the ActiveHealthCheckReportsSummary200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ActiveHealthCheckReportsSummary200Response{} + +// ActiveHealthCheckReportsSummary200Response struct for ActiveHealthCheckReportsSummary200Response +type ActiveHealthCheckReportsSummary200Response struct { + Data []HealthCheckReportSummary `json:"data,omitempty"` + Message NullableString `json:"message,omitempty"` +} + +// NewActiveHealthCheckReportsSummary200Response instantiates a new ActiveHealthCheckReportsSummary200Response object +// This constructor will assign default values to properties that have it defined, +// 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 NewActiveHealthCheckReportsSummary200Response() *ActiveHealthCheckReportsSummary200Response { + this := ActiveHealthCheckReportsSummary200Response{} + return &this +} + +// NewActiveHealthCheckReportsSummary200ResponseWithDefaults instantiates a new ActiveHealthCheckReportsSummary200Response object +// This 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 NewActiveHealthCheckReportsSummary200ResponseWithDefaults() *ActiveHealthCheckReportsSummary200Response { + this := ActiveHealthCheckReportsSummary200Response{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *ActiveHealthCheckReportsSummary200Response) GetData() []HealthCheckReportSummary { + if o == nil || IsNil(o.Data) { + var ret []HealthCheckReportSummary + return ret + } + return o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ActiveHealthCheckReportsSummary200Response) GetDataOk() ([]HealthCheckReportSummary, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *ActiveHealthCheckReportsSummary200Response) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given []HealthCheckReportSummary and assigns it to the Data field. +func (o *ActiveHealthCheckReportsSummary200Response) SetData(v []HealthCheckReportSummary) { + o.Data = v +} + +// GetMessage returns the Message field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ActiveHealthCheckReportsSummary200Response) GetMessage() string { + if o == nil || IsNil(o.Message.Get()) { + var ret string + return ret + } + return *o.Message.Get() +} + +// GetMessageOk returns a tuple with the Message 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 *ActiveHealthCheckReportsSummary200Response) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Message.Get(), o.Message.IsSet() +} + +// HasMessage returns a boolean if a field has been set. +func (o *ActiveHealthCheckReportsSummary200Response) HasMessage() bool { + if o != nil && o.Message.IsSet() { + return true + } + + return false +} + +// SetMessage gets a reference to the given NullableString and assigns it to the Message field. +func (o *ActiveHealthCheckReportsSummary200Response) SetMessage(v string) { + o.Message.Set(&v) +} +// SetMessageNil sets the value for Message to be an explicit nil +func (o *ActiveHealthCheckReportsSummary200Response) SetMessageNil() { + o.Message.Set(nil) +} + +// UnsetMessage ensures that no value is present for Message, not even an explicit nil +func (o *ActiveHealthCheckReportsSummary200Response) UnsetMessage() { + o.Message.Unset() +} + +func (o ActiveHealthCheckReportsSummary200Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ActiveHealthCheckReportsSummary200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + if o.Message.IsSet() { + toSerialize["message"] = o.Message.Get() + } + return toSerialize, nil +} + +type NullableActiveHealthCheckReportsSummary200Response struct { + value *ActiveHealthCheckReportsSummary200Response + isSet bool +} + +func (v NullableActiveHealthCheckReportsSummary200Response) Get() *ActiveHealthCheckReportsSummary200Response { + return v.value +} + +func (v *NullableActiveHealthCheckReportsSummary200Response) Set(val *ActiveHealthCheckReportsSummary200Response) { + v.value = val + v.isSet = true +} + +func (v NullableActiveHealthCheckReportsSummary200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableActiveHealthCheckReportsSummary200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableActiveHealthCheckReportsSummary200Response(val *ActiveHealthCheckReportsSummary200Response) *NullableActiveHealthCheckReportsSummary200Response { + return &NullableActiveHealthCheckReportsSummary200Response{value: val, isSet: true} +} + +func (v NullableActiveHealthCheckReportsSummary200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableActiveHealthCheckReportsSummary200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_aname_record.go b/model_aname_record.go new file mode 100644 index 0000000..ff558b3 --- /dev/null +++ b/model_aname_record.go @@ -0,0 +1,520 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" + "time" +) + +// checks if the ANAMERecord type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ANAMERecord{} + +// ANAMERecord struct for ANAMERecord +type ANAMERecord struct { + Value *ANAMERecordValue `json:"value,omitempty"` + Type *string `json:"type,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Ttl *int32 `json:"ttl,omitempty"` + Cloud *bool `json:"cloud,omitempty"` + UpstreamHttps *string `json:"upstream_https,omitempty"` + IpFilterMode *DnsRecordIpFilterMode `json:"ip_filter_mode,omitempty"` + // Protected records cannot be modified or deleted by user. + IsProtected *bool `json:"is_protected,omitempty"` + Usage []string `json:"usage,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty"` + UpdatedAt *time.Time `json:"updated_at,omitempty"` +} + +// NewANAMERecord instantiates a new ANAMERecord object +// This constructor will assign default values to properties that have it defined, +// 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 NewANAMERecord() *ANAMERecord { + this := ANAMERecord{} + var cloud bool = false + this.Cloud = &cloud + return &this +} + +// NewANAMERecordWithDefaults instantiates a new ANAMERecord object +// This 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 NewANAMERecordWithDefaults() *ANAMERecord { + this := ANAMERecord{} + var type_ string = "aname" + this.Type = &type_ + var cloud bool = false + this.Cloud = &cloud + return &this +} + +// GetValue returns the Value field value if set, zero value otherwise. +func (o *ANAMERecord) GetValue() ANAMERecordValue { + if o == nil || IsNil(o.Value) { + var ret ANAMERecordValue + return ret + } + return *o.Value +} + +// GetValueOk returns a tuple with the Value field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ANAMERecord) GetValueOk() (*ANAMERecordValue, bool) { + if o == nil || IsNil(o.Value) { + return nil, false + } + return o.Value, true +} + +// HasValue returns a boolean if a field has been set. +func (o *ANAMERecord) HasValue() bool { + if o != nil && !IsNil(o.Value) { + return true + } + + return false +} + +// SetValue gets a reference to the given ANAMERecordValue and assigns it to the Value field. +func (o *ANAMERecord) SetValue(v ANAMERecordValue) { + o.Value = &v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *ANAMERecord) 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 *ANAMERecord) 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 *ANAMERecord) 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 *ANAMERecord) SetType(v string) { + o.Type = &v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *ANAMERecord) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ANAMERecord) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *ANAMERecord) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *ANAMERecord) SetId(v string) { + o.Id = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *ANAMERecord) 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 *ANAMERecord) 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 *ANAMERecord) 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 *ANAMERecord) SetName(v string) { + o.Name = &v +} + +// GetTtl returns the Ttl field value if set, zero value otherwise. +func (o *ANAMERecord) GetTtl() int32 { + if o == nil || IsNil(o.Ttl) { + var ret int32 + return ret + } + return *o.Ttl +} + +// GetTtlOk returns a tuple with the Ttl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ANAMERecord) GetTtlOk() (*int32, bool) { + if o == nil || IsNil(o.Ttl) { + return nil, false + } + return o.Ttl, true +} + +// HasTtl returns a boolean if a field has been set. +func (o *ANAMERecord) HasTtl() bool { + if o != nil && !IsNil(o.Ttl) { + return true + } + + return false +} + +// SetTtl gets a reference to the given int32 and assigns it to the Ttl field. +func (o *ANAMERecord) SetTtl(v int32) { + o.Ttl = &v +} + +// GetCloud returns the Cloud field value if set, zero value otherwise. +func (o *ANAMERecord) GetCloud() bool { + if o == nil || IsNil(o.Cloud) { + var ret bool + return ret + } + return *o.Cloud +} + +// GetCloudOk returns a tuple with the Cloud field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ANAMERecord) GetCloudOk() (*bool, bool) { + if o == nil || IsNil(o.Cloud) { + return nil, false + } + return o.Cloud, true +} + +// HasCloud returns a boolean if a field has been set. +func (o *ANAMERecord) HasCloud() bool { + if o != nil && !IsNil(o.Cloud) { + return true + } + + return false +} + +// SetCloud gets a reference to the given bool and assigns it to the Cloud field. +func (o *ANAMERecord) SetCloud(v bool) { + o.Cloud = &v +} + +// GetUpstreamHttps returns the UpstreamHttps field value if set, zero value otherwise. +func (o *ANAMERecord) GetUpstreamHttps() string { + if o == nil || IsNil(o.UpstreamHttps) { + var ret string + return ret + } + return *o.UpstreamHttps +} + +// GetUpstreamHttpsOk returns a tuple with the UpstreamHttps field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ANAMERecord) GetUpstreamHttpsOk() (*string, bool) { + if o == nil || IsNil(o.UpstreamHttps) { + return nil, false + } + return o.UpstreamHttps, true +} + +// HasUpstreamHttps returns a boolean if a field has been set. +func (o *ANAMERecord) HasUpstreamHttps() bool { + if o != nil && !IsNil(o.UpstreamHttps) { + return true + } + + return false +} + +// SetUpstreamHttps gets a reference to the given string and assigns it to the UpstreamHttps field. +func (o *ANAMERecord) SetUpstreamHttps(v string) { + o.UpstreamHttps = &v +} + +// GetIpFilterMode returns the IpFilterMode field value if set, zero value otherwise. +func (o *ANAMERecord) GetIpFilterMode() DnsRecordIpFilterMode { + if o == nil || IsNil(o.IpFilterMode) { + var ret DnsRecordIpFilterMode + return ret + } + return *o.IpFilterMode +} + +// GetIpFilterModeOk returns a tuple with the IpFilterMode field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ANAMERecord) GetIpFilterModeOk() (*DnsRecordIpFilterMode, bool) { + if o == nil || IsNil(o.IpFilterMode) { + return nil, false + } + return o.IpFilterMode, true +} + +// HasIpFilterMode returns a boolean if a field has been set. +func (o *ANAMERecord) HasIpFilterMode() bool { + if o != nil && !IsNil(o.IpFilterMode) { + return true + } + + return false +} + +// SetIpFilterMode gets a reference to the given DnsRecordIpFilterMode and assigns it to the IpFilterMode field. +func (o *ANAMERecord) SetIpFilterMode(v DnsRecordIpFilterMode) { + o.IpFilterMode = &v +} + +// GetIsProtected returns the IsProtected field value if set, zero value otherwise. +func (o *ANAMERecord) GetIsProtected() bool { + if o == nil || IsNil(o.IsProtected) { + var ret bool + return ret + } + return *o.IsProtected +} + +// GetIsProtectedOk returns a tuple with the IsProtected field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ANAMERecord) GetIsProtectedOk() (*bool, bool) { + if o == nil || IsNil(o.IsProtected) { + return nil, false + } + return o.IsProtected, true +} + +// HasIsProtected returns a boolean if a field has been set. +func (o *ANAMERecord) HasIsProtected() bool { + if o != nil && !IsNil(o.IsProtected) { + return true + } + + return false +} + +// SetIsProtected gets a reference to the given bool and assigns it to the IsProtected field. +func (o *ANAMERecord) SetIsProtected(v bool) { + o.IsProtected = &v +} + +// GetUsage returns the Usage field value if set, zero value otherwise. +func (o *ANAMERecord) GetUsage() []string { + if o == nil || IsNil(o.Usage) { + var ret []string + return ret + } + return o.Usage +} + +// GetUsageOk returns a tuple with the Usage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ANAMERecord) GetUsageOk() ([]string, bool) { + if o == nil || IsNil(o.Usage) { + return nil, false + } + return o.Usage, true +} + +// HasUsage returns a boolean if a field has been set. +func (o *ANAMERecord) HasUsage() bool { + if o != nil && !IsNil(o.Usage) { + return true + } + + return false +} + +// SetUsage gets a reference to the given []string and assigns it to the Usage field. +func (o *ANAMERecord) SetUsage(v []string) { + o.Usage = v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *ANAMERecord) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ANAMERecord) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *ANAMERecord) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *ANAMERecord) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *ANAMERecord) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ANAMERecord) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *ANAMERecord) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *ANAMERecord) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +func (o ANAMERecord) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ANAMERecord) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Value) { + toSerialize["value"] = o.Value + } + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + // skip: id is readOnly + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Ttl) { + toSerialize["ttl"] = o.Ttl + } + if !IsNil(o.Cloud) { + toSerialize["cloud"] = o.Cloud + } + if !IsNil(o.UpstreamHttps) { + toSerialize["upstream_https"] = o.UpstreamHttps + } + if !IsNil(o.IpFilterMode) { + toSerialize["ip_filter_mode"] = o.IpFilterMode + } + // skip: is_protected is readOnly + // skip: usage is readOnly + // skip: created_at is readOnly + // skip: updated_at is readOnly + return toSerialize, nil +} + +type NullableANAMERecord struct { + value *ANAMERecord + isSet bool +} + +func (v NullableANAMERecord) Get() *ANAMERecord { + return v.value +} + +func (v *NullableANAMERecord) Set(val *ANAMERecord) { + v.value = val + v.isSet = true +} + +func (v NullableANAMERecord) IsSet() bool { + return v.isSet +} + +func (v *NullableANAMERecord) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableANAMERecord(val *ANAMERecord) *NullableANAMERecord { + return &NullableANAMERecord{value: val, isSet: true} +} + +func (v NullableANAMERecord) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableANAMERecord) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_aname_record_value.go b/model_aname_record_value.go new file mode 100644 index 0000000..0cafe9c --- /dev/null +++ b/model_aname_record_value.go @@ -0,0 +1,193 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the ANAMERecordValue type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ANAMERecordValue{} + +// ANAMERecordValue struct for ANAMERecordValue +type ANAMERecordValue struct { + // A fully-qualified domain name (FQDN) + Location string `json:"location"` + HostHeader NullableString `json:"host_header"` + Port NullableInt32 `json:"port,omitempty"` +} + +// NewANAMERecordValue instantiates a new ANAMERecordValue object +// This constructor will assign default values to properties that have it defined, +// 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 NewANAMERecordValue(location string, hostHeader NullableString) *ANAMERecordValue { + this := ANAMERecordValue{} + this.Location = location + this.HostHeader = hostHeader + return &this +} + +// NewANAMERecordValueWithDefaults instantiates a new ANAMERecordValue object +// This 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 NewANAMERecordValueWithDefaults() *ANAMERecordValue { + this := ANAMERecordValue{} + return &this +} + +// GetLocation returns the Location field value +func (o *ANAMERecordValue) GetLocation() string { + if o == nil { + var ret string + return ret + } + + return o.Location +} + +// GetLocationOk returns a tuple with the Location field value +// and a boolean to check if the value has been set. +func (o *ANAMERecordValue) GetLocationOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Location, true +} + +// SetLocation sets field value +func (o *ANAMERecordValue) SetLocation(v string) { + o.Location = v +} + +// GetHostHeader returns the HostHeader field value +// If the value is explicit nil, the zero value for string will be returned +func (o *ANAMERecordValue) GetHostHeader() string { + if o == nil || o.HostHeader.Get() == nil { + var ret string + return ret + } + + return *o.HostHeader.Get() +} + +// GetHostHeaderOk returns a tuple with the HostHeader 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 *ANAMERecordValue) GetHostHeaderOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.HostHeader.Get(), o.HostHeader.IsSet() +} + +// SetHostHeader sets field value +func (o *ANAMERecordValue) SetHostHeader(v string) { + o.HostHeader.Set(&v) +} + +// GetPort returns the Port field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ANAMERecordValue) GetPort() int32 { + if o == nil || IsNil(o.Port.Get()) { + var ret int32 + return ret + } + return *o.Port.Get() +} + +// GetPortOk returns a tuple with the Port 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 *ANAMERecordValue) GetPortOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.Port.Get(), o.Port.IsSet() +} + +// HasPort returns a boolean if a field has been set. +func (o *ANAMERecordValue) HasPort() bool { + if o != nil && o.Port.IsSet() { + return true + } + + return false +} + +// SetPort gets a reference to the given NullableInt32 and assigns it to the Port field. +func (o *ANAMERecordValue) SetPort(v int32) { + o.Port.Set(&v) +} +// SetPortNil sets the value for Port to be an explicit nil +func (o *ANAMERecordValue) SetPortNil() { + o.Port.Set(nil) +} + +// UnsetPort ensures that no value is present for Port, not even an explicit nil +func (o *ANAMERecordValue) UnsetPort() { + o.Port.Unset() +} + +func (o ANAMERecordValue) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ANAMERecordValue) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["location"] = o.Location + toSerialize["host_header"] = o.HostHeader.Get() + if o.Port.IsSet() { + toSerialize["port"] = o.Port.Get() + } + return toSerialize, nil +} + +type NullableANAMERecordValue struct { + value *ANAMERecordValue + isSet bool +} + +func (v NullableANAMERecordValue) Get() *ANAMERecordValue { + return v.value +} + +func (v *NullableANAMERecordValue) Set(val *ANAMERecordValue) { + v.value = val + v.isSet = true +} + +func (v NullableANAMERecordValue) IsSet() bool { + return v.isSet +} + +func (v *NullableANAMERecordValue) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableANAMERecordValue(val *ANAMERecordValue) *NullableANAMERecordValue { + return &NullableANAMERecordValue{value: val, isSet: true} +} + +func (v NullableANAMERecordValue) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableANAMERecordValue) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_application_category.go b/model_application_category.go new file mode 100644 index 0000000..8650f70 --- /dev/null +++ b/model_application_category.go @@ -0,0 +1,316 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the ApplicationCategory type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ApplicationCategory{} + +// ApplicationCategory struct for ApplicationCategory +type ApplicationCategory struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Active *bool `json:"active,omitempty"` + Order *int32 `json:"order,omitempty"` + NameTranslation NullableApplicationCategoryNameTranslation `json:"name_translation,omitempty"` + Applications []ApplicationCategoryApplicationsInner `json:"applications,omitempty"` +} + +// NewApplicationCategory instantiates a new ApplicationCategory object +// This constructor will assign default values to properties that have it defined, +// 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 NewApplicationCategory() *ApplicationCategory { + this := ApplicationCategory{} + return &this +} + +// NewApplicationCategoryWithDefaults instantiates a new ApplicationCategory object +// This 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 NewApplicationCategoryWithDefaults() *ApplicationCategory { + this := ApplicationCategory{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *ApplicationCategory) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApplicationCategory) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *ApplicationCategory) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *ApplicationCategory) SetId(v string) { + o.Id = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *ApplicationCategory) 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 *ApplicationCategory) 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 *ApplicationCategory) 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 *ApplicationCategory) SetName(v string) { + o.Name = &v +} + +// GetActive returns the Active field value if set, zero value otherwise. +func (o *ApplicationCategory) GetActive() bool { + if o == nil || IsNil(o.Active) { + var ret bool + return ret + } + return *o.Active +} + +// GetActiveOk returns a tuple with the Active field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApplicationCategory) GetActiveOk() (*bool, bool) { + if o == nil || IsNil(o.Active) { + return nil, false + } + return o.Active, true +} + +// HasActive returns a boolean if a field has been set. +func (o *ApplicationCategory) HasActive() bool { + if o != nil && !IsNil(o.Active) { + return true + } + + return false +} + +// SetActive gets a reference to the given bool and assigns it to the Active field. +func (o *ApplicationCategory) SetActive(v bool) { + o.Active = &v +} + +// GetOrder returns the Order field value if set, zero value otherwise. +func (o *ApplicationCategory) GetOrder() int32 { + if o == nil || IsNil(o.Order) { + var ret int32 + return ret + } + return *o.Order +} + +// GetOrderOk returns a tuple with the Order field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApplicationCategory) GetOrderOk() (*int32, bool) { + if o == nil || IsNil(o.Order) { + return nil, false + } + return o.Order, true +} + +// HasOrder returns a boolean if a field has been set. +func (o *ApplicationCategory) HasOrder() bool { + if o != nil && !IsNil(o.Order) { + return true + } + + return false +} + +// SetOrder gets a reference to the given int32 and assigns it to the Order field. +func (o *ApplicationCategory) SetOrder(v int32) { + o.Order = &v +} + +// GetNameTranslation returns the NameTranslation field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ApplicationCategory) GetNameTranslation() ApplicationCategoryNameTranslation { + if o == nil || IsNil(o.NameTranslation.Get()) { + var ret ApplicationCategoryNameTranslation + return ret + } + return *o.NameTranslation.Get() +} + +// GetNameTranslationOk returns a tuple with the NameTranslation 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 *ApplicationCategory) GetNameTranslationOk() (*ApplicationCategoryNameTranslation, bool) { + if o == nil { + return nil, false + } + return o.NameTranslation.Get(), o.NameTranslation.IsSet() +} + +// HasNameTranslation returns a boolean if a field has been set. +func (o *ApplicationCategory) HasNameTranslation() bool { + if o != nil && o.NameTranslation.IsSet() { + return true + } + + return false +} + +// SetNameTranslation gets a reference to the given NullableApplicationCategoryNameTranslation and assigns it to the NameTranslation field. +func (o *ApplicationCategory) SetNameTranslation(v ApplicationCategoryNameTranslation) { + o.NameTranslation.Set(&v) +} +// SetNameTranslationNil sets the value for NameTranslation to be an explicit nil +func (o *ApplicationCategory) SetNameTranslationNil() { + o.NameTranslation.Set(nil) +} + +// UnsetNameTranslation ensures that no value is present for NameTranslation, not even an explicit nil +func (o *ApplicationCategory) UnsetNameTranslation() { + o.NameTranslation.Unset() +} + +// GetApplications returns the Applications field value if set, zero value otherwise. +func (o *ApplicationCategory) GetApplications() []ApplicationCategoryApplicationsInner { + if o == nil || IsNil(o.Applications) { + var ret []ApplicationCategoryApplicationsInner + return ret + } + return o.Applications +} + +// GetApplicationsOk returns a tuple with the Applications field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApplicationCategory) GetApplicationsOk() ([]ApplicationCategoryApplicationsInner, bool) { + if o == nil || IsNil(o.Applications) { + return nil, false + } + return o.Applications, true +} + +// HasApplications returns a boolean if a field has been set. +func (o *ApplicationCategory) HasApplications() bool { + if o != nil && !IsNil(o.Applications) { + return true + } + + return false +} + +// SetApplications gets a reference to the given []ApplicationCategoryApplicationsInner and assigns it to the Applications field. +func (o *ApplicationCategory) SetApplications(v []ApplicationCategoryApplicationsInner) { + o.Applications = v +} + +func (o ApplicationCategory) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ApplicationCategory) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Active) { + toSerialize["active"] = o.Active + } + if !IsNil(o.Order) { + toSerialize["order"] = o.Order + } + if o.NameTranslation.IsSet() { + toSerialize["name_translation"] = o.NameTranslation.Get() + } + if !IsNil(o.Applications) { + toSerialize["applications"] = o.Applications + } + return toSerialize, nil +} + +type NullableApplicationCategory struct { + value *ApplicationCategory + isSet bool +} + +func (v NullableApplicationCategory) Get() *ApplicationCategory { + return v.value +} + +func (v *NullableApplicationCategory) Set(val *ApplicationCategory) { + v.value = val + v.isSet = true +} + +func (v NullableApplicationCategory) IsSet() bool { + return v.isSet +} + +func (v *NullableApplicationCategory) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableApplicationCategory(val *ApplicationCategory) *NullableApplicationCategory { + return &NullableApplicationCategory{value: val, isSet: true} +} + +func (v NullableApplicationCategory) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableApplicationCategory) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_application_category_applications_inner.go b/model_application_category_applications_inner.go new file mode 100644 index 0000000..573b301 --- /dev/null +++ b/model_application_category_applications_inner.go @@ -0,0 +1,268 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the ApplicationCategoryApplicationsInner type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ApplicationCategoryApplicationsInner{} + +// ApplicationCategoryApplicationsInner struct for ApplicationCategoryApplicationsInner +type ApplicationCategoryApplicationsInner struct { + Id *string `json:"id,omitempty"` + Slug *string `json:"slug,omitempty"` + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + Logo *string `json:"logo,omitempty"` +} + +// NewApplicationCategoryApplicationsInner instantiates a new ApplicationCategoryApplicationsInner object +// This constructor will assign default values to properties that have it defined, +// 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 NewApplicationCategoryApplicationsInner() *ApplicationCategoryApplicationsInner { + this := ApplicationCategoryApplicationsInner{} + return &this +} + +// NewApplicationCategoryApplicationsInnerWithDefaults instantiates a new ApplicationCategoryApplicationsInner object +// This 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 NewApplicationCategoryApplicationsInnerWithDefaults() *ApplicationCategoryApplicationsInner { + this := ApplicationCategoryApplicationsInner{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *ApplicationCategoryApplicationsInner) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApplicationCategoryApplicationsInner) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *ApplicationCategoryApplicationsInner) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *ApplicationCategoryApplicationsInner) SetId(v string) { + o.Id = &v +} + +// GetSlug returns the Slug field value if set, zero value otherwise. +func (o *ApplicationCategoryApplicationsInner) GetSlug() string { + if o == nil || IsNil(o.Slug) { + var ret string + return ret + } + return *o.Slug +} + +// GetSlugOk returns a tuple with the Slug field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApplicationCategoryApplicationsInner) GetSlugOk() (*string, bool) { + if o == nil || IsNil(o.Slug) { + return nil, false + } + return o.Slug, true +} + +// HasSlug returns a boolean if a field has been set. +func (o *ApplicationCategoryApplicationsInner) HasSlug() bool { + if o != nil && !IsNil(o.Slug) { + return true + } + + return false +} + +// SetSlug gets a reference to the given string and assigns it to the Slug field. +func (o *ApplicationCategoryApplicationsInner) SetSlug(v string) { + o.Slug = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *ApplicationCategoryApplicationsInner) 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 *ApplicationCategoryApplicationsInner) 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 *ApplicationCategoryApplicationsInner) 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 *ApplicationCategoryApplicationsInner) SetName(v string) { + o.Name = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *ApplicationCategoryApplicationsInner) 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 *ApplicationCategoryApplicationsInner) 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 *ApplicationCategoryApplicationsInner) 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 *ApplicationCategoryApplicationsInner) SetDescription(v string) { + o.Description = &v +} + +// GetLogo returns the Logo field value if set, zero value otherwise. +func (o *ApplicationCategoryApplicationsInner) GetLogo() string { + if o == nil || IsNil(o.Logo) { + var ret string + return ret + } + return *o.Logo +} + +// GetLogoOk returns a tuple with the Logo field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApplicationCategoryApplicationsInner) GetLogoOk() (*string, bool) { + if o == nil || IsNil(o.Logo) { + return nil, false + } + return o.Logo, true +} + +// HasLogo returns a boolean if a field has been set. +func (o *ApplicationCategoryApplicationsInner) HasLogo() bool { + if o != nil && !IsNil(o.Logo) { + return true + } + + return false +} + +// SetLogo gets a reference to the given string and assigns it to the Logo field. +func (o *ApplicationCategoryApplicationsInner) SetLogo(v string) { + o.Logo = &v +} + +func (o ApplicationCategoryApplicationsInner) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ApplicationCategoryApplicationsInner) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: id is readOnly + if !IsNil(o.Slug) { + toSerialize["slug"] = o.Slug + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.Logo) { + toSerialize["logo"] = o.Logo + } + return toSerialize, nil +} + +type NullableApplicationCategoryApplicationsInner struct { + value *ApplicationCategoryApplicationsInner + isSet bool +} + +func (v NullableApplicationCategoryApplicationsInner) Get() *ApplicationCategoryApplicationsInner { + return v.value +} + +func (v *NullableApplicationCategoryApplicationsInner) Set(val *ApplicationCategoryApplicationsInner) { + v.value = val + v.isSet = true +} + +func (v NullableApplicationCategoryApplicationsInner) IsSet() bool { + return v.isSet +} + +func (v *NullableApplicationCategoryApplicationsInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableApplicationCategoryApplicationsInner(val *ApplicationCategoryApplicationsInner) *NullableApplicationCategoryApplicationsInner { + return &NullableApplicationCategoryApplicationsInner{value: val, isSet: true} +} + +func (v NullableApplicationCategoryApplicationsInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableApplicationCategoryApplicationsInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_application_category_name_translation.go b/model_application_category_name_translation.go new file mode 100644 index 0000000..91e1aac --- /dev/null +++ b/model_application_category_name_translation.go @@ -0,0 +1,162 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the ApplicationCategoryNameTranslation type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ApplicationCategoryNameTranslation{} + +// ApplicationCategoryNameTranslation struct for ApplicationCategoryNameTranslation +type ApplicationCategoryNameTranslation struct { + En *ApplicationCategoryNameTranslationEn `json:"en,omitempty"` + Fa *ApplicationCategoryNameTranslationEn `json:"fa,omitempty"` +} + +// NewApplicationCategoryNameTranslation instantiates a new ApplicationCategoryNameTranslation object +// This constructor will assign default values to properties that have it defined, +// 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 NewApplicationCategoryNameTranslation() *ApplicationCategoryNameTranslation { + this := ApplicationCategoryNameTranslation{} + return &this +} + +// NewApplicationCategoryNameTranslationWithDefaults instantiates a new ApplicationCategoryNameTranslation object +// This 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 NewApplicationCategoryNameTranslationWithDefaults() *ApplicationCategoryNameTranslation { + this := ApplicationCategoryNameTranslation{} + return &this +} + +// GetEn returns the En field value if set, zero value otherwise. +func (o *ApplicationCategoryNameTranslation) GetEn() ApplicationCategoryNameTranslationEn { + if o == nil || IsNil(o.En) { + var ret ApplicationCategoryNameTranslationEn + return ret + } + return *o.En +} + +// GetEnOk returns a tuple with the En field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApplicationCategoryNameTranslation) GetEnOk() (*ApplicationCategoryNameTranslationEn, bool) { + if o == nil || IsNil(o.En) { + return nil, false + } + return o.En, true +} + +// HasEn returns a boolean if a field has been set. +func (o *ApplicationCategoryNameTranslation) HasEn() bool { + if o != nil && !IsNil(o.En) { + return true + } + + return false +} + +// SetEn gets a reference to the given ApplicationCategoryNameTranslationEn and assigns it to the En field. +func (o *ApplicationCategoryNameTranslation) SetEn(v ApplicationCategoryNameTranslationEn) { + o.En = &v +} + +// GetFa returns the Fa field value if set, zero value otherwise. +func (o *ApplicationCategoryNameTranslation) GetFa() ApplicationCategoryNameTranslationEn { + if o == nil || IsNil(o.Fa) { + var ret ApplicationCategoryNameTranslationEn + return ret + } + return *o.Fa +} + +// GetFaOk returns a tuple with the Fa field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApplicationCategoryNameTranslation) GetFaOk() (*ApplicationCategoryNameTranslationEn, bool) { + if o == nil || IsNil(o.Fa) { + return nil, false + } + return o.Fa, true +} + +// HasFa returns a boolean if a field has been set. +func (o *ApplicationCategoryNameTranslation) HasFa() bool { + if o != nil && !IsNil(o.Fa) { + return true + } + + return false +} + +// SetFa gets a reference to the given ApplicationCategoryNameTranslationEn and assigns it to the Fa field. +func (o *ApplicationCategoryNameTranslation) SetFa(v ApplicationCategoryNameTranslationEn) { + o.Fa = &v +} + +func (o ApplicationCategoryNameTranslation) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ApplicationCategoryNameTranslation) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.En) { + toSerialize["en"] = o.En + } + if !IsNil(o.Fa) { + toSerialize["fa"] = o.Fa + } + return toSerialize, nil +} + +type NullableApplicationCategoryNameTranslation struct { + value *ApplicationCategoryNameTranslation + isSet bool +} + +func (v NullableApplicationCategoryNameTranslation) Get() *ApplicationCategoryNameTranslation { + return v.value +} + +func (v *NullableApplicationCategoryNameTranslation) Set(val *ApplicationCategoryNameTranslation) { + v.value = val + v.isSet = true +} + +func (v NullableApplicationCategoryNameTranslation) IsSet() bool { + return v.isSet +} + +func (v *NullableApplicationCategoryNameTranslation) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableApplicationCategoryNameTranslation(val *ApplicationCategoryNameTranslation) *NullableApplicationCategoryNameTranslation { + return &NullableApplicationCategoryNameTranslation{value: val, isSet: true} +} + +func (v NullableApplicationCategoryNameTranslation) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableApplicationCategoryNameTranslation) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_application_category_name_translation_en.go b/model_application_category_name_translation_en.go new file mode 100644 index 0000000..c0f8989 --- /dev/null +++ b/model_application_category_name_translation_en.go @@ -0,0 +1,126 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the ApplicationCategoryNameTranslationEn type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ApplicationCategoryNameTranslationEn{} + +// ApplicationCategoryNameTranslationEn struct for ApplicationCategoryNameTranslationEn +type ApplicationCategoryNameTranslationEn struct { + Name *string `json:"name,omitempty"` +} + +// NewApplicationCategoryNameTranslationEn instantiates a new ApplicationCategoryNameTranslationEn object +// This constructor will assign default values to properties that have it defined, +// 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 NewApplicationCategoryNameTranslationEn() *ApplicationCategoryNameTranslationEn { + this := ApplicationCategoryNameTranslationEn{} + return &this +} + +// NewApplicationCategoryNameTranslationEnWithDefaults instantiates a new ApplicationCategoryNameTranslationEn object +// This 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 NewApplicationCategoryNameTranslationEnWithDefaults() *ApplicationCategoryNameTranslationEn { + this := ApplicationCategoryNameTranslationEn{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *ApplicationCategoryNameTranslationEn) 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 *ApplicationCategoryNameTranslationEn) 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 *ApplicationCategoryNameTranslationEn) 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 *ApplicationCategoryNameTranslationEn) SetName(v string) { + o.Name = &v +} + +func (o ApplicationCategoryNameTranslationEn) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ApplicationCategoryNameTranslationEn) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + return toSerialize, nil +} + +type NullableApplicationCategoryNameTranslationEn struct { + value *ApplicationCategoryNameTranslationEn + isSet bool +} + +func (v NullableApplicationCategoryNameTranslationEn) Get() *ApplicationCategoryNameTranslationEn { + return v.value +} + +func (v *NullableApplicationCategoryNameTranslationEn) Set(val *ApplicationCategoryNameTranslationEn) { + v.value = val + v.isSet = true +} + +func (v NullableApplicationCategoryNameTranslationEn) IsSet() bool { + return v.isSet +} + +func (v *NullableApplicationCategoryNameTranslationEn) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableApplicationCategoryNameTranslationEn(val *ApplicationCategoryNameTranslationEn) *NullableApplicationCategoryNameTranslationEn { + return &NullableApplicationCategoryNameTranslationEn{value: val, isSet: true} +} + +func (v NullableApplicationCategoryNameTranslationEn) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableApplicationCategoryNameTranslationEn) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_apps_category_index_200_response.go b/model_apps_category_index_200_response.go new file mode 100644 index 0000000..3991af3 --- /dev/null +++ b/model_apps_category_index_200_response.go @@ -0,0 +1,198 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the AppsCategoryIndex200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AppsCategoryIndex200Response{} + +// AppsCategoryIndex200Response struct for AppsCategoryIndex200Response +type AppsCategoryIndex200Response struct { + Data []ApplicationCategory `json:"data,omitempty"` + Links *PaginatedResponseLinks `json:"links,omitempty"` + Meta *PaginatedResponseMeta `json:"meta,omitempty"` +} + +// NewAppsCategoryIndex200Response instantiates a new AppsCategoryIndex200Response object +// This constructor will assign default values to properties that have it defined, +// 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 NewAppsCategoryIndex200Response() *AppsCategoryIndex200Response { + this := AppsCategoryIndex200Response{} + return &this +} + +// NewAppsCategoryIndex200ResponseWithDefaults instantiates a new AppsCategoryIndex200Response object +// This 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 NewAppsCategoryIndex200ResponseWithDefaults() *AppsCategoryIndex200Response { + this := AppsCategoryIndex200Response{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *AppsCategoryIndex200Response) GetData() []ApplicationCategory { + if o == nil || IsNil(o.Data) { + var ret []ApplicationCategory + return ret + } + return o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AppsCategoryIndex200Response) GetDataOk() ([]ApplicationCategory, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *AppsCategoryIndex200Response) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given []ApplicationCategory and assigns it to the Data field. +func (o *AppsCategoryIndex200Response) SetData(v []ApplicationCategory) { + o.Data = v +} + +// GetLinks returns the Links field value if set, zero value otherwise. +func (o *AppsCategoryIndex200Response) GetLinks() PaginatedResponseLinks { + if o == nil || IsNil(o.Links) { + var ret PaginatedResponseLinks + return ret + } + return *o.Links +} + +// GetLinksOk returns a tuple with the Links field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AppsCategoryIndex200Response) GetLinksOk() (*PaginatedResponseLinks, bool) { + if o == nil || IsNil(o.Links) { + return nil, false + } + return o.Links, true +} + +// HasLinks returns a boolean if a field has been set. +func (o *AppsCategoryIndex200Response) HasLinks() bool { + if o != nil && !IsNil(o.Links) { + return true + } + + return false +} + +// SetLinks gets a reference to the given PaginatedResponseLinks and assigns it to the Links field. +func (o *AppsCategoryIndex200Response) SetLinks(v PaginatedResponseLinks) { + o.Links = &v +} + +// GetMeta returns the Meta field value if set, zero value otherwise. +func (o *AppsCategoryIndex200Response) GetMeta() PaginatedResponseMeta { + if o == nil || IsNil(o.Meta) { + var ret PaginatedResponseMeta + return ret + } + return *o.Meta +} + +// GetMetaOk returns a tuple with the Meta field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AppsCategoryIndex200Response) GetMetaOk() (*PaginatedResponseMeta, bool) { + if o == nil || IsNil(o.Meta) { + return nil, false + } + return o.Meta, true +} + +// HasMeta returns a boolean if a field has been set. +func (o *AppsCategoryIndex200Response) HasMeta() bool { + if o != nil && !IsNil(o.Meta) { + return true + } + + return false +} + +// SetMeta gets a reference to the given PaginatedResponseMeta and assigns it to the Meta field. +func (o *AppsCategoryIndex200Response) SetMeta(v PaginatedResponseMeta) { + o.Meta = &v +} + +func (o AppsCategoryIndex200Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AppsCategoryIndex200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + if !IsNil(o.Links) { + toSerialize["links"] = o.Links + } + if !IsNil(o.Meta) { + toSerialize["meta"] = o.Meta + } + return toSerialize, nil +} + +type NullableAppsCategoryIndex200Response struct { + value *AppsCategoryIndex200Response + isSet bool +} + +func (v NullableAppsCategoryIndex200Response) Get() *AppsCategoryIndex200Response { + return v.value +} + +func (v *NullableAppsCategoryIndex200Response) Set(val *AppsCategoryIndex200Response) { + v.value = val + v.isSet = true +} + +func (v NullableAppsCategoryIndex200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableAppsCategoryIndex200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAppsCategoryIndex200Response(val *AppsCategoryIndex200Response) *NullableAppsCategoryIndex200Response { + return &NullableAppsCategoryIndex200Response{value: val, isSet: true} +} + +func (v NullableAppsCategoryIndex200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAppsCategoryIndex200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_apps_category_show_200_response.go b/model_apps_category_show_200_response.go new file mode 100644 index 0000000..d4817a7 --- /dev/null +++ b/model_apps_category_show_200_response.go @@ -0,0 +1,172 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the AppsCategoryShow200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AppsCategoryShow200Response{} + +// AppsCategoryShow200Response struct for AppsCategoryShow200Response +type AppsCategoryShow200Response struct { + Data *ApplicationCategory `json:"data,omitempty"` + Message NullableString `json:"message,omitempty"` +} + +// NewAppsCategoryShow200Response instantiates a new AppsCategoryShow200Response object +// This constructor will assign default values to properties that have it defined, +// 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 NewAppsCategoryShow200Response() *AppsCategoryShow200Response { + this := AppsCategoryShow200Response{} + return &this +} + +// NewAppsCategoryShow200ResponseWithDefaults instantiates a new AppsCategoryShow200Response object +// This 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 NewAppsCategoryShow200ResponseWithDefaults() *AppsCategoryShow200Response { + this := AppsCategoryShow200Response{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *AppsCategoryShow200Response) GetData() ApplicationCategory { + if o == nil || IsNil(o.Data) { + var ret ApplicationCategory + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AppsCategoryShow200Response) GetDataOk() (*ApplicationCategory, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *AppsCategoryShow200Response) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given ApplicationCategory and assigns it to the Data field. +func (o *AppsCategoryShow200Response) SetData(v ApplicationCategory) { + o.Data = &v +} + +// GetMessage returns the Message field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AppsCategoryShow200Response) GetMessage() string { + if o == nil || IsNil(o.Message.Get()) { + var ret string + return ret + } + return *o.Message.Get() +} + +// GetMessageOk returns a tuple with the Message 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 *AppsCategoryShow200Response) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Message.Get(), o.Message.IsSet() +} + +// HasMessage returns a boolean if a field has been set. +func (o *AppsCategoryShow200Response) HasMessage() bool { + if o != nil && o.Message.IsSet() { + return true + } + + return false +} + +// SetMessage gets a reference to the given NullableString and assigns it to the Message field. +func (o *AppsCategoryShow200Response) SetMessage(v string) { + o.Message.Set(&v) +} +// SetMessageNil sets the value for Message to be an explicit nil +func (o *AppsCategoryShow200Response) SetMessageNil() { + o.Message.Set(nil) +} + +// UnsetMessage ensures that no value is present for Message, not even an explicit nil +func (o *AppsCategoryShow200Response) UnsetMessage() { + o.Message.Unset() +} + +func (o AppsCategoryShow200Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AppsCategoryShow200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + if o.Message.IsSet() { + toSerialize["message"] = o.Message.Get() + } + return toSerialize, nil +} + +type NullableAppsCategoryShow200Response struct { + value *AppsCategoryShow200Response + isSet bool +} + +func (v NullableAppsCategoryShow200Response) Get() *AppsCategoryShow200Response { + return v.value +} + +func (v *NullableAppsCategoryShow200Response) Set(val *AppsCategoryShow200Response) { + v.value = val + v.isSet = true +} + +func (v NullableAppsCategoryShow200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableAppsCategoryShow200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAppsCategoryShow200Response(val *AppsCategoryShow200Response) *NullableAppsCategoryShow200Response { + return &NullableAppsCategoryShow200Response{value: val, isSet: true} +} + +func (v NullableAppsCategoryShow200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAppsCategoryShow200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_apps_index_200_response.go b/model_apps_index_200_response.go new file mode 100644 index 0000000..634d48d --- /dev/null +++ b/model_apps_index_200_response.go @@ -0,0 +1,198 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the AppsIndex200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AppsIndex200Response{} + +// AppsIndex200Response struct for AppsIndex200Response +type AppsIndex200Response struct { + Data []CdnApp `json:"data,omitempty"` + Links *PaginatedResponseLinks `json:"links,omitempty"` + Meta *PaginatedResponseMeta `json:"meta,omitempty"` +} + +// NewAppsIndex200Response instantiates a new AppsIndex200Response object +// This constructor will assign default values to properties that have it defined, +// 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 NewAppsIndex200Response() *AppsIndex200Response { + this := AppsIndex200Response{} + return &this +} + +// NewAppsIndex200ResponseWithDefaults instantiates a new AppsIndex200Response object +// This 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 NewAppsIndex200ResponseWithDefaults() *AppsIndex200Response { + this := AppsIndex200Response{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *AppsIndex200Response) GetData() []CdnApp { + if o == nil || IsNil(o.Data) { + var ret []CdnApp + return ret + } + return o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AppsIndex200Response) GetDataOk() ([]CdnApp, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *AppsIndex200Response) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given []CdnApp and assigns it to the Data field. +func (o *AppsIndex200Response) SetData(v []CdnApp) { + o.Data = v +} + +// GetLinks returns the Links field value if set, zero value otherwise. +func (o *AppsIndex200Response) GetLinks() PaginatedResponseLinks { + if o == nil || IsNil(o.Links) { + var ret PaginatedResponseLinks + return ret + } + return *o.Links +} + +// GetLinksOk returns a tuple with the Links field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AppsIndex200Response) GetLinksOk() (*PaginatedResponseLinks, bool) { + if o == nil || IsNil(o.Links) { + return nil, false + } + return o.Links, true +} + +// HasLinks returns a boolean if a field has been set. +func (o *AppsIndex200Response) HasLinks() bool { + if o != nil && !IsNil(o.Links) { + return true + } + + return false +} + +// SetLinks gets a reference to the given PaginatedResponseLinks and assigns it to the Links field. +func (o *AppsIndex200Response) SetLinks(v PaginatedResponseLinks) { + o.Links = &v +} + +// GetMeta returns the Meta field value if set, zero value otherwise. +func (o *AppsIndex200Response) GetMeta() PaginatedResponseMeta { + if o == nil || IsNil(o.Meta) { + var ret PaginatedResponseMeta + return ret + } + return *o.Meta +} + +// GetMetaOk returns a tuple with the Meta field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AppsIndex200Response) GetMetaOk() (*PaginatedResponseMeta, bool) { + if o == nil || IsNil(o.Meta) { + return nil, false + } + return o.Meta, true +} + +// HasMeta returns a boolean if a field has been set. +func (o *AppsIndex200Response) HasMeta() bool { + if o != nil && !IsNil(o.Meta) { + return true + } + + return false +} + +// SetMeta gets a reference to the given PaginatedResponseMeta and assigns it to the Meta field. +func (o *AppsIndex200Response) SetMeta(v PaginatedResponseMeta) { + o.Meta = &v +} + +func (o AppsIndex200Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AppsIndex200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + if !IsNil(o.Links) { + toSerialize["links"] = o.Links + } + if !IsNil(o.Meta) { + toSerialize["meta"] = o.Meta + } + return toSerialize, nil +} + +type NullableAppsIndex200Response struct { + value *AppsIndex200Response + isSet bool +} + +func (v NullableAppsIndex200Response) Get() *AppsIndex200Response { + return v.value +} + +func (v *NullableAppsIndex200Response) Set(val *AppsIndex200Response) { + v.value = val + v.isSet = true +} + +func (v NullableAppsIndex200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableAppsIndex200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAppsIndex200Response(val *AppsIndex200Response) *NullableAppsIndex200Response { + return &NullableAppsIndex200Response{value: val, isSet: true} +} + +func (v NullableAppsIndex200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAppsIndex200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_attack_report.go b/model_attack_report.go new file mode 100644 index 0000000..5f2bfc5 --- /dev/null +++ b/model_attack_report.go @@ -0,0 +1,162 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the AttackReport type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AttackReport{} + +// AttackReport struct for AttackReport +type AttackReport struct { + Statistics *AttackReportStatistics `json:"statistics,omitempty"` + Charts *AttackReportCharts `json:"charts,omitempty"` +} + +// NewAttackReport instantiates a new AttackReport object +// This constructor will assign default values to properties that have it defined, +// 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 NewAttackReport() *AttackReport { + this := AttackReport{} + return &this +} + +// NewAttackReportWithDefaults instantiates a new AttackReport object +// This 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 NewAttackReportWithDefaults() *AttackReport { + this := AttackReport{} + return &this +} + +// GetStatistics returns the Statistics field value if set, zero value otherwise. +func (o *AttackReport) GetStatistics() AttackReportStatistics { + if o == nil || IsNil(o.Statistics) { + var ret AttackReportStatistics + return ret + } + return *o.Statistics +} + +// GetStatisticsOk returns a tuple with the Statistics field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AttackReport) GetStatisticsOk() (*AttackReportStatistics, bool) { + if o == nil || IsNil(o.Statistics) { + return nil, false + } + return o.Statistics, true +} + +// HasStatistics returns a boolean if a field has been set. +func (o *AttackReport) HasStatistics() bool { + if o != nil && !IsNil(o.Statistics) { + return true + } + + return false +} + +// SetStatistics gets a reference to the given AttackReportStatistics and assigns it to the Statistics field. +func (o *AttackReport) SetStatistics(v AttackReportStatistics) { + o.Statistics = &v +} + +// GetCharts returns the Charts field value if set, zero value otherwise. +func (o *AttackReport) GetCharts() AttackReportCharts { + if o == nil || IsNil(o.Charts) { + var ret AttackReportCharts + return ret + } + return *o.Charts +} + +// GetChartsOk returns a tuple with the Charts field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AttackReport) GetChartsOk() (*AttackReportCharts, bool) { + if o == nil || IsNil(o.Charts) { + return nil, false + } + return o.Charts, true +} + +// HasCharts returns a boolean if a field has been set. +func (o *AttackReport) HasCharts() bool { + if o != nil && !IsNil(o.Charts) { + return true + } + + return false +} + +// SetCharts gets a reference to the given AttackReportCharts and assigns it to the Charts field. +func (o *AttackReport) SetCharts(v AttackReportCharts) { + o.Charts = &v +} + +func (o AttackReport) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AttackReport) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Statistics) { + toSerialize["statistics"] = o.Statistics + } + if !IsNil(o.Charts) { + toSerialize["charts"] = o.Charts + } + return toSerialize, nil +} + +type NullableAttackReport struct { + value *AttackReport + isSet bool +} + +func (v NullableAttackReport) Get() *AttackReport { + return v.value +} + +func (v *NullableAttackReport) Set(val *AttackReport) { + v.value = val + v.isSet = true +} + +func (v NullableAttackReport) IsSet() bool { + return v.isSet +} + +func (v *NullableAttackReport) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAttackReport(val *AttackReport) *NullableAttackReport { + return &NullableAttackReport{value: val, isSet: true} +} + +func (v NullableAttackReport) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAttackReport) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_attack_report_charts.go b/model_attack_report_charts.go new file mode 100644 index 0000000..56c5f31 --- /dev/null +++ b/model_attack_report_charts.go @@ -0,0 +1,126 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the AttackReportCharts type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AttackReportCharts{} + +// AttackReportCharts struct for AttackReportCharts +type AttackReportCharts struct { + Attacks *AttackReportChartsAttacks `json:"attacks,omitempty"` +} + +// NewAttackReportCharts instantiates a new AttackReportCharts object +// This constructor will assign default values to properties that have it defined, +// 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 NewAttackReportCharts() *AttackReportCharts { + this := AttackReportCharts{} + return &this +} + +// NewAttackReportChartsWithDefaults instantiates a new AttackReportCharts object +// This 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 NewAttackReportChartsWithDefaults() *AttackReportCharts { + this := AttackReportCharts{} + return &this +} + +// GetAttacks returns the Attacks field value if set, zero value otherwise. +func (o *AttackReportCharts) GetAttacks() AttackReportChartsAttacks { + if o == nil || IsNil(o.Attacks) { + var ret AttackReportChartsAttacks + return ret + } + return *o.Attacks +} + +// GetAttacksOk returns a tuple with the Attacks field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AttackReportCharts) GetAttacksOk() (*AttackReportChartsAttacks, bool) { + if o == nil || IsNil(o.Attacks) { + return nil, false + } + return o.Attacks, true +} + +// HasAttacks returns a boolean if a field has been set. +func (o *AttackReportCharts) HasAttacks() bool { + if o != nil && !IsNil(o.Attacks) { + return true + } + + return false +} + +// SetAttacks gets a reference to the given AttackReportChartsAttacks and assigns it to the Attacks field. +func (o *AttackReportCharts) SetAttacks(v AttackReportChartsAttacks) { + o.Attacks = &v +} + +func (o AttackReportCharts) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AttackReportCharts) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Attacks) { + toSerialize["attacks"] = o.Attacks + } + return toSerialize, nil +} + +type NullableAttackReportCharts struct { + value *AttackReportCharts + isSet bool +} + +func (v NullableAttackReportCharts) Get() *AttackReportCharts { + return v.value +} + +func (v *NullableAttackReportCharts) Set(val *AttackReportCharts) { + v.value = val + v.isSet = true +} + +func (v NullableAttackReportCharts) IsSet() bool { + return v.isSet +} + +func (v *NullableAttackReportCharts) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAttackReportCharts(val *AttackReportCharts) *NullableAttackReportCharts { + return &NullableAttackReportCharts{value: val, isSet: true} +} + +func (v NullableAttackReportCharts) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAttackReportCharts) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_attack_report_charts_attacks.go b/model_attack_report_charts_attacks.go new file mode 100644 index 0000000..db11485 --- /dev/null +++ b/model_attack_report_charts_attacks.go @@ -0,0 +1,199 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" + "time" +) + +// checks if the AttackReportChartsAttacks type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AttackReportChartsAttacks{} + +// AttackReportChartsAttacks struct for AttackReportChartsAttacks +type AttackReportChartsAttacks struct { + Title *string `json:"title,omitempty"` + Categories []time.Time `json:"categories,omitempty"` + Series []AttackReportChartsAttacksSeriesInner `json:"series,omitempty"` +} + +// NewAttackReportChartsAttacks instantiates a new AttackReportChartsAttacks object +// This constructor will assign default values to properties that have it defined, +// 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 NewAttackReportChartsAttacks() *AttackReportChartsAttacks { + this := AttackReportChartsAttacks{} + return &this +} + +// NewAttackReportChartsAttacksWithDefaults instantiates a new AttackReportChartsAttacks object +// This 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 NewAttackReportChartsAttacksWithDefaults() *AttackReportChartsAttacks { + this := AttackReportChartsAttacks{} + return &this +} + +// GetTitle returns the Title field value if set, zero value otherwise. +func (o *AttackReportChartsAttacks) 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 *AttackReportChartsAttacks) 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 *AttackReportChartsAttacks) 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 *AttackReportChartsAttacks) SetTitle(v string) { + o.Title = &v +} + +// GetCategories returns the Categories field value if set, zero value otherwise. +func (o *AttackReportChartsAttacks) GetCategories() []time.Time { + if o == nil || IsNil(o.Categories) { + var ret []time.Time + return ret + } + return o.Categories +} + +// GetCategoriesOk returns a tuple with the Categories field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AttackReportChartsAttacks) GetCategoriesOk() ([]time.Time, bool) { + if o == nil || IsNil(o.Categories) { + return nil, false + } + return o.Categories, true +} + +// HasCategories returns a boolean if a field has been set. +func (o *AttackReportChartsAttacks) HasCategories() bool { + if o != nil && !IsNil(o.Categories) { + return true + } + + return false +} + +// SetCategories gets a reference to the given []time.Time and assigns it to the Categories field. +func (o *AttackReportChartsAttacks) SetCategories(v []time.Time) { + o.Categories = v +} + +// GetSeries returns the Series field value if set, zero value otherwise. +func (o *AttackReportChartsAttacks) GetSeries() []AttackReportChartsAttacksSeriesInner { + if o == nil || IsNil(o.Series) { + var ret []AttackReportChartsAttacksSeriesInner + return ret + } + return o.Series +} + +// GetSeriesOk returns a tuple with the Series field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AttackReportChartsAttacks) GetSeriesOk() ([]AttackReportChartsAttacksSeriesInner, bool) { + if o == nil || IsNil(o.Series) { + return nil, false + } + return o.Series, true +} + +// HasSeries returns a boolean if a field has been set. +func (o *AttackReportChartsAttacks) HasSeries() bool { + if o != nil && !IsNil(o.Series) { + return true + } + + return false +} + +// SetSeries gets a reference to the given []AttackReportChartsAttacksSeriesInner and assigns it to the Series field. +func (o *AttackReportChartsAttacks) SetSeries(v []AttackReportChartsAttacksSeriesInner) { + o.Series = v +} + +func (o AttackReportChartsAttacks) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AttackReportChartsAttacks) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Title) { + toSerialize["title"] = o.Title + } + if !IsNil(o.Categories) { + toSerialize["categories"] = o.Categories + } + if !IsNil(o.Series) { + toSerialize["series"] = o.Series + } + return toSerialize, nil +} + +type NullableAttackReportChartsAttacks struct { + value *AttackReportChartsAttacks + isSet bool +} + +func (v NullableAttackReportChartsAttacks) Get() *AttackReportChartsAttacks { + return v.value +} + +func (v *NullableAttackReportChartsAttacks) Set(val *AttackReportChartsAttacks) { + v.value = val + v.isSet = true +} + +func (v NullableAttackReportChartsAttacks) IsSet() bool { + return v.isSet +} + +func (v *NullableAttackReportChartsAttacks) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAttackReportChartsAttacks(val *AttackReportChartsAttacks) *NullableAttackReportChartsAttacks { + return &NullableAttackReportChartsAttacks{value: val, isSet: true} +} + +func (v NullableAttackReportChartsAttacks) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAttackReportChartsAttacks) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_attack_report_charts_attacks_series_inner.go b/model_attack_report_charts_attacks_series_inner.go new file mode 100644 index 0000000..9bf6709 --- /dev/null +++ b/model_attack_report_charts_attacks_series_inner.go @@ -0,0 +1,162 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the AttackReportChartsAttacksSeriesInner type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AttackReportChartsAttacksSeriesInner{} + +// AttackReportChartsAttacksSeriesInner struct for AttackReportChartsAttacksSeriesInner +type AttackReportChartsAttacksSeriesInner struct { + Name *string `json:"name,omitempty"` + Data []int32 `json:"data,omitempty"` +} + +// NewAttackReportChartsAttacksSeriesInner instantiates a new AttackReportChartsAttacksSeriesInner object +// This constructor will assign default values to properties that have it defined, +// 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 NewAttackReportChartsAttacksSeriesInner() *AttackReportChartsAttacksSeriesInner { + this := AttackReportChartsAttacksSeriesInner{} + return &this +} + +// NewAttackReportChartsAttacksSeriesInnerWithDefaults instantiates a new AttackReportChartsAttacksSeriesInner object +// This 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 NewAttackReportChartsAttacksSeriesInnerWithDefaults() *AttackReportChartsAttacksSeriesInner { + this := AttackReportChartsAttacksSeriesInner{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *AttackReportChartsAttacksSeriesInner) 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 *AttackReportChartsAttacksSeriesInner) 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 *AttackReportChartsAttacksSeriesInner) 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 *AttackReportChartsAttacksSeriesInner) SetName(v string) { + o.Name = &v +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *AttackReportChartsAttacksSeriesInner) GetData() []int32 { + if o == nil || IsNil(o.Data) { + var ret []int32 + return ret + } + return o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AttackReportChartsAttacksSeriesInner) GetDataOk() ([]int32, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *AttackReportChartsAttacksSeriesInner) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given []int32 and assigns it to the Data field. +func (o *AttackReportChartsAttacksSeriesInner) SetData(v []int32) { + o.Data = v +} + +func (o AttackReportChartsAttacksSeriesInner) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AttackReportChartsAttacksSeriesInner) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + return toSerialize, nil +} + +type NullableAttackReportChartsAttacksSeriesInner struct { + value *AttackReportChartsAttacksSeriesInner + isSet bool +} + +func (v NullableAttackReportChartsAttacksSeriesInner) Get() *AttackReportChartsAttacksSeriesInner { + return v.value +} + +func (v *NullableAttackReportChartsAttacksSeriesInner) Set(val *AttackReportChartsAttacksSeriesInner) { + v.value = val + v.isSet = true +} + +func (v NullableAttackReportChartsAttacksSeriesInner) IsSet() bool { + return v.isSet +} + +func (v *NullableAttackReportChartsAttacksSeriesInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAttackReportChartsAttacksSeriesInner(val *AttackReportChartsAttacksSeriesInner) *NullableAttackReportChartsAttacksSeriesInner { + return &NullableAttackReportChartsAttacksSeriesInner{value: val, isSet: true} +} + +func (v NullableAttackReportChartsAttacksSeriesInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAttackReportChartsAttacksSeriesInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_attack_report_item.go b/model_attack_report_item.go new file mode 100644 index 0000000..1b3dc3b --- /dev/null +++ b/model_attack_report_item.go @@ -0,0 +1,451 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" + "time" +) + +// checks if the AttackReportItem type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AttackReportItem{} + +// AttackReportItem struct for AttackReportItem +type AttackReportItem struct { + AttackerIp *string `json:"attacker_ip,omitempty"` + AttackerCountry *string `json:"attacker_country,omitempty"` + Method *string `json:"method,omitempty"` + Uri *string `json:"uri,omitempty"` + Host []string `json:"host,omitempty"` + Timestamp *time.Time `json:"timestamp,omitempty"` + UriArgs *string `json:"uri_args,omitempty"` + Cookie []string `json:"cookie,omitempty"` + Alerts []string `json:"alerts,omitempty"` + UserAgent []string `json:"user_agent,omitempty"` +} + +// NewAttackReportItem instantiates a new AttackReportItem object +// This constructor will assign default values to properties that have it defined, +// 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 NewAttackReportItem() *AttackReportItem { + this := AttackReportItem{} + return &this +} + +// NewAttackReportItemWithDefaults instantiates a new AttackReportItem object +// This 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 NewAttackReportItemWithDefaults() *AttackReportItem { + this := AttackReportItem{} + return &this +} + +// GetAttackerIp returns the AttackerIp field value if set, zero value otherwise. +func (o *AttackReportItem) GetAttackerIp() string { + if o == nil || IsNil(o.AttackerIp) { + var ret string + return ret + } + return *o.AttackerIp +} + +// GetAttackerIpOk returns a tuple with the AttackerIp field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AttackReportItem) GetAttackerIpOk() (*string, bool) { + if o == nil || IsNil(o.AttackerIp) { + return nil, false + } + return o.AttackerIp, true +} + +// HasAttackerIp returns a boolean if a field has been set. +func (o *AttackReportItem) HasAttackerIp() bool { + if o != nil && !IsNil(o.AttackerIp) { + return true + } + + return false +} + +// SetAttackerIp gets a reference to the given string and assigns it to the AttackerIp field. +func (o *AttackReportItem) SetAttackerIp(v string) { + o.AttackerIp = &v +} + +// GetAttackerCountry returns the AttackerCountry field value if set, zero value otherwise. +func (o *AttackReportItem) GetAttackerCountry() string { + if o == nil || IsNil(o.AttackerCountry) { + var ret string + return ret + } + return *o.AttackerCountry +} + +// GetAttackerCountryOk returns a tuple with the AttackerCountry field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AttackReportItem) GetAttackerCountryOk() (*string, bool) { + if o == nil || IsNil(o.AttackerCountry) { + return nil, false + } + return o.AttackerCountry, true +} + +// HasAttackerCountry returns a boolean if a field has been set. +func (o *AttackReportItem) HasAttackerCountry() bool { + if o != nil && !IsNil(o.AttackerCountry) { + return true + } + + return false +} + +// SetAttackerCountry gets a reference to the given string and assigns it to the AttackerCountry field. +func (o *AttackReportItem) SetAttackerCountry(v string) { + o.AttackerCountry = &v +} + +// GetMethod returns the Method field value if set, zero value otherwise. +func (o *AttackReportItem) GetMethod() string { + if o == nil || IsNil(o.Method) { + var ret string + return ret + } + return *o.Method +} + +// GetMethodOk returns a tuple with the Method field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AttackReportItem) GetMethodOk() (*string, bool) { + if o == nil || IsNil(o.Method) { + return nil, false + } + return o.Method, true +} + +// HasMethod returns a boolean if a field has been set. +func (o *AttackReportItem) HasMethod() bool { + if o != nil && !IsNil(o.Method) { + return true + } + + return false +} + +// SetMethod gets a reference to the given string and assigns it to the Method field. +func (o *AttackReportItem) SetMethod(v string) { + o.Method = &v +} + +// GetUri returns the Uri field value if set, zero value otherwise. +func (o *AttackReportItem) GetUri() string { + if o == nil || IsNil(o.Uri) { + var ret string + return ret + } + return *o.Uri +} + +// GetUriOk returns a tuple with the Uri field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AttackReportItem) GetUriOk() (*string, bool) { + if o == nil || IsNil(o.Uri) { + return nil, false + } + return o.Uri, true +} + +// HasUri returns a boolean if a field has been set. +func (o *AttackReportItem) HasUri() bool { + if o != nil && !IsNil(o.Uri) { + return true + } + + return false +} + +// SetUri gets a reference to the given string and assigns it to the Uri field. +func (o *AttackReportItem) SetUri(v string) { + o.Uri = &v +} + +// GetHost returns the Host field value if set, zero value otherwise. +func (o *AttackReportItem) GetHost() []string { + if o == nil || IsNil(o.Host) { + var ret []string + return ret + } + return o.Host +} + +// GetHostOk returns a tuple with the Host field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AttackReportItem) GetHostOk() ([]string, bool) { + if o == nil || IsNil(o.Host) { + return nil, false + } + return o.Host, true +} + +// HasHost returns a boolean if a field has been set. +func (o *AttackReportItem) HasHost() bool { + if o != nil && !IsNil(o.Host) { + return true + } + + return false +} + +// SetHost gets a reference to the given []string and assigns it to the Host field. +func (o *AttackReportItem) SetHost(v []string) { + o.Host = v +} + +// GetTimestamp returns the Timestamp field value if set, zero value otherwise. +func (o *AttackReportItem) GetTimestamp() time.Time { + if o == nil || IsNil(o.Timestamp) { + var ret time.Time + return ret + } + return *o.Timestamp +} + +// GetTimestampOk returns a tuple with the Timestamp field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AttackReportItem) GetTimestampOk() (*time.Time, bool) { + if o == nil || IsNil(o.Timestamp) { + return nil, false + } + return o.Timestamp, true +} + +// HasTimestamp returns a boolean if a field has been set. +func (o *AttackReportItem) HasTimestamp() bool { + if o != nil && !IsNil(o.Timestamp) { + return true + } + + return false +} + +// SetTimestamp gets a reference to the given time.Time and assigns it to the Timestamp field. +func (o *AttackReportItem) SetTimestamp(v time.Time) { + o.Timestamp = &v +} + +// GetUriArgs returns the UriArgs field value if set, zero value otherwise. +func (o *AttackReportItem) GetUriArgs() string { + if o == nil || IsNil(o.UriArgs) { + var ret string + return ret + } + return *o.UriArgs +} + +// GetUriArgsOk returns a tuple with the UriArgs field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AttackReportItem) GetUriArgsOk() (*string, bool) { + if o == nil || IsNil(o.UriArgs) { + return nil, false + } + return o.UriArgs, true +} + +// HasUriArgs returns a boolean if a field has been set. +func (o *AttackReportItem) HasUriArgs() bool { + if o != nil && !IsNil(o.UriArgs) { + return true + } + + return false +} + +// SetUriArgs gets a reference to the given string and assigns it to the UriArgs field. +func (o *AttackReportItem) SetUriArgs(v string) { + o.UriArgs = &v +} + +// GetCookie returns the Cookie field value if set, zero value otherwise. +func (o *AttackReportItem) GetCookie() []string { + if o == nil || IsNil(o.Cookie) { + var ret []string + return ret + } + return o.Cookie +} + +// GetCookieOk returns a tuple with the Cookie field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AttackReportItem) GetCookieOk() ([]string, bool) { + if o == nil || IsNil(o.Cookie) { + return nil, false + } + return o.Cookie, true +} + +// HasCookie returns a boolean if a field has been set. +func (o *AttackReportItem) HasCookie() bool { + if o != nil && !IsNil(o.Cookie) { + return true + } + + return false +} + +// SetCookie gets a reference to the given []string and assigns it to the Cookie field. +func (o *AttackReportItem) SetCookie(v []string) { + o.Cookie = v +} + +// GetAlerts returns the Alerts field value if set, zero value otherwise. +func (o *AttackReportItem) GetAlerts() []string { + if o == nil || IsNil(o.Alerts) { + var ret []string + return ret + } + return o.Alerts +} + +// GetAlertsOk returns a tuple with the Alerts field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AttackReportItem) GetAlertsOk() ([]string, bool) { + if o == nil || IsNil(o.Alerts) { + return nil, false + } + return o.Alerts, true +} + +// HasAlerts returns a boolean if a field has been set. +func (o *AttackReportItem) HasAlerts() bool { + if o != nil && !IsNil(o.Alerts) { + return true + } + + return false +} + +// SetAlerts gets a reference to the given []string and assigns it to the Alerts field. +func (o *AttackReportItem) SetAlerts(v []string) { + o.Alerts = v +} + +// GetUserAgent returns the UserAgent field value if set, zero value otherwise. +func (o *AttackReportItem) GetUserAgent() []string { + if o == nil || IsNil(o.UserAgent) { + var ret []string + return ret + } + return o.UserAgent +} + +// GetUserAgentOk returns a tuple with the UserAgent field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AttackReportItem) GetUserAgentOk() ([]string, bool) { + if o == nil || IsNil(o.UserAgent) { + return nil, false + } + return o.UserAgent, true +} + +// HasUserAgent returns a boolean if a field has been set. +func (o *AttackReportItem) HasUserAgent() bool { + if o != nil && !IsNil(o.UserAgent) { + return true + } + + return false +} + +// SetUserAgent gets a reference to the given []string and assigns it to the UserAgent field. +func (o *AttackReportItem) SetUserAgent(v []string) { + o.UserAgent = v +} + +func (o AttackReportItem) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AttackReportItem) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.AttackerIp) { + toSerialize["attacker_ip"] = o.AttackerIp + } + if !IsNil(o.AttackerCountry) { + toSerialize["attacker_country"] = o.AttackerCountry + } + if !IsNil(o.Method) { + toSerialize["method"] = o.Method + } + if !IsNil(o.Uri) { + toSerialize["uri"] = o.Uri + } + if !IsNil(o.Host) { + toSerialize["host"] = o.Host + } + if !IsNil(o.Timestamp) { + toSerialize["timestamp"] = o.Timestamp + } + if !IsNil(o.UriArgs) { + toSerialize["uri_args"] = o.UriArgs + } + if !IsNil(o.Cookie) { + toSerialize["cookie"] = o.Cookie + } + if !IsNil(o.Alerts) { + toSerialize["alerts"] = o.Alerts + } + if !IsNil(o.UserAgent) { + toSerialize["user_agent"] = o.UserAgent + } + return toSerialize, nil +} + +type NullableAttackReportItem struct { + value *AttackReportItem + isSet bool +} + +func (v NullableAttackReportItem) Get() *AttackReportItem { + return v.value +} + +func (v *NullableAttackReportItem) Set(val *AttackReportItem) { + v.value = val + v.isSet = true +} + +func (v NullableAttackReportItem) IsSet() bool { + return v.isSet +} + +func (v *NullableAttackReportItem) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAttackReportItem(val *AttackReportItem) *NullableAttackReportItem { + return &NullableAttackReportItem{value: val, isSet: true} +} + +func (v NullableAttackReportItem) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAttackReportItem) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_attack_report_map.go b/model_attack_report_map.go new file mode 100644 index 0000000..d95a570 --- /dev/null +++ b/model_attack_report_map.go @@ -0,0 +1,202 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the AttackReportMap type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AttackReportMap{} + +// AttackReportMap struct for AttackReportMap +type AttackReportMap struct { + // Deprecated + Statistics []AttackReportMapStatisticsInner `json:"statistics,omitempty"` + Charts *AttackReportMapCharts `json:"charts,omitempty"` + Lists []AttackReportMapStatisticsInner `json:"lists,omitempty"` +} + +// NewAttackReportMap instantiates a new AttackReportMap object +// This constructor will assign default values to properties that have it defined, +// 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 NewAttackReportMap() *AttackReportMap { + this := AttackReportMap{} + return &this +} + +// NewAttackReportMapWithDefaults instantiates a new AttackReportMap object +// This 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 NewAttackReportMapWithDefaults() *AttackReportMap { + this := AttackReportMap{} + return &this +} + +// GetStatistics returns the Statistics field value if set, zero value otherwise. +// Deprecated +func (o *AttackReportMap) GetStatistics() []AttackReportMapStatisticsInner { + if o == nil || IsNil(o.Statistics) { + var ret []AttackReportMapStatisticsInner + return ret + } + return o.Statistics +} + +// GetStatisticsOk returns a tuple with the Statistics field value if set, nil otherwise +// and a boolean to check if the value has been set. +// Deprecated +func (o *AttackReportMap) GetStatisticsOk() ([]AttackReportMapStatisticsInner, bool) { + if o == nil || IsNil(o.Statistics) { + return nil, false + } + return o.Statistics, true +} + +// HasStatistics returns a boolean if a field has been set. +func (o *AttackReportMap) HasStatistics() bool { + if o != nil && !IsNil(o.Statistics) { + return true + } + + return false +} + +// SetStatistics gets a reference to the given []AttackReportMapStatisticsInner and assigns it to the Statistics field. +// Deprecated +func (o *AttackReportMap) SetStatistics(v []AttackReportMapStatisticsInner) { + o.Statistics = v +} + +// GetCharts returns the Charts field value if set, zero value otherwise. +func (o *AttackReportMap) GetCharts() AttackReportMapCharts { + if o == nil || IsNil(o.Charts) { + var ret AttackReportMapCharts + return ret + } + return *o.Charts +} + +// GetChartsOk returns a tuple with the Charts field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AttackReportMap) GetChartsOk() (*AttackReportMapCharts, bool) { + if o == nil || IsNil(o.Charts) { + return nil, false + } + return o.Charts, true +} + +// HasCharts returns a boolean if a field has been set. +func (o *AttackReportMap) HasCharts() bool { + if o != nil && !IsNil(o.Charts) { + return true + } + + return false +} + +// SetCharts gets a reference to the given AttackReportMapCharts and assigns it to the Charts field. +func (o *AttackReportMap) SetCharts(v AttackReportMapCharts) { + o.Charts = &v +} + +// GetLists returns the Lists field value if set, zero value otherwise. +func (o *AttackReportMap) GetLists() []AttackReportMapStatisticsInner { + if o == nil || IsNil(o.Lists) { + var ret []AttackReportMapStatisticsInner + return ret + } + return o.Lists +} + +// GetListsOk returns a tuple with the Lists field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AttackReportMap) GetListsOk() ([]AttackReportMapStatisticsInner, bool) { + if o == nil || IsNil(o.Lists) { + return nil, false + } + return o.Lists, true +} + +// HasLists returns a boolean if a field has been set. +func (o *AttackReportMap) HasLists() bool { + if o != nil && !IsNil(o.Lists) { + return true + } + + return false +} + +// SetLists gets a reference to the given []AttackReportMapStatisticsInner and assigns it to the Lists field. +func (o *AttackReportMap) SetLists(v []AttackReportMapStatisticsInner) { + o.Lists = v +} + +func (o AttackReportMap) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AttackReportMap) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Statistics) { + toSerialize["statistics"] = o.Statistics + } + if !IsNil(o.Charts) { + toSerialize["charts"] = o.Charts + } + if !IsNil(o.Lists) { + toSerialize["lists"] = o.Lists + } + return toSerialize, nil +} + +type NullableAttackReportMap struct { + value *AttackReportMap + isSet bool +} + +func (v NullableAttackReportMap) Get() *AttackReportMap { + return v.value +} + +func (v *NullableAttackReportMap) Set(val *AttackReportMap) { + v.value = val + v.isSet = true +} + +func (v NullableAttackReportMap) IsSet() bool { + return v.isSet +} + +func (v *NullableAttackReportMap) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAttackReportMap(val *AttackReportMap) *NullableAttackReportMap { + return &NullableAttackReportMap{value: val, isSet: true} +} + +func (v NullableAttackReportMap) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAttackReportMap) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_attack_report_map_charts.go b/model_attack_report_map_charts.go new file mode 100644 index 0000000..d605159 --- /dev/null +++ b/model_attack_report_map_charts.go @@ -0,0 +1,126 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the AttackReportMapCharts type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AttackReportMapCharts{} + +// AttackReportMapCharts struct for AttackReportMapCharts +type AttackReportMapCharts struct { + Attacks *map[string]AttackReportMapChartsAttacksValue `json:"attacks,omitempty"` +} + +// NewAttackReportMapCharts instantiates a new AttackReportMapCharts object +// This constructor will assign default values to properties that have it defined, +// 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 NewAttackReportMapCharts() *AttackReportMapCharts { + this := AttackReportMapCharts{} + return &this +} + +// NewAttackReportMapChartsWithDefaults instantiates a new AttackReportMapCharts object +// This 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 NewAttackReportMapChartsWithDefaults() *AttackReportMapCharts { + this := AttackReportMapCharts{} + return &this +} + +// GetAttacks returns the Attacks field value if set, zero value otherwise. +func (o *AttackReportMapCharts) GetAttacks() map[string]AttackReportMapChartsAttacksValue { + if o == nil || IsNil(o.Attacks) { + var ret map[string]AttackReportMapChartsAttacksValue + return ret + } + return *o.Attacks +} + +// GetAttacksOk returns a tuple with the Attacks field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AttackReportMapCharts) GetAttacksOk() (*map[string]AttackReportMapChartsAttacksValue, bool) { + if o == nil || IsNil(o.Attacks) { + return nil, false + } + return o.Attacks, true +} + +// HasAttacks returns a boolean if a field has been set. +func (o *AttackReportMapCharts) HasAttacks() bool { + if o != nil && !IsNil(o.Attacks) { + return true + } + + return false +} + +// SetAttacks gets a reference to the given map[string]AttackReportMapChartsAttacksValue and assigns it to the Attacks field. +func (o *AttackReportMapCharts) SetAttacks(v map[string]AttackReportMapChartsAttacksValue) { + o.Attacks = &v +} + +func (o AttackReportMapCharts) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AttackReportMapCharts) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Attacks) { + toSerialize["attacks"] = o.Attacks + } + return toSerialize, nil +} + +type NullableAttackReportMapCharts struct { + value *AttackReportMapCharts + isSet bool +} + +func (v NullableAttackReportMapCharts) Get() *AttackReportMapCharts { + return v.value +} + +func (v *NullableAttackReportMapCharts) Set(val *AttackReportMapCharts) { + v.value = val + v.isSet = true +} + +func (v NullableAttackReportMapCharts) IsSet() bool { + return v.isSet +} + +func (v *NullableAttackReportMapCharts) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAttackReportMapCharts(val *AttackReportMapCharts) *NullableAttackReportMapCharts { + return &NullableAttackReportMapCharts{value: val, isSet: true} +} + +func (v NullableAttackReportMapCharts) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAttackReportMapCharts) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_attack_report_map_charts_attacks_value.go b/model_attack_report_map_charts_attacks_value.go new file mode 100644 index 0000000..dedfe89 --- /dev/null +++ b/model_attack_report_map_charts_attacks_value.go @@ -0,0 +1,201 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the AttackReportMapChartsAttacksValue type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AttackReportMapChartsAttacksValue{} + +// AttackReportMapChartsAttacksValue struct for AttackReportMapChartsAttacksValue +type AttackReportMapChartsAttacksValue struct { + // A numerical key used for coloring the map + FillKey *int32 `json:"fillKey,omitempty"` + // The name of the country + Name *string `json:"name,omitempty"` + // The number of attacks + Value *int32 `json:"value,omitempty"` +} + +// NewAttackReportMapChartsAttacksValue instantiates a new AttackReportMapChartsAttacksValue object +// This constructor will assign default values to properties that have it defined, +// 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 NewAttackReportMapChartsAttacksValue() *AttackReportMapChartsAttacksValue { + this := AttackReportMapChartsAttacksValue{} + return &this +} + +// NewAttackReportMapChartsAttacksValueWithDefaults instantiates a new AttackReportMapChartsAttacksValue object +// This 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 NewAttackReportMapChartsAttacksValueWithDefaults() *AttackReportMapChartsAttacksValue { + this := AttackReportMapChartsAttacksValue{} + return &this +} + +// GetFillKey returns the FillKey field value if set, zero value otherwise. +func (o *AttackReportMapChartsAttacksValue) GetFillKey() int32 { + if o == nil || IsNil(o.FillKey) { + var ret int32 + return ret + } + return *o.FillKey +} + +// GetFillKeyOk returns a tuple with the FillKey field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AttackReportMapChartsAttacksValue) GetFillKeyOk() (*int32, bool) { + if o == nil || IsNil(o.FillKey) { + return nil, false + } + return o.FillKey, true +} + +// HasFillKey returns a boolean if a field has been set. +func (o *AttackReportMapChartsAttacksValue) HasFillKey() bool { + if o != nil && !IsNil(o.FillKey) { + return true + } + + return false +} + +// SetFillKey gets a reference to the given int32 and assigns it to the FillKey field. +func (o *AttackReportMapChartsAttacksValue) SetFillKey(v int32) { + o.FillKey = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *AttackReportMapChartsAttacksValue) 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 *AttackReportMapChartsAttacksValue) 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 *AttackReportMapChartsAttacksValue) 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 *AttackReportMapChartsAttacksValue) SetName(v string) { + o.Name = &v +} + +// GetValue returns the Value field value if set, zero value otherwise. +func (o *AttackReportMapChartsAttacksValue) GetValue() int32 { + if o == nil || IsNil(o.Value) { + var ret int32 + return ret + } + return *o.Value +} + +// GetValueOk returns a tuple with the Value field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AttackReportMapChartsAttacksValue) GetValueOk() (*int32, bool) { + if o == nil || IsNil(o.Value) { + return nil, false + } + return o.Value, true +} + +// HasValue returns a boolean if a field has been set. +func (o *AttackReportMapChartsAttacksValue) HasValue() bool { + if o != nil && !IsNil(o.Value) { + return true + } + + return false +} + +// SetValue gets a reference to the given int32 and assigns it to the Value field. +func (o *AttackReportMapChartsAttacksValue) SetValue(v int32) { + o.Value = &v +} + +func (o AttackReportMapChartsAttacksValue) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AttackReportMapChartsAttacksValue) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.FillKey) { + toSerialize["fillKey"] = o.FillKey + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Value) { + toSerialize["value"] = o.Value + } + return toSerialize, nil +} + +type NullableAttackReportMapChartsAttacksValue struct { + value *AttackReportMapChartsAttacksValue + isSet bool +} + +func (v NullableAttackReportMapChartsAttacksValue) Get() *AttackReportMapChartsAttacksValue { + return v.value +} + +func (v *NullableAttackReportMapChartsAttacksValue) Set(val *AttackReportMapChartsAttacksValue) { + v.value = val + v.isSet = true +} + +func (v NullableAttackReportMapChartsAttacksValue) IsSet() bool { + return v.isSet +} + +func (v *NullableAttackReportMapChartsAttacksValue) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAttackReportMapChartsAttacksValue(val *AttackReportMapChartsAttacksValue) *NullableAttackReportMapChartsAttacksValue { + return &NullableAttackReportMapChartsAttacksValue{value: val, isSet: true} +} + +func (v NullableAttackReportMapChartsAttacksValue) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAttackReportMapChartsAttacksValue) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_attack_report_map_data.go b/model_attack_report_map_data.go new file mode 100644 index 0000000..738fcc3 --- /dev/null +++ b/model_attack_report_map_data.go @@ -0,0 +1,126 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the AttackReportMapData type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AttackReportMapData{} + +// AttackReportMapData struct for AttackReportMapData +type AttackReportMapData struct { + Data *AttackReportMap `json:"data,omitempty"` +} + +// NewAttackReportMapData instantiates a new AttackReportMapData object +// This constructor will assign default values to properties that have it defined, +// 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 NewAttackReportMapData() *AttackReportMapData { + this := AttackReportMapData{} + return &this +} + +// NewAttackReportMapDataWithDefaults instantiates a new AttackReportMapData object +// This 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 NewAttackReportMapDataWithDefaults() *AttackReportMapData { + this := AttackReportMapData{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *AttackReportMapData) GetData() AttackReportMap { + if o == nil || IsNil(o.Data) { + var ret AttackReportMap + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AttackReportMapData) GetDataOk() (*AttackReportMap, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *AttackReportMapData) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given AttackReportMap and assigns it to the Data field. +func (o *AttackReportMapData) SetData(v AttackReportMap) { + o.Data = &v +} + +func (o AttackReportMapData) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AttackReportMapData) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + return toSerialize, nil +} + +type NullableAttackReportMapData struct { + value *AttackReportMapData + isSet bool +} + +func (v NullableAttackReportMapData) Get() *AttackReportMapData { + return v.value +} + +func (v *NullableAttackReportMapData) Set(val *AttackReportMapData) { + v.value = val + v.isSet = true +} + +func (v NullableAttackReportMapData) IsSet() bool { + return v.isSet +} + +func (v *NullableAttackReportMapData) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAttackReportMapData(val *AttackReportMapData) *NullableAttackReportMapData { + return &NullableAttackReportMapData{value: val, isSet: true} +} + +func (v NullableAttackReportMapData) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAttackReportMapData) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_attack_report_map_statistics_inner.go b/model_attack_report_map_statistics_inner.go new file mode 100644 index 0000000..ce60f59 --- /dev/null +++ b/model_attack_report_map_statistics_inner.go @@ -0,0 +1,238 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the AttackReportMapStatisticsInner type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AttackReportMapStatisticsInner{} + +// AttackReportMapStatisticsInner struct for AttackReportMapStatisticsInner +type AttackReportMapStatisticsInner struct { + // The 2-letter country code + Country *string `json:"country,omitempty"` + // The name of the country + Name *string `json:"name,omitempty"` + // The 3-letter country code + Code *string `json:"code,omitempty"` + // The number of attacks + Attack *int32 `json:"attack,omitempty"` +} + +// NewAttackReportMapStatisticsInner instantiates a new AttackReportMapStatisticsInner object +// This constructor will assign default values to properties that have it defined, +// 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 NewAttackReportMapStatisticsInner() *AttackReportMapStatisticsInner { + this := AttackReportMapStatisticsInner{} + return &this +} + +// NewAttackReportMapStatisticsInnerWithDefaults instantiates a new AttackReportMapStatisticsInner object +// This 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 NewAttackReportMapStatisticsInnerWithDefaults() *AttackReportMapStatisticsInner { + this := AttackReportMapStatisticsInner{} + return &this +} + +// GetCountry returns the Country field value if set, zero value otherwise. +func (o *AttackReportMapStatisticsInner) GetCountry() string { + if o == nil || IsNil(o.Country) { + var ret string + return ret + } + return *o.Country +} + +// GetCountryOk returns a tuple with the Country field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AttackReportMapStatisticsInner) GetCountryOk() (*string, bool) { + if o == nil || IsNil(o.Country) { + return nil, false + } + return o.Country, true +} + +// HasCountry returns a boolean if a field has been set. +func (o *AttackReportMapStatisticsInner) HasCountry() bool { + if o != nil && !IsNil(o.Country) { + return true + } + + return false +} + +// SetCountry gets a reference to the given string and assigns it to the Country field. +func (o *AttackReportMapStatisticsInner) SetCountry(v string) { + o.Country = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *AttackReportMapStatisticsInner) 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 *AttackReportMapStatisticsInner) 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 *AttackReportMapStatisticsInner) 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 *AttackReportMapStatisticsInner) SetName(v string) { + o.Name = &v +} + +// GetCode returns the Code field value if set, zero value otherwise. +func (o *AttackReportMapStatisticsInner) GetCode() string { + if o == nil || IsNil(o.Code) { + var ret string + return ret + } + return *o.Code +} + +// GetCodeOk returns a tuple with the Code field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AttackReportMapStatisticsInner) GetCodeOk() (*string, bool) { + if o == nil || IsNil(o.Code) { + return nil, false + } + return o.Code, true +} + +// HasCode returns a boolean if a field has been set. +func (o *AttackReportMapStatisticsInner) HasCode() bool { + if o != nil && !IsNil(o.Code) { + return true + } + + return false +} + +// SetCode gets a reference to the given string and assigns it to the Code field. +func (o *AttackReportMapStatisticsInner) SetCode(v string) { + o.Code = &v +} + +// GetAttack returns the Attack field value if set, zero value otherwise. +func (o *AttackReportMapStatisticsInner) GetAttack() int32 { + if o == nil || IsNil(o.Attack) { + var ret int32 + return ret + } + return *o.Attack +} + +// GetAttackOk returns a tuple with the Attack field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AttackReportMapStatisticsInner) GetAttackOk() (*int32, bool) { + if o == nil || IsNil(o.Attack) { + return nil, false + } + return o.Attack, true +} + +// HasAttack returns a boolean if a field has been set. +func (o *AttackReportMapStatisticsInner) HasAttack() bool { + if o != nil && !IsNil(o.Attack) { + return true + } + + return false +} + +// SetAttack gets a reference to the given int32 and assigns it to the Attack field. +func (o *AttackReportMapStatisticsInner) SetAttack(v int32) { + o.Attack = &v +} + +func (o AttackReportMapStatisticsInner) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AttackReportMapStatisticsInner) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Country) { + toSerialize["country"] = o.Country + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Code) { + toSerialize["code"] = o.Code + } + if !IsNil(o.Attack) { + toSerialize["attack"] = o.Attack + } + return toSerialize, nil +} + +type NullableAttackReportMapStatisticsInner struct { + value *AttackReportMapStatisticsInner + isSet bool +} + +func (v NullableAttackReportMapStatisticsInner) Get() *AttackReportMapStatisticsInner { + return v.value +} + +func (v *NullableAttackReportMapStatisticsInner) Set(val *AttackReportMapStatisticsInner) { + v.value = val + v.isSet = true +} + +func (v NullableAttackReportMapStatisticsInner) IsSet() bool { + return v.isSet +} + +func (v *NullableAttackReportMapStatisticsInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAttackReportMapStatisticsInner(val *AttackReportMapStatisticsInner) *NullableAttackReportMapStatisticsInner { + return &NullableAttackReportMapStatisticsInner{value: val, isSet: true} +} + +func (v NullableAttackReportMapStatisticsInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAttackReportMapStatisticsInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_attack_report_statistics.go b/model_attack_report_statistics.go new file mode 100644 index 0000000..6f68a22 --- /dev/null +++ b/model_attack_report_statistics.go @@ -0,0 +1,126 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the AttackReportStatistics type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AttackReportStatistics{} + +// AttackReportStatistics struct for AttackReportStatistics +type AttackReportStatistics struct { + Attacks *DnsRequestReportStatistics `json:"attacks,omitempty"` +} + +// NewAttackReportStatistics instantiates a new AttackReportStatistics object +// This constructor will assign default values to properties that have it defined, +// 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 NewAttackReportStatistics() *AttackReportStatistics { + this := AttackReportStatistics{} + return &this +} + +// NewAttackReportStatisticsWithDefaults instantiates a new AttackReportStatistics object +// This 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 NewAttackReportStatisticsWithDefaults() *AttackReportStatistics { + this := AttackReportStatistics{} + return &this +} + +// GetAttacks returns the Attacks field value if set, zero value otherwise. +func (o *AttackReportStatistics) GetAttacks() DnsRequestReportStatistics { + if o == nil || IsNil(o.Attacks) { + var ret DnsRequestReportStatistics + return ret + } + return *o.Attacks +} + +// GetAttacksOk returns a tuple with the Attacks field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AttackReportStatistics) GetAttacksOk() (*DnsRequestReportStatistics, bool) { + if o == nil || IsNil(o.Attacks) { + return nil, false + } + return o.Attacks, true +} + +// HasAttacks returns a boolean if a field has been set. +func (o *AttackReportStatistics) HasAttacks() bool { + if o != nil && !IsNil(o.Attacks) { + return true + } + + return false +} + +// SetAttacks gets a reference to the given DnsRequestReportStatistics and assigns it to the Attacks field. +func (o *AttackReportStatistics) SetAttacks(v DnsRequestReportStatistics) { + o.Attacks = &v +} + +func (o AttackReportStatistics) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AttackReportStatistics) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Attacks) { + toSerialize["attacks"] = o.Attacks + } + return toSerialize, nil +} + +type NullableAttackReportStatistics struct { + value *AttackReportStatistics + isSet bool +} + +func (v NullableAttackReportStatistics) Get() *AttackReportStatistics { + return v.value +} + +func (v *NullableAttackReportStatistics) Set(val *AttackReportStatistics) { + v.value = val + v.isSet = true +} + +func (v NullableAttackReportStatistics) IsSet() bool { + return v.isSet +} + +func (v *NullableAttackReportStatistics) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAttackReportStatistics(val *AttackReportStatistics) *NullableAttackReportStatistics { + return &NullableAttackReportStatistics{value: val, isSet: true} +} + +func (v NullableAttackReportStatistics) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAttackReportStatistics) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_attack_report_uri.go b/model_attack_report_uri.go new file mode 100644 index 0000000..f02db5d --- /dev/null +++ b/model_attack_report_uri.go @@ -0,0 +1,162 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the AttackReportUri type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AttackReportUri{} + +// AttackReportUri struct for AttackReportUri +type AttackReportUri struct { + Uri *string `json:"uri,omitempty"` + Count *int32 `json:"count,omitempty"` +} + +// NewAttackReportUri instantiates a new AttackReportUri object +// This constructor will assign default values to properties that have it defined, +// 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 NewAttackReportUri() *AttackReportUri { + this := AttackReportUri{} + return &this +} + +// NewAttackReportUriWithDefaults instantiates a new AttackReportUri object +// This 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 NewAttackReportUriWithDefaults() *AttackReportUri { + this := AttackReportUri{} + return &this +} + +// GetUri returns the Uri field value if set, zero value otherwise. +func (o *AttackReportUri) GetUri() string { + if o == nil || IsNil(o.Uri) { + var ret string + return ret + } + return *o.Uri +} + +// GetUriOk returns a tuple with the Uri field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AttackReportUri) GetUriOk() (*string, bool) { + if o == nil || IsNil(o.Uri) { + return nil, false + } + return o.Uri, true +} + +// HasUri returns a boolean if a field has been set. +func (o *AttackReportUri) HasUri() bool { + if o != nil && !IsNil(o.Uri) { + return true + } + + return false +} + +// SetUri gets a reference to the given string and assigns it to the Uri field. +func (o *AttackReportUri) SetUri(v string) { + o.Uri = &v +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *AttackReportUri) 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 *AttackReportUri) 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 *AttackReportUri) 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 *AttackReportUri) SetCount(v int32) { + o.Count = &v +} + +func (o AttackReportUri) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AttackReportUri) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Uri) { + toSerialize["uri"] = o.Uri + } + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + return toSerialize, nil +} + +type NullableAttackReportUri struct { + value *AttackReportUri + isSet bool +} + +func (v NullableAttackReportUri) Get() *AttackReportUri { + return v.value +} + +func (v *NullableAttackReportUri) Set(val *AttackReportUri) { + v.value = val + v.isSet = true +} + +func (v NullableAttackReportUri) IsSet() bool { + return v.isSet +} + +func (v *NullableAttackReportUri) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAttackReportUri(val *AttackReportUri) *NullableAttackReportUri { + return &NullableAttackReportUri{value: val, isSet: true} +} + +func (v NullableAttackReportUri) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAttackReportUri) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_attack_report_uri_data.go b/model_attack_report_uri_data.go new file mode 100644 index 0000000..1182968 --- /dev/null +++ b/model_attack_report_uri_data.go @@ -0,0 +1,126 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the AttackReportUriData type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AttackReportUriData{} + +// AttackReportUriData struct for AttackReportUriData +type AttackReportUriData struct { + Data []AttackReportUri `json:"data,omitempty"` +} + +// NewAttackReportUriData instantiates a new AttackReportUriData object +// This constructor will assign default values to properties that have it defined, +// 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 NewAttackReportUriData() *AttackReportUriData { + this := AttackReportUriData{} + return &this +} + +// NewAttackReportUriDataWithDefaults instantiates a new AttackReportUriData object +// This 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 NewAttackReportUriDataWithDefaults() *AttackReportUriData { + this := AttackReportUriData{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *AttackReportUriData) GetData() []AttackReportUri { + if o == nil || IsNil(o.Data) { + var ret []AttackReportUri + return ret + } + return o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AttackReportUriData) GetDataOk() ([]AttackReportUri, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *AttackReportUriData) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given []AttackReportUri and assigns it to the Data field. +func (o *AttackReportUriData) SetData(v []AttackReportUri) { + o.Data = v +} + +func (o AttackReportUriData) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AttackReportUriData) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + return toSerialize, nil +} + +type NullableAttackReportUriData struct { + value *AttackReportUriData + isSet bool +} + +func (v NullableAttackReportUriData) Get() *AttackReportUriData { + return v.value +} + +func (v *NullableAttackReportUriData) Set(val *AttackReportUriData) { + v.value = val + v.isSet = true +} + +func (v NullableAttackReportUriData) IsSet() bool { + return v.isSet +} + +func (v *NullableAttackReportUriData) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAttackReportUriData(val *AttackReportUriData) *NullableAttackReportUriData { + return &NullableAttackReportUriData{value: val, isSet: true} +} + +func (v NullableAttackReportUriData) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAttackReportUriData) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_base_dns_record.go b/model_base_dns_record.go new file mode 100644 index 0000000..78e3aa0 --- /dev/null +++ b/model_base_dns_record.go @@ -0,0 +1,446 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" + "time" +) + +// checks if the BaseDnsRecord type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &BaseDnsRecord{} + +// BaseDnsRecord struct for BaseDnsRecord +type BaseDnsRecord struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Ttl *int32 `json:"ttl,omitempty"` + Cloud *bool `json:"cloud,omitempty"` + UpstreamHttps *string `json:"upstream_https,omitempty"` + IpFilterMode *DnsRecordIpFilterMode `json:"ip_filter_mode,omitempty"` + // Protected records cannot be modified or deleted by user. + IsProtected *bool `json:"is_protected,omitempty"` + Usage []string `json:"usage,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty"` + UpdatedAt *time.Time `json:"updated_at,omitempty"` +} + +// NewBaseDnsRecord instantiates a new BaseDnsRecord object +// This constructor will assign default values to properties that have it defined, +// 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 NewBaseDnsRecord() *BaseDnsRecord { + this := BaseDnsRecord{} + var cloud bool = false + this.Cloud = &cloud + return &this +} + +// NewBaseDnsRecordWithDefaults instantiates a new BaseDnsRecord object +// This 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 NewBaseDnsRecordWithDefaults() *BaseDnsRecord { + this := BaseDnsRecord{} + var cloud bool = false + this.Cloud = &cloud + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *BaseDnsRecord) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BaseDnsRecord) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *BaseDnsRecord) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *BaseDnsRecord) SetId(v string) { + o.Id = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *BaseDnsRecord) 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 *BaseDnsRecord) 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 *BaseDnsRecord) 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 *BaseDnsRecord) SetName(v string) { + o.Name = &v +} + +// GetTtl returns the Ttl field value if set, zero value otherwise. +func (o *BaseDnsRecord) GetTtl() int32 { + if o == nil || IsNil(o.Ttl) { + var ret int32 + return ret + } + return *o.Ttl +} + +// GetTtlOk returns a tuple with the Ttl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BaseDnsRecord) GetTtlOk() (*int32, bool) { + if o == nil || IsNil(o.Ttl) { + return nil, false + } + return o.Ttl, true +} + +// HasTtl returns a boolean if a field has been set. +func (o *BaseDnsRecord) HasTtl() bool { + if o != nil && !IsNil(o.Ttl) { + return true + } + + return false +} + +// SetTtl gets a reference to the given int32 and assigns it to the Ttl field. +func (o *BaseDnsRecord) SetTtl(v int32) { + o.Ttl = &v +} + +// GetCloud returns the Cloud field value if set, zero value otherwise. +func (o *BaseDnsRecord) GetCloud() bool { + if o == nil || IsNil(o.Cloud) { + var ret bool + return ret + } + return *o.Cloud +} + +// GetCloudOk returns a tuple with the Cloud field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BaseDnsRecord) GetCloudOk() (*bool, bool) { + if o == nil || IsNil(o.Cloud) { + return nil, false + } + return o.Cloud, true +} + +// HasCloud returns a boolean if a field has been set. +func (o *BaseDnsRecord) HasCloud() bool { + if o != nil && !IsNil(o.Cloud) { + return true + } + + return false +} + +// SetCloud gets a reference to the given bool and assigns it to the Cloud field. +func (o *BaseDnsRecord) SetCloud(v bool) { + o.Cloud = &v +} + +// GetUpstreamHttps returns the UpstreamHttps field value if set, zero value otherwise. +func (o *BaseDnsRecord) GetUpstreamHttps() string { + if o == nil || IsNil(o.UpstreamHttps) { + var ret string + return ret + } + return *o.UpstreamHttps +} + +// GetUpstreamHttpsOk returns a tuple with the UpstreamHttps field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BaseDnsRecord) GetUpstreamHttpsOk() (*string, bool) { + if o == nil || IsNil(o.UpstreamHttps) { + return nil, false + } + return o.UpstreamHttps, true +} + +// HasUpstreamHttps returns a boolean if a field has been set. +func (o *BaseDnsRecord) HasUpstreamHttps() bool { + if o != nil && !IsNil(o.UpstreamHttps) { + return true + } + + return false +} + +// SetUpstreamHttps gets a reference to the given string and assigns it to the UpstreamHttps field. +func (o *BaseDnsRecord) SetUpstreamHttps(v string) { + o.UpstreamHttps = &v +} + +// GetIpFilterMode returns the IpFilterMode field value if set, zero value otherwise. +func (o *BaseDnsRecord) GetIpFilterMode() DnsRecordIpFilterMode { + if o == nil || IsNil(o.IpFilterMode) { + var ret DnsRecordIpFilterMode + return ret + } + return *o.IpFilterMode +} + +// GetIpFilterModeOk returns a tuple with the IpFilterMode field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BaseDnsRecord) GetIpFilterModeOk() (*DnsRecordIpFilterMode, bool) { + if o == nil || IsNil(o.IpFilterMode) { + return nil, false + } + return o.IpFilterMode, true +} + +// HasIpFilterMode returns a boolean if a field has been set. +func (o *BaseDnsRecord) HasIpFilterMode() bool { + if o != nil && !IsNil(o.IpFilterMode) { + return true + } + + return false +} + +// SetIpFilterMode gets a reference to the given DnsRecordIpFilterMode and assigns it to the IpFilterMode field. +func (o *BaseDnsRecord) SetIpFilterMode(v DnsRecordIpFilterMode) { + o.IpFilterMode = &v +} + +// GetIsProtected returns the IsProtected field value if set, zero value otherwise. +func (o *BaseDnsRecord) GetIsProtected() bool { + if o == nil || IsNil(o.IsProtected) { + var ret bool + return ret + } + return *o.IsProtected +} + +// GetIsProtectedOk returns a tuple with the IsProtected field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BaseDnsRecord) GetIsProtectedOk() (*bool, bool) { + if o == nil || IsNil(o.IsProtected) { + return nil, false + } + return o.IsProtected, true +} + +// HasIsProtected returns a boolean if a field has been set. +func (o *BaseDnsRecord) HasIsProtected() bool { + if o != nil && !IsNil(o.IsProtected) { + return true + } + + return false +} + +// SetIsProtected gets a reference to the given bool and assigns it to the IsProtected field. +func (o *BaseDnsRecord) SetIsProtected(v bool) { + o.IsProtected = &v +} + +// GetUsage returns the Usage field value if set, zero value otherwise. +func (o *BaseDnsRecord) GetUsage() []string { + if o == nil || IsNil(o.Usage) { + var ret []string + return ret + } + return o.Usage +} + +// GetUsageOk returns a tuple with the Usage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BaseDnsRecord) GetUsageOk() ([]string, bool) { + if o == nil || IsNil(o.Usage) { + return nil, false + } + return o.Usage, true +} + +// HasUsage returns a boolean if a field has been set. +func (o *BaseDnsRecord) HasUsage() bool { + if o != nil && !IsNil(o.Usage) { + return true + } + + return false +} + +// SetUsage gets a reference to the given []string and assigns it to the Usage field. +func (o *BaseDnsRecord) SetUsage(v []string) { + o.Usage = v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *BaseDnsRecord) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BaseDnsRecord) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *BaseDnsRecord) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *BaseDnsRecord) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *BaseDnsRecord) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BaseDnsRecord) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *BaseDnsRecord) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *BaseDnsRecord) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +func (o BaseDnsRecord) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o BaseDnsRecord) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: id is readOnly + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Ttl) { + toSerialize["ttl"] = o.Ttl + } + if !IsNil(o.Cloud) { + toSerialize["cloud"] = o.Cloud + } + if !IsNil(o.UpstreamHttps) { + toSerialize["upstream_https"] = o.UpstreamHttps + } + if !IsNil(o.IpFilterMode) { + toSerialize["ip_filter_mode"] = o.IpFilterMode + } + // skip: is_protected is readOnly + // skip: usage is readOnly + // skip: created_at is readOnly + // skip: updated_at is readOnly + return toSerialize, nil +} + +type NullableBaseDnsRecord struct { + value *BaseDnsRecord + isSet bool +} + +func (v NullableBaseDnsRecord) Get() *BaseDnsRecord { + return v.value +} + +func (v *NullableBaseDnsRecord) Set(val *BaseDnsRecord) { + v.value = val + v.isSet = true +} + +func (v NullableBaseDnsRecord) IsSet() bool { + return v.isSet +} + +func (v *NullableBaseDnsRecord) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBaseDnsRecord(val *BaseDnsRecord) *NullableBaseDnsRecord { + return &NullableBaseDnsRecord{value: val, isSet: true} +} + +func (v NullableBaseDnsRecord) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBaseDnsRecord) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_base_firewall_rule.go b/model_base_firewall_rule.go new file mode 100644 index 0000000..47dbb25 --- /dev/null +++ b/model_base_firewall_rule.go @@ -0,0 +1,305 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the BaseFirewallRule type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &BaseFirewallRule{} + +// BaseFirewallRule struct for BaseFirewallRule +type BaseFirewallRule struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + // Wireshark-like filter expression + FilterExpr *string `json:"filter_expr,omitempty"` + Action *string `json:"action,omitempty"` + IsEnabled *bool `json:"is_enabled,omitempty"` + Note *string `json:"note,omitempty"` +} + +// NewBaseFirewallRule instantiates a new BaseFirewallRule object +// This constructor will assign default values to properties that have it defined, +// 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 NewBaseFirewallRule() *BaseFirewallRule { + this := BaseFirewallRule{} + return &this +} + +// NewBaseFirewallRuleWithDefaults instantiates a new BaseFirewallRule object +// This 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 NewBaseFirewallRuleWithDefaults() *BaseFirewallRule { + this := BaseFirewallRule{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *BaseFirewallRule) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BaseFirewallRule) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *BaseFirewallRule) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *BaseFirewallRule) SetId(v string) { + o.Id = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *BaseFirewallRule) 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 *BaseFirewallRule) 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 *BaseFirewallRule) 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 *BaseFirewallRule) SetName(v string) { + o.Name = &v +} + +// GetFilterExpr returns the FilterExpr field value if set, zero value otherwise. +func (o *BaseFirewallRule) GetFilterExpr() string { + if o == nil || IsNil(o.FilterExpr) { + var ret string + return ret + } + return *o.FilterExpr +} + +// GetFilterExprOk returns a tuple with the FilterExpr field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BaseFirewallRule) GetFilterExprOk() (*string, bool) { + if o == nil || IsNil(o.FilterExpr) { + return nil, false + } + return o.FilterExpr, true +} + +// HasFilterExpr returns a boolean if a field has been set. +func (o *BaseFirewallRule) HasFilterExpr() bool { + if o != nil && !IsNil(o.FilterExpr) { + return true + } + + return false +} + +// SetFilterExpr gets a reference to the given string and assigns it to the FilterExpr field. +func (o *BaseFirewallRule) SetFilterExpr(v string) { + o.FilterExpr = &v +} + +// GetAction returns the Action field value if set, zero value otherwise. +func (o *BaseFirewallRule) GetAction() string { + if o == nil || IsNil(o.Action) { + var ret string + return ret + } + return *o.Action +} + +// GetActionOk returns a tuple with the Action field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BaseFirewallRule) GetActionOk() (*string, bool) { + if o == nil || IsNil(o.Action) { + return nil, false + } + return o.Action, true +} + +// HasAction returns a boolean if a field has been set. +func (o *BaseFirewallRule) HasAction() bool { + if o != nil && !IsNil(o.Action) { + return true + } + + return false +} + +// SetAction gets a reference to the given string and assigns it to the Action field. +func (o *BaseFirewallRule) SetAction(v string) { + o.Action = &v +} + +// GetIsEnabled returns the IsEnabled field value if set, zero value otherwise. +func (o *BaseFirewallRule) GetIsEnabled() bool { + if o == nil || IsNil(o.IsEnabled) { + var ret bool + return ret + } + return *o.IsEnabled +} + +// GetIsEnabledOk returns a tuple with the IsEnabled field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BaseFirewallRule) GetIsEnabledOk() (*bool, bool) { + if o == nil || IsNil(o.IsEnabled) { + return nil, false + } + return o.IsEnabled, true +} + +// HasIsEnabled returns a boolean if a field has been set. +func (o *BaseFirewallRule) HasIsEnabled() bool { + if o != nil && !IsNil(o.IsEnabled) { + return true + } + + return false +} + +// SetIsEnabled gets a reference to the given bool and assigns it to the IsEnabled field. +func (o *BaseFirewallRule) SetIsEnabled(v bool) { + o.IsEnabled = &v +} + +// GetNote returns the Note field value if set, zero value otherwise. +func (o *BaseFirewallRule) GetNote() string { + if o == nil || IsNil(o.Note) { + var ret string + return ret + } + return *o.Note +} + +// GetNoteOk returns a tuple with the Note field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BaseFirewallRule) GetNoteOk() (*string, bool) { + if o == nil || IsNil(o.Note) { + return nil, false + } + return o.Note, true +} + +// HasNote returns a boolean if a field has been set. +func (o *BaseFirewallRule) HasNote() bool { + if o != nil && !IsNil(o.Note) { + return true + } + + return false +} + +// SetNote gets a reference to the given string and assigns it to the Note field. +func (o *BaseFirewallRule) SetNote(v string) { + o.Note = &v +} + +func (o BaseFirewallRule) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o BaseFirewallRule) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: id is readOnly + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.FilterExpr) { + toSerialize["filter_expr"] = o.FilterExpr + } + if !IsNil(o.Action) { + toSerialize["action"] = o.Action + } + if !IsNil(o.IsEnabled) { + toSerialize["is_enabled"] = o.IsEnabled + } + if !IsNil(o.Note) { + toSerialize["note"] = o.Note + } + return toSerialize, nil +} + +type NullableBaseFirewallRule struct { + value *BaseFirewallRule + isSet bool +} + +func (v NullableBaseFirewallRule) Get() *BaseFirewallRule { + return v.value +} + +func (v *NullableBaseFirewallRule) Set(val *BaseFirewallRule) { + v.value = val + v.isSet = true +} + +func (v NullableBaseFirewallRule) IsSet() bool { + return v.isSet +} + +func (v *NullableBaseFirewallRule) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBaseFirewallRule(val *BaseFirewallRule) *NullableBaseFirewallRule { + return &NullableBaseFirewallRule{value: val, isSet: true} +} + +func (v NullableBaseFirewallRule) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBaseFirewallRule) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_base_firewall_settings.go b/model_base_firewall_settings.go new file mode 100644 index 0000000..5928a3b --- /dev/null +++ b/model_base_firewall_settings.go @@ -0,0 +1,201 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the BaseFirewallSettings type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &BaseFirewallSettings{} + +// BaseFirewallSettings struct for BaseFirewallSettings +type BaseFirewallSettings struct { + IsEnabled *bool `json:"is_enabled,omitempty"` + DefaultAction *string `json:"default_action,omitempty"` + // True to verify that SNI and hostname are equal + VerifySni *bool `json:"verify_sni,omitempty"` +} + +// NewBaseFirewallSettings instantiates a new BaseFirewallSettings object +// This constructor will assign default values to properties that have it defined, +// 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 NewBaseFirewallSettings() *BaseFirewallSettings { + this := BaseFirewallSettings{} + var verifySni bool = false + this.VerifySni = &verifySni + return &this +} + +// NewBaseFirewallSettingsWithDefaults instantiates a new BaseFirewallSettings object +// This 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 NewBaseFirewallSettingsWithDefaults() *BaseFirewallSettings { + this := BaseFirewallSettings{} + var verifySni bool = false + this.VerifySni = &verifySni + return &this +} + +// GetIsEnabled returns the IsEnabled field value if set, zero value otherwise. +func (o *BaseFirewallSettings) GetIsEnabled() bool { + if o == nil || IsNil(o.IsEnabled) { + var ret bool + return ret + } + return *o.IsEnabled +} + +// GetIsEnabledOk returns a tuple with the IsEnabled field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BaseFirewallSettings) GetIsEnabledOk() (*bool, bool) { + if o == nil || IsNil(o.IsEnabled) { + return nil, false + } + return o.IsEnabled, true +} + +// HasIsEnabled returns a boolean if a field has been set. +func (o *BaseFirewallSettings) HasIsEnabled() bool { + if o != nil && !IsNil(o.IsEnabled) { + return true + } + + return false +} + +// SetIsEnabled gets a reference to the given bool and assigns it to the IsEnabled field. +func (o *BaseFirewallSettings) SetIsEnabled(v bool) { + o.IsEnabled = &v +} + +// GetDefaultAction returns the DefaultAction field value if set, zero value otherwise. +func (o *BaseFirewallSettings) GetDefaultAction() string { + if o == nil || IsNil(o.DefaultAction) { + var ret string + return ret + } + return *o.DefaultAction +} + +// GetDefaultActionOk returns a tuple with the DefaultAction field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BaseFirewallSettings) GetDefaultActionOk() (*string, bool) { + if o == nil || IsNil(o.DefaultAction) { + return nil, false + } + return o.DefaultAction, true +} + +// HasDefaultAction returns a boolean if a field has been set. +func (o *BaseFirewallSettings) HasDefaultAction() bool { + if o != nil && !IsNil(o.DefaultAction) { + return true + } + + return false +} + +// SetDefaultAction gets a reference to the given string and assigns it to the DefaultAction field. +func (o *BaseFirewallSettings) SetDefaultAction(v string) { + o.DefaultAction = &v +} + +// GetVerifySni returns the VerifySni field value if set, zero value otherwise. +func (o *BaseFirewallSettings) GetVerifySni() bool { + if o == nil || IsNil(o.VerifySni) { + var ret bool + return ret + } + return *o.VerifySni +} + +// GetVerifySniOk returns a tuple with the VerifySni field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BaseFirewallSettings) GetVerifySniOk() (*bool, bool) { + if o == nil || IsNil(o.VerifySni) { + return nil, false + } + return o.VerifySni, true +} + +// HasVerifySni returns a boolean if a field has been set. +func (o *BaseFirewallSettings) HasVerifySni() bool { + if o != nil && !IsNil(o.VerifySni) { + return true + } + + return false +} + +// SetVerifySni gets a reference to the given bool and assigns it to the VerifySni field. +func (o *BaseFirewallSettings) SetVerifySni(v bool) { + o.VerifySni = &v +} + +func (o BaseFirewallSettings) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o BaseFirewallSettings) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: is_enabled is readOnly + if !IsNil(o.DefaultAction) { + toSerialize["default_action"] = o.DefaultAction + } + if !IsNil(o.VerifySni) { + toSerialize["verify_sni"] = o.VerifySni + } + return toSerialize, nil +} + +type NullableBaseFirewallSettings struct { + value *BaseFirewallSettings + isSet bool +} + +func (v NullableBaseFirewallSettings) Get() *BaseFirewallSettings { + return v.value +} + +func (v *NullableBaseFirewallSettings) Set(val *BaseFirewallSettings) { + v.value = val + v.isSet = true +} + +func (v NullableBaseFirewallSettings) IsSet() bool { + return v.isSet +} + +func (v *NullableBaseFirewallSettings) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBaseFirewallSettings(val *BaseFirewallSettings) *NullableBaseFirewallSettings { + return &NullableBaseFirewallSettings{value: val, isSet: true} +} + +func (v NullableBaseFirewallSettings) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBaseFirewallSettings) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_base_health_check.go b/model_base_health_check.go new file mode 100644 index 0000000..6b440a6 --- /dev/null +++ b/model_base_health_check.go @@ -0,0 +1,575 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" + "time" +) + +// checks if the BaseHealthCheck type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &BaseHealthCheck{} + +// BaseHealthCheck struct for BaseHealthCheck +type BaseHealthCheck struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + // can be IP/Host when type is `upstream`, otherwise it must be a valid record ID + Origin *string `json:"origin,omitempty"` + OriginType *string `json:"origin_type,omitempty"` + Upstreams []string `json:"upstreams,omitempty"` + // In milliseconds + Interval *int32 `json:"interval,omitempty"` + Threshold *int32 `json:"threshold,omitempty"` + Type *string `json:"type,omitempty"` + // The health-check is off or on + Status *bool `json:"status,omitempty"` + // Number of immediate retries in case of a timeout + Retries *int32 `json:"retries,omitempty"` + Zones []HealthCheckZone `json:"zones,omitempty"` + MonitoringUpdatedAt NullableTime `json:"monitoring_updated_at,omitempty"` +} + +// NewBaseHealthCheck instantiates a new BaseHealthCheck object +// This constructor will assign default values to properties that have it defined, +// 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 NewBaseHealthCheck() *BaseHealthCheck { + this := BaseHealthCheck{} + var status bool = true + this.Status = &status + return &this +} + +// NewBaseHealthCheckWithDefaults instantiates a new BaseHealthCheck object +// This 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 NewBaseHealthCheckWithDefaults() *BaseHealthCheck { + this := BaseHealthCheck{} + var status bool = true + this.Status = &status + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *BaseHealthCheck) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BaseHealthCheck) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *BaseHealthCheck) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *BaseHealthCheck) SetId(v string) { + o.Id = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *BaseHealthCheck) 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 *BaseHealthCheck) 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 *BaseHealthCheck) 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 *BaseHealthCheck) SetName(v string) { + o.Name = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *BaseHealthCheck) 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 *BaseHealthCheck) 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 *BaseHealthCheck) 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 *BaseHealthCheck) SetDescription(v string) { + o.Description = &v +} + +// GetOrigin returns the Origin field value if set, zero value otherwise. +func (o *BaseHealthCheck) GetOrigin() string { + if o == nil || IsNil(o.Origin) { + var ret string + return ret + } + return *o.Origin +} + +// GetOriginOk returns a tuple with the Origin field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BaseHealthCheck) GetOriginOk() (*string, bool) { + if o == nil || IsNil(o.Origin) { + return nil, false + } + return o.Origin, true +} + +// HasOrigin returns a boolean if a field has been set. +func (o *BaseHealthCheck) HasOrigin() bool { + if o != nil && !IsNil(o.Origin) { + return true + } + + return false +} + +// SetOrigin gets a reference to the given string and assigns it to the Origin field. +func (o *BaseHealthCheck) SetOrigin(v string) { + o.Origin = &v +} + +// GetOriginType returns the OriginType field value if set, zero value otherwise. +func (o *BaseHealthCheck) GetOriginType() string { + if o == nil || IsNil(o.OriginType) { + var ret string + return ret + } + return *o.OriginType +} + +// GetOriginTypeOk returns a tuple with the OriginType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BaseHealthCheck) GetOriginTypeOk() (*string, bool) { + if o == nil || IsNil(o.OriginType) { + return nil, false + } + return o.OriginType, true +} + +// HasOriginType returns a boolean if a field has been set. +func (o *BaseHealthCheck) HasOriginType() bool { + if o != nil && !IsNil(o.OriginType) { + return true + } + + return false +} + +// SetOriginType gets a reference to the given string and assigns it to the OriginType field. +func (o *BaseHealthCheck) SetOriginType(v string) { + o.OriginType = &v +} + +// GetUpstreams returns the Upstreams field value if set, zero value otherwise. +func (o *BaseHealthCheck) GetUpstreams() []string { + if o == nil || IsNil(o.Upstreams) { + var ret []string + return ret + } + return o.Upstreams +} + +// GetUpstreamsOk returns a tuple with the Upstreams field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BaseHealthCheck) GetUpstreamsOk() ([]string, bool) { + if o == nil || IsNil(o.Upstreams) { + return nil, false + } + return o.Upstreams, true +} + +// HasUpstreams returns a boolean if a field has been set. +func (o *BaseHealthCheck) HasUpstreams() bool { + if o != nil && !IsNil(o.Upstreams) { + return true + } + + return false +} + +// SetUpstreams gets a reference to the given []string and assigns it to the Upstreams field. +func (o *BaseHealthCheck) SetUpstreams(v []string) { + o.Upstreams = v +} + +// GetInterval returns the Interval field value if set, zero value otherwise. +func (o *BaseHealthCheck) GetInterval() int32 { + if o == nil || IsNil(o.Interval) { + var ret int32 + return ret + } + return *o.Interval +} + +// GetIntervalOk returns a tuple with the Interval field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BaseHealthCheck) GetIntervalOk() (*int32, bool) { + if o == nil || IsNil(o.Interval) { + return nil, false + } + return o.Interval, true +} + +// HasInterval returns a boolean if a field has been set. +func (o *BaseHealthCheck) HasInterval() bool { + if o != nil && !IsNil(o.Interval) { + return true + } + + return false +} + +// SetInterval gets a reference to the given int32 and assigns it to the Interval field. +func (o *BaseHealthCheck) SetInterval(v int32) { + o.Interval = &v +} + +// GetThreshold returns the Threshold field value if set, zero value otherwise. +func (o *BaseHealthCheck) GetThreshold() int32 { + if o == nil || IsNil(o.Threshold) { + var ret int32 + return ret + } + return *o.Threshold +} + +// GetThresholdOk returns a tuple with the Threshold field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BaseHealthCheck) GetThresholdOk() (*int32, bool) { + if o == nil || IsNil(o.Threshold) { + return nil, false + } + return o.Threshold, true +} + +// HasThreshold returns a boolean if a field has been set. +func (o *BaseHealthCheck) HasThreshold() bool { + if o != nil && !IsNil(o.Threshold) { + return true + } + + return false +} + +// SetThreshold gets a reference to the given int32 and assigns it to the Threshold field. +func (o *BaseHealthCheck) SetThreshold(v int32) { + o.Threshold = &v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *BaseHealthCheck) 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 *BaseHealthCheck) 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 *BaseHealthCheck) 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 *BaseHealthCheck) SetType(v string) { + o.Type = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *BaseHealthCheck) GetStatus() bool { + if o == nil || IsNil(o.Status) { + var ret bool + 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 *BaseHealthCheck) GetStatusOk() (*bool, 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 *BaseHealthCheck) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given bool and assigns it to the Status field. +func (o *BaseHealthCheck) SetStatus(v bool) { + o.Status = &v +} + +// GetRetries returns the Retries field value if set, zero value otherwise. +func (o *BaseHealthCheck) GetRetries() int32 { + if o == nil || IsNil(o.Retries) { + var ret int32 + return ret + } + return *o.Retries +} + +// GetRetriesOk returns a tuple with the Retries field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BaseHealthCheck) GetRetriesOk() (*int32, bool) { + if o == nil || IsNil(o.Retries) { + return nil, false + } + return o.Retries, true +} + +// HasRetries returns a boolean if a field has been set. +func (o *BaseHealthCheck) HasRetries() bool { + if o != nil && !IsNil(o.Retries) { + return true + } + + return false +} + +// SetRetries gets a reference to the given int32 and assigns it to the Retries field. +func (o *BaseHealthCheck) SetRetries(v int32) { + o.Retries = &v +} + +// GetZones returns the Zones field value if set, zero value otherwise. +func (o *BaseHealthCheck) GetZones() []HealthCheckZone { + if o == nil || IsNil(o.Zones) { + var ret []HealthCheckZone + return ret + } + return o.Zones +} + +// GetZonesOk returns a tuple with the Zones field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BaseHealthCheck) GetZonesOk() ([]HealthCheckZone, bool) { + if o == nil || IsNil(o.Zones) { + return nil, false + } + return o.Zones, true +} + +// HasZones returns a boolean if a field has been set. +func (o *BaseHealthCheck) HasZones() bool { + if o != nil && !IsNil(o.Zones) { + return true + } + + return false +} + +// SetZones gets a reference to the given []HealthCheckZone and assigns it to the Zones field. +func (o *BaseHealthCheck) SetZones(v []HealthCheckZone) { + o.Zones = v +} + +// GetMonitoringUpdatedAt returns the MonitoringUpdatedAt field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *BaseHealthCheck) GetMonitoringUpdatedAt() time.Time { + if o == nil || IsNil(o.MonitoringUpdatedAt.Get()) { + var ret time.Time + return ret + } + return *o.MonitoringUpdatedAt.Get() +} + +// GetMonitoringUpdatedAtOk returns a tuple with the MonitoringUpdatedAt 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 *BaseHealthCheck) GetMonitoringUpdatedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.MonitoringUpdatedAt.Get(), o.MonitoringUpdatedAt.IsSet() +} + +// HasMonitoringUpdatedAt returns a boolean if a field has been set. +func (o *BaseHealthCheck) HasMonitoringUpdatedAt() bool { + if o != nil && o.MonitoringUpdatedAt.IsSet() { + return true + } + + return false +} + +// SetMonitoringUpdatedAt gets a reference to the given NullableTime and assigns it to the MonitoringUpdatedAt field. +func (o *BaseHealthCheck) SetMonitoringUpdatedAt(v time.Time) { + o.MonitoringUpdatedAt.Set(&v) +} +// SetMonitoringUpdatedAtNil sets the value for MonitoringUpdatedAt to be an explicit nil +func (o *BaseHealthCheck) SetMonitoringUpdatedAtNil() { + o.MonitoringUpdatedAt.Set(nil) +} + +// UnsetMonitoringUpdatedAt ensures that no value is present for MonitoringUpdatedAt, not even an explicit nil +func (o *BaseHealthCheck) UnsetMonitoringUpdatedAt() { + o.MonitoringUpdatedAt.Unset() +} + +func (o BaseHealthCheck) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o BaseHealthCheck) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: id is readOnly + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.Origin) { + toSerialize["origin"] = o.Origin + } + if !IsNil(o.OriginType) { + toSerialize["origin_type"] = o.OriginType + } + if !IsNil(o.Upstreams) { + toSerialize["upstreams"] = o.Upstreams + } + if !IsNil(o.Interval) { + toSerialize["interval"] = o.Interval + } + if !IsNil(o.Threshold) { + toSerialize["threshold"] = o.Threshold + } + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + if !IsNil(o.Retries) { + toSerialize["retries"] = o.Retries + } + if !IsNil(o.Zones) { + toSerialize["zones"] = o.Zones + } + if o.MonitoringUpdatedAt.IsSet() { + toSerialize["monitoring_updated_at"] = o.MonitoringUpdatedAt.Get() + } + return toSerialize, nil +} + +type NullableBaseHealthCheck struct { + value *BaseHealthCheck + isSet bool +} + +func (v NullableBaseHealthCheck) Get() *BaseHealthCheck { + return v.value +} + +func (v *NullableBaseHealthCheck) Set(val *BaseHealthCheck) { + v.value = val + v.isSet = true +} + +func (v NullableBaseHealthCheck) IsSet() bool { + return v.isSet +} + +func (v *NullableBaseHealthCheck) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBaseHealthCheck(val *BaseHealthCheck) *NullableBaseHealthCheck { + return &NullableBaseHealthCheck{value: val, isSet: true} +} + +func (v NullableBaseHealthCheck) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBaseHealthCheck) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_base_rate_limit_rule.go b/model_base_rate_limit_rule.go new file mode 100644 index 0000000..d460ce4 --- /dev/null +++ b/model_base_rate_limit_rule.go @@ -0,0 +1,472 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the BaseRateLimitRule type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &BaseRateLimitRule{} + +// BaseRateLimitRule struct for BaseRateLimitRule +type BaseRateLimitRule struct { + Id *string `json:"id,omitempty"` + Action *string `json:"action,omitempty"` + IsEnabled *bool `json:"is_enabled,omitempty"` + // - `?` matches any single character. - `*` matches any (possibly empty) sequence of characters. - `**` matches the current directory and arbitrary subdirectories. This sequence must form a single path component, so both `**a` and `b**` are invalid and will result in an error. A sequence of more than two consecutive `*` characters is also invalid. - `[...]` matches any character inside the brackets. Character sequences can also specify ranges of characters, as ordered by Unicode, so e.g. `[0-9]` specifies any character between 0 and 9 inclusive. An unclosed bracket is invalid. - `[!...]` is the negation of `[...]`, i.e. it matches any characters not in the brackets. - The metacharacters `?`, `*`, `[`, `] `can be matched by using brackets (e.g. `[?]`). When a `]` occurs immediately following `[` or `[!` then it is interpreted as being part of, rather then ending, the character set, so `]` and NOT `]` can be matched by `[]]` and `[!]]` respectively. The - character can be specified inside a character sequence pattern by placing it at the start or the end, e.g. `[abc-]`. + UrlPattern string `json:"url_pattern"` + Description NullableString `json:"description,omitempty"` + ExcludeSources []string `json:"exclude_sources,omitempty"` + Rate int32 `json:"rate"` + Burst *int32 `json:"burst,omitempty"` + BlockDuration *int32 `json:"block_duration,omitempty"` + TimeDuration int32 `json:"time_duration"` + AllowedMethods []string `json:"allowed_methods,omitempty"` +} + +// NewBaseRateLimitRule instantiates a new BaseRateLimitRule object +// This constructor will assign default values to properties that have it defined, +// 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 NewBaseRateLimitRule(urlPattern string, rate int32, timeDuration int32) *BaseRateLimitRule { + this := BaseRateLimitRule{} + var action string = "block" + this.Action = &action + this.UrlPattern = urlPattern + this.Rate = rate + this.TimeDuration = timeDuration + return &this +} + +// NewBaseRateLimitRuleWithDefaults instantiates a new BaseRateLimitRule object +// This 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 NewBaseRateLimitRuleWithDefaults() *BaseRateLimitRule { + this := BaseRateLimitRule{} + var action string = "block" + this.Action = &action + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *BaseRateLimitRule) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BaseRateLimitRule) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *BaseRateLimitRule) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *BaseRateLimitRule) SetId(v string) { + o.Id = &v +} + +// GetAction returns the Action field value if set, zero value otherwise. +func (o *BaseRateLimitRule) GetAction() string { + if o == nil || IsNil(o.Action) { + var ret string + return ret + } + return *o.Action +} + +// GetActionOk returns a tuple with the Action field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BaseRateLimitRule) GetActionOk() (*string, bool) { + if o == nil || IsNil(o.Action) { + return nil, false + } + return o.Action, true +} + +// HasAction returns a boolean if a field has been set. +func (o *BaseRateLimitRule) HasAction() bool { + if o != nil && !IsNil(o.Action) { + return true + } + + return false +} + +// SetAction gets a reference to the given string and assigns it to the Action field. +func (o *BaseRateLimitRule) SetAction(v string) { + o.Action = &v +} + +// GetIsEnabled returns the IsEnabled field value if set, zero value otherwise. +func (o *BaseRateLimitRule) GetIsEnabled() bool { + if o == nil || IsNil(o.IsEnabled) { + var ret bool + return ret + } + return *o.IsEnabled +} + +// GetIsEnabledOk returns a tuple with the IsEnabled field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BaseRateLimitRule) GetIsEnabledOk() (*bool, bool) { + if o == nil || IsNil(o.IsEnabled) { + return nil, false + } + return o.IsEnabled, true +} + +// HasIsEnabled returns a boolean if a field has been set. +func (o *BaseRateLimitRule) HasIsEnabled() bool { + if o != nil && !IsNil(o.IsEnabled) { + return true + } + + return false +} + +// SetIsEnabled gets a reference to the given bool and assigns it to the IsEnabled field. +func (o *BaseRateLimitRule) SetIsEnabled(v bool) { + o.IsEnabled = &v +} + +// GetUrlPattern returns the UrlPattern field value +func (o *BaseRateLimitRule) GetUrlPattern() string { + if o == nil { + var ret string + return ret + } + + return o.UrlPattern +} + +// GetUrlPatternOk returns a tuple with the UrlPattern field value +// and a boolean to check if the value has been set. +func (o *BaseRateLimitRule) GetUrlPatternOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.UrlPattern, true +} + +// SetUrlPattern sets field value +func (o *BaseRateLimitRule) SetUrlPattern(v string) { + o.UrlPattern = v +} + +// GetDescription returns the Description field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *BaseRateLimitRule) 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 *BaseRateLimitRule) 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 *BaseRateLimitRule) 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 *BaseRateLimitRule) SetDescription(v string) { + o.Description.Set(&v) +} +// SetDescriptionNil sets the value for Description to be an explicit nil +func (o *BaseRateLimitRule) SetDescriptionNil() { + o.Description.Set(nil) +} + +// UnsetDescription ensures that no value is present for Description, not even an explicit nil +func (o *BaseRateLimitRule) UnsetDescription() { + o.Description.Unset() +} + +// GetExcludeSources returns the ExcludeSources field value if set, zero value otherwise. +func (o *BaseRateLimitRule) GetExcludeSources() []string { + if o == nil || IsNil(o.ExcludeSources) { + var ret []string + return ret + } + return o.ExcludeSources +} + +// GetExcludeSourcesOk returns a tuple with the ExcludeSources field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BaseRateLimitRule) GetExcludeSourcesOk() ([]string, bool) { + if o == nil || IsNil(o.ExcludeSources) { + return nil, false + } + return o.ExcludeSources, true +} + +// HasExcludeSources returns a boolean if a field has been set. +func (o *BaseRateLimitRule) HasExcludeSources() bool { + if o != nil && !IsNil(o.ExcludeSources) { + return true + } + + return false +} + +// SetExcludeSources gets a reference to the given []string and assigns it to the ExcludeSources field. +func (o *BaseRateLimitRule) SetExcludeSources(v []string) { + o.ExcludeSources = v +} + +// GetRate returns the Rate field value +func (o *BaseRateLimitRule) GetRate() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Rate +} + +// GetRateOk returns a tuple with the Rate field value +// and a boolean to check if the value has been set. +func (o *BaseRateLimitRule) GetRateOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Rate, true +} + +// SetRate sets field value +func (o *BaseRateLimitRule) SetRate(v int32) { + o.Rate = v +} + +// GetBurst returns the Burst field value if set, zero value otherwise. +func (o *BaseRateLimitRule) GetBurst() int32 { + if o == nil || IsNil(o.Burst) { + var ret int32 + return ret + } + return *o.Burst +} + +// GetBurstOk returns a tuple with the Burst field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BaseRateLimitRule) GetBurstOk() (*int32, bool) { + if o == nil || IsNil(o.Burst) { + return nil, false + } + return o.Burst, true +} + +// HasBurst returns a boolean if a field has been set. +func (o *BaseRateLimitRule) HasBurst() bool { + if o != nil && !IsNil(o.Burst) { + return true + } + + return false +} + +// SetBurst gets a reference to the given int32 and assigns it to the Burst field. +func (o *BaseRateLimitRule) SetBurst(v int32) { + o.Burst = &v +} + +// GetBlockDuration returns the BlockDuration field value if set, zero value otherwise. +func (o *BaseRateLimitRule) GetBlockDuration() int32 { + if o == nil || IsNil(o.BlockDuration) { + var ret int32 + return ret + } + return *o.BlockDuration +} + +// GetBlockDurationOk returns a tuple with the BlockDuration field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BaseRateLimitRule) GetBlockDurationOk() (*int32, bool) { + if o == nil || IsNil(o.BlockDuration) { + return nil, false + } + return o.BlockDuration, true +} + +// HasBlockDuration returns a boolean if a field has been set. +func (o *BaseRateLimitRule) HasBlockDuration() bool { + if o != nil && !IsNil(o.BlockDuration) { + return true + } + + return false +} + +// SetBlockDuration gets a reference to the given int32 and assigns it to the BlockDuration field. +func (o *BaseRateLimitRule) SetBlockDuration(v int32) { + o.BlockDuration = &v +} + +// GetTimeDuration returns the TimeDuration field value +func (o *BaseRateLimitRule) GetTimeDuration() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.TimeDuration +} + +// GetTimeDurationOk returns a tuple with the TimeDuration field value +// and a boolean to check if the value has been set. +func (o *BaseRateLimitRule) GetTimeDurationOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.TimeDuration, true +} + +// SetTimeDuration sets field value +func (o *BaseRateLimitRule) SetTimeDuration(v int32) { + o.TimeDuration = v +} + +// GetAllowedMethods returns the AllowedMethods field value if set, zero value otherwise. +func (o *BaseRateLimitRule) GetAllowedMethods() []string { + if o == nil || IsNil(o.AllowedMethods) { + var ret []string + return ret + } + return o.AllowedMethods +} + +// GetAllowedMethodsOk returns a tuple with the AllowedMethods field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BaseRateLimitRule) GetAllowedMethodsOk() ([]string, bool) { + if o == nil || IsNil(o.AllowedMethods) { + return nil, false + } + return o.AllowedMethods, true +} + +// HasAllowedMethods returns a boolean if a field has been set. +func (o *BaseRateLimitRule) HasAllowedMethods() bool { + if o != nil && !IsNil(o.AllowedMethods) { + return true + } + + return false +} + +// SetAllowedMethods gets a reference to the given []string and assigns it to the AllowedMethods field. +func (o *BaseRateLimitRule) SetAllowedMethods(v []string) { + o.AllowedMethods = v +} + +func (o BaseRateLimitRule) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o BaseRateLimitRule) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: id is readOnly + if !IsNil(o.Action) { + toSerialize["action"] = o.Action + } + if !IsNil(o.IsEnabled) { + toSerialize["is_enabled"] = o.IsEnabled + } + toSerialize["url_pattern"] = o.UrlPattern + if o.Description.IsSet() { + toSerialize["description"] = o.Description.Get() + } + if !IsNil(o.ExcludeSources) { + toSerialize["exclude_sources"] = o.ExcludeSources + } + toSerialize["rate"] = o.Rate + if !IsNil(o.Burst) { + toSerialize["burst"] = o.Burst + } + if !IsNil(o.BlockDuration) { + toSerialize["block_duration"] = o.BlockDuration + } + toSerialize["time_duration"] = o.TimeDuration + if !IsNil(o.AllowedMethods) { + toSerialize["allowed_methods"] = o.AllowedMethods + } + return toSerialize, nil +} + +type NullableBaseRateLimitRule struct { + value *BaseRateLimitRule + isSet bool +} + +func (v NullableBaseRateLimitRule) Get() *BaseRateLimitRule { + return v.value +} + +func (v *NullableBaseRateLimitRule) Set(val *BaseRateLimitRule) { + v.value = val + v.isSet = true +} + +func (v NullableBaseRateLimitRule) IsSet() bool { + return v.isSet +} + +func (v *NullableBaseRateLimitRule) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBaseRateLimitRule(val *BaseRateLimitRule) *NullableBaseRateLimitRule { + return &NullableBaseRateLimitRule{value: val, isSet: true} +} + +func (v NullableBaseRateLimitRule) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBaseRateLimitRule) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_bulk_reports_traffics_total_request.go b/model_bulk_reports_traffics_total_request.go new file mode 100644 index 0000000..9f48ad6 --- /dev/null +++ b/model_bulk_reports_traffics_total_request.go @@ -0,0 +1,164 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the BulkReportsTrafficsTotalRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &BulkReportsTrafficsTotalRequest{} + +// BulkReportsTrafficsTotalRequest struct for BulkReportsTrafficsTotalRequest +type BulkReportsTrafficsTotalRequest struct { + // List of domains' IDs + Domains []string `json:"domains,omitempty"` + // Whether to include sub-domains or report only root domain traffic + ExcludeSubdomains *bool `json:"excludeSubdomains,omitempty"` +} + +// NewBulkReportsTrafficsTotalRequest instantiates a new BulkReportsTrafficsTotalRequest object +// This constructor will assign default values to properties that have it defined, +// 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 NewBulkReportsTrafficsTotalRequest() *BulkReportsTrafficsTotalRequest { + this := BulkReportsTrafficsTotalRequest{} + return &this +} + +// NewBulkReportsTrafficsTotalRequestWithDefaults instantiates a new BulkReportsTrafficsTotalRequest object +// This 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 NewBulkReportsTrafficsTotalRequestWithDefaults() *BulkReportsTrafficsTotalRequest { + this := BulkReportsTrafficsTotalRequest{} + return &this +} + +// GetDomains returns the Domains field value if set, zero value otherwise. +func (o *BulkReportsTrafficsTotalRequest) GetDomains() []string { + if o == nil || IsNil(o.Domains) { + var ret []string + return ret + } + return o.Domains +} + +// GetDomainsOk returns a tuple with the Domains field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BulkReportsTrafficsTotalRequest) GetDomainsOk() ([]string, bool) { + if o == nil || IsNil(o.Domains) { + return nil, false + } + return o.Domains, true +} + +// HasDomains returns a boolean if a field has been set. +func (o *BulkReportsTrafficsTotalRequest) HasDomains() bool { + if o != nil && !IsNil(o.Domains) { + return true + } + + return false +} + +// SetDomains gets a reference to the given []string and assigns it to the Domains field. +func (o *BulkReportsTrafficsTotalRequest) SetDomains(v []string) { + o.Domains = v +} + +// GetExcludeSubdomains returns the ExcludeSubdomains field value if set, zero value otherwise. +func (o *BulkReportsTrafficsTotalRequest) GetExcludeSubdomains() bool { + if o == nil || IsNil(o.ExcludeSubdomains) { + var ret bool + return ret + } + return *o.ExcludeSubdomains +} + +// GetExcludeSubdomainsOk returns a tuple with the ExcludeSubdomains field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BulkReportsTrafficsTotalRequest) GetExcludeSubdomainsOk() (*bool, bool) { + if o == nil || IsNil(o.ExcludeSubdomains) { + return nil, false + } + return o.ExcludeSubdomains, true +} + +// HasExcludeSubdomains returns a boolean if a field has been set. +func (o *BulkReportsTrafficsTotalRequest) HasExcludeSubdomains() bool { + if o != nil && !IsNil(o.ExcludeSubdomains) { + return true + } + + return false +} + +// SetExcludeSubdomains gets a reference to the given bool and assigns it to the ExcludeSubdomains field. +func (o *BulkReportsTrafficsTotalRequest) SetExcludeSubdomains(v bool) { + o.ExcludeSubdomains = &v +} + +func (o BulkReportsTrafficsTotalRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o BulkReportsTrafficsTotalRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Domains) { + toSerialize["domains"] = o.Domains + } + if !IsNil(o.ExcludeSubdomains) { + toSerialize["excludeSubdomains"] = o.ExcludeSubdomains + } + return toSerialize, nil +} + +type NullableBulkReportsTrafficsTotalRequest struct { + value *BulkReportsTrafficsTotalRequest + isSet bool +} + +func (v NullableBulkReportsTrafficsTotalRequest) Get() *BulkReportsTrafficsTotalRequest { + return v.value +} + +func (v *NullableBulkReportsTrafficsTotalRequest) Set(val *BulkReportsTrafficsTotalRequest) { + v.value = val + v.isSet = true +} + +func (v NullableBulkReportsTrafficsTotalRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableBulkReportsTrafficsTotalRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBulkReportsTrafficsTotalRequest(val *BulkReportsTrafficsTotalRequest) *NullableBulkReportsTrafficsTotalRequest { + return &NullableBulkReportsTrafficsTotalRequest{value: val, isSet: true} +} + +func (v NullableBulkReportsTrafficsTotalRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBulkReportsTrafficsTotalRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_bulk_reports_visitors_total_request.go b/model_bulk_reports_visitors_total_request.go new file mode 100644 index 0000000..595b6e8 --- /dev/null +++ b/model_bulk_reports_visitors_total_request.go @@ -0,0 +1,165 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the BulkReportsVisitorsTotalRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &BulkReportsVisitorsTotalRequest{} + +// BulkReportsVisitorsTotalRequest struct for BulkReportsVisitorsTotalRequest +type BulkReportsVisitorsTotalRequest struct { + // List of domains' IDs + Domains []string `json:"domains,omitempty"` + // Whether to include sub-domains or report only root domain traffic + ExcludeSubdomains interface{} `json:"excludeSubdomains,omitempty"` +} + +// NewBulkReportsVisitorsTotalRequest instantiates a new BulkReportsVisitorsTotalRequest object +// This constructor will assign default values to properties that have it defined, +// 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 NewBulkReportsVisitorsTotalRequest() *BulkReportsVisitorsTotalRequest { + this := BulkReportsVisitorsTotalRequest{} + return &this +} + +// NewBulkReportsVisitorsTotalRequestWithDefaults instantiates a new BulkReportsVisitorsTotalRequest object +// This 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 NewBulkReportsVisitorsTotalRequestWithDefaults() *BulkReportsVisitorsTotalRequest { + this := BulkReportsVisitorsTotalRequest{} + return &this +} + +// GetDomains returns the Domains field value if set, zero value otherwise. +func (o *BulkReportsVisitorsTotalRequest) GetDomains() []string { + if o == nil || IsNil(o.Domains) { + var ret []string + return ret + } + return o.Domains +} + +// GetDomainsOk returns a tuple with the Domains field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BulkReportsVisitorsTotalRequest) GetDomainsOk() ([]string, bool) { + if o == nil || IsNil(o.Domains) { + return nil, false + } + return o.Domains, true +} + +// HasDomains returns a boolean if a field has been set. +func (o *BulkReportsVisitorsTotalRequest) HasDomains() bool { + if o != nil && !IsNil(o.Domains) { + return true + } + + return false +} + +// SetDomains gets a reference to the given []string and assigns it to the Domains field. +func (o *BulkReportsVisitorsTotalRequest) SetDomains(v []string) { + o.Domains = v +} + +// GetExcludeSubdomains returns the ExcludeSubdomains field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *BulkReportsVisitorsTotalRequest) GetExcludeSubdomains() interface{} { + if o == nil { + var ret interface{} + return ret + } + return o.ExcludeSubdomains +} + +// GetExcludeSubdomainsOk returns a tuple with the ExcludeSubdomains 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 *BulkReportsVisitorsTotalRequest) GetExcludeSubdomainsOk() (*interface{}, bool) { + if o == nil || IsNil(o.ExcludeSubdomains) { + return nil, false + } + return &o.ExcludeSubdomains, true +} + +// HasExcludeSubdomains returns a boolean if a field has been set. +func (o *BulkReportsVisitorsTotalRequest) HasExcludeSubdomains() bool { + if o != nil && IsNil(o.ExcludeSubdomains) { + return true + } + + return false +} + +// SetExcludeSubdomains gets a reference to the given interface{} and assigns it to the ExcludeSubdomains field. +func (o *BulkReportsVisitorsTotalRequest) SetExcludeSubdomains(v interface{}) { + o.ExcludeSubdomains = v +} + +func (o BulkReportsVisitorsTotalRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o BulkReportsVisitorsTotalRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Domains) { + toSerialize["domains"] = o.Domains + } + if o.ExcludeSubdomains != nil { + toSerialize["excludeSubdomains"] = o.ExcludeSubdomains + } + return toSerialize, nil +} + +type NullableBulkReportsVisitorsTotalRequest struct { + value *BulkReportsVisitorsTotalRequest + isSet bool +} + +func (v NullableBulkReportsVisitorsTotalRequest) Get() *BulkReportsVisitorsTotalRequest { + return v.value +} + +func (v *NullableBulkReportsVisitorsTotalRequest) Set(val *BulkReportsVisitorsTotalRequest) { + v.value = val + v.isSet = true +} + +func (v NullableBulkReportsVisitorsTotalRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableBulkReportsVisitorsTotalRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBulkReportsVisitorsTotalRequest(val *BulkReportsVisitorsTotalRequest) *NullableBulkReportsVisitorsTotalRequest { + return &NullableBulkReportsVisitorsTotalRequest{value: val, isSet: true} +} + +func (v NullableBulkReportsVisitorsTotalRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBulkReportsVisitorsTotalRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_bulk_traffic_report.go b/model_bulk_traffic_report.go new file mode 100644 index 0000000..f911d14 --- /dev/null +++ b/model_bulk_traffic_report.go @@ -0,0 +1,246 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the BulkTrafficReport type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &BulkTrafficReport{} + +// BulkTrafficReport struct for BulkTrafficReport +type BulkTrafficReport struct { + // Domain's ID + Resource *string `json:"resource,omitempty"` + Success *bool `json:"success,omitempty"` + // The error message + Message NullableString `json:"message,omitempty"` + Data *BulkTrafficReportData `json:"data,omitempty"` +} + +// NewBulkTrafficReport instantiates a new BulkTrafficReport object +// This constructor will assign default values to properties that have it defined, +// 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 NewBulkTrafficReport() *BulkTrafficReport { + this := BulkTrafficReport{} + return &this +} + +// NewBulkTrafficReportWithDefaults instantiates a new BulkTrafficReport object +// This 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 NewBulkTrafficReportWithDefaults() *BulkTrafficReport { + this := BulkTrafficReport{} + return &this +} + +// GetResource returns the Resource field value if set, zero value otherwise. +func (o *BulkTrafficReport) GetResource() string { + if o == nil || IsNil(o.Resource) { + var ret string + return ret + } + return *o.Resource +} + +// GetResourceOk returns a tuple with the Resource field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BulkTrafficReport) GetResourceOk() (*string, bool) { + if o == nil || IsNil(o.Resource) { + return nil, false + } + return o.Resource, true +} + +// HasResource returns a boolean if a field has been set. +func (o *BulkTrafficReport) HasResource() bool { + if o != nil && !IsNil(o.Resource) { + return true + } + + return false +} + +// SetResource gets a reference to the given string and assigns it to the Resource field. +func (o *BulkTrafficReport) SetResource(v string) { + o.Resource = &v +} + +// GetSuccess returns the Success field value if set, zero value otherwise. +func (o *BulkTrafficReport) GetSuccess() bool { + if o == nil || IsNil(o.Success) { + var ret bool + return ret + } + return *o.Success +} + +// GetSuccessOk returns a tuple with the Success field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BulkTrafficReport) GetSuccessOk() (*bool, bool) { + if o == nil || IsNil(o.Success) { + return nil, false + } + return o.Success, true +} + +// HasSuccess returns a boolean if a field has been set. +func (o *BulkTrafficReport) HasSuccess() bool { + if o != nil && !IsNil(o.Success) { + return true + } + + return false +} + +// SetSuccess gets a reference to the given bool and assigns it to the Success field. +func (o *BulkTrafficReport) SetSuccess(v bool) { + o.Success = &v +} + +// GetMessage returns the Message field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *BulkTrafficReport) GetMessage() string { + if o == nil || IsNil(o.Message.Get()) { + var ret string + return ret + } + return *o.Message.Get() +} + +// GetMessageOk returns a tuple with the Message 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 *BulkTrafficReport) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Message.Get(), o.Message.IsSet() +} + +// HasMessage returns a boolean if a field has been set. +func (o *BulkTrafficReport) HasMessage() bool { + if o != nil && o.Message.IsSet() { + return true + } + + return false +} + +// SetMessage gets a reference to the given NullableString and assigns it to the Message field. +func (o *BulkTrafficReport) SetMessage(v string) { + o.Message.Set(&v) +} +// SetMessageNil sets the value for Message to be an explicit nil +func (o *BulkTrafficReport) SetMessageNil() { + o.Message.Set(nil) +} + +// UnsetMessage ensures that no value is present for Message, not even an explicit nil +func (o *BulkTrafficReport) UnsetMessage() { + o.Message.Unset() +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *BulkTrafficReport) GetData() BulkTrafficReportData { + if o == nil || IsNil(o.Data) { + var ret BulkTrafficReportData + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BulkTrafficReport) GetDataOk() (*BulkTrafficReportData, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *BulkTrafficReport) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given BulkTrafficReportData and assigns it to the Data field. +func (o *BulkTrafficReport) SetData(v BulkTrafficReportData) { + o.Data = &v +} + +func (o BulkTrafficReport) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o BulkTrafficReport) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Resource) { + toSerialize["resource"] = o.Resource + } + if !IsNil(o.Success) { + toSerialize["success"] = o.Success + } + if o.Message.IsSet() { + toSerialize["message"] = o.Message.Get() + } + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + return toSerialize, nil +} + +type NullableBulkTrafficReport struct { + value *BulkTrafficReport + isSet bool +} + +func (v NullableBulkTrafficReport) Get() *BulkTrafficReport { + return v.value +} + +func (v *NullableBulkTrafficReport) Set(val *BulkTrafficReport) { + v.value = val + v.isSet = true +} + +func (v NullableBulkTrafficReport) IsSet() bool { + return v.isSet +} + +func (v *NullableBulkTrafficReport) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBulkTrafficReport(val *BulkTrafficReport) *NullableBulkTrafficReport { + return &NullableBulkTrafficReport{value: val, isSet: true} +} + +func (v NullableBulkTrafficReport) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBulkTrafficReport) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_bulk_traffic_report_data.go b/model_bulk_traffic_report_data.go new file mode 100644 index 0000000..d5e05cb --- /dev/null +++ b/model_bulk_traffic_report_data.go @@ -0,0 +1,198 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the BulkTrafficReportData type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &BulkTrafficReportData{} + +// BulkTrafficReportData struct for BulkTrafficReportData +type BulkTrafficReportData struct { + Requests *int32 `json:"requests,omitempty"` + IngressBytes *int32 `json:"ingress_bytes,omitempty"` + EgressBytes *BulkTrafficReportDataEgressBytes `json:"egress_bytes,omitempty"` +} + +// NewBulkTrafficReportData instantiates a new BulkTrafficReportData object +// This constructor will assign default values to properties that have it defined, +// 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 NewBulkTrafficReportData() *BulkTrafficReportData { + this := BulkTrafficReportData{} + return &this +} + +// NewBulkTrafficReportDataWithDefaults instantiates a new BulkTrafficReportData object +// This 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 NewBulkTrafficReportDataWithDefaults() *BulkTrafficReportData { + this := BulkTrafficReportData{} + return &this +} + +// GetRequests returns the Requests field value if set, zero value otherwise. +func (o *BulkTrafficReportData) GetRequests() int32 { + if o == nil || IsNil(o.Requests) { + var ret int32 + return ret + } + return *o.Requests +} + +// GetRequestsOk returns a tuple with the Requests field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BulkTrafficReportData) GetRequestsOk() (*int32, bool) { + if o == nil || IsNil(o.Requests) { + return nil, false + } + return o.Requests, true +} + +// HasRequests returns a boolean if a field has been set. +func (o *BulkTrafficReportData) HasRequests() bool { + if o != nil && !IsNil(o.Requests) { + return true + } + + return false +} + +// SetRequests gets a reference to the given int32 and assigns it to the Requests field. +func (o *BulkTrafficReportData) SetRequests(v int32) { + o.Requests = &v +} + +// GetIngressBytes returns the IngressBytes field value if set, zero value otherwise. +func (o *BulkTrafficReportData) GetIngressBytes() int32 { + if o == nil || IsNil(o.IngressBytes) { + var ret int32 + return ret + } + return *o.IngressBytes +} + +// GetIngressBytesOk returns a tuple with the IngressBytes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BulkTrafficReportData) GetIngressBytesOk() (*int32, bool) { + if o == nil || IsNil(o.IngressBytes) { + return nil, false + } + return o.IngressBytes, true +} + +// HasIngressBytes returns a boolean if a field has been set. +func (o *BulkTrafficReportData) HasIngressBytes() bool { + if o != nil && !IsNil(o.IngressBytes) { + return true + } + + return false +} + +// SetIngressBytes gets a reference to the given int32 and assigns it to the IngressBytes field. +func (o *BulkTrafficReportData) SetIngressBytes(v int32) { + o.IngressBytes = &v +} + +// GetEgressBytes returns the EgressBytes field value if set, zero value otherwise. +func (o *BulkTrafficReportData) GetEgressBytes() BulkTrafficReportDataEgressBytes { + if o == nil || IsNil(o.EgressBytes) { + var ret BulkTrafficReportDataEgressBytes + return ret + } + return *o.EgressBytes +} + +// GetEgressBytesOk returns a tuple with the EgressBytes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BulkTrafficReportData) GetEgressBytesOk() (*BulkTrafficReportDataEgressBytes, bool) { + if o == nil || IsNil(o.EgressBytes) { + return nil, false + } + return o.EgressBytes, true +} + +// HasEgressBytes returns a boolean if a field has been set. +func (o *BulkTrafficReportData) HasEgressBytes() bool { + if o != nil && !IsNil(o.EgressBytes) { + return true + } + + return false +} + +// SetEgressBytes gets a reference to the given BulkTrafficReportDataEgressBytes and assigns it to the EgressBytes field. +func (o *BulkTrafficReportData) SetEgressBytes(v BulkTrafficReportDataEgressBytes) { + o.EgressBytes = &v +} + +func (o BulkTrafficReportData) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o BulkTrafficReportData) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Requests) { + toSerialize["requests"] = o.Requests + } + if !IsNil(o.IngressBytes) { + toSerialize["ingress_bytes"] = o.IngressBytes + } + if !IsNil(o.EgressBytes) { + toSerialize["egress_bytes"] = o.EgressBytes + } + return toSerialize, nil +} + +type NullableBulkTrafficReportData struct { + value *BulkTrafficReportData + isSet bool +} + +func (v NullableBulkTrafficReportData) Get() *BulkTrafficReportData { + return v.value +} + +func (v *NullableBulkTrafficReportData) Set(val *BulkTrafficReportData) { + v.value = val + v.isSet = true +} + +func (v NullableBulkTrafficReportData) IsSet() bool { + return v.isSet +} + +func (v *NullableBulkTrafficReportData) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBulkTrafficReportData(val *BulkTrafficReportData) *NullableBulkTrafficReportData { + return &NullableBulkTrafficReportData{value: val, isSet: true} +} + +func (v NullableBulkTrafficReportData) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBulkTrafficReportData) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_bulk_traffic_report_data_egress_bytes.go b/model_bulk_traffic_report_data_egress_bytes.go new file mode 100644 index 0000000..55a35dc --- /dev/null +++ b/model_bulk_traffic_report_data_egress_bytes.go @@ -0,0 +1,198 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the BulkTrafficReportDataEgressBytes type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &BulkTrafficReportDataEgressBytes{} + +// BulkTrafficReportDataEgressBytes struct for BulkTrafficReportDataEgressBytes +type BulkTrafficReportDataEgressBytes struct { + Iran *int32 `json:"iran,omitempty"` + EuropeAmericas *int32 `json:"europe_americas,omitempty"` + Others *int32 `json:"others,omitempty"` +} + +// NewBulkTrafficReportDataEgressBytes instantiates a new BulkTrafficReportDataEgressBytes object +// This constructor will assign default values to properties that have it defined, +// 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 NewBulkTrafficReportDataEgressBytes() *BulkTrafficReportDataEgressBytes { + this := BulkTrafficReportDataEgressBytes{} + return &this +} + +// NewBulkTrafficReportDataEgressBytesWithDefaults instantiates a new BulkTrafficReportDataEgressBytes object +// This 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 NewBulkTrafficReportDataEgressBytesWithDefaults() *BulkTrafficReportDataEgressBytes { + this := BulkTrafficReportDataEgressBytes{} + return &this +} + +// GetIran returns the Iran field value if set, zero value otherwise. +func (o *BulkTrafficReportDataEgressBytes) GetIran() int32 { + if o == nil || IsNil(o.Iran) { + var ret int32 + return ret + } + return *o.Iran +} + +// GetIranOk returns a tuple with the Iran field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BulkTrafficReportDataEgressBytes) GetIranOk() (*int32, bool) { + if o == nil || IsNil(o.Iran) { + return nil, false + } + return o.Iran, true +} + +// HasIran returns a boolean if a field has been set. +func (o *BulkTrafficReportDataEgressBytes) HasIran() bool { + if o != nil && !IsNil(o.Iran) { + return true + } + + return false +} + +// SetIran gets a reference to the given int32 and assigns it to the Iran field. +func (o *BulkTrafficReportDataEgressBytes) SetIran(v int32) { + o.Iran = &v +} + +// GetEuropeAmericas returns the EuropeAmericas field value if set, zero value otherwise. +func (o *BulkTrafficReportDataEgressBytes) GetEuropeAmericas() int32 { + if o == nil || IsNil(o.EuropeAmericas) { + var ret int32 + return ret + } + return *o.EuropeAmericas +} + +// GetEuropeAmericasOk returns a tuple with the EuropeAmericas field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BulkTrafficReportDataEgressBytes) GetEuropeAmericasOk() (*int32, bool) { + if o == nil || IsNil(o.EuropeAmericas) { + return nil, false + } + return o.EuropeAmericas, true +} + +// HasEuropeAmericas returns a boolean if a field has been set. +func (o *BulkTrafficReportDataEgressBytes) HasEuropeAmericas() bool { + if o != nil && !IsNil(o.EuropeAmericas) { + return true + } + + return false +} + +// SetEuropeAmericas gets a reference to the given int32 and assigns it to the EuropeAmericas field. +func (o *BulkTrafficReportDataEgressBytes) SetEuropeAmericas(v int32) { + o.EuropeAmericas = &v +} + +// GetOthers returns the Others field value if set, zero value otherwise. +func (o *BulkTrafficReportDataEgressBytes) GetOthers() int32 { + if o == nil || IsNil(o.Others) { + var ret int32 + return ret + } + return *o.Others +} + +// GetOthersOk returns a tuple with the Others field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BulkTrafficReportDataEgressBytes) GetOthersOk() (*int32, bool) { + if o == nil || IsNil(o.Others) { + return nil, false + } + return o.Others, true +} + +// HasOthers returns a boolean if a field has been set. +func (o *BulkTrafficReportDataEgressBytes) HasOthers() bool { + if o != nil && !IsNil(o.Others) { + return true + } + + return false +} + +// SetOthers gets a reference to the given int32 and assigns it to the Others field. +func (o *BulkTrafficReportDataEgressBytes) SetOthers(v int32) { + o.Others = &v +} + +func (o BulkTrafficReportDataEgressBytes) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o BulkTrafficReportDataEgressBytes) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Iran) { + toSerialize["iran"] = o.Iran + } + if !IsNil(o.EuropeAmericas) { + toSerialize["europe_americas"] = o.EuropeAmericas + } + if !IsNil(o.Others) { + toSerialize["others"] = o.Others + } + return toSerialize, nil +} + +type NullableBulkTrafficReportDataEgressBytes struct { + value *BulkTrafficReportDataEgressBytes + isSet bool +} + +func (v NullableBulkTrafficReportDataEgressBytes) Get() *BulkTrafficReportDataEgressBytes { + return v.value +} + +func (v *NullableBulkTrafficReportDataEgressBytes) Set(val *BulkTrafficReportDataEgressBytes) { + v.value = val + v.isSet = true +} + +func (v NullableBulkTrafficReportDataEgressBytes) IsSet() bool { + return v.isSet +} + +func (v *NullableBulkTrafficReportDataEgressBytes) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBulkTrafficReportDataEgressBytes(val *BulkTrafficReportDataEgressBytes) *NullableBulkTrafficReportDataEgressBytes { + return &NullableBulkTrafficReportDataEgressBytes{value: val, isSet: true} +} + +func (v NullableBulkTrafficReportDataEgressBytes) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBulkTrafficReportDataEgressBytes) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_bulk_visitor_report.go b/model_bulk_visitor_report.go new file mode 100644 index 0000000..f36a079 --- /dev/null +++ b/model_bulk_visitor_report.go @@ -0,0 +1,246 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the BulkVisitorReport type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &BulkVisitorReport{} + +// BulkVisitorReport struct for BulkVisitorReport +type BulkVisitorReport struct { + // Domain's ID + Resource *string `json:"resource,omitempty"` + Success *bool `json:"success,omitempty"` + // The error message + Message NullableString `json:"message,omitempty"` + Data *BulkVisitorReportData `json:"data,omitempty"` +} + +// NewBulkVisitorReport instantiates a new BulkVisitorReport object +// This constructor will assign default values to properties that have it defined, +// 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 NewBulkVisitorReport() *BulkVisitorReport { + this := BulkVisitorReport{} + return &this +} + +// NewBulkVisitorReportWithDefaults instantiates a new BulkVisitorReport object +// This 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 NewBulkVisitorReportWithDefaults() *BulkVisitorReport { + this := BulkVisitorReport{} + return &this +} + +// GetResource returns the Resource field value if set, zero value otherwise. +func (o *BulkVisitorReport) GetResource() string { + if o == nil || IsNil(o.Resource) { + var ret string + return ret + } + return *o.Resource +} + +// GetResourceOk returns a tuple with the Resource field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BulkVisitorReport) GetResourceOk() (*string, bool) { + if o == nil || IsNil(o.Resource) { + return nil, false + } + return o.Resource, true +} + +// HasResource returns a boolean if a field has been set. +func (o *BulkVisitorReport) HasResource() bool { + if o != nil && !IsNil(o.Resource) { + return true + } + + return false +} + +// SetResource gets a reference to the given string and assigns it to the Resource field. +func (o *BulkVisitorReport) SetResource(v string) { + o.Resource = &v +} + +// GetSuccess returns the Success field value if set, zero value otherwise. +func (o *BulkVisitorReport) GetSuccess() bool { + if o == nil || IsNil(o.Success) { + var ret bool + return ret + } + return *o.Success +} + +// GetSuccessOk returns a tuple with the Success field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BulkVisitorReport) GetSuccessOk() (*bool, bool) { + if o == nil || IsNil(o.Success) { + return nil, false + } + return o.Success, true +} + +// HasSuccess returns a boolean if a field has been set. +func (o *BulkVisitorReport) HasSuccess() bool { + if o != nil && !IsNil(o.Success) { + return true + } + + return false +} + +// SetSuccess gets a reference to the given bool and assigns it to the Success field. +func (o *BulkVisitorReport) SetSuccess(v bool) { + o.Success = &v +} + +// GetMessage returns the Message field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *BulkVisitorReport) GetMessage() string { + if o == nil || IsNil(o.Message.Get()) { + var ret string + return ret + } + return *o.Message.Get() +} + +// GetMessageOk returns a tuple with the Message 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 *BulkVisitorReport) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Message.Get(), o.Message.IsSet() +} + +// HasMessage returns a boolean if a field has been set. +func (o *BulkVisitorReport) HasMessage() bool { + if o != nil && o.Message.IsSet() { + return true + } + + return false +} + +// SetMessage gets a reference to the given NullableString and assigns it to the Message field. +func (o *BulkVisitorReport) SetMessage(v string) { + o.Message.Set(&v) +} +// SetMessageNil sets the value for Message to be an explicit nil +func (o *BulkVisitorReport) SetMessageNil() { + o.Message.Set(nil) +} + +// UnsetMessage ensures that no value is present for Message, not even an explicit nil +func (o *BulkVisitorReport) UnsetMessage() { + o.Message.Unset() +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *BulkVisitorReport) GetData() BulkVisitorReportData { + if o == nil || IsNil(o.Data) { + var ret BulkVisitorReportData + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BulkVisitorReport) GetDataOk() (*BulkVisitorReportData, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *BulkVisitorReport) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given BulkVisitorReportData and assigns it to the Data field. +func (o *BulkVisitorReport) SetData(v BulkVisitorReportData) { + o.Data = &v +} + +func (o BulkVisitorReport) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o BulkVisitorReport) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Resource) { + toSerialize["resource"] = o.Resource + } + if !IsNil(o.Success) { + toSerialize["success"] = o.Success + } + if o.Message.IsSet() { + toSerialize["message"] = o.Message.Get() + } + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + return toSerialize, nil +} + +type NullableBulkVisitorReport struct { + value *BulkVisitorReport + isSet bool +} + +func (v NullableBulkVisitorReport) Get() *BulkVisitorReport { + return v.value +} + +func (v *NullableBulkVisitorReport) Set(val *BulkVisitorReport) { + v.value = val + v.isSet = true +} + +func (v NullableBulkVisitorReport) IsSet() bool { + return v.isSet +} + +func (v *NullableBulkVisitorReport) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBulkVisitorReport(val *BulkVisitorReport) *NullableBulkVisitorReport { + return &NullableBulkVisitorReport{value: val, isSet: true} +} + +func (v NullableBulkVisitorReport) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBulkVisitorReport) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_bulk_visitor_report_data.go b/model_bulk_visitor_report_data.go new file mode 100644 index 0000000..aed1f1c --- /dev/null +++ b/model_bulk_visitor_report_data.go @@ -0,0 +1,126 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the BulkVisitorReportData type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &BulkVisitorReportData{} + +// BulkVisitorReportData struct for BulkVisitorReportData +type BulkVisitorReportData struct { + Visitors *int32 `json:"visitors,omitempty"` +} + +// NewBulkVisitorReportData instantiates a new BulkVisitorReportData object +// This constructor will assign default values to properties that have it defined, +// 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 NewBulkVisitorReportData() *BulkVisitorReportData { + this := BulkVisitorReportData{} + return &this +} + +// NewBulkVisitorReportDataWithDefaults instantiates a new BulkVisitorReportData object +// This 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 NewBulkVisitorReportDataWithDefaults() *BulkVisitorReportData { + this := BulkVisitorReportData{} + return &this +} + +// GetVisitors returns the Visitors field value if set, zero value otherwise. +func (o *BulkVisitorReportData) GetVisitors() int32 { + if o == nil || IsNil(o.Visitors) { + var ret int32 + return ret + } + return *o.Visitors +} + +// GetVisitorsOk returns a tuple with the Visitors field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BulkVisitorReportData) GetVisitorsOk() (*int32, bool) { + if o == nil || IsNil(o.Visitors) { + return nil, false + } + return o.Visitors, true +} + +// HasVisitors returns a boolean if a field has been set. +func (o *BulkVisitorReportData) HasVisitors() bool { + if o != nil && !IsNil(o.Visitors) { + return true + } + + return false +} + +// SetVisitors gets a reference to the given int32 and assigns it to the Visitors field. +func (o *BulkVisitorReportData) SetVisitors(v int32) { + o.Visitors = &v +} + +func (o BulkVisitorReportData) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o BulkVisitorReportData) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Visitors) { + toSerialize["visitors"] = o.Visitors + } + return toSerialize, nil +} + +type NullableBulkVisitorReportData struct { + value *BulkVisitorReportData + isSet bool +} + +func (v NullableBulkVisitorReportData) Get() *BulkVisitorReportData { + return v.value +} + +func (v *NullableBulkVisitorReportData) Set(val *BulkVisitorReportData) { + v.value = val + v.isSet = true +} + +func (v NullableBulkVisitorReportData) IsSet() bool { + return v.isSet +} + +func (v *NullableBulkVisitorReportData) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBulkVisitorReportData(val *BulkVisitorReportData) *NullableBulkVisitorReportData { + return &NullableBulkVisitorReportData{value: val, isSet: true} +} + +func (v NullableBulkVisitorReportData) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBulkVisitorReportData) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_bypass_action.go b/model_bypass_action.go new file mode 100644 index 0000000..8d5e7f0 --- /dev/null +++ b/model_bypass_action.go @@ -0,0 +1,198 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the BypassAction type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &BypassAction{} + +// BypassAction struct for BypassAction +type BypassAction struct { + Rlimit *bool `json:"rlimit,omitempty"` + Challenge *bool `json:"challenge,omitempty"` + Waf *bool `json:"waf,omitempty"` +} + +// NewBypassAction instantiates a new BypassAction object +// This constructor will assign default values to properties that have it defined, +// 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 NewBypassAction() *BypassAction { + this := BypassAction{} + return &this +} + +// NewBypassActionWithDefaults instantiates a new BypassAction object +// This 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 NewBypassActionWithDefaults() *BypassAction { + this := BypassAction{} + return &this +} + +// GetRlimit returns the Rlimit field value if set, zero value otherwise. +func (o *BypassAction) GetRlimit() bool { + if o == nil || IsNil(o.Rlimit) { + var ret bool + return ret + } + return *o.Rlimit +} + +// GetRlimitOk returns a tuple with the Rlimit field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BypassAction) GetRlimitOk() (*bool, bool) { + if o == nil || IsNil(o.Rlimit) { + return nil, false + } + return o.Rlimit, true +} + +// HasRlimit returns a boolean if a field has been set. +func (o *BypassAction) HasRlimit() bool { + if o != nil && !IsNil(o.Rlimit) { + return true + } + + return false +} + +// SetRlimit gets a reference to the given bool and assigns it to the Rlimit field. +func (o *BypassAction) SetRlimit(v bool) { + o.Rlimit = &v +} + +// GetChallenge returns the Challenge field value if set, zero value otherwise. +func (o *BypassAction) GetChallenge() bool { + if o == nil || IsNil(o.Challenge) { + var ret bool + return ret + } + return *o.Challenge +} + +// GetChallengeOk returns a tuple with the Challenge field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BypassAction) GetChallengeOk() (*bool, bool) { + if o == nil || IsNil(o.Challenge) { + return nil, false + } + return o.Challenge, true +} + +// HasChallenge returns a boolean if a field has been set. +func (o *BypassAction) HasChallenge() bool { + if o != nil && !IsNil(o.Challenge) { + return true + } + + return false +} + +// SetChallenge gets a reference to the given bool and assigns it to the Challenge field. +func (o *BypassAction) SetChallenge(v bool) { + o.Challenge = &v +} + +// GetWaf returns the Waf field value if set, zero value otherwise. +func (o *BypassAction) GetWaf() bool { + if o == nil || IsNil(o.Waf) { + var ret bool + return ret + } + return *o.Waf +} + +// GetWafOk returns a tuple with the Waf field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BypassAction) GetWafOk() (*bool, bool) { + if o == nil || IsNil(o.Waf) { + return nil, false + } + return o.Waf, true +} + +// HasWaf returns a boolean if a field has been set. +func (o *BypassAction) HasWaf() bool { + if o != nil && !IsNil(o.Waf) { + return true + } + + return false +} + +// SetWaf gets a reference to the given bool and assigns it to the Waf field. +func (o *BypassAction) SetWaf(v bool) { + o.Waf = &v +} + +func (o BypassAction) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o BypassAction) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Rlimit) { + toSerialize["rlimit"] = o.Rlimit + } + if !IsNil(o.Challenge) { + toSerialize["challenge"] = o.Challenge + } + if !IsNil(o.Waf) { + toSerialize["waf"] = o.Waf + } + return toSerialize, nil +} + +type NullableBypassAction struct { + value *BypassAction + isSet bool +} + +func (v NullableBypassAction) Get() *BypassAction { + return v.value +} + +func (v *NullableBypassAction) Set(val *BypassAction) { + v.value = val + v.isSet = true +} + +func (v NullableBypassAction) IsSet() bool { + return v.isSet +} + +func (v *NullableBypassAction) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBypassAction(val *BypassAction) *NullableBypassAction { + return &NullableBypassAction{value: val, isSet: true} +} + +func (v NullableBypassAction) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBypassAction) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_caa_record.go b/model_caa_record.go new file mode 100644 index 0000000..733406e --- /dev/null +++ b/model_caa_record.go @@ -0,0 +1,520 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" + "time" +) + +// checks if the CAARecord type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CAARecord{} + +// CAARecord struct for CAARecord +type CAARecord struct { + Value *CAARecordValue `json:"value,omitempty"` + Type *string `json:"type,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Ttl *int32 `json:"ttl,omitempty"` + Cloud *bool `json:"cloud,omitempty"` + UpstreamHttps *string `json:"upstream_https,omitempty"` + IpFilterMode *DnsRecordIpFilterMode `json:"ip_filter_mode,omitempty"` + // Protected records cannot be modified or deleted by user. + IsProtected *bool `json:"is_protected,omitempty"` + Usage []string `json:"usage,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty"` + UpdatedAt *time.Time `json:"updated_at,omitempty"` +} + +// NewCAARecord instantiates a new CAARecord object +// This constructor will assign default values to properties that have it defined, +// 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 NewCAARecord() *CAARecord { + this := CAARecord{} + var cloud bool = false + this.Cloud = &cloud + return &this +} + +// NewCAARecordWithDefaults instantiates a new CAARecord object +// This 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 NewCAARecordWithDefaults() *CAARecord { + this := CAARecord{} + var type_ string = "caa" + this.Type = &type_ + var cloud bool = false + this.Cloud = &cloud + return &this +} + +// GetValue returns the Value field value if set, zero value otherwise. +func (o *CAARecord) GetValue() CAARecordValue { + if o == nil || IsNil(o.Value) { + var ret CAARecordValue + return ret + } + return *o.Value +} + +// GetValueOk returns a tuple with the Value field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CAARecord) GetValueOk() (*CAARecordValue, bool) { + if o == nil || IsNil(o.Value) { + return nil, false + } + return o.Value, true +} + +// HasValue returns a boolean if a field has been set. +func (o *CAARecord) HasValue() bool { + if o != nil && !IsNil(o.Value) { + return true + } + + return false +} + +// SetValue gets a reference to the given CAARecordValue and assigns it to the Value field. +func (o *CAARecord) SetValue(v CAARecordValue) { + o.Value = &v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *CAARecord) 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 *CAARecord) 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 *CAARecord) 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 *CAARecord) SetType(v string) { + o.Type = &v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *CAARecord) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CAARecord) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *CAARecord) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *CAARecord) SetId(v string) { + o.Id = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *CAARecord) 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 *CAARecord) 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 *CAARecord) 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 *CAARecord) SetName(v string) { + o.Name = &v +} + +// GetTtl returns the Ttl field value if set, zero value otherwise. +func (o *CAARecord) GetTtl() int32 { + if o == nil || IsNil(o.Ttl) { + var ret int32 + return ret + } + return *o.Ttl +} + +// GetTtlOk returns a tuple with the Ttl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CAARecord) GetTtlOk() (*int32, bool) { + if o == nil || IsNil(o.Ttl) { + return nil, false + } + return o.Ttl, true +} + +// HasTtl returns a boolean if a field has been set. +func (o *CAARecord) HasTtl() bool { + if o != nil && !IsNil(o.Ttl) { + return true + } + + return false +} + +// SetTtl gets a reference to the given int32 and assigns it to the Ttl field. +func (o *CAARecord) SetTtl(v int32) { + o.Ttl = &v +} + +// GetCloud returns the Cloud field value if set, zero value otherwise. +func (o *CAARecord) GetCloud() bool { + if o == nil || IsNil(o.Cloud) { + var ret bool + return ret + } + return *o.Cloud +} + +// GetCloudOk returns a tuple with the Cloud field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CAARecord) GetCloudOk() (*bool, bool) { + if o == nil || IsNil(o.Cloud) { + return nil, false + } + return o.Cloud, true +} + +// HasCloud returns a boolean if a field has been set. +func (o *CAARecord) HasCloud() bool { + if o != nil && !IsNil(o.Cloud) { + return true + } + + return false +} + +// SetCloud gets a reference to the given bool and assigns it to the Cloud field. +func (o *CAARecord) SetCloud(v bool) { + o.Cloud = &v +} + +// GetUpstreamHttps returns the UpstreamHttps field value if set, zero value otherwise. +func (o *CAARecord) GetUpstreamHttps() string { + if o == nil || IsNil(o.UpstreamHttps) { + var ret string + return ret + } + return *o.UpstreamHttps +} + +// GetUpstreamHttpsOk returns a tuple with the UpstreamHttps field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CAARecord) GetUpstreamHttpsOk() (*string, bool) { + if o == nil || IsNil(o.UpstreamHttps) { + return nil, false + } + return o.UpstreamHttps, true +} + +// HasUpstreamHttps returns a boolean if a field has been set. +func (o *CAARecord) HasUpstreamHttps() bool { + if o != nil && !IsNil(o.UpstreamHttps) { + return true + } + + return false +} + +// SetUpstreamHttps gets a reference to the given string and assigns it to the UpstreamHttps field. +func (o *CAARecord) SetUpstreamHttps(v string) { + o.UpstreamHttps = &v +} + +// GetIpFilterMode returns the IpFilterMode field value if set, zero value otherwise. +func (o *CAARecord) GetIpFilterMode() DnsRecordIpFilterMode { + if o == nil || IsNil(o.IpFilterMode) { + var ret DnsRecordIpFilterMode + return ret + } + return *o.IpFilterMode +} + +// GetIpFilterModeOk returns a tuple with the IpFilterMode field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CAARecord) GetIpFilterModeOk() (*DnsRecordIpFilterMode, bool) { + if o == nil || IsNil(o.IpFilterMode) { + return nil, false + } + return o.IpFilterMode, true +} + +// HasIpFilterMode returns a boolean if a field has been set. +func (o *CAARecord) HasIpFilterMode() bool { + if o != nil && !IsNil(o.IpFilterMode) { + return true + } + + return false +} + +// SetIpFilterMode gets a reference to the given DnsRecordIpFilterMode and assigns it to the IpFilterMode field. +func (o *CAARecord) SetIpFilterMode(v DnsRecordIpFilterMode) { + o.IpFilterMode = &v +} + +// GetIsProtected returns the IsProtected field value if set, zero value otherwise. +func (o *CAARecord) GetIsProtected() bool { + if o == nil || IsNil(o.IsProtected) { + var ret bool + return ret + } + return *o.IsProtected +} + +// GetIsProtectedOk returns a tuple with the IsProtected field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CAARecord) GetIsProtectedOk() (*bool, bool) { + if o == nil || IsNil(o.IsProtected) { + return nil, false + } + return o.IsProtected, true +} + +// HasIsProtected returns a boolean if a field has been set. +func (o *CAARecord) HasIsProtected() bool { + if o != nil && !IsNil(o.IsProtected) { + return true + } + + return false +} + +// SetIsProtected gets a reference to the given bool and assigns it to the IsProtected field. +func (o *CAARecord) SetIsProtected(v bool) { + o.IsProtected = &v +} + +// GetUsage returns the Usage field value if set, zero value otherwise. +func (o *CAARecord) GetUsage() []string { + if o == nil || IsNil(o.Usage) { + var ret []string + return ret + } + return o.Usage +} + +// GetUsageOk returns a tuple with the Usage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CAARecord) GetUsageOk() ([]string, bool) { + if o == nil || IsNil(o.Usage) { + return nil, false + } + return o.Usage, true +} + +// HasUsage returns a boolean if a field has been set. +func (o *CAARecord) HasUsage() bool { + if o != nil && !IsNil(o.Usage) { + return true + } + + return false +} + +// SetUsage gets a reference to the given []string and assigns it to the Usage field. +func (o *CAARecord) SetUsage(v []string) { + o.Usage = v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *CAARecord) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CAARecord) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *CAARecord) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *CAARecord) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *CAARecord) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CAARecord) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *CAARecord) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *CAARecord) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +func (o CAARecord) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CAARecord) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Value) { + toSerialize["value"] = o.Value + } + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + // skip: id is readOnly + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Ttl) { + toSerialize["ttl"] = o.Ttl + } + if !IsNil(o.Cloud) { + toSerialize["cloud"] = o.Cloud + } + if !IsNil(o.UpstreamHttps) { + toSerialize["upstream_https"] = o.UpstreamHttps + } + if !IsNil(o.IpFilterMode) { + toSerialize["ip_filter_mode"] = o.IpFilterMode + } + // skip: is_protected is readOnly + // skip: usage is readOnly + // skip: created_at is readOnly + // skip: updated_at is readOnly + return toSerialize, nil +} + +type NullableCAARecord struct { + value *CAARecord + isSet bool +} + +func (v NullableCAARecord) Get() *CAARecord { + return v.value +} + +func (v *NullableCAARecord) Set(val *CAARecord) { + v.value = val + v.isSet = true +} + +func (v NullableCAARecord) IsSet() bool { + return v.isSet +} + +func (v *NullableCAARecord) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCAARecord(val *CAARecord) *NullableCAARecord { + return &NullableCAARecord{value: val, isSet: true} +} + +func (v NullableCAARecord) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCAARecord) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_caa_record_value.go b/model_caa_record_value.go new file mode 100644 index 0000000..b9e99ac --- /dev/null +++ b/model_caa_record_value.go @@ -0,0 +1,145 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the CAARecordValue type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CAARecordValue{} + +// CAARecordValue struct for CAARecordValue +type CAARecordValue struct { + // Should be a valid domain + Value string `json:"value"` + Tag string `json:"tag"` +} + +// NewCAARecordValue instantiates a new CAARecordValue object +// This constructor will assign default values to properties that have it defined, +// 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 NewCAARecordValue(value string, tag string) *CAARecordValue { + this := CAARecordValue{} + this.Value = value + this.Tag = tag + return &this +} + +// NewCAARecordValueWithDefaults instantiates a new CAARecordValue object +// This 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 NewCAARecordValueWithDefaults() *CAARecordValue { + this := CAARecordValue{} + return &this +} + +// GetValue returns the Value field value +func (o *CAARecordValue) 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 *CAARecordValue) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Value, true +} + +// SetValue sets field value +func (o *CAARecordValue) SetValue(v string) { + o.Value = v +} + +// GetTag returns the Tag field value +func (o *CAARecordValue) GetTag() string { + if o == nil { + var ret string + return ret + } + + return o.Tag +} + +// GetTagOk returns a tuple with the Tag field value +// and a boolean to check if the value has been set. +func (o *CAARecordValue) GetTagOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Tag, true +} + +// SetTag sets field value +func (o *CAARecordValue) SetTag(v string) { + o.Tag = v +} + +func (o CAARecordValue) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CAARecordValue) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["value"] = o.Value + toSerialize["tag"] = o.Tag + return toSerialize, nil +} + +type NullableCAARecordValue struct { + value *CAARecordValue + isSet bool +} + +func (v NullableCAARecordValue) Get() *CAARecordValue { + return v.value +} + +func (v *NullableCAARecordValue) Set(val *CAARecordValue) { + v.value = val + v.isSet = true +} + +func (v NullableCAARecordValue) IsSet() bool { + return v.isSet +} + +func (v *NullableCAARecordValue) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCAARecordValue(val *CAARecordValue) *NullableCAARecordValue { + return &NullableCAARecordValue{value: val, isSet: true} +} + +func (v NullableCAARecordValue) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCAARecordValue) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_cache_settings.go b/model_cache_settings.go new file mode 100644 index 0000000..c9bed1d --- /dev/null +++ b/model_cache_settings.go @@ -0,0 +1,499 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the CacheSettings type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CacheSettings{} + +// CacheSettings struct for CacheSettings +type CacheSettings struct { + CacheDeveloperMode *bool `json:"cache_developer_mode,omitempty"` + CacheConsistentUptime *bool `json:"cache_consistent_uptime,omitempty"` + CacheStatus *string `json:"cache_status,omitempty"` + CachePage200 *string `json:"cache_page_200,omitempty"` + CachePageAny *string `json:"cache_page_any,omitempty"` + CacheBrowser *string `json:"cache_browser,omitempty"` + // To consider scheme (HTTP/HTTPs) in cache + // Deprecated + CacheScheme *bool `json:"cache_scheme,omitempty"` + // Ignore default behavior in caching set-cookie header + CacheIgnoreSc *bool `json:"cache_ignore_sc,omitempty"` + // Cookie variables to consider in cache (comma separaterd values) + CacheCookie *string `json:"cache_cookie,omitempty"` + // To consider query args or not + CacheArgs *bool `json:"cache_args,omitempty"` + // Query string arguments to consider in cache (& seperated values) + CacheArg *string `json:"cache_arg,omitempty"` +} + +// NewCacheSettings instantiates a new CacheSettings object +// This constructor will assign default values to properties that have it defined, +// 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 NewCacheSettings() *CacheSettings { + this := CacheSettings{} + var cacheArg string = "" + this.CacheArg = &cacheArg + return &this +} + +// NewCacheSettingsWithDefaults instantiates a new CacheSettings object +// This 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 NewCacheSettingsWithDefaults() *CacheSettings { + this := CacheSettings{} + var cacheArg string = "" + this.CacheArg = &cacheArg + return &this +} + +// GetCacheDeveloperMode returns the CacheDeveloperMode field value if set, zero value otherwise. +func (o *CacheSettings) GetCacheDeveloperMode() bool { + if o == nil || IsNil(o.CacheDeveloperMode) { + var ret bool + return ret + } + return *o.CacheDeveloperMode +} + +// GetCacheDeveloperModeOk returns a tuple with the CacheDeveloperMode field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CacheSettings) GetCacheDeveloperModeOk() (*bool, bool) { + if o == nil || IsNil(o.CacheDeveloperMode) { + return nil, false + } + return o.CacheDeveloperMode, true +} + +// HasCacheDeveloperMode returns a boolean if a field has been set. +func (o *CacheSettings) HasCacheDeveloperMode() bool { + if o != nil && !IsNil(o.CacheDeveloperMode) { + return true + } + + return false +} + +// SetCacheDeveloperMode gets a reference to the given bool and assigns it to the CacheDeveloperMode field. +func (o *CacheSettings) SetCacheDeveloperMode(v bool) { + o.CacheDeveloperMode = &v +} + +// GetCacheConsistentUptime returns the CacheConsistentUptime field value if set, zero value otherwise. +func (o *CacheSettings) GetCacheConsistentUptime() bool { + if o == nil || IsNil(o.CacheConsistentUptime) { + var ret bool + return ret + } + return *o.CacheConsistentUptime +} + +// GetCacheConsistentUptimeOk returns a tuple with the CacheConsistentUptime field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CacheSettings) GetCacheConsistentUptimeOk() (*bool, bool) { + if o == nil || IsNil(o.CacheConsistentUptime) { + return nil, false + } + return o.CacheConsistentUptime, true +} + +// HasCacheConsistentUptime returns a boolean if a field has been set. +func (o *CacheSettings) HasCacheConsistentUptime() bool { + if o != nil && !IsNil(o.CacheConsistentUptime) { + return true + } + + return false +} + +// SetCacheConsistentUptime gets a reference to the given bool and assigns it to the CacheConsistentUptime field. +func (o *CacheSettings) SetCacheConsistentUptime(v bool) { + o.CacheConsistentUptime = &v +} + +// GetCacheStatus returns the CacheStatus field value if set, zero value otherwise. +func (o *CacheSettings) GetCacheStatus() string { + if o == nil || IsNil(o.CacheStatus) { + var ret string + return ret + } + return *o.CacheStatus +} + +// GetCacheStatusOk returns a tuple with the CacheStatus field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CacheSettings) GetCacheStatusOk() (*string, bool) { + if o == nil || IsNil(o.CacheStatus) { + return nil, false + } + return o.CacheStatus, true +} + +// HasCacheStatus returns a boolean if a field has been set. +func (o *CacheSettings) HasCacheStatus() bool { + if o != nil && !IsNil(o.CacheStatus) { + return true + } + + return false +} + +// SetCacheStatus gets a reference to the given string and assigns it to the CacheStatus field. +func (o *CacheSettings) SetCacheStatus(v string) { + o.CacheStatus = &v +} + +// GetCachePage200 returns the CachePage200 field value if set, zero value otherwise. +func (o *CacheSettings) GetCachePage200() string { + if o == nil || IsNil(o.CachePage200) { + var ret string + return ret + } + return *o.CachePage200 +} + +// GetCachePage200Ok returns a tuple with the CachePage200 field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CacheSettings) GetCachePage200Ok() (*string, bool) { + if o == nil || IsNil(o.CachePage200) { + return nil, false + } + return o.CachePage200, true +} + +// HasCachePage200 returns a boolean if a field has been set. +func (o *CacheSettings) HasCachePage200() bool { + if o != nil && !IsNil(o.CachePage200) { + return true + } + + return false +} + +// SetCachePage200 gets a reference to the given string and assigns it to the CachePage200 field. +func (o *CacheSettings) SetCachePage200(v string) { + o.CachePage200 = &v +} + +// GetCachePageAny returns the CachePageAny field value if set, zero value otherwise. +func (o *CacheSettings) GetCachePageAny() string { + if o == nil || IsNil(o.CachePageAny) { + var ret string + return ret + } + return *o.CachePageAny +} + +// GetCachePageAnyOk returns a tuple with the CachePageAny field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CacheSettings) GetCachePageAnyOk() (*string, bool) { + if o == nil || IsNil(o.CachePageAny) { + return nil, false + } + return o.CachePageAny, true +} + +// HasCachePageAny returns a boolean if a field has been set. +func (o *CacheSettings) HasCachePageAny() bool { + if o != nil && !IsNil(o.CachePageAny) { + return true + } + + return false +} + +// SetCachePageAny gets a reference to the given string and assigns it to the CachePageAny field. +func (o *CacheSettings) SetCachePageAny(v string) { + o.CachePageAny = &v +} + +// GetCacheBrowser returns the CacheBrowser field value if set, zero value otherwise. +func (o *CacheSettings) GetCacheBrowser() string { + if o == nil || IsNil(o.CacheBrowser) { + var ret string + return ret + } + return *o.CacheBrowser +} + +// GetCacheBrowserOk returns a tuple with the CacheBrowser field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CacheSettings) GetCacheBrowserOk() (*string, bool) { + if o == nil || IsNil(o.CacheBrowser) { + return nil, false + } + return o.CacheBrowser, true +} + +// HasCacheBrowser returns a boolean if a field has been set. +func (o *CacheSettings) HasCacheBrowser() bool { + if o != nil && !IsNil(o.CacheBrowser) { + return true + } + + return false +} + +// SetCacheBrowser gets a reference to the given string and assigns it to the CacheBrowser field. +func (o *CacheSettings) SetCacheBrowser(v string) { + o.CacheBrowser = &v +} + +// GetCacheScheme returns the CacheScheme field value if set, zero value otherwise. +// Deprecated +func (o *CacheSettings) GetCacheScheme() bool { + if o == nil || IsNil(o.CacheScheme) { + var ret bool + return ret + } + return *o.CacheScheme +} + +// GetCacheSchemeOk returns a tuple with the CacheScheme field value if set, nil otherwise +// and a boolean to check if the value has been set. +// Deprecated +func (o *CacheSettings) GetCacheSchemeOk() (*bool, bool) { + if o == nil || IsNil(o.CacheScheme) { + return nil, false + } + return o.CacheScheme, true +} + +// HasCacheScheme returns a boolean if a field has been set. +func (o *CacheSettings) HasCacheScheme() bool { + if o != nil && !IsNil(o.CacheScheme) { + return true + } + + return false +} + +// SetCacheScheme gets a reference to the given bool and assigns it to the CacheScheme field. +// Deprecated +func (o *CacheSettings) SetCacheScheme(v bool) { + o.CacheScheme = &v +} + +// GetCacheIgnoreSc returns the CacheIgnoreSc field value if set, zero value otherwise. +func (o *CacheSettings) GetCacheIgnoreSc() bool { + if o == nil || IsNil(o.CacheIgnoreSc) { + var ret bool + return ret + } + return *o.CacheIgnoreSc +} + +// GetCacheIgnoreScOk returns a tuple with the CacheIgnoreSc field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CacheSettings) GetCacheIgnoreScOk() (*bool, bool) { + if o == nil || IsNil(o.CacheIgnoreSc) { + return nil, false + } + return o.CacheIgnoreSc, true +} + +// HasCacheIgnoreSc returns a boolean if a field has been set. +func (o *CacheSettings) HasCacheIgnoreSc() bool { + if o != nil && !IsNil(o.CacheIgnoreSc) { + return true + } + + return false +} + +// SetCacheIgnoreSc gets a reference to the given bool and assigns it to the CacheIgnoreSc field. +func (o *CacheSettings) SetCacheIgnoreSc(v bool) { + o.CacheIgnoreSc = &v +} + +// GetCacheCookie returns the CacheCookie field value if set, zero value otherwise. +func (o *CacheSettings) GetCacheCookie() string { + if o == nil || IsNil(o.CacheCookie) { + var ret string + return ret + } + return *o.CacheCookie +} + +// GetCacheCookieOk returns a tuple with the CacheCookie field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CacheSettings) GetCacheCookieOk() (*string, bool) { + if o == nil || IsNil(o.CacheCookie) { + return nil, false + } + return o.CacheCookie, true +} + +// HasCacheCookie returns a boolean if a field has been set. +func (o *CacheSettings) HasCacheCookie() bool { + if o != nil && !IsNil(o.CacheCookie) { + return true + } + + return false +} + +// SetCacheCookie gets a reference to the given string and assigns it to the CacheCookie field. +func (o *CacheSettings) SetCacheCookie(v string) { + o.CacheCookie = &v +} + +// GetCacheArgs returns the CacheArgs field value if set, zero value otherwise. +func (o *CacheSettings) GetCacheArgs() bool { + if o == nil || IsNil(o.CacheArgs) { + var ret bool + return ret + } + return *o.CacheArgs +} + +// GetCacheArgsOk returns a tuple with the CacheArgs field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CacheSettings) GetCacheArgsOk() (*bool, bool) { + if o == nil || IsNil(o.CacheArgs) { + return nil, false + } + return o.CacheArgs, true +} + +// HasCacheArgs returns a boolean if a field has been set. +func (o *CacheSettings) HasCacheArgs() bool { + if o != nil && !IsNil(o.CacheArgs) { + return true + } + + return false +} + +// SetCacheArgs gets a reference to the given bool and assigns it to the CacheArgs field. +func (o *CacheSettings) SetCacheArgs(v bool) { + o.CacheArgs = &v +} + +// GetCacheArg returns the CacheArg field value if set, zero value otherwise. +func (o *CacheSettings) GetCacheArg() string { + if o == nil || IsNil(o.CacheArg) { + var ret string + return ret + } + return *o.CacheArg +} + +// GetCacheArgOk returns a tuple with the CacheArg field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CacheSettings) GetCacheArgOk() (*string, bool) { + if o == nil || IsNil(o.CacheArg) { + return nil, false + } + return o.CacheArg, true +} + +// HasCacheArg returns a boolean if a field has been set. +func (o *CacheSettings) HasCacheArg() bool { + if o != nil && !IsNil(o.CacheArg) { + return true + } + + return false +} + +// SetCacheArg gets a reference to the given string and assigns it to the CacheArg field. +func (o *CacheSettings) SetCacheArg(v string) { + o.CacheArg = &v +} + +func (o CacheSettings) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CacheSettings) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.CacheDeveloperMode) { + toSerialize["cache_developer_mode"] = o.CacheDeveloperMode + } + if !IsNil(o.CacheConsistentUptime) { + toSerialize["cache_consistent_uptime"] = o.CacheConsistentUptime + } + if !IsNil(o.CacheStatus) { + toSerialize["cache_status"] = o.CacheStatus + } + if !IsNil(o.CachePage200) { + toSerialize["cache_page_200"] = o.CachePage200 + } + if !IsNil(o.CachePageAny) { + toSerialize["cache_page_any"] = o.CachePageAny + } + if !IsNil(o.CacheBrowser) { + toSerialize["cache_browser"] = o.CacheBrowser + } + if !IsNil(o.CacheScheme) { + toSerialize["cache_scheme"] = o.CacheScheme + } + if !IsNil(o.CacheIgnoreSc) { + toSerialize["cache_ignore_sc"] = o.CacheIgnoreSc + } + if !IsNil(o.CacheCookie) { + toSerialize["cache_cookie"] = o.CacheCookie + } + if !IsNil(o.CacheArgs) { + toSerialize["cache_args"] = o.CacheArgs + } + if !IsNil(o.CacheArg) { + toSerialize["cache_arg"] = o.CacheArg + } + return toSerialize, nil +} + +type NullableCacheSettings struct { + value *CacheSettings + isSet bool +} + +func (v NullableCacheSettings) Get() *CacheSettings { + return v.value +} + +func (v *NullableCacheSettings) Set(val *CacheSettings) { + v.value = val + v.isSet = true +} + +func (v NullableCacheSettings) IsSet() bool { + return v.isSet +} + +func (v *NullableCacheSettings) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCacheSettings(val *CacheSettings) *NullableCacheSettings { + return &NullableCacheSettings{value: val, isSet: true} +} + +func (v NullableCacheSettings) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCacheSettings) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_cache_settings_data.go b/model_cache_settings_data.go new file mode 100644 index 0000000..e5f3b1a --- /dev/null +++ b/model_cache_settings_data.go @@ -0,0 +1,126 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the CacheSettingsData type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CacheSettingsData{} + +// CacheSettingsData struct for CacheSettingsData +type CacheSettingsData struct { + Data *CacheSettings `json:"data,omitempty"` +} + +// NewCacheSettingsData instantiates a new CacheSettingsData object +// This constructor will assign default values to properties that have it defined, +// 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 NewCacheSettingsData() *CacheSettingsData { + this := CacheSettingsData{} + return &this +} + +// NewCacheSettingsDataWithDefaults instantiates a new CacheSettingsData object +// This 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 NewCacheSettingsDataWithDefaults() *CacheSettingsData { + this := CacheSettingsData{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *CacheSettingsData) GetData() CacheSettings { + if o == nil || IsNil(o.Data) { + var ret CacheSettings + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CacheSettingsData) GetDataOk() (*CacheSettings, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *CacheSettingsData) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given CacheSettings and assigns it to the Data field. +func (o *CacheSettingsData) SetData(v CacheSettings) { + o.Data = &v +} + +func (o CacheSettingsData) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CacheSettingsData) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + return toSerialize, nil +} + +type NullableCacheSettingsData struct { + value *CacheSettingsData + isSet bool +} + +func (v NullableCacheSettingsData) Get() *CacheSettingsData { + return v.value +} + +func (v *NullableCacheSettingsData) Set(val *CacheSettingsData) { + v.value = val + v.isSet = true +} + +func (v NullableCacheSettingsData) IsSet() bool { + return v.isSet +} + +func (v *NullableCacheSettingsData) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCacheSettingsData(val *CacheSettingsData) *NullableCacheSettingsData { + return &NullableCacheSettingsData{value: val, isSet: true} +} + +func (v NullableCacheSettingsData) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCacheSettingsData) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_caching_purge.go b/model_caching_purge.go new file mode 100644 index 0000000..b006541 --- /dev/null +++ b/model_caching_purge.go @@ -0,0 +1,196 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the CachingPurge type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CachingPurge{} + +// CachingPurge struct for CachingPurge +type CachingPurge struct { + // tags is deprecated + Purge string `json:"purge"` + // URLs to be purged from cache. Required if purge value is set to individual. + PurgeUrls []string `json:"purge_urls,omitempty"` + // Tags to be purged from cache. Required if purge value is set to tags. Each tag must be 32 characters or less. Only ASCII characters are acceptable. + // Deprecated + PurgeTags []string `json:"purge_tags,omitempty"` +} + +// NewCachingPurge instantiates a new CachingPurge object +// This constructor will assign default values to properties that have it defined, +// 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 NewCachingPurge(purge string) *CachingPurge { + this := CachingPurge{} + this.Purge = purge + return &this +} + +// NewCachingPurgeWithDefaults instantiates a new CachingPurge object +// This 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 NewCachingPurgeWithDefaults() *CachingPurge { + this := CachingPurge{} + return &this +} + +// GetPurge returns the Purge field value +func (o *CachingPurge) GetPurge() string { + if o == nil { + var ret string + return ret + } + + return o.Purge +} + +// GetPurgeOk returns a tuple with the Purge field value +// and a boolean to check if the value has been set. +func (o *CachingPurge) GetPurgeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Purge, true +} + +// SetPurge sets field value +func (o *CachingPurge) SetPurge(v string) { + o.Purge = v +} + +// GetPurgeUrls returns the PurgeUrls field value if set, zero value otherwise. +func (o *CachingPurge) GetPurgeUrls() []string { + if o == nil || IsNil(o.PurgeUrls) { + var ret []string + return ret + } + return o.PurgeUrls +} + +// GetPurgeUrlsOk returns a tuple with the PurgeUrls field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CachingPurge) GetPurgeUrlsOk() ([]string, bool) { + if o == nil || IsNil(o.PurgeUrls) { + return nil, false + } + return o.PurgeUrls, true +} + +// HasPurgeUrls returns a boolean if a field has been set. +func (o *CachingPurge) HasPurgeUrls() bool { + if o != nil && !IsNil(o.PurgeUrls) { + return true + } + + return false +} + +// SetPurgeUrls gets a reference to the given []string and assigns it to the PurgeUrls field. +func (o *CachingPurge) SetPurgeUrls(v []string) { + o.PurgeUrls = v +} + +// GetPurgeTags returns the PurgeTags field value if set, zero value otherwise. +// Deprecated +func (o *CachingPurge) GetPurgeTags() []string { + if o == nil || IsNil(o.PurgeTags) { + var ret []string + return ret + } + return o.PurgeTags +} + +// GetPurgeTagsOk returns a tuple with the PurgeTags field value if set, nil otherwise +// and a boolean to check if the value has been set. +// Deprecated +func (o *CachingPurge) GetPurgeTagsOk() ([]string, bool) { + if o == nil || IsNil(o.PurgeTags) { + return nil, false + } + return o.PurgeTags, true +} + +// HasPurgeTags returns a boolean if a field has been set. +func (o *CachingPurge) HasPurgeTags() bool { + if o != nil && !IsNil(o.PurgeTags) { + return true + } + + return false +} + +// SetPurgeTags gets a reference to the given []string and assigns it to the PurgeTags field. +// Deprecated +func (o *CachingPurge) SetPurgeTags(v []string) { + o.PurgeTags = v +} + +func (o CachingPurge) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CachingPurge) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["purge"] = o.Purge + if !IsNil(o.PurgeUrls) { + toSerialize["purge_urls"] = o.PurgeUrls + } + if !IsNil(o.PurgeTags) { + toSerialize["purge_tags"] = o.PurgeTags + } + return toSerialize, nil +} + +type NullableCachingPurge struct { + value *CachingPurge + isSet bool +} + +func (v NullableCachingPurge) Get() *CachingPurge { + return v.value +} + +func (v *NullableCachingPurge) Set(val *CachingPurge) { + v.value = val + v.isSet = true +} + +func (v NullableCachingPurge) IsSet() bool { + return v.isSet +} + +func (v *NullableCachingPurge) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCachingPurge(val *CachingPurge) *NullableCachingPurge { + return &NullableCachingPurge{value: val, isSet: true} +} + +func (v NullableCachingPurge) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCachingPurge) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_cdn_app.go b/model_cdn_app.go new file mode 100644 index 0000000..d13f675 --- /dev/null +++ b/model_cdn_app.go @@ -0,0 +1,699 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" + "time" +) + +// checks if the CdnApp type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CdnApp{} + +// CdnApp struct for CdnApp +type CdnApp struct { + Id *string `json:"id,omitempty"` + Categories []ApplicationCategory `json:"categories,omitempty"` + Rank *float32 `json:"rank,omitempty"` + Name *string `json:"name,omitempty"` + Slug *string `json:"slug,omitempty"` + ShortDescription *string `json:"short_description,omitempty"` + Description *string `json:"description,omitempty"` + // absolute link to logo image + Logo *string `json:"logo,omitempty"` + Pictures []string `json:"pictures,omitempty"` + Vendor *string `json:"vendor,omitempty"` + SupportEmail *string `json:"support_email,omitempty"` + InstallJson map[string]interface{} `json:"install_json,omitempty"` + Status *string `json:"status,omitempty"` + LikeStats *CdnAppLikeStats `json:"like_stats,omitempty"` + // True means she likes, False means she dislikes. null means she did not vote. + LikeByUser *bool `json:"like_by_user,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty"` + UpdatedAt *time.Time `json:"updated_at,omitempty"` +} + +// NewCdnApp instantiates a new CdnApp object +// This constructor will assign default values to properties that have it defined, +// 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 NewCdnApp() *CdnApp { + this := CdnApp{} + return &this +} + +// NewCdnAppWithDefaults instantiates a new CdnApp object +// This 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 NewCdnAppWithDefaults() *CdnApp { + this := CdnApp{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *CdnApp) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CdnApp) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *CdnApp) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *CdnApp) SetId(v string) { + o.Id = &v +} + +// GetCategories returns the Categories field value if set, zero value otherwise. +func (o *CdnApp) GetCategories() []ApplicationCategory { + if o == nil || IsNil(o.Categories) { + var ret []ApplicationCategory + return ret + } + return o.Categories +} + +// GetCategoriesOk returns a tuple with the Categories field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CdnApp) GetCategoriesOk() ([]ApplicationCategory, bool) { + if o == nil || IsNil(o.Categories) { + return nil, false + } + return o.Categories, true +} + +// HasCategories returns a boolean if a field has been set. +func (o *CdnApp) HasCategories() bool { + if o != nil && !IsNil(o.Categories) { + return true + } + + return false +} + +// SetCategories gets a reference to the given []ApplicationCategory and assigns it to the Categories field. +func (o *CdnApp) SetCategories(v []ApplicationCategory) { + o.Categories = v +} + +// GetRank returns the Rank field value if set, zero value otherwise. +func (o *CdnApp) GetRank() float32 { + if o == nil || IsNil(o.Rank) { + var ret float32 + return ret + } + return *o.Rank +} + +// GetRankOk returns a tuple with the Rank field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CdnApp) GetRankOk() (*float32, bool) { + if o == nil || IsNil(o.Rank) { + return nil, false + } + return o.Rank, true +} + +// HasRank returns a boolean if a field has been set. +func (o *CdnApp) HasRank() bool { + if o != nil && !IsNil(o.Rank) { + return true + } + + return false +} + +// SetRank gets a reference to the given float32 and assigns it to the Rank field. +func (o *CdnApp) SetRank(v float32) { + o.Rank = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *CdnApp) 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 *CdnApp) 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 *CdnApp) 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 *CdnApp) SetName(v string) { + o.Name = &v +} + +// GetSlug returns the Slug field value if set, zero value otherwise. +func (o *CdnApp) GetSlug() string { + if o == nil || IsNil(o.Slug) { + var ret string + return ret + } + return *o.Slug +} + +// GetSlugOk returns a tuple with the Slug field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CdnApp) GetSlugOk() (*string, bool) { + if o == nil || IsNil(o.Slug) { + return nil, false + } + return o.Slug, true +} + +// HasSlug returns a boolean if a field has been set. +func (o *CdnApp) HasSlug() bool { + if o != nil && !IsNil(o.Slug) { + return true + } + + return false +} + +// SetSlug gets a reference to the given string and assigns it to the Slug field. +func (o *CdnApp) SetSlug(v string) { + o.Slug = &v +} + +// GetShortDescription returns the ShortDescription field value if set, zero value otherwise. +func (o *CdnApp) GetShortDescription() string { + if o == nil || IsNil(o.ShortDescription) { + var ret string + return ret + } + return *o.ShortDescription +} + +// GetShortDescriptionOk returns a tuple with the ShortDescription field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CdnApp) GetShortDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.ShortDescription) { + return nil, false + } + return o.ShortDescription, true +} + +// HasShortDescription returns a boolean if a field has been set. +func (o *CdnApp) HasShortDescription() bool { + if o != nil && !IsNil(o.ShortDescription) { + return true + } + + return false +} + +// SetShortDescription gets a reference to the given string and assigns it to the ShortDescription field. +func (o *CdnApp) SetShortDescription(v string) { + o.ShortDescription = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *CdnApp) 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 *CdnApp) 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 *CdnApp) 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 *CdnApp) SetDescription(v string) { + o.Description = &v +} + +// GetLogo returns the Logo field value if set, zero value otherwise. +func (o *CdnApp) GetLogo() string { + if o == nil || IsNil(o.Logo) { + var ret string + return ret + } + return *o.Logo +} + +// GetLogoOk returns a tuple with the Logo field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CdnApp) GetLogoOk() (*string, bool) { + if o == nil || IsNil(o.Logo) { + return nil, false + } + return o.Logo, true +} + +// HasLogo returns a boolean if a field has been set. +func (o *CdnApp) HasLogo() bool { + if o != nil && !IsNil(o.Logo) { + return true + } + + return false +} + +// SetLogo gets a reference to the given string and assigns it to the Logo field. +func (o *CdnApp) SetLogo(v string) { + o.Logo = &v +} + +// GetPictures returns the Pictures field value if set, zero value otherwise. +func (o *CdnApp) GetPictures() []string { + if o == nil || IsNil(o.Pictures) { + var ret []string + return ret + } + return o.Pictures +} + +// GetPicturesOk returns a tuple with the Pictures field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CdnApp) GetPicturesOk() ([]string, bool) { + if o == nil || IsNil(o.Pictures) { + return nil, false + } + return o.Pictures, true +} + +// HasPictures returns a boolean if a field has been set. +func (o *CdnApp) HasPictures() bool { + if o != nil && !IsNil(o.Pictures) { + return true + } + + return false +} + +// SetPictures gets a reference to the given []string and assigns it to the Pictures field. +func (o *CdnApp) SetPictures(v []string) { + o.Pictures = v +} + +// GetVendor returns the Vendor field value if set, zero value otherwise. +func (o *CdnApp) GetVendor() string { + if o == nil || IsNil(o.Vendor) { + var ret string + return ret + } + return *o.Vendor +} + +// GetVendorOk returns a tuple with the Vendor field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CdnApp) GetVendorOk() (*string, bool) { + if o == nil || IsNil(o.Vendor) { + return nil, false + } + return o.Vendor, true +} + +// HasVendor returns a boolean if a field has been set. +func (o *CdnApp) HasVendor() bool { + if o != nil && !IsNil(o.Vendor) { + return true + } + + return false +} + +// SetVendor gets a reference to the given string and assigns it to the Vendor field. +func (o *CdnApp) SetVendor(v string) { + o.Vendor = &v +} + +// GetSupportEmail returns the SupportEmail field value if set, zero value otherwise. +func (o *CdnApp) GetSupportEmail() string { + if o == nil || IsNil(o.SupportEmail) { + var ret string + return ret + } + return *o.SupportEmail +} + +// GetSupportEmailOk returns a tuple with the SupportEmail field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CdnApp) GetSupportEmailOk() (*string, bool) { + if o == nil || IsNil(o.SupportEmail) { + return nil, false + } + return o.SupportEmail, true +} + +// HasSupportEmail returns a boolean if a field has been set. +func (o *CdnApp) HasSupportEmail() bool { + if o != nil && !IsNil(o.SupportEmail) { + return true + } + + return false +} + +// SetSupportEmail gets a reference to the given string and assigns it to the SupportEmail field. +func (o *CdnApp) SetSupportEmail(v string) { + o.SupportEmail = &v +} + +// GetInstallJson returns the InstallJson field value if set, zero value otherwise. +func (o *CdnApp) GetInstallJson() map[string]interface{} { + if o == nil || IsNil(o.InstallJson) { + var ret map[string]interface{} + return ret + } + return o.InstallJson +} + +// GetInstallJsonOk returns a tuple with the InstallJson field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CdnApp) GetInstallJsonOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.InstallJson) { + return map[string]interface{}{}, false + } + return o.InstallJson, true +} + +// HasInstallJson returns a boolean if a field has been set. +func (o *CdnApp) HasInstallJson() bool { + if o != nil && !IsNil(o.InstallJson) { + return true + } + + return false +} + +// SetInstallJson gets a reference to the given map[string]interface{} and assigns it to the InstallJson field. +func (o *CdnApp) SetInstallJson(v map[string]interface{}) { + o.InstallJson = v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *CdnApp) GetStatus() string { + if o == nil || IsNil(o.Status) { + var ret string + 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 *CdnApp) GetStatusOk() (*string, 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 *CdnApp) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *CdnApp) SetStatus(v string) { + o.Status = &v +} + +// GetLikeStats returns the LikeStats field value if set, zero value otherwise. +func (o *CdnApp) GetLikeStats() CdnAppLikeStats { + if o == nil || IsNil(o.LikeStats) { + var ret CdnAppLikeStats + return ret + } + return *o.LikeStats +} + +// GetLikeStatsOk returns a tuple with the LikeStats field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CdnApp) GetLikeStatsOk() (*CdnAppLikeStats, bool) { + if o == nil || IsNil(o.LikeStats) { + return nil, false + } + return o.LikeStats, true +} + +// HasLikeStats returns a boolean if a field has been set. +func (o *CdnApp) HasLikeStats() bool { + if o != nil && !IsNil(o.LikeStats) { + return true + } + + return false +} + +// SetLikeStats gets a reference to the given CdnAppLikeStats and assigns it to the LikeStats field. +func (o *CdnApp) SetLikeStats(v CdnAppLikeStats) { + o.LikeStats = &v +} + +// GetLikeByUser returns the LikeByUser field value if set, zero value otherwise. +func (o *CdnApp) GetLikeByUser() bool { + if o == nil || IsNil(o.LikeByUser) { + var ret bool + return ret + } + return *o.LikeByUser +} + +// GetLikeByUserOk returns a tuple with the LikeByUser field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CdnApp) GetLikeByUserOk() (*bool, bool) { + if o == nil || IsNil(o.LikeByUser) { + return nil, false + } + return o.LikeByUser, true +} + +// HasLikeByUser returns a boolean if a field has been set. +func (o *CdnApp) HasLikeByUser() bool { + if o != nil && !IsNil(o.LikeByUser) { + return true + } + + return false +} + +// SetLikeByUser gets a reference to the given bool and assigns it to the LikeByUser field. +func (o *CdnApp) SetLikeByUser(v bool) { + o.LikeByUser = &v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *CdnApp) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CdnApp) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *CdnApp) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *CdnApp) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *CdnApp) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CdnApp) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *CdnApp) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *CdnApp) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +func (o CdnApp) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CdnApp) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: id is readOnly + if !IsNil(o.Categories) { + toSerialize["categories"] = o.Categories + } + if !IsNil(o.Rank) { + toSerialize["rank"] = o.Rank + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Slug) { + toSerialize["slug"] = o.Slug + } + if !IsNil(o.ShortDescription) { + toSerialize["short_description"] = o.ShortDescription + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.Logo) { + toSerialize["logo"] = o.Logo + } + if !IsNil(o.Pictures) { + toSerialize["pictures"] = o.Pictures + } + if !IsNil(o.Vendor) { + toSerialize["vendor"] = o.Vendor + } + if !IsNil(o.SupportEmail) { + toSerialize["support_email"] = o.SupportEmail + } + if !IsNil(o.InstallJson) { + toSerialize["install_json"] = o.InstallJson + } + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + if !IsNil(o.LikeStats) { + toSerialize["like_stats"] = o.LikeStats + } + if !IsNil(o.LikeByUser) { + toSerialize["like_by_user"] = o.LikeByUser + } + // skip: created_at is readOnly + // skip: updated_at is readOnly + return toSerialize, nil +} + +type NullableCdnApp struct { + value *CdnApp + isSet bool +} + +func (v NullableCdnApp) Get() *CdnApp { + return v.value +} + +func (v *NullableCdnApp) Set(val *CdnApp) { + v.value = val + v.isSet = true +} + +func (v NullableCdnApp) IsSet() bool { + return v.isSet +} + +func (v *NullableCdnApp) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCdnApp(val *CdnApp) *NullableCdnApp { + return &NullableCdnApp{value: val, isSet: true} +} + +func (v NullableCdnApp) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCdnApp) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_cdn_app_data.go b/model_cdn_app_data.go new file mode 100644 index 0000000..d24e3ee --- /dev/null +++ b/model_cdn_app_data.go @@ -0,0 +1,126 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the CdnAppData type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CdnAppData{} + +// CdnAppData struct for CdnAppData +type CdnAppData struct { + Data *CdnApp `json:"data,omitempty"` +} + +// NewCdnAppData instantiates a new CdnAppData object +// This constructor will assign default values to properties that have it defined, +// 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 NewCdnAppData() *CdnAppData { + this := CdnAppData{} + return &this +} + +// NewCdnAppDataWithDefaults instantiates a new CdnAppData object +// This 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 NewCdnAppDataWithDefaults() *CdnAppData { + this := CdnAppData{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *CdnAppData) GetData() CdnApp { + if o == nil || IsNil(o.Data) { + var ret CdnApp + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CdnAppData) GetDataOk() (*CdnApp, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *CdnAppData) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given CdnApp and assigns it to the Data field. +func (o *CdnAppData) SetData(v CdnApp) { + o.Data = &v +} + +func (o CdnAppData) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CdnAppData) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + return toSerialize, nil +} + +type NullableCdnAppData struct { + value *CdnAppData + isSet bool +} + +func (v NullableCdnAppData) Get() *CdnAppData { + return v.value +} + +func (v *NullableCdnAppData) Set(val *CdnAppData) { + v.value = val + v.isSet = true +} + +func (v NullableCdnAppData) IsSet() bool { + return v.isSet +} + +func (v *NullableCdnAppData) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCdnAppData(val *CdnAppData) *NullableCdnAppData { + return &NullableCdnAppData{value: val, isSet: true} +} + +func (v NullableCdnAppData) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCdnAppData) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_cdn_app_install.go b/model_cdn_app_install.go new file mode 100644 index 0000000..861663b --- /dev/null +++ b/model_cdn_app_install.go @@ -0,0 +1,126 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the CdnAppInstall type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CdnAppInstall{} + +// CdnAppInstall struct for CdnAppInstall +type CdnAppInstall struct { + IsInstall *bool `json:"is_install,omitempty"` +} + +// NewCdnAppInstall instantiates a new CdnAppInstall object +// This constructor will assign default values to properties that have it defined, +// 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 NewCdnAppInstall() *CdnAppInstall { + this := CdnAppInstall{} + return &this +} + +// NewCdnAppInstallWithDefaults instantiates a new CdnAppInstall object +// This 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 NewCdnAppInstallWithDefaults() *CdnAppInstall { + this := CdnAppInstall{} + return &this +} + +// GetIsInstall returns the IsInstall field value if set, zero value otherwise. +func (o *CdnAppInstall) GetIsInstall() bool { + if o == nil || IsNil(o.IsInstall) { + var ret bool + return ret + } + return *o.IsInstall +} + +// GetIsInstallOk returns a tuple with the IsInstall field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CdnAppInstall) GetIsInstallOk() (*bool, bool) { + if o == nil || IsNil(o.IsInstall) { + return nil, false + } + return o.IsInstall, true +} + +// HasIsInstall returns a boolean if a field has been set. +func (o *CdnAppInstall) HasIsInstall() bool { + if o != nil && !IsNil(o.IsInstall) { + return true + } + + return false +} + +// SetIsInstall gets a reference to the given bool and assigns it to the IsInstall field. +func (o *CdnAppInstall) SetIsInstall(v bool) { + o.IsInstall = &v +} + +func (o CdnAppInstall) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CdnAppInstall) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.IsInstall) { + toSerialize["is_install"] = o.IsInstall + } + return toSerialize, nil +} + +type NullableCdnAppInstall struct { + value *CdnAppInstall + isSet bool +} + +func (v NullableCdnAppInstall) Get() *CdnAppInstall { + return v.value +} + +func (v *NullableCdnAppInstall) Set(val *CdnAppInstall) { + v.value = val + v.isSet = true +} + +func (v NullableCdnAppInstall) IsSet() bool { + return v.isSet +} + +func (v *NullableCdnAppInstall) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCdnAppInstall(val *CdnAppInstall) *NullableCdnAppInstall { + return &NullableCdnAppInstall{value: val, isSet: true} +} + +func (v NullableCdnAppInstall) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCdnAppInstall) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_cdn_app_like.go b/model_cdn_app_like.go new file mode 100644 index 0000000..5f1630f --- /dev/null +++ b/model_cdn_app_like.go @@ -0,0 +1,137 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the CdnAppLike type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CdnAppLike{} + +// CdnAppLike struct for CdnAppLike +type CdnAppLike struct { + // True means she likes, False means she dislikes, null means she wants to get her vote back. + Like NullableBool `json:"like,omitempty"` +} + +// NewCdnAppLike instantiates a new CdnAppLike object +// This constructor will assign default values to properties that have it defined, +// 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 NewCdnAppLike() *CdnAppLike { + this := CdnAppLike{} + return &this +} + +// NewCdnAppLikeWithDefaults instantiates a new CdnAppLike object +// This 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 NewCdnAppLikeWithDefaults() *CdnAppLike { + this := CdnAppLike{} + return &this +} + +// GetLike returns the Like field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CdnAppLike) GetLike() bool { + if o == nil || IsNil(o.Like.Get()) { + var ret bool + return ret + } + return *o.Like.Get() +} + +// GetLikeOk returns a tuple with the Like 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 *CdnAppLike) GetLikeOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.Like.Get(), o.Like.IsSet() +} + +// HasLike returns a boolean if a field has been set. +func (o *CdnAppLike) HasLike() bool { + if o != nil && o.Like.IsSet() { + return true + } + + return false +} + +// SetLike gets a reference to the given NullableBool and assigns it to the Like field. +func (o *CdnAppLike) SetLike(v bool) { + o.Like.Set(&v) +} +// SetLikeNil sets the value for Like to be an explicit nil +func (o *CdnAppLike) SetLikeNil() { + o.Like.Set(nil) +} + +// UnsetLike ensures that no value is present for Like, not even an explicit nil +func (o *CdnAppLike) UnsetLike() { + o.Like.Unset() +} + +func (o CdnAppLike) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CdnAppLike) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.Like.IsSet() { + toSerialize["like"] = o.Like.Get() + } + return toSerialize, nil +} + +type NullableCdnAppLike struct { + value *CdnAppLike + isSet bool +} + +func (v NullableCdnAppLike) Get() *CdnAppLike { + return v.value +} + +func (v *NullableCdnAppLike) Set(val *CdnAppLike) { + v.value = val + v.isSet = true +} + +func (v NullableCdnAppLike) IsSet() bool { + return v.isSet +} + +func (v *NullableCdnAppLike) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCdnAppLike(val *CdnAppLike) *NullableCdnAppLike { + return &NullableCdnAppLike{value: val, isSet: true} +} + +func (v NullableCdnAppLike) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCdnAppLike) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_cdn_app_like_stats.go b/model_cdn_app_like_stats.go new file mode 100644 index 0000000..b45b2e8 --- /dev/null +++ b/model_cdn_app_like_stats.go @@ -0,0 +1,162 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the CdnAppLikeStats type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CdnAppLikeStats{} + +// CdnAppLikeStats struct for CdnAppLikeStats +type CdnAppLikeStats struct { + LikesCount *int32 `json:"likes_count,omitempty"` + DislikesCount *int32 `json:"dislikes_count,omitempty"` +} + +// NewCdnAppLikeStats instantiates a new CdnAppLikeStats object +// This constructor will assign default values to properties that have it defined, +// 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 NewCdnAppLikeStats() *CdnAppLikeStats { + this := CdnAppLikeStats{} + return &this +} + +// NewCdnAppLikeStatsWithDefaults instantiates a new CdnAppLikeStats object +// This 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 NewCdnAppLikeStatsWithDefaults() *CdnAppLikeStats { + this := CdnAppLikeStats{} + return &this +} + +// GetLikesCount returns the LikesCount field value if set, zero value otherwise. +func (o *CdnAppLikeStats) GetLikesCount() int32 { + if o == nil || IsNil(o.LikesCount) { + var ret int32 + return ret + } + return *o.LikesCount +} + +// GetLikesCountOk returns a tuple with the LikesCount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CdnAppLikeStats) GetLikesCountOk() (*int32, bool) { + if o == nil || IsNil(o.LikesCount) { + return nil, false + } + return o.LikesCount, true +} + +// HasLikesCount returns a boolean if a field has been set. +func (o *CdnAppLikeStats) HasLikesCount() bool { + if o != nil && !IsNil(o.LikesCount) { + return true + } + + return false +} + +// SetLikesCount gets a reference to the given int32 and assigns it to the LikesCount field. +func (o *CdnAppLikeStats) SetLikesCount(v int32) { + o.LikesCount = &v +} + +// GetDislikesCount returns the DislikesCount field value if set, zero value otherwise. +func (o *CdnAppLikeStats) GetDislikesCount() int32 { + if o == nil || IsNil(o.DislikesCount) { + var ret int32 + return ret + } + return *o.DislikesCount +} + +// GetDislikesCountOk returns a tuple with the DislikesCount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CdnAppLikeStats) GetDislikesCountOk() (*int32, bool) { + if o == nil || IsNil(o.DislikesCount) { + return nil, false + } + return o.DislikesCount, true +} + +// HasDislikesCount returns a boolean if a field has been set. +func (o *CdnAppLikeStats) HasDislikesCount() bool { + if o != nil && !IsNil(o.DislikesCount) { + return true + } + + return false +} + +// SetDislikesCount gets a reference to the given int32 and assigns it to the DislikesCount field. +func (o *CdnAppLikeStats) SetDislikesCount(v int32) { + o.DislikesCount = &v +} + +func (o CdnAppLikeStats) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CdnAppLikeStats) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.LikesCount) { + toSerialize["likes_count"] = o.LikesCount + } + if !IsNil(o.DislikesCount) { + toSerialize["dislikes_count"] = o.DislikesCount + } + return toSerialize, nil +} + +type NullableCdnAppLikeStats struct { + value *CdnAppLikeStats + isSet bool +} + +func (v NullableCdnAppLikeStats) Get() *CdnAppLikeStats { + return v.value +} + +func (v *NullableCdnAppLikeStats) Set(val *CdnAppLikeStats) { + v.value = val + v.isSet = true +} + +func (v NullableCdnAppLikeStats) IsSet() bool { + return v.isSet +} + +func (v *NullableCdnAppLikeStats) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCdnAppLikeStats(val *CdnAppLikeStats) *NullableCdnAppLikeStats { + return &NullableCdnAppLikeStats{value: val, isSet: true} +} + +func (v NullableCdnAppLikeStats) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCdnAppLikeStats) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_cdn_app_like_stats_data.go b/model_cdn_app_like_stats_data.go new file mode 100644 index 0000000..3db9d4c --- /dev/null +++ b/model_cdn_app_like_stats_data.go @@ -0,0 +1,126 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the CdnAppLikeStatsData type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CdnAppLikeStatsData{} + +// CdnAppLikeStatsData struct for CdnAppLikeStatsData +type CdnAppLikeStatsData struct { + Data *CdnAppLikeStats `json:"data,omitempty"` +} + +// NewCdnAppLikeStatsData instantiates a new CdnAppLikeStatsData object +// This constructor will assign default values to properties that have it defined, +// 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 NewCdnAppLikeStatsData() *CdnAppLikeStatsData { + this := CdnAppLikeStatsData{} + return &this +} + +// NewCdnAppLikeStatsDataWithDefaults instantiates a new CdnAppLikeStatsData object +// This 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 NewCdnAppLikeStatsDataWithDefaults() *CdnAppLikeStatsData { + this := CdnAppLikeStatsData{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *CdnAppLikeStatsData) GetData() CdnAppLikeStats { + if o == nil || IsNil(o.Data) { + var ret CdnAppLikeStats + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CdnAppLikeStatsData) GetDataOk() (*CdnAppLikeStats, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *CdnAppLikeStatsData) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given CdnAppLikeStats and assigns it to the Data field. +func (o *CdnAppLikeStatsData) SetData(v CdnAppLikeStats) { + o.Data = &v +} + +func (o CdnAppLikeStatsData) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CdnAppLikeStatsData) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + return toSerialize, nil +} + +type NullableCdnAppLikeStatsData struct { + value *CdnAppLikeStatsData + isSet bool +} + +func (v NullableCdnAppLikeStatsData) Get() *CdnAppLikeStatsData { + return v.value +} + +func (v *NullableCdnAppLikeStatsData) Set(val *CdnAppLikeStatsData) { + v.value = val + v.isSet = true +} + +func (v NullableCdnAppLikeStatsData) IsSet() bool { + return v.isSet +} + +func (v *NullableCdnAppLikeStatsData) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCdnAppLikeStatsData(val *CdnAppLikeStatsData) *NullableCdnAppLikeStatsData { + return &NullableCdnAppLikeStatsData{value: val, isSet: true} +} + +func (v NullableCdnAppLikeStatsData) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCdnAppLikeStatsData) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_cdn_app_trigger_webhook.go b/model_cdn_app_trigger_webhook.go new file mode 100644 index 0000000..fd85e6a --- /dev/null +++ b/model_cdn_app_trigger_webhook.go @@ -0,0 +1,144 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the CdnAppTriggerWebhook type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CdnAppTriggerWebhook{} + +// CdnAppTriggerWebhook struct for CdnAppTriggerWebhook +type CdnAppTriggerWebhook struct { + Event string `json:"event"` + Options map[string]interface{} `json:"options"` +} + +// NewCdnAppTriggerWebhook instantiates a new CdnAppTriggerWebhook object +// This constructor will assign default values to properties that have it defined, +// 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 NewCdnAppTriggerWebhook(event string, options map[string]interface{}) *CdnAppTriggerWebhook { + this := CdnAppTriggerWebhook{} + this.Event = event + this.Options = options + return &this +} + +// NewCdnAppTriggerWebhookWithDefaults instantiates a new CdnAppTriggerWebhook object +// This 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 NewCdnAppTriggerWebhookWithDefaults() *CdnAppTriggerWebhook { + this := CdnAppTriggerWebhook{} + return &this +} + +// GetEvent returns the Event field value +func (o *CdnAppTriggerWebhook) GetEvent() string { + if o == nil { + var ret string + return ret + } + + return o.Event +} + +// GetEventOk returns a tuple with the Event field value +// and a boolean to check if the value has been set. +func (o *CdnAppTriggerWebhook) GetEventOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Event, true +} + +// SetEvent sets field value +func (o *CdnAppTriggerWebhook) SetEvent(v string) { + o.Event = v +} + +// GetOptions returns the Options field value +func (o *CdnAppTriggerWebhook) GetOptions() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.Options +} + +// GetOptionsOk returns a tuple with the Options field value +// and a boolean to check if the value has been set. +func (o *CdnAppTriggerWebhook) GetOptionsOk() (map[string]interface{}, bool) { + if o == nil { + return map[string]interface{}{}, false + } + return o.Options, true +} + +// SetOptions sets field value +func (o *CdnAppTriggerWebhook) SetOptions(v map[string]interface{}) { + o.Options = v +} + +func (o CdnAppTriggerWebhook) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CdnAppTriggerWebhook) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["event"] = o.Event + toSerialize["options"] = o.Options + return toSerialize, nil +} + +type NullableCdnAppTriggerWebhook struct { + value *CdnAppTriggerWebhook + isSet bool +} + +func (v NullableCdnAppTriggerWebhook) Get() *CdnAppTriggerWebhook { + return v.value +} + +func (v *NullableCdnAppTriggerWebhook) Set(val *CdnAppTriggerWebhook) { + v.value = val + v.isSet = true +} + +func (v NullableCdnAppTriggerWebhook) IsSet() bool { + return v.isSet +} + +func (v *NullableCdnAppTriggerWebhook) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCdnAppTriggerWebhook(val *CdnAppTriggerWebhook) *NullableCdnAppTriggerWebhook { + return &NullableCdnAppTriggerWebhook{value: val, isSet: true} +} + +func (v NullableCdnAppTriggerWebhook) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCdnAppTriggerWebhook) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_certificate.go b/model_certificate.go new file mode 100644 index 0000000..69a5b6e --- /dev/null +++ b/model_certificate.go @@ -0,0 +1,375 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" + "time" +) + +// checks if the Certificate type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Certificate{} + +// Certificate struct for Certificate +type Certificate struct { + Id *string `json:"id,omitempty"` + Type *string `json:"type,omitempty"` + KeyType NullableString `json:"key_type,omitempty"` + DomainNames []string `json:"domain_names,omitempty"` + Issuer *string `json:"issuer,omitempty"` + ExpiryDate *time.Time `json:"expiry_date,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty"` + UpdatedAt *time.Time `json:"updated_at,omitempty"` +} + +// NewCertificate instantiates a new Certificate object +// This constructor will assign default values to properties that have it defined, +// 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 NewCertificate() *Certificate { + this := Certificate{} + return &this +} + +// NewCertificateWithDefaults instantiates a new Certificate object +// This 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 NewCertificateWithDefaults() *Certificate { + this := Certificate{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *Certificate) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Certificate) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *Certificate) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *Certificate) SetId(v string) { + o.Id = &v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *Certificate) 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 *Certificate) 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 *Certificate) 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 *Certificate) SetType(v string) { + o.Type = &v +} + +// GetKeyType returns the KeyType field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Certificate) GetKeyType() string { + if o == nil || IsNil(o.KeyType.Get()) { + var ret string + return ret + } + return *o.KeyType.Get() +} + +// GetKeyTypeOk returns a tuple with the KeyType 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 *Certificate) GetKeyTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.KeyType.Get(), o.KeyType.IsSet() +} + +// HasKeyType returns a boolean if a field has been set. +func (o *Certificate) HasKeyType() bool { + if o != nil && o.KeyType.IsSet() { + return true + } + + return false +} + +// SetKeyType gets a reference to the given NullableString and assigns it to the KeyType field. +func (o *Certificate) SetKeyType(v string) { + o.KeyType.Set(&v) +} +// SetKeyTypeNil sets the value for KeyType to be an explicit nil +func (o *Certificate) SetKeyTypeNil() { + o.KeyType.Set(nil) +} + +// UnsetKeyType ensures that no value is present for KeyType, not even an explicit nil +func (o *Certificate) UnsetKeyType() { + o.KeyType.Unset() +} + +// GetDomainNames returns the DomainNames field value if set, zero value otherwise. +func (o *Certificate) GetDomainNames() []string { + if o == nil || IsNil(o.DomainNames) { + var ret []string + return ret + } + return o.DomainNames +} + +// GetDomainNamesOk returns a tuple with the DomainNames field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Certificate) GetDomainNamesOk() ([]string, bool) { + if o == nil || IsNil(o.DomainNames) { + return nil, false + } + return o.DomainNames, true +} + +// HasDomainNames returns a boolean if a field has been set. +func (o *Certificate) HasDomainNames() bool { + if o != nil && !IsNil(o.DomainNames) { + return true + } + + return false +} + +// SetDomainNames gets a reference to the given []string and assigns it to the DomainNames field. +func (o *Certificate) SetDomainNames(v []string) { + o.DomainNames = v +} + +// GetIssuer returns the Issuer field value if set, zero value otherwise. +func (o *Certificate) GetIssuer() string { + if o == nil || IsNil(o.Issuer) { + var ret string + return ret + } + return *o.Issuer +} + +// GetIssuerOk returns a tuple with the Issuer field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Certificate) GetIssuerOk() (*string, bool) { + if o == nil || IsNil(o.Issuer) { + return nil, false + } + return o.Issuer, true +} + +// HasIssuer returns a boolean if a field has been set. +func (o *Certificate) HasIssuer() bool { + if o != nil && !IsNil(o.Issuer) { + return true + } + + return false +} + +// SetIssuer gets a reference to the given string and assigns it to the Issuer field. +func (o *Certificate) SetIssuer(v string) { + o.Issuer = &v +} + +// GetExpiryDate returns the ExpiryDate field value if set, zero value otherwise. +func (o *Certificate) GetExpiryDate() time.Time { + if o == nil || IsNil(o.ExpiryDate) { + var ret time.Time + return ret + } + return *o.ExpiryDate +} + +// GetExpiryDateOk returns a tuple with the ExpiryDate field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Certificate) GetExpiryDateOk() (*time.Time, bool) { + if o == nil || IsNil(o.ExpiryDate) { + return nil, false + } + return o.ExpiryDate, true +} + +// HasExpiryDate returns a boolean if a field has been set. +func (o *Certificate) HasExpiryDate() bool { + if o != nil && !IsNil(o.ExpiryDate) { + return true + } + + return false +} + +// SetExpiryDate gets a reference to the given time.Time and assigns it to the ExpiryDate field. +func (o *Certificate) SetExpiryDate(v time.Time) { + o.ExpiryDate = &v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *Certificate) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Certificate) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *Certificate) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *Certificate) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *Certificate) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Certificate) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *Certificate) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *Certificate) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +func (o Certificate) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Certificate) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: id is readOnly + // skip: type is readOnly + if o.KeyType.IsSet() { + toSerialize["key_type"] = o.KeyType.Get() + } + // skip: domain_names is readOnly + // skip: issuer is readOnly + // skip: expiry_date is readOnly + // skip: created_at is readOnly + // skip: updated_at is readOnly + return toSerialize, nil +} + +type NullableCertificate struct { + value *Certificate + isSet bool +} + +func (v NullableCertificate) Get() *Certificate { + return v.value +} + +func (v *NullableCertificate) Set(val *Certificate) { + v.value = val + v.isSet = true +} + +func (v NullableCertificate) IsSet() bool { + return v.isSet +} + +func (v *NullableCertificate) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCertificate(val *Certificate) *NullableCertificate { + return &NullableCertificate{value: val, isSet: true} +} + +func (v NullableCertificate) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCertificate) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_certificate_order.go b/model_certificate_order.go new file mode 100644 index 0000000..6d684d0 --- /dev/null +++ b/model_certificate_order.go @@ -0,0 +1,365 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" + "time" +) + +// checks if the CertificateOrder type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CertificateOrder{} + +// CertificateOrder struct for CertificateOrder +type CertificateOrder struct { + Id *string `json:"id,omitempty"` + OrderId *string `json:"order_id,omitempty"` + // - `unprocessed` - Order is in the process queue - `canceled` - Order is canceled in favor of a new one with updated subject names - `pending` - Authorization Challenges are set, Validating authorization challenges... - `ready` - Challenges are validated, ready to issue the certificate - `processing` - Issuing Certificate... - `valid` - Certificate is issued successfully, this is the final stage - `invalid` - An Error Occurred, this order cannot proceed anymore, a new order will be created automatically - `terminated` - An Unknown Error occurred, this order cannot proceed anymore, a new order will be created automatically - `killed` - Order failed despite many retries, will not proceed anymore nor retry, needs manual intervention + Status *string `json:"status,omitempty"` + DomainNames []string `json:"domain_names,omitempty"` + Errors []map[string]interface{} `json:"errors,omitempty"` + // Expired order is treated as invalid order + ExpiryDate *time.Time `json:"expiry_date,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty"` + UpdatedAt *time.Time `json:"updated_at,omitempty"` +} + +// NewCertificateOrder instantiates a new CertificateOrder object +// This constructor will assign default values to properties that have it defined, +// 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 NewCertificateOrder() *CertificateOrder { + this := CertificateOrder{} + return &this +} + +// NewCertificateOrderWithDefaults instantiates a new CertificateOrder object +// This 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 NewCertificateOrderWithDefaults() *CertificateOrder { + this := CertificateOrder{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *CertificateOrder) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CertificateOrder) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *CertificateOrder) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *CertificateOrder) SetId(v string) { + o.Id = &v +} + +// GetOrderId returns the OrderId field value if set, zero value otherwise. +func (o *CertificateOrder) GetOrderId() string { + if o == nil || IsNil(o.OrderId) { + var ret string + return ret + } + return *o.OrderId +} + +// GetOrderIdOk returns a tuple with the OrderId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CertificateOrder) GetOrderIdOk() (*string, bool) { + if o == nil || IsNil(o.OrderId) { + return nil, false + } + return o.OrderId, true +} + +// HasOrderId returns a boolean if a field has been set. +func (o *CertificateOrder) HasOrderId() bool { + if o != nil && !IsNil(o.OrderId) { + return true + } + + return false +} + +// SetOrderId gets a reference to the given string and assigns it to the OrderId field. +func (o *CertificateOrder) SetOrderId(v string) { + o.OrderId = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *CertificateOrder) GetStatus() string { + if o == nil || IsNil(o.Status) { + var ret string + 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 *CertificateOrder) GetStatusOk() (*string, 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 *CertificateOrder) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *CertificateOrder) SetStatus(v string) { + o.Status = &v +} + +// GetDomainNames returns the DomainNames field value if set, zero value otherwise. +func (o *CertificateOrder) GetDomainNames() []string { + if o == nil || IsNil(o.DomainNames) { + var ret []string + return ret + } + return o.DomainNames +} + +// GetDomainNamesOk returns a tuple with the DomainNames field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CertificateOrder) GetDomainNamesOk() ([]string, bool) { + if o == nil || IsNil(o.DomainNames) { + return nil, false + } + return o.DomainNames, true +} + +// HasDomainNames returns a boolean if a field has been set. +func (o *CertificateOrder) HasDomainNames() bool { + if o != nil && !IsNil(o.DomainNames) { + return true + } + + return false +} + +// SetDomainNames gets a reference to the given []string and assigns it to the DomainNames field. +func (o *CertificateOrder) SetDomainNames(v []string) { + o.DomainNames = v +} + +// GetErrors returns the Errors field value if set, zero value otherwise. +func (o *CertificateOrder) GetErrors() []map[string]interface{} { + if o == nil || IsNil(o.Errors) { + var ret []map[string]interface{} + return ret + } + return o.Errors +} + +// GetErrorsOk returns a tuple with the Errors field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CertificateOrder) GetErrorsOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Errors) { + return nil, false + } + return o.Errors, true +} + +// HasErrors returns a boolean if a field has been set. +func (o *CertificateOrder) HasErrors() bool { + if o != nil && !IsNil(o.Errors) { + return true + } + + return false +} + +// SetErrors gets a reference to the given []map[string]interface{} and assigns it to the Errors field. +func (o *CertificateOrder) SetErrors(v []map[string]interface{}) { + o.Errors = v +} + +// GetExpiryDate returns the ExpiryDate field value if set, zero value otherwise. +func (o *CertificateOrder) GetExpiryDate() time.Time { + if o == nil || IsNil(o.ExpiryDate) { + var ret time.Time + return ret + } + return *o.ExpiryDate +} + +// GetExpiryDateOk returns a tuple with the ExpiryDate field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CertificateOrder) GetExpiryDateOk() (*time.Time, bool) { + if o == nil || IsNil(o.ExpiryDate) { + return nil, false + } + return o.ExpiryDate, true +} + +// HasExpiryDate returns a boolean if a field has been set. +func (o *CertificateOrder) HasExpiryDate() bool { + if o != nil && !IsNil(o.ExpiryDate) { + return true + } + + return false +} + +// SetExpiryDate gets a reference to the given time.Time and assigns it to the ExpiryDate field. +func (o *CertificateOrder) SetExpiryDate(v time.Time) { + o.ExpiryDate = &v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *CertificateOrder) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CertificateOrder) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *CertificateOrder) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *CertificateOrder) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *CertificateOrder) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CertificateOrder) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *CertificateOrder) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *CertificateOrder) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +func (o CertificateOrder) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CertificateOrder) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: id is readOnly + // skip: order_id is readOnly + // skip: status is readOnly + // skip: domain_names is readOnly + // skip: errors is readOnly + // skip: expiry_date is readOnly + // skip: created_at is readOnly + // skip: updated_at is readOnly + return toSerialize, nil +} + +type NullableCertificateOrder struct { + value *CertificateOrder + isSet bool +} + +func (v NullableCertificateOrder) Get() *CertificateOrder { + return v.value +} + +func (v *NullableCertificateOrder) Set(val *CertificateOrder) { + v.value = val + v.isSet = true +} + +func (v NullableCertificateOrder) IsSet() bool { + return v.isSet +} + +func (v *NullableCertificateOrder) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCertificateOrder(val *CertificateOrder) *NullableCertificateOrder { + return &NullableCertificateOrder{value: val, isSet: true} +} + +func (v NullableCertificateOrder) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCertificateOrder) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_challenge_action.go b/model_challenge_action.go new file mode 100644 index 0000000..51e7eec --- /dev/null +++ b/model_challenge_action.go @@ -0,0 +1,199 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the ChallengeAction type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ChallengeAction{} + +// ChallengeAction struct for ChallengeAction +type ChallengeAction struct { + // The mode of mitigation (1: Cookie, 2: Javascript, 3: Captcha) + Mode *int32 `json:"mode,omitempty"` + Ttl *int32 `json:"ttl,omitempty"` + HttpsOnly *bool `json:"https_only,omitempty"` +} + +// NewChallengeAction instantiates a new ChallengeAction object +// This constructor will assign default values to properties that have it defined, +// 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 NewChallengeAction() *ChallengeAction { + this := ChallengeAction{} + return &this +} + +// NewChallengeActionWithDefaults instantiates a new ChallengeAction object +// This 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 NewChallengeActionWithDefaults() *ChallengeAction { + this := ChallengeAction{} + return &this +} + +// GetMode returns the Mode field value if set, zero value otherwise. +func (o *ChallengeAction) GetMode() int32 { + if o == nil || IsNil(o.Mode) { + var ret int32 + return ret + } + return *o.Mode +} + +// GetModeOk returns a tuple with the Mode field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ChallengeAction) GetModeOk() (*int32, bool) { + if o == nil || IsNil(o.Mode) { + return nil, false + } + return o.Mode, true +} + +// HasMode returns a boolean if a field has been set. +func (o *ChallengeAction) HasMode() bool { + if o != nil && !IsNil(o.Mode) { + return true + } + + return false +} + +// SetMode gets a reference to the given int32 and assigns it to the Mode field. +func (o *ChallengeAction) SetMode(v int32) { + o.Mode = &v +} + +// GetTtl returns the Ttl field value if set, zero value otherwise. +func (o *ChallengeAction) GetTtl() int32 { + if o == nil || IsNil(o.Ttl) { + var ret int32 + return ret + } + return *o.Ttl +} + +// GetTtlOk returns a tuple with the Ttl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ChallengeAction) GetTtlOk() (*int32, bool) { + if o == nil || IsNil(o.Ttl) { + return nil, false + } + return o.Ttl, true +} + +// HasTtl returns a boolean if a field has been set. +func (o *ChallengeAction) HasTtl() bool { + if o != nil && !IsNil(o.Ttl) { + return true + } + + return false +} + +// SetTtl gets a reference to the given int32 and assigns it to the Ttl field. +func (o *ChallengeAction) SetTtl(v int32) { + o.Ttl = &v +} + +// GetHttpsOnly returns the HttpsOnly field value if set, zero value otherwise. +func (o *ChallengeAction) GetHttpsOnly() bool { + if o == nil || IsNil(o.HttpsOnly) { + var ret bool + return ret + } + return *o.HttpsOnly +} + +// GetHttpsOnlyOk returns a tuple with the HttpsOnly field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ChallengeAction) GetHttpsOnlyOk() (*bool, bool) { + if o == nil || IsNil(o.HttpsOnly) { + return nil, false + } + return o.HttpsOnly, true +} + +// HasHttpsOnly returns a boolean if a field has been set. +func (o *ChallengeAction) HasHttpsOnly() bool { + if o != nil && !IsNil(o.HttpsOnly) { + return true + } + + return false +} + +// SetHttpsOnly gets a reference to the given bool and assigns it to the HttpsOnly field. +func (o *ChallengeAction) SetHttpsOnly(v bool) { + o.HttpsOnly = &v +} + +func (o ChallengeAction) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ChallengeAction) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Mode) { + toSerialize["mode"] = o.Mode + } + if !IsNil(o.Ttl) { + toSerialize["ttl"] = o.Ttl + } + if !IsNil(o.HttpsOnly) { + toSerialize["https_only"] = o.HttpsOnly + } + return toSerialize, nil +} + +type NullableChallengeAction struct { + value *ChallengeAction + isSet bool +} + +func (v NullableChallengeAction) Get() *ChallengeAction { + return v.value +} + +func (v *NullableChallengeAction) Set(val *ChallengeAction) { + v.value = val + v.isSet = true +} + +func (v NullableChallengeAction) IsSet() bool { + return v.isSet +} + +func (v *NullableChallengeAction) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableChallengeAction(val *ChallengeAction) *NullableChallengeAction { + return &NullableChallengeAction{value: val, isSet: true} +} + +func (v NullableChallengeAction) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableChallengeAction) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_clone_domain.go b/model_clone_domain.go new file mode 100644 index 0000000..59c0649 --- /dev/null +++ b/model_clone_domain.go @@ -0,0 +1,117 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the CloneDomain type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CloneDomain{} + +// CloneDomain struct for CloneDomain +type CloneDomain struct { + From string `json:"from"` +} + +// NewCloneDomain instantiates a new CloneDomain object +// This constructor will assign default values to properties that have it defined, +// 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 NewCloneDomain(from string) *CloneDomain { + this := CloneDomain{} + this.From = from + return &this +} + +// NewCloneDomainWithDefaults instantiates a new CloneDomain object +// This 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 NewCloneDomainWithDefaults() *CloneDomain { + this := CloneDomain{} + return &this +} + +// GetFrom returns the From field value +func (o *CloneDomain) GetFrom() string { + if o == nil { + var ret string + return ret + } + + return o.From +} + +// GetFromOk returns a tuple with the From field value +// and a boolean to check if the value has been set. +func (o *CloneDomain) GetFromOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.From, true +} + +// SetFrom sets field value +func (o *CloneDomain) SetFrom(v string) { + o.From = v +} + +func (o CloneDomain) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CloneDomain) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["from"] = o.From + return toSerialize, nil +} + +type NullableCloneDomain struct { + value *CloneDomain + isSet bool +} + +func (v NullableCloneDomain) Get() *CloneDomain { + return v.value +} + +func (v *NullableCloneDomain) Set(val *CloneDomain) { + v.value = val + v.isSet = true +} + +func (v NullableCloneDomain) IsSet() bool { + return v.isSet +} + +func (v *NullableCloneDomain) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCloneDomain(val *CloneDomain) *NullableCloneDomain { + return &NullableCloneDomain{value: val, isSet: true} +} + +func (v NullableCloneDomain) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCloneDomain) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_cname_record.go b/model_cname_record.go new file mode 100644 index 0000000..822f048 --- /dev/null +++ b/model_cname_record.go @@ -0,0 +1,520 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" + "time" +) + +// checks if the CNAMERecord type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CNAMERecord{} + +// CNAMERecord struct for CNAMERecord +type CNAMERecord struct { + Value *CNAMERecordValue `json:"value,omitempty"` + Type *string `json:"type,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Ttl *int32 `json:"ttl,omitempty"` + Cloud *bool `json:"cloud,omitempty"` + UpstreamHttps *string `json:"upstream_https,omitempty"` + IpFilterMode *DnsRecordIpFilterMode `json:"ip_filter_mode,omitempty"` + // Protected records cannot be modified or deleted by user. + IsProtected *bool `json:"is_protected,omitempty"` + Usage []string `json:"usage,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty"` + UpdatedAt *time.Time `json:"updated_at,omitempty"` +} + +// NewCNAMERecord instantiates a new CNAMERecord object +// This constructor will assign default values to properties that have it defined, +// 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 NewCNAMERecord() *CNAMERecord { + this := CNAMERecord{} + var cloud bool = false + this.Cloud = &cloud + return &this +} + +// NewCNAMERecordWithDefaults instantiates a new CNAMERecord object +// This 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 NewCNAMERecordWithDefaults() *CNAMERecord { + this := CNAMERecord{} + var type_ string = "cname" + this.Type = &type_ + var cloud bool = false + this.Cloud = &cloud + return &this +} + +// GetValue returns the Value field value if set, zero value otherwise. +func (o *CNAMERecord) GetValue() CNAMERecordValue { + if o == nil || IsNil(o.Value) { + var ret CNAMERecordValue + return ret + } + return *o.Value +} + +// GetValueOk returns a tuple with the Value field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CNAMERecord) GetValueOk() (*CNAMERecordValue, bool) { + if o == nil || IsNil(o.Value) { + return nil, false + } + return o.Value, true +} + +// HasValue returns a boolean if a field has been set. +func (o *CNAMERecord) HasValue() bool { + if o != nil && !IsNil(o.Value) { + return true + } + + return false +} + +// SetValue gets a reference to the given CNAMERecordValue and assigns it to the Value field. +func (o *CNAMERecord) SetValue(v CNAMERecordValue) { + o.Value = &v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *CNAMERecord) 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 *CNAMERecord) 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 *CNAMERecord) 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 *CNAMERecord) SetType(v string) { + o.Type = &v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *CNAMERecord) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CNAMERecord) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *CNAMERecord) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *CNAMERecord) SetId(v string) { + o.Id = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *CNAMERecord) 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 *CNAMERecord) 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 *CNAMERecord) 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 *CNAMERecord) SetName(v string) { + o.Name = &v +} + +// GetTtl returns the Ttl field value if set, zero value otherwise. +func (o *CNAMERecord) GetTtl() int32 { + if o == nil || IsNil(o.Ttl) { + var ret int32 + return ret + } + return *o.Ttl +} + +// GetTtlOk returns a tuple with the Ttl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CNAMERecord) GetTtlOk() (*int32, bool) { + if o == nil || IsNil(o.Ttl) { + return nil, false + } + return o.Ttl, true +} + +// HasTtl returns a boolean if a field has been set. +func (o *CNAMERecord) HasTtl() bool { + if o != nil && !IsNil(o.Ttl) { + return true + } + + return false +} + +// SetTtl gets a reference to the given int32 and assigns it to the Ttl field. +func (o *CNAMERecord) SetTtl(v int32) { + o.Ttl = &v +} + +// GetCloud returns the Cloud field value if set, zero value otherwise. +func (o *CNAMERecord) GetCloud() bool { + if o == nil || IsNil(o.Cloud) { + var ret bool + return ret + } + return *o.Cloud +} + +// GetCloudOk returns a tuple with the Cloud field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CNAMERecord) GetCloudOk() (*bool, bool) { + if o == nil || IsNil(o.Cloud) { + return nil, false + } + return o.Cloud, true +} + +// HasCloud returns a boolean if a field has been set. +func (o *CNAMERecord) HasCloud() bool { + if o != nil && !IsNil(o.Cloud) { + return true + } + + return false +} + +// SetCloud gets a reference to the given bool and assigns it to the Cloud field. +func (o *CNAMERecord) SetCloud(v bool) { + o.Cloud = &v +} + +// GetUpstreamHttps returns the UpstreamHttps field value if set, zero value otherwise. +func (o *CNAMERecord) GetUpstreamHttps() string { + if o == nil || IsNil(o.UpstreamHttps) { + var ret string + return ret + } + return *o.UpstreamHttps +} + +// GetUpstreamHttpsOk returns a tuple with the UpstreamHttps field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CNAMERecord) GetUpstreamHttpsOk() (*string, bool) { + if o == nil || IsNil(o.UpstreamHttps) { + return nil, false + } + return o.UpstreamHttps, true +} + +// HasUpstreamHttps returns a boolean if a field has been set. +func (o *CNAMERecord) HasUpstreamHttps() bool { + if o != nil && !IsNil(o.UpstreamHttps) { + return true + } + + return false +} + +// SetUpstreamHttps gets a reference to the given string and assigns it to the UpstreamHttps field. +func (o *CNAMERecord) SetUpstreamHttps(v string) { + o.UpstreamHttps = &v +} + +// GetIpFilterMode returns the IpFilterMode field value if set, zero value otherwise. +func (o *CNAMERecord) GetIpFilterMode() DnsRecordIpFilterMode { + if o == nil || IsNil(o.IpFilterMode) { + var ret DnsRecordIpFilterMode + return ret + } + return *o.IpFilterMode +} + +// GetIpFilterModeOk returns a tuple with the IpFilterMode field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CNAMERecord) GetIpFilterModeOk() (*DnsRecordIpFilterMode, bool) { + if o == nil || IsNil(o.IpFilterMode) { + return nil, false + } + return o.IpFilterMode, true +} + +// HasIpFilterMode returns a boolean if a field has been set. +func (o *CNAMERecord) HasIpFilterMode() bool { + if o != nil && !IsNil(o.IpFilterMode) { + return true + } + + return false +} + +// SetIpFilterMode gets a reference to the given DnsRecordIpFilterMode and assigns it to the IpFilterMode field. +func (o *CNAMERecord) SetIpFilterMode(v DnsRecordIpFilterMode) { + o.IpFilterMode = &v +} + +// GetIsProtected returns the IsProtected field value if set, zero value otherwise. +func (o *CNAMERecord) GetIsProtected() bool { + if o == nil || IsNil(o.IsProtected) { + var ret bool + return ret + } + return *o.IsProtected +} + +// GetIsProtectedOk returns a tuple with the IsProtected field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CNAMERecord) GetIsProtectedOk() (*bool, bool) { + if o == nil || IsNil(o.IsProtected) { + return nil, false + } + return o.IsProtected, true +} + +// HasIsProtected returns a boolean if a field has been set. +func (o *CNAMERecord) HasIsProtected() bool { + if o != nil && !IsNil(o.IsProtected) { + return true + } + + return false +} + +// SetIsProtected gets a reference to the given bool and assigns it to the IsProtected field. +func (o *CNAMERecord) SetIsProtected(v bool) { + o.IsProtected = &v +} + +// GetUsage returns the Usage field value if set, zero value otherwise. +func (o *CNAMERecord) GetUsage() []string { + if o == nil || IsNil(o.Usage) { + var ret []string + return ret + } + return o.Usage +} + +// GetUsageOk returns a tuple with the Usage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CNAMERecord) GetUsageOk() ([]string, bool) { + if o == nil || IsNil(o.Usage) { + return nil, false + } + return o.Usage, true +} + +// HasUsage returns a boolean if a field has been set. +func (o *CNAMERecord) HasUsage() bool { + if o != nil && !IsNil(o.Usage) { + return true + } + + return false +} + +// SetUsage gets a reference to the given []string and assigns it to the Usage field. +func (o *CNAMERecord) SetUsage(v []string) { + o.Usage = v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *CNAMERecord) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CNAMERecord) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *CNAMERecord) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *CNAMERecord) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *CNAMERecord) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CNAMERecord) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *CNAMERecord) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *CNAMERecord) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +func (o CNAMERecord) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CNAMERecord) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Value) { + toSerialize["value"] = o.Value + } + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + // skip: id is readOnly + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Ttl) { + toSerialize["ttl"] = o.Ttl + } + if !IsNil(o.Cloud) { + toSerialize["cloud"] = o.Cloud + } + if !IsNil(o.UpstreamHttps) { + toSerialize["upstream_https"] = o.UpstreamHttps + } + if !IsNil(o.IpFilterMode) { + toSerialize["ip_filter_mode"] = o.IpFilterMode + } + // skip: is_protected is readOnly + // skip: usage is readOnly + // skip: created_at is readOnly + // skip: updated_at is readOnly + return toSerialize, nil +} + +type NullableCNAMERecord struct { + value *CNAMERecord + isSet bool +} + +func (v NullableCNAMERecord) Get() *CNAMERecord { + return v.value +} + +func (v *NullableCNAMERecord) Set(val *CNAMERecord) { + v.value = val + v.isSet = true +} + +func (v NullableCNAMERecord) IsSet() bool { + return v.isSet +} + +func (v *NullableCNAMERecord) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCNAMERecord(val *CNAMERecord) *NullableCNAMERecord { + return &NullableCNAMERecord{value: val, isSet: true} +} + +func (v NullableCNAMERecord) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCNAMERecord) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_cname_record_value.go b/model_cname_record_value.go new file mode 100644 index 0000000..102cc09 --- /dev/null +++ b/model_cname_record_value.go @@ -0,0 +1,193 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the CNAMERecordValue type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CNAMERecordValue{} + +// CNAMERecordValue struct for CNAMERecordValue +type CNAMERecordValue struct { + // A fully-qualified domain name (FQDN) + Host string `json:"host"` + HostHeader NullableString `json:"host_header"` + Port NullableInt32 `json:"port,omitempty"` +} + +// NewCNAMERecordValue instantiates a new CNAMERecordValue object +// This constructor will assign default values to properties that have it defined, +// 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 NewCNAMERecordValue(host string, hostHeader NullableString) *CNAMERecordValue { + this := CNAMERecordValue{} + this.Host = host + this.HostHeader = hostHeader + return &this +} + +// NewCNAMERecordValueWithDefaults instantiates a new CNAMERecordValue object +// This 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 NewCNAMERecordValueWithDefaults() *CNAMERecordValue { + this := CNAMERecordValue{} + return &this +} + +// GetHost returns the Host field value +func (o *CNAMERecordValue) GetHost() string { + if o == nil { + var ret string + return ret + } + + return o.Host +} + +// GetHostOk returns a tuple with the Host field value +// and a boolean to check if the value has been set. +func (o *CNAMERecordValue) GetHostOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Host, true +} + +// SetHost sets field value +func (o *CNAMERecordValue) SetHost(v string) { + o.Host = v +} + +// GetHostHeader returns the HostHeader field value +// If the value is explicit nil, the zero value for string will be returned +func (o *CNAMERecordValue) GetHostHeader() string { + if o == nil || o.HostHeader.Get() == nil { + var ret string + return ret + } + + return *o.HostHeader.Get() +} + +// GetHostHeaderOk returns a tuple with the HostHeader 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 *CNAMERecordValue) GetHostHeaderOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.HostHeader.Get(), o.HostHeader.IsSet() +} + +// SetHostHeader sets field value +func (o *CNAMERecordValue) SetHostHeader(v string) { + o.HostHeader.Set(&v) +} + +// GetPort returns the Port field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CNAMERecordValue) GetPort() int32 { + if o == nil || IsNil(o.Port.Get()) { + var ret int32 + return ret + } + return *o.Port.Get() +} + +// GetPortOk returns a tuple with the Port 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 *CNAMERecordValue) GetPortOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.Port.Get(), o.Port.IsSet() +} + +// HasPort returns a boolean if a field has been set. +func (o *CNAMERecordValue) HasPort() bool { + if o != nil && o.Port.IsSet() { + return true + } + + return false +} + +// SetPort gets a reference to the given NullableInt32 and assigns it to the Port field. +func (o *CNAMERecordValue) SetPort(v int32) { + o.Port.Set(&v) +} +// SetPortNil sets the value for Port to be an explicit nil +func (o *CNAMERecordValue) SetPortNil() { + o.Port.Set(nil) +} + +// UnsetPort ensures that no value is present for Port, not even an explicit nil +func (o *CNAMERecordValue) UnsetPort() { + o.Port.Unset() +} + +func (o CNAMERecordValue) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CNAMERecordValue) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["host"] = o.Host + toSerialize["host_header"] = o.HostHeader.Get() + if o.Port.IsSet() { + toSerialize["port"] = o.Port.Get() + } + return toSerialize, nil +} + +type NullableCNAMERecordValue struct { + value *CNAMERecordValue + isSet bool +} + +func (v NullableCNAMERecordValue) Get() *CNAMERecordValue { + return v.value +} + +func (v *NullableCNAMERecordValue) Set(val *CNAMERecordValue) { + v.value = val + v.isSet = true +} + +func (v NullableCNAMERecordValue) IsSet() bool { + return v.isSet +} + +func (v *NullableCNAMERecordValue) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCNAMERecordValue(val *CNAMERecordValue) *NullableCNAMERecordValue { + return &NullableCNAMERecordValue{value: val, isSet: true} +} + +func (v NullableCNAMERecordValue) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCNAMERecordValue) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_country_list.go b/model_country_list.go new file mode 100644 index 0000000..a39bb08 --- /dev/null +++ b/model_country_list.go @@ -0,0 +1,238 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the CountryList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CountryList{} + +// CountryList struct for CountryList +type CountryList struct { + // The name of the country + Country *string `json:"country,omitempty"` + // The 2-letter country code + Code *string `json:"code,omitempty"` + // The number of requests from the country + Requests *int32 `json:"requests,omitempty"` + // The amount of traffic from the country + Traffics *int32 `json:"traffics,omitempty"` +} + +// NewCountryList instantiates a new CountryList object +// This constructor will assign default values to properties that have it defined, +// 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 NewCountryList() *CountryList { + this := CountryList{} + return &this +} + +// NewCountryListWithDefaults instantiates a new CountryList object +// This 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 NewCountryListWithDefaults() *CountryList { + this := CountryList{} + return &this +} + +// GetCountry returns the Country field value if set, zero value otherwise. +func (o *CountryList) GetCountry() string { + if o == nil || IsNil(o.Country) { + var ret string + return ret + } + return *o.Country +} + +// GetCountryOk returns a tuple with the Country field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CountryList) GetCountryOk() (*string, bool) { + if o == nil || IsNil(o.Country) { + return nil, false + } + return o.Country, true +} + +// HasCountry returns a boolean if a field has been set. +func (o *CountryList) HasCountry() bool { + if o != nil && !IsNil(o.Country) { + return true + } + + return false +} + +// SetCountry gets a reference to the given string and assigns it to the Country field. +func (o *CountryList) SetCountry(v string) { + o.Country = &v +} + +// GetCode returns the Code field value if set, zero value otherwise. +func (o *CountryList) GetCode() string { + if o == nil || IsNil(o.Code) { + var ret string + return ret + } + return *o.Code +} + +// GetCodeOk returns a tuple with the Code field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CountryList) GetCodeOk() (*string, bool) { + if o == nil || IsNil(o.Code) { + return nil, false + } + return o.Code, true +} + +// HasCode returns a boolean if a field has been set. +func (o *CountryList) HasCode() bool { + if o != nil && !IsNil(o.Code) { + return true + } + + return false +} + +// SetCode gets a reference to the given string and assigns it to the Code field. +func (o *CountryList) SetCode(v string) { + o.Code = &v +} + +// GetRequests returns the Requests field value if set, zero value otherwise. +func (o *CountryList) GetRequests() int32 { + if o == nil || IsNil(o.Requests) { + var ret int32 + return ret + } + return *o.Requests +} + +// GetRequestsOk returns a tuple with the Requests field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CountryList) GetRequestsOk() (*int32, bool) { + if o == nil || IsNil(o.Requests) { + return nil, false + } + return o.Requests, true +} + +// HasRequests returns a boolean if a field has been set. +func (o *CountryList) HasRequests() bool { + if o != nil && !IsNil(o.Requests) { + return true + } + + return false +} + +// SetRequests gets a reference to the given int32 and assigns it to the Requests field. +func (o *CountryList) SetRequests(v int32) { + o.Requests = &v +} + +// GetTraffics returns the Traffics field value if set, zero value otherwise. +func (o *CountryList) GetTraffics() int32 { + if o == nil || IsNil(o.Traffics) { + var ret int32 + return ret + } + return *o.Traffics +} + +// GetTrafficsOk returns a tuple with the Traffics field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CountryList) GetTrafficsOk() (*int32, bool) { + if o == nil || IsNil(o.Traffics) { + return nil, false + } + return o.Traffics, true +} + +// HasTraffics returns a boolean if a field has been set. +func (o *CountryList) HasTraffics() bool { + if o != nil && !IsNil(o.Traffics) { + return true + } + + return false +} + +// SetTraffics gets a reference to the given int32 and assigns it to the Traffics field. +func (o *CountryList) SetTraffics(v int32) { + o.Traffics = &v +} + +func (o CountryList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CountryList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Country) { + toSerialize["country"] = o.Country + } + if !IsNil(o.Code) { + toSerialize["code"] = o.Code + } + if !IsNil(o.Requests) { + toSerialize["requests"] = o.Requests + } + if !IsNil(o.Traffics) { + toSerialize["traffics"] = o.Traffics + } + return toSerialize, nil +} + +type NullableCountryList struct { + value *CountryList + isSet bool +} + +func (v NullableCountryList) Get() *CountryList { + return v.value +} + +func (v *NullableCountryList) Set(val *CountryList) { + v.value = val + v.isSet = true +} + +func (v NullableCountryList) IsSet() bool { + return v.isSet +} + +func (v *NullableCountryList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCountryList(val *CountryList) *NullableCountryList { + return &NullableCountryList{value: val, isSet: true} +} + +func (v NullableCountryList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCountryList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_country_request_chart.go b/model_country_request_chart.go new file mode 100644 index 0000000..c810fbe --- /dev/null +++ b/model_country_request_chart.go @@ -0,0 +1,201 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the CountryRequestChart type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CountryRequestChart{} + +// CountryRequestChart struct for CountryRequestChart +type CountryRequestChart struct { + // The fill key for the country + FillKey *int32 `json:"fillKey,omitempty"` + // The name of the country + Name *string `json:"name,omitempty"` + // The number of requests from the country + Value *int32 `json:"value,omitempty"` +} + +// NewCountryRequestChart instantiates a new CountryRequestChart object +// This constructor will assign default values to properties that have it defined, +// 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 NewCountryRequestChart() *CountryRequestChart { + this := CountryRequestChart{} + return &this +} + +// NewCountryRequestChartWithDefaults instantiates a new CountryRequestChart object +// This 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 NewCountryRequestChartWithDefaults() *CountryRequestChart { + this := CountryRequestChart{} + return &this +} + +// GetFillKey returns the FillKey field value if set, zero value otherwise. +func (o *CountryRequestChart) GetFillKey() int32 { + if o == nil || IsNil(o.FillKey) { + var ret int32 + return ret + } + return *o.FillKey +} + +// GetFillKeyOk returns a tuple with the FillKey field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CountryRequestChart) GetFillKeyOk() (*int32, bool) { + if o == nil || IsNil(o.FillKey) { + return nil, false + } + return o.FillKey, true +} + +// HasFillKey returns a boolean if a field has been set. +func (o *CountryRequestChart) HasFillKey() bool { + if o != nil && !IsNil(o.FillKey) { + return true + } + + return false +} + +// SetFillKey gets a reference to the given int32 and assigns it to the FillKey field. +func (o *CountryRequestChart) SetFillKey(v int32) { + o.FillKey = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *CountryRequestChart) 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 *CountryRequestChart) 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 *CountryRequestChart) 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 *CountryRequestChart) SetName(v string) { + o.Name = &v +} + +// GetValue returns the Value field value if set, zero value otherwise. +func (o *CountryRequestChart) GetValue() int32 { + if o == nil || IsNil(o.Value) { + var ret int32 + return ret + } + return *o.Value +} + +// GetValueOk returns a tuple with the Value field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CountryRequestChart) GetValueOk() (*int32, bool) { + if o == nil || IsNil(o.Value) { + return nil, false + } + return o.Value, true +} + +// HasValue returns a boolean if a field has been set. +func (o *CountryRequestChart) HasValue() bool { + if o != nil && !IsNil(o.Value) { + return true + } + + return false +} + +// SetValue gets a reference to the given int32 and assigns it to the Value field. +func (o *CountryRequestChart) SetValue(v int32) { + o.Value = &v +} + +func (o CountryRequestChart) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CountryRequestChart) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.FillKey) { + toSerialize["fillKey"] = o.FillKey + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Value) { + toSerialize["value"] = o.Value + } + return toSerialize, nil +} + +type NullableCountryRequestChart struct { + value *CountryRequestChart + isSet bool +} + +func (v NullableCountryRequestChart) Get() *CountryRequestChart { + return v.value +} + +func (v *NullableCountryRequestChart) Set(val *CountryRequestChart) { + v.value = val + v.isSet = true +} + +func (v NullableCountryRequestChart) IsSet() bool { + return v.isSet +} + +func (v *NullableCountryRequestChart) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCountryRequestChart(val *CountryRequestChart) *NullableCountryRequestChart { + return &NullableCountryRequestChart{value: val, isSet: true} +} + +func (v NullableCountryRequestChart) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCountryRequestChart) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_country_statistics.go b/model_country_statistics.go new file mode 100644 index 0000000..4c4792f --- /dev/null +++ b/model_country_statistics.go @@ -0,0 +1,201 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the CountryStatistics type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CountryStatistics{} + +// CountryStatistics struct for CountryStatistics +type CountryStatistics struct { + // The name of the country + Country *string `json:"country,omitempty"` + // The number of requests from the country + Requests *int32 `json:"requests,omitempty"` + // The amount of traffic from the country + Traffics *int32 `json:"traffics,omitempty"` +} + +// NewCountryStatistics instantiates a new CountryStatistics object +// This constructor will assign default values to properties that have it defined, +// 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 NewCountryStatistics() *CountryStatistics { + this := CountryStatistics{} + return &this +} + +// NewCountryStatisticsWithDefaults instantiates a new CountryStatistics object +// This 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 NewCountryStatisticsWithDefaults() *CountryStatistics { + this := CountryStatistics{} + return &this +} + +// GetCountry returns the Country field value if set, zero value otherwise. +func (o *CountryStatistics) GetCountry() string { + if o == nil || IsNil(o.Country) { + var ret string + return ret + } + return *o.Country +} + +// GetCountryOk returns a tuple with the Country field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CountryStatistics) GetCountryOk() (*string, bool) { + if o == nil || IsNil(o.Country) { + return nil, false + } + return o.Country, true +} + +// HasCountry returns a boolean if a field has been set. +func (o *CountryStatistics) HasCountry() bool { + if o != nil && !IsNil(o.Country) { + return true + } + + return false +} + +// SetCountry gets a reference to the given string and assigns it to the Country field. +func (o *CountryStatistics) SetCountry(v string) { + o.Country = &v +} + +// GetRequests returns the Requests field value if set, zero value otherwise. +func (o *CountryStatistics) GetRequests() int32 { + if o == nil || IsNil(o.Requests) { + var ret int32 + return ret + } + return *o.Requests +} + +// GetRequestsOk returns a tuple with the Requests field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CountryStatistics) GetRequestsOk() (*int32, bool) { + if o == nil || IsNil(o.Requests) { + return nil, false + } + return o.Requests, true +} + +// HasRequests returns a boolean if a field has been set. +func (o *CountryStatistics) HasRequests() bool { + if o != nil && !IsNil(o.Requests) { + return true + } + + return false +} + +// SetRequests gets a reference to the given int32 and assigns it to the Requests field. +func (o *CountryStatistics) SetRequests(v int32) { + o.Requests = &v +} + +// GetTraffics returns the Traffics field value if set, zero value otherwise. +func (o *CountryStatistics) GetTraffics() int32 { + if o == nil || IsNil(o.Traffics) { + var ret int32 + return ret + } + return *o.Traffics +} + +// GetTrafficsOk returns a tuple with the Traffics field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CountryStatistics) GetTrafficsOk() (*int32, bool) { + if o == nil || IsNil(o.Traffics) { + return nil, false + } + return o.Traffics, true +} + +// HasTraffics returns a boolean if a field has been set. +func (o *CountryStatistics) HasTraffics() bool { + if o != nil && !IsNil(o.Traffics) { + return true + } + + return false +} + +// SetTraffics gets a reference to the given int32 and assigns it to the Traffics field. +func (o *CountryStatistics) SetTraffics(v int32) { + o.Traffics = &v +} + +func (o CountryStatistics) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CountryStatistics) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Country) { + toSerialize["country"] = o.Country + } + if !IsNil(o.Requests) { + toSerialize["requests"] = o.Requests + } + if !IsNil(o.Traffics) { + toSerialize["traffics"] = o.Traffics + } + return toSerialize, nil +} + +type NullableCountryStatistics struct { + value *CountryStatistics + isSet bool +} + +func (v NullableCountryStatistics) Get() *CountryStatistics { + return v.value +} + +func (v *NullableCountryStatistics) Set(val *CountryStatistics) { + v.value = val + v.isSet = true +} + +func (v NullableCountryStatistics) IsSet() bool { + return v.isSet +} + +func (v *NullableCountryStatistics) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCountryStatistics(val *CountryStatistics) *NullableCountryStatistics { + return &NullableCountryStatistics{value: val, isSet: true} +} + +func (v NullableCountryStatistics) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCountryStatistics) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_country_traffic_chart.go b/model_country_traffic_chart.go new file mode 100644 index 0000000..c7695b4 --- /dev/null +++ b/model_country_traffic_chart.go @@ -0,0 +1,201 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the CountryTrafficChart type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CountryTrafficChart{} + +// CountryTrafficChart struct for CountryTrafficChart +type CountryTrafficChart struct { + // The fill key for the country + FillKey *int32 `json:"fillKey,omitempty"` + // The name of the country + Name *string `json:"name,omitempty"` + // The amount of traffic from the country + Value *int32 `json:"value,omitempty"` +} + +// NewCountryTrafficChart instantiates a new CountryTrafficChart object +// This constructor will assign default values to properties that have it defined, +// 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 NewCountryTrafficChart() *CountryTrafficChart { + this := CountryTrafficChart{} + return &this +} + +// NewCountryTrafficChartWithDefaults instantiates a new CountryTrafficChart object +// This 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 NewCountryTrafficChartWithDefaults() *CountryTrafficChart { + this := CountryTrafficChart{} + return &this +} + +// GetFillKey returns the FillKey field value if set, zero value otherwise. +func (o *CountryTrafficChart) GetFillKey() int32 { + if o == nil || IsNil(o.FillKey) { + var ret int32 + return ret + } + return *o.FillKey +} + +// GetFillKeyOk returns a tuple with the FillKey field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CountryTrafficChart) GetFillKeyOk() (*int32, bool) { + if o == nil || IsNil(o.FillKey) { + return nil, false + } + return o.FillKey, true +} + +// HasFillKey returns a boolean if a field has been set. +func (o *CountryTrafficChart) HasFillKey() bool { + if o != nil && !IsNil(o.FillKey) { + return true + } + + return false +} + +// SetFillKey gets a reference to the given int32 and assigns it to the FillKey field. +func (o *CountryTrafficChart) SetFillKey(v int32) { + o.FillKey = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *CountryTrafficChart) 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 *CountryTrafficChart) 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 *CountryTrafficChart) 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 *CountryTrafficChart) SetName(v string) { + o.Name = &v +} + +// GetValue returns the Value field value if set, zero value otherwise. +func (o *CountryTrafficChart) GetValue() int32 { + if o == nil || IsNil(o.Value) { + var ret int32 + return ret + } + return *o.Value +} + +// GetValueOk returns a tuple with the Value field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CountryTrafficChart) GetValueOk() (*int32, bool) { + if o == nil || IsNil(o.Value) { + return nil, false + } + return o.Value, true +} + +// HasValue returns a boolean if a field has been set. +func (o *CountryTrafficChart) HasValue() bool { + if o != nil && !IsNil(o.Value) { + return true + } + + return false +} + +// SetValue gets a reference to the given int32 and assigns it to the Value field. +func (o *CountryTrafficChart) SetValue(v int32) { + o.Value = &v +} + +func (o CountryTrafficChart) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CountryTrafficChart) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.FillKey) { + toSerialize["fillKey"] = o.FillKey + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Value) { + toSerialize["value"] = o.Value + } + return toSerialize, nil +} + +type NullableCountryTrafficChart struct { + value *CountryTrafficChart + isSet bool +} + +func (v NullableCountryTrafficChart) Get() *CountryTrafficChart { + return v.value +} + +func (v *NullableCountryTrafficChart) Set(val *CountryTrafficChart) { + v.value = val + v.isSet = true +} + +func (v NullableCountryTrafficChart) IsSet() bool { + return v.isSet +} + +func (v *NullableCountryTrafficChart) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCountryTrafficChart(val *CountryTrafficChart) *NullableCountryTrafficChart { + return &NullableCountryTrafficChart{value: val, isSet: true} +} + +func (v NullableCountryTrafficChart) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCountryTrafficChart) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_currency.go b/model_currency.go new file mode 100644 index 0000000..4eedc81 --- /dev/null +++ b/model_currency.go @@ -0,0 +1,162 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the Currency type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Currency{} + +// Currency struct for Currency +type Currency struct { + Key *string `json:"key,omitempty"` + Label *string `json:"label,omitempty"` +} + +// NewCurrency instantiates a new Currency object +// This constructor will assign default values to properties that have it defined, +// 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 NewCurrency() *Currency { + this := Currency{} + return &this +} + +// NewCurrencyWithDefaults instantiates a new Currency object +// This 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 NewCurrencyWithDefaults() *Currency { + this := Currency{} + return &this +} + +// GetKey returns the Key field value if set, zero value otherwise. +func (o *Currency) GetKey() string { + if o == nil || IsNil(o.Key) { + var ret string + return ret + } + return *o.Key +} + +// GetKeyOk returns a tuple with the Key field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Currency) GetKeyOk() (*string, bool) { + if o == nil || IsNil(o.Key) { + return nil, false + } + return o.Key, true +} + +// HasKey returns a boolean if a field has been set. +func (o *Currency) HasKey() bool { + if o != nil && !IsNil(o.Key) { + return true + } + + return false +} + +// SetKey gets a reference to the given string and assigns it to the Key field. +func (o *Currency) SetKey(v string) { + o.Key = &v +} + +// GetLabel returns the Label field value if set, zero value otherwise. +func (o *Currency) GetLabel() string { + if o == nil || IsNil(o.Label) { + var ret string + return ret + } + return *o.Label +} + +// GetLabelOk returns a tuple with the Label field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Currency) GetLabelOk() (*string, bool) { + if o == nil || IsNil(o.Label) { + return nil, false + } + return o.Label, true +} + +// HasLabel returns a boolean if a field has been set. +func (o *Currency) HasLabel() bool { + if o != nil && !IsNil(o.Label) { + return true + } + + return false +} + +// SetLabel gets a reference to the given string and assigns it to the Label field. +func (o *Currency) SetLabel(v string) { + o.Label = &v +} + +func (o Currency) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Currency) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Key) { + toSerialize["key"] = o.Key + } + if !IsNil(o.Label) { + toSerialize["label"] = o.Label + } + return toSerialize, nil +} + +type NullableCurrency struct { + value *Currency + isSet bool +} + +func (v NullableCurrency) Get() *Currency { + return v.value +} + +func (v *NullableCurrency) Set(val *Currency) { + v.value = val + v.isSet = true +} + +func (v NullableCurrency) IsSet() bool { + return v.isSet +} + +func (v *NullableCurrency) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCurrency(val *Currency) *NullableCurrency { + return &NullableCurrency{value: val, isSet: true} +} + +func (v NullableCurrency) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCurrency) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_custom_cname.go b/model_custom_cname.go new file mode 100644 index 0000000..b0d2258 --- /dev/null +++ b/model_custom_cname.go @@ -0,0 +1,117 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the CustomCname type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CustomCname{} + +// CustomCname struct for CustomCname +type CustomCname struct { + Address string `json:"address"` +} + +// NewCustomCname instantiates a new CustomCname object +// This constructor will assign default values to properties that have it defined, +// 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 NewCustomCname(address string) *CustomCname { + this := CustomCname{} + this.Address = address + return &this +} + +// NewCustomCnameWithDefaults instantiates a new CustomCname object +// This 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 NewCustomCnameWithDefaults() *CustomCname { + this := CustomCname{} + return &this +} + +// GetAddress returns the Address field value +func (o *CustomCname) GetAddress() string { + if o == nil { + var ret string + return ret + } + + return o.Address +} + +// GetAddressOk returns a tuple with the Address field value +// and a boolean to check if the value has been set. +func (o *CustomCname) GetAddressOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Address, true +} + +// SetAddress sets field value +func (o *CustomCname) SetAddress(v string) { + o.Address = v +} + +func (o CustomCname) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CustomCname) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["address"] = o.Address + return toSerialize, nil +} + +type NullableCustomCname struct { + value *CustomCname + isSet bool +} + +func (v NullableCustomCname) Get() *CustomCname { + return v.value +} + +func (v *NullableCustomCname) Set(val *CustomCname) { + v.value = val + v.isSet = true +} + +func (v NullableCustomCname) IsSet() bool { + return v.isSet +} + +func (v *NullableCustomCname) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCustomCname(val *CustomCname) *NullableCustomCname { + return &NullableCustomCname{value: val, isSet: true} +} + +func (v NullableCustomCname) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCustomCname) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_custom_page.go b/model_custom_page.go new file mode 100644 index 0000000..cc54e5a --- /dev/null +++ b/model_custom_page.go @@ -0,0 +1,198 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the CustomPage type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CustomPage{} + +// CustomPage struct for CustomPage +type CustomPage struct { + StatusCode *int32 `json:"status_code,omitempty"` + Type *string `json:"type,omitempty"` + Url *string `json:"url,omitempty"` +} + +// NewCustomPage instantiates a new CustomPage object +// This constructor will assign default values to properties that have it defined, +// 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 NewCustomPage() *CustomPage { + this := CustomPage{} + return &this +} + +// NewCustomPageWithDefaults instantiates a new CustomPage object +// This 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 NewCustomPageWithDefaults() *CustomPage { + this := CustomPage{} + return &this +} + +// GetStatusCode returns the StatusCode field value if set, zero value otherwise. +func (o *CustomPage) GetStatusCode() int32 { + if o == nil || IsNil(o.StatusCode) { + var ret int32 + return ret + } + return *o.StatusCode +} + +// GetStatusCodeOk returns a tuple with the StatusCode field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CustomPage) GetStatusCodeOk() (*int32, bool) { + if o == nil || IsNil(o.StatusCode) { + return nil, false + } + return o.StatusCode, true +} + +// HasStatusCode returns a boolean if a field has been set. +func (o *CustomPage) HasStatusCode() bool { + if o != nil && !IsNil(o.StatusCode) { + return true + } + + return false +} + +// SetStatusCode gets a reference to the given int32 and assigns it to the StatusCode field. +func (o *CustomPage) SetStatusCode(v int32) { + o.StatusCode = &v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *CustomPage) 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 *CustomPage) 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 *CustomPage) 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 *CustomPage) SetType(v string) { + o.Type = &v +} + +// GetUrl returns the Url field value if set, zero value otherwise. +func (o *CustomPage) GetUrl() string { + if o == nil || IsNil(o.Url) { + var ret string + return ret + } + return *o.Url +} + +// GetUrlOk returns a tuple with the Url field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CustomPage) GetUrlOk() (*string, bool) { + if o == nil || IsNil(o.Url) { + return nil, false + } + return o.Url, true +} + +// HasUrl returns a boolean if a field has been set. +func (o *CustomPage) HasUrl() bool { + if o != nil && !IsNil(o.Url) { + return true + } + + return false +} + +// SetUrl gets a reference to the given string and assigns it to the Url field. +func (o *CustomPage) SetUrl(v string) { + o.Url = &v +} + +func (o CustomPage) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CustomPage) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.StatusCode) { + toSerialize["status_code"] = o.StatusCode + } + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Url) { + toSerialize["url"] = o.Url + } + return toSerialize, nil +} + +type NullableCustomPage struct { + value *CustomPage + isSet bool +} + +func (v NullableCustomPage) Get() *CustomPage { + return v.value +} + +func (v *NullableCustomPage) Set(val *CustomPage) { + v.value = val + v.isSet = true +} + +func (v NullableCustomPage) IsSet() bool { + return v.isSet +} + +func (v *NullableCustomPage) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCustomPage(val *CustomPage) *NullableCustomPage { + return &NullableCustomPage{value: val, isSet: true} +} + +func (v NullableCustomPage) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCustomPage) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_custom_pages.go b/model_custom_pages.go new file mode 100644 index 0000000..df19fff --- /dev/null +++ b/model_custom_pages.go @@ -0,0 +1,414 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the CustomPages type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CustomPages{} + +// CustomPages struct for CustomPages +type CustomPages struct { + UnderConstruction *CustomPage `json:"under_construction,omitempty"` + FirewallError *CustomPage `json:"firewall_error,omitempty"` + WafProtection *CustomPage `json:"waf_protection,omitempty"` + RateLimitExceeded *CustomPage `json:"rate_limit_exceeded,omitempty"` + SecureLinkExpired *CustomPage `json:"secure_link_expired,omitempty"` + SecureLinkInvalid *CustomPage `json:"secure_link_invalid,omitempty"` + Error500 *CustomPage `json:"error_500,omitempty"` + DdosJs *CustomPage `json:"ddos_js,omitempty"` + DdosCaptcha *CustomPage `json:"ddos_captcha,omitempty"` +} + +// NewCustomPages instantiates a new CustomPages object +// This constructor will assign default values to properties that have it defined, +// 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 NewCustomPages() *CustomPages { + this := CustomPages{} + return &this +} + +// NewCustomPagesWithDefaults instantiates a new CustomPages object +// This 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 NewCustomPagesWithDefaults() *CustomPages { + this := CustomPages{} + return &this +} + +// GetUnderConstruction returns the UnderConstruction field value if set, zero value otherwise. +func (o *CustomPages) GetUnderConstruction() CustomPage { + if o == nil || IsNil(o.UnderConstruction) { + var ret CustomPage + return ret + } + return *o.UnderConstruction +} + +// GetUnderConstructionOk returns a tuple with the UnderConstruction field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CustomPages) GetUnderConstructionOk() (*CustomPage, bool) { + if o == nil || IsNil(o.UnderConstruction) { + return nil, false + } + return o.UnderConstruction, true +} + +// HasUnderConstruction returns a boolean if a field has been set. +func (o *CustomPages) HasUnderConstruction() bool { + if o != nil && !IsNil(o.UnderConstruction) { + return true + } + + return false +} + +// SetUnderConstruction gets a reference to the given CustomPage and assigns it to the UnderConstruction field. +func (o *CustomPages) SetUnderConstruction(v CustomPage) { + o.UnderConstruction = &v +} + +// GetFirewallError returns the FirewallError field value if set, zero value otherwise. +func (o *CustomPages) GetFirewallError() CustomPage { + if o == nil || IsNil(o.FirewallError) { + var ret CustomPage + return ret + } + return *o.FirewallError +} + +// GetFirewallErrorOk returns a tuple with the FirewallError field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CustomPages) GetFirewallErrorOk() (*CustomPage, bool) { + if o == nil || IsNil(o.FirewallError) { + return nil, false + } + return o.FirewallError, true +} + +// HasFirewallError returns a boolean if a field has been set. +func (o *CustomPages) HasFirewallError() bool { + if o != nil && !IsNil(o.FirewallError) { + return true + } + + return false +} + +// SetFirewallError gets a reference to the given CustomPage and assigns it to the FirewallError field. +func (o *CustomPages) SetFirewallError(v CustomPage) { + o.FirewallError = &v +} + +// GetWafProtection returns the WafProtection field value if set, zero value otherwise. +func (o *CustomPages) GetWafProtection() CustomPage { + if o == nil || IsNil(o.WafProtection) { + var ret CustomPage + return ret + } + return *o.WafProtection +} + +// GetWafProtectionOk returns a tuple with the WafProtection field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CustomPages) GetWafProtectionOk() (*CustomPage, bool) { + if o == nil || IsNil(o.WafProtection) { + return nil, false + } + return o.WafProtection, true +} + +// HasWafProtection returns a boolean if a field has been set. +func (o *CustomPages) HasWafProtection() bool { + if o != nil && !IsNil(o.WafProtection) { + return true + } + + return false +} + +// SetWafProtection gets a reference to the given CustomPage and assigns it to the WafProtection field. +func (o *CustomPages) SetWafProtection(v CustomPage) { + o.WafProtection = &v +} + +// GetRateLimitExceeded returns the RateLimitExceeded field value if set, zero value otherwise. +func (o *CustomPages) GetRateLimitExceeded() CustomPage { + if o == nil || IsNil(o.RateLimitExceeded) { + var ret CustomPage + return ret + } + return *o.RateLimitExceeded +} + +// GetRateLimitExceededOk returns a tuple with the RateLimitExceeded field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CustomPages) GetRateLimitExceededOk() (*CustomPage, bool) { + if o == nil || IsNil(o.RateLimitExceeded) { + return nil, false + } + return o.RateLimitExceeded, true +} + +// HasRateLimitExceeded returns a boolean if a field has been set. +func (o *CustomPages) HasRateLimitExceeded() bool { + if o != nil && !IsNil(o.RateLimitExceeded) { + return true + } + + return false +} + +// SetRateLimitExceeded gets a reference to the given CustomPage and assigns it to the RateLimitExceeded field. +func (o *CustomPages) SetRateLimitExceeded(v CustomPage) { + o.RateLimitExceeded = &v +} + +// GetSecureLinkExpired returns the SecureLinkExpired field value if set, zero value otherwise. +func (o *CustomPages) GetSecureLinkExpired() CustomPage { + if o == nil || IsNil(o.SecureLinkExpired) { + var ret CustomPage + return ret + } + return *o.SecureLinkExpired +} + +// GetSecureLinkExpiredOk returns a tuple with the SecureLinkExpired field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CustomPages) GetSecureLinkExpiredOk() (*CustomPage, bool) { + if o == nil || IsNil(o.SecureLinkExpired) { + return nil, false + } + return o.SecureLinkExpired, true +} + +// HasSecureLinkExpired returns a boolean if a field has been set. +func (o *CustomPages) HasSecureLinkExpired() bool { + if o != nil && !IsNil(o.SecureLinkExpired) { + return true + } + + return false +} + +// SetSecureLinkExpired gets a reference to the given CustomPage and assigns it to the SecureLinkExpired field. +func (o *CustomPages) SetSecureLinkExpired(v CustomPage) { + o.SecureLinkExpired = &v +} + +// GetSecureLinkInvalid returns the SecureLinkInvalid field value if set, zero value otherwise. +func (o *CustomPages) GetSecureLinkInvalid() CustomPage { + if o == nil || IsNil(o.SecureLinkInvalid) { + var ret CustomPage + return ret + } + return *o.SecureLinkInvalid +} + +// GetSecureLinkInvalidOk returns a tuple with the SecureLinkInvalid field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CustomPages) GetSecureLinkInvalidOk() (*CustomPage, bool) { + if o == nil || IsNil(o.SecureLinkInvalid) { + return nil, false + } + return o.SecureLinkInvalid, true +} + +// HasSecureLinkInvalid returns a boolean if a field has been set. +func (o *CustomPages) HasSecureLinkInvalid() bool { + if o != nil && !IsNil(o.SecureLinkInvalid) { + return true + } + + return false +} + +// SetSecureLinkInvalid gets a reference to the given CustomPage and assigns it to the SecureLinkInvalid field. +func (o *CustomPages) SetSecureLinkInvalid(v CustomPage) { + o.SecureLinkInvalid = &v +} + +// GetError500 returns the Error500 field value if set, zero value otherwise. +func (o *CustomPages) GetError500() CustomPage { + if o == nil || IsNil(o.Error500) { + var ret CustomPage + return ret + } + return *o.Error500 +} + +// GetError500Ok returns a tuple with the Error500 field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CustomPages) GetError500Ok() (*CustomPage, bool) { + if o == nil || IsNil(o.Error500) { + return nil, false + } + return o.Error500, true +} + +// HasError500 returns a boolean if a field has been set. +func (o *CustomPages) HasError500() bool { + if o != nil && !IsNil(o.Error500) { + return true + } + + return false +} + +// SetError500 gets a reference to the given CustomPage and assigns it to the Error500 field. +func (o *CustomPages) SetError500(v CustomPage) { + o.Error500 = &v +} + +// GetDdosJs returns the DdosJs field value if set, zero value otherwise. +func (o *CustomPages) GetDdosJs() CustomPage { + if o == nil || IsNil(o.DdosJs) { + var ret CustomPage + return ret + } + return *o.DdosJs +} + +// GetDdosJsOk returns a tuple with the DdosJs field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CustomPages) GetDdosJsOk() (*CustomPage, bool) { + if o == nil || IsNil(o.DdosJs) { + return nil, false + } + return o.DdosJs, true +} + +// HasDdosJs returns a boolean if a field has been set. +func (o *CustomPages) HasDdosJs() bool { + if o != nil && !IsNil(o.DdosJs) { + return true + } + + return false +} + +// SetDdosJs gets a reference to the given CustomPage and assigns it to the DdosJs field. +func (o *CustomPages) SetDdosJs(v CustomPage) { + o.DdosJs = &v +} + +// GetDdosCaptcha returns the DdosCaptcha field value if set, zero value otherwise. +func (o *CustomPages) GetDdosCaptcha() CustomPage { + if o == nil || IsNil(o.DdosCaptcha) { + var ret CustomPage + return ret + } + return *o.DdosCaptcha +} + +// GetDdosCaptchaOk returns a tuple with the DdosCaptcha field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CustomPages) GetDdosCaptchaOk() (*CustomPage, bool) { + if o == nil || IsNil(o.DdosCaptcha) { + return nil, false + } + return o.DdosCaptcha, true +} + +// HasDdosCaptcha returns a boolean if a field has been set. +func (o *CustomPages) HasDdosCaptcha() bool { + if o != nil && !IsNil(o.DdosCaptcha) { + return true + } + + return false +} + +// SetDdosCaptcha gets a reference to the given CustomPage and assigns it to the DdosCaptcha field. +func (o *CustomPages) SetDdosCaptcha(v CustomPage) { + o.DdosCaptcha = &v +} + +func (o CustomPages) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CustomPages) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.UnderConstruction) { + toSerialize["under_construction"] = o.UnderConstruction + } + if !IsNil(o.FirewallError) { + toSerialize["firewall_error"] = o.FirewallError + } + if !IsNil(o.WafProtection) { + toSerialize["waf_protection"] = o.WafProtection + } + if !IsNil(o.RateLimitExceeded) { + toSerialize["rate_limit_exceeded"] = o.RateLimitExceeded + } + if !IsNil(o.SecureLinkExpired) { + toSerialize["secure_link_expired"] = o.SecureLinkExpired + } + if !IsNil(o.SecureLinkInvalid) { + toSerialize["secure_link_invalid"] = o.SecureLinkInvalid + } + if !IsNil(o.Error500) { + toSerialize["error_500"] = o.Error500 + } + if !IsNil(o.DdosJs) { + toSerialize["ddos_js"] = o.DdosJs + } + if !IsNil(o.DdosCaptcha) { + toSerialize["ddos_captcha"] = o.DdosCaptcha + } + return toSerialize, nil +} + +type NullableCustomPages struct { + value *CustomPages + isSet bool +} + +func (v NullableCustomPages) Get() *CustomPages { + return v.value +} + +func (v *NullableCustomPages) Set(val *CustomPages) { + v.value = val + v.isSet = true +} + +func (v NullableCustomPages) IsSet() bool { + return v.isSet +} + +func (v *NullableCustomPages) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCustomPages(val *CustomPages) *NullableCustomPages { + return &NullableCustomPages{value: val, isSet: true} +} + +func (v NullableCustomPages) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCustomPages) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_custom_pages_data.go b/model_custom_pages_data.go new file mode 100644 index 0000000..c495567 --- /dev/null +++ b/model_custom_pages_data.go @@ -0,0 +1,126 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the CustomPagesData type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CustomPagesData{} + +// CustomPagesData struct for CustomPagesData +type CustomPagesData struct { + Data *CustomPages `json:"data,omitempty"` +} + +// NewCustomPagesData instantiates a new CustomPagesData object +// This constructor will assign default values to properties that have it defined, +// 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 NewCustomPagesData() *CustomPagesData { + this := CustomPagesData{} + return &this +} + +// NewCustomPagesDataWithDefaults instantiates a new CustomPagesData object +// This 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 NewCustomPagesDataWithDefaults() *CustomPagesData { + this := CustomPagesData{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *CustomPagesData) GetData() CustomPages { + if o == nil || IsNil(o.Data) { + var ret CustomPages + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CustomPagesData) GetDataOk() (*CustomPages, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *CustomPagesData) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given CustomPages and assigns it to the Data field. +func (o *CustomPagesData) SetData(v CustomPages) { + o.Data = &v +} + +func (o CustomPagesData) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CustomPagesData) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + return toSerialize, nil +} + +type NullableCustomPagesData struct { + value *CustomPagesData + isSet bool +} + +func (v NullableCustomPagesData) Get() *CustomPagesData { + return v.value +} + +func (v *NullableCustomPagesData) Set(val *CustomPagesData) { + v.value = val + v.isSet = true +} + +func (v NullableCustomPagesData) IsSet() bool { + return v.isSet +} + +func (v *NullableCustomPagesData) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCustomPagesData(val *CustomPagesData) *NullableCustomPagesData { + return &NullableCustomPagesData{value: val, isSet: true} +} + +func (v NullableCustomPagesData) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCustomPagesData) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_data_response.go b/model_data_response.go new file mode 100644 index 0000000..bb0b8e8 --- /dev/null +++ b/model_data_response.go @@ -0,0 +1,127 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the DataResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DataResponse{} + +// DataResponse struct for DataResponse +type DataResponse struct { + Data map[string]interface{} `json:"data,omitempty"` +} + +// NewDataResponse instantiates a new DataResponse object +// This constructor will assign default values to properties that have it defined, +// 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 NewDataResponse() *DataResponse { + this := DataResponse{} + return &this +} + +// NewDataResponseWithDefaults instantiates a new DataResponse object +// This 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 NewDataResponseWithDefaults() *DataResponse { + this := DataResponse{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DataResponse) GetData() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + return o.Data +} + +// GetDataOk returns a tuple with the Data 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 *DataResponse) GetDataOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Data) { + return map[string]interface{}{}, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *DataResponse) HasData() bool { + if o != nil && IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given map[string]interface{} and assigns it to the Data field. +func (o *DataResponse) SetData(v map[string]interface{}) { + o.Data = v +} + +func (o DataResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DataResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.Data != nil { + toSerialize["data"] = o.Data + } + return toSerialize, nil +} + +type NullableDataResponse struct { + value *DataResponse + isSet bool +} + +func (v NullableDataResponse) Get() *DataResponse { + return v.value +} + +func (v *NullableDataResponse) Set(val *DataResponse) { + v.value = val + v.isSet = true +} + +func (v NullableDataResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableDataResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDataResponse(val *DataResponse) *NullableDataResponse { + return &NullableDataResponse{value: val, isSet: true} +} + +func (v NullableDataResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDataResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_data_with_message_response.go b/model_data_with_message_response.go new file mode 100644 index 0000000..9aa6ebc --- /dev/null +++ b/model_data_with_message_response.go @@ -0,0 +1,173 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the DataWithMessageResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DataWithMessageResponse{} + +// DataWithMessageResponse struct for DataWithMessageResponse +type DataWithMessageResponse struct { + Message NullableString `json:"message,omitempty"` + Data map[string]interface{} `json:"data,omitempty"` +} + +// NewDataWithMessageResponse instantiates a new DataWithMessageResponse object +// This constructor will assign default values to properties that have it defined, +// 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 NewDataWithMessageResponse() *DataWithMessageResponse { + this := DataWithMessageResponse{} + return &this +} + +// NewDataWithMessageResponseWithDefaults instantiates a new DataWithMessageResponse object +// This 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 NewDataWithMessageResponseWithDefaults() *DataWithMessageResponse { + this := DataWithMessageResponse{} + return &this +} + +// GetMessage returns the Message field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DataWithMessageResponse) GetMessage() string { + if o == nil || IsNil(o.Message.Get()) { + var ret string + return ret + } + return *o.Message.Get() +} + +// GetMessageOk returns a tuple with the Message 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 *DataWithMessageResponse) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Message.Get(), o.Message.IsSet() +} + +// HasMessage returns a boolean if a field has been set. +func (o *DataWithMessageResponse) HasMessage() bool { + if o != nil && o.Message.IsSet() { + return true + } + + return false +} + +// SetMessage gets a reference to the given NullableString and assigns it to the Message field. +func (o *DataWithMessageResponse) SetMessage(v string) { + o.Message.Set(&v) +} +// SetMessageNil sets the value for Message to be an explicit nil +func (o *DataWithMessageResponse) SetMessageNil() { + o.Message.Set(nil) +} + +// UnsetMessage ensures that no value is present for Message, not even an explicit nil +func (o *DataWithMessageResponse) UnsetMessage() { + o.Message.Unset() +} + +// GetData returns the Data field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DataWithMessageResponse) GetData() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + return o.Data +} + +// GetDataOk returns a tuple with the Data 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 *DataWithMessageResponse) GetDataOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Data) { + return map[string]interface{}{}, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *DataWithMessageResponse) HasData() bool { + if o != nil && IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given map[string]interface{} and assigns it to the Data field. +func (o *DataWithMessageResponse) SetData(v map[string]interface{}) { + o.Data = v +} + +func (o DataWithMessageResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DataWithMessageResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.Message.IsSet() { + toSerialize["message"] = o.Message.Get() + } + if o.Data != nil { + toSerialize["data"] = o.Data + } + return toSerialize, nil +} + +type NullableDataWithMessageResponse struct { + value *DataWithMessageResponse + isSet bool +} + +func (v NullableDataWithMessageResponse) Get() *DataWithMessageResponse { + return v.value +} + +func (v *NullableDataWithMessageResponse) Set(val *DataWithMessageResponse) { + v.value = val + v.isSet = true +} + +func (v NullableDataWithMessageResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableDataWithMessageResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDataWithMessageResponse(val *DataWithMessageResponse) *NullableDataWithMessageResponse { + return &NullableDataWithMessageResponse{value: val, isSet: true} +} + +func (v NullableDataWithMessageResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDataWithMessageResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_ddos.go b/model_ddos.go new file mode 100644 index 0000000..fe6b2ed --- /dev/null +++ b/model_ddos.go @@ -0,0 +1,340 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the Ddos type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Ddos{} + +// Ddos struct for Ddos +type Ddos struct { + IsEnabled *bool `json:"is_enabled,omitempty"` + ProtectionMode *string `json:"protection_mode,omitempty"` + CaptchaService *string `json:"captcha_service,omitempty"` + // Time in seconds for cookie max-age + Ttl *int32 `json:"ttl,omitempty"` + // Adds \"SameSite=None; Secure\" to set-cookie header + HttpsOnly *bool `json:"https_only,omitempty"` + Preflight *DdosPreflight `json:"preflight,omitempty"` + Rules []DdosRule `json:"rules,omitempty"` +} + +// NewDdos instantiates a new Ddos object +// This constructor will assign default values to properties that have it defined, +// 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 NewDdos() *Ddos { + this := Ddos{} + return &this +} + +// NewDdosWithDefaults instantiates a new Ddos object +// This 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 NewDdosWithDefaults() *Ddos { + this := Ddos{} + return &this +} + +// GetIsEnabled returns the IsEnabled field value if set, zero value otherwise. +func (o *Ddos) GetIsEnabled() bool { + if o == nil || IsNil(o.IsEnabled) { + var ret bool + return ret + } + return *o.IsEnabled +} + +// GetIsEnabledOk returns a tuple with the IsEnabled field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Ddos) GetIsEnabledOk() (*bool, bool) { + if o == nil || IsNil(o.IsEnabled) { + return nil, false + } + return o.IsEnabled, true +} + +// HasIsEnabled returns a boolean if a field has been set. +func (o *Ddos) HasIsEnabled() bool { + if o != nil && !IsNil(o.IsEnabled) { + return true + } + + return false +} + +// SetIsEnabled gets a reference to the given bool and assigns it to the IsEnabled field. +func (o *Ddos) SetIsEnabled(v bool) { + o.IsEnabled = &v +} + +// GetProtectionMode returns the ProtectionMode field value if set, zero value otherwise. +func (o *Ddos) GetProtectionMode() string { + if o == nil || IsNil(o.ProtectionMode) { + var ret string + return ret + } + return *o.ProtectionMode +} + +// GetProtectionModeOk returns a tuple with the ProtectionMode field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Ddos) GetProtectionModeOk() (*string, bool) { + if o == nil || IsNil(o.ProtectionMode) { + return nil, false + } + return o.ProtectionMode, true +} + +// HasProtectionMode returns a boolean if a field has been set. +func (o *Ddos) HasProtectionMode() bool { + if o != nil && !IsNil(o.ProtectionMode) { + return true + } + + return false +} + +// SetProtectionMode gets a reference to the given string and assigns it to the ProtectionMode field. +func (o *Ddos) SetProtectionMode(v string) { + o.ProtectionMode = &v +} + +// GetCaptchaService returns the CaptchaService field value if set, zero value otherwise. +func (o *Ddos) GetCaptchaService() string { + if o == nil || IsNil(o.CaptchaService) { + var ret string + return ret + } + return *o.CaptchaService +} + +// GetCaptchaServiceOk returns a tuple with the CaptchaService field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Ddos) GetCaptchaServiceOk() (*string, bool) { + if o == nil || IsNil(o.CaptchaService) { + return nil, false + } + return o.CaptchaService, true +} + +// HasCaptchaService returns a boolean if a field has been set. +func (o *Ddos) HasCaptchaService() bool { + if o != nil && !IsNil(o.CaptchaService) { + return true + } + + return false +} + +// SetCaptchaService gets a reference to the given string and assigns it to the CaptchaService field. +func (o *Ddos) SetCaptchaService(v string) { + o.CaptchaService = &v +} + +// GetTtl returns the Ttl field value if set, zero value otherwise. +func (o *Ddos) GetTtl() int32 { + if o == nil || IsNil(o.Ttl) { + var ret int32 + return ret + } + return *o.Ttl +} + +// GetTtlOk returns a tuple with the Ttl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Ddos) GetTtlOk() (*int32, bool) { + if o == nil || IsNil(o.Ttl) { + return nil, false + } + return o.Ttl, true +} + +// HasTtl returns a boolean if a field has been set. +func (o *Ddos) HasTtl() bool { + if o != nil && !IsNil(o.Ttl) { + return true + } + + return false +} + +// SetTtl gets a reference to the given int32 and assigns it to the Ttl field. +func (o *Ddos) SetTtl(v int32) { + o.Ttl = &v +} + +// GetHttpsOnly returns the HttpsOnly field value if set, zero value otherwise. +func (o *Ddos) GetHttpsOnly() bool { + if o == nil || IsNil(o.HttpsOnly) { + var ret bool + return ret + } + return *o.HttpsOnly +} + +// GetHttpsOnlyOk returns a tuple with the HttpsOnly field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Ddos) GetHttpsOnlyOk() (*bool, bool) { + if o == nil || IsNil(o.HttpsOnly) { + return nil, false + } + return o.HttpsOnly, true +} + +// HasHttpsOnly returns a boolean if a field has been set. +func (o *Ddos) HasHttpsOnly() bool { + if o != nil && !IsNil(o.HttpsOnly) { + return true + } + + return false +} + +// SetHttpsOnly gets a reference to the given bool and assigns it to the HttpsOnly field. +func (o *Ddos) SetHttpsOnly(v bool) { + o.HttpsOnly = &v +} + +// GetPreflight returns the Preflight field value if set, zero value otherwise. +func (o *Ddos) GetPreflight() DdosPreflight { + if o == nil || IsNil(o.Preflight) { + var ret DdosPreflight + return ret + } + return *o.Preflight +} + +// GetPreflightOk returns a tuple with the Preflight field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Ddos) GetPreflightOk() (*DdosPreflight, bool) { + if o == nil || IsNil(o.Preflight) { + return nil, false + } + return o.Preflight, true +} + +// HasPreflight returns a boolean if a field has been set. +func (o *Ddos) HasPreflight() bool { + if o != nil && !IsNil(o.Preflight) { + return true + } + + return false +} + +// SetPreflight gets a reference to the given DdosPreflight and assigns it to the Preflight field. +func (o *Ddos) SetPreflight(v DdosPreflight) { + o.Preflight = &v +} + +// GetRules returns the Rules field value if set, zero value otherwise. +func (o *Ddos) GetRules() []DdosRule { + if o == nil || IsNil(o.Rules) { + var ret []DdosRule + return ret + } + return o.Rules +} + +// GetRulesOk returns a tuple with the Rules field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Ddos) GetRulesOk() ([]DdosRule, bool) { + if o == nil || IsNil(o.Rules) { + return nil, false + } + return o.Rules, true +} + +// HasRules returns a boolean if a field has been set. +func (o *Ddos) HasRules() bool { + if o != nil && !IsNil(o.Rules) { + return true + } + + return false +} + +// SetRules gets a reference to the given []DdosRule and assigns it to the Rules field. +func (o *Ddos) SetRules(v []DdosRule) { + o.Rules = v +} + +func (o Ddos) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Ddos) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: is_enabled is readOnly + if !IsNil(o.ProtectionMode) { + toSerialize["protection_mode"] = o.ProtectionMode + } + if !IsNil(o.CaptchaService) { + toSerialize["captcha_service"] = o.CaptchaService + } + if !IsNil(o.Ttl) { + toSerialize["ttl"] = o.Ttl + } + if !IsNil(o.HttpsOnly) { + toSerialize["https_only"] = o.HttpsOnly + } + if !IsNil(o.Preflight) { + toSerialize["preflight"] = o.Preflight + } + // skip: rules is readOnly + return toSerialize, nil +} + +type NullableDdos struct { + value *Ddos + isSet bool +} + +func (v NullableDdos) Get() *Ddos { + return v.value +} + +func (v *NullableDdos) Set(val *Ddos) { + v.value = val + v.isSet = true +} + +func (v NullableDdos) IsSet() bool { + return v.isSet +} + +func (v *NullableDdos) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDdos(val *Ddos) *NullableDdos { + return &NullableDdos{value: val, isSet: true} +} + +func (v NullableDdos) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDdos) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_ddos_data.go b/model_ddos_data.go new file mode 100644 index 0000000..7098ee2 --- /dev/null +++ b/model_ddos_data.go @@ -0,0 +1,176 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the DdosData type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DdosData{} + +// DdosData struct for DdosData +type DdosData struct { + // Deprecated + Data *Ddos `json:"data,omitempty"` + Message NullableString `json:"message,omitempty"` +} + +// NewDdosData instantiates a new DdosData object +// This constructor will assign default values to properties that have it defined, +// 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 NewDdosData() *DdosData { + this := DdosData{} + return &this +} + +// NewDdosDataWithDefaults instantiates a new DdosData object +// This 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 NewDdosDataWithDefaults() *DdosData { + this := DdosData{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +// Deprecated +func (o *DdosData) GetData() Ddos { + if o == nil || IsNil(o.Data) { + var ret Ddos + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +// Deprecated +func (o *DdosData) GetDataOk() (*Ddos, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *DdosData) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given Ddos and assigns it to the Data field. +// Deprecated +func (o *DdosData) SetData(v Ddos) { + o.Data = &v +} + +// GetMessage returns the Message field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DdosData) GetMessage() string { + if o == nil || IsNil(o.Message.Get()) { + var ret string + return ret + } + return *o.Message.Get() +} + +// GetMessageOk returns a tuple with the Message 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 *DdosData) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Message.Get(), o.Message.IsSet() +} + +// HasMessage returns a boolean if a field has been set. +func (o *DdosData) HasMessage() bool { + if o != nil && o.Message.IsSet() { + return true + } + + return false +} + +// SetMessage gets a reference to the given NullableString and assigns it to the Message field. +func (o *DdosData) SetMessage(v string) { + o.Message.Set(&v) +} +// SetMessageNil sets the value for Message to be an explicit nil +func (o *DdosData) SetMessageNil() { + o.Message.Set(nil) +} + +// UnsetMessage ensures that no value is present for Message, not even an explicit nil +func (o *DdosData) UnsetMessage() { + o.Message.Unset() +} + +func (o DdosData) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DdosData) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + if o.Message.IsSet() { + toSerialize["message"] = o.Message.Get() + } + return toSerialize, nil +} + +type NullableDdosData struct { + value *DdosData + isSet bool +} + +func (v NullableDdosData) Get() *DdosData { + return v.value +} + +func (v *NullableDdosData) Set(val *DdosData) { + v.value = val + v.isSet = true +} + +func (v NullableDdosData) IsSet() bool { + return v.isSet +} + +func (v *NullableDdosData) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDdosData(val *DdosData) *NullableDdosData { + return &NullableDdosData{value: val, isSet: true} +} + +func (v NullableDdosData) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDdosData) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_ddos_preflight.go b/model_ddos_preflight.go new file mode 100644 index 0000000..3b17e9a --- /dev/null +++ b/model_ddos_preflight.go @@ -0,0 +1,270 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the DdosPreflight type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DdosPreflight{} + +// DdosPreflight struct for DdosPreflight +type DdosPreflight struct { + AccessOrigin *string `json:"access_origin,omitempty"` + AccessCredentials *string `json:"access_credentials,omitempty"` + AccessMethods []string `json:"access_methods,omitempty"` + AccessHeaders *string `json:"access_headers,omitempty"` + AccessExposeHeaders *string `json:"access_expose_headers,omitempty"` +} + +// NewDdosPreflight instantiates a new DdosPreflight object +// This constructor will assign default values to properties that have it defined, +// 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 NewDdosPreflight() *DdosPreflight { + this := DdosPreflight{} + return &this +} + +// NewDdosPreflightWithDefaults instantiates a new DdosPreflight object +// This 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 NewDdosPreflightWithDefaults() *DdosPreflight { + this := DdosPreflight{} + return &this +} + +// GetAccessOrigin returns the AccessOrigin field value if set, zero value otherwise. +func (o *DdosPreflight) GetAccessOrigin() string { + if o == nil || IsNil(o.AccessOrigin) { + var ret string + return ret + } + return *o.AccessOrigin +} + +// GetAccessOriginOk returns a tuple with the AccessOrigin field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DdosPreflight) GetAccessOriginOk() (*string, bool) { + if o == nil || IsNil(o.AccessOrigin) { + return nil, false + } + return o.AccessOrigin, true +} + +// HasAccessOrigin returns a boolean if a field has been set. +func (o *DdosPreflight) HasAccessOrigin() bool { + if o != nil && !IsNil(o.AccessOrigin) { + return true + } + + return false +} + +// SetAccessOrigin gets a reference to the given string and assigns it to the AccessOrigin field. +func (o *DdosPreflight) SetAccessOrigin(v string) { + o.AccessOrigin = &v +} + +// GetAccessCredentials returns the AccessCredentials field value if set, zero value otherwise. +func (o *DdosPreflight) GetAccessCredentials() string { + if o == nil || IsNil(o.AccessCredentials) { + var ret string + return ret + } + return *o.AccessCredentials +} + +// GetAccessCredentialsOk returns a tuple with the AccessCredentials field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DdosPreflight) GetAccessCredentialsOk() (*string, bool) { + if o == nil || IsNil(o.AccessCredentials) { + return nil, false + } + return o.AccessCredentials, true +} + +// HasAccessCredentials returns a boolean if a field has been set. +func (o *DdosPreflight) HasAccessCredentials() bool { + if o != nil && !IsNil(o.AccessCredentials) { + return true + } + + return false +} + +// SetAccessCredentials gets a reference to the given string and assigns it to the AccessCredentials field. +func (o *DdosPreflight) SetAccessCredentials(v string) { + o.AccessCredentials = &v +} + +// GetAccessMethods returns the AccessMethods field value if set, zero value otherwise. +func (o *DdosPreflight) GetAccessMethods() []string { + if o == nil || IsNil(o.AccessMethods) { + var ret []string + return ret + } + return o.AccessMethods +} + +// GetAccessMethodsOk returns a tuple with the AccessMethods field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DdosPreflight) GetAccessMethodsOk() ([]string, bool) { + if o == nil || IsNil(o.AccessMethods) { + return nil, false + } + return o.AccessMethods, true +} + +// HasAccessMethods returns a boolean if a field has been set. +func (o *DdosPreflight) HasAccessMethods() bool { + if o != nil && !IsNil(o.AccessMethods) { + return true + } + + return false +} + +// SetAccessMethods gets a reference to the given []string and assigns it to the AccessMethods field. +func (o *DdosPreflight) SetAccessMethods(v []string) { + o.AccessMethods = v +} + +// GetAccessHeaders returns the AccessHeaders field value if set, zero value otherwise. +func (o *DdosPreflight) GetAccessHeaders() string { + if o == nil || IsNil(o.AccessHeaders) { + var ret string + return ret + } + return *o.AccessHeaders +} + +// GetAccessHeadersOk returns a tuple with the AccessHeaders field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DdosPreflight) GetAccessHeadersOk() (*string, bool) { + if o == nil || IsNil(o.AccessHeaders) { + return nil, false + } + return o.AccessHeaders, true +} + +// HasAccessHeaders returns a boolean if a field has been set. +func (o *DdosPreflight) HasAccessHeaders() bool { + if o != nil && !IsNil(o.AccessHeaders) { + return true + } + + return false +} + +// SetAccessHeaders gets a reference to the given string and assigns it to the AccessHeaders field. +func (o *DdosPreflight) SetAccessHeaders(v string) { + o.AccessHeaders = &v +} + +// GetAccessExposeHeaders returns the AccessExposeHeaders field value if set, zero value otherwise. +func (o *DdosPreflight) GetAccessExposeHeaders() string { + if o == nil || IsNil(o.AccessExposeHeaders) { + var ret string + return ret + } + return *o.AccessExposeHeaders +} + +// GetAccessExposeHeadersOk returns a tuple with the AccessExposeHeaders field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DdosPreflight) GetAccessExposeHeadersOk() (*string, bool) { + if o == nil || IsNil(o.AccessExposeHeaders) { + return nil, false + } + return o.AccessExposeHeaders, true +} + +// HasAccessExposeHeaders returns a boolean if a field has been set. +func (o *DdosPreflight) HasAccessExposeHeaders() bool { + if o != nil && !IsNil(o.AccessExposeHeaders) { + return true + } + + return false +} + +// SetAccessExposeHeaders gets a reference to the given string and assigns it to the AccessExposeHeaders field. +func (o *DdosPreflight) SetAccessExposeHeaders(v string) { + o.AccessExposeHeaders = &v +} + +func (o DdosPreflight) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DdosPreflight) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.AccessOrigin) { + toSerialize["access_origin"] = o.AccessOrigin + } + if !IsNil(o.AccessCredentials) { + toSerialize["access_credentials"] = o.AccessCredentials + } + if !IsNil(o.AccessMethods) { + toSerialize["access_methods"] = o.AccessMethods + } + if !IsNil(o.AccessHeaders) { + toSerialize["access_headers"] = o.AccessHeaders + } + if !IsNil(o.AccessExposeHeaders) { + toSerialize["access_expose_headers"] = o.AccessExposeHeaders + } + return toSerialize, nil +} + +type NullableDdosPreflight struct { + value *DdosPreflight + isSet bool +} + +func (v NullableDdosPreflight) Get() *DdosPreflight { + return v.value +} + +func (v *NullableDdosPreflight) Set(val *DdosPreflight) { + v.value = val + v.isSet = true +} + +func (v NullableDdosPreflight) IsSet() bool { + return v.isSet +} + +func (v *NullableDdosPreflight) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDdosPreflight(val *DdosPreflight) *NullableDdosPreflight { + return &NullableDdosPreflight{value: val, isSet: true} +} + +func (v NullableDdosPreflight) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDdosPreflight) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_ddos_rule.go b/model_ddos_rule.go new file mode 100644 index 0000000..d9f3202 --- /dev/null +++ b/model_ddos_rule.go @@ -0,0 +1,305 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the DdosRule type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DdosRule{} + +// DdosRule struct for DdosRule +type DdosRule struct { + Id *string `json:"id,omitempty"` + // - `?` matches any single character. - `*` matches any (possibly empty) sequence of characters. - `**` matches the current directory and arbitrary subdirectories. This sequence must form a single path component, so both `**a` and `b**` are invalid and will result in an error. A sequence of more than two consecutive `*` characters is also invalid. - `[...]` matches any character inside the brackets. Character sequences can also specify ranges of characters, as ordered by Unicode, so e.g. `[0-9]` specifies any character between 0 and 9 inclusive. An unclosed bracket is invalid. - `[!...]` is the negation of `[...]`, i.e. it matches any characters not in the brackets. - The metacharacters `?`, `*`, `[`, `] `can be matched by using brackets (e.g. `[?]`). When a `]` occurs immediately following `[` or `[!` then it is interpreted as being part of, rather then ending, the character set, so `]` and NOT `]` can be matched by `[]]` and `[!]]` respectively. The - character can be specified inside a character sequence pattern by placing it at the start or the end, e.g. `[abc-]`. + UrlPattern *string `json:"url_pattern,omitempty"` + Sources []string `json:"sources,omitempty"` + Description *string `json:"description,omitempty"` + Action *string `json:"action,omitempty"` + IsEnabled *bool `json:"is_enabled,omitempty"` +} + +// NewDdosRule instantiates a new DdosRule object +// This constructor will assign default values to properties that have it defined, +// 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 NewDdosRule() *DdosRule { + this := DdosRule{} + return &this +} + +// NewDdosRuleWithDefaults instantiates a new DdosRule object +// This 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 NewDdosRuleWithDefaults() *DdosRule { + this := DdosRule{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *DdosRule) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DdosRule) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *DdosRule) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *DdosRule) SetId(v string) { + o.Id = &v +} + +// GetUrlPattern returns the UrlPattern field value if set, zero value otherwise. +func (o *DdosRule) GetUrlPattern() string { + if o == nil || IsNil(o.UrlPattern) { + var ret string + return ret + } + return *o.UrlPattern +} + +// GetUrlPatternOk returns a tuple with the UrlPattern field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DdosRule) GetUrlPatternOk() (*string, bool) { + if o == nil || IsNil(o.UrlPattern) { + return nil, false + } + return o.UrlPattern, true +} + +// HasUrlPattern returns a boolean if a field has been set. +func (o *DdosRule) HasUrlPattern() bool { + if o != nil && !IsNil(o.UrlPattern) { + return true + } + + return false +} + +// SetUrlPattern gets a reference to the given string and assigns it to the UrlPattern field. +func (o *DdosRule) SetUrlPattern(v string) { + o.UrlPattern = &v +} + +// GetSources returns the Sources field value if set, zero value otherwise. +func (o *DdosRule) GetSources() []string { + if o == nil || IsNil(o.Sources) { + var ret []string + 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 *DdosRule) GetSourcesOk() ([]string, 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 *DdosRule) HasSources() bool { + if o != nil && !IsNil(o.Sources) { + return true + } + + return false +} + +// SetSources gets a reference to the given []string and assigns it to the Sources field. +func (o *DdosRule) SetSources(v []string) { + o.Sources = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *DdosRule) 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 *DdosRule) 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 *DdosRule) 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 *DdosRule) SetDescription(v string) { + o.Description = &v +} + +// GetAction returns the Action field value if set, zero value otherwise. +func (o *DdosRule) GetAction() string { + if o == nil || IsNil(o.Action) { + var ret string + return ret + } + return *o.Action +} + +// GetActionOk returns a tuple with the Action field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DdosRule) GetActionOk() (*string, bool) { + if o == nil || IsNil(o.Action) { + return nil, false + } + return o.Action, true +} + +// HasAction returns a boolean if a field has been set. +func (o *DdosRule) HasAction() bool { + if o != nil && !IsNil(o.Action) { + return true + } + + return false +} + +// SetAction gets a reference to the given string and assigns it to the Action field. +func (o *DdosRule) SetAction(v string) { + o.Action = &v +} + +// GetIsEnabled returns the IsEnabled field value if set, zero value otherwise. +func (o *DdosRule) GetIsEnabled() bool { + if o == nil || IsNil(o.IsEnabled) { + var ret bool + return ret + } + return *o.IsEnabled +} + +// GetIsEnabledOk returns a tuple with the IsEnabled field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DdosRule) GetIsEnabledOk() (*bool, bool) { + if o == nil || IsNil(o.IsEnabled) { + return nil, false + } + return o.IsEnabled, true +} + +// HasIsEnabled returns a boolean if a field has been set. +func (o *DdosRule) HasIsEnabled() bool { + if o != nil && !IsNil(o.IsEnabled) { + return true + } + + return false +} + +// SetIsEnabled gets a reference to the given bool and assigns it to the IsEnabled field. +func (o *DdosRule) SetIsEnabled(v bool) { + o.IsEnabled = &v +} + +func (o DdosRule) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DdosRule) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: id is readOnly + if !IsNil(o.UrlPattern) { + toSerialize["url_pattern"] = o.UrlPattern + } + if !IsNil(o.Sources) { + toSerialize["sources"] = o.Sources + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.Action) { + toSerialize["action"] = o.Action + } + if !IsNil(o.IsEnabled) { + toSerialize["is_enabled"] = o.IsEnabled + } + return toSerialize, nil +} + +type NullableDdosRule struct { + value *DdosRule + isSet bool +} + +func (v NullableDdosRule) Get() *DdosRule { + return v.value +} + +func (v *NullableDdosRule) Set(val *DdosRule) { + v.value = val + v.isSet = true +} + +func (v NullableDdosRule) IsSet() bool { + return v.isSet +} + +func (v *NullableDdosRule) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDdosRule(val *DdosRule) *NullableDdosRule { + return &NullableDdosRule{value: val, isSet: true} +} + +func (v NullableDdosRule) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDdosRule) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_ddos_rule_data.go b/model_ddos_rule_data.go new file mode 100644 index 0000000..e21ac8c --- /dev/null +++ b/model_ddos_rule_data.go @@ -0,0 +1,126 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the DdosRuleData type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DdosRuleData{} + +// DdosRuleData struct for DdosRuleData +type DdosRuleData struct { + Data *DdosRule `json:"data,omitempty"` +} + +// NewDdosRuleData instantiates a new DdosRuleData object +// This constructor will assign default values to properties that have it defined, +// 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 NewDdosRuleData() *DdosRuleData { + this := DdosRuleData{} + return &this +} + +// NewDdosRuleDataWithDefaults instantiates a new DdosRuleData object +// This 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 NewDdosRuleDataWithDefaults() *DdosRuleData { + this := DdosRuleData{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *DdosRuleData) GetData() DdosRule { + if o == nil || IsNil(o.Data) { + var ret DdosRule + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DdosRuleData) GetDataOk() (*DdosRule, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *DdosRuleData) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given DdosRule and assigns it to the Data field. +func (o *DdosRuleData) SetData(v DdosRule) { + o.Data = &v +} + +func (o DdosRuleData) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DdosRuleData) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + return toSerialize, nil +} + +type NullableDdosRuleData struct { + value *DdosRuleData + isSet bool +} + +func (v NullableDdosRuleData) Get() *DdosRuleData { + return v.value +} + +func (v *NullableDdosRuleData) Set(val *DdosRuleData) { + v.value = val + v.isSet = true +} + +func (v NullableDdosRuleData) IsSet() bool { + return v.isSet +} + +func (v *NullableDdosRuleData) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDdosRuleData(val *DdosRuleData) *NullableDdosRuleData { + return &NullableDdosRuleData{value: val, isSet: true} +} + +func (v NullableDdosRuleData) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDdosRuleData) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_ddos_rule_response.go b/model_ddos_rule_response.go new file mode 100644 index 0000000..9f0f998 --- /dev/null +++ b/model_ddos_rule_response.go @@ -0,0 +1,172 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the DdosRuleResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DdosRuleResponse{} + +// DdosRuleResponse struct for DdosRuleResponse +type DdosRuleResponse struct { + Data *DdosRule `json:"data,omitempty"` + Message NullableString `json:"message,omitempty"` +} + +// NewDdosRuleResponse instantiates a new DdosRuleResponse object +// This constructor will assign default values to properties that have it defined, +// 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 NewDdosRuleResponse() *DdosRuleResponse { + this := DdosRuleResponse{} + return &this +} + +// NewDdosRuleResponseWithDefaults instantiates a new DdosRuleResponse object +// This 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 NewDdosRuleResponseWithDefaults() *DdosRuleResponse { + this := DdosRuleResponse{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *DdosRuleResponse) GetData() DdosRule { + if o == nil || IsNil(o.Data) { + var ret DdosRule + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DdosRuleResponse) GetDataOk() (*DdosRule, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *DdosRuleResponse) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given DdosRule and assigns it to the Data field. +func (o *DdosRuleResponse) SetData(v DdosRule) { + o.Data = &v +} + +// GetMessage returns the Message field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DdosRuleResponse) GetMessage() string { + if o == nil || IsNil(o.Message.Get()) { + var ret string + return ret + } + return *o.Message.Get() +} + +// GetMessageOk returns a tuple with the Message 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 *DdosRuleResponse) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Message.Get(), o.Message.IsSet() +} + +// HasMessage returns a boolean if a field has been set. +func (o *DdosRuleResponse) HasMessage() bool { + if o != nil && o.Message.IsSet() { + return true + } + + return false +} + +// SetMessage gets a reference to the given NullableString and assigns it to the Message field. +func (o *DdosRuleResponse) SetMessage(v string) { + o.Message.Set(&v) +} +// SetMessageNil sets the value for Message to be an explicit nil +func (o *DdosRuleResponse) SetMessageNil() { + o.Message.Set(nil) +} + +// UnsetMessage ensures that no value is present for Message, not even an explicit nil +func (o *DdosRuleResponse) UnsetMessage() { + o.Message.Unset() +} + +func (o DdosRuleResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DdosRuleResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + if o.Message.IsSet() { + toSerialize["message"] = o.Message.Get() + } + return toSerialize, nil +} + +type NullableDdosRuleResponse struct { + value *DdosRuleResponse + isSet bool +} + +func (v NullableDdosRuleResponse) Get() *DdosRuleResponse { + return v.value +} + +func (v *NullableDdosRuleResponse) Set(val *DdosRuleResponse) { + v.value = val + v.isSet = true +} + +func (v NullableDdosRuleResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableDdosRuleResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDdosRuleResponse(val *DdosRuleResponse) *NullableDdosRuleResponse { + return &NullableDdosRuleResponse{value: val, isSet: true} +} + +func (v NullableDdosRuleResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDdosRuleResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_ddos_rules_index_200_response.go b/model_ddos_rules_index_200_response.go new file mode 100644 index 0000000..f245e63 --- /dev/null +++ b/model_ddos_rules_index_200_response.go @@ -0,0 +1,198 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the DdosRulesIndex200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DdosRulesIndex200Response{} + +// DdosRulesIndex200Response struct for DdosRulesIndex200Response +type DdosRulesIndex200Response struct { + Data []DdosRule `json:"data,omitempty"` + Links *PaginatedResponseLinks `json:"links,omitempty"` + Meta *PaginatedResponseMeta `json:"meta,omitempty"` +} + +// NewDdosRulesIndex200Response instantiates a new DdosRulesIndex200Response object +// This constructor will assign default values to properties that have it defined, +// 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 NewDdosRulesIndex200Response() *DdosRulesIndex200Response { + this := DdosRulesIndex200Response{} + return &this +} + +// NewDdosRulesIndex200ResponseWithDefaults instantiates a new DdosRulesIndex200Response object +// This 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 NewDdosRulesIndex200ResponseWithDefaults() *DdosRulesIndex200Response { + this := DdosRulesIndex200Response{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *DdosRulesIndex200Response) GetData() []DdosRule { + if o == nil || IsNil(o.Data) { + var ret []DdosRule + return ret + } + return o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DdosRulesIndex200Response) GetDataOk() ([]DdosRule, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *DdosRulesIndex200Response) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given []DdosRule and assigns it to the Data field. +func (o *DdosRulesIndex200Response) SetData(v []DdosRule) { + o.Data = v +} + +// GetLinks returns the Links field value if set, zero value otherwise. +func (o *DdosRulesIndex200Response) GetLinks() PaginatedResponseLinks { + if o == nil || IsNil(o.Links) { + var ret PaginatedResponseLinks + return ret + } + return *o.Links +} + +// GetLinksOk returns a tuple with the Links field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DdosRulesIndex200Response) GetLinksOk() (*PaginatedResponseLinks, bool) { + if o == nil || IsNil(o.Links) { + return nil, false + } + return o.Links, true +} + +// HasLinks returns a boolean if a field has been set. +func (o *DdosRulesIndex200Response) HasLinks() bool { + if o != nil && !IsNil(o.Links) { + return true + } + + return false +} + +// SetLinks gets a reference to the given PaginatedResponseLinks and assigns it to the Links field. +func (o *DdosRulesIndex200Response) SetLinks(v PaginatedResponseLinks) { + o.Links = &v +} + +// GetMeta returns the Meta field value if set, zero value otherwise. +func (o *DdosRulesIndex200Response) GetMeta() PaginatedResponseMeta { + if o == nil || IsNil(o.Meta) { + var ret PaginatedResponseMeta + return ret + } + return *o.Meta +} + +// GetMetaOk returns a tuple with the Meta field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DdosRulesIndex200Response) GetMetaOk() (*PaginatedResponseMeta, bool) { + if o == nil || IsNil(o.Meta) { + return nil, false + } + return o.Meta, true +} + +// HasMeta returns a boolean if a field has been set. +func (o *DdosRulesIndex200Response) HasMeta() bool { + if o != nil && !IsNil(o.Meta) { + return true + } + + return false +} + +// SetMeta gets a reference to the given PaginatedResponseMeta and assigns it to the Meta field. +func (o *DdosRulesIndex200Response) SetMeta(v PaginatedResponseMeta) { + o.Meta = &v +} + +func (o DdosRulesIndex200Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DdosRulesIndex200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + if !IsNil(o.Links) { + toSerialize["links"] = o.Links + } + if !IsNil(o.Meta) { + toSerialize["meta"] = o.Meta + } + return toSerialize, nil +} + +type NullableDdosRulesIndex200Response struct { + value *DdosRulesIndex200Response + isSet bool +} + +func (v NullableDdosRulesIndex200Response) Get() *DdosRulesIndex200Response { + return v.value +} + +func (v *NullableDdosRulesIndex200Response) Set(val *DdosRulesIndex200Response) { + v.value = val + v.isSet = true +} + +func (v NullableDdosRulesIndex200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableDdosRulesIndex200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDdosRulesIndex200Response(val *DdosRulesIndex200Response) *NullableDdosRulesIndex200Response { + return &NullableDdosRulesIndex200Response{value: val, isSet: true} +} + +func (v NullableDdosRulesIndex200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDdosRulesIndex200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_ddos_settings.go b/model_ddos_settings.go new file mode 100644 index 0000000..1257114 --- /dev/null +++ b/model_ddos_settings.go @@ -0,0 +1,306 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the DdosSettings type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DdosSettings{} + +// DdosSettings struct for DdosSettings +type DdosSettings struct { + IsEnabled *bool `json:"is_enabled,omitempty"` + ProtectionMode *string `json:"protection_mode,omitempty"` + CaptchaService *string `json:"captcha_service,omitempty"` + // Time in seconds for cookie max-age + Ttl *int32 `json:"ttl,omitempty"` + // Adds \"SameSite=None; Secure\" to set-cookie header + HttpsOnly *bool `json:"https_only,omitempty"` + Preflight *DdosPreflight `json:"preflight,omitempty"` +} + +// NewDdosSettings instantiates a new DdosSettings object +// This constructor will assign default values to properties that have it defined, +// 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 NewDdosSettings() *DdosSettings { + this := DdosSettings{} + return &this +} + +// NewDdosSettingsWithDefaults instantiates a new DdosSettings object +// This 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 NewDdosSettingsWithDefaults() *DdosSettings { + this := DdosSettings{} + return &this +} + +// GetIsEnabled returns the IsEnabled field value if set, zero value otherwise. +func (o *DdosSettings) GetIsEnabled() bool { + if o == nil || IsNil(o.IsEnabled) { + var ret bool + return ret + } + return *o.IsEnabled +} + +// GetIsEnabledOk returns a tuple with the IsEnabled field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DdosSettings) GetIsEnabledOk() (*bool, bool) { + if o == nil || IsNil(o.IsEnabled) { + return nil, false + } + return o.IsEnabled, true +} + +// HasIsEnabled returns a boolean if a field has been set. +func (o *DdosSettings) HasIsEnabled() bool { + if o != nil && !IsNil(o.IsEnabled) { + return true + } + + return false +} + +// SetIsEnabled gets a reference to the given bool and assigns it to the IsEnabled field. +func (o *DdosSettings) SetIsEnabled(v bool) { + o.IsEnabled = &v +} + +// GetProtectionMode returns the ProtectionMode field value if set, zero value otherwise. +func (o *DdosSettings) GetProtectionMode() string { + if o == nil || IsNil(o.ProtectionMode) { + var ret string + return ret + } + return *o.ProtectionMode +} + +// GetProtectionModeOk returns a tuple with the ProtectionMode field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DdosSettings) GetProtectionModeOk() (*string, bool) { + if o == nil || IsNil(o.ProtectionMode) { + return nil, false + } + return o.ProtectionMode, true +} + +// HasProtectionMode returns a boolean if a field has been set. +func (o *DdosSettings) HasProtectionMode() bool { + if o != nil && !IsNil(o.ProtectionMode) { + return true + } + + return false +} + +// SetProtectionMode gets a reference to the given string and assigns it to the ProtectionMode field. +func (o *DdosSettings) SetProtectionMode(v string) { + o.ProtectionMode = &v +} + +// GetCaptchaService returns the CaptchaService field value if set, zero value otherwise. +func (o *DdosSettings) GetCaptchaService() string { + if o == nil || IsNil(o.CaptchaService) { + var ret string + return ret + } + return *o.CaptchaService +} + +// GetCaptchaServiceOk returns a tuple with the CaptchaService field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DdosSettings) GetCaptchaServiceOk() (*string, bool) { + if o == nil || IsNil(o.CaptchaService) { + return nil, false + } + return o.CaptchaService, true +} + +// HasCaptchaService returns a boolean if a field has been set. +func (o *DdosSettings) HasCaptchaService() bool { + if o != nil && !IsNil(o.CaptchaService) { + return true + } + + return false +} + +// SetCaptchaService gets a reference to the given string and assigns it to the CaptchaService field. +func (o *DdosSettings) SetCaptchaService(v string) { + o.CaptchaService = &v +} + +// GetTtl returns the Ttl field value if set, zero value otherwise. +func (o *DdosSettings) GetTtl() int32 { + if o == nil || IsNil(o.Ttl) { + var ret int32 + return ret + } + return *o.Ttl +} + +// GetTtlOk returns a tuple with the Ttl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DdosSettings) GetTtlOk() (*int32, bool) { + if o == nil || IsNil(o.Ttl) { + return nil, false + } + return o.Ttl, true +} + +// HasTtl returns a boolean if a field has been set. +func (o *DdosSettings) HasTtl() bool { + if o != nil && !IsNil(o.Ttl) { + return true + } + + return false +} + +// SetTtl gets a reference to the given int32 and assigns it to the Ttl field. +func (o *DdosSettings) SetTtl(v int32) { + o.Ttl = &v +} + +// GetHttpsOnly returns the HttpsOnly field value if set, zero value otherwise. +func (o *DdosSettings) GetHttpsOnly() bool { + if o == nil || IsNil(o.HttpsOnly) { + var ret bool + return ret + } + return *o.HttpsOnly +} + +// GetHttpsOnlyOk returns a tuple with the HttpsOnly field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DdosSettings) GetHttpsOnlyOk() (*bool, bool) { + if o == nil || IsNil(o.HttpsOnly) { + return nil, false + } + return o.HttpsOnly, true +} + +// HasHttpsOnly returns a boolean if a field has been set. +func (o *DdosSettings) HasHttpsOnly() bool { + if o != nil && !IsNil(o.HttpsOnly) { + return true + } + + return false +} + +// SetHttpsOnly gets a reference to the given bool and assigns it to the HttpsOnly field. +func (o *DdosSettings) SetHttpsOnly(v bool) { + o.HttpsOnly = &v +} + +// GetPreflight returns the Preflight field value if set, zero value otherwise. +func (o *DdosSettings) GetPreflight() DdosPreflight { + if o == nil || IsNil(o.Preflight) { + var ret DdosPreflight + return ret + } + return *o.Preflight +} + +// GetPreflightOk returns a tuple with the Preflight field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DdosSettings) GetPreflightOk() (*DdosPreflight, bool) { + if o == nil || IsNil(o.Preflight) { + return nil, false + } + return o.Preflight, true +} + +// HasPreflight returns a boolean if a field has been set. +func (o *DdosSettings) HasPreflight() bool { + if o != nil && !IsNil(o.Preflight) { + return true + } + + return false +} + +// SetPreflight gets a reference to the given DdosPreflight and assigns it to the Preflight field. +func (o *DdosSettings) SetPreflight(v DdosPreflight) { + o.Preflight = &v +} + +func (o DdosSettings) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DdosSettings) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: is_enabled is readOnly + if !IsNil(o.ProtectionMode) { + toSerialize["protection_mode"] = o.ProtectionMode + } + if !IsNil(o.CaptchaService) { + toSerialize["captcha_service"] = o.CaptchaService + } + if !IsNil(o.Ttl) { + toSerialize["ttl"] = o.Ttl + } + if !IsNil(o.HttpsOnly) { + toSerialize["https_only"] = o.HttpsOnly + } + if !IsNil(o.Preflight) { + toSerialize["preflight"] = o.Preflight + } + return toSerialize, nil +} + +type NullableDdosSettings struct { + value *DdosSettings + isSet bool +} + +func (v NullableDdosSettings) Get() *DdosSettings { + return v.value +} + +func (v *NullableDdosSettings) Set(val *DdosSettings) { + v.value = val + v.isSet = true +} + +func (v NullableDdosSettings) IsSet() bool { + return v.isSet +} + +func (v *NullableDdosSettings) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDdosSettings(val *DdosSettings) *NullableDdosSettings { + return &NullableDdosSettings{value: val, isSet: true} +} + +func (v NullableDdosSettings) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDdosSettings) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_ddos_settings_data.go b/model_ddos_settings_data.go new file mode 100644 index 0000000..4cdfb24 --- /dev/null +++ b/model_ddos_settings_data.go @@ -0,0 +1,172 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the DdosSettingsData type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DdosSettingsData{} + +// DdosSettingsData struct for DdosSettingsData +type DdosSettingsData struct { + Data *DdosSettings `json:"data,omitempty"` + Message NullableString `json:"message,omitempty"` +} + +// NewDdosSettingsData instantiates a new DdosSettingsData object +// This constructor will assign default values to properties that have it defined, +// 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 NewDdosSettingsData() *DdosSettingsData { + this := DdosSettingsData{} + return &this +} + +// NewDdosSettingsDataWithDefaults instantiates a new DdosSettingsData object +// This 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 NewDdosSettingsDataWithDefaults() *DdosSettingsData { + this := DdosSettingsData{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *DdosSettingsData) GetData() DdosSettings { + if o == nil || IsNil(o.Data) { + var ret DdosSettings + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DdosSettingsData) GetDataOk() (*DdosSettings, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *DdosSettingsData) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given DdosSettings and assigns it to the Data field. +func (o *DdosSettingsData) SetData(v DdosSettings) { + o.Data = &v +} + +// GetMessage returns the Message field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DdosSettingsData) GetMessage() string { + if o == nil || IsNil(o.Message.Get()) { + var ret string + return ret + } + return *o.Message.Get() +} + +// GetMessageOk returns a tuple with the Message 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 *DdosSettingsData) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Message.Get(), o.Message.IsSet() +} + +// HasMessage returns a boolean if a field has been set. +func (o *DdosSettingsData) HasMessage() bool { + if o != nil && o.Message.IsSet() { + return true + } + + return false +} + +// SetMessage gets a reference to the given NullableString and assigns it to the Message field. +func (o *DdosSettingsData) SetMessage(v string) { + o.Message.Set(&v) +} +// SetMessageNil sets the value for Message to be an explicit nil +func (o *DdosSettingsData) SetMessageNil() { + o.Message.Set(nil) +} + +// UnsetMessage ensures that no value is present for Message, not even an explicit nil +func (o *DdosSettingsData) UnsetMessage() { + o.Message.Unset() +} + +func (o DdosSettingsData) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DdosSettingsData) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + if o.Message.IsSet() { + toSerialize["message"] = o.Message.Get() + } + return toSerialize, nil +} + +type NullableDdosSettingsData struct { + value *DdosSettingsData + isSet bool +} + +func (v NullableDdosSettingsData) Get() *DdosSettingsData { + return v.value +} + +func (v *NullableDdosSettingsData) Set(val *DdosSettingsData) { + v.value = val + v.isSet = true +} + +func (v NullableDdosSettingsData) IsSet() bool { + return v.isSet +} + +func (v *NullableDdosSettingsData) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDdosSettingsData(val *DdosSettingsData) *NullableDdosSettingsData { + return &NullableDdosSettingsData{value: val, isSet: true} +} + +func (v NullableDdosSettingsData) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDdosSettingsData) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_ddos_settings_update_200_response.go b/model_ddos_settings_update_200_response.go new file mode 100644 index 0000000..588ab13 --- /dev/null +++ b/model_ddos_settings_update_200_response.go @@ -0,0 +1,172 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the DdosSettingsUpdate200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DdosSettingsUpdate200Response{} + +// DdosSettingsUpdate200Response struct for DdosSettingsUpdate200Response +type DdosSettingsUpdate200Response struct { + Data *DdosSettings `json:"data,omitempty"` + Message NullableString `json:"message,omitempty"` +} + +// NewDdosSettingsUpdate200Response instantiates a new DdosSettingsUpdate200Response object +// This constructor will assign default values to properties that have it defined, +// 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 NewDdosSettingsUpdate200Response() *DdosSettingsUpdate200Response { + this := DdosSettingsUpdate200Response{} + return &this +} + +// NewDdosSettingsUpdate200ResponseWithDefaults instantiates a new DdosSettingsUpdate200Response object +// This 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 NewDdosSettingsUpdate200ResponseWithDefaults() *DdosSettingsUpdate200Response { + this := DdosSettingsUpdate200Response{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *DdosSettingsUpdate200Response) GetData() DdosSettings { + if o == nil || IsNil(o.Data) { + var ret DdosSettings + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DdosSettingsUpdate200Response) GetDataOk() (*DdosSettings, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *DdosSettingsUpdate200Response) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given DdosSettings and assigns it to the Data field. +func (o *DdosSettingsUpdate200Response) SetData(v DdosSettings) { + o.Data = &v +} + +// GetMessage returns the Message field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DdosSettingsUpdate200Response) GetMessage() string { + if o == nil || IsNil(o.Message.Get()) { + var ret string + return ret + } + return *o.Message.Get() +} + +// GetMessageOk returns a tuple with the Message 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 *DdosSettingsUpdate200Response) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Message.Get(), o.Message.IsSet() +} + +// HasMessage returns a boolean if a field has been set. +func (o *DdosSettingsUpdate200Response) HasMessage() bool { + if o != nil && o.Message.IsSet() { + return true + } + + return false +} + +// SetMessage gets a reference to the given NullableString and assigns it to the Message field. +func (o *DdosSettingsUpdate200Response) SetMessage(v string) { + o.Message.Set(&v) +} +// SetMessageNil sets the value for Message to be an explicit nil +func (o *DdosSettingsUpdate200Response) SetMessageNil() { + o.Message.Set(nil) +} + +// UnsetMessage ensures that no value is present for Message, not even an explicit nil +func (o *DdosSettingsUpdate200Response) UnsetMessage() { + o.Message.Unset() +} + +func (o DdosSettingsUpdate200Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DdosSettingsUpdate200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + if o.Message.IsSet() { + toSerialize["message"] = o.Message.Get() + } + return toSerialize, nil +} + +type NullableDdosSettingsUpdate200Response struct { + value *DdosSettingsUpdate200Response + isSet bool +} + +func (v NullableDdosSettingsUpdate200Response) Get() *DdosSettingsUpdate200Response { + return v.value +} + +func (v *NullableDdosSettingsUpdate200Response) Set(val *DdosSettingsUpdate200Response) { + v.value = val + v.isSet = true +} + +func (v NullableDdosSettingsUpdate200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableDdosSettingsUpdate200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDdosSettingsUpdate200Response(val *DdosSettingsUpdate200Response) *NullableDdosSettingsUpdate200Response { + return &NullableDdosSettingsUpdate200Response{value: val, isSet: true} +} + +func (v NullableDdosSettingsUpdate200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDdosSettingsUpdate200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_ddos_update_200_response.go b/model_ddos_update_200_response.go new file mode 100644 index 0000000..dd91076 --- /dev/null +++ b/model_ddos_update_200_response.go @@ -0,0 +1,176 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the DdosUpdate200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DdosUpdate200Response{} + +// DdosUpdate200Response struct for DdosUpdate200Response +type DdosUpdate200Response struct { + // Deprecated + Data *Ddos `json:"data,omitempty"` + Message NullableString `json:"message,omitempty"` +} + +// NewDdosUpdate200Response instantiates a new DdosUpdate200Response object +// This constructor will assign default values to properties that have it defined, +// 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 NewDdosUpdate200Response() *DdosUpdate200Response { + this := DdosUpdate200Response{} + return &this +} + +// NewDdosUpdate200ResponseWithDefaults instantiates a new DdosUpdate200Response object +// This 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 NewDdosUpdate200ResponseWithDefaults() *DdosUpdate200Response { + this := DdosUpdate200Response{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +// Deprecated +func (o *DdosUpdate200Response) GetData() Ddos { + if o == nil || IsNil(o.Data) { + var ret Ddos + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +// Deprecated +func (o *DdosUpdate200Response) GetDataOk() (*Ddos, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *DdosUpdate200Response) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given Ddos and assigns it to the Data field. +// Deprecated +func (o *DdosUpdate200Response) SetData(v Ddos) { + o.Data = &v +} + +// GetMessage returns the Message field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DdosUpdate200Response) GetMessage() string { + if o == nil || IsNil(o.Message.Get()) { + var ret string + return ret + } + return *o.Message.Get() +} + +// GetMessageOk returns a tuple with the Message 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 *DdosUpdate200Response) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Message.Get(), o.Message.IsSet() +} + +// HasMessage returns a boolean if a field has been set. +func (o *DdosUpdate200Response) HasMessage() bool { + if o != nil && o.Message.IsSet() { + return true + } + + return false +} + +// SetMessage gets a reference to the given NullableString and assigns it to the Message field. +func (o *DdosUpdate200Response) SetMessage(v string) { + o.Message.Set(&v) +} +// SetMessageNil sets the value for Message to be an explicit nil +func (o *DdosUpdate200Response) SetMessageNil() { + o.Message.Set(nil) +} + +// UnsetMessage ensures that no value is present for Message, not even an explicit nil +func (o *DdosUpdate200Response) UnsetMessage() { + o.Message.Unset() +} + +func (o DdosUpdate200Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DdosUpdate200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + if o.Message.IsSet() { + toSerialize["message"] = o.Message.Get() + } + return toSerialize, nil +} + +type NullableDdosUpdate200Response struct { + value *DdosUpdate200Response + isSet bool +} + +func (v NullableDdosUpdate200Response) Get() *DdosUpdate200Response { + return v.value +} + +func (v *NullableDdosUpdate200Response) Set(val *DdosUpdate200Response) { + v.value = val + v.isSet = true +} + +func (v NullableDdosUpdate200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableDdosUpdate200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDdosUpdate200Response(val *DdosUpdate200Response) *NullableDdosUpdate200Response { + return &NullableDdosUpdate200Response{value: val, isSet: true} +} + +func (v NullableDdosUpdate200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDdosUpdate200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_deprecated_ns.go b/model_deprecated_ns.go new file mode 100644 index 0000000..8c31ec7 --- /dev/null +++ b/model_deprecated_ns.go @@ -0,0 +1,200 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the DeprecatedNs type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DeprecatedNs{} + +// DeprecatedNs struct for DeprecatedNs +type DeprecatedNs struct { + // Current NS records of the domain + NsDomain []string `json:"ns_domain,omitempty"` + // Desired NS values for the domain + NsKeys []string `json:"ns_keys,omitempty"` + NsStatus *bool `json:"ns_status,omitempty"` +} + +// NewDeprecatedNs instantiates a new DeprecatedNs object +// This constructor will assign default values to properties that have it defined, +// 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 NewDeprecatedNs() *DeprecatedNs { + this := DeprecatedNs{} + return &this +} + +// NewDeprecatedNsWithDefaults instantiates a new DeprecatedNs object +// This 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 NewDeprecatedNsWithDefaults() *DeprecatedNs { + this := DeprecatedNs{} + return &this +} + +// GetNsDomain returns the NsDomain field value if set, zero value otherwise. +func (o *DeprecatedNs) GetNsDomain() []string { + if o == nil || IsNil(o.NsDomain) { + var ret []string + return ret + } + return o.NsDomain +} + +// GetNsDomainOk returns a tuple with the NsDomain field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DeprecatedNs) GetNsDomainOk() ([]string, bool) { + if o == nil || IsNil(o.NsDomain) { + return nil, false + } + return o.NsDomain, true +} + +// HasNsDomain returns a boolean if a field has been set. +func (o *DeprecatedNs) HasNsDomain() bool { + if o != nil && !IsNil(o.NsDomain) { + return true + } + + return false +} + +// SetNsDomain gets a reference to the given []string and assigns it to the NsDomain field. +func (o *DeprecatedNs) SetNsDomain(v []string) { + o.NsDomain = v +} + +// GetNsKeys returns the NsKeys field value if set, zero value otherwise. +func (o *DeprecatedNs) GetNsKeys() []string { + if o == nil || IsNil(o.NsKeys) { + var ret []string + return ret + } + return o.NsKeys +} + +// GetNsKeysOk returns a tuple with the NsKeys field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DeprecatedNs) GetNsKeysOk() ([]string, bool) { + if o == nil || IsNil(o.NsKeys) { + return nil, false + } + return o.NsKeys, true +} + +// HasNsKeys returns a boolean if a field has been set. +func (o *DeprecatedNs) HasNsKeys() bool { + if o != nil && !IsNil(o.NsKeys) { + return true + } + + return false +} + +// SetNsKeys gets a reference to the given []string and assigns it to the NsKeys field. +func (o *DeprecatedNs) SetNsKeys(v []string) { + o.NsKeys = v +} + +// GetNsStatus returns the NsStatus field value if set, zero value otherwise. +func (o *DeprecatedNs) GetNsStatus() bool { + if o == nil || IsNil(o.NsStatus) { + var ret bool + return ret + } + return *o.NsStatus +} + +// GetNsStatusOk returns a tuple with the NsStatus field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DeprecatedNs) GetNsStatusOk() (*bool, bool) { + if o == nil || IsNil(o.NsStatus) { + return nil, false + } + return o.NsStatus, true +} + +// HasNsStatus returns a boolean if a field has been set. +func (o *DeprecatedNs) HasNsStatus() bool { + if o != nil && !IsNil(o.NsStatus) { + return true + } + + return false +} + +// SetNsStatus gets a reference to the given bool and assigns it to the NsStatus field. +func (o *DeprecatedNs) SetNsStatus(v bool) { + o.NsStatus = &v +} + +func (o DeprecatedNs) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DeprecatedNs) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.NsDomain) { + toSerialize["ns_domain"] = o.NsDomain + } + if !IsNil(o.NsKeys) { + toSerialize["ns_keys"] = o.NsKeys + } + if !IsNil(o.NsStatus) { + toSerialize["ns_status"] = o.NsStatus + } + return toSerialize, nil +} + +type NullableDeprecatedNs struct { + value *DeprecatedNs + isSet bool +} + +func (v NullableDeprecatedNs) Get() *DeprecatedNs { + return v.value +} + +func (v *NullableDeprecatedNs) Set(val *DeprecatedNs) { + v.value = val + v.isSet = true +} + +func (v NullableDeprecatedNs) IsSet() bool { + return v.isSet +} + +func (v *NullableDeprecatedNs) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDeprecatedNs(val *DeprecatedNs) *NullableDeprecatedNs { + return &NullableDeprecatedNs{value: val, isSet: true} +} + +func (v NullableDeprecatedNs) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDeprecatedNs) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_deprecated_waf_settings.go b/model_deprecated_waf_settings.go new file mode 100644 index 0000000..b914406 --- /dev/null +++ b/model_deprecated_waf_settings.go @@ -0,0 +1,198 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the DeprecatedWafSettings type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DeprecatedWafSettings{} + +// DeprecatedWafSettings struct for DeprecatedWafSettings +type DeprecatedWafSettings struct { + FWafStatus *string `json:"f_waf_status,omitempty"` + FThreshold *string `json:"f_threshold,omitempty"` + FProvider *string `json:"f_provider,omitempty"` +} + +// NewDeprecatedWafSettings instantiates a new DeprecatedWafSettings object +// This constructor will assign default values to properties that have it defined, +// 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 NewDeprecatedWafSettings() *DeprecatedWafSettings { + this := DeprecatedWafSettings{} + return &this +} + +// NewDeprecatedWafSettingsWithDefaults instantiates a new DeprecatedWafSettings object +// This 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 NewDeprecatedWafSettingsWithDefaults() *DeprecatedWafSettings { + this := DeprecatedWafSettings{} + return &this +} + +// GetFWafStatus returns the FWafStatus field value if set, zero value otherwise. +func (o *DeprecatedWafSettings) GetFWafStatus() string { + if o == nil || IsNil(o.FWafStatus) { + var ret string + return ret + } + return *o.FWafStatus +} + +// GetFWafStatusOk returns a tuple with the FWafStatus field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DeprecatedWafSettings) GetFWafStatusOk() (*string, bool) { + if o == nil || IsNil(o.FWafStatus) { + return nil, false + } + return o.FWafStatus, true +} + +// HasFWafStatus returns a boolean if a field has been set. +func (o *DeprecatedWafSettings) HasFWafStatus() bool { + if o != nil && !IsNil(o.FWafStatus) { + return true + } + + return false +} + +// SetFWafStatus gets a reference to the given string and assigns it to the FWafStatus field. +func (o *DeprecatedWafSettings) SetFWafStatus(v string) { + o.FWafStatus = &v +} + +// GetFThreshold returns the FThreshold field value if set, zero value otherwise. +func (o *DeprecatedWafSettings) GetFThreshold() string { + if o == nil || IsNil(o.FThreshold) { + var ret string + return ret + } + return *o.FThreshold +} + +// GetFThresholdOk returns a tuple with the FThreshold field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DeprecatedWafSettings) GetFThresholdOk() (*string, bool) { + if o == nil || IsNil(o.FThreshold) { + return nil, false + } + return o.FThreshold, true +} + +// HasFThreshold returns a boolean if a field has been set. +func (o *DeprecatedWafSettings) HasFThreshold() bool { + if o != nil && !IsNil(o.FThreshold) { + return true + } + + return false +} + +// SetFThreshold gets a reference to the given string and assigns it to the FThreshold field. +func (o *DeprecatedWafSettings) SetFThreshold(v string) { + o.FThreshold = &v +} + +// GetFProvider returns the FProvider field value if set, zero value otherwise. +func (o *DeprecatedWafSettings) GetFProvider() string { + if o == nil || IsNil(o.FProvider) { + var ret string + return ret + } + return *o.FProvider +} + +// GetFProviderOk returns a tuple with the FProvider field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DeprecatedWafSettings) GetFProviderOk() (*string, bool) { + if o == nil || IsNil(o.FProvider) { + return nil, false + } + return o.FProvider, true +} + +// HasFProvider returns a boolean if a field has been set. +func (o *DeprecatedWafSettings) HasFProvider() bool { + if o != nil && !IsNil(o.FProvider) { + return true + } + + return false +} + +// SetFProvider gets a reference to the given string and assigns it to the FProvider field. +func (o *DeprecatedWafSettings) SetFProvider(v string) { + o.FProvider = &v +} + +func (o DeprecatedWafSettings) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DeprecatedWafSettings) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.FWafStatus) { + toSerialize["f_waf_status"] = o.FWafStatus + } + if !IsNil(o.FThreshold) { + toSerialize["f_threshold"] = o.FThreshold + } + if !IsNil(o.FProvider) { + toSerialize["f_provider"] = o.FProvider + } + return toSerialize, nil +} + +type NullableDeprecatedWafSettings struct { + value *DeprecatedWafSettings + isSet bool +} + +func (v NullableDeprecatedWafSettings) Get() *DeprecatedWafSettings { + return v.value +} + +func (v *NullableDeprecatedWafSettings) Set(val *DeprecatedWafSettings) { + v.value = val + v.isSet = true +} + +func (v NullableDeprecatedWafSettings) IsSet() bool { + return v.isSet +} + +func (v *NullableDeprecatedWafSettings) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDeprecatedWafSettings(val *DeprecatedWafSettings) *NullableDeprecatedWafSettings { + return &NullableDeprecatedWafSettings{value: val, isSet: true} +} + +func (v NullableDeprecatedWafSettings) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDeprecatedWafSettings) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_dkim_record.go b/model_dkim_record.go new file mode 100644 index 0000000..f8c1dec --- /dev/null +++ b/model_dkim_record.go @@ -0,0 +1,520 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" + "time" +) + +// checks if the DKIMRecord type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DKIMRecord{} + +// DKIMRecord struct for DKIMRecord +type DKIMRecord struct { + Value *TXTRecordValue `json:"value,omitempty"` + Type *string `json:"type,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Ttl *int32 `json:"ttl,omitempty"` + Cloud *bool `json:"cloud,omitempty"` + UpstreamHttps *string `json:"upstream_https,omitempty"` + IpFilterMode *DnsRecordIpFilterMode `json:"ip_filter_mode,omitempty"` + // Protected records cannot be modified or deleted by user. + IsProtected *bool `json:"is_protected,omitempty"` + Usage []string `json:"usage,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty"` + UpdatedAt *time.Time `json:"updated_at,omitempty"` +} + +// NewDKIMRecord instantiates a new DKIMRecord object +// This constructor will assign default values to properties that have it defined, +// 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 NewDKIMRecord() *DKIMRecord { + this := DKIMRecord{} + var cloud bool = false + this.Cloud = &cloud + return &this +} + +// NewDKIMRecordWithDefaults instantiates a new DKIMRecord object +// This 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 NewDKIMRecordWithDefaults() *DKIMRecord { + this := DKIMRecord{} + var type_ string = "dkim" + this.Type = &type_ + var cloud bool = false + this.Cloud = &cloud + return &this +} + +// GetValue returns the Value field value if set, zero value otherwise. +func (o *DKIMRecord) GetValue() TXTRecordValue { + if o == nil || IsNil(o.Value) { + var ret TXTRecordValue + return ret + } + return *o.Value +} + +// GetValueOk returns a tuple with the Value field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DKIMRecord) GetValueOk() (*TXTRecordValue, bool) { + if o == nil || IsNil(o.Value) { + return nil, false + } + return o.Value, true +} + +// HasValue returns a boolean if a field has been set. +func (o *DKIMRecord) HasValue() bool { + if o != nil && !IsNil(o.Value) { + return true + } + + return false +} + +// SetValue gets a reference to the given TXTRecordValue and assigns it to the Value field. +func (o *DKIMRecord) SetValue(v TXTRecordValue) { + o.Value = &v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *DKIMRecord) 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 *DKIMRecord) 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 *DKIMRecord) 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 *DKIMRecord) SetType(v string) { + o.Type = &v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *DKIMRecord) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DKIMRecord) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *DKIMRecord) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *DKIMRecord) SetId(v string) { + o.Id = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *DKIMRecord) 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 *DKIMRecord) 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 *DKIMRecord) 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 *DKIMRecord) SetName(v string) { + o.Name = &v +} + +// GetTtl returns the Ttl field value if set, zero value otherwise. +func (o *DKIMRecord) GetTtl() int32 { + if o == nil || IsNil(o.Ttl) { + var ret int32 + return ret + } + return *o.Ttl +} + +// GetTtlOk returns a tuple with the Ttl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DKIMRecord) GetTtlOk() (*int32, bool) { + if o == nil || IsNil(o.Ttl) { + return nil, false + } + return o.Ttl, true +} + +// HasTtl returns a boolean if a field has been set. +func (o *DKIMRecord) HasTtl() bool { + if o != nil && !IsNil(o.Ttl) { + return true + } + + return false +} + +// SetTtl gets a reference to the given int32 and assigns it to the Ttl field. +func (o *DKIMRecord) SetTtl(v int32) { + o.Ttl = &v +} + +// GetCloud returns the Cloud field value if set, zero value otherwise. +func (o *DKIMRecord) GetCloud() bool { + if o == nil || IsNil(o.Cloud) { + var ret bool + return ret + } + return *o.Cloud +} + +// GetCloudOk returns a tuple with the Cloud field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DKIMRecord) GetCloudOk() (*bool, bool) { + if o == nil || IsNil(o.Cloud) { + return nil, false + } + return o.Cloud, true +} + +// HasCloud returns a boolean if a field has been set. +func (o *DKIMRecord) HasCloud() bool { + if o != nil && !IsNil(o.Cloud) { + return true + } + + return false +} + +// SetCloud gets a reference to the given bool and assigns it to the Cloud field. +func (o *DKIMRecord) SetCloud(v bool) { + o.Cloud = &v +} + +// GetUpstreamHttps returns the UpstreamHttps field value if set, zero value otherwise. +func (o *DKIMRecord) GetUpstreamHttps() string { + if o == nil || IsNil(o.UpstreamHttps) { + var ret string + return ret + } + return *o.UpstreamHttps +} + +// GetUpstreamHttpsOk returns a tuple with the UpstreamHttps field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DKIMRecord) GetUpstreamHttpsOk() (*string, bool) { + if o == nil || IsNil(o.UpstreamHttps) { + return nil, false + } + return o.UpstreamHttps, true +} + +// HasUpstreamHttps returns a boolean if a field has been set. +func (o *DKIMRecord) HasUpstreamHttps() bool { + if o != nil && !IsNil(o.UpstreamHttps) { + return true + } + + return false +} + +// SetUpstreamHttps gets a reference to the given string and assigns it to the UpstreamHttps field. +func (o *DKIMRecord) SetUpstreamHttps(v string) { + o.UpstreamHttps = &v +} + +// GetIpFilterMode returns the IpFilterMode field value if set, zero value otherwise. +func (o *DKIMRecord) GetIpFilterMode() DnsRecordIpFilterMode { + if o == nil || IsNil(o.IpFilterMode) { + var ret DnsRecordIpFilterMode + return ret + } + return *o.IpFilterMode +} + +// GetIpFilterModeOk returns a tuple with the IpFilterMode field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DKIMRecord) GetIpFilterModeOk() (*DnsRecordIpFilterMode, bool) { + if o == nil || IsNil(o.IpFilterMode) { + return nil, false + } + return o.IpFilterMode, true +} + +// HasIpFilterMode returns a boolean if a field has been set. +func (o *DKIMRecord) HasIpFilterMode() bool { + if o != nil && !IsNil(o.IpFilterMode) { + return true + } + + return false +} + +// SetIpFilterMode gets a reference to the given DnsRecordIpFilterMode and assigns it to the IpFilterMode field. +func (o *DKIMRecord) SetIpFilterMode(v DnsRecordIpFilterMode) { + o.IpFilterMode = &v +} + +// GetIsProtected returns the IsProtected field value if set, zero value otherwise. +func (o *DKIMRecord) GetIsProtected() bool { + if o == nil || IsNil(o.IsProtected) { + var ret bool + return ret + } + return *o.IsProtected +} + +// GetIsProtectedOk returns a tuple with the IsProtected field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DKIMRecord) GetIsProtectedOk() (*bool, bool) { + if o == nil || IsNil(o.IsProtected) { + return nil, false + } + return o.IsProtected, true +} + +// HasIsProtected returns a boolean if a field has been set. +func (o *DKIMRecord) HasIsProtected() bool { + if o != nil && !IsNil(o.IsProtected) { + return true + } + + return false +} + +// SetIsProtected gets a reference to the given bool and assigns it to the IsProtected field. +func (o *DKIMRecord) SetIsProtected(v bool) { + o.IsProtected = &v +} + +// GetUsage returns the Usage field value if set, zero value otherwise. +func (o *DKIMRecord) GetUsage() []string { + if o == nil || IsNil(o.Usage) { + var ret []string + return ret + } + return o.Usage +} + +// GetUsageOk returns a tuple with the Usage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DKIMRecord) GetUsageOk() ([]string, bool) { + if o == nil || IsNil(o.Usage) { + return nil, false + } + return o.Usage, true +} + +// HasUsage returns a boolean if a field has been set. +func (o *DKIMRecord) HasUsage() bool { + if o != nil && !IsNil(o.Usage) { + return true + } + + return false +} + +// SetUsage gets a reference to the given []string and assigns it to the Usage field. +func (o *DKIMRecord) SetUsage(v []string) { + o.Usage = v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *DKIMRecord) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DKIMRecord) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *DKIMRecord) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *DKIMRecord) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *DKIMRecord) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DKIMRecord) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *DKIMRecord) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *DKIMRecord) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +func (o DKIMRecord) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DKIMRecord) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Value) { + toSerialize["value"] = o.Value + } + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + // skip: id is readOnly + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Ttl) { + toSerialize["ttl"] = o.Ttl + } + if !IsNil(o.Cloud) { + toSerialize["cloud"] = o.Cloud + } + if !IsNil(o.UpstreamHttps) { + toSerialize["upstream_https"] = o.UpstreamHttps + } + if !IsNil(o.IpFilterMode) { + toSerialize["ip_filter_mode"] = o.IpFilterMode + } + // skip: is_protected is readOnly + // skip: usage is readOnly + // skip: created_at is readOnly + // skip: updated_at is readOnly + return toSerialize, nil +} + +type NullableDKIMRecord struct { + value *DKIMRecord + isSet bool +} + +func (v NullableDKIMRecord) Get() *DKIMRecord { + return v.value +} + +func (v *NullableDKIMRecord) Set(val *DKIMRecord) { + v.value = val + v.isSet = true +} + +func (v NullableDKIMRecord) IsSet() bool { + return v.isSet +} + +func (v *NullableDKIMRecord) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDKIMRecord(val *DKIMRecord) *NullableDKIMRecord { + return &NullableDKIMRecord{value: val, isSet: true} +} + +func (v NullableDKIMRecord) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDKIMRecord) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_dns_geo_report.go b/model_dns_geo_report.go new file mode 100644 index 0000000..5306b23 --- /dev/null +++ b/model_dns_geo_report.go @@ -0,0 +1,202 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the DnsGeoReport type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DnsGeoReport{} + +// DnsGeoReport struct for DnsGeoReport +type DnsGeoReport struct { + // Deprecated + Statistics []interface{} `json:"statistics,omitempty"` + Charts *DnsGeoReportCharts `json:"charts,omitempty"` + Lists []DnsGeoReportListsInner `json:"lists,omitempty"` +} + +// NewDnsGeoReport instantiates a new DnsGeoReport object +// This constructor will assign default values to properties that have it defined, +// 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 NewDnsGeoReport() *DnsGeoReport { + this := DnsGeoReport{} + return &this +} + +// NewDnsGeoReportWithDefaults instantiates a new DnsGeoReport object +// This 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 NewDnsGeoReportWithDefaults() *DnsGeoReport { + this := DnsGeoReport{} + return &this +} + +// GetStatistics returns the Statistics field value if set, zero value otherwise. +// Deprecated +func (o *DnsGeoReport) GetStatistics() []interface{} { + if o == nil || IsNil(o.Statistics) { + var ret []interface{} + return ret + } + return o.Statistics +} + +// GetStatisticsOk returns a tuple with the Statistics field value if set, nil otherwise +// and a boolean to check if the value has been set. +// Deprecated +func (o *DnsGeoReport) GetStatisticsOk() ([]interface{}, bool) { + if o == nil || IsNil(o.Statistics) { + return nil, false + } + return o.Statistics, true +} + +// HasStatistics returns a boolean if a field has been set. +func (o *DnsGeoReport) HasStatistics() bool { + if o != nil && !IsNil(o.Statistics) { + return true + } + + return false +} + +// SetStatistics gets a reference to the given []interface{} and assigns it to the Statistics field. +// Deprecated +func (o *DnsGeoReport) SetStatistics(v []interface{}) { + o.Statistics = v +} + +// GetCharts returns the Charts field value if set, zero value otherwise. +func (o *DnsGeoReport) GetCharts() DnsGeoReportCharts { + if o == nil || IsNil(o.Charts) { + var ret DnsGeoReportCharts + return ret + } + return *o.Charts +} + +// GetChartsOk returns a tuple with the Charts field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DnsGeoReport) GetChartsOk() (*DnsGeoReportCharts, bool) { + if o == nil || IsNil(o.Charts) { + return nil, false + } + return o.Charts, true +} + +// HasCharts returns a boolean if a field has been set. +func (o *DnsGeoReport) HasCharts() bool { + if o != nil && !IsNil(o.Charts) { + return true + } + + return false +} + +// SetCharts gets a reference to the given DnsGeoReportCharts and assigns it to the Charts field. +func (o *DnsGeoReport) SetCharts(v DnsGeoReportCharts) { + o.Charts = &v +} + +// GetLists returns the Lists field value if set, zero value otherwise. +func (o *DnsGeoReport) GetLists() []DnsGeoReportListsInner { + if o == nil || IsNil(o.Lists) { + var ret []DnsGeoReportListsInner + return ret + } + return o.Lists +} + +// GetListsOk returns a tuple with the Lists field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DnsGeoReport) GetListsOk() ([]DnsGeoReportListsInner, bool) { + if o == nil || IsNil(o.Lists) { + return nil, false + } + return o.Lists, true +} + +// HasLists returns a boolean if a field has been set. +func (o *DnsGeoReport) HasLists() bool { + if o != nil && !IsNil(o.Lists) { + return true + } + + return false +} + +// SetLists gets a reference to the given []DnsGeoReportListsInner and assigns it to the Lists field. +func (o *DnsGeoReport) SetLists(v []DnsGeoReportListsInner) { + o.Lists = v +} + +func (o DnsGeoReport) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DnsGeoReport) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Statistics) { + toSerialize["statistics"] = o.Statistics + } + if !IsNil(o.Charts) { + toSerialize["charts"] = o.Charts + } + if !IsNil(o.Lists) { + toSerialize["lists"] = o.Lists + } + return toSerialize, nil +} + +type NullableDnsGeoReport struct { + value *DnsGeoReport + isSet bool +} + +func (v NullableDnsGeoReport) Get() *DnsGeoReport { + return v.value +} + +func (v *NullableDnsGeoReport) Set(val *DnsGeoReport) { + v.value = val + v.isSet = true +} + +func (v NullableDnsGeoReport) IsSet() bool { + return v.isSet +} + +func (v *NullableDnsGeoReport) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDnsGeoReport(val *DnsGeoReport) *NullableDnsGeoReport { + return &NullableDnsGeoReport{value: val, isSet: true} +} + +func (v NullableDnsGeoReport) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDnsGeoReport) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_dns_geo_report_charts.go b/model_dns_geo_report_charts.go new file mode 100644 index 0000000..b5ded02 --- /dev/null +++ b/model_dns_geo_report_charts.go @@ -0,0 +1,127 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the DnsGeoReportCharts type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DnsGeoReportCharts{} + +// DnsGeoReportCharts struct for DnsGeoReportCharts +type DnsGeoReportCharts struct { + // A dictionay which maps country codes to fill and value + Requests *map[string]DnsGeoReportChartsRequestsValue `json:"requests,omitempty"` +} + +// NewDnsGeoReportCharts instantiates a new DnsGeoReportCharts object +// This constructor will assign default values to properties that have it defined, +// 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 NewDnsGeoReportCharts() *DnsGeoReportCharts { + this := DnsGeoReportCharts{} + return &this +} + +// NewDnsGeoReportChartsWithDefaults instantiates a new DnsGeoReportCharts object +// This 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 NewDnsGeoReportChartsWithDefaults() *DnsGeoReportCharts { + this := DnsGeoReportCharts{} + return &this +} + +// GetRequests returns the Requests field value if set, zero value otherwise. +func (o *DnsGeoReportCharts) GetRequests() map[string]DnsGeoReportChartsRequestsValue { + if o == nil || IsNil(o.Requests) { + var ret map[string]DnsGeoReportChartsRequestsValue + return ret + } + return *o.Requests +} + +// GetRequestsOk returns a tuple with the Requests field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DnsGeoReportCharts) GetRequestsOk() (*map[string]DnsGeoReportChartsRequestsValue, bool) { + if o == nil || IsNil(o.Requests) { + return nil, false + } + return o.Requests, true +} + +// HasRequests returns a boolean if a field has been set. +func (o *DnsGeoReportCharts) HasRequests() bool { + if o != nil && !IsNil(o.Requests) { + return true + } + + return false +} + +// SetRequests gets a reference to the given map[string]DnsGeoReportChartsRequestsValue and assigns it to the Requests field. +func (o *DnsGeoReportCharts) SetRequests(v map[string]DnsGeoReportChartsRequestsValue) { + o.Requests = &v +} + +func (o DnsGeoReportCharts) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DnsGeoReportCharts) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Requests) { + toSerialize["requests"] = o.Requests + } + return toSerialize, nil +} + +type NullableDnsGeoReportCharts struct { + value *DnsGeoReportCharts + isSet bool +} + +func (v NullableDnsGeoReportCharts) Get() *DnsGeoReportCharts { + return v.value +} + +func (v *NullableDnsGeoReportCharts) Set(val *DnsGeoReportCharts) { + v.value = val + v.isSet = true +} + +func (v NullableDnsGeoReportCharts) IsSet() bool { + return v.isSet +} + +func (v *NullableDnsGeoReportCharts) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDnsGeoReportCharts(val *DnsGeoReportCharts) *NullableDnsGeoReportCharts { + return &NullableDnsGeoReportCharts{value: val, isSet: true} +} + +func (v NullableDnsGeoReportCharts) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDnsGeoReportCharts) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_dns_geo_report_charts_requests_value.go b/model_dns_geo_report_charts_requests_value.go new file mode 100644 index 0000000..3ec030c --- /dev/null +++ b/model_dns_geo_report_charts_requests_value.go @@ -0,0 +1,198 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the DnsGeoReportChartsRequestsValue type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DnsGeoReportChartsRequestsValue{} + +// DnsGeoReportChartsRequestsValue struct for DnsGeoReportChartsRequestsValue +type DnsGeoReportChartsRequestsValue struct { + FillKey *int32 `json:"fillKey,omitempty"` + Name *string `json:"name,omitempty"` + Value *int32 `json:"value,omitempty"` +} + +// NewDnsGeoReportChartsRequestsValue instantiates a new DnsGeoReportChartsRequestsValue object +// This constructor will assign default values to properties that have it defined, +// 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 NewDnsGeoReportChartsRequestsValue() *DnsGeoReportChartsRequestsValue { + this := DnsGeoReportChartsRequestsValue{} + return &this +} + +// NewDnsGeoReportChartsRequestsValueWithDefaults instantiates a new DnsGeoReportChartsRequestsValue object +// This 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 NewDnsGeoReportChartsRequestsValueWithDefaults() *DnsGeoReportChartsRequestsValue { + this := DnsGeoReportChartsRequestsValue{} + return &this +} + +// GetFillKey returns the FillKey field value if set, zero value otherwise. +func (o *DnsGeoReportChartsRequestsValue) GetFillKey() int32 { + if o == nil || IsNil(o.FillKey) { + var ret int32 + return ret + } + return *o.FillKey +} + +// GetFillKeyOk returns a tuple with the FillKey field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DnsGeoReportChartsRequestsValue) GetFillKeyOk() (*int32, bool) { + if o == nil || IsNil(o.FillKey) { + return nil, false + } + return o.FillKey, true +} + +// HasFillKey returns a boolean if a field has been set. +func (o *DnsGeoReportChartsRequestsValue) HasFillKey() bool { + if o != nil && !IsNil(o.FillKey) { + return true + } + + return false +} + +// SetFillKey gets a reference to the given int32 and assigns it to the FillKey field. +func (o *DnsGeoReportChartsRequestsValue) SetFillKey(v int32) { + o.FillKey = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *DnsGeoReportChartsRequestsValue) 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 *DnsGeoReportChartsRequestsValue) 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 *DnsGeoReportChartsRequestsValue) 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 *DnsGeoReportChartsRequestsValue) SetName(v string) { + o.Name = &v +} + +// GetValue returns the Value field value if set, zero value otherwise. +func (o *DnsGeoReportChartsRequestsValue) GetValue() int32 { + if o == nil || IsNil(o.Value) { + var ret int32 + return ret + } + return *o.Value +} + +// GetValueOk returns a tuple with the Value field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DnsGeoReportChartsRequestsValue) GetValueOk() (*int32, bool) { + if o == nil || IsNil(o.Value) { + return nil, false + } + return o.Value, true +} + +// HasValue returns a boolean if a field has been set. +func (o *DnsGeoReportChartsRequestsValue) HasValue() bool { + if o != nil && !IsNil(o.Value) { + return true + } + + return false +} + +// SetValue gets a reference to the given int32 and assigns it to the Value field. +func (o *DnsGeoReportChartsRequestsValue) SetValue(v int32) { + o.Value = &v +} + +func (o DnsGeoReportChartsRequestsValue) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DnsGeoReportChartsRequestsValue) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.FillKey) { + toSerialize["fillKey"] = o.FillKey + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Value) { + toSerialize["value"] = o.Value + } + return toSerialize, nil +} + +type NullableDnsGeoReportChartsRequestsValue struct { + value *DnsGeoReportChartsRequestsValue + isSet bool +} + +func (v NullableDnsGeoReportChartsRequestsValue) Get() *DnsGeoReportChartsRequestsValue { + return v.value +} + +func (v *NullableDnsGeoReportChartsRequestsValue) Set(val *DnsGeoReportChartsRequestsValue) { + v.value = val + v.isSet = true +} + +func (v NullableDnsGeoReportChartsRequestsValue) IsSet() bool { + return v.isSet +} + +func (v *NullableDnsGeoReportChartsRequestsValue) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDnsGeoReportChartsRequestsValue(val *DnsGeoReportChartsRequestsValue) *NullableDnsGeoReportChartsRequestsValue { + return &NullableDnsGeoReportChartsRequestsValue{value: val, isSet: true} +} + +func (v NullableDnsGeoReportChartsRequestsValue) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDnsGeoReportChartsRequestsValue) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_dns_geo_report_data.go b/model_dns_geo_report_data.go new file mode 100644 index 0000000..cc1e833 --- /dev/null +++ b/model_dns_geo_report_data.go @@ -0,0 +1,126 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the DnsGeoReportData type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DnsGeoReportData{} + +// DnsGeoReportData struct for DnsGeoReportData +type DnsGeoReportData struct { + Data *DnsGeoReport `json:"data,omitempty"` +} + +// NewDnsGeoReportData instantiates a new DnsGeoReportData object +// This constructor will assign default values to properties that have it defined, +// 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 NewDnsGeoReportData() *DnsGeoReportData { + this := DnsGeoReportData{} + return &this +} + +// NewDnsGeoReportDataWithDefaults instantiates a new DnsGeoReportData object +// This 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 NewDnsGeoReportDataWithDefaults() *DnsGeoReportData { + this := DnsGeoReportData{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *DnsGeoReportData) GetData() DnsGeoReport { + if o == nil || IsNil(o.Data) { + var ret DnsGeoReport + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DnsGeoReportData) GetDataOk() (*DnsGeoReport, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *DnsGeoReportData) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given DnsGeoReport and assigns it to the Data field. +func (o *DnsGeoReportData) SetData(v DnsGeoReport) { + o.Data = &v +} + +func (o DnsGeoReportData) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DnsGeoReportData) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + return toSerialize, nil +} + +type NullableDnsGeoReportData struct { + value *DnsGeoReportData + isSet bool +} + +func (v NullableDnsGeoReportData) Get() *DnsGeoReportData { + return v.value +} + +func (v *NullableDnsGeoReportData) Set(val *DnsGeoReportData) { + v.value = val + v.isSet = true +} + +func (v NullableDnsGeoReportData) IsSet() bool { + return v.isSet +} + +func (v *NullableDnsGeoReportData) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDnsGeoReportData(val *DnsGeoReportData) *NullableDnsGeoReportData { + return &NullableDnsGeoReportData{value: val, isSet: true} +} + +func (v NullableDnsGeoReportData) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDnsGeoReportData) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_dns_geo_report_lists_inner.go b/model_dns_geo_report_lists_inner.go new file mode 100644 index 0000000..1072749 --- /dev/null +++ b/model_dns_geo_report_lists_inner.go @@ -0,0 +1,234 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the DnsGeoReportListsInner type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DnsGeoReportListsInner{} + +// DnsGeoReportListsInner struct for DnsGeoReportListsInner +type DnsGeoReportListsInner struct { + Country *string `json:"country,omitempty"` + Name *string `json:"name,omitempty"` + Code *string `json:"code,omitempty"` + Requests *int32 `json:"requests,omitempty"` +} + +// NewDnsGeoReportListsInner instantiates a new DnsGeoReportListsInner object +// This constructor will assign default values to properties that have it defined, +// 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 NewDnsGeoReportListsInner() *DnsGeoReportListsInner { + this := DnsGeoReportListsInner{} + return &this +} + +// NewDnsGeoReportListsInnerWithDefaults instantiates a new DnsGeoReportListsInner object +// This 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 NewDnsGeoReportListsInnerWithDefaults() *DnsGeoReportListsInner { + this := DnsGeoReportListsInner{} + return &this +} + +// GetCountry returns the Country field value if set, zero value otherwise. +func (o *DnsGeoReportListsInner) GetCountry() string { + if o == nil || IsNil(o.Country) { + var ret string + return ret + } + return *o.Country +} + +// GetCountryOk returns a tuple with the Country field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DnsGeoReportListsInner) GetCountryOk() (*string, bool) { + if o == nil || IsNil(o.Country) { + return nil, false + } + return o.Country, true +} + +// HasCountry returns a boolean if a field has been set. +func (o *DnsGeoReportListsInner) HasCountry() bool { + if o != nil && !IsNil(o.Country) { + return true + } + + return false +} + +// SetCountry gets a reference to the given string and assigns it to the Country field. +func (o *DnsGeoReportListsInner) SetCountry(v string) { + o.Country = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *DnsGeoReportListsInner) 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 *DnsGeoReportListsInner) 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 *DnsGeoReportListsInner) 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 *DnsGeoReportListsInner) SetName(v string) { + o.Name = &v +} + +// GetCode returns the Code field value if set, zero value otherwise. +func (o *DnsGeoReportListsInner) GetCode() string { + if o == nil || IsNil(o.Code) { + var ret string + return ret + } + return *o.Code +} + +// GetCodeOk returns a tuple with the Code field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DnsGeoReportListsInner) GetCodeOk() (*string, bool) { + if o == nil || IsNil(o.Code) { + return nil, false + } + return o.Code, true +} + +// HasCode returns a boolean if a field has been set. +func (o *DnsGeoReportListsInner) HasCode() bool { + if o != nil && !IsNil(o.Code) { + return true + } + + return false +} + +// SetCode gets a reference to the given string and assigns it to the Code field. +func (o *DnsGeoReportListsInner) SetCode(v string) { + o.Code = &v +} + +// GetRequests returns the Requests field value if set, zero value otherwise. +func (o *DnsGeoReportListsInner) GetRequests() int32 { + if o == nil || IsNil(o.Requests) { + var ret int32 + return ret + } + return *o.Requests +} + +// GetRequestsOk returns a tuple with the Requests field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DnsGeoReportListsInner) GetRequestsOk() (*int32, bool) { + if o == nil || IsNil(o.Requests) { + return nil, false + } + return o.Requests, true +} + +// HasRequests returns a boolean if a field has been set. +func (o *DnsGeoReportListsInner) HasRequests() bool { + if o != nil && !IsNil(o.Requests) { + return true + } + + return false +} + +// SetRequests gets a reference to the given int32 and assigns it to the Requests field. +func (o *DnsGeoReportListsInner) SetRequests(v int32) { + o.Requests = &v +} + +func (o DnsGeoReportListsInner) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DnsGeoReportListsInner) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Country) { + toSerialize["country"] = o.Country + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Code) { + toSerialize["code"] = o.Code + } + if !IsNil(o.Requests) { + toSerialize["requests"] = o.Requests + } + return toSerialize, nil +} + +type NullableDnsGeoReportListsInner struct { + value *DnsGeoReportListsInner + isSet bool +} + +func (v NullableDnsGeoReportListsInner) Get() *DnsGeoReportListsInner { + return v.value +} + +func (v *NullableDnsGeoReportListsInner) Set(val *DnsGeoReportListsInner) { + v.value = val + v.isSet = true +} + +func (v NullableDnsGeoReportListsInner) IsSet() bool { + return v.isSet +} + +func (v *NullableDnsGeoReportListsInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDnsGeoReportListsInner(val *DnsGeoReportListsInner) *NullableDnsGeoReportListsInner { + return &NullableDnsGeoReportListsInner{value: val, isSet: true} +} + +func (v NullableDnsGeoReportListsInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDnsGeoReportListsInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_dns_record.go b/model_dns_record.go new file mode 100644 index 0000000..3a4bd70 --- /dev/null +++ b/model_dns_record.go @@ -0,0 +1,478 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" + "fmt" +) + +// DnsRecord - struct for DnsRecord +type DnsRecord struct { + AAAARecord *AAAARecord + ANAMERecord *ANAMERecord + ARecord *ARecord + CAARecord *CAARecord + CNAMERecord *CNAMERecord + DKIMRecord *DKIMRecord + MXRecord *MXRecord + NSRecord *NSRecord + PTRRecord *PTRRecord + SPFRecord *SPFRecord + SRVRecord *SRVRecord + TLSARecord *TLSARecord + TXTRecord *TXTRecord +} + +// AAAARecordAsDnsRecord is a convenience function that returns AAAARecord wrapped in DnsRecord +func AAAARecordAsDnsRecord(v *AAAARecord) DnsRecord { + return DnsRecord{ + AAAARecord: v, + } +} + +// ANAMERecordAsDnsRecord is a convenience function that returns ANAMERecord wrapped in DnsRecord +func ANAMERecordAsDnsRecord(v *ANAMERecord) DnsRecord { + return DnsRecord{ + ANAMERecord: v, + } +} + +// ARecordAsDnsRecord is a convenience function that returns ARecord wrapped in DnsRecord +func ARecordAsDnsRecord(v *ARecord) DnsRecord { + return DnsRecord{ + ARecord: v, + } +} + +// CAARecordAsDnsRecord is a convenience function that returns CAARecord wrapped in DnsRecord +func CAARecordAsDnsRecord(v *CAARecord) DnsRecord { + return DnsRecord{ + CAARecord: v, + } +} + +// CNAMERecordAsDnsRecord is a convenience function that returns CNAMERecord wrapped in DnsRecord +func CNAMERecordAsDnsRecord(v *CNAMERecord) DnsRecord { + return DnsRecord{ + CNAMERecord: v, + } +} + +// DKIMRecordAsDnsRecord is a convenience function that returns DKIMRecord wrapped in DnsRecord +func DKIMRecordAsDnsRecord(v *DKIMRecord) DnsRecord { + return DnsRecord{ + DKIMRecord: v, + } +} + +// MXRecordAsDnsRecord is a convenience function that returns MXRecord wrapped in DnsRecord +func MXRecordAsDnsRecord(v *MXRecord) DnsRecord { + return DnsRecord{ + MXRecord: v, + } +} + +// NSRecordAsDnsRecord is a convenience function that returns NSRecord wrapped in DnsRecord +func NSRecordAsDnsRecord(v *NSRecord) DnsRecord { + return DnsRecord{ + NSRecord: v, + } +} + +// PTRRecordAsDnsRecord is a convenience function that returns PTRRecord wrapped in DnsRecord +func PTRRecordAsDnsRecord(v *PTRRecord) DnsRecord { + return DnsRecord{ + PTRRecord: v, + } +} + +// SPFRecordAsDnsRecord is a convenience function that returns SPFRecord wrapped in DnsRecord +func SPFRecordAsDnsRecord(v *SPFRecord) DnsRecord { + return DnsRecord{ + SPFRecord: v, + } +} + +// SRVRecordAsDnsRecord is a convenience function that returns SRVRecord wrapped in DnsRecord +func SRVRecordAsDnsRecord(v *SRVRecord) DnsRecord { + return DnsRecord{ + SRVRecord: v, + } +} + +// TLSARecordAsDnsRecord is a convenience function that returns TLSARecord wrapped in DnsRecord +func TLSARecordAsDnsRecord(v *TLSARecord) DnsRecord { + return DnsRecord{ + TLSARecord: v, + } +} + +// TXTRecordAsDnsRecord is a convenience function that returns TXTRecord wrapped in DnsRecord +func TXTRecordAsDnsRecord(v *TXTRecord) DnsRecord { + return DnsRecord{ + TXTRecord: v, + } +} + + +// Unmarshal JSON data into one of the pointers in the struct +func (dst *DnsRecord) UnmarshalJSON(data []byte) error { + var err error + match := 0 + // try to unmarshal data into AAAARecord + err = newStrictDecoder(data).Decode(&dst.AAAARecord) + if err == nil { + jsonAAAARecord, _ := json.Marshal(dst.AAAARecord) + if string(jsonAAAARecord) == "{}" { // empty struct + dst.AAAARecord = nil + } else { + match++ + } + } else { + dst.AAAARecord = nil + } + + // try to unmarshal data into ANAMERecord + err = newStrictDecoder(data).Decode(&dst.ANAMERecord) + if err == nil { + jsonANAMERecord, _ := json.Marshal(dst.ANAMERecord) + if string(jsonANAMERecord) == "{}" { // empty struct + dst.ANAMERecord = nil + } else { + match++ + } + } else { + dst.ANAMERecord = nil + } + + // try to unmarshal data into ARecord + err = newStrictDecoder(data).Decode(&dst.ARecord) + if err == nil { + jsonARecord, _ := json.Marshal(dst.ARecord) + if string(jsonARecord) == "{}" { // empty struct + dst.ARecord = nil + } else { + match++ + } + } else { + dst.ARecord = nil + } + + // try to unmarshal data into CAARecord + err = newStrictDecoder(data).Decode(&dst.CAARecord) + if err == nil { + jsonCAARecord, _ := json.Marshal(dst.CAARecord) + if string(jsonCAARecord) == "{}" { // empty struct + dst.CAARecord = nil + } else { + match++ + } + } else { + dst.CAARecord = nil + } + + // try to unmarshal data into CNAMERecord + err = newStrictDecoder(data).Decode(&dst.CNAMERecord) + if err == nil { + jsonCNAMERecord, _ := json.Marshal(dst.CNAMERecord) + if string(jsonCNAMERecord) == "{}" { // empty struct + dst.CNAMERecord = nil + } else { + match++ + } + } else { + dst.CNAMERecord = nil + } + + // try to unmarshal data into DKIMRecord + err = newStrictDecoder(data).Decode(&dst.DKIMRecord) + if err == nil { + jsonDKIMRecord, _ := json.Marshal(dst.DKIMRecord) + if string(jsonDKIMRecord) == "{}" { // empty struct + dst.DKIMRecord = nil + } else { + match++ + } + } else { + dst.DKIMRecord = nil + } + + // try to unmarshal data into MXRecord + err = newStrictDecoder(data).Decode(&dst.MXRecord) + if err == nil { + jsonMXRecord, _ := json.Marshal(dst.MXRecord) + if string(jsonMXRecord) == "{}" { // empty struct + dst.MXRecord = nil + } else { + match++ + } + } else { + dst.MXRecord = nil + } + + // try to unmarshal data into NSRecord + err = newStrictDecoder(data).Decode(&dst.NSRecord) + if err == nil { + jsonNSRecord, _ := json.Marshal(dst.NSRecord) + if string(jsonNSRecord) == "{}" { // empty struct + dst.NSRecord = nil + } else { + match++ + } + } else { + dst.NSRecord = nil + } + + // try to unmarshal data into PTRRecord + err = newStrictDecoder(data).Decode(&dst.PTRRecord) + if err == nil { + jsonPTRRecord, _ := json.Marshal(dst.PTRRecord) + if string(jsonPTRRecord) == "{}" { // empty struct + dst.PTRRecord = nil + } else { + match++ + } + } else { + dst.PTRRecord = nil + } + + // try to unmarshal data into SPFRecord + err = newStrictDecoder(data).Decode(&dst.SPFRecord) + if err == nil { + jsonSPFRecord, _ := json.Marshal(dst.SPFRecord) + if string(jsonSPFRecord) == "{}" { // empty struct + dst.SPFRecord = nil + } else { + match++ + } + } else { + dst.SPFRecord = nil + } + + // try to unmarshal data into SRVRecord + err = newStrictDecoder(data).Decode(&dst.SRVRecord) + if err == nil { + jsonSRVRecord, _ := json.Marshal(dst.SRVRecord) + if string(jsonSRVRecord) == "{}" { // empty struct + dst.SRVRecord = nil + } else { + match++ + } + } else { + dst.SRVRecord = nil + } + + // try to unmarshal data into TLSARecord + err = newStrictDecoder(data).Decode(&dst.TLSARecord) + if err == nil { + jsonTLSARecord, _ := json.Marshal(dst.TLSARecord) + if string(jsonTLSARecord) == "{}" { // empty struct + dst.TLSARecord = nil + } else { + match++ + } + } else { + dst.TLSARecord = nil + } + + // try to unmarshal data into TXTRecord + err = newStrictDecoder(data).Decode(&dst.TXTRecord) + if err == nil { + jsonTXTRecord, _ := json.Marshal(dst.TXTRecord) + if string(jsonTXTRecord) == "{}" { // empty struct + dst.TXTRecord = nil + } else { + match++ + } + } else { + dst.TXTRecord = nil + } + + if match > 1 { // more than 1 match + // reset to nil + dst.AAAARecord = nil + dst.ANAMERecord = nil + dst.ARecord = nil + dst.CAARecord = nil + dst.CNAMERecord = nil + dst.DKIMRecord = nil + dst.MXRecord = nil + dst.NSRecord = nil + dst.PTRRecord = nil + dst.SPFRecord = nil + dst.SRVRecord = nil + dst.TLSARecord = nil + dst.TXTRecord = nil + + return fmt.Errorf("data matches more than one schema in oneOf(DnsRecord)") + } else if match == 1 { + return nil // exactly one match + } else { // no match + return fmt.Errorf("data failed to match schemas in oneOf(DnsRecord)") + } +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src DnsRecord) MarshalJSON() ([]byte, error) { + if src.AAAARecord != nil { + return json.Marshal(&src.AAAARecord) + } + + if src.ANAMERecord != nil { + return json.Marshal(&src.ANAMERecord) + } + + if src.ARecord != nil { + return json.Marshal(&src.ARecord) + } + + if src.CAARecord != nil { + return json.Marshal(&src.CAARecord) + } + + if src.CNAMERecord != nil { + return json.Marshal(&src.CNAMERecord) + } + + if src.DKIMRecord != nil { + return json.Marshal(&src.DKIMRecord) + } + + if src.MXRecord != nil { + return json.Marshal(&src.MXRecord) + } + + if src.NSRecord != nil { + return json.Marshal(&src.NSRecord) + } + + if src.PTRRecord != nil { + return json.Marshal(&src.PTRRecord) + } + + if src.SPFRecord != nil { + return json.Marshal(&src.SPFRecord) + } + + if src.SRVRecord != nil { + return json.Marshal(&src.SRVRecord) + } + + if src.TLSARecord != nil { + return json.Marshal(&src.TLSARecord) + } + + if src.TXTRecord != nil { + return json.Marshal(&src.TXTRecord) + } + + return nil, nil // no data in oneOf schemas +} + +// Get the actual instance +func (obj *DnsRecord) GetActualInstance() (interface{}) { + if obj == nil { + return nil + } + if obj.AAAARecord != nil { + return obj.AAAARecord + } + + if obj.ANAMERecord != nil { + return obj.ANAMERecord + } + + if obj.ARecord != nil { + return obj.ARecord + } + + if obj.CAARecord != nil { + return obj.CAARecord + } + + if obj.CNAMERecord != nil { + return obj.CNAMERecord + } + + if obj.DKIMRecord != nil { + return obj.DKIMRecord + } + + if obj.MXRecord != nil { + return obj.MXRecord + } + + if obj.NSRecord != nil { + return obj.NSRecord + } + + if obj.PTRRecord != nil { + return obj.PTRRecord + } + + if obj.SPFRecord != nil { + return obj.SPFRecord + } + + if obj.SRVRecord != nil { + return obj.SRVRecord + } + + if obj.TLSARecord != nil { + return obj.TLSARecord + } + + if obj.TXTRecord != nil { + return obj.TXTRecord + } + + // all schemas are nil + return nil +} + +type NullableDnsRecord struct { + value *DnsRecord + isSet bool +} + +func (v NullableDnsRecord) Get() *DnsRecord { + return v.value +} + +func (v *NullableDnsRecord) Set(val *DnsRecord) { + v.value = val + v.isSet = true +} + +func (v NullableDnsRecord) IsSet() bool { + return v.isSet +} + +func (v *NullableDnsRecord) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDnsRecord(val *DnsRecord) *NullableDnsRecord { + return &NullableDnsRecord{value: val, isSet: true} +} + +func (v NullableDnsRecord) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDnsRecord) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_dns_record_cloud.go b/model_dns_record_cloud.go new file mode 100644 index 0000000..8aba5be --- /dev/null +++ b/model_dns_record_cloud.go @@ -0,0 +1,117 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the DnsRecordCloud type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DnsRecordCloud{} + +// DnsRecordCloud struct for DnsRecordCloud +type DnsRecordCloud struct { + Cloud bool `json:"cloud"` +} + +// NewDnsRecordCloud instantiates a new DnsRecordCloud object +// This constructor will assign default values to properties that have it defined, +// 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 NewDnsRecordCloud(cloud bool) *DnsRecordCloud { + this := DnsRecordCloud{} + this.Cloud = cloud + return &this +} + +// NewDnsRecordCloudWithDefaults instantiates a new DnsRecordCloud object +// This 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 NewDnsRecordCloudWithDefaults() *DnsRecordCloud { + this := DnsRecordCloud{} + return &this +} + +// GetCloud returns the Cloud field value +func (o *DnsRecordCloud) GetCloud() bool { + if o == nil { + var ret bool + return ret + } + + return o.Cloud +} + +// GetCloudOk returns a tuple with the Cloud field value +// and a boolean to check if the value has been set. +func (o *DnsRecordCloud) GetCloudOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Cloud, true +} + +// SetCloud sets field value +func (o *DnsRecordCloud) SetCloud(v bool) { + o.Cloud = v +} + +func (o DnsRecordCloud) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DnsRecordCloud) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["cloud"] = o.Cloud + return toSerialize, nil +} + +type NullableDnsRecordCloud struct { + value *DnsRecordCloud + isSet bool +} + +func (v NullableDnsRecordCloud) Get() *DnsRecordCloud { + return v.value +} + +func (v *NullableDnsRecordCloud) Set(val *DnsRecordCloud) { + v.value = val + v.isSet = true +} + +func (v NullableDnsRecordCloud) IsSet() bool { + return v.isSet +} + +func (v *NullableDnsRecordCloud) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDnsRecordCloud(val *DnsRecordCloud) *NullableDnsRecordCloud { + return &NullableDnsRecordCloud{value: val, isSet: true} +} + +func (v NullableDnsRecordCloud) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDnsRecordCloud) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_dns_record_data.go b/model_dns_record_data.go new file mode 100644 index 0000000..9729ee4 --- /dev/null +++ b/model_dns_record_data.go @@ -0,0 +1,126 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the DnsRecordData type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DnsRecordData{} + +// DnsRecordData struct for DnsRecordData +type DnsRecordData struct { + Data *DnsRecordGeneric `json:"data,omitempty"` +} + +// NewDnsRecordData instantiates a new DnsRecordData object +// This constructor will assign default values to properties that have it defined, +// 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 NewDnsRecordData() *DnsRecordData { + this := DnsRecordData{} + return &this +} + +// NewDnsRecordDataWithDefaults instantiates a new DnsRecordData object +// This 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 NewDnsRecordDataWithDefaults() *DnsRecordData { + this := DnsRecordData{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *DnsRecordData) GetData() DnsRecordGeneric { + if o == nil || IsNil(o.Data) { + var ret DnsRecordGeneric + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DnsRecordData) GetDataOk() (*DnsRecordGeneric, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *DnsRecordData) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given DnsRecordGeneric and assigns it to the Data field. +func (o *DnsRecordData) SetData(v DnsRecordGeneric) { + o.Data = &v +} + +func (o DnsRecordData) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DnsRecordData) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + return toSerialize, nil +} + +type NullableDnsRecordData struct { + value *DnsRecordData + isSet bool +} + +func (v NullableDnsRecordData) Get() *DnsRecordData { + return v.value +} + +func (v *NullableDnsRecordData) Set(val *DnsRecordData) { + v.value = val + v.isSet = true +} + +func (v NullableDnsRecordData) IsSet() bool { + return v.isSet +} + +func (v *NullableDnsRecordData) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDnsRecordData(val *DnsRecordData) *NullableDnsRecordData { + return &NullableDnsRecordData{value: val, isSet: true} +} + +func (v NullableDnsRecordData) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDnsRecordData) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_dns_record_generic.go b/model_dns_record_generic.go new file mode 100644 index 0000000..fcdaf7d --- /dev/null +++ b/model_dns_record_generic.go @@ -0,0 +1,105 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" + "fmt" +) + +// DnsRecordGeneric struct for DnsRecordGeneric +type DnsRecordGeneric struct { + DnsRecordGenericArrayValue *DnsRecordGenericArrayValue + DnsRecordGenericObjectValue *DnsRecordGenericObjectValue +} + +// Unmarshal JSON data into any of the pointers in the struct +func (dst *DnsRecordGeneric) UnmarshalJSON(data []byte) error { + var err error + // try to unmarshal JSON data into DnsRecordGenericArrayValue + err = json.Unmarshal(data, &dst.DnsRecordGenericArrayValue); + if err == nil { + jsonDnsRecordGenericArrayValue, _ := json.Marshal(dst.DnsRecordGenericArrayValue) + if string(jsonDnsRecordGenericArrayValue) == "{}" { // empty struct + dst.DnsRecordGenericArrayValue = nil + } else { + return nil // data stored in dst.DnsRecordGenericArrayValue, return on the first match + } + } else { + dst.DnsRecordGenericArrayValue = nil + } + + // try to unmarshal JSON data into DnsRecordGenericObjectValue + err = json.Unmarshal(data, &dst.DnsRecordGenericObjectValue); + if err == nil { + jsonDnsRecordGenericObjectValue, _ := json.Marshal(dst.DnsRecordGenericObjectValue) + if string(jsonDnsRecordGenericObjectValue) == "{}" { // empty struct + dst.DnsRecordGenericObjectValue = nil + } else { + return nil // data stored in dst.DnsRecordGenericObjectValue, return on the first match + } + } else { + dst.DnsRecordGenericObjectValue = nil + } + + return fmt.Errorf("data failed to match schemas in anyOf(DnsRecordGeneric)") +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src *DnsRecordGeneric) MarshalJSON() ([]byte, error) { + if src.DnsRecordGenericArrayValue != nil { + return json.Marshal(&src.DnsRecordGenericArrayValue) + } + + if src.DnsRecordGenericObjectValue != nil { + return json.Marshal(&src.DnsRecordGenericObjectValue) + } + + return nil, nil // no data in anyOf schemas +} + +type NullableDnsRecordGeneric struct { + value *DnsRecordGeneric + isSet bool +} + +func (v NullableDnsRecordGeneric) Get() *DnsRecordGeneric { + return v.value +} + +func (v *NullableDnsRecordGeneric) Set(val *DnsRecordGeneric) { + v.value = val + v.isSet = true +} + +func (v NullableDnsRecordGeneric) IsSet() bool { + return v.isSet +} + +func (v *NullableDnsRecordGeneric) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDnsRecordGeneric(val *DnsRecordGeneric) *NullableDnsRecordGeneric { + return &NullableDnsRecordGeneric{value: val, isSet: true} +} + +func (v NullableDnsRecordGeneric) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDnsRecordGeneric) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_dns_record_generic_array_value.go b/model_dns_record_generic_array_value.go new file mode 100644 index 0000000..9b159e0 --- /dev/null +++ b/model_dns_record_generic_array_value.go @@ -0,0 +1,518 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" + "time" +) + +// checks if the DnsRecordGenericArrayValue type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DnsRecordGenericArrayValue{} + +// DnsRecordGenericArrayValue struct for DnsRecordGenericArrayValue +type DnsRecordGenericArrayValue struct { + Value []interface{} `json:"value,omitempty"` + Type *string `json:"type,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Ttl *int32 `json:"ttl,omitempty"` + Cloud *bool `json:"cloud,omitempty"` + UpstreamHttps *string `json:"upstream_https,omitempty"` + IpFilterMode *DnsRecordIpFilterMode `json:"ip_filter_mode,omitempty"` + // Protected records cannot be modified or deleted by user. + IsProtected *bool `json:"is_protected,omitempty"` + Usage []string `json:"usage,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty"` + UpdatedAt *time.Time `json:"updated_at,omitempty"` +} + +// NewDnsRecordGenericArrayValue instantiates a new DnsRecordGenericArrayValue object +// This constructor will assign default values to properties that have it defined, +// 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 NewDnsRecordGenericArrayValue() *DnsRecordGenericArrayValue { + this := DnsRecordGenericArrayValue{} + var cloud bool = false + this.Cloud = &cloud + return &this +} + +// NewDnsRecordGenericArrayValueWithDefaults instantiates a new DnsRecordGenericArrayValue object +// This 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 NewDnsRecordGenericArrayValueWithDefaults() *DnsRecordGenericArrayValue { + this := DnsRecordGenericArrayValue{} + var cloud bool = false + this.Cloud = &cloud + return &this +} + +// GetValue returns the Value field value if set, zero value otherwise. +func (o *DnsRecordGenericArrayValue) GetValue() []interface{} { + if o == nil || IsNil(o.Value) { + var ret []interface{} + return ret + } + return o.Value +} + +// GetValueOk returns a tuple with the Value field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DnsRecordGenericArrayValue) GetValueOk() ([]interface{}, bool) { + if o == nil || IsNil(o.Value) { + return nil, false + } + return o.Value, true +} + +// HasValue returns a boolean if a field has been set. +func (o *DnsRecordGenericArrayValue) HasValue() bool { + if o != nil && !IsNil(o.Value) { + return true + } + + return false +} + +// SetValue gets a reference to the given []interface{} and assigns it to the Value field. +func (o *DnsRecordGenericArrayValue) SetValue(v []interface{}) { + o.Value = v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *DnsRecordGenericArrayValue) 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 *DnsRecordGenericArrayValue) 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 *DnsRecordGenericArrayValue) 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 *DnsRecordGenericArrayValue) SetType(v string) { + o.Type = &v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *DnsRecordGenericArrayValue) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DnsRecordGenericArrayValue) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *DnsRecordGenericArrayValue) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *DnsRecordGenericArrayValue) SetId(v string) { + o.Id = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *DnsRecordGenericArrayValue) 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 *DnsRecordGenericArrayValue) 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 *DnsRecordGenericArrayValue) 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 *DnsRecordGenericArrayValue) SetName(v string) { + o.Name = &v +} + +// GetTtl returns the Ttl field value if set, zero value otherwise. +func (o *DnsRecordGenericArrayValue) GetTtl() int32 { + if o == nil || IsNil(o.Ttl) { + var ret int32 + return ret + } + return *o.Ttl +} + +// GetTtlOk returns a tuple with the Ttl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DnsRecordGenericArrayValue) GetTtlOk() (*int32, bool) { + if o == nil || IsNil(o.Ttl) { + return nil, false + } + return o.Ttl, true +} + +// HasTtl returns a boolean if a field has been set. +func (o *DnsRecordGenericArrayValue) HasTtl() bool { + if o != nil && !IsNil(o.Ttl) { + return true + } + + return false +} + +// SetTtl gets a reference to the given int32 and assigns it to the Ttl field. +func (o *DnsRecordGenericArrayValue) SetTtl(v int32) { + o.Ttl = &v +} + +// GetCloud returns the Cloud field value if set, zero value otherwise. +func (o *DnsRecordGenericArrayValue) GetCloud() bool { + if o == nil || IsNil(o.Cloud) { + var ret bool + return ret + } + return *o.Cloud +} + +// GetCloudOk returns a tuple with the Cloud field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DnsRecordGenericArrayValue) GetCloudOk() (*bool, bool) { + if o == nil || IsNil(o.Cloud) { + return nil, false + } + return o.Cloud, true +} + +// HasCloud returns a boolean if a field has been set. +func (o *DnsRecordGenericArrayValue) HasCloud() bool { + if o != nil && !IsNil(o.Cloud) { + return true + } + + return false +} + +// SetCloud gets a reference to the given bool and assigns it to the Cloud field. +func (o *DnsRecordGenericArrayValue) SetCloud(v bool) { + o.Cloud = &v +} + +// GetUpstreamHttps returns the UpstreamHttps field value if set, zero value otherwise. +func (o *DnsRecordGenericArrayValue) GetUpstreamHttps() string { + if o == nil || IsNil(o.UpstreamHttps) { + var ret string + return ret + } + return *o.UpstreamHttps +} + +// GetUpstreamHttpsOk returns a tuple with the UpstreamHttps field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DnsRecordGenericArrayValue) GetUpstreamHttpsOk() (*string, bool) { + if o == nil || IsNil(o.UpstreamHttps) { + return nil, false + } + return o.UpstreamHttps, true +} + +// HasUpstreamHttps returns a boolean if a field has been set. +func (o *DnsRecordGenericArrayValue) HasUpstreamHttps() bool { + if o != nil && !IsNil(o.UpstreamHttps) { + return true + } + + return false +} + +// SetUpstreamHttps gets a reference to the given string and assigns it to the UpstreamHttps field. +func (o *DnsRecordGenericArrayValue) SetUpstreamHttps(v string) { + o.UpstreamHttps = &v +} + +// GetIpFilterMode returns the IpFilterMode field value if set, zero value otherwise. +func (o *DnsRecordGenericArrayValue) GetIpFilterMode() DnsRecordIpFilterMode { + if o == nil || IsNil(o.IpFilterMode) { + var ret DnsRecordIpFilterMode + return ret + } + return *o.IpFilterMode +} + +// GetIpFilterModeOk returns a tuple with the IpFilterMode field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DnsRecordGenericArrayValue) GetIpFilterModeOk() (*DnsRecordIpFilterMode, bool) { + if o == nil || IsNil(o.IpFilterMode) { + return nil, false + } + return o.IpFilterMode, true +} + +// HasIpFilterMode returns a boolean if a field has been set. +func (o *DnsRecordGenericArrayValue) HasIpFilterMode() bool { + if o != nil && !IsNil(o.IpFilterMode) { + return true + } + + return false +} + +// SetIpFilterMode gets a reference to the given DnsRecordIpFilterMode and assigns it to the IpFilterMode field. +func (o *DnsRecordGenericArrayValue) SetIpFilterMode(v DnsRecordIpFilterMode) { + o.IpFilterMode = &v +} + +// GetIsProtected returns the IsProtected field value if set, zero value otherwise. +func (o *DnsRecordGenericArrayValue) GetIsProtected() bool { + if o == nil || IsNil(o.IsProtected) { + var ret bool + return ret + } + return *o.IsProtected +} + +// GetIsProtectedOk returns a tuple with the IsProtected field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DnsRecordGenericArrayValue) GetIsProtectedOk() (*bool, bool) { + if o == nil || IsNil(o.IsProtected) { + return nil, false + } + return o.IsProtected, true +} + +// HasIsProtected returns a boolean if a field has been set. +func (o *DnsRecordGenericArrayValue) HasIsProtected() bool { + if o != nil && !IsNil(o.IsProtected) { + return true + } + + return false +} + +// SetIsProtected gets a reference to the given bool and assigns it to the IsProtected field. +func (o *DnsRecordGenericArrayValue) SetIsProtected(v bool) { + o.IsProtected = &v +} + +// GetUsage returns the Usage field value if set, zero value otherwise. +func (o *DnsRecordGenericArrayValue) GetUsage() []string { + if o == nil || IsNil(o.Usage) { + var ret []string + return ret + } + return o.Usage +} + +// GetUsageOk returns a tuple with the Usage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DnsRecordGenericArrayValue) GetUsageOk() ([]string, bool) { + if o == nil || IsNil(o.Usage) { + return nil, false + } + return o.Usage, true +} + +// HasUsage returns a boolean if a field has been set. +func (o *DnsRecordGenericArrayValue) HasUsage() bool { + if o != nil && !IsNil(o.Usage) { + return true + } + + return false +} + +// SetUsage gets a reference to the given []string and assigns it to the Usage field. +func (o *DnsRecordGenericArrayValue) SetUsage(v []string) { + o.Usage = v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *DnsRecordGenericArrayValue) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DnsRecordGenericArrayValue) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *DnsRecordGenericArrayValue) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *DnsRecordGenericArrayValue) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *DnsRecordGenericArrayValue) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DnsRecordGenericArrayValue) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *DnsRecordGenericArrayValue) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *DnsRecordGenericArrayValue) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +func (o DnsRecordGenericArrayValue) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DnsRecordGenericArrayValue) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Value) { + toSerialize["value"] = o.Value + } + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + // skip: id is readOnly + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Ttl) { + toSerialize["ttl"] = o.Ttl + } + if !IsNil(o.Cloud) { + toSerialize["cloud"] = o.Cloud + } + if !IsNil(o.UpstreamHttps) { + toSerialize["upstream_https"] = o.UpstreamHttps + } + if !IsNil(o.IpFilterMode) { + toSerialize["ip_filter_mode"] = o.IpFilterMode + } + // skip: is_protected is readOnly + // skip: usage is readOnly + // skip: created_at is readOnly + // skip: updated_at is readOnly + return toSerialize, nil +} + +type NullableDnsRecordGenericArrayValue struct { + value *DnsRecordGenericArrayValue + isSet bool +} + +func (v NullableDnsRecordGenericArrayValue) Get() *DnsRecordGenericArrayValue { + return v.value +} + +func (v *NullableDnsRecordGenericArrayValue) Set(val *DnsRecordGenericArrayValue) { + v.value = val + v.isSet = true +} + +func (v NullableDnsRecordGenericArrayValue) IsSet() bool { + return v.isSet +} + +func (v *NullableDnsRecordGenericArrayValue) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDnsRecordGenericArrayValue(val *DnsRecordGenericArrayValue) *NullableDnsRecordGenericArrayValue { + return &NullableDnsRecordGenericArrayValue{value: val, isSet: true} +} + +func (v NullableDnsRecordGenericArrayValue) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDnsRecordGenericArrayValue) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_dns_record_generic_object_value.go b/model_dns_record_generic_object_value.go new file mode 100644 index 0000000..29a6f3a --- /dev/null +++ b/model_dns_record_generic_object_value.go @@ -0,0 +1,518 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" + "time" +) + +// checks if the DnsRecordGenericObjectValue type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DnsRecordGenericObjectValue{} + +// DnsRecordGenericObjectValue struct for DnsRecordGenericObjectValue +type DnsRecordGenericObjectValue struct { + Value map[string]interface{} `json:"value,omitempty"` + Type *string `json:"type,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Ttl *int32 `json:"ttl,omitempty"` + Cloud *bool `json:"cloud,omitempty"` + UpstreamHttps *string `json:"upstream_https,omitempty"` + IpFilterMode *DnsRecordIpFilterMode `json:"ip_filter_mode,omitempty"` + // Protected records cannot be modified or deleted by user. + IsProtected *bool `json:"is_protected,omitempty"` + Usage []string `json:"usage,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty"` + UpdatedAt *time.Time `json:"updated_at,omitempty"` +} + +// NewDnsRecordGenericObjectValue instantiates a new DnsRecordGenericObjectValue object +// This constructor will assign default values to properties that have it defined, +// 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 NewDnsRecordGenericObjectValue() *DnsRecordGenericObjectValue { + this := DnsRecordGenericObjectValue{} + var cloud bool = false + this.Cloud = &cloud + return &this +} + +// NewDnsRecordGenericObjectValueWithDefaults instantiates a new DnsRecordGenericObjectValue object +// This 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 NewDnsRecordGenericObjectValueWithDefaults() *DnsRecordGenericObjectValue { + this := DnsRecordGenericObjectValue{} + var cloud bool = false + this.Cloud = &cloud + return &this +} + +// GetValue returns the Value field value if set, zero value otherwise. +func (o *DnsRecordGenericObjectValue) GetValue() map[string]interface{} { + if o == nil || IsNil(o.Value) { + var ret map[string]interface{} + return ret + } + return o.Value +} + +// GetValueOk returns a tuple with the Value field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DnsRecordGenericObjectValue) GetValueOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Value) { + return map[string]interface{}{}, false + } + return o.Value, true +} + +// HasValue returns a boolean if a field has been set. +func (o *DnsRecordGenericObjectValue) HasValue() bool { + if o != nil && !IsNil(o.Value) { + return true + } + + return false +} + +// SetValue gets a reference to the given map[string]interface{} and assigns it to the Value field. +func (o *DnsRecordGenericObjectValue) SetValue(v map[string]interface{}) { + o.Value = v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *DnsRecordGenericObjectValue) 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 *DnsRecordGenericObjectValue) 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 *DnsRecordGenericObjectValue) 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 *DnsRecordGenericObjectValue) SetType(v string) { + o.Type = &v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *DnsRecordGenericObjectValue) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DnsRecordGenericObjectValue) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *DnsRecordGenericObjectValue) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *DnsRecordGenericObjectValue) SetId(v string) { + o.Id = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *DnsRecordGenericObjectValue) 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 *DnsRecordGenericObjectValue) 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 *DnsRecordGenericObjectValue) 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 *DnsRecordGenericObjectValue) SetName(v string) { + o.Name = &v +} + +// GetTtl returns the Ttl field value if set, zero value otherwise. +func (o *DnsRecordGenericObjectValue) GetTtl() int32 { + if o == nil || IsNil(o.Ttl) { + var ret int32 + return ret + } + return *o.Ttl +} + +// GetTtlOk returns a tuple with the Ttl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DnsRecordGenericObjectValue) GetTtlOk() (*int32, bool) { + if o == nil || IsNil(o.Ttl) { + return nil, false + } + return o.Ttl, true +} + +// HasTtl returns a boolean if a field has been set. +func (o *DnsRecordGenericObjectValue) HasTtl() bool { + if o != nil && !IsNil(o.Ttl) { + return true + } + + return false +} + +// SetTtl gets a reference to the given int32 and assigns it to the Ttl field. +func (o *DnsRecordGenericObjectValue) SetTtl(v int32) { + o.Ttl = &v +} + +// GetCloud returns the Cloud field value if set, zero value otherwise. +func (o *DnsRecordGenericObjectValue) GetCloud() bool { + if o == nil || IsNil(o.Cloud) { + var ret bool + return ret + } + return *o.Cloud +} + +// GetCloudOk returns a tuple with the Cloud field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DnsRecordGenericObjectValue) GetCloudOk() (*bool, bool) { + if o == nil || IsNil(o.Cloud) { + return nil, false + } + return o.Cloud, true +} + +// HasCloud returns a boolean if a field has been set. +func (o *DnsRecordGenericObjectValue) HasCloud() bool { + if o != nil && !IsNil(o.Cloud) { + return true + } + + return false +} + +// SetCloud gets a reference to the given bool and assigns it to the Cloud field. +func (o *DnsRecordGenericObjectValue) SetCloud(v bool) { + o.Cloud = &v +} + +// GetUpstreamHttps returns the UpstreamHttps field value if set, zero value otherwise. +func (o *DnsRecordGenericObjectValue) GetUpstreamHttps() string { + if o == nil || IsNil(o.UpstreamHttps) { + var ret string + return ret + } + return *o.UpstreamHttps +} + +// GetUpstreamHttpsOk returns a tuple with the UpstreamHttps field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DnsRecordGenericObjectValue) GetUpstreamHttpsOk() (*string, bool) { + if o == nil || IsNil(o.UpstreamHttps) { + return nil, false + } + return o.UpstreamHttps, true +} + +// HasUpstreamHttps returns a boolean if a field has been set. +func (o *DnsRecordGenericObjectValue) HasUpstreamHttps() bool { + if o != nil && !IsNil(o.UpstreamHttps) { + return true + } + + return false +} + +// SetUpstreamHttps gets a reference to the given string and assigns it to the UpstreamHttps field. +func (o *DnsRecordGenericObjectValue) SetUpstreamHttps(v string) { + o.UpstreamHttps = &v +} + +// GetIpFilterMode returns the IpFilterMode field value if set, zero value otherwise. +func (o *DnsRecordGenericObjectValue) GetIpFilterMode() DnsRecordIpFilterMode { + if o == nil || IsNil(o.IpFilterMode) { + var ret DnsRecordIpFilterMode + return ret + } + return *o.IpFilterMode +} + +// GetIpFilterModeOk returns a tuple with the IpFilterMode field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DnsRecordGenericObjectValue) GetIpFilterModeOk() (*DnsRecordIpFilterMode, bool) { + if o == nil || IsNil(o.IpFilterMode) { + return nil, false + } + return o.IpFilterMode, true +} + +// HasIpFilterMode returns a boolean if a field has been set. +func (o *DnsRecordGenericObjectValue) HasIpFilterMode() bool { + if o != nil && !IsNil(o.IpFilterMode) { + return true + } + + return false +} + +// SetIpFilterMode gets a reference to the given DnsRecordIpFilterMode and assigns it to the IpFilterMode field. +func (o *DnsRecordGenericObjectValue) SetIpFilterMode(v DnsRecordIpFilterMode) { + o.IpFilterMode = &v +} + +// GetIsProtected returns the IsProtected field value if set, zero value otherwise. +func (o *DnsRecordGenericObjectValue) GetIsProtected() bool { + if o == nil || IsNil(o.IsProtected) { + var ret bool + return ret + } + return *o.IsProtected +} + +// GetIsProtectedOk returns a tuple with the IsProtected field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DnsRecordGenericObjectValue) GetIsProtectedOk() (*bool, bool) { + if o == nil || IsNil(o.IsProtected) { + return nil, false + } + return o.IsProtected, true +} + +// HasIsProtected returns a boolean if a field has been set. +func (o *DnsRecordGenericObjectValue) HasIsProtected() bool { + if o != nil && !IsNil(o.IsProtected) { + return true + } + + return false +} + +// SetIsProtected gets a reference to the given bool and assigns it to the IsProtected field. +func (o *DnsRecordGenericObjectValue) SetIsProtected(v bool) { + o.IsProtected = &v +} + +// GetUsage returns the Usage field value if set, zero value otherwise. +func (o *DnsRecordGenericObjectValue) GetUsage() []string { + if o == nil || IsNil(o.Usage) { + var ret []string + return ret + } + return o.Usage +} + +// GetUsageOk returns a tuple with the Usage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DnsRecordGenericObjectValue) GetUsageOk() ([]string, bool) { + if o == nil || IsNil(o.Usage) { + return nil, false + } + return o.Usage, true +} + +// HasUsage returns a boolean if a field has been set. +func (o *DnsRecordGenericObjectValue) HasUsage() bool { + if o != nil && !IsNil(o.Usage) { + return true + } + + return false +} + +// SetUsage gets a reference to the given []string and assigns it to the Usage field. +func (o *DnsRecordGenericObjectValue) SetUsage(v []string) { + o.Usage = v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *DnsRecordGenericObjectValue) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DnsRecordGenericObjectValue) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *DnsRecordGenericObjectValue) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *DnsRecordGenericObjectValue) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *DnsRecordGenericObjectValue) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DnsRecordGenericObjectValue) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *DnsRecordGenericObjectValue) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *DnsRecordGenericObjectValue) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +func (o DnsRecordGenericObjectValue) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DnsRecordGenericObjectValue) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Value) { + toSerialize["value"] = o.Value + } + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + // skip: id is readOnly + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Ttl) { + toSerialize["ttl"] = o.Ttl + } + if !IsNil(o.Cloud) { + toSerialize["cloud"] = o.Cloud + } + if !IsNil(o.UpstreamHttps) { + toSerialize["upstream_https"] = o.UpstreamHttps + } + if !IsNil(o.IpFilterMode) { + toSerialize["ip_filter_mode"] = o.IpFilterMode + } + // skip: is_protected is readOnly + // skip: usage is readOnly + // skip: created_at is readOnly + // skip: updated_at is readOnly + return toSerialize, nil +} + +type NullableDnsRecordGenericObjectValue struct { + value *DnsRecordGenericObjectValue + isSet bool +} + +func (v NullableDnsRecordGenericObjectValue) Get() *DnsRecordGenericObjectValue { + return v.value +} + +func (v *NullableDnsRecordGenericObjectValue) Set(val *DnsRecordGenericObjectValue) { + v.value = val + v.isSet = true +} + +func (v NullableDnsRecordGenericObjectValue) IsSet() bool { + return v.isSet +} + +func (v *NullableDnsRecordGenericObjectValue) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDnsRecordGenericObjectValue(val *DnsRecordGenericObjectValue) *NullableDnsRecordGenericObjectValue { + return &NullableDnsRecordGenericObjectValue{value: val, isSet: true} +} + +func (v NullableDnsRecordGenericObjectValue) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDnsRecordGenericObjectValue) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_dns_record_ip_filter_mode.go b/model_dns_record_ip_filter_mode.go new file mode 100644 index 0000000..d429714 --- /dev/null +++ b/model_dns_record_ip_filter_mode.go @@ -0,0 +1,198 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the DnsRecordIpFilterMode type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DnsRecordIpFilterMode{} + +// DnsRecordIpFilterMode struct for DnsRecordIpFilterMode +type DnsRecordIpFilterMode struct { + Count *string `json:"count,omitempty"` + Order *string `json:"order,omitempty"` + GeoFilter *string `json:"geo_filter,omitempty"` +} + +// NewDnsRecordIpFilterMode instantiates a new DnsRecordIpFilterMode object +// This constructor will assign default values to properties that have it defined, +// 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 NewDnsRecordIpFilterMode() *DnsRecordIpFilterMode { + this := DnsRecordIpFilterMode{} + return &this +} + +// NewDnsRecordIpFilterModeWithDefaults instantiates a new DnsRecordIpFilterMode object +// This 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 NewDnsRecordIpFilterModeWithDefaults() *DnsRecordIpFilterMode { + this := DnsRecordIpFilterMode{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *DnsRecordIpFilterMode) GetCount() string { + if o == nil || IsNil(o.Count) { + var ret string + 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 *DnsRecordIpFilterMode) GetCountOk() (*string, 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 *DnsRecordIpFilterMode) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given string and assigns it to the Count field. +func (o *DnsRecordIpFilterMode) SetCount(v string) { + o.Count = &v +} + +// GetOrder returns the Order field value if set, zero value otherwise. +func (o *DnsRecordIpFilterMode) GetOrder() string { + if o == nil || IsNil(o.Order) { + var ret string + return ret + } + return *o.Order +} + +// GetOrderOk returns a tuple with the Order field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DnsRecordIpFilterMode) GetOrderOk() (*string, bool) { + if o == nil || IsNil(o.Order) { + return nil, false + } + return o.Order, true +} + +// HasOrder returns a boolean if a field has been set. +func (o *DnsRecordIpFilterMode) HasOrder() bool { + if o != nil && !IsNil(o.Order) { + return true + } + + return false +} + +// SetOrder gets a reference to the given string and assigns it to the Order field. +func (o *DnsRecordIpFilterMode) SetOrder(v string) { + o.Order = &v +} + +// GetGeoFilter returns the GeoFilter field value if set, zero value otherwise. +func (o *DnsRecordIpFilterMode) GetGeoFilter() string { + if o == nil || IsNil(o.GeoFilter) { + var ret string + return ret + } + return *o.GeoFilter +} + +// GetGeoFilterOk returns a tuple with the GeoFilter field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DnsRecordIpFilterMode) GetGeoFilterOk() (*string, bool) { + if o == nil || IsNil(o.GeoFilter) { + return nil, false + } + return o.GeoFilter, true +} + +// HasGeoFilter returns a boolean if a field has been set. +func (o *DnsRecordIpFilterMode) HasGeoFilter() bool { + if o != nil && !IsNil(o.GeoFilter) { + return true + } + + return false +} + +// SetGeoFilter gets a reference to the given string and assigns it to the GeoFilter field. +func (o *DnsRecordIpFilterMode) SetGeoFilter(v string) { + o.GeoFilter = &v +} + +func (o DnsRecordIpFilterMode) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DnsRecordIpFilterMode) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if !IsNil(o.Order) { + toSerialize["order"] = o.Order + } + if !IsNil(o.GeoFilter) { + toSerialize["geo_filter"] = o.GeoFilter + } + return toSerialize, nil +} + +type NullableDnsRecordIpFilterMode struct { + value *DnsRecordIpFilterMode + isSet bool +} + +func (v NullableDnsRecordIpFilterMode) Get() *DnsRecordIpFilterMode { + return v.value +} + +func (v *NullableDnsRecordIpFilterMode) Set(val *DnsRecordIpFilterMode) { + v.value = val + v.isSet = true +} + +func (v NullableDnsRecordIpFilterMode) IsSet() bool { + return v.isSet +} + +func (v *NullableDnsRecordIpFilterMode) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDnsRecordIpFilterMode(val *DnsRecordIpFilterMode) *NullableDnsRecordIpFilterMode { + return &NullableDnsRecordIpFilterMode{value: val, isSet: true} +} + +func (v NullableDnsRecordIpFilterMode) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDnsRecordIpFilterMode) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_dns_record_response.go b/model_dns_record_response.go new file mode 100644 index 0000000..2e54faf --- /dev/null +++ b/model_dns_record_response.go @@ -0,0 +1,172 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the DnsRecordResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DnsRecordResponse{} + +// DnsRecordResponse struct for DnsRecordResponse +type DnsRecordResponse struct { + Data *DnsRecordGeneric `json:"data,omitempty"` + Message NullableString `json:"message,omitempty"` +} + +// NewDnsRecordResponse instantiates a new DnsRecordResponse object +// This constructor will assign default values to properties that have it defined, +// 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 NewDnsRecordResponse() *DnsRecordResponse { + this := DnsRecordResponse{} + return &this +} + +// NewDnsRecordResponseWithDefaults instantiates a new DnsRecordResponse object +// This 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 NewDnsRecordResponseWithDefaults() *DnsRecordResponse { + this := DnsRecordResponse{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *DnsRecordResponse) GetData() DnsRecordGeneric { + if o == nil || IsNil(o.Data) { + var ret DnsRecordGeneric + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DnsRecordResponse) GetDataOk() (*DnsRecordGeneric, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *DnsRecordResponse) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given DnsRecordGeneric and assigns it to the Data field. +func (o *DnsRecordResponse) SetData(v DnsRecordGeneric) { + o.Data = &v +} + +// GetMessage returns the Message field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DnsRecordResponse) GetMessage() string { + if o == nil || IsNil(o.Message.Get()) { + var ret string + return ret + } + return *o.Message.Get() +} + +// GetMessageOk returns a tuple with the Message 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 *DnsRecordResponse) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Message.Get(), o.Message.IsSet() +} + +// HasMessage returns a boolean if a field has been set. +func (o *DnsRecordResponse) HasMessage() bool { + if o != nil && o.Message.IsSet() { + return true + } + + return false +} + +// SetMessage gets a reference to the given NullableString and assigns it to the Message field. +func (o *DnsRecordResponse) SetMessage(v string) { + o.Message.Set(&v) +} +// SetMessageNil sets the value for Message to be an explicit nil +func (o *DnsRecordResponse) SetMessageNil() { + o.Message.Set(nil) +} + +// UnsetMessage ensures that no value is present for Message, not even an explicit nil +func (o *DnsRecordResponse) UnsetMessage() { + o.Message.Unset() +} + +func (o DnsRecordResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DnsRecordResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + if o.Message.IsSet() { + toSerialize["message"] = o.Message.Get() + } + return toSerialize, nil +} + +type NullableDnsRecordResponse struct { + value *DnsRecordResponse + isSet bool +} + +func (v NullableDnsRecordResponse) Get() *DnsRecordResponse { + return v.value +} + +func (v *NullableDnsRecordResponse) Set(val *DnsRecordResponse) { + v.value = val + v.isSet = true +} + +func (v NullableDnsRecordResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableDnsRecordResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDnsRecordResponse(val *DnsRecordResponse) *NullableDnsRecordResponse { + return &NullableDnsRecordResponse{value: val, isSet: true} +} + +func (v NullableDnsRecordResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDnsRecordResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_dns_records_index_200_response.go b/model_dns_records_index_200_response.go new file mode 100644 index 0000000..01704ff --- /dev/null +++ b/model_dns_records_index_200_response.go @@ -0,0 +1,198 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the DnsRecordsIndex200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DnsRecordsIndex200Response{} + +// DnsRecordsIndex200Response struct for DnsRecordsIndex200Response +type DnsRecordsIndex200Response struct { + Data []DnsRecordGeneric `json:"data,omitempty"` + Links *PaginatedResponseLinks `json:"links,omitempty"` + Meta *PaginatedResponseMeta `json:"meta,omitempty"` +} + +// NewDnsRecordsIndex200Response instantiates a new DnsRecordsIndex200Response object +// This constructor will assign default values to properties that have it defined, +// 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 NewDnsRecordsIndex200Response() *DnsRecordsIndex200Response { + this := DnsRecordsIndex200Response{} + return &this +} + +// NewDnsRecordsIndex200ResponseWithDefaults instantiates a new DnsRecordsIndex200Response object +// This 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 NewDnsRecordsIndex200ResponseWithDefaults() *DnsRecordsIndex200Response { + this := DnsRecordsIndex200Response{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *DnsRecordsIndex200Response) GetData() []DnsRecordGeneric { + if o == nil || IsNil(o.Data) { + var ret []DnsRecordGeneric + return ret + } + return o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DnsRecordsIndex200Response) GetDataOk() ([]DnsRecordGeneric, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *DnsRecordsIndex200Response) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given []DnsRecordGeneric and assigns it to the Data field. +func (o *DnsRecordsIndex200Response) SetData(v []DnsRecordGeneric) { + o.Data = v +} + +// GetLinks returns the Links field value if set, zero value otherwise. +func (o *DnsRecordsIndex200Response) GetLinks() PaginatedResponseLinks { + if o == nil || IsNil(o.Links) { + var ret PaginatedResponseLinks + return ret + } + return *o.Links +} + +// GetLinksOk returns a tuple with the Links field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DnsRecordsIndex200Response) GetLinksOk() (*PaginatedResponseLinks, bool) { + if o == nil || IsNil(o.Links) { + return nil, false + } + return o.Links, true +} + +// HasLinks returns a boolean if a field has been set. +func (o *DnsRecordsIndex200Response) HasLinks() bool { + if o != nil && !IsNil(o.Links) { + return true + } + + return false +} + +// SetLinks gets a reference to the given PaginatedResponseLinks and assigns it to the Links field. +func (o *DnsRecordsIndex200Response) SetLinks(v PaginatedResponseLinks) { + o.Links = &v +} + +// GetMeta returns the Meta field value if set, zero value otherwise. +func (o *DnsRecordsIndex200Response) GetMeta() PaginatedResponseMeta { + if o == nil || IsNil(o.Meta) { + var ret PaginatedResponseMeta + return ret + } + return *o.Meta +} + +// GetMetaOk returns a tuple with the Meta field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DnsRecordsIndex200Response) GetMetaOk() (*PaginatedResponseMeta, bool) { + if o == nil || IsNil(o.Meta) { + return nil, false + } + return o.Meta, true +} + +// HasMeta returns a boolean if a field has been set. +func (o *DnsRecordsIndex200Response) HasMeta() bool { + if o != nil && !IsNil(o.Meta) { + return true + } + + return false +} + +// SetMeta gets a reference to the given PaginatedResponseMeta and assigns it to the Meta field. +func (o *DnsRecordsIndex200Response) SetMeta(v PaginatedResponseMeta) { + o.Meta = &v +} + +func (o DnsRecordsIndex200Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DnsRecordsIndex200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + if !IsNil(o.Links) { + toSerialize["links"] = o.Links + } + if !IsNil(o.Meta) { + toSerialize["meta"] = o.Meta + } + return toSerialize, nil +} + +type NullableDnsRecordsIndex200Response struct { + value *DnsRecordsIndex200Response + isSet bool +} + +func (v NullableDnsRecordsIndex200Response) Get() *DnsRecordsIndex200Response { + return v.value +} + +func (v *NullableDnsRecordsIndex200Response) Set(val *DnsRecordsIndex200Response) { + v.value = val + v.isSet = true +} + +func (v NullableDnsRecordsIndex200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableDnsRecordsIndex200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDnsRecordsIndex200Response(val *DnsRecordsIndex200Response) *NullableDnsRecordsIndex200Response { + return &NullableDnsRecordsIndex200Response{value: val, isSet: true} +} + +func (v NullableDnsRecordsIndex200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDnsRecordsIndex200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_dns_request_report.go b/model_dns_request_report.go new file mode 100644 index 0000000..6471268 --- /dev/null +++ b/model_dns_request_report.go @@ -0,0 +1,162 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the DnsRequestReport type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DnsRequestReport{} + +// DnsRequestReport struct for DnsRequestReport +type DnsRequestReport struct { + Statistics *DnsRequestReportStatistics `json:"statistics,omitempty"` + Charts *DnsRequestReportCharts `json:"charts,omitempty"` +} + +// NewDnsRequestReport instantiates a new DnsRequestReport object +// This constructor will assign default values to properties that have it defined, +// 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 NewDnsRequestReport() *DnsRequestReport { + this := DnsRequestReport{} + return &this +} + +// NewDnsRequestReportWithDefaults instantiates a new DnsRequestReport object +// This 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 NewDnsRequestReportWithDefaults() *DnsRequestReport { + this := DnsRequestReport{} + return &this +} + +// GetStatistics returns the Statistics field value if set, zero value otherwise. +func (o *DnsRequestReport) GetStatistics() DnsRequestReportStatistics { + if o == nil || IsNil(o.Statistics) { + var ret DnsRequestReportStatistics + return ret + } + return *o.Statistics +} + +// GetStatisticsOk returns a tuple with the Statistics field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DnsRequestReport) GetStatisticsOk() (*DnsRequestReportStatistics, bool) { + if o == nil || IsNil(o.Statistics) { + return nil, false + } + return o.Statistics, true +} + +// HasStatistics returns a boolean if a field has been set. +func (o *DnsRequestReport) HasStatistics() bool { + if o != nil && !IsNil(o.Statistics) { + return true + } + + return false +} + +// SetStatistics gets a reference to the given DnsRequestReportStatistics and assigns it to the Statistics field. +func (o *DnsRequestReport) SetStatistics(v DnsRequestReportStatistics) { + o.Statistics = &v +} + +// GetCharts returns the Charts field value if set, zero value otherwise. +func (o *DnsRequestReport) GetCharts() DnsRequestReportCharts { + if o == nil || IsNil(o.Charts) { + var ret DnsRequestReportCharts + return ret + } + return *o.Charts +} + +// GetChartsOk returns a tuple with the Charts field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DnsRequestReport) GetChartsOk() (*DnsRequestReportCharts, bool) { + if o == nil || IsNil(o.Charts) { + return nil, false + } + return o.Charts, true +} + +// HasCharts returns a boolean if a field has been set. +func (o *DnsRequestReport) HasCharts() bool { + if o != nil && !IsNil(o.Charts) { + return true + } + + return false +} + +// SetCharts gets a reference to the given DnsRequestReportCharts and assigns it to the Charts field. +func (o *DnsRequestReport) SetCharts(v DnsRequestReportCharts) { + o.Charts = &v +} + +func (o DnsRequestReport) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DnsRequestReport) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Statistics) { + toSerialize["statistics"] = o.Statistics + } + if !IsNil(o.Charts) { + toSerialize["charts"] = o.Charts + } + return toSerialize, nil +} + +type NullableDnsRequestReport struct { + value *DnsRequestReport + isSet bool +} + +func (v NullableDnsRequestReport) Get() *DnsRequestReport { + return v.value +} + +func (v *NullableDnsRequestReport) Set(val *DnsRequestReport) { + v.value = val + v.isSet = true +} + +func (v NullableDnsRequestReport) IsSet() bool { + return v.isSet +} + +func (v *NullableDnsRequestReport) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDnsRequestReport(val *DnsRequestReport) *NullableDnsRequestReport { + return &NullableDnsRequestReport{value: val, isSet: true} +} + +func (v NullableDnsRequestReport) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDnsRequestReport) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_dns_request_report_charts.go b/model_dns_request_report_charts.go new file mode 100644 index 0000000..561ed27 --- /dev/null +++ b/model_dns_request_report_charts.go @@ -0,0 +1,126 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the DnsRequestReportCharts type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DnsRequestReportCharts{} + +// DnsRequestReportCharts struct for DnsRequestReportCharts +type DnsRequestReportCharts struct { + Requests *DnsRequestReportChartsRequests `json:"requests,omitempty"` +} + +// NewDnsRequestReportCharts instantiates a new DnsRequestReportCharts object +// This constructor will assign default values to properties that have it defined, +// 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 NewDnsRequestReportCharts() *DnsRequestReportCharts { + this := DnsRequestReportCharts{} + return &this +} + +// NewDnsRequestReportChartsWithDefaults instantiates a new DnsRequestReportCharts object +// This 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 NewDnsRequestReportChartsWithDefaults() *DnsRequestReportCharts { + this := DnsRequestReportCharts{} + return &this +} + +// GetRequests returns the Requests field value if set, zero value otherwise. +func (o *DnsRequestReportCharts) GetRequests() DnsRequestReportChartsRequests { + if o == nil || IsNil(o.Requests) { + var ret DnsRequestReportChartsRequests + return ret + } + return *o.Requests +} + +// GetRequestsOk returns a tuple with the Requests field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DnsRequestReportCharts) GetRequestsOk() (*DnsRequestReportChartsRequests, bool) { + if o == nil || IsNil(o.Requests) { + return nil, false + } + return o.Requests, true +} + +// HasRequests returns a boolean if a field has been set. +func (o *DnsRequestReportCharts) HasRequests() bool { + if o != nil && !IsNil(o.Requests) { + return true + } + + return false +} + +// SetRequests gets a reference to the given DnsRequestReportChartsRequests and assigns it to the Requests field. +func (o *DnsRequestReportCharts) SetRequests(v DnsRequestReportChartsRequests) { + o.Requests = &v +} + +func (o DnsRequestReportCharts) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DnsRequestReportCharts) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Requests) { + toSerialize["requests"] = o.Requests + } + return toSerialize, nil +} + +type NullableDnsRequestReportCharts struct { + value *DnsRequestReportCharts + isSet bool +} + +func (v NullableDnsRequestReportCharts) Get() *DnsRequestReportCharts { + return v.value +} + +func (v *NullableDnsRequestReportCharts) Set(val *DnsRequestReportCharts) { + v.value = val + v.isSet = true +} + +func (v NullableDnsRequestReportCharts) IsSet() bool { + return v.isSet +} + +func (v *NullableDnsRequestReportCharts) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDnsRequestReportCharts(val *DnsRequestReportCharts) *NullableDnsRequestReportCharts { + return &NullableDnsRequestReportCharts{value: val, isSet: true} +} + +func (v NullableDnsRequestReportCharts) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDnsRequestReportCharts) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_dns_request_report_charts_requests.go b/model_dns_request_report_charts_requests.go new file mode 100644 index 0000000..9211423 --- /dev/null +++ b/model_dns_request_report_charts_requests.go @@ -0,0 +1,199 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" + "time" +) + +// checks if the DnsRequestReportChartsRequests type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DnsRequestReportChartsRequests{} + +// DnsRequestReportChartsRequests struct for DnsRequestReportChartsRequests +type DnsRequestReportChartsRequests struct { + Title *string `json:"title,omitempty"` + Categories []time.Time `json:"categories,omitempty"` + Series []DnsRequestReportChartsRequestsSeriesInner `json:"series,omitempty"` +} + +// NewDnsRequestReportChartsRequests instantiates a new DnsRequestReportChartsRequests object +// This constructor will assign default values to properties that have it defined, +// 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 NewDnsRequestReportChartsRequests() *DnsRequestReportChartsRequests { + this := DnsRequestReportChartsRequests{} + return &this +} + +// NewDnsRequestReportChartsRequestsWithDefaults instantiates a new DnsRequestReportChartsRequests object +// This 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 NewDnsRequestReportChartsRequestsWithDefaults() *DnsRequestReportChartsRequests { + this := DnsRequestReportChartsRequests{} + return &this +} + +// GetTitle returns the Title field value if set, zero value otherwise. +func (o *DnsRequestReportChartsRequests) 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 *DnsRequestReportChartsRequests) 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 *DnsRequestReportChartsRequests) 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 *DnsRequestReportChartsRequests) SetTitle(v string) { + o.Title = &v +} + +// GetCategories returns the Categories field value if set, zero value otherwise. +func (o *DnsRequestReportChartsRequests) GetCategories() []time.Time { + if o == nil || IsNil(o.Categories) { + var ret []time.Time + return ret + } + return o.Categories +} + +// GetCategoriesOk returns a tuple with the Categories field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DnsRequestReportChartsRequests) GetCategoriesOk() ([]time.Time, bool) { + if o == nil || IsNil(o.Categories) { + return nil, false + } + return o.Categories, true +} + +// HasCategories returns a boolean if a field has been set. +func (o *DnsRequestReportChartsRequests) HasCategories() bool { + if o != nil && !IsNil(o.Categories) { + return true + } + + return false +} + +// SetCategories gets a reference to the given []time.Time and assigns it to the Categories field. +func (o *DnsRequestReportChartsRequests) SetCategories(v []time.Time) { + o.Categories = v +} + +// GetSeries returns the Series field value if set, zero value otherwise. +func (o *DnsRequestReportChartsRequests) GetSeries() []DnsRequestReportChartsRequestsSeriesInner { + if o == nil || IsNil(o.Series) { + var ret []DnsRequestReportChartsRequestsSeriesInner + return ret + } + return o.Series +} + +// GetSeriesOk returns a tuple with the Series field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DnsRequestReportChartsRequests) GetSeriesOk() ([]DnsRequestReportChartsRequestsSeriesInner, bool) { + if o == nil || IsNil(o.Series) { + return nil, false + } + return o.Series, true +} + +// HasSeries returns a boolean if a field has been set. +func (o *DnsRequestReportChartsRequests) HasSeries() bool { + if o != nil && !IsNil(o.Series) { + return true + } + + return false +} + +// SetSeries gets a reference to the given []DnsRequestReportChartsRequestsSeriesInner and assigns it to the Series field. +func (o *DnsRequestReportChartsRequests) SetSeries(v []DnsRequestReportChartsRequestsSeriesInner) { + o.Series = v +} + +func (o DnsRequestReportChartsRequests) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DnsRequestReportChartsRequests) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Title) { + toSerialize["title"] = o.Title + } + if !IsNil(o.Categories) { + toSerialize["categories"] = o.Categories + } + if !IsNil(o.Series) { + toSerialize["series"] = o.Series + } + return toSerialize, nil +} + +type NullableDnsRequestReportChartsRequests struct { + value *DnsRequestReportChartsRequests + isSet bool +} + +func (v NullableDnsRequestReportChartsRequests) Get() *DnsRequestReportChartsRequests { + return v.value +} + +func (v *NullableDnsRequestReportChartsRequests) Set(val *DnsRequestReportChartsRequests) { + v.value = val + v.isSet = true +} + +func (v NullableDnsRequestReportChartsRequests) IsSet() bool { + return v.isSet +} + +func (v *NullableDnsRequestReportChartsRequests) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDnsRequestReportChartsRequests(val *DnsRequestReportChartsRequests) *NullableDnsRequestReportChartsRequests { + return &NullableDnsRequestReportChartsRequests{value: val, isSet: true} +} + +func (v NullableDnsRequestReportChartsRequests) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDnsRequestReportChartsRequests) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_dns_request_report_charts_requests_series_inner.go b/model_dns_request_report_charts_requests_series_inner.go new file mode 100644 index 0000000..6d7660b --- /dev/null +++ b/model_dns_request_report_charts_requests_series_inner.go @@ -0,0 +1,162 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the DnsRequestReportChartsRequestsSeriesInner type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DnsRequestReportChartsRequestsSeriesInner{} + +// DnsRequestReportChartsRequestsSeriesInner struct for DnsRequestReportChartsRequestsSeriesInner +type DnsRequestReportChartsRequestsSeriesInner struct { + Name *string `json:"name,omitempty"` + Data []int32 `json:"data,omitempty"` +} + +// NewDnsRequestReportChartsRequestsSeriesInner instantiates a new DnsRequestReportChartsRequestsSeriesInner object +// This constructor will assign default values to properties that have it defined, +// 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 NewDnsRequestReportChartsRequestsSeriesInner() *DnsRequestReportChartsRequestsSeriesInner { + this := DnsRequestReportChartsRequestsSeriesInner{} + return &this +} + +// NewDnsRequestReportChartsRequestsSeriesInnerWithDefaults instantiates a new DnsRequestReportChartsRequestsSeriesInner object +// This 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 NewDnsRequestReportChartsRequestsSeriesInnerWithDefaults() *DnsRequestReportChartsRequestsSeriesInner { + this := DnsRequestReportChartsRequestsSeriesInner{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *DnsRequestReportChartsRequestsSeriesInner) 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 *DnsRequestReportChartsRequestsSeriesInner) 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 *DnsRequestReportChartsRequestsSeriesInner) 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 *DnsRequestReportChartsRequestsSeriesInner) SetName(v string) { + o.Name = &v +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *DnsRequestReportChartsRequestsSeriesInner) GetData() []int32 { + if o == nil || IsNil(o.Data) { + var ret []int32 + return ret + } + return o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DnsRequestReportChartsRequestsSeriesInner) GetDataOk() ([]int32, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *DnsRequestReportChartsRequestsSeriesInner) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given []int32 and assigns it to the Data field. +func (o *DnsRequestReportChartsRequestsSeriesInner) SetData(v []int32) { + o.Data = v +} + +func (o DnsRequestReportChartsRequestsSeriesInner) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DnsRequestReportChartsRequestsSeriesInner) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + return toSerialize, nil +} + +type NullableDnsRequestReportChartsRequestsSeriesInner struct { + value *DnsRequestReportChartsRequestsSeriesInner + isSet bool +} + +func (v NullableDnsRequestReportChartsRequestsSeriesInner) Get() *DnsRequestReportChartsRequestsSeriesInner { + return v.value +} + +func (v *NullableDnsRequestReportChartsRequestsSeriesInner) Set(val *DnsRequestReportChartsRequestsSeriesInner) { + v.value = val + v.isSet = true +} + +func (v NullableDnsRequestReportChartsRequestsSeriesInner) IsSet() bool { + return v.isSet +} + +func (v *NullableDnsRequestReportChartsRequestsSeriesInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDnsRequestReportChartsRequestsSeriesInner(val *DnsRequestReportChartsRequestsSeriesInner) *NullableDnsRequestReportChartsRequestsSeriesInner { + return &NullableDnsRequestReportChartsRequestsSeriesInner{value: val, isSet: true} +} + +func (v NullableDnsRequestReportChartsRequestsSeriesInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDnsRequestReportChartsRequestsSeriesInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_dns_request_report_data.go b/model_dns_request_report_data.go new file mode 100644 index 0000000..0deb52a --- /dev/null +++ b/model_dns_request_report_data.go @@ -0,0 +1,126 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the DnsRequestReportData type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DnsRequestReportData{} + +// DnsRequestReportData struct for DnsRequestReportData +type DnsRequestReportData struct { + Data *DnsRequestReport `json:"data,omitempty"` +} + +// NewDnsRequestReportData instantiates a new DnsRequestReportData object +// This constructor will assign default values to properties that have it defined, +// 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 NewDnsRequestReportData() *DnsRequestReportData { + this := DnsRequestReportData{} + return &this +} + +// NewDnsRequestReportDataWithDefaults instantiates a new DnsRequestReportData object +// This 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 NewDnsRequestReportDataWithDefaults() *DnsRequestReportData { + this := DnsRequestReportData{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *DnsRequestReportData) GetData() DnsRequestReport { + if o == nil || IsNil(o.Data) { + var ret DnsRequestReport + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DnsRequestReportData) GetDataOk() (*DnsRequestReport, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *DnsRequestReportData) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given DnsRequestReport and assigns it to the Data field. +func (o *DnsRequestReportData) SetData(v DnsRequestReport) { + o.Data = &v +} + +func (o DnsRequestReportData) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DnsRequestReportData) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + return toSerialize, nil +} + +type NullableDnsRequestReportData struct { + value *DnsRequestReportData + isSet bool +} + +func (v NullableDnsRequestReportData) Get() *DnsRequestReportData { + return v.value +} + +func (v *NullableDnsRequestReportData) Set(val *DnsRequestReportData) { + v.value = val + v.isSet = true +} + +func (v NullableDnsRequestReportData) IsSet() bool { + return v.isSet +} + +func (v *NullableDnsRequestReportData) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDnsRequestReportData(val *DnsRequestReportData) *NullableDnsRequestReportData { + return &NullableDnsRequestReportData{value: val, isSet: true} +} + +func (v NullableDnsRequestReportData) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDnsRequestReportData) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_dns_request_report_statistics.go b/model_dns_request_report_statistics.go new file mode 100644 index 0000000..879adc8 --- /dev/null +++ b/model_dns_request_report_statistics.go @@ -0,0 +1,163 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" + "time" +) + +// checks if the DnsRequestReportStatistics type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DnsRequestReportStatistics{} + +// DnsRequestReportStatistics struct for DnsRequestReportStatistics +type DnsRequestReportStatistics struct { + Total *int32 `json:"total,omitempty"` + Top *time.Time `json:"top,omitempty"` +} + +// NewDnsRequestReportStatistics instantiates a new DnsRequestReportStatistics object +// This constructor will assign default values to properties that have it defined, +// 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 NewDnsRequestReportStatistics() *DnsRequestReportStatistics { + this := DnsRequestReportStatistics{} + return &this +} + +// NewDnsRequestReportStatisticsWithDefaults instantiates a new DnsRequestReportStatistics object +// This 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 NewDnsRequestReportStatisticsWithDefaults() *DnsRequestReportStatistics { + this := DnsRequestReportStatistics{} + return &this +} + +// GetTotal returns the Total field value if set, zero value otherwise. +func (o *DnsRequestReportStatistics) GetTotal() int32 { + if o == nil || IsNil(o.Total) { + var ret int32 + return ret + } + return *o.Total +} + +// GetTotalOk returns a tuple with the Total field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DnsRequestReportStatistics) GetTotalOk() (*int32, bool) { + if o == nil || IsNil(o.Total) { + return nil, false + } + return o.Total, true +} + +// HasTotal returns a boolean if a field has been set. +func (o *DnsRequestReportStatistics) HasTotal() bool { + if o != nil && !IsNil(o.Total) { + return true + } + + return false +} + +// SetTotal gets a reference to the given int32 and assigns it to the Total field. +func (o *DnsRequestReportStatistics) SetTotal(v int32) { + o.Total = &v +} + +// GetTop returns the Top field value if set, zero value otherwise. +func (o *DnsRequestReportStatistics) GetTop() time.Time { + if o == nil || IsNil(o.Top) { + var ret time.Time + return ret + } + return *o.Top +} + +// GetTopOk returns a tuple with the Top field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DnsRequestReportStatistics) GetTopOk() (*time.Time, bool) { + if o == nil || IsNil(o.Top) { + return nil, false + } + return o.Top, true +} + +// HasTop returns a boolean if a field has been set. +func (o *DnsRequestReportStatistics) HasTop() bool { + if o != nil && !IsNil(o.Top) { + return true + } + + return false +} + +// SetTop gets a reference to the given time.Time and assigns it to the Top field. +func (o *DnsRequestReportStatistics) SetTop(v time.Time) { + o.Top = &v +} + +func (o DnsRequestReportStatistics) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DnsRequestReportStatistics) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Total) { + toSerialize["total"] = o.Total + } + if !IsNil(o.Top) { + toSerialize["top"] = o.Top + } + return toSerialize, nil +} + +type NullableDnsRequestReportStatistics struct { + value *DnsRequestReportStatistics + isSet bool +} + +func (v NullableDnsRequestReportStatistics) Get() *DnsRequestReportStatistics { + return v.value +} + +func (v *NullableDnsRequestReportStatistics) Set(val *DnsRequestReportStatistics) { + v.value = val + v.isSet = true +} + +func (v NullableDnsRequestReportStatistics) IsSet() bool { + return v.isSet +} + +func (v *NullableDnsRequestReportStatistics) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDnsRequestReportStatistics(val *DnsRequestReportStatistics) *NullableDnsRequestReportStatistics { + return &NullableDnsRequestReportStatistics{value: val, isSet: true} +} + +func (v NullableDnsRequestReportStatistics) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDnsRequestReportStatistics) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_dns_sec.go b/model_dns_sec.go new file mode 100644 index 0000000..4cda104 --- /dev/null +++ b/model_dns_sec.go @@ -0,0 +1,176 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the DnsSec type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DnsSec{} + +// DnsSec struct for DnsSec +type DnsSec struct { + Enabled *bool `json:"enabled,omitempty"` + Ds NullableString `json:"ds,omitempty"` +} + +// NewDnsSec instantiates a new DnsSec object +// This constructor will assign default values to properties that have it defined, +// 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 NewDnsSec() *DnsSec { + this := DnsSec{} + var enabled bool = false + this.Enabled = &enabled + return &this +} + +// NewDnsSecWithDefaults instantiates a new DnsSec object +// This 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 NewDnsSecWithDefaults() *DnsSec { + this := DnsSec{} + var enabled bool = false + this.Enabled = &enabled + return &this +} + +// GetEnabled returns the Enabled field value if set, zero value otherwise. +func (o *DnsSec) 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 *DnsSec) 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 *DnsSec) 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 *DnsSec) SetEnabled(v bool) { + o.Enabled = &v +} + +// GetDs returns the Ds field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DnsSec) GetDs() string { + if o == nil || IsNil(o.Ds.Get()) { + var ret string + return ret + } + return *o.Ds.Get() +} + +// GetDsOk returns a tuple with the Ds 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 *DnsSec) GetDsOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Ds.Get(), o.Ds.IsSet() +} + +// HasDs returns a boolean if a field has been set. +func (o *DnsSec) HasDs() bool { + if o != nil && o.Ds.IsSet() { + return true + } + + return false +} + +// SetDs gets a reference to the given NullableString and assigns it to the Ds field. +func (o *DnsSec) SetDs(v string) { + o.Ds.Set(&v) +} +// SetDsNil sets the value for Ds to be an explicit nil +func (o *DnsSec) SetDsNil() { + o.Ds.Set(nil) +} + +// UnsetDs ensures that no value is present for Ds, not even an explicit nil +func (o *DnsSec) UnsetDs() { + o.Ds.Unset() +} + +func (o DnsSec) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DnsSec) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Enabled) { + toSerialize["enabled"] = o.Enabled + } + if o.Ds.IsSet() { + toSerialize["ds"] = o.Ds.Get() + } + return toSerialize, nil +} + +type NullableDnsSec struct { + value *DnsSec + isSet bool +} + +func (v NullableDnsSec) Get() *DnsSec { + return v.value +} + +func (v *NullableDnsSec) Set(val *DnsSec) { + v.value = val + v.isSet = true +} + +func (v NullableDnsSec) IsSet() bool { + return v.isSet +} + +func (v *NullableDnsSec) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDnsSec(val *DnsSec) *NullableDnsSec { + return &NullableDnsSec{value: val, isSet: true} +} + +func (v NullableDnsSec) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDnsSec) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_dns_sec_data.go b/model_dns_sec_data.go new file mode 100644 index 0000000..5836fd3 --- /dev/null +++ b/model_dns_sec_data.go @@ -0,0 +1,126 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the DnsSecData type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DnsSecData{} + +// DnsSecData struct for DnsSecData +type DnsSecData struct { + Data *DnsSec `json:"data,omitempty"` +} + +// NewDnsSecData instantiates a new DnsSecData object +// This constructor will assign default values to properties that have it defined, +// 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 NewDnsSecData() *DnsSecData { + this := DnsSecData{} + return &this +} + +// NewDnsSecDataWithDefaults instantiates a new DnsSecData object +// This 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 NewDnsSecDataWithDefaults() *DnsSecData { + this := DnsSecData{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *DnsSecData) GetData() DnsSec { + if o == nil || IsNil(o.Data) { + var ret DnsSec + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DnsSecData) GetDataOk() (*DnsSec, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *DnsSecData) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given DnsSec and assigns it to the Data field. +func (o *DnsSecData) SetData(v DnsSec) { + o.Data = &v +} + +func (o DnsSecData) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DnsSecData) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + return toSerialize, nil +} + +type NullableDnsSecData struct { + value *DnsSecData + isSet bool +} + +func (v NullableDnsSecData) Get() *DnsSecData { + return v.value +} + +func (v *NullableDnsSecData) Set(val *DnsSecData) { + v.value = val + v.isSet = true +} + +func (v NullableDnsSecData) IsSet() bool { + return v.isSet +} + +func (v *NullableDnsSecData) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDnsSecData(val *DnsSecData) *NullableDnsSecData { + return &NullableDnsSecData{value: val, isSet: true} +} + +func (v NullableDnsSecData) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDnsSecData) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_dns_sec_status.go b/model_dns_sec_status.go new file mode 100644 index 0000000..9293801 --- /dev/null +++ b/model_dns_sec_status.go @@ -0,0 +1,117 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the DnsSecStatus type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DnsSecStatus{} + +// DnsSecStatus struct for DnsSecStatus +type DnsSecStatus struct { + Enable bool `json:"enable"` +} + +// NewDnsSecStatus instantiates a new DnsSecStatus object +// This constructor will assign default values to properties that have it defined, +// 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 NewDnsSecStatus(enable bool) *DnsSecStatus { + this := DnsSecStatus{} + this.Enable = enable + return &this +} + +// NewDnsSecStatusWithDefaults instantiates a new DnsSecStatus object +// This 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 NewDnsSecStatusWithDefaults() *DnsSecStatus { + this := DnsSecStatus{} + return &this +} + +// GetEnable returns the Enable field value +func (o *DnsSecStatus) GetEnable() bool { + if o == nil { + var ret bool + return ret + } + + return o.Enable +} + +// GetEnableOk returns a tuple with the Enable field value +// and a boolean to check if the value has been set. +func (o *DnsSecStatus) GetEnableOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Enable, true +} + +// SetEnable sets field value +func (o *DnsSecStatus) SetEnable(v bool) { + o.Enable = v +} + +func (o DnsSecStatus) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DnsSecStatus) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["enable"] = o.Enable + return toSerialize, nil +} + +type NullableDnsSecStatus struct { + value *DnsSecStatus + isSet bool +} + +func (v NullableDnsSecStatus) Get() *DnsSecStatus { + return v.value +} + +func (v *NullableDnsSecStatus) Set(val *DnsSecStatus) { + v.value = val + v.isSet = true +} + +func (v NullableDnsSecStatus) IsSet() bool { + return v.isSet +} + +func (v *NullableDnsSecStatus) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDnsSecStatus(val *DnsSecStatus) *NullableDnsSecStatus { + return &NullableDnsSecStatus{value: val, isSet: true} +} + +func (v NullableDnsSecStatus) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDnsSecStatus) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_domain.go b/model_domain.go new file mode 100644 index 0000000..511bec9 --- /dev/null +++ b/model_domain.go @@ -0,0 +1,696 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" + "time" +) + +// checks if the Domain type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Domain{} + +// Domain struct for Domain +type Domain struct { + Id *string `json:"id,omitempty"` + UserId *string `json:"user_id,omitempty"` + // Deprecated in favor of name attribute + // Deprecated + Domain *string `json:"domain,omitempty"` + Name *string `json:"name,omitempty"` + // - `0` - Traffic - `1` - Basic - `2` - Growth - `3` - Professional - `4` - Enterprise + PlanLevel *int32 `json:"plan_level,omitempty"` + // Desired NS values for the domain + NsKeys []string `json:"ns_keys,omitempty"` + // Current NS values for the domain + CurrentNs []string `json:"current_ns,omitempty"` + // Current record for CNAME Setup of the domain + TargetCname NullableString `json:"target_cname,omitempty"` + // Domain's custom record for CNAME Setup + CustomCname NullableString `json:"custom_cname,omitempty"` + // Partial domain is using CNAME Setup and full domain is using NS Setup + Type *string `json:"type,omitempty"` + Status *string `json:"status,omitempty"` + DnsCloud *bool `json:"dns_cloud,omitempty"` + Restriction []string `json:"restriction,omitempty"` + Transfer *DomainTransferData `json:"transfer,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty"` + UpdatedAt *time.Time `json:"updated_at,omitempty"` +} + +// NewDomain instantiates a new Domain object +// This constructor will assign default values to properties that have it defined, +// 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 NewDomain() *Domain { + this := Domain{} + var dnsCloud bool = false + this.DnsCloud = &dnsCloud + return &this +} + +// NewDomainWithDefaults instantiates a new Domain object +// This 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 NewDomainWithDefaults() *Domain { + this := Domain{} + var dnsCloud bool = false + this.DnsCloud = &dnsCloud + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *Domain) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Domain) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *Domain) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *Domain) SetId(v string) { + o.Id = &v +} + +// GetUserId returns the UserId field value if set, zero value otherwise. +func (o *Domain) GetUserId() string { + if o == nil || IsNil(o.UserId) { + var ret string + return ret + } + return *o.UserId +} + +// GetUserIdOk returns a tuple with the UserId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Domain) GetUserIdOk() (*string, bool) { + if o == nil || IsNil(o.UserId) { + return nil, false + } + return o.UserId, true +} + +// HasUserId returns a boolean if a field has been set. +func (o *Domain) HasUserId() bool { + if o != nil && !IsNil(o.UserId) { + return true + } + + return false +} + +// SetUserId gets a reference to the given string and assigns it to the UserId field. +func (o *Domain) SetUserId(v string) { + o.UserId = &v +} + +// GetDomain returns the Domain field value if set, zero value otherwise. +// Deprecated +func (o *Domain) GetDomain() string { + if o == nil || IsNil(o.Domain) { + var ret string + return ret + } + return *o.Domain +} + +// GetDomainOk returns a tuple with the Domain field value if set, nil otherwise +// and a boolean to check if the value has been set. +// Deprecated +func (o *Domain) GetDomainOk() (*string, bool) { + if o == nil || IsNil(o.Domain) { + return nil, false + } + return o.Domain, true +} + +// HasDomain returns a boolean if a field has been set. +func (o *Domain) HasDomain() bool { + if o != nil && !IsNil(o.Domain) { + return true + } + + return false +} + +// SetDomain gets a reference to the given string and assigns it to the Domain field. +// Deprecated +func (o *Domain) SetDomain(v string) { + o.Domain = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *Domain) 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 *Domain) 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 *Domain) 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 *Domain) SetName(v string) { + o.Name = &v +} + +// GetPlanLevel returns the PlanLevel field value if set, zero value otherwise. +func (o *Domain) GetPlanLevel() int32 { + if o == nil || IsNil(o.PlanLevel) { + var ret int32 + return ret + } + return *o.PlanLevel +} + +// GetPlanLevelOk returns a tuple with the PlanLevel field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Domain) GetPlanLevelOk() (*int32, bool) { + if o == nil || IsNil(o.PlanLevel) { + return nil, false + } + return o.PlanLevel, true +} + +// HasPlanLevel returns a boolean if a field has been set. +func (o *Domain) HasPlanLevel() bool { + if o != nil && !IsNil(o.PlanLevel) { + return true + } + + return false +} + +// SetPlanLevel gets a reference to the given int32 and assigns it to the PlanLevel field. +func (o *Domain) SetPlanLevel(v int32) { + o.PlanLevel = &v +} + +// GetNsKeys returns the NsKeys field value if set, zero value otherwise. +func (o *Domain) GetNsKeys() []string { + if o == nil || IsNil(o.NsKeys) { + var ret []string + return ret + } + return o.NsKeys +} + +// GetNsKeysOk returns a tuple with the NsKeys field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Domain) GetNsKeysOk() ([]string, bool) { + if o == nil || IsNil(o.NsKeys) { + return nil, false + } + return o.NsKeys, true +} + +// HasNsKeys returns a boolean if a field has been set. +func (o *Domain) HasNsKeys() bool { + if o != nil && !IsNil(o.NsKeys) { + return true + } + + return false +} + +// SetNsKeys gets a reference to the given []string and assigns it to the NsKeys field. +func (o *Domain) SetNsKeys(v []string) { + o.NsKeys = v +} + +// GetCurrentNs returns the CurrentNs field value if set, zero value otherwise. +func (o *Domain) GetCurrentNs() []string { + if o == nil || IsNil(o.CurrentNs) { + var ret []string + return ret + } + return o.CurrentNs +} + +// GetCurrentNsOk returns a tuple with the CurrentNs field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Domain) GetCurrentNsOk() ([]string, bool) { + if o == nil || IsNil(o.CurrentNs) { + return nil, false + } + return o.CurrentNs, true +} + +// HasCurrentNs returns a boolean if a field has been set. +func (o *Domain) HasCurrentNs() bool { + if o != nil && !IsNil(o.CurrentNs) { + return true + } + + return false +} + +// SetCurrentNs gets a reference to the given []string and assigns it to the CurrentNs field. +func (o *Domain) SetCurrentNs(v []string) { + o.CurrentNs = v +} + +// GetTargetCname returns the TargetCname field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Domain) GetTargetCname() string { + if o == nil || IsNil(o.TargetCname.Get()) { + var ret string + return ret + } + return *o.TargetCname.Get() +} + +// GetTargetCnameOk returns a tuple with the TargetCname 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 *Domain) GetTargetCnameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.TargetCname.Get(), o.TargetCname.IsSet() +} + +// HasTargetCname returns a boolean if a field has been set. +func (o *Domain) HasTargetCname() bool { + if o != nil && o.TargetCname.IsSet() { + return true + } + + return false +} + +// SetTargetCname gets a reference to the given NullableString and assigns it to the TargetCname field. +func (o *Domain) SetTargetCname(v string) { + o.TargetCname.Set(&v) +} +// SetTargetCnameNil sets the value for TargetCname to be an explicit nil +func (o *Domain) SetTargetCnameNil() { + o.TargetCname.Set(nil) +} + +// UnsetTargetCname ensures that no value is present for TargetCname, not even an explicit nil +func (o *Domain) UnsetTargetCname() { + o.TargetCname.Unset() +} + +// GetCustomCname returns the CustomCname field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Domain) GetCustomCname() string { + if o == nil || IsNil(o.CustomCname.Get()) { + var ret string + return ret + } + return *o.CustomCname.Get() +} + +// GetCustomCnameOk returns a tuple with the CustomCname 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 *Domain) GetCustomCnameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CustomCname.Get(), o.CustomCname.IsSet() +} + +// HasCustomCname returns a boolean if a field has been set. +func (o *Domain) HasCustomCname() bool { + if o != nil && o.CustomCname.IsSet() { + return true + } + + return false +} + +// SetCustomCname gets a reference to the given NullableString and assigns it to the CustomCname field. +func (o *Domain) SetCustomCname(v string) { + o.CustomCname.Set(&v) +} +// SetCustomCnameNil sets the value for CustomCname to be an explicit nil +func (o *Domain) SetCustomCnameNil() { + o.CustomCname.Set(nil) +} + +// UnsetCustomCname ensures that no value is present for CustomCname, not even an explicit nil +func (o *Domain) UnsetCustomCname() { + o.CustomCname.Unset() +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *Domain) 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 *Domain) 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 *Domain) 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 *Domain) SetType(v string) { + o.Type = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *Domain) GetStatus() string { + if o == nil || IsNil(o.Status) { + var ret string + 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 *Domain) GetStatusOk() (*string, 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 *Domain) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *Domain) SetStatus(v string) { + o.Status = &v +} + +// GetDnsCloud returns the DnsCloud field value if set, zero value otherwise. +func (o *Domain) GetDnsCloud() bool { + if o == nil || IsNil(o.DnsCloud) { + var ret bool + return ret + } + return *o.DnsCloud +} + +// GetDnsCloudOk returns a tuple with the DnsCloud field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Domain) GetDnsCloudOk() (*bool, bool) { + if o == nil || IsNil(o.DnsCloud) { + return nil, false + } + return o.DnsCloud, true +} + +// HasDnsCloud returns a boolean if a field has been set. +func (o *Domain) HasDnsCloud() bool { + if o != nil && !IsNil(o.DnsCloud) { + return true + } + + return false +} + +// SetDnsCloud gets a reference to the given bool and assigns it to the DnsCloud field. +func (o *Domain) SetDnsCloud(v bool) { + o.DnsCloud = &v +} + +// GetRestriction returns the Restriction field value if set, zero value otherwise. +func (o *Domain) GetRestriction() []string { + if o == nil || IsNil(o.Restriction) { + var ret []string + return ret + } + return o.Restriction +} + +// GetRestrictionOk returns a tuple with the Restriction field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Domain) GetRestrictionOk() ([]string, bool) { + if o == nil || IsNil(o.Restriction) { + return nil, false + } + return o.Restriction, true +} + +// HasRestriction returns a boolean if a field has been set. +func (o *Domain) HasRestriction() bool { + if o != nil && !IsNil(o.Restriction) { + return true + } + + return false +} + +// SetRestriction gets a reference to the given []string and assigns it to the Restriction field. +func (o *Domain) SetRestriction(v []string) { + o.Restriction = v +} + +// GetTransfer returns the Transfer field value if set, zero value otherwise. +func (o *Domain) GetTransfer() DomainTransferData { + if o == nil || IsNil(o.Transfer) { + var ret DomainTransferData + return ret + } + return *o.Transfer +} + +// GetTransferOk returns a tuple with the Transfer field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Domain) GetTransferOk() (*DomainTransferData, bool) { + if o == nil || IsNil(o.Transfer) { + return nil, false + } + return o.Transfer, true +} + +// HasTransfer returns a boolean if a field has been set. +func (o *Domain) HasTransfer() bool { + if o != nil && !IsNil(o.Transfer) { + return true + } + + return false +} + +// SetTransfer gets a reference to the given DomainTransferData and assigns it to the Transfer field. +func (o *Domain) SetTransfer(v DomainTransferData) { + o.Transfer = &v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *Domain) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Domain) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *Domain) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *Domain) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *Domain) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Domain) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *Domain) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *Domain) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +func (o Domain) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Domain) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: id is readOnly + if !IsNil(o.UserId) { + toSerialize["user_id"] = o.UserId + } + if !IsNil(o.Domain) { + toSerialize["domain"] = o.Domain + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.PlanLevel) { + toSerialize["plan_level"] = o.PlanLevel + } + if !IsNil(o.NsKeys) { + toSerialize["ns_keys"] = o.NsKeys + } + if !IsNil(o.CurrentNs) { + toSerialize["current_ns"] = o.CurrentNs + } + if o.TargetCname.IsSet() { + toSerialize["target_cname"] = o.TargetCname.Get() + } + if o.CustomCname.IsSet() { + toSerialize["custom_cname"] = o.CustomCname.Get() + } + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + if !IsNil(o.DnsCloud) { + toSerialize["dns_cloud"] = o.DnsCloud + } + if !IsNil(o.Restriction) { + toSerialize["restriction"] = o.Restriction + } + if !IsNil(o.Transfer) { + toSerialize["transfer"] = o.Transfer + } + // skip: created_at is readOnly + // skip: updated_at is readOnly + return toSerialize, nil +} + +type NullableDomain struct { + value *Domain + isSet bool +} + +func (v NullableDomain) Get() *Domain { + return v.value +} + +func (v *NullableDomain) Set(val *Domain) { + v.value = val + v.isSet = true +} + +func (v NullableDomain) IsSet() bool { + return v.isSet +} + +func (v *NullableDomain) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDomain(val *Domain) *NullableDomain { + return &NullableDomain{value: val, isSet: true} +} + +func (v NullableDomain) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDomain) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_domain_cdn_app.go b/model_domain_cdn_app.go new file mode 100644 index 0000000..dea34eb --- /dev/null +++ b/model_domain_cdn_app.go @@ -0,0 +1,333 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" + "time" +) + +// checks if the DomainCdnApp type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DomainCdnApp{} + +// DomainCdnApp struct for DomainCdnApp +type DomainCdnApp struct { + Id *string `json:"id,omitempty"` + DomainId *string `json:"domain_id,omitempty"` + ApplicationId *string `json:"application_id,omitempty"` + Active *bool `json:"active,omitempty"` + Options map[string]interface{} `json:"options,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty"` + UpdatedAt *time.Time `json:"updated_at,omitempty"` +} + +// NewDomainCdnApp instantiates a new DomainCdnApp object +// This constructor will assign default values to properties that have it defined, +// 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 NewDomainCdnApp() *DomainCdnApp { + this := DomainCdnApp{} + return &this +} + +// NewDomainCdnAppWithDefaults instantiates a new DomainCdnApp object +// This 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 NewDomainCdnAppWithDefaults() *DomainCdnApp { + this := DomainCdnApp{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *DomainCdnApp) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DomainCdnApp) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *DomainCdnApp) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *DomainCdnApp) SetId(v string) { + o.Id = &v +} + +// GetDomainId returns the DomainId field value if set, zero value otherwise. +func (o *DomainCdnApp) GetDomainId() string { + if o == nil || IsNil(o.DomainId) { + var ret string + return ret + } + return *o.DomainId +} + +// GetDomainIdOk returns a tuple with the DomainId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DomainCdnApp) GetDomainIdOk() (*string, bool) { + if o == nil || IsNil(o.DomainId) { + return nil, false + } + return o.DomainId, true +} + +// HasDomainId returns a boolean if a field has been set. +func (o *DomainCdnApp) HasDomainId() bool { + if o != nil && !IsNil(o.DomainId) { + return true + } + + return false +} + +// SetDomainId gets a reference to the given string and assigns it to the DomainId field. +func (o *DomainCdnApp) SetDomainId(v string) { + o.DomainId = &v +} + +// GetApplicationId returns the ApplicationId field value if set, zero value otherwise. +func (o *DomainCdnApp) GetApplicationId() string { + if o == nil || IsNil(o.ApplicationId) { + var ret string + return ret + } + return *o.ApplicationId +} + +// GetApplicationIdOk returns a tuple with the ApplicationId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DomainCdnApp) GetApplicationIdOk() (*string, bool) { + if o == nil || IsNil(o.ApplicationId) { + return nil, false + } + return o.ApplicationId, true +} + +// HasApplicationId returns a boolean if a field has been set. +func (o *DomainCdnApp) HasApplicationId() bool { + if o != nil && !IsNil(o.ApplicationId) { + return true + } + + return false +} + +// SetApplicationId gets a reference to the given string and assigns it to the ApplicationId field. +func (o *DomainCdnApp) SetApplicationId(v string) { + o.ApplicationId = &v +} + +// GetActive returns the Active field value if set, zero value otherwise. +func (o *DomainCdnApp) GetActive() bool { + if o == nil || IsNil(o.Active) { + var ret bool + return ret + } + return *o.Active +} + +// GetActiveOk returns a tuple with the Active field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DomainCdnApp) GetActiveOk() (*bool, bool) { + if o == nil || IsNil(o.Active) { + return nil, false + } + return o.Active, true +} + +// HasActive returns a boolean if a field has been set. +func (o *DomainCdnApp) HasActive() bool { + if o != nil && !IsNil(o.Active) { + return true + } + + return false +} + +// SetActive gets a reference to the given bool and assigns it to the Active field. +func (o *DomainCdnApp) SetActive(v bool) { + o.Active = &v +} + +// GetOptions returns the Options field value if set, zero value otherwise. +func (o *DomainCdnApp) GetOptions() map[string]interface{} { + if o == nil || IsNil(o.Options) { + var ret map[string]interface{} + return ret + } + return o.Options +} + +// GetOptionsOk returns a tuple with the Options field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DomainCdnApp) GetOptionsOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Options) { + return map[string]interface{}{}, false + } + return o.Options, true +} + +// HasOptions returns a boolean if a field has been set. +func (o *DomainCdnApp) HasOptions() bool { + if o != nil && !IsNil(o.Options) { + return true + } + + return false +} + +// SetOptions gets a reference to the given map[string]interface{} and assigns it to the Options field. +func (o *DomainCdnApp) SetOptions(v map[string]interface{}) { + o.Options = v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *DomainCdnApp) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DomainCdnApp) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *DomainCdnApp) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *DomainCdnApp) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *DomainCdnApp) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DomainCdnApp) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *DomainCdnApp) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *DomainCdnApp) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +func (o DomainCdnApp) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DomainCdnApp) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: id is readOnly + // skip: domain_id is readOnly + // skip: application_id is readOnly + if !IsNil(o.Active) { + toSerialize["active"] = o.Active + } + if !IsNil(o.Options) { + toSerialize["options"] = o.Options + } + // skip: created_at is readOnly + // skip: updated_at is readOnly + return toSerialize, nil +} + +type NullableDomainCdnApp struct { + value *DomainCdnApp + isSet bool +} + +func (v NullableDomainCdnApp) Get() *DomainCdnApp { + return v.value +} + +func (v *NullableDomainCdnApp) Set(val *DomainCdnApp) { + v.value = val + v.isSet = true +} + +func (v NullableDomainCdnApp) IsSet() bool { + return v.isSet +} + +func (v *NullableDomainCdnApp) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDomainCdnApp(val *DomainCdnApp) *NullableDomainCdnApp { + return &NullableDomainCdnApp{value: val, isSet: true} +} + +func (v NullableDomainCdnApp) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDomainCdnApp) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_domain_purge_tags.go b/model_domain_purge_tags.go new file mode 100644 index 0000000..2064d18 --- /dev/null +++ b/model_domain_purge_tags.go @@ -0,0 +1,235 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" + "time" +) + +// checks if the DomainPurgeTags type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DomainPurgeTags{} + +// DomainPurgeTags struct for DomainPurgeTags +type DomainPurgeTags struct { + DomainId *string `json:"domain_id,omitempty"` + Tags []string `json:"tags,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty"` + UpdatedAt *time.Time `json:"updated_at,omitempty"` +} + +// NewDomainPurgeTags instantiates a new DomainPurgeTags object +// This constructor will assign default values to properties that have it defined, +// 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 NewDomainPurgeTags() *DomainPurgeTags { + this := DomainPurgeTags{} + return &this +} + +// NewDomainPurgeTagsWithDefaults instantiates a new DomainPurgeTags object +// This 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 NewDomainPurgeTagsWithDefaults() *DomainPurgeTags { + this := DomainPurgeTags{} + return &this +} + +// GetDomainId returns the DomainId field value if set, zero value otherwise. +func (o *DomainPurgeTags) GetDomainId() string { + if o == nil || IsNil(o.DomainId) { + var ret string + return ret + } + return *o.DomainId +} + +// GetDomainIdOk returns a tuple with the DomainId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DomainPurgeTags) GetDomainIdOk() (*string, bool) { + if o == nil || IsNil(o.DomainId) { + return nil, false + } + return o.DomainId, true +} + +// HasDomainId returns a boolean if a field has been set. +func (o *DomainPurgeTags) HasDomainId() bool { + if o != nil && !IsNil(o.DomainId) { + return true + } + + return false +} + +// SetDomainId gets a reference to the given string and assigns it to the DomainId field. +func (o *DomainPurgeTags) SetDomainId(v string) { + o.DomainId = &v +} + +// GetTags returns the Tags field value if set, zero value otherwise. +func (o *DomainPurgeTags) 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 *DomainPurgeTags) 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 *DomainPurgeTags) 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 *DomainPurgeTags) SetTags(v []string) { + o.Tags = v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *DomainPurgeTags) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DomainPurgeTags) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *DomainPurgeTags) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *DomainPurgeTags) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *DomainPurgeTags) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DomainPurgeTags) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *DomainPurgeTags) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *DomainPurgeTags) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +func (o DomainPurgeTags) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DomainPurgeTags) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.DomainId) { + toSerialize["domain_id"] = o.DomainId + } + if !IsNil(o.Tags) { + toSerialize["tags"] = o.Tags + } + if !IsNil(o.CreatedAt) { + toSerialize["created_at"] = o.CreatedAt + } + if !IsNil(o.UpdatedAt) { + toSerialize["updated_at"] = o.UpdatedAt + } + return toSerialize, nil +} + +type NullableDomainPurgeTags struct { + value *DomainPurgeTags + isSet bool +} + +func (v NullableDomainPurgeTags) Get() *DomainPurgeTags { + return v.value +} + +func (v *NullableDomainPurgeTags) Set(val *DomainPurgeTags) { + v.value = val + v.isSet = true +} + +func (v NullableDomainPurgeTags) IsSet() bool { + return v.isSet +} + +func (v *NullableDomainPurgeTags) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDomainPurgeTags(val *DomainPurgeTags) *NullableDomainPurgeTags { + return &NullableDomainPurgeTags{value: val, isSet: true} +} + +func (v NullableDomainPurgeTags) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDomainPurgeTags) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_domain_response.go b/model_domain_response.go new file mode 100644 index 0000000..8c4b3ee --- /dev/null +++ b/model_domain_response.go @@ -0,0 +1,172 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the DomainResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DomainResponse{} + +// DomainResponse struct for DomainResponse +type DomainResponse struct { + Data *Domain `json:"data,omitempty"` + Message NullableString `json:"message,omitempty"` +} + +// NewDomainResponse instantiates a new DomainResponse object +// This constructor will assign default values to properties that have it defined, +// 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 NewDomainResponse() *DomainResponse { + this := DomainResponse{} + return &this +} + +// NewDomainResponseWithDefaults instantiates a new DomainResponse object +// This 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 NewDomainResponseWithDefaults() *DomainResponse { + this := DomainResponse{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *DomainResponse) GetData() Domain { + if o == nil || IsNil(o.Data) { + var ret Domain + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DomainResponse) GetDataOk() (*Domain, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *DomainResponse) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given Domain and assigns it to the Data field. +func (o *DomainResponse) SetData(v Domain) { + o.Data = &v +} + +// GetMessage returns the Message field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DomainResponse) GetMessage() string { + if o == nil || IsNil(o.Message.Get()) { + var ret string + return ret + } + return *o.Message.Get() +} + +// GetMessageOk returns a tuple with the Message 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 *DomainResponse) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Message.Get(), o.Message.IsSet() +} + +// HasMessage returns a boolean if a field has been set. +func (o *DomainResponse) HasMessage() bool { + if o != nil && o.Message.IsSet() { + return true + } + + return false +} + +// SetMessage gets a reference to the given NullableString and assigns it to the Message field. +func (o *DomainResponse) SetMessage(v string) { + o.Message.Set(&v) +} +// SetMessageNil sets the value for Message to be an explicit nil +func (o *DomainResponse) SetMessageNil() { + o.Message.Set(nil) +} + +// UnsetMessage ensures that no value is present for Message, not even an explicit nil +func (o *DomainResponse) UnsetMessage() { + o.Message.Unset() +} + +func (o DomainResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DomainResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + if o.Message.IsSet() { + toSerialize["message"] = o.Message.Get() + } + return toSerialize, nil +} + +type NullableDomainResponse struct { + value *DomainResponse + isSet bool +} + +func (v NullableDomainResponse) Get() *DomainResponse { + return v.value +} + +func (v *NullableDomainResponse) Set(val *DomainResponse) { + v.value = val + v.isSet = true +} + +func (v NullableDomainResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableDomainResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDomainResponse(val *DomainResponse) *NullableDomainResponse { + return &NullableDomainResponse{value: val, isSet: true} +} + +func (v NullableDomainResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDomainResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_domain_store.go b/model_domain_store.go new file mode 100644 index 0000000..e1d2094 --- /dev/null +++ b/model_domain_store.go @@ -0,0 +1,196 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the DomainStore type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DomainStore{} + +// DomainStore struct for DomainStore +type DomainStore struct { + // Name of the domain + Domain string `json:"domain"` + // If you want to register a subdomain, you can use cname setup by sending partial type + DomainType *string `json:"domain_type,omitempty"` + // - `0` - Traffic - `1` - Basic - `2` - Growth - `3` - Professional - `4` - Enterprise + PlanLevel *int32 `json:"plan_level,omitempty"` +} + +// NewDomainStore instantiates a new DomainStore object +// This constructor will assign default values to properties that have it defined, +// 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 NewDomainStore(domain string) *DomainStore { + this := DomainStore{} + this.Domain = domain + var domainType string = "full" + this.DomainType = &domainType + return &this +} + +// NewDomainStoreWithDefaults instantiates a new DomainStore object +// This 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 NewDomainStoreWithDefaults() *DomainStore { + this := DomainStore{} + var domainType string = "full" + this.DomainType = &domainType + return &this +} + +// GetDomain returns the Domain field value +func (o *DomainStore) GetDomain() string { + if o == nil { + var ret string + return ret + } + + return o.Domain +} + +// GetDomainOk returns a tuple with the Domain field value +// and a boolean to check if the value has been set. +func (o *DomainStore) GetDomainOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Domain, true +} + +// SetDomain sets field value +func (o *DomainStore) SetDomain(v string) { + o.Domain = v +} + +// GetDomainType returns the DomainType field value if set, zero value otherwise. +func (o *DomainStore) GetDomainType() string { + if o == nil || IsNil(o.DomainType) { + var ret string + return ret + } + return *o.DomainType +} + +// GetDomainTypeOk returns a tuple with the DomainType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DomainStore) GetDomainTypeOk() (*string, bool) { + if o == nil || IsNil(o.DomainType) { + return nil, false + } + return o.DomainType, true +} + +// HasDomainType returns a boolean if a field has been set. +func (o *DomainStore) HasDomainType() bool { + if o != nil && !IsNil(o.DomainType) { + return true + } + + return false +} + +// SetDomainType gets a reference to the given string and assigns it to the DomainType field. +func (o *DomainStore) SetDomainType(v string) { + o.DomainType = &v +} + +// GetPlanLevel returns the PlanLevel field value if set, zero value otherwise. +func (o *DomainStore) GetPlanLevel() int32 { + if o == nil || IsNil(o.PlanLevel) { + var ret int32 + return ret + } + return *o.PlanLevel +} + +// GetPlanLevelOk returns a tuple with the PlanLevel field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DomainStore) GetPlanLevelOk() (*int32, bool) { + if o == nil || IsNil(o.PlanLevel) { + return nil, false + } + return o.PlanLevel, true +} + +// HasPlanLevel returns a boolean if a field has been set. +func (o *DomainStore) HasPlanLevel() bool { + if o != nil && !IsNil(o.PlanLevel) { + return true + } + + return false +} + +// SetPlanLevel gets a reference to the given int32 and assigns it to the PlanLevel field. +func (o *DomainStore) SetPlanLevel(v int32) { + o.PlanLevel = &v +} + +func (o DomainStore) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DomainStore) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["domain"] = o.Domain + if !IsNil(o.DomainType) { + toSerialize["domain_type"] = o.DomainType + } + if !IsNil(o.PlanLevel) { + toSerialize["plan_level"] = o.PlanLevel + } + return toSerialize, nil +} + +type NullableDomainStore struct { + value *DomainStore + isSet bool +} + +func (v NullableDomainStore) Get() *DomainStore { + return v.value +} + +func (v *NullableDomainStore) Set(val *DomainStore) { + v.value = val + v.isSet = true +} + +func (v NullableDomainStore) IsSet() bool { + return v.isSet +} + +func (v *NullableDomainStore) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDomainStore(val *DomainStore) *NullableDomainStore { + return &NullableDomainStore{value: val, isSet: true} +} + +func (v NullableDomainStore) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDomainStore) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_domain_transfer_data.go b/model_domain_transfer_data.go new file mode 100644 index 0000000..00ef200 --- /dev/null +++ b/model_domain_transfer_data.go @@ -0,0 +1,343 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" + "time" +) + +// checks if the DomainTransferData type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DomainTransferData{} + +// DomainTransferData struct for DomainTransferData +type DomainTransferData struct { + Domain *string `json:"domain,omitempty"` + AccountId *string `json:"account_id,omitempty"` + AccountName *string `json:"account_name,omitempty"` + OwnerName *string `json:"owner_name,omitempty"` + OwnerId *string `json:"owner_id,omitempty"` + Time *time.Time `json:"time,omitempty"` + Incoming *bool `json:"incoming,omitempty"` +} + +// NewDomainTransferData instantiates a new DomainTransferData object +// This constructor will assign default values to properties that have it defined, +// 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 NewDomainTransferData() *DomainTransferData { + this := DomainTransferData{} + return &this +} + +// NewDomainTransferDataWithDefaults instantiates a new DomainTransferData object +// This 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 NewDomainTransferDataWithDefaults() *DomainTransferData { + this := DomainTransferData{} + return &this +} + +// GetDomain returns the Domain field value if set, zero value otherwise. +func (o *DomainTransferData) GetDomain() string { + if o == nil || IsNil(o.Domain) { + var ret string + return ret + } + return *o.Domain +} + +// GetDomainOk returns a tuple with the Domain field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DomainTransferData) GetDomainOk() (*string, bool) { + if o == nil || IsNil(o.Domain) { + return nil, false + } + return o.Domain, true +} + +// HasDomain returns a boolean if a field has been set. +func (o *DomainTransferData) HasDomain() bool { + if o != nil && !IsNil(o.Domain) { + return true + } + + return false +} + +// SetDomain gets a reference to the given string and assigns it to the Domain field. +func (o *DomainTransferData) SetDomain(v string) { + o.Domain = &v +} + +// GetAccountId returns the AccountId field value if set, zero value otherwise. +func (o *DomainTransferData) GetAccountId() string { + if o == nil || IsNil(o.AccountId) { + var ret string + return ret + } + return *o.AccountId +} + +// GetAccountIdOk returns a tuple with the AccountId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DomainTransferData) GetAccountIdOk() (*string, bool) { + if o == nil || IsNil(o.AccountId) { + return nil, false + } + return o.AccountId, true +} + +// HasAccountId returns a boolean if a field has been set. +func (o *DomainTransferData) HasAccountId() bool { + if o != nil && !IsNil(o.AccountId) { + return true + } + + return false +} + +// SetAccountId gets a reference to the given string and assigns it to the AccountId field. +func (o *DomainTransferData) SetAccountId(v string) { + o.AccountId = &v +} + +// GetAccountName returns the AccountName field value if set, zero value otherwise. +func (o *DomainTransferData) GetAccountName() string { + if o == nil || IsNil(o.AccountName) { + var ret string + return ret + } + return *o.AccountName +} + +// GetAccountNameOk returns a tuple with the AccountName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DomainTransferData) GetAccountNameOk() (*string, bool) { + if o == nil || IsNil(o.AccountName) { + return nil, false + } + return o.AccountName, true +} + +// HasAccountName returns a boolean if a field has been set. +func (o *DomainTransferData) HasAccountName() bool { + if o != nil && !IsNil(o.AccountName) { + return true + } + + return false +} + +// SetAccountName gets a reference to the given string and assigns it to the AccountName field. +func (o *DomainTransferData) SetAccountName(v string) { + o.AccountName = &v +} + +// GetOwnerName returns the OwnerName field value if set, zero value otherwise. +func (o *DomainTransferData) GetOwnerName() string { + if o == nil || IsNil(o.OwnerName) { + var ret string + return ret + } + return *o.OwnerName +} + +// GetOwnerNameOk returns a tuple with the OwnerName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DomainTransferData) GetOwnerNameOk() (*string, bool) { + if o == nil || IsNil(o.OwnerName) { + return nil, false + } + return o.OwnerName, true +} + +// HasOwnerName returns a boolean if a field has been set. +func (o *DomainTransferData) HasOwnerName() bool { + if o != nil && !IsNil(o.OwnerName) { + return true + } + + return false +} + +// SetOwnerName gets a reference to the given string and assigns it to the OwnerName field. +func (o *DomainTransferData) SetOwnerName(v string) { + o.OwnerName = &v +} + +// GetOwnerId returns the OwnerId field value if set, zero value otherwise. +func (o *DomainTransferData) GetOwnerId() string { + if o == nil || IsNil(o.OwnerId) { + var ret string + return ret + } + return *o.OwnerId +} + +// GetOwnerIdOk returns a tuple with the OwnerId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DomainTransferData) GetOwnerIdOk() (*string, bool) { + if o == nil || IsNil(o.OwnerId) { + return nil, false + } + return o.OwnerId, true +} + +// HasOwnerId returns a boolean if a field has been set. +func (o *DomainTransferData) HasOwnerId() bool { + if o != nil && !IsNil(o.OwnerId) { + return true + } + + return false +} + +// SetOwnerId gets a reference to the given string and assigns it to the OwnerId field. +func (o *DomainTransferData) SetOwnerId(v string) { + o.OwnerId = &v +} + +// GetTime returns the Time field value if set, zero value otherwise. +func (o *DomainTransferData) GetTime() time.Time { + if o == nil || IsNil(o.Time) { + var ret time.Time + return ret + } + return *o.Time +} + +// GetTimeOk returns a tuple with the Time field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DomainTransferData) GetTimeOk() (*time.Time, bool) { + if o == nil || IsNil(o.Time) { + return nil, false + } + return o.Time, true +} + +// HasTime returns a boolean if a field has been set. +func (o *DomainTransferData) HasTime() bool { + if o != nil && !IsNil(o.Time) { + return true + } + + return false +} + +// SetTime gets a reference to the given time.Time and assigns it to the Time field. +func (o *DomainTransferData) SetTime(v time.Time) { + o.Time = &v +} + +// GetIncoming returns the Incoming field value if set, zero value otherwise. +func (o *DomainTransferData) GetIncoming() bool { + if o == nil || IsNil(o.Incoming) { + var ret bool + return ret + } + return *o.Incoming +} + +// GetIncomingOk returns a tuple with the Incoming field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DomainTransferData) GetIncomingOk() (*bool, bool) { + if o == nil || IsNil(o.Incoming) { + return nil, false + } + return o.Incoming, true +} + +// HasIncoming returns a boolean if a field has been set. +func (o *DomainTransferData) HasIncoming() bool { + if o != nil && !IsNil(o.Incoming) { + return true + } + + return false +} + +// SetIncoming gets a reference to the given bool and assigns it to the Incoming field. +func (o *DomainTransferData) SetIncoming(v bool) { + o.Incoming = &v +} + +func (o DomainTransferData) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DomainTransferData) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Domain) { + toSerialize["domain"] = o.Domain + } + if !IsNil(o.AccountId) { + toSerialize["account_id"] = o.AccountId + } + if !IsNil(o.AccountName) { + toSerialize["account_name"] = o.AccountName + } + if !IsNil(o.OwnerName) { + toSerialize["owner_name"] = o.OwnerName + } + if !IsNil(o.OwnerId) { + toSerialize["owner_id"] = o.OwnerId + } + if !IsNil(o.Time) { + toSerialize["time"] = o.Time + } + if !IsNil(o.Incoming) { + toSerialize["incoming"] = o.Incoming + } + return toSerialize, nil +} + +type NullableDomainTransferData struct { + value *DomainTransferData + isSet bool +} + +func (v NullableDomainTransferData) Get() *DomainTransferData { + return v.value +} + +func (v *NullableDomainTransferData) Set(val *DomainTransferData) { + v.value = val + v.isSet = true +} + +func (v NullableDomainTransferData) IsSet() bool { + return v.isSet +} + +func (v *NullableDomainTransferData) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDomainTransferData(val *DomainTransferData) *NullableDomainTransferData { + return &NullableDomainTransferData{value: val, isSet: true} +} + +func (v NullableDomainTransferData) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDomainTransferData) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_domain_waf.go b/model_domain_waf.go new file mode 100644 index 0000000..6986fb2 --- /dev/null +++ b/model_domain_waf.go @@ -0,0 +1,105 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" + "fmt" +) + +// DomainWaf struct for DomainWaf +type DomainWaf struct { + DeprecatedWafSettings *DeprecatedWafSettings + Waf *Waf +} + +// Unmarshal JSON data into any of the pointers in the struct +func (dst *DomainWaf) UnmarshalJSON(data []byte) error { + var err error + // try to unmarshal JSON data into DeprecatedWafSettings + err = json.Unmarshal(data, &dst.DeprecatedWafSettings); + if err == nil { + jsonDeprecatedWafSettings, _ := json.Marshal(dst.DeprecatedWafSettings) + if string(jsonDeprecatedWafSettings) == "{}" { // empty struct + dst.DeprecatedWafSettings = nil + } else { + return nil // data stored in dst.DeprecatedWafSettings, return on the first match + } + } else { + dst.DeprecatedWafSettings = nil + } + + // try to unmarshal JSON data into Waf + err = json.Unmarshal(data, &dst.Waf); + if err == nil { + jsonWaf, _ := json.Marshal(dst.Waf) + if string(jsonWaf) == "{}" { // empty struct + dst.Waf = nil + } else { + return nil // data stored in dst.Waf, return on the first match + } + } else { + dst.Waf = nil + } + + return fmt.Errorf("data failed to match schemas in anyOf(DomainWaf)") +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src *DomainWaf) MarshalJSON() ([]byte, error) { + if src.DeprecatedWafSettings != nil { + return json.Marshal(&src.DeprecatedWafSettings) + } + + if src.Waf != nil { + return json.Marshal(&src.Waf) + } + + return nil, nil // no data in anyOf schemas +} + +type NullableDomainWaf struct { + value *DomainWaf + isSet bool +} + +func (v NullableDomainWaf) Get() *DomainWaf { + return v.value +} + +func (v *NullableDomainWaf) Set(val *DomainWaf) { + v.value = val + v.isSet = true +} + +func (v NullableDomainWaf) IsSet() bool { + return v.isSet +} + +func (v *NullableDomainWaf) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDomainWaf(val *DomainWaf) *NullableDomainWaf { + return &NullableDomainWaf{value: val, isSet: true} +} + +func (v NullableDomainWaf) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDomainWaf) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_domain_waf_data.go b/model_domain_waf_data.go new file mode 100644 index 0000000..fc46e65 --- /dev/null +++ b/model_domain_waf_data.go @@ -0,0 +1,126 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the DomainWafData type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DomainWafData{} + +// DomainWafData struct for DomainWafData +type DomainWafData struct { + Data *DomainWaf `json:"data,omitempty"` +} + +// NewDomainWafData instantiates a new DomainWafData object +// This constructor will assign default values to properties that have it defined, +// 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 NewDomainWafData() *DomainWafData { + this := DomainWafData{} + return &this +} + +// NewDomainWafDataWithDefaults instantiates a new DomainWafData object +// This 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 NewDomainWafDataWithDefaults() *DomainWafData { + this := DomainWafData{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *DomainWafData) GetData() DomainWaf { + if o == nil || IsNil(o.Data) { + var ret DomainWaf + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DomainWafData) GetDataOk() (*DomainWaf, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *DomainWafData) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given DomainWaf and assigns it to the Data field. +func (o *DomainWafData) SetData(v DomainWaf) { + o.Data = &v +} + +func (o DomainWafData) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DomainWafData) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + return toSerialize, nil +} + +type NullableDomainWafData struct { + value *DomainWafData + isSet bool +} + +func (v NullableDomainWafData) Get() *DomainWafData { + return v.value +} + +func (v *NullableDomainWafData) Set(val *DomainWafData) { + v.value = val + v.isSet = true +} + +func (v NullableDomainWafData) IsSet() bool { + return v.isSet +} + +func (v *NullableDomainWafData) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDomainWafData(val *DomainWafData) *NullableDomainWafData { + return &NullableDomainWafData{value: val, isSet: true} +} + +func (v NullableDomainWafData) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDomainWafData) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_domain_waf_package.go b/model_domain_waf_package.go new file mode 100644 index 0000000..c739907 --- /dev/null +++ b/model_domain_waf_package.go @@ -0,0 +1,380 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the DomainWafPackage type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DomainWafPackage{} + +// DomainWafPackage struct for DomainWafPackage +type DomainWafPackage struct { + // parameters of the package + Params map[string]interface{} `json:"params,omitempty"` + IsEnabled *bool `json:"is_enabled,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Provider *WafPackageProvider `json:"provider,omitempty"` + // JSON-schema of parameters of the package + ParamsSchema map[string]interface{} `json:"params_schema,omitempty"` + // It will be filled by default disabled rules when it's not provided + DisabledRules []string `json:"disabled_rules,omitempty"` + // It will be filled by default disabled rulesets when it's not provided + DisabledRulesets []string `json:"disabled_rulesets,omitempty"` +} + +// NewDomainWafPackage instantiates a new DomainWafPackage object +// This constructor will assign default values to properties that have it defined, +// 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 NewDomainWafPackage() *DomainWafPackage { + this := DomainWafPackage{} + return &this +} + +// NewDomainWafPackageWithDefaults instantiates a new DomainWafPackage object +// This 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 NewDomainWafPackageWithDefaults() *DomainWafPackage { + this := DomainWafPackage{} + var isEnabled bool = true + this.IsEnabled = &isEnabled + return &this +} + +// GetParams returns the Params field value if set, zero value otherwise. +func (o *DomainWafPackage) 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 *DomainWafPackage) 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 *DomainWafPackage) 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 *DomainWafPackage) SetParams(v map[string]interface{}) { + o.Params = v +} + +// GetIsEnabled returns the IsEnabled field value if set, zero value otherwise. +func (o *DomainWafPackage) GetIsEnabled() bool { + if o == nil || IsNil(o.IsEnabled) { + var ret bool + return ret + } + return *o.IsEnabled +} + +// GetIsEnabledOk returns a tuple with the IsEnabled field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DomainWafPackage) GetIsEnabledOk() (*bool, bool) { + if o == nil || IsNil(o.IsEnabled) { + return nil, false + } + return o.IsEnabled, true +} + +// HasIsEnabled returns a boolean if a field has been set. +func (o *DomainWafPackage) HasIsEnabled() bool { + if o != nil && !IsNil(o.IsEnabled) { + return true + } + + return false +} + +// SetIsEnabled gets a reference to the given bool and assigns it to the IsEnabled field. +func (o *DomainWafPackage) SetIsEnabled(v bool) { + o.IsEnabled = &v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *DomainWafPackage) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DomainWafPackage) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *DomainWafPackage) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *DomainWafPackage) SetId(v string) { + o.Id = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *DomainWafPackage) 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 *DomainWafPackage) 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 *DomainWafPackage) 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 *DomainWafPackage) SetName(v string) { + o.Name = &v +} + +// GetProvider returns the Provider field value if set, zero value otherwise. +func (o *DomainWafPackage) GetProvider() WafPackageProvider { + if o == nil || IsNil(o.Provider) { + var ret WafPackageProvider + return ret + } + return *o.Provider +} + +// GetProviderOk returns a tuple with the Provider field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DomainWafPackage) GetProviderOk() (*WafPackageProvider, bool) { + if o == nil || IsNil(o.Provider) { + return nil, false + } + return o.Provider, true +} + +// HasProvider returns a boolean if a field has been set. +func (o *DomainWafPackage) HasProvider() bool { + if o != nil && !IsNil(o.Provider) { + return true + } + + return false +} + +// SetProvider gets a reference to the given WafPackageProvider and assigns it to the Provider field. +func (o *DomainWafPackage) SetProvider(v WafPackageProvider) { + o.Provider = &v +} + +// GetParamsSchema returns the ParamsSchema field value if set, zero value otherwise. +func (o *DomainWafPackage) GetParamsSchema() map[string]interface{} { + if o == nil || IsNil(o.ParamsSchema) { + var ret map[string]interface{} + return ret + } + return o.ParamsSchema +} + +// GetParamsSchemaOk returns a tuple with the ParamsSchema field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DomainWafPackage) GetParamsSchemaOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.ParamsSchema) { + return map[string]interface{}{}, false + } + return o.ParamsSchema, true +} + +// HasParamsSchema returns a boolean if a field has been set. +func (o *DomainWafPackage) HasParamsSchema() bool { + if o != nil && !IsNil(o.ParamsSchema) { + return true + } + + return false +} + +// SetParamsSchema gets a reference to the given map[string]interface{} and assigns it to the ParamsSchema field. +func (o *DomainWafPackage) SetParamsSchema(v map[string]interface{}) { + o.ParamsSchema = v +} + +// GetDisabledRules returns the DisabledRules field value if set, zero value otherwise. +func (o *DomainWafPackage) GetDisabledRules() []string { + if o == nil || IsNil(o.DisabledRules) { + var ret []string + return ret + } + return o.DisabledRules +} + +// GetDisabledRulesOk returns a tuple with the DisabledRules field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DomainWafPackage) GetDisabledRulesOk() ([]string, bool) { + if o == nil || IsNil(o.DisabledRules) { + return nil, false + } + return o.DisabledRules, true +} + +// HasDisabledRules returns a boolean if a field has been set. +func (o *DomainWafPackage) HasDisabledRules() bool { + if o != nil && !IsNil(o.DisabledRules) { + return true + } + + return false +} + +// SetDisabledRules gets a reference to the given []string and assigns it to the DisabledRules field. +func (o *DomainWafPackage) SetDisabledRules(v []string) { + o.DisabledRules = v +} + +// GetDisabledRulesets returns the DisabledRulesets field value if set, zero value otherwise. +func (o *DomainWafPackage) GetDisabledRulesets() []string { + if o == nil || IsNil(o.DisabledRulesets) { + var ret []string + return ret + } + return o.DisabledRulesets +} + +// GetDisabledRulesetsOk returns a tuple with the DisabledRulesets field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DomainWafPackage) GetDisabledRulesetsOk() ([]string, bool) { + if o == nil || IsNil(o.DisabledRulesets) { + return nil, false + } + return o.DisabledRulesets, true +} + +// HasDisabledRulesets returns a boolean if a field has been set. +func (o *DomainWafPackage) HasDisabledRulesets() bool { + if o != nil && !IsNil(o.DisabledRulesets) { + return true + } + + return false +} + +// SetDisabledRulesets gets a reference to the given []string and assigns it to the DisabledRulesets field. +func (o *DomainWafPackage) SetDisabledRulesets(v []string) { + o.DisabledRulesets = v +} + +func (o DomainWafPackage) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DomainWafPackage) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Params) { + toSerialize["params"] = o.Params + } + if !IsNil(o.IsEnabled) { + toSerialize["is_enabled"] = o.IsEnabled + } + // skip: id is readOnly + // skip: name is readOnly + if !IsNil(o.Provider) { + toSerialize["provider"] = o.Provider + } + if !IsNil(o.ParamsSchema) { + toSerialize["params_schema"] = o.ParamsSchema + } + if !IsNil(o.DisabledRules) { + toSerialize["disabled_rules"] = o.DisabledRules + } + if !IsNil(o.DisabledRulesets) { + toSerialize["disabled_rulesets"] = o.DisabledRulesets + } + return toSerialize, nil +} + +type NullableDomainWafPackage struct { + value *DomainWafPackage + isSet bool +} + +func (v NullableDomainWafPackage) Get() *DomainWafPackage { + return v.value +} + +func (v *NullableDomainWafPackage) Set(val *DomainWafPackage) { + v.value = val + v.isSet = true +} + +func (v NullableDomainWafPackage) IsSet() bool { + return v.isSet +} + +func (v *NullableDomainWafPackage) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDomainWafPackage(val *DomainWafPackage) *NullableDomainWafPackage { + return &NullableDomainWafPackage{value: val, isSet: true} +} + +func (v NullableDomainWafPackage) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDomainWafPackage) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_domain_waf_package_details.go b/model_domain_waf_package_details.go new file mode 100644 index 0000000..bed5c3e --- /dev/null +++ b/model_domain_waf_package_details.go @@ -0,0 +1,341 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the DomainWafPackageDetails type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DomainWafPackageDetails{} + +// DomainWafPackageDetails struct for DomainWafPackageDetails +type DomainWafPackageDetails struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Provider *WafPackageProvider `json:"provider,omitempty"` + // JSON-schema of parameters of the package + ParamsSchema map[string]interface{} `json:"params_schema,omitempty"` + // It will be filled by default disabled rules when it's not provided + DisabledRules []string `json:"disabled_rules,omitempty"` + // It will be filled by default disabled rulesets when it's not provided + DisabledRulesets []string `json:"disabled_rulesets,omitempty"` + Rulesets []WafRuleset `json:"rulesets,omitempty"` +} + +// NewDomainWafPackageDetails instantiates a new DomainWafPackageDetails object +// This constructor will assign default values to properties that have it defined, +// 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 NewDomainWafPackageDetails() *DomainWafPackageDetails { + this := DomainWafPackageDetails{} + return &this +} + +// NewDomainWafPackageDetailsWithDefaults instantiates a new DomainWafPackageDetails object +// This 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 NewDomainWafPackageDetailsWithDefaults() *DomainWafPackageDetails { + this := DomainWafPackageDetails{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *DomainWafPackageDetails) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DomainWafPackageDetails) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *DomainWafPackageDetails) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *DomainWafPackageDetails) SetId(v string) { + o.Id = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *DomainWafPackageDetails) 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 *DomainWafPackageDetails) 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 *DomainWafPackageDetails) 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 *DomainWafPackageDetails) SetName(v string) { + o.Name = &v +} + +// GetProvider returns the Provider field value if set, zero value otherwise. +func (o *DomainWafPackageDetails) GetProvider() WafPackageProvider { + if o == nil || IsNil(o.Provider) { + var ret WafPackageProvider + return ret + } + return *o.Provider +} + +// GetProviderOk returns a tuple with the Provider field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DomainWafPackageDetails) GetProviderOk() (*WafPackageProvider, bool) { + if o == nil || IsNil(o.Provider) { + return nil, false + } + return o.Provider, true +} + +// HasProvider returns a boolean if a field has been set. +func (o *DomainWafPackageDetails) HasProvider() bool { + if o != nil && !IsNil(o.Provider) { + return true + } + + return false +} + +// SetProvider gets a reference to the given WafPackageProvider and assigns it to the Provider field. +func (o *DomainWafPackageDetails) SetProvider(v WafPackageProvider) { + o.Provider = &v +} + +// GetParamsSchema returns the ParamsSchema field value if set, zero value otherwise. +func (o *DomainWafPackageDetails) GetParamsSchema() map[string]interface{} { + if o == nil || IsNil(o.ParamsSchema) { + var ret map[string]interface{} + return ret + } + return o.ParamsSchema +} + +// GetParamsSchemaOk returns a tuple with the ParamsSchema field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DomainWafPackageDetails) GetParamsSchemaOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.ParamsSchema) { + return map[string]interface{}{}, false + } + return o.ParamsSchema, true +} + +// HasParamsSchema returns a boolean if a field has been set. +func (o *DomainWafPackageDetails) HasParamsSchema() bool { + if o != nil && !IsNil(o.ParamsSchema) { + return true + } + + return false +} + +// SetParamsSchema gets a reference to the given map[string]interface{} and assigns it to the ParamsSchema field. +func (o *DomainWafPackageDetails) SetParamsSchema(v map[string]interface{}) { + o.ParamsSchema = v +} + +// GetDisabledRules returns the DisabledRules field value if set, zero value otherwise. +func (o *DomainWafPackageDetails) GetDisabledRules() []string { + if o == nil || IsNil(o.DisabledRules) { + var ret []string + return ret + } + return o.DisabledRules +} + +// GetDisabledRulesOk returns a tuple with the DisabledRules field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DomainWafPackageDetails) GetDisabledRulesOk() ([]string, bool) { + if o == nil || IsNil(o.DisabledRules) { + return nil, false + } + return o.DisabledRules, true +} + +// HasDisabledRules returns a boolean if a field has been set. +func (o *DomainWafPackageDetails) HasDisabledRules() bool { + if o != nil && !IsNil(o.DisabledRules) { + return true + } + + return false +} + +// SetDisabledRules gets a reference to the given []string and assigns it to the DisabledRules field. +func (o *DomainWafPackageDetails) SetDisabledRules(v []string) { + o.DisabledRules = v +} + +// GetDisabledRulesets returns the DisabledRulesets field value if set, zero value otherwise. +func (o *DomainWafPackageDetails) GetDisabledRulesets() []string { + if o == nil || IsNil(o.DisabledRulesets) { + var ret []string + return ret + } + return o.DisabledRulesets +} + +// GetDisabledRulesetsOk returns a tuple with the DisabledRulesets field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DomainWafPackageDetails) GetDisabledRulesetsOk() ([]string, bool) { + if o == nil || IsNil(o.DisabledRulesets) { + return nil, false + } + return o.DisabledRulesets, true +} + +// HasDisabledRulesets returns a boolean if a field has been set. +func (o *DomainWafPackageDetails) HasDisabledRulesets() bool { + if o != nil && !IsNil(o.DisabledRulesets) { + return true + } + + return false +} + +// SetDisabledRulesets gets a reference to the given []string and assigns it to the DisabledRulesets field. +func (o *DomainWafPackageDetails) SetDisabledRulesets(v []string) { + o.DisabledRulesets = v +} + +// GetRulesets returns the Rulesets field value if set, zero value otherwise. +func (o *DomainWafPackageDetails) GetRulesets() []WafRuleset { + if o == nil || IsNil(o.Rulesets) { + var ret []WafRuleset + return ret + } + return o.Rulesets +} + +// GetRulesetsOk returns a tuple with the Rulesets field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DomainWafPackageDetails) GetRulesetsOk() ([]WafRuleset, bool) { + if o == nil || IsNil(o.Rulesets) { + return nil, false + } + return o.Rulesets, true +} + +// HasRulesets returns a boolean if a field has been set. +func (o *DomainWafPackageDetails) HasRulesets() bool { + if o != nil && !IsNil(o.Rulesets) { + return true + } + + return false +} + +// SetRulesets gets a reference to the given []WafRuleset and assigns it to the Rulesets field. +func (o *DomainWafPackageDetails) SetRulesets(v []WafRuleset) { + o.Rulesets = v +} + +func (o DomainWafPackageDetails) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DomainWafPackageDetails) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: id is readOnly + // skip: name is readOnly + if !IsNil(o.Provider) { + toSerialize["provider"] = o.Provider + } + if !IsNil(o.ParamsSchema) { + toSerialize["params_schema"] = o.ParamsSchema + } + if !IsNil(o.DisabledRules) { + toSerialize["disabled_rules"] = o.DisabledRules + } + if !IsNil(o.DisabledRulesets) { + toSerialize["disabled_rulesets"] = o.DisabledRulesets + } + if !IsNil(o.Rulesets) { + toSerialize["rulesets"] = o.Rulesets + } + return toSerialize, nil +} + +type NullableDomainWafPackageDetails struct { + value *DomainWafPackageDetails + isSet bool +} + +func (v NullableDomainWafPackageDetails) Get() *DomainWafPackageDetails { + return v.value +} + +func (v *NullableDomainWafPackageDetails) Set(val *DomainWafPackageDetails) { + v.value = val + v.isSet = true +} + +func (v NullableDomainWafPackageDetails) IsSet() bool { + return v.isSet +} + +func (v *NullableDomainWafPackageDetails) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDomainWafPackageDetails(val *DomainWafPackageDetails) *NullableDomainWafPackageDetails { + return &NullableDomainWafPackageDetails{value: val, isSet: true} +} + +func (v NullableDomainWafPackageDetails) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDomainWafPackageDetails) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_domain_waf_package_details_data.go b/model_domain_waf_package_details_data.go new file mode 100644 index 0000000..71cb8f9 --- /dev/null +++ b/model_domain_waf_package_details_data.go @@ -0,0 +1,126 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the DomainWafPackageDetailsData type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DomainWafPackageDetailsData{} + +// DomainWafPackageDetailsData struct for DomainWafPackageDetailsData +type DomainWafPackageDetailsData struct { + Data *DomainWafPackageDetails `json:"data,omitempty"` +} + +// NewDomainWafPackageDetailsData instantiates a new DomainWafPackageDetailsData object +// This constructor will assign default values to properties that have it defined, +// 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 NewDomainWafPackageDetailsData() *DomainWafPackageDetailsData { + this := DomainWafPackageDetailsData{} + return &this +} + +// NewDomainWafPackageDetailsDataWithDefaults instantiates a new DomainWafPackageDetailsData object +// This 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 NewDomainWafPackageDetailsDataWithDefaults() *DomainWafPackageDetailsData { + this := DomainWafPackageDetailsData{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *DomainWafPackageDetailsData) GetData() DomainWafPackageDetails { + if o == nil || IsNil(o.Data) { + var ret DomainWafPackageDetails + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DomainWafPackageDetailsData) GetDataOk() (*DomainWafPackageDetails, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *DomainWafPackageDetailsData) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given DomainWafPackageDetails and assigns it to the Data field. +func (o *DomainWafPackageDetailsData) SetData(v DomainWafPackageDetails) { + o.Data = &v +} + +func (o DomainWafPackageDetailsData) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DomainWafPackageDetailsData) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + return toSerialize, nil +} + +type NullableDomainWafPackageDetailsData struct { + value *DomainWafPackageDetailsData + isSet bool +} + +func (v NullableDomainWafPackageDetailsData) Get() *DomainWafPackageDetailsData { + return v.value +} + +func (v *NullableDomainWafPackageDetailsData) Set(val *DomainWafPackageDetailsData) { + v.value = val + v.isSet = true +} + +func (v NullableDomainWafPackageDetailsData) IsSet() bool { + return v.isSet +} + +func (v *NullableDomainWafPackageDetailsData) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDomainWafPackageDetailsData(val *DomainWafPackageDetailsData) *NullableDomainWafPackageDetailsData { + return &NullableDomainWafPackageDetailsData{value: val, isSet: true} +} + +func (v NullableDomainWafPackageDetailsData) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDomainWafPackageDetailsData) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_domain_waf_package_store.go b/model_domain_waf_package_store.go new file mode 100644 index 0000000..a1239d6 --- /dev/null +++ b/model_domain_waf_package_store.go @@ -0,0 +1,117 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the DomainWafPackageStore type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DomainWafPackageStore{} + +// DomainWafPackageStore struct for DomainWafPackageStore +type DomainWafPackageStore struct { + Id string `json:"id"` +} + +// NewDomainWafPackageStore instantiates a new DomainWafPackageStore object +// This constructor will assign default values to properties that have it defined, +// 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 NewDomainWafPackageStore(id string) *DomainWafPackageStore { + this := DomainWafPackageStore{} + this.Id = id + return &this +} + +// NewDomainWafPackageStoreWithDefaults instantiates a new DomainWafPackageStore object +// This 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 NewDomainWafPackageStoreWithDefaults() *DomainWafPackageStore { + this := DomainWafPackageStore{} + return &this +} + +// GetId returns the Id field value +func (o *DomainWafPackageStore) 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 *DomainWafPackageStore) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *DomainWafPackageStore) SetId(v string) { + o.Id = v +} + +func (o DomainWafPackageStore) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DomainWafPackageStore) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + return toSerialize, nil +} + +type NullableDomainWafPackageStore struct { + value *DomainWafPackageStore + isSet bool +} + +func (v NullableDomainWafPackageStore) Get() *DomainWafPackageStore { + return v.value +} + +func (v *NullableDomainWafPackageStore) Set(val *DomainWafPackageStore) { + v.value = val + v.isSet = true +} + +func (v NullableDomainWafPackageStore) IsSet() bool { + return v.isSet +} + +func (v *NullableDomainWafPackageStore) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDomainWafPackageStore(val *DomainWafPackageStore) *NullableDomainWafPackageStore { + return &NullableDomainWafPackageStore{value: val, isSet: true} +} + +func (v NullableDomainWafPackageStore) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDomainWafPackageStore) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_domain_waf_packages_data.go b/model_domain_waf_packages_data.go new file mode 100644 index 0000000..cbe78c5 --- /dev/null +++ b/model_domain_waf_packages_data.go @@ -0,0 +1,126 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the DomainWafPackagesData type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DomainWafPackagesData{} + +// DomainWafPackagesData struct for DomainWafPackagesData +type DomainWafPackagesData struct { + Data []DomainWafPackage `json:"data,omitempty"` +} + +// NewDomainWafPackagesData instantiates a new DomainWafPackagesData object +// This constructor will assign default values to properties that have it defined, +// 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 NewDomainWafPackagesData() *DomainWafPackagesData { + this := DomainWafPackagesData{} + return &this +} + +// NewDomainWafPackagesDataWithDefaults instantiates a new DomainWafPackagesData object +// This 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 NewDomainWafPackagesDataWithDefaults() *DomainWafPackagesData { + this := DomainWafPackagesData{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *DomainWafPackagesData) GetData() []DomainWafPackage { + if o == nil || IsNil(o.Data) { + var ret []DomainWafPackage + return ret + } + return o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DomainWafPackagesData) GetDataOk() ([]DomainWafPackage, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *DomainWafPackagesData) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given []DomainWafPackage and assigns it to the Data field. +func (o *DomainWafPackagesData) SetData(v []DomainWafPackage) { + o.Data = v +} + +func (o DomainWafPackagesData) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DomainWafPackagesData) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + return toSerialize, nil +} + +type NullableDomainWafPackagesData struct { + value *DomainWafPackagesData + isSet bool +} + +func (v NullableDomainWafPackagesData) Get() *DomainWafPackagesData { + return v.value +} + +func (v *NullableDomainWafPackagesData) Set(val *DomainWafPackagesData) { + v.value = val + v.isSet = true +} + +func (v NullableDomainWafPackagesData) IsSet() bool { + return v.isSet +} + +func (v *NullableDomainWafPackagesData) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDomainWafPackagesData(val *DomainWafPackagesData) *NullableDomainWafPackagesData { + return &NullableDomainWafPackagesData{value: val, isSet: true} +} + +func (v NullableDomainWafPackagesData) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDomainWafPackagesData) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_domains_apps_store_200_response.go b/model_domains_apps_store_200_response.go new file mode 100644 index 0000000..e8ae69c --- /dev/null +++ b/model_domains_apps_store_200_response.go @@ -0,0 +1,172 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the DomainsAppsStore200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DomainsAppsStore200Response{} + +// DomainsAppsStore200Response struct for DomainsAppsStore200Response +type DomainsAppsStore200Response struct { + Data *DomainCdnApp `json:"data,omitempty"` + Message NullableString `json:"message,omitempty"` +} + +// NewDomainsAppsStore200Response instantiates a new DomainsAppsStore200Response object +// This constructor will assign default values to properties that have it defined, +// 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 NewDomainsAppsStore200Response() *DomainsAppsStore200Response { + this := DomainsAppsStore200Response{} + return &this +} + +// NewDomainsAppsStore200ResponseWithDefaults instantiates a new DomainsAppsStore200Response object +// This 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 NewDomainsAppsStore200ResponseWithDefaults() *DomainsAppsStore200Response { + this := DomainsAppsStore200Response{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *DomainsAppsStore200Response) GetData() DomainCdnApp { + if o == nil || IsNil(o.Data) { + var ret DomainCdnApp + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DomainsAppsStore200Response) GetDataOk() (*DomainCdnApp, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *DomainsAppsStore200Response) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given DomainCdnApp and assigns it to the Data field. +func (o *DomainsAppsStore200Response) SetData(v DomainCdnApp) { + o.Data = &v +} + +// GetMessage returns the Message field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DomainsAppsStore200Response) GetMessage() string { + if o == nil || IsNil(o.Message.Get()) { + var ret string + return ret + } + return *o.Message.Get() +} + +// GetMessageOk returns a tuple with the Message 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 *DomainsAppsStore200Response) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Message.Get(), o.Message.IsSet() +} + +// HasMessage returns a boolean if a field has been set. +func (o *DomainsAppsStore200Response) HasMessage() bool { + if o != nil && o.Message.IsSet() { + return true + } + + return false +} + +// SetMessage gets a reference to the given NullableString and assigns it to the Message field. +func (o *DomainsAppsStore200Response) SetMessage(v string) { + o.Message.Set(&v) +} +// SetMessageNil sets the value for Message to be an explicit nil +func (o *DomainsAppsStore200Response) SetMessageNil() { + o.Message.Set(nil) +} + +// UnsetMessage ensures that no value is present for Message, not even an explicit nil +func (o *DomainsAppsStore200Response) UnsetMessage() { + o.Message.Unset() +} + +func (o DomainsAppsStore200Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DomainsAppsStore200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + if o.Message.IsSet() { + toSerialize["message"] = o.Message.Get() + } + return toSerialize, nil +} + +type NullableDomainsAppsStore200Response struct { + value *DomainsAppsStore200Response + isSet bool +} + +func (v NullableDomainsAppsStore200Response) Get() *DomainsAppsStore200Response { + return v.value +} + +func (v *NullableDomainsAppsStore200Response) Set(val *DomainsAppsStore200Response) { + v.value = val + v.isSet = true +} + +func (v NullableDomainsAppsStore200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableDomainsAppsStore200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDomainsAppsStore200Response(val *DomainsAppsStore200Response) *NullableDomainsAppsStore200Response { + return &NullableDomainsAppsStore200Response{value: val, isSet: true} +} + +func (v NullableDomainsAppsStore200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDomainsAppsStore200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_domains_index_200_response.go b/model_domains_index_200_response.go new file mode 100644 index 0000000..0d48dd2 --- /dev/null +++ b/model_domains_index_200_response.go @@ -0,0 +1,198 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the DomainsIndex200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DomainsIndex200Response{} + +// DomainsIndex200Response struct for DomainsIndex200Response +type DomainsIndex200Response struct { + Data []Domain `json:"data,omitempty"` + Links *PaginatedResponseLinks `json:"links,omitempty"` + Meta *PaginatedResponseMeta `json:"meta,omitempty"` +} + +// NewDomainsIndex200Response instantiates a new DomainsIndex200Response object +// This constructor will assign default values to properties that have it defined, +// 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 NewDomainsIndex200Response() *DomainsIndex200Response { + this := DomainsIndex200Response{} + return &this +} + +// NewDomainsIndex200ResponseWithDefaults instantiates a new DomainsIndex200Response object +// This 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 NewDomainsIndex200ResponseWithDefaults() *DomainsIndex200Response { + this := DomainsIndex200Response{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *DomainsIndex200Response) GetData() []Domain { + if o == nil || IsNil(o.Data) { + var ret []Domain + return ret + } + return o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DomainsIndex200Response) GetDataOk() ([]Domain, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *DomainsIndex200Response) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given []Domain and assigns it to the Data field. +func (o *DomainsIndex200Response) SetData(v []Domain) { + o.Data = v +} + +// GetLinks returns the Links field value if set, zero value otherwise. +func (o *DomainsIndex200Response) GetLinks() PaginatedResponseLinks { + if o == nil || IsNil(o.Links) { + var ret PaginatedResponseLinks + return ret + } + return *o.Links +} + +// GetLinksOk returns a tuple with the Links field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DomainsIndex200Response) GetLinksOk() (*PaginatedResponseLinks, bool) { + if o == nil || IsNil(o.Links) { + return nil, false + } + return o.Links, true +} + +// HasLinks returns a boolean if a field has been set. +func (o *DomainsIndex200Response) HasLinks() bool { + if o != nil && !IsNil(o.Links) { + return true + } + + return false +} + +// SetLinks gets a reference to the given PaginatedResponseLinks and assigns it to the Links field. +func (o *DomainsIndex200Response) SetLinks(v PaginatedResponseLinks) { + o.Links = &v +} + +// GetMeta returns the Meta field value if set, zero value otherwise. +func (o *DomainsIndex200Response) GetMeta() PaginatedResponseMeta { + if o == nil || IsNil(o.Meta) { + var ret PaginatedResponseMeta + return ret + } + return *o.Meta +} + +// GetMetaOk returns a tuple with the Meta field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DomainsIndex200Response) GetMetaOk() (*PaginatedResponseMeta, bool) { + if o == nil || IsNil(o.Meta) { + return nil, false + } + return o.Meta, true +} + +// HasMeta returns a boolean if a field has been set. +func (o *DomainsIndex200Response) HasMeta() bool { + if o != nil && !IsNil(o.Meta) { + return true + } + + return false +} + +// SetMeta gets a reference to the given PaginatedResponseMeta and assigns it to the Meta field. +func (o *DomainsIndex200Response) SetMeta(v PaginatedResponseMeta) { + o.Meta = &v +} + +func (o DomainsIndex200Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DomainsIndex200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + if !IsNil(o.Links) { + toSerialize["links"] = o.Links + } + if !IsNil(o.Meta) { + toSerialize["meta"] = o.Meta + } + return toSerialize, nil +} + +type NullableDomainsIndex200Response struct { + value *DomainsIndex200Response + isSet bool +} + +func (v NullableDomainsIndex200Response) Get() *DomainsIndex200Response { + return v.value +} + +func (v *NullableDomainsIndex200Response) Set(val *DomainsIndex200Response) { + v.value = val + v.isSet = true +} + +func (v NullableDomainsIndex200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableDomainsIndex200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDomainsIndex200Response(val *DomainsIndex200Response) *NullableDomainsIndex200Response { + return &NullableDomainsIndex200Response{value: val, isSet: true} +} + +func (v NullableDomainsIndex200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDomainsIndex200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_domains_nameservers_check_200_response.go b/model_domains_nameservers_check_200_response.go new file mode 100644 index 0000000..4c4c0fe --- /dev/null +++ b/model_domains_nameservers_check_200_response.go @@ -0,0 +1,172 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the DomainsNameserversCheck200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DomainsNameserversCheck200Response{} + +// DomainsNameserversCheck200Response struct for DomainsNameserversCheck200Response +type DomainsNameserversCheck200Response struct { + Data *NsDomain `json:"data,omitempty"` + Message NullableString `json:"message,omitempty"` +} + +// NewDomainsNameserversCheck200Response instantiates a new DomainsNameserversCheck200Response object +// This constructor will assign default values to properties that have it defined, +// 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 NewDomainsNameserversCheck200Response() *DomainsNameserversCheck200Response { + this := DomainsNameserversCheck200Response{} + return &this +} + +// NewDomainsNameserversCheck200ResponseWithDefaults instantiates a new DomainsNameserversCheck200Response object +// This 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 NewDomainsNameserversCheck200ResponseWithDefaults() *DomainsNameserversCheck200Response { + this := DomainsNameserversCheck200Response{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *DomainsNameserversCheck200Response) GetData() NsDomain { + if o == nil || IsNil(o.Data) { + var ret NsDomain + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DomainsNameserversCheck200Response) GetDataOk() (*NsDomain, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *DomainsNameserversCheck200Response) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given NsDomain and assigns it to the Data field. +func (o *DomainsNameserversCheck200Response) SetData(v NsDomain) { + o.Data = &v +} + +// GetMessage returns the Message field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DomainsNameserversCheck200Response) GetMessage() string { + if o == nil || IsNil(o.Message.Get()) { + var ret string + return ret + } + return *o.Message.Get() +} + +// GetMessageOk returns a tuple with the Message 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 *DomainsNameserversCheck200Response) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Message.Get(), o.Message.IsSet() +} + +// HasMessage returns a boolean if a field has been set. +func (o *DomainsNameserversCheck200Response) HasMessage() bool { + if o != nil && o.Message.IsSet() { + return true + } + + return false +} + +// SetMessage gets a reference to the given NullableString and assigns it to the Message field. +func (o *DomainsNameserversCheck200Response) SetMessage(v string) { + o.Message.Set(&v) +} +// SetMessageNil sets the value for Message to be an explicit nil +func (o *DomainsNameserversCheck200Response) SetMessageNil() { + o.Message.Set(nil) +} + +// UnsetMessage ensures that no value is present for Message, not even an explicit nil +func (o *DomainsNameserversCheck200Response) UnsetMessage() { + o.Message.Unset() +} + +func (o DomainsNameserversCheck200Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DomainsNameserversCheck200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + if o.Message.IsSet() { + toSerialize["message"] = o.Message.Get() + } + return toSerialize, nil +} + +type NullableDomainsNameserversCheck200Response struct { + value *DomainsNameserversCheck200Response + isSet bool +} + +func (v NullableDomainsNameserversCheck200Response) Get() *DomainsNameserversCheck200Response { + return v.value +} + +func (v *NullableDomainsNameserversCheck200Response) Set(val *DomainsNameserversCheck200Response) { + v.value = val + v.isSet = true +} + +func (v NullableDomainsNameserversCheck200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableDomainsNameserversCheck200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDomainsNameserversCheck200Response(val *DomainsNameserversCheck200Response) *NullableDomainsNameserversCheck200Response { + return &NullableDomainsNameserversCheck200Response{value: val, isSet: true} +} + +func (v NullableDomainsNameserversCheck200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDomainsNameserversCheck200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_domains_nameservers_deprecated_check_200_response.go b/model_domains_nameservers_deprecated_check_200_response.go new file mode 100644 index 0000000..db31bbe --- /dev/null +++ b/model_domains_nameservers_deprecated_check_200_response.go @@ -0,0 +1,172 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the DomainsNameserversDeprecatedCheck200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DomainsNameserversDeprecatedCheck200Response{} + +// DomainsNameserversDeprecatedCheck200Response struct for DomainsNameserversDeprecatedCheck200Response +type DomainsNameserversDeprecatedCheck200Response struct { + Data *DeprecatedNs `json:"data,omitempty"` + Message NullableString `json:"message,omitempty"` +} + +// NewDomainsNameserversDeprecatedCheck200Response instantiates a new DomainsNameserversDeprecatedCheck200Response object +// This constructor will assign default values to properties that have it defined, +// 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 NewDomainsNameserversDeprecatedCheck200Response() *DomainsNameserversDeprecatedCheck200Response { + this := DomainsNameserversDeprecatedCheck200Response{} + return &this +} + +// NewDomainsNameserversDeprecatedCheck200ResponseWithDefaults instantiates a new DomainsNameserversDeprecatedCheck200Response object +// This 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 NewDomainsNameserversDeprecatedCheck200ResponseWithDefaults() *DomainsNameserversDeprecatedCheck200Response { + this := DomainsNameserversDeprecatedCheck200Response{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *DomainsNameserversDeprecatedCheck200Response) GetData() DeprecatedNs { + if o == nil || IsNil(o.Data) { + var ret DeprecatedNs + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DomainsNameserversDeprecatedCheck200Response) GetDataOk() (*DeprecatedNs, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *DomainsNameserversDeprecatedCheck200Response) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given DeprecatedNs and assigns it to the Data field. +func (o *DomainsNameserversDeprecatedCheck200Response) SetData(v DeprecatedNs) { + o.Data = &v +} + +// GetMessage returns the Message field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DomainsNameserversDeprecatedCheck200Response) GetMessage() string { + if o == nil || IsNil(o.Message.Get()) { + var ret string + return ret + } + return *o.Message.Get() +} + +// GetMessageOk returns a tuple with the Message 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 *DomainsNameserversDeprecatedCheck200Response) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Message.Get(), o.Message.IsSet() +} + +// HasMessage returns a boolean if a field has been set. +func (o *DomainsNameserversDeprecatedCheck200Response) HasMessage() bool { + if o != nil && o.Message.IsSet() { + return true + } + + return false +} + +// SetMessage gets a reference to the given NullableString and assigns it to the Message field. +func (o *DomainsNameserversDeprecatedCheck200Response) SetMessage(v string) { + o.Message.Set(&v) +} +// SetMessageNil sets the value for Message to be an explicit nil +func (o *DomainsNameserversDeprecatedCheck200Response) SetMessageNil() { + o.Message.Set(nil) +} + +// UnsetMessage ensures that no value is present for Message, not even an explicit nil +func (o *DomainsNameserversDeprecatedCheck200Response) UnsetMessage() { + o.Message.Unset() +} + +func (o DomainsNameserversDeprecatedCheck200Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DomainsNameserversDeprecatedCheck200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + if o.Message.IsSet() { + toSerialize["message"] = o.Message.Get() + } + return toSerialize, nil +} + +type NullableDomainsNameserversDeprecatedCheck200Response struct { + value *DomainsNameserversDeprecatedCheck200Response + isSet bool +} + +func (v NullableDomainsNameserversDeprecatedCheck200Response) Get() *DomainsNameserversDeprecatedCheck200Response { + return v.value +} + +func (v *NullableDomainsNameserversDeprecatedCheck200Response) Set(val *DomainsNameserversDeprecatedCheck200Response) { + v.value = val + v.isSet = true +} + +func (v NullableDomainsNameserversDeprecatedCheck200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableDomainsNameserversDeprecatedCheck200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDomainsNameserversDeprecatedCheck200Response(val *DomainsNameserversDeprecatedCheck200Response) *NullableDomainsNameserversDeprecatedCheck200Response { + return &NullableDomainsNameserversDeprecatedCheck200Response{value: val, isSet: true} +} + +func (v NullableDomainsNameserversDeprecatedCheck200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDomainsNameserversDeprecatedCheck200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_domains_plans_usages_200_response.go b/model_domains_plans_usages_200_response.go new file mode 100644 index 0000000..787c0c1 --- /dev/null +++ b/model_domains_plans_usages_200_response.go @@ -0,0 +1,172 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the DomainsPlansUsages200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DomainsPlansUsages200Response{} + +// DomainsPlansUsages200Response struct for DomainsPlansUsages200Response +type DomainsPlansUsages200Response struct { + Data *Usages `json:"data,omitempty"` + Message NullableString `json:"message,omitempty"` +} + +// NewDomainsPlansUsages200Response instantiates a new DomainsPlansUsages200Response object +// This constructor will assign default values to properties that have it defined, +// 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 NewDomainsPlansUsages200Response() *DomainsPlansUsages200Response { + this := DomainsPlansUsages200Response{} + return &this +} + +// NewDomainsPlansUsages200ResponseWithDefaults instantiates a new DomainsPlansUsages200Response object +// This 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 NewDomainsPlansUsages200ResponseWithDefaults() *DomainsPlansUsages200Response { + this := DomainsPlansUsages200Response{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *DomainsPlansUsages200Response) GetData() Usages { + if o == nil || IsNil(o.Data) { + var ret Usages + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DomainsPlansUsages200Response) GetDataOk() (*Usages, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *DomainsPlansUsages200Response) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given Usages and assigns it to the Data field. +func (o *DomainsPlansUsages200Response) SetData(v Usages) { + o.Data = &v +} + +// GetMessage returns the Message field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DomainsPlansUsages200Response) GetMessage() string { + if o == nil || IsNil(o.Message.Get()) { + var ret string + return ret + } + return *o.Message.Get() +} + +// GetMessageOk returns a tuple with the Message 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 *DomainsPlansUsages200Response) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Message.Get(), o.Message.IsSet() +} + +// HasMessage returns a boolean if a field has been set. +func (o *DomainsPlansUsages200Response) HasMessage() bool { + if o != nil && o.Message.IsSet() { + return true + } + + return false +} + +// SetMessage gets a reference to the given NullableString and assigns it to the Message field. +func (o *DomainsPlansUsages200Response) SetMessage(v string) { + o.Message.Set(&v) +} +// SetMessageNil sets the value for Message to be an explicit nil +func (o *DomainsPlansUsages200Response) SetMessageNil() { + o.Message.Set(nil) +} + +// UnsetMessage ensures that no value is present for Message, not even an explicit nil +func (o *DomainsPlansUsages200Response) UnsetMessage() { + o.Message.Unset() +} + +func (o DomainsPlansUsages200Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DomainsPlansUsages200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + if o.Message.IsSet() { + toSerialize["message"] = o.Message.Get() + } + return toSerialize, nil +} + +type NullableDomainsPlansUsages200Response struct { + value *DomainsPlansUsages200Response + isSet bool +} + +func (v NullableDomainsPlansUsages200Response) Get() *DomainsPlansUsages200Response { + return v.value +} + +func (v *NullableDomainsPlansUsages200Response) Set(val *DomainsPlansUsages200Response) { + v.value = val + v.isSet = true +} + +func (v NullableDomainsPlansUsages200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableDomainsPlansUsages200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDomainsPlansUsages200Response(val *DomainsPlansUsages200Response) *NullableDomainsPlansUsages200Response { + return &NullableDomainsPlansUsages200Response{value: val, isSet: true} +} + +func (v NullableDomainsPlansUsages200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDomainsPlansUsages200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_domains_plans_violations_200_response.go b/model_domains_plans_violations_200_response.go new file mode 100644 index 0000000..a0c6b04 --- /dev/null +++ b/model_domains_plans_violations_200_response.go @@ -0,0 +1,172 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the DomainsPlansViolations200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DomainsPlansViolations200Response{} + +// DomainsPlansViolations200Response struct for DomainsPlansViolations200Response +type DomainsPlansViolations200Response struct { + Data *Violations `json:"data,omitempty"` + Message NullableString `json:"message,omitempty"` +} + +// NewDomainsPlansViolations200Response instantiates a new DomainsPlansViolations200Response object +// This constructor will assign default values to properties that have it defined, +// 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 NewDomainsPlansViolations200Response() *DomainsPlansViolations200Response { + this := DomainsPlansViolations200Response{} + return &this +} + +// NewDomainsPlansViolations200ResponseWithDefaults instantiates a new DomainsPlansViolations200Response object +// This 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 NewDomainsPlansViolations200ResponseWithDefaults() *DomainsPlansViolations200Response { + this := DomainsPlansViolations200Response{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *DomainsPlansViolations200Response) GetData() Violations { + if o == nil || IsNil(o.Data) { + var ret Violations + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DomainsPlansViolations200Response) GetDataOk() (*Violations, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *DomainsPlansViolations200Response) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given Violations and assigns it to the Data field. +func (o *DomainsPlansViolations200Response) SetData(v Violations) { + o.Data = &v +} + +// GetMessage returns the Message field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DomainsPlansViolations200Response) GetMessage() string { + if o == nil || IsNil(o.Message.Get()) { + var ret string + return ret + } + return *o.Message.Get() +} + +// GetMessageOk returns a tuple with the Message 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 *DomainsPlansViolations200Response) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Message.Get(), o.Message.IsSet() +} + +// HasMessage returns a boolean if a field has been set. +func (o *DomainsPlansViolations200Response) HasMessage() bool { + if o != nil && o.Message.IsSet() { + return true + } + + return false +} + +// SetMessage gets a reference to the given NullableString and assigns it to the Message field. +func (o *DomainsPlansViolations200Response) SetMessage(v string) { + o.Message.Set(&v) +} +// SetMessageNil sets the value for Message to be an explicit nil +func (o *DomainsPlansViolations200Response) SetMessageNil() { + o.Message.Set(nil) +} + +// UnsetMessage ensures that no value is present for Message, not even an explicit nil +func (o *DomainsPlansViolations200Response) UnsetMessage() { + o.Message.Unset() +} + +func (o DomainsPlansViolations200Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DomainsPlansViolations200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + if o.Message.IsSet() { + toSerialize["message"] = o.Message.Get() + } + return toSerialize, nil +} + +type NullableDomainsPlansViolations200Response struct { + value *DomainsPlansViolations200Response + isSet bool +} + +func (v NullableDomainsPlansViolations200Response) Get() *DomainsPlansViolations200Response { + return v.value +} + +func (v *NullableDomainsPlansViolations200Response) Set(val *DomainsPlansViolations200Response) { + v.value = val + v.isSet = true +} + +func (v NullableDomainsPlansViolations200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableDomainsPlansViolations200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDomainsPlansViolations200Response(val *DomainsPlansViolations200Response) *NullableDomainsPlansViolations200Response { + return &NullableDomainsPlansViolations200Response{value: val, isSet: true} +} + +func (v NullableDomainsPlansViolations200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDomainsPlansViolations200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_domains_show_404_response.go b/model_domains_show_404_response.go new file mode 100644 index 0000000..10cf0b6 --- /dev/null +++ b/model_domains_show_404_response.go @@ -0,0 +1,164 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the DomainsShow404Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DomainsShow404Response{} + +// DomainsShow404Response struct for DomainsShow404Response +type DomainsShow404Response struct { + Status *bool `json:"status,omitempty"` + Message *string `json:"message,omitempty"` +} + +// NewDomainsShow404Response instantiates a new DomainsShow404Response object +// This constructor will assign default values to properties that have it defined, +// 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 NewDomainsShow404Response() *DomainsShow404Response { + this := DomainsShow404Response{} + return &this +} + +// NewDomainsShow404ResponseWithDefaults instantiates a new DomainsShow404Response object +// This 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 NewDomainsShow404ResponseWithDefaults() *DomainsShow404Response { + this := DomainsShow404Response{} + var status bool = false + this.Status = &status + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *DomainsShow404Response) GetStatus() bool { + if o == nil || IsNil(o.Status) { + var ret bool + 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 *DomainsShow404Response) GetStatusOk() (*bool, 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 *DomainsShow404Response) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given bool and assigns it to the Status field. +func (o *DomainsShow404Response) SetStatus(v bool) { + o.Status = &v +} + +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *DomainsShow404Response) GetMessage() string { + if o == nil || IsNil(o.Message) { + var ret string + return ret + } + return *o.Message +} + +// GetMessageOk returns a tuple with the Message field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DomainsShow404Response) GetMessageOk() (*string, bool) { + if o == nil || IsNil(o.Message) { + return nil, false + } + return o.Message, true +} + +// HasMessage returns a boolean if a field has been set. +func (o *DomainsShow404Response) HasMessage() bool { + if o != nil && !IsNil(o.Message) { + return true + } + + return false +} + +// SetMessage gets a reference to the given string and assigns it to the Message field. +func (o *DomainsShow404Response) SetMessage(v string) { + o.Message = &v +} + +func (o DomainsShow404Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DomainsShow404Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + if !IsNil(o.Message) { + toSerialize["message"] = o.Message + } + return toSerialize, nil +} + +type NullableDomainsShow404Response struct { + value *DomainsShow404Response + isSet bool +} + +func (v NullableDomainsShow404Response) Get() *DomainsShow404Response { + return v.value +} + +func (v *NullableDomainsShow404Response) Set(val *DomainsShow404Response) { + v.value = val + v.isSet = true +} + +func (v NullableDomainsShow404Response) IsSet() bool { + return v.isSet +} + +func (v *NullableDomainsShow404Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDomainsShow404Response(val *DomainsShow404Response) *NullableDomainsShow404Response { + return &NullableDomainsShow404Response{value: val, isSet: true} +} + +func (v NullableDomainsShow404Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDomainsShow404Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_domains_store_422_response.go b/model_domains_store_422_response.go new file mode 100644 index 0000000..916aee6 --- /dev/null +++ b/model_domains_store_422_response.go @@ -0,0 +1,204 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the DomainsStore422Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DomainsStore422Response{} + +// DomainsStore422Response struct for DomainsStore422Response +type DomainsStore422Response struct { + Status *bool `json:"status,omitempty"` + Message *string `json:"message,omitempty"` + // List of parameters and related errors + Errors map[string]interface{} `json:"errors,omitempty"` +} + +// NewDomainsStore422Response instantiates a new DomainsStore422Response object +// This constructor will assign default values to properties that have it defined, +// 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 NewDomainsStore422Response() *DomainsStore422Response { + this := DomainsStore422Response{} + var status bool = false + this.Status = &status + return &this +} + +// NewDomainsStore422ResponseWithDefaults instantiates a new DomainsStore422Response object +// This 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 NewDomainsStore422ResponseWithDefaults() *DomainsStore422Response { + this := DomainsStore422Response{} + var status bool = false + this.Status = &status + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *DomainsStore422Response) GetStatus() bool { + if o == nil || IsNil(o.Status) { + var ret bool + 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 *DomainsStore422Response) GetStatusOk() (*bool, 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 *DomainsStore422Response) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given bool and assigns it to the Status field. +func (o *DomainsStore422Response) SetStatus(v bool) { + o.Status = &v +} + +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *DomainsStore422Response) GetMessage() string { + if o == nil || IsNil(o.Message) { + var ret string + return ret + } + return *o.Message +} + +// GetMessageOk returns a tuple with the Message field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DomainsStore422Response) GetMessageOk() (*string, bool) { + if o == nil || IsNil(o.Message) { + return nil, false + } + return o.Message, true +} + +// HasMessage returns a boolean if a field has been set. +func (o *DomainsStore422Response) HasMessage() bool { + if o != nil && !IsNil(o.Message) { + return true + } + + return false +} + +// SetMessage gets a reference to the given string and assigns it to the Message field. +func (o *DomainsStore422Response) SetMessage(v string) { + o.Message = &v +} + +// GetErrors returns the Errors field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DomainsStore422Response) GetErrors() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + return o.Errors +} + +// GetErrorsOk returns a tuple with the Errors 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 *DomainsStore422Response) GetErrorsOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Errors) { + return map[string]interface{}{}, false + } + return o.Errors, true +} + +// HasErrors returns a boolean if a field has been set. +func (o *DomainsStore422Response) HasErrors() bool { + if o != nil && IsNil(o.Errors) { + return true + } + + return false +} + +// SetErrors gets a reference to the given map[string]interface{} and assigns it to the Errors field. +func (o *DomainsStore422Response) SetErrors(v map[string]interface{}) { + o.Errors = v +} + +func (o DomainsStore422Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DomainsStore422Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + if !IsNil(o.Message) { + toSerialize["message"] = o.Message + } + if o.Errors != nil { + toSerialize["errors"] = o.Errors + } + return toSerialize, nil +} + +type NullableDomainsStore422Response struct { + value *DomainsStore422Response + isSet bool +} + +func (v NullableDomainsStore422Response) Get() *DomainsStore422Response { + return v.value +} + +func (v *NullableDomainsStore422Response) Set(val *DomainsStore422Response) { + v.value = val + v.isSet = true +} + +func (v NullableDomainsStore422Response) IsSet() bool { + return v.isSet +} + +func (v *NullableDomainsStore422Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDomainsStore422Response(val *DomainsStore422Response) *NullableDomainsStore422Response { + return &NullableDomainsStore422Response{value: val, isSet: true} +} + +func (v NullableDomainsStore422Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDomainsStore422Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_domains_transfer_index_200_response.go b/model_domains_transfer_index_200_response.go new file mode 100644 index 0000000..6c8ca2f --- /dev/null +++ b/model_domains_transfer_index_200_response.go @@ -0,0 +1,198 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the DomainsTransferIndex200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DomainsTransferIndex200Response{} + +// DomainsTransferIndex200Response struct for DomainsTransferIndex200Response +type DomainsTransferIndex200Response struct { + Data []DomainTransferData `json:"data,omitempty"` + Links *PaginatedResponseLinks `json:"links,omitempty"` + Meta *PaginatedResponseMeta `json:"meta,omitempty"` +} + +// NewDomainsTransferIndex200Response instantiates a new DomainsTransferIndex200Response object +// This constructor will assign default values to properties that have it defined, +// 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 NewDomainsTransferIndex200Response() *DomainsTransferIndex200Response { + this := DomainsTransferIndex200Response{} + return &this +} + +// NewDomainsTransferIndex200ResponseWithDefaults instantiates a new DomainsTransferIndex200Response object +// This 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 NewDomainsTransferIndex200ResponseWithDefaults() *DomainsTransferIndex200Response { + this := DomainsTransferIndex200Response{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *DomainsTransferIndex200Response) GetData() []DomainTransferData { + if o == nil || IsNil(o.Data) { + var ret []DomainTransferData + return ret + } + return o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DomainsTransferIndex200Response) GetDataOk() ([]DomainTransferData, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *DomainsTransferIndex200Response) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given []DomainTransferData and assigns it to the Data field. +func (o *DomainsTransferIndex200Response) SetData(v []DomainTransferData) { + o.Data = v +} + +// GetLinks returns the Links field value if set, zero value otherwise. +func (o *DomainsTransferIndex200Response) GetLinks() PaginatedResponseLinks { + if o == nil || IsNil(o.Links) { + var ret PaginatedResponseLinks + return ret + } + return *o.Links +} + +// GetLinksOk returns a tuple with the Links field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DomainsTransferIndex200Response) GetLinksOk() (*PaginatedResponseLinks, bool) { + if o == nil || IsNil(o.Links) { + return nil, false + } + return o.Links, true +} + +// HasLinks returns a boolean if a field has been set. +func (o *DomainsTransferIndex200Response) HasLinks() bool { + if o != nil && !IsNil(o.Links) { + return true + } + + return false +} + +// SetLinks gets a reference to the given PaginatedResponseLinks and assigns it to the Links field. +func (o *DomainsTransferIndex200Response) SetLinks(v PaginatedResponseLinks) { + o.Links = &v +} + +// GetMeta returns the Meta field value if set, zero value otherwise. +func (o *DomainsTransferIndex200Response) GetMeta() PaginatedResponseMeta { + if o == nil || IsNil(o.Meta) { + var ret PaginatedResponseMeta + return ret + } + return *o.Meta +} + +// GetMetaOk returns a tuple with the Meta field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DomainsTransferIndex200Response) GetMetaOk() (*PaginatedResponseMeta, bool) { + if o == nil || IsNil(o.Meta) { + return nil, false + } + return o.Meta, true +} + +// HasMeta returns a boolean if a field has been set. +func (o *DomainsTransferIndex200Response) HasMeta() bool { + if o != nil && !IsNil(o.Meta) { + return true + } + + return false +} + +// SetMeta gets a reference to the given PaginatedResponseMeta and assigns it to the Meta field. +func (o *DomainsTransferIndex200Response) SetMeta(v PaginatedResponseMeta) { + o.Meta = &v +} + +func (o DomainsTransferIndex200Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DomainsTransferIndex200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + if !IsNil(o.Links) { + toSerialize["links"] = o.Links + } + if !IsNil(o.Meta) { + toSerialize["meta"] = o.Meta + } + return toSerialize, nil +} + +type NullableDomainsTransferIndex200Response struct { + value *DomainsTransferIndex200Response + isSet bool +} + +func (v NullableDomainsTransferIndex200Response) Get() *DomainsTransferIndex200Response { + return v.value +} + +func (v *NullableDomainsTransferIndex200Response) Set(val *DomainsTransferIndex200Response) { + v.value = val + v.isSet = true +} + +func (v NullableDomainsTransferIndex200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableDomainsTransferIndex200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDomainsTransferIndex200Response(val *DomainsTransferIndex200Response) *NullableDomainsTransferIndex200Response { + return &NullableDomainsTransferIndex200Response{value: val, isSet: true} +} + +func (v NullableDomainsTransferIndex200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDomainsTransferIndex200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_dynamic_field.go b/model_dynamic_field.go new file mode 100644 index 0000000..a46696f --- /dev/null +++ b/model_dynamic_field.go @@ -0,0 +1,388 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" + "time" +) + +// checks if the DynamicField type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DynamicField{} + +// DynamicField struct for DynamicField +type DynamicField struct { + Id *string `json:"id,omitempty"` + Name string `json:"name"` + Description NullableString `json:"description,omitempty"` + Namespace *string `json:"namespace,omitempty"` + Type string `json:"type"` + Scope *string `json:"scope,omitempty"` + Values []DynamicFieldValue `json:"values"` + CreatedAt *time.Time `json:"created_at,omitempty"` + UpdatedAt *time.Time `json:"updated_at,omitempty"` +} + +// NewDynamicField instantiates a new DynamicField object +// This constructor will assign default values to properties that have it defined, +// 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 NewDynamicField(name string, type_ string, values []DynamicFieldValue) *DynamicField { + this := DynamicField{} + this.Name = name + this.Type = type_ + this.Values = values + return &this +} + +// NewDynamicFieldWithDefaults instantiates a new DynamicField object +// This 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 NewDynamicFieldWithDefaults() *DynamicField { + this := DynamicField{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *DynamicField) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DynamicField) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *DynamicField) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *DynamicField) SetId(v string) { + o.Id = &v +} + +// GetName returns the Name field value +func (o *DynamicField) 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 *DynamicField) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *DynamicField) 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 *DynamicField) 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 *DynamicField) 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 *DynamicField) 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 *DynamicField) SetDescription(v string) { + o.Description.Set(&v) +} +// SetDescriptionNil sets the value for Description to be an explicit nil +func (o *DynamicField) SetDescriptionNil() { + o.Description.Set(nil) +} + +// UnsetDescription ensures that no value is present for Description, not even an explicit nil +func (o *DynamicField) UnsetDescription() { + o.Description.Unset() +} + +// GetNamespace returns the Namespace field value if set, zero value otherwise. +func (o *DynamicField) GetNamespace() string { + if o == nil || IsNil(o.Namespace) { + var ret string + return ret + } + return *o.Namespace +} + +// GetNamespaceOk returns a tuple with the Namespace field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DynamicField) GetNamespaceOk() (*string, bool) { + if o == nil || IsNil(o.Namespace) { + return nil, false + } + return o.Namespace, true +} + +// HasNamespace returns a boolean if a field has been set. +func (o *DynamicField) HasNamespace() bool { + if o != nil && !IsNil(o.Namespace) { + return true + } + + return false +} + +// SetNamespace gets a reference to the given string and assigns it to the Namespace field. +func (o *DynamicField) SetNamespace(v string) { + o.Namespace = &v +} + +// GetType returns the Type field value +func (o *DynamicField) 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 *DynamicField) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *DynamicField) SetType(v string) { + o.Type = v +} + +// GetScope returns the Scope field value if set, zero value otherwise. +func (o *DynamicField) GetScope() string { + if o == nil || IsNil(o.Scope) { + var ret string + return ret + } + return *o.Scope +} + +// GetScopeOk returns a tuple with the Scope field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DynamicField) GetScopeOk() (*string, bool) { + if o == nil || IsNil(o.Scope) { + return nil, false + } + return o.Scope, true +} + +// HasScope returns a boolean if a field has been set. +func (o *DynamicField) HasScope() bool { + if o != nil && !IsNil(o.Scope) { + return true + } + + return false +} + +// SetScope gets a reference to the given string and assigns it to the Scope field. +func (o *DynamicField) SetScope(v string) { + o.Scope = &v +} + +// GetValues returns the Values field value +func (o *DynamicField) GetValues() []DynamicFieldValue { + if o == nil { + var ret []DynamicFieldValue + return ret + } + + return o.Values +} + +// GetValuesOk returns a tuple with the Values field value +// and a boolean to check if the value has been set. +func (o *DynamicField) GetValuesOk() ([]DynamicFieldValue, bool) { + if o == nil { + return nil, false + } + return o.Values, true +} + +// SetValues sets field value +func (o *DynamicField) SetValues(v []DynamicFieldValue) { + o.Values = v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *DynamicField) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DynamicField) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *DynamicField) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *DynamicField) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *DynamicField) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DynamicField) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *DynamicField) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *DynamicField) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +func (o DynamicField) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DynamicField) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: id is readOnly + toSerialize["name"] = o.Name + if o.Description.IsSet() { + toSerialize["description"] = o.Description.Get() + } + // skip: namespace is readOnly + toSerialize["type"] = o.Type + // skip: scope is readOnly + toSerialize["values"] = o.Values + // skip: created_at is readOnly + // skip: updated_at is readOnly + return toSerialize, nil +} + +type NullableDynamicField struct { + value *DynamicField + isSet bool +} + +func (v NullableDynamicField) Get() *DynamicField { + return v.value +} + +func (v *NullableDynamicField) Set(val *DynamicField) { + v.value = val + v.isSet = true +} + +func (v NullableDynamicField) IsSet() bool { + return v.isSet +} + +func (v *NullableDynamicField) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDynamicField(val *DynamicField) *NullableDynamicField { + return &NullableDynamicField{value: val, isSet: true} +} + +func (v NullableDynamicField) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDynamicField) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_dynamic_field_data.go b/model_dynamic_field_data.go new file mode 100644 index 0000000..87eae98 --- /dev/null +++ b/model_dynamic_field_data.go @@ -0,0 +1,126 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the DynamicFieldData type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DynamicFieldData{} + +// DynamicFieldData struct for DynamicFieldData +type DynamicFieldData struct { + Data *DynamicField `json:"data,omitempty"` +} + +// NewDynamicFieldData instantiates a new DynamicFieldData object +// This constructor will assign default values to properties that have it defined, +// 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 NewDynamicFieldData() *DynamicFieldData { + this := DynamicFieldData{} + return &this +} + +// NewDynamicFieldDataWithDefaults instantiates a new DynamicFieldData object +// This 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 NewDynamicFieldDataWithDefaults() *DynamicFieldData { + this := DynamicFieldData{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *DynamicFieldData) GetData() DynamicField { + if o == nil || IsNil(o.Data) { + var ret DynamicField + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DynamicFieldData) GetDataOk() (*DynamicField, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *DynamicFieldData) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given DynamicField and assigns it to the Data field. +func (o *DynamicFieldData) SetData(v DynamicField) { + o.Data = &v +} + +func (o DynamicFieldData) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DynamicFieldData) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + return toSerialize, nil +} + +type NullableDynamicFieldData struct { + value *DynamicFieldData + isSet bool +} + +func (v NullableDynamicFieldData) Get() *DynamicFieldData { + return v.value +} + +func (v *NullableDynamicFieldData) Set(val *DynamicFieldData) { + v.value = val + v.isSet = true +} + +func (v NullableDynamicFieldData) IsSet() bool { + return v.isSet +} + +func (v *NullableDynamicFieldData) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDynamicFieldData(val *DynamicFieldData) *NullableDynamicFieldData { + return &NullableDynamicFieldData{value: val, isSet: true} +} + +func (v NullableDynamicFieldData) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDynamicFieldData) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_dynamic_field_response.go b/model_dynamic_field_response.go new file mode 100644 index 0000000..5aed737 --- /dev/null +++ b/model_dynamic_field_response.go @@ -0,0 +1,172 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the DynamicFieldResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DynamicFieldResponse{} + +// DynamicFieldResponse struct for DynamicFieldResponse +type DynamicFieldResponse struct { + Data *DynamicField `json:"data,omitempty"` + Message NullableString `json:"message,omitempty"` +} + +// NewDynamicFieldResponse instantiates a new DynamicFieldResponse object +// This constructor will assign default values to properties that have it defined, +// 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 NewDynamicFieldResponse() *DynamicFieldResponse { + this := DynamicFieldResponse{} + return &this +} + +// NewDynamicFieldResponseWithDefaults instantiates a new DynamicFieldResponse object +// This 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 NewDynamicFieldResponseWithDefaults() *DynamicFieldResponse { + this := DynamicFieldResponse{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *DynamicFieldResponse) GetData() DynamicField { + if o == nil || IsNil(o.Data) { + var ret DynamicField + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DynamicFieldResponse) GetDataOk() (*DynamicField, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *DynamicFieldResponse) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given DynamicField and assigns it to the Data field. +func (o *DynamicFieldResponse) SetData(v DynamicField) { + o.Data = &v +} + +// GetMessage returns the Message field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DynamicFieldResponse) GetMessage() string { + if o == nil || IsNil(o.Message.Get()) { + var ret string + return ret + } + return *o.Message.Get() +} + +// GetMessageOk returns a tuple with the Message 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 *DynamicFieldResponse) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Message.Get(), o.Message.IsSet() +} + +// HasMessage returns a boolean if a field has been set. +func (o *DynamicFieldResponse) HasMessage() bool { + if o != nil && o.Message.IsSet() { + return true + } + + return false +} + +// SetMessage gets a reference to the given NullableString and assigns it to the Message field. +func (o *DynamicFieldResponse) SetMessage(v string) { + o.Message.Set(&v) +} +// SetMessageNil sets the value for Message to be an explicit nil +func (o *DynamicFieldResponse) SetMessageNil() { + o.Message.Set(nil) +} + +// UnsetMessage ensures that no value is present for Message, not even an explicit nil +func (o *DynamicFieldResponse) UnsetMessage() { + o.Message.Unset() +} + +func (o DynamicFieldResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DynamicFieldResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + if o.Message.IsSet() { + toSerialize["message"] = o.Message.Get() + } + return toSerialize, nil +} + +type NullableDynamicFieldResponse struct { + value *DynamicFieldResponse + isSet bool +} + +func (v NullableDynamicFieldResponse) Get() *DynamicFieldResponse { + return v.value +} + +func (v *NullableDynamicFieldResponse) Set(val *DynamicFieldResponse) { + v.value = val + v.isSet = true +} + +func (v NullableDynamicFieldResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableDynamicFieldResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDynamicFieldResponse(val *DynamicFieldResponse) *NullableDynamicFieldResponse { + return &NullableDynamicFieldResponse{value: val, isSet: true} +} + +func (v NullableDynamicFieldResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDynamicFieldResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_dynamic_field_type.go b/model_dynamic_field_type.go new file mode 100644 index 0000000..5e9528a --- /dev/null +++ b/model_dynamic_field_type.go @@ -0,0 +1,148 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" + "fmt" +) + +// DynamicFieldType - struct for DynamicFieldType +type DynamicFieldType struct { + Float32 *float32 + String *string +} + +// float32AsDynamicFieldType is a convenience function that returns float32 wrapped in DynamicFieldType +func Float32AsDynamicFieldType(v *float32) DynamicFieldType { + return DynamicFieldType{ + Float32: v, + } +} + +// stringAsDynamicFieldType is a convenience function that returns string wrapped in DynamicFieldType +func StringAsDynamicFieldType(v *string) DynamicFieldType { + return DynamicFieldType{ + String: v, + } +} + + +// Unmarshal JSON data into one of the pointers in the struct +func (dst *DynamicFieldType) UnmarshalJSON(data []byte) error { + var err error + match := 0 + // try to unmarshal data into Float32 + err = newStrictDecoder(data).Decode(&dst.Float32) + if err == nil { + jsonFloat32, _ := json.Marshal(dst.Float32) + if string(jsonFloat32) == "{}" { // empty struct + dst.Float32 = nil + } else { + match++ + } + } else { + dst.Float32 = nil + } + + // try to unmarshal data into String + err = newStrictDecoder(data).Decode(&dst.String) + if err == nil { + jsonString, _ := json.Marshal(dst.String) + if string(jsonString) == "{}" { // empty struct + dst.String = nil + } else { + match++ + } + } else { + dst.String = nil + } + + if match > 1 { // more than 1 match + // reset to nil + dst.Float32 = nil + dst.String = nil + + return fmt.Errorf("data matches more than one schema in oneOf(DynamicFieldType)") + } else if match == 1 { + return nil // exactly one match + } else { // no match + return fmt.Errorf("data failed to match schemas in oneOf(DynamicFieldType)") + } +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src DynamicFieldType) MarshalJSON() ([]byte, error) { + if src.Float32 != nil { + return json.Marshal(&src.Float32) + } + + if src.String != nil { + return json.Marshal(&src.String) + } + + return nil, nil // no data in oneOf schemas +} + +// Get the actual instance +func (obj *DynamicFieldType) GetActualInstance() (interface{}) { + if obj == nil { + return nil + } + if obj.Float32 != nil { + return obj.Float32 + } + + if obj.String != nil { + return obj.String + } + + // all schemas are nil + return nil +} + +type NullableDynamicFieldType struct { + value *DynamicFieldType + isSet bool +} + +func (v NullableDynamicFieldType) Get() *DynamicFieldType { + return v.value +} + +func (v *NullableDynamicFieldType) Set(val *DynamicFieldType) { + v.value = val + v.isSet = true +} + +func (v NullableDynamicFieldType) IsSet() bool { + return v.isSet +} + +func (v *NullableDynamicFieldType) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDynamicFieldType(val *DynamicFieldType) *NullableDynamicFieldType { + return &NullableDynamicFieldType{value: val, isSet: true} +} + +func (v NullableDynamicFieldType) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDynamicFieldType) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_dynamic_field_value.go b/model_dynamic_field_value.go new file mode 100644 index 0000000..ae2512d --- /dev/null +++ b/model_dynamic_field_value.go @@ -0,0 +1,196 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the DynamicFieldValue type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DynamicFieldValue{} + +// DynamicFieldValue struct for DynamicFieldValue +type DynamicFieldValue struct { + Value *DynamicFieldType `json:"value,omitempty"` + Desc *string `json:"desc,omitempty"` + CreatedAt *string `json:"created_at,omitempty"` +} + +// NewDynamicFieldValue instantiates a new DynamicFieldValue object +// This constructor will assign default values to properties that have it defined, +// 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 NewDynamicFieldValue() *DynamicFieldValue { + this := DynamicFieldValue{} + return &this +} + +// NewDynamicFieldValueWithDefaults instantiates a new DynamicFieldValue object +// This 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 NewDynamicFieldValueWithDefaults() *DynamicFieldValue { + this := DynamicFieldValue{} + return &this +} + +// GetValue returns the Value field value if set, zero value otherwise. +func (o *DynamicFieldValue) GetValue() DynamicFieldType { + if o == nil || IsNil(o.Value) { + var ret DynamicFieldType + return ret + } + return *o.Value +} + +// GetValueOk returns a tuple with the Value field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DynamicFieldValue) GetValueOk() (*DynamicFieldType, bool) { + if o == nil || IsNil(o.Value) { + return nil, false + } + return o.Value, true +} + +// HasValue returns a boolean if a field has been set. +func (o *DynamicFieldValue) HasValue() bool { + if o != nil && !IsNil(o.Value) { + return true + } + + return false +} + +// SetValue gets a reference to the given DynamicFieldType and assigns it to the Value field. +func (o *DynamicFieldValue) SetValue(v DynamicFieldType) { + o.Value = &v +} + +// GetDesc returns the Desc field value if set, zero value otherwise. +func (o *DynamicFieldValue) GetDesc() string { + if o == nil || IsNil(o.Desc) { + var ret string + return ret + } + return *o.Desc +} + +// GetDescOk returns a tuple with the Desc field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DynamicFieldValue) GetDescOk() (*string, bool) { + if o == nil || IsNil(o.Desc) { + return nil, false + } + return o.Desc, true +} + +// HasDesc returns a boolean if a field has been set. +func (o *DynamicFieldValue) HasDesc() bool { + if o != nil && !IsNil(o.Desc) { + return true + } + + return false +} + +// SetDesc gets a reference to the given string and assigns it to the Desc field. +func (o *DynamicFieldValue) SetDesc(v string) { + o.Desc = &v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *DynamicFieldValue) GetCreatedAt() string { + if o == nil || IsNil(o.CreatedAt) { + var ret string + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DynamicFieldValue) GetCreatedAtOk() (*string, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *DynamicFieldValue) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given string and assigns it to the CreatedAt field. +func (o *DynamicFieldValue) SetCreatedAt(v string) { + o.CreatedAt = &v +} + +func (o DynamicFieldValue) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DynamicFieldValue) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Value) { + toSerialize["value"] = o.Value + } + if !IsNil(o.Desc) { + toSerialize["desc"] = o.Desc + } + // skip: created_at is readOnly + return toSerialize, nil +} + +type NullableDynamicFieldValue struct { + value *DynamicFieldValue + isSet bool +} + +func (v NullableDynamicFieldValue) Get() *DynamicFieldValue { + return v.value +} + +func (v *NullableDynamicFieldValue) Set(val *DynamicFieldValue) { + v.value = val + v.isSet = true +} + +func (v NullableDynamicFieldValue) IsSet() bool { + return v.isSet +} + +func (v *NullableDynamicFieldValue) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDynamicFieldValue(val *DynamicFieldValue) *NullableDynamicFieldValue { + return &NullableDynamicFieldValue{value: val, isSet: true} +} + +func (v NullableDynamicFieldValue) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDynamicFieldValue) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_email_forwarding_alias.go b/model_email_forwarding_alias.go new file mode 100644 index 0000000..bf58fb4 --- /dev/null +++ b/model_email_forwarding_alias.go @@ -0,0 +1,234 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the EmailForwardingAlias type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EmailForwardingAlias{} + +// EmailForwardingAlias struct for EmailForwardingAlias +type EmailForwardingAlias struct { + Id *string `json:"id,omitempty"` + LocalPart *string `json:"local_part,omitempty"` + Email *string `json:"email,omitempty"` + IsActive *bool `json:"is_active,omitempty"` +} + +// NewEmailForwardingAlias instantiates a new EmailForwardingAlias object +// This constructor will assign default values to properties that have it defined, +// 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 NewEmailForwardingAlias() *EmailForwardingAlias { + this := EmailForwardingAlias{} + return &this +} + +// NewEmailForwardingAliasWithDefaults instantiates a new EmailForwardingAlias object +// This 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 NewEmailForwardingAliasWithDefaults() *EmailForwardingAlias { + this := EmailForwardingAlias{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *EmailForwardingAlias) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EmailForwardingAlias) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *EmailForwardingAlias) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *EmailForwardingAlias) SetId(v string) { + o.Id = &v +} + +// GetLocalPart returns the LocalPart field value if set, zero value otherwise. +func (o *EmailForwardingAlias) GetLocalPart() string { + if o == nil || IsNil(o.LocalPart) { + var ret string + return ret + } + return *o.LocalPart +} + +// GetLocalPartOk returns a tuple with the LocalPart field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EmailForwardingAlias) GetLocalPartOk() (*string, bool) { + if o == nil || IsNil(o.LocalPart) { + return nil, false + } + return o.LocalPart, true +} + +// HasLocalPart returns a boolean if a field has been set. +func (o *EmailForwardingAlias) HasLocalPart() bool { + if o != nil && !IsNil(o.LocalPart) { + return true + } + + return false +} + +// SetLocalPart gets a reference to the given string and assigns it to the LocalPart field. +func (o *EmailForwardingAlias) SetLocalPart(v string) { + o.LocalPart = &v +} + +// GetEmail returns the Email field value if set, zero value otherwise. +func (o *EmailForwardingAlias) GetEmail() string { + if o == nil || IsNil(o.Email) { + var ret string + return ret + } + return *o.Email +} + +// GetEmailOk returns a tuple with the Email field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EmailForwardingAlias) GetEmailOk() (*string, bool) { + if o == nil || IsNil(o.Email) { + return nil, false + } + return o.Email, true +} + +// HasEmail returns a boolean if a field has been set. +func (o *EmailForwardingAlias) HasEmail() bool { + if o != nil && !IsNil(o.Email) { + return true + } + + return false +} + +// SetEmail gets a reference to the given string and assigns it to the Email field. +func (o *EmailForwardingAlias) SetEmail(v string) { + o.Email = &v +} + +// GetIsActive returns the IsActive field value if set, zero value otherwise. +func (o *EmailForwardingAlias) GetIsActive() bool { + if o == nil || IsNil(o.IsActive) { + var ret bool + return ret + } + return *o.IsActive +} + +// GetIsActiveOk returns a tuple with the IsActive field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EmailForwardingAlias) GetIsActiveOk() (*bool, bool) { + if o == nil || IsNil(o.IsActive) { + return nil, false + } + return o.IsActive, true +} + +// HasIsActive returns a boolean if a field has been set. +func (o *EmailForwardingAlias) HasIsActive() bool { + if o != nil && !IsNil(o.IsActive) { + return true + } + + return false +} + +// SetIsActive gets a reference to the given bool and assigns it to the IsActive field. +func (o *EmailForwardingAlias) SetIsActive(v bool) { + o.IsActive = &v +} + +func (o EmailForwardingAlias) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EmailForwardingAlias) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.LocalPart) { + toSerialize["local_part"] = o.LocalPart + } + if !IsNil(o.Email) { + toSerialize["email"] = o.Email + } + if !IsNil(o.IsActive) { + toSerialize["is_active"] = o.IsActive + } + return toSerialize, nil +} + +type NullableEmailForwardingAlias struct { + value *EmailForwardingAlias + isSet bool +} + +func (v NullableEmailForwardingAlias) Get() *EmailForwardingAlias { + return v.value +} + +func (v *NullableEmailForwardingAlias) Set(val *EmailForwardingAlias) { + v.value = val + v.isSet = true +} + +func (v NullableEmailForwardingAlias) IsSet() bool { + return v.isSet +} + +func (v *NullableEmailForwardingAlias) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEmailForwardingAlias(val *EmailForwardingAlias) *NullableEmailForwardingAlias { + return &NullableEmailForwardingAlias{value: val, isSet: true} +} + +func (v NullableEmailForwardingAlias) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEmailForwardingAlias) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_email_forwarding_aliases_list_data.go b/model_email_forwarding_aliases_list_data.go new file mode 100644 index 0000000..3dc1888 --- /dev/null +++ b/model_email_forwarding_aliases_list_data.go @@ -0,0 +1,126 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the EmailForwardingAliasesListData type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EmailForwardingAliasesListData{} + +// EmailForwardingAliasesListData struct for EmailForwardingAliasesListData +type EmailForwardingAliasesListData struct { + Data []EmailForwardingAliasesListInner `json:"data,omitempty"` +} + +// NewEmailForwardingAliasesListData instantiates a new EmailForwardingAliasesListData object +// This constructor will assign default values to properties that have it defined, +// 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 NewEmailForwardingAliasesListData() *EmailForwardingAliasesListData { + this := EmailForwardingAliasesListData{} + return &this +} + +// NewEmailForwardingAliasesListDataWithDefaults instantiates a new EmailForwardingAliasesListData object +// This 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 NewEmailForwardingAliasesListDataWithDefaults() *EmailForwardingAliasesListData { + this := EmailForwardingAliasesListData{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *EmailForwardingAliasesListData) GetData() []EmailForwardingAliasesListInner { + if o == nil || IsNil(o.Data) { + var ret []EmailForwardingAliasesListInner + return ret + } + return o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EmailForwardingAliasesListData) GetDataOk() ([]EmailForwardingAliasesListInner, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *EmailForwardingAliasesListData) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given []EmailForwardingAliasesListInner and assigns it to the Data field. +func (o *EmailForwardingAliasesListData) SetData(v []EmailForwardingAliasesListInner) { + o.Data = v +} + +func (o EmailForwardingAliasesListData) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EmailForwardingAliasesListData) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + return toSerialize, nil +} + +type NullableEmailForwardingAliasesListData struct { + value *EmailForwardingAliasesListData + isSet bool +} + +func (v NullableEmailForwardingAliasesListData) Get() *EmailForwardingAliasesListData { + return v.value +} + +func (v *NullableEmailForwardingAliasesListData) Set(val *EmailForwardingAliasesListData) { + v.value = val + v.isSet = true +} + +func (v NullableEmailForwardingAliasesListData) IsSet() bool { + return v.isSet +} + +func (v *NullableEmailForwardingAliasesListData) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEmailForwardingAliasesListData(val *EmailForwardingAliasesListData) *NullableEmailForwardingAliasesListData { + return &NullableEmailForwardingAliasesListData{value: val, isSet: true} +} + +func (v NullableEmailForwardingAliasesListData) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEmailForwardingAliasesListData) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_email_forwarding_aliases_list_inner.go b/model_email_forwarding_aliases_list_inner.go new file mode 100644 index 0000000..9b10e7e --- /dev/null +++ b/model_email_forwarding_aliases_list_inner.go @@ -0,0 +1,234 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the EmailForwardingAliasesListInner type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EmailForwardingAliasesListInner{} + +// EmailForwardingAliasesListInner struct for EmailForwardingAliasesListInner +type EmailForwardingAliasesListInner struct { + Id *string `json:"id,omitempty"` + LocalPart *string `json:"local_part,omitempty"` + Email *string `json:"email,omitempty"` + IsActive *bool `json:"is_active,omitempty"` +} + +// NewEmailForwardingAliasesListInner instantiates a new EmailForwardingAliasesListInner object +// This constructor will assign default values to properties that have it defined, +// 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 NewEmailForwardingAliasesListInner() *EmailForwardingAliasesListInner { + this := EmailForwardingAliasesListInner{} + return &this +} + +// NewEmailForwardingAliasesListInnerWithDefaults instantiates a new EmailForwardingAliasesListInner object +// This 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 NewEmailForwardingAliasesListInnerWithDefaults() *EmailForwardingAliasesListInner { + this := EmailForwardingAliasesListInner{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *EmailForwardingAliasesListInner) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EmailForwardingAliasesListInner) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *EmailForwardingAliasesListInner) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *EmailForwardingAliasesListInner) SetId(v string) { + o.Id = &v +} + +// GetLocalPart returns the LocalPart field value if set, zero value otherwise. +func (o *EmailForwardingAliasesListInner) GetLocalPart() string { + if o == nil || IsNil(o.LocalPart) { + var ret string + return ret + } + return *o.LocalPart +} + +// GetLocalPartOk returns a tuple with the LocalPart field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EmailForwardingAliasesListInner) GetLocalPartOk() (*string, bool) { + if o == nil || IsNil(o.LocalPart) { + return nil, false + } + return o.LocalPart, true +} + +// HasLocalPart returns a boolean if a field has been set. +func (o *EmailForwardingAliasesListInner) HasLocalPart() bool { + if o != nil && !IsNil(o.LocalPart) { + return true + } + + return false +} + +// SetLocalPart gets a reference to the given string and assigns it to the LocalPart field. +func (o *EmailForwardingAliasesListInner) SetLocalPart(v string) { + o.LocalPart = &v +} + +// GetEmail returns the Email field value if set, zero value otherwise. +func (o *EmailForwardingAliasesListInner) GetEmail() string { + if o == nil || IsNil(o.Email) { + var ret string + return ret + } + return *o.Email +} + +// GetEmailOk returns a tuple with the Email field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EmailForwardingAliasesListInner) GetEmailOk() (*string, bool) { + if o == nil || IsNil(o.Email) { + return nil, false + } + return o.Email, true +} + +// HasEmail returns a boolean if a field has been set. +func (o *EmailForwardingAliasesListInner) HasEmail() bool { + if o != nil && !IsNil(o.Email) { + return true + } + + return false +} + +// SetEmail gets a reference to the given string and assigns it to the Email field. +func (o *EmailForwardingAliasesListInner) SetEmail(v string) { + o.Email = &v +} + +// GetIsActive returns the IsActive field value if set, zero value otherwise. +func (o *EmailForwardingAliasesListInner) GetIsActive() bool { + if o == nil || IsNil(o.IsActive) { + var ret bool + return ret + } + return *o.IsActive +} + +// GetIsActiveOk returns a tuple with the IsActive field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EmailForwardingAliasesListInner) GetIsActiveOk() (*bool, bool) { + if o == nil || IsNil(o.IsActive) { + return nil, false + } + return o.IsActive, true +} + +// HasIsActive returns a boolean if a field has been set. +func (o *EmailForwardingAliasesListInner) HasIsActive() bool { + if o != nil && !IsNil(o.IsActive) { + return true + } + + return false +} + +// SetIsActive gets a reference to the given bool and assigns it to the IsActive field. +func (o *EmailForwardingAliasesListInner) SetIsActive(v bool) { + o.IsActive = &v +} + +func (o EmailForwardingAliasesListInner) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EmailForwardingAliasesListInner) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.LocalPart) { + toSerialize["local_part"] = o.LocalPart + } + if !IsNil(o.Email) { + toSerialize["email"] = o.Email + } + if !IsNil(o.IsActive) { + toSerialize["is_active"] = o.IsActive + } + return toSerialize, nil +} + +type NullableEmailForwardingAliasesListInner struct { + value *EmailForwardingAliasesListInner + isSet bool +} + +func (v NullableEmailForwardingAliasesListInner) Get() *EmailForwardingAliasesListInner { + return v.value +} + +func (v *NullableEmailForwardingAliasesListInner) Set(val *EmailForwardingAliasesListInner) { + v.value = val + v.isSet = true +} + +func (v NullableEmailForwardingAliasesListInner) IsSet() bool { + return v.isSet +} + +func (v *NullableEmailForwardingAliasesListInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEmailForwardingAliasesListInner(val *EmailForwardingAliasesListInner) *NullableEmailForwardingAliasesListInner { + return &NullableEmailForwardingAliasesListInner{value: val, isSet: true} +} + +func (v NullableEmailForwardingAliasesListInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEmailForwardingAliasesListInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_email_forwarding_aliases_recipients.go b/model_email_forwarding_aliases_recipients.go new file mode 100644 index 0000000..4748b74 --- /dev/null +++ b/model_email_forwarding_aliases_recipients.go @@ -0,0 +1,117 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the EmailForwardingAliasesRecipients type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EmailForwardingAliasesRecipients{} + +// EmailForwardingAliasesRecipients struct for EmailForwardingAliasesRecipients +type EmailForwardingAliasesRecipients struct { + Recipients []string `json:"recipients"` +} + +// NewEmailForwardingAliasesRecipients instantiates a new EmailForwardingAliasesRecipients object +// This constructor will assign default values to properties that have it defined, +// 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 NewEmailForwardingAliasesRecipients(recipients []string) *EmailForwardingAliasesRecipients { + this := EmailForwardingAliasesRecipients{} + this.Recipients = recipients + return &this +} + +// NewEmailForwardingAliasesRecipientsWithDefaults instantiates a new EmailForwardingAliasesRecipients object +// This 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 NewEmailForwardingAliasesRecipientsWithDefaults() *EmailForwardingAliasesRecipients { + this := EmailForwardingAliasesRecipients{} + return &this +} + +// GetRecipients returns the Recipients field value +func (o *EmailForwardingAliasesRecipients) GetRecipients() []string { + if o == nil { + var ret []string + return ret + } + + return o.Recipients +} + +// GetRecipientsOk returns a tuple with the Recipients field value +// and a boolean to check if the value has been set. +func (o *EmailForwardingAliasesRecipients) GetRecipientsOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.Recipients, true +} + +// SetRecipients sets field value +func (o *EmailForwardingAliasesRecipients) SetRecipients(v []string) { + o.Recipients = v +} + +func (o EmailForwardingAliasesRecipients) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EmailForwardingAliasesRecipients) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["recipients"] = o.Recipients + return toSerialize, nil +} + +type NullableEmailForwardingAliasesRecipients struct { + value *EmailForwardingAliasesRecipients + isSet bool +} + +func (v NullableEmailForwardingAliasesRecipients) Get() *EmailForwardingAliasesRecipients { + return v.value +} + +func (v *NullableEmailForwardingAliasesRecipients) Set(val *EmailForwardingAliasesRecipients) { + v.value = val + v.isSet = true +} + +func (v NullableEmailForwardingAliasesRecipients) IsSet() bool { + return v.isSet +} + +func (v *NullableEmailForwardingAliasesRecipients) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEmailForwardingAliasesRecipients(val *EmailForwardingAliasesRecipients) *NullableEmailForwardingAliasesRecipients { + return &NullableEmailForwardingAliasesRecipients{value: val, isSet: true} +} + +func (v NullableEmailForwardingAliasesRecipients) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEmailForwardingAliasesRecipients) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_email_forwarding_aliases_store.go b/model_email_forwarding_aliases_store.go new file mode 100644 index 0000000..6db0182 --- /dev/null +++ b/model_email_forwarding_aliases_store.go @@ -0,0 +1,144 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the EmailForwardingAliasesStore type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EmailForwardingAliasesStore{} + +// EmailForwardingAliasesStore struct for EmailForwardingAliasesStore +type EmailForwardingAliasesStore struct { + LocalPart string `json:"local_part"` + Recipients []string `json:"recipients"` +} + +// NewEmailForwardingAliasesStore instantiates a new EmailForwardingAliasesStore object +// This constructor will assign default values to properties that have it defined, +// 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 NewEmailForwardingAliasesStore(localPart string, recipients []string) *EmailForwardingAliasesStore { + this := EmailForwardingAliasesStore{} + this.LocalPart = localPart + this.Recipients = recipients + return &this +} + +// NewEmailForwardingAliasesStoreWithDefaults instantiates a new EmailForwardingAliasesStore object +// This 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 NewEmailForwardingAliasesStoreWithDefaults() *EmailForwardingAliasesStore { + this := EmailForwardingAliasesStore{} + return &this +} + +// GetLocalPart returns the LocalPart field value +func (o *EmailForwardingAliasesStore) GetLocalPart() string { + if o == nil { + var ret string + return ret + } + + return o.LocalPart +} + +// GetLocalPartOk returns a tuple with the LocalPart field value +// and a boolean to check if the value has been set. +func (o *EmailForwardingAliasesStore) GetLocalPartOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.LocalPart, true +} + +// SetLocalPart sets field value +func (o *EmailForwardingAliasesStore) SetLocalPart(v string) { + o.LocalPart = v +} + +// GetRecipients returns the Recipients field value +func (o *EmailForwardingAliasesStore) GetRecipients() []string { + if o == nil { + var ret []string + return ret + } + + return o.Recipients +} + +// GetRecipientsOk returns a tuple with the Recipients field value +// and a boolean to check if the value has been set. +func (o *EmailForwardingAliasesStore) GetRecipientsOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.Recipients, true +} + +// SetRecipients sets field value +func (o *EmailForwardingAliasesStore) SetRecipients(v []string) { + o.Recipients = v +} + +func (o EmailForwardingAliasesStore) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EmailForwardingAliasesStore) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["local_part"] = o.LocalPart + toSerialize["recipients"] = o.Recipients + return toSerialize, nil +} + +type NullableEmailForwardingAliasesStore struct { + value *EmailForwardingAliasesStore + isSet bool +} + +func (v NullableEmailForwardingAliasesStore) Get() *EmailForwardingAliasesStore { + return v.value +} + +func (v *NullableEmailForwardingAliasesStore) Set(val *EmailForwardingAliasesStore) { + v.value = val + v.isSet = true +} + +func (v NullableEmailForwardingAliasesStore) IsSet() bool { + return v.isSet +} + +func (v *NullableEmailForwardingAliasesStore) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEmailForwardingAliasesStore(val *EmailForwardingAliasesStore) *NullableEmailForwardingAliasesStore { + return &NullableEmailForwardingAliasesStore{value: val, isSet: true} +} + +func (v NullableEmailForwardingAliasesStore) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEmailForwardingAliasesStore) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_email_forwarding_aliases_toggle_activation.go b/model_email_forwarding_aliases_toggle_activation.go new file mode 100644 index 0000000..f08756a --- /dev/null +++ b/model_email_forwarding_aliases_toggle_activation.go @@ -0,0 +1,117 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the EmailForwardingAliasesToggleActivation type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EmailForwardingAliasesToggleActivation{} + +// EmailForwardingAliasesToggleActivation struct for EmailForwardingAliasesToggleActivation +type EmailForwardingAliasesToggleActivation struct { + IsActive bool `json:"is_active"` +} + +// NewEmailForwardingAliasesToggleActivation instantiates a new EmailForwardingAliasesToggleActivation object +// This constructor will assign default values to properties that have it defined, +// 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 NewEmailForwardingAliasesToggleActivation(isActive bool) *EmailForwardingAliasesToggleActivation { + this := EmailForwardingAliasesToggleActivation{} + this.IsActive = isActive + return &this +} + +// NewEmailForwardingAliasesToggleActivationWithDefaults instantiates a new EmailForwardingAliasesToggleActivation object +// This 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 NewEmailForwardingAliasesToggleActivationWithDefaults() *EmailForwardingAliasesToggleActivation { + this := EmailForwardingAliasesToggleActivation{} + return &this +} + +// GetIsActive returns the IsActive field value +func (o *EmailForwardingAliasesToggleActivation) GetIsActive() bool { + if o == nil { + var ret bool + return ret + } + + return o.IsActive +} + +// GetIsActiveOk returns a tuple with the IsActive field value +// and a boolean to check if the value has been set. +func (o *EmailForwardingAliasesToggleActivation) GetIsActiveOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.IsActive, true +} + +// SetIsActive sets field value +func (o *EmailForwardingAliasesToggleActivation) SetIsActive(v bool) { + o.IsActive = v +} + +func (o EmailForwardingAliasesToggleActivation) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EmailForwardingAliasesToggleActivation) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["is_active"] = o.IsActive + return toSerialize, nil +} + +type NullableEmailForwardingAliasesToggleActivation struct { + value *EmailForwardingAliasesToggleActivation + isSet bool +} + +func (v NullableEmailForwardingAliasesToggleActivation) Get() *EmailForwardingAliasesToggleActivation { + return v.value +} + +func (v *NullableEmailForwardingAliasesToggleActivation) Set(val *EmailForwardingAliasesToggleActivation) { + v.value = val + v.isSet = true +} + +func (v NullableEmailForwardingAliasesToggleActivation) IsSet() bool { + return v.isSet +} + +func (v *NullableEmailForwardingAliasesToggleActivation) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEmailForwardingAliasesToggleActivation(val *EmailForwardingAliasesToggleActivation) *NullableEmailForwardingAliasesToggleActivation { + return &NullableEmailForwardingAliasesToggleActivation{value: val, isSet: true} +} + +func (v NullableEmailForwardingAliasesToggleActivation) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEmailForwardingAliasesToggleActivation) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_email_forwarding_recipient.go b/model_email_forwarding_recipient.go new file mode 100644 index 0000000..18b5c9c --- /dev/null +++ b/model_email_forwarding_recipient.go @@ -0,0 +1,234 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the EmailForwardingRecipient type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EmailForwardingRecipient{} + +// EmailForwardingRecipient struct for EmailForwardingRecipient +type EmailForwardingRecipient struct { + Id *string `json:"id,omitempty"` + Email *string `json:"email,omitempty"` + IsVerified *bool `json:"is_verified,omitempty"` + IsDefault *bool `json:"is_default,omitempty"` +} + +// NewEmailForwardingRecipient instantiates a new EmailForwardingRecipient object +// This constructor will assign default values to properties that have it defined, +// 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 NewEmailForwardingRecipient() *EmailForwardingRecipient { + this := EmailForwardingRecipient{} + return &this +} + +// NewEmailForwardingRecipientWithDefaults instantiates a new EmailForwardingRecipient object +// This 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 NewEmailForwardingRecipientWithDefaults() *EmailForwardingRecipient { + this := EmailForwardingRecipient{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *EmailForwardingRecipient) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EmailForwardingRecipient) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *EmailForwardingRecipient) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *EmailForwardingRecipient) SetId(v string) { + o.Id = &v +} + +// GetEmail returns the Email field value if set, zero value otherwise. +func (o *EmailForwardingRecipient) GetEmail() string { + if o == nil || IsNil(o.Email) { + var ret string + return ret + } + return *o.Email +} + +// GetEmailOk returns a tuple with the Email field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EmailForwardingRecipient) GetEmailOk() (*string, bool) { + if o == nil || IsNil(o.Email) { + return nil, false + } + return o.Email, true +} + +// HasEmail returns a boolean if a field has been set. +func (o *EmailForwardingRecipient) HasEmail() bool { + if o != nil && !IsNil(o.Email) { + return true + } + + return false +} + +// SetEmail gets a reference to the given string and assigns it to the Email field. +func (o *EmailForwardingRecipient) SetEmail(v string) { + o.Email = &v +} + +// GetIsVerified returns the IsVerified field value if set, zero value otherwise. +func (o *EmailForwardingRecipient) GetIsVerified() bool { + if o == nil || IsNil(o.IsVerified) { + var ret bool + return ret + } + return *o.IsVerified +} + +// GetIsVerifiedOk returns a tuple with the IsVerified field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EmailForwardingRecipient) GetIsVerifiedOk() (*bool, bool) { + if o == nil || IsNil(o.IsVerified) { + return nil, false + } + return o.IsVerified, true +} + +// HasIsVerified returns a boolean if a field has been set. +func (o *EmailForwardingRecipient) HasIsVerified() bool { + if o != nil && !IsNil(o.IsVerified) { + return true + } + + return false +} + +// SetIsVerified gets a reference to the given bool and assigns it to the IsVerified field. +func (o *EmailForwardingRecipient) SetIsVerified(v bool) { + o.IsVerified = &v +} + +// GetIsDefault returns the IsDefault field value if set, zero value otherwise. +func (o *EmailForwardingRecipient) GetIsDefault() bool { + if o == nil || IsNil(o.IsDefault) { + var ret bool + return ret + } + return *o.IsDefault +} + +// GetIsDefaultOk returns a tuple with the IsDefault field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EmailForwardingRecipient) GetIsDefaultOk() (*bool, bool) { + if o == nil || IsNil(o.IsDefault) { + return nil, false + } + return o.IsDefault, true +} + +// HasIsDefault returns a boolean if a field has been set. +func (o *EmailForwardingRecipient) HasIsDefault() bool { + if o != nil && !IsNil(o.IsDefault) { + return true + } + + return false +} + +// SetIsDefault gets a reference to the given bool and assigns it to the IsDefault field. +func (o *EmailForwardingRecipient) SetIsDefault(v bool) { + o.IsDefault = &v +} + +func (o EmailForwardingRecipient) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EmailForwardingRecipient) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Email) { + toSerialize["email"] = o.Email + } + if !IsNil(o.IsVerified) { + toSerialize["is_verified"] = o.IsVerified + } + if !IsNil(o.IsDefault) { + toSerialize["is_default"] = o.IsDefault + } + return toSerialize, nil +} + +type NullableEmailForwardingRecipient struct { + value *EmailForwardingRecipient + isSet bool +} + +func (v NullableEmailForwardingRecipient) Get() *EmailForwardingRecipient { + return v.value +} + +func (v *NullableEmailForwardingRecipient) Set(val *EmailForwardingRecipient) { + v.value = val + v.isSet = true +} + +func (v NullableEmailForwardingRecipient) IsSet() bool { + return v.isSet +} + +func (v *NullableEmailForwardingRecipient) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEmailForwardingRecipient(val *EmailForwardingRecipient) *NullableEmailForwardingRecipient { + return &NullableEmailForwardingRecipient{value: val, isSet: true} +} + +func (v NullableEmailForwardingRecipient) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEmailForwardingRecipient) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_email_forwarding_recipients_list_data.go b/model_email_forwarding_recipients_list_data.go new file mode 100644 index 0000000..0887177 --- /dev/null +++ b/model_email_forwarding_recipients_list_data.go @@ -0,0 +1,126 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the EmailForwardingRecipientsListData type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EmailForwardingRecipientsListData{} + +// EmailForwardingRecipientsListData struct for EmailForwardingRecipientsListData +type EmailForwardingRecipientsListData struct { + Data []EmailForwardingRecipientsListInner `json:"data,omitempty"` +} + +// NewEmailForwardingRecipientsListData instantiates a new EmailForwardingRecipientsListData object +// This constructor will assign default values to properties that have it defined, +// 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 NewEmailForwardingRecipientsListData() *EmailForwardingRecipientsListData { + this := EmailForwardingRecipientsListData{} + return &this +} + +// NewEmailForwardingRecipientsListDataWithDefaults instantiates a new EmailForwardingRecipientsListData object +// This 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 NewEmailForwardingRecipientsListDataWithDefaults() *EmailForwardingRecipientsListData { + this := EmailForwardingRecipientsListData{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *EmailForwardingRecipientsListData) GetData() []EmailForwardingRecipientsListInner { + if o == nil || IsNil(o.Data) { + var ret []EmailForwardingRecipientsListInner + return ret + } + return o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EmailForwardingRecipientsListData) GetDataOk() ([]EmailForwardingRecipientsListInner, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *EmailForwardingRecipientsListData) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given []EmailForwardingRecipientsListInner and assigns it to the Data field. +func (o *EmailForwardingRecipientsListData) SetData(v []EmailForwardingRecipientsListInner) { + o.Data = v +} + +func (o EmailForwardingRecipientsListData) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EmailForwardingRecipientsListData) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + return toSerialize, nil +} + +type NullableEmailForwardingRecipientsListData struct { + value *EmailForwardingRecipientsListData + isSet bool +} + +func (v NullableEmailForwardingRecipientsListData) Get() *EmailForwardingRecipientsListData { + return v.value +} + +func (v *NullableEmailForwardingRecipientsListData) Set(val *EmailForwardingRecipientsListData) { + v.value = val + v.isSet = true +} + +func (v NullableEmailForwardingRecipientsListData) IsSet() bool { + return v.isSet +} + +func (v *NullableEmailForwardingRecipientsListData) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEmailForwardingRecipientsListData(val *EmailForwardingRecipientsListData) *NullableEmailForwardingRecipientsListData { + return &NullableEmailForwardingRecipientsListData{value: val, isSet: true} +} + +func (v NullableEmailForwardingRecipientsListData) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEmailForwardingRecipientsListData) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_email_forwarding_recipients_list_inner.go b/model_email_forwarding_recipients_list_inner.go new file mode 100644 index 0000000..ed9aabd --- /dev/null +++ b/model_email_forwarding_recipients_list_inner.go @@ -0,0 +1,234 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the EmailForwardingRecipientsListInner type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EmailForwardingRecipientsListInner{} + +// EmailForwardingRecipientsListInner struct for EmailForwardingRecipientsListInner +type EmailForwardingRecipientsListInner struct { + Id *string `json:"id,omitempty"` + Email *string `json:"email,omitempty"` + IsVerified *bool `json:"is_verified,omitempty"` + IsDefault *bool `json:"is_default,omitempty"` +} + +// NewEmailForwardingRecipientsListInner instantiates a new EmailForwardingRecipientsListInner object +// This constructor will assign default values to properties that have it defined, +// 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 NewEmailForwardingRecipientsListInner() *EmailForwardingRecipientsListInner { + this := EmailForwardingRecipientsListInner{} + return &this +} + +// NewEmailForwardingRecipientsListInnerWithDefaults instantiates a new EmailForwardingRecipientsListInner object +// This 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 NewEmailForwardingRecipientsListInnerWithDefaults() *EmailForwardingRecipientsListInner { + this := EmailForwardingRecipientsListInner{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *EmailForwardingRecipientsListInner) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EmailForwardingRecipientsListInner) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *EmailForwardingRecipientsListInner) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *EmailForwardingRecipientsListInner) SetId(v string) { + o.Id = &v +} + +// GetEmail returns the Email field value if set, zero value otherwise. +func (o *EmailForwardingRecipientsListInner) GetEmail() string { + if o == nil || IsNil(o.Email) { + var ret string + return ret + } + return *o.Email +} + +// GetEmailOk returns a tuple with the Email field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EmailForwardingRecipientsListInner) GetEmailOk() (*string, bool) { + if o == nil || IsNil(o.Email) { + return nil, false + } + return o.Email, true +} + +// HasEmail returns a boolean if a field has been set. +func (o *EmailForwardingRecipientsListInner) HasEmail() bool { + if o != nil && !IsNil(o.Email) { + return true + } + + return false +} + +// SetEmail gets a reference to the given string and assigns it to the Email field. +func (o *EmailForwardingRecipientsListInner) SetEmail(v string) { + o.Email = &v +} + +// GetIsVerified returns the IsVerified field value if set, zero value otherwise. +func (o *EmailForwardingRecipientsListInner) GetIsVerified() bool { + if o == nil || IsNil(o.IsVerified) { + var ret bool + return ret + } + return *o.IsVerified +} + +// GetIsVerifiedOk returns a tuple with the IsVerified field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EmailForwardingRecipientsListInner) GetIsVerifiedOk() (*bool, bool) { + if o == nil || IsNil(o.IsVerified) { + return nil, false + } + return o.IsVerified, true +} + +// HasIsVerified returns a boolean if a field has been set. +func (o *EmailForwardingRecipientsListInner) HasIsVerified() bool { + if o != nil && !IsNil(o.IsVerified) { + return true + } + + return false +} + +// SetIsVerified gets a reference to the given bool and assigns it to the IsVerified field. +func (o *EmailForwardingRecipientsListInner) SetIsVerified(v bool) { + o.IsVerified = &v +} + +// GetIsDefault returns the IsDefault field value if set, zero value otherwise. +func (o *EmailForwardingRecipientsListInner) GetIsDefault() bool { + if o == nil || IsNil(o.IsDefault) { + var ret bool + return ret + } + return *o.IsDefault +} + +// GetIsDefaultOk returns a tuple with the IsDefault field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EmailForwardingRecipientsListInner) GetIsDefaultOk() (*bool, bool) { + if o == nil || IsNil(o.IsDefault) { + return nil, false + } + return o.IsDefault, true +} + +// HasIsDefault returns a boolean if a field has been set. +func (o *EmailForwardingRecipientsListInner) HasIsDefault() bool { + if o != nil && !IsNil(o.IsDefault) { + return true + } + + return false +} + +// SetIsDefault gets a reference to the given bool and assigns it to the IsDefault field. +func (o *EmailForwardingRecipientsListInner) SetIsDefault(v bool) { + o.IsDefault = &v +} + +func (o EmailForwardingRecipientsListInner) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EmailForwardingRecipientsListInner) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Email) { + toSerialize["email"] = o.Email + } + if !IsNil(o.IsVerified) { + toSerialize["is_verified"] = o.IsVerified + } + if !IsNil(o.IsDefault) { + toSerialize["is_default"] = o.IsDefault + } + return toSerialize, nil +} + +type NullableEmailForwardingRecipientsListInner struct { + value *EmailForwardingRecipientsListInner + isSet bool +} + +func (v NullableEmailForwardingRecipientsListInner) Get() *EmailForwardingRecipientsListInner { + return v.value +} + +func (v *NullableEmailForwardingRecipientsListInner) Set(val *EmailForwardingRecipientsListInner) { + v.value = val + v.isSet = true +} + +func (v NullableEmailForwardingRecipientsListInner) IsSet() bool { + return v.isSet +} + +func (v *NullableEmailForwardingRecipientsListInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEmailForwardingRecipientsListInner(val *EmailForwardingRecipientsListInner) *NullableEmailForwardingRecipientsListInner { + return &NullableEmailForwardingRecipientsListInner{value: val, isSet: true} +} + +func (v NullableEmailForwardingRecipientsListInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEmailForwardingRecipientsListInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_email_forwarding_recipients_store.go b/model_email_forwarding_recipients_store.go new file mode 100644 index 0000000..5b7429f --- /dev/null +++ b/model_email_forwarding_recipients_store.go @@ -0,0 +1,117 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the EmailForwardingRecipientsStore type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EmailForwardingRecipientsStore{} + +// EmailForwardingRecipientsStore struct for EmailForwardingRecipientsStore +type EmailForwardingRecipientsStore struct { + Email string `json:"email"` +} + +// NewEmailForwardingRecipientsStore instantiates a new EmailForwardingRecipientsStore object +// This constructor will assign default values to properties that have it defined, +// 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 NewEmailForwardingRecipientsStore(email string) *EmailForwardingRecipientsStore { + this := EmailForwardingRecipientsStore{} + this.Email = email + return &this +} + +// NewEmailForwardingRecipientsStoreWithDefaults instantiates a new EmailForwardingRecipientsStore object +// This 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 NewEmailForwardingRecipientsStoreWithDefaults() *EmailForwardingRecipientsStore { + this := EmailForwardingRecipientsStore{} + return &this +} + +// GetEmail returns the Email field value +func (o *EmailForwardingRecipientsStore) GetEmail() string { + if o == nil { + var ret string + return ret + } + + return o.Email +} + +// GetEmailOk returns a tuple with the Email field value +// and a boolean to check if the value has been set. +func (o *EmailForwardingRecipientsStore) GetEmailOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Email, true +} + +// SetEmail sets field value +func (o *EmailForwardingRecipientsStore) SetEmail(v string) { + o.Email = v +} + +func (o EmailForwardingRecipientsStore) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EmailForwardingRecipientsStore) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["email"] = o.Email + return toSerialize, nil +} + +type NullableEmailForwardingRecipientsStore struct { + value *EmailForwardingRecipientsStore + isSet bool +} + +func (v NullableEmailForwardingRecipientsStore) Get() *EmailForwardingRecipientsStore { + return v.value +} + +func (v *NullableEmailForwardingRecipientsStore) Set(val *EmailForwardingRecipientsStore) { + v.value = val + v.isSet = true +} + +func (v NullableEmailForwardingRecipientsStore) IsSet() bool { + return v.isSet +} + +func (v *NullableEmailForwardingRecipientsStore) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEmailForwardingRecipientsStore(val *EmailForwardingRecipientsStore) *NullableEmailForwardingRecipientsStore { + return &NullableEmailForwardingRecipientsStore{value: val, isSet: true} +} + +func (v NullableEmailForwardingRecipientsStore) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEmailForwardingRecipientsStore) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_email_forwarding_recipients_verify.go b/model_email_forwarding_recipients_verify.go new file mode 100644 index 0000000..daeebde --- /dev/null +++ b/model_email_forwarding_recipients_verify.go @@ -0,0 +1,117 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the EmailForwardingRecipientsVerify type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EmailForwardingRecipientsVerify{} + +// EmailForwardingRecipientsVerify struct for EmailForwardingRecipientsVerify +type EmailForwardingRecipientsVerify struct { + Code string `json:"code"` +} + +// NewEmailForwardingRecipientsVerify instantiates a new EmailForwardingRecipientsVerify object +// This constructor will assign default values to properties that have it defined, +// 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 NewEmailForwardingRecipientsVerify(code string) *EmailForwardingRecipientsVerify { + this := EmailForwardingRecipientsVerify{} + this.Code = code + return &this +} + +// NewEmailForwardingRecipientsVerifyWithDefaults instantiates a new EmailForwardingRecipientsVerify object +// This 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 NewEmailForwardingRecipientsVerifyWithDefaults() *EmailForwardingRecipientsVerify { + this := EmailForwardingRecipientsVerify{} + return &this +} + +// GetCode returns the Code field value +func (o *EmailForwardingRecipientsVerify) GetCode() string { + if o == nil { + var ret string + return ret + } + + return o.Code +} + +// GetCodeOk returns a tuple with the Code field value +// and a boolean to check if the value has been set. +func (o *EmailForwardingRecipientsVerify) GetCodeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Code, true +} + +// SetCode sets field value +func (o *EmailForwardingRecipientsVerify) SetCode(v string) { + o.Code = v +} + +func (o EmailForwardingRecipientsVerify) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EmailForwardingRecipientsVerify) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["code"] = o.Code + return toSerialize, nil +} + +type NullableEmailForwardingRecipientsVerify struct { + value *EmailForwardingRecipientsVerify + isSet bool +} + +func (v NullableEmailForwardingRecipientsVerify) Get() *EmailForwardingRecipientsVerify { + return v.value +} + +func (v *NullableEmailForwardingRecipientsVerify) Set(val *EmailForwardingRecipientsVerify) { + v.value = val + v.isSet = true +} + +func (v NullableEmailForwardingRecipientsVerify) IsSet() bool { + return v.isSet +} + +func (v *NullableEmailForwardingRecipientsVerify) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEmailForwardingRecipientsVerify(val *EmailForwardingRecipientsVerify) *NullableEmailForwardingRecipientsVerify { + return &NullableEmailForwardingRecipientsVerify{value: val, isSet: true} +} + +func (v NullableEmailForwardingRecipientsVerify) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEmailForwardingRecipientsVerify) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_email_forwarding_stats.go b/model_email_forwarding_stats.go new file mode 100644 index 0000000..15ee43d --- /dev/null +++ b/model_email_forwarding_stats.go @@ -0,0 +1,414 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the EmailForwardingStats type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EmailForwardingStats{} + +// EmailForwardingStats struct for EmailForwardingStats +type EmailForwardingStats struct { + Id *string `json:"id,omitempty"` + DnsActivation *bool `json:"dns_activation,omitempty"` + RecipientsCount *int32 `json:"recipients_count,omitempty"` + AliasesCount *int32 `json:"aliases_count,omitempty"` + IsActive *bool `json:"is_active,omitempty"` + IsConfigured *bool `json:"is_configured,omitempty"` + EmailsForwarded *int32 `json:"emails_forwarded,omitempty"` + EmailsBlocked *int32 `json:"emails_blocked,omitempty"` + EmailsReplied *int32 `json:"emails_replied,omitempty"` +} + +// NewEmailForwardingStats instantiates a new EmailForwardingStats object +// This constructor will assign default values to properties that have it defined, +// 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 NewEmailForwardingStats() *EmailForwardingStats { + this := EmailForwardingStats{} + return &this +} + +// NewEmailForwardingStatsWithDefaults instantiates a new EmailForwardingStats object +// This 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 NewEmailForwardingStatsWithDefaults() *EmailForwardingStats { + this := EmailForwardingStats{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *EmailForwardingStats) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EmailForwardingStats) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *EmailForwardingStats) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *EmailForwardingStats) SetId(v string) { + o.Id = &v +} + +// GetDnsActivation returns the DnsActivation field value if set, zero value otherwise. +func (o *EmailForwardingStats) GetDnsActivation() bool { + if o == nil || IsNil(o.DnsActivation) { + var ret bool + return ret + } + return *o.DnsActivation +} + +// GetDnsActivationOk returns a tuple with the DnsActivation field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EmailForwardingStats) GetDnsActivationOk() (*bool, bool) { + if o == nil || IsNil(o.DnsActivation) { + return nil, false + } + return o.DnsActivation, true +} + +// HasDnsActivation returns a boolean if a field has been set. +func (o *EmailForwardingStats) HasDnsActivation() bool { + if o != nil && !IsNil(o.DnsActivation) { + return true + } + + return false +} + +// SetDnsActivation gets a reference to the given bool and assigns it to the DnsActivation field. +func (o *EmailForwardingStats) SetDnsActivation(v bool) { + o.DnsActivation = &v +} + +// GetRecipientsCount returns the RecipientsCount field value if set, zero value otherwise. +func (o *EmailForwardingStats) GetRecipientsCount() int32 { + if o == nil || IsNil(o.RecipientsCount) { + var ret int32 + return ret + } + return *o.RecipientsCount +} + +// GetRecipientsCountOk returns a tuple with the RecipientsCount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EmailForwardingStats) GetRecipientsCountOk() (*int32, bool) { + if o == nil || IsNil(o.RecipientsCount) { + return nil, false + } + return o.RecipientsCount, true +} + +// HasRecipientsCount returns a boolean if a field has been set. +func (o *EmailForwardingStats) HasRecipientsCount() bool { + if o != nil && !IsNil(o.RecipientsCount) { + return true + } + + return false +} + +// SetRecipientsCount gets a reference to the given int32 and assigns it to the RecipientsCount field. +func (o *EmailForwardingStats) SetRecipientsCount(v int32) { + o.RecipientsCount = &v +} + +// GetAliasesCount returns the AliasesCount field value if set, zero value otherwise. +func (o *EmailForwardingStats) GetAliasesCount() int32 { + if o == nil || IsNil(o.AliasesCount) { + var ret int32 + return ret + } + return *o.AliasesCount +} + +// GetAliasesCountOk returns a tuple with the AliasesCount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EmailForwardingStats) GetAliasesCountOk() (*int32, bool) { + if o == nil || IsNil(o.AliasesCount) { + return nil, false + } + return o.AliasesCount, true +} + +// HasAliasesCount returns a boolean if a field has been set. +func (o *EmailForwardingStats) HasAliasesCount() bool { + if o != nil && !IsNil(o.AliasesCount) { + return true + } + + return false +} + +// SetAliasesCount gets a reference to the given int32 and assigns it to the AliasesCount field. +func (o *EmailForwardingStats) SetAliasesCount(v int32) { + o.AliasesCount = &v +} + +// GetIsActive returns the IsActive field value if set, zero value otherwise. +func (o *EmailForwardingStats) GetIsActive() bool { + if o == nil || IsNil(o.IsActive) { + var ret bool + return ret + } + return *o.IsActive +} + +// GetIsActiveOk returns a tuple with the IsActive field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EmailForwardingStats) GetIsActiveOk() (*bool, bool) { + if o == nil || IsNil(o.IsActive) { + return nil, false + } + return o.IsActive, true +} + +// HasIsActive returns a boolean if a field has been set. +func (o *EmailForwardingStats) HasIsActive() bool { + if o != nil && !IsNil(o.IsActive) { + return true + } + + return false +} + +// SetIsActive gets a reference to the given bool and assigns it to the IsActive field. +func (o *EmailForwardingStats) SetIsActive(v bool) { + o.IsActive = &v +} + +// GetIsConfigured returns the IsConfigured field value if set, zero value otherwise. +func (o *EmailForwardingStats) GetIsConfigured() bool { + if o == nil || IsNil(o.IsConfigured) { + var ret bool + return ret + } + return *o.IsConfigured +} + +// GetIsConfiguredOk returns a tuple with the IsConfigured field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EmailForwardingStats) GetIsConfiguredOk() (*bool, bool) { + if o == nil || IsNil(o.IsConfigured) { + return nil, false + } + return o.IsConfigured, true +} + +// HasIsConfigured returns a boolean if a field has been set. +func (o *EmailForwardingStats) HasIsConfigured() bool { + if o != nil && !IsNil(o.IsConfigured) { + return true + } + + return false +} + +// SetIsConfigured gets a reference to the given bool and assigns it to the IsConfigured field. +func (o *EmailForwardingStats) SetIsConfigured(v bool) { + o.IsConfigured = &v +} + +// GetEmailsForwarded returns the EmailsForwarded field value if set, zero value otherwise. +func (o *EmailForwardingStats) GetEmailsForwarded() int32 { + if o == nil || IsNil(o.EmailsForwarded) { + var ret int32 + return ret + } + return *o.EmailsForwarded +} + +// GetEmailsForwardedOk returns a tuple with the EmailsForwarded field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EmailForwardingStats) GetEmailsForwardedOk() (*int32, bool) { + if o == nil || IsNil(o.EmailsForwarded) { + return nil, false + } + return o.EmailsForwarded, true +} + +// HasEmailsForwarded returns a boolean if a field has been set. +func (o *EmailForwardingStats) HasEmailsForwarded() bool { + if o != nil && !IsNil(o.EmailsForwarded) { + return true + } + + return false +} + +// SetEmailsForwarded gets a reference to the given int32 and assigns it to the EmailsForwarded field. +func (o *EmailForwardingStats) SetEmailsForwarded(v int32) { + o.EmailsForwarded = &v +} + +// GetEmailsBlocked returns the EmailsBlocked field value if set, zero value otherwise. +func (o *EmailForwardingStats) GetEmailsBlocked() int32 { + if o == nil || IsNil(o.EmailsBlocked) { + var ret int32 + return ret + } + return *o.EmailsBlocked +} + +// GetEmailsBlockedOk returns a tuple with the EmailsBlocked field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EmailForwardingStats) GetEmailsBlockedOk() (*int32, bool) { + if o == nil || IsNil(o.EmailsBlocked) { + return nil, false + } + return o.EmailsBlocked, true +} + +// HasEmailsBlocked returns a boolean if a field has been set. +func (o *EmailForwardingStats) HasEmailsBlocked() bool { + if o != nil && !IsNil(o.EmailsBlocked) { + return true + } + + return false +} + +// SetEmailsBlocked gets a reference to the given int32 and assigns it to the EmailsBlocked field. +func (o *EmailForwardingStats) SetEmailsBlocked(v int32) { + o.EmailsBlocked = &v +} + +// GetEmailsReplied returns the EmailsReplied field value if set, zero value otherwise. +func (o *EmailForwardingStats) GetEmailsReplied() int32 { + if o == nil || IsNil(o.EmailsReplied) { + var ret int32 + return ret + } + return *o.EmailsReplied +} + +// GetEmailsRepliedOk returns a tuple with the EmailsReplied field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EmailForwardingStats) GetEmailsRepliedOk() (*int32, bool) { + if o == nil || IsNil(o.EmailsReplied) { + return nil, false + } + return o.EmailsReplied, true +} + +// HasEmailsReplied returns a boolean if a field has been set. +func (o *EmailForwardingStats) HasEmailsReplied() bool { + if o != nil && !IsNil(o.EmailsReplied) { + return true + } + + return false +} + +// SetEmailsReplied gets a reference to the given int32 and assigns it to the EmailsReplied field. +func (o *EmailForwardingStats) SetEmailsReplied(v int32) { + o.EmailsReplied = &v +} + +func (o EmailForwardingStats) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EmailForwardingStats) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.DnsActivation) { + toSerialize["dns_activation"] = o.DnsActivation + } + if !IsNil(o.RecipientsCount) { + toSerialize["recipients_count"] = o.RecipientsCount + } + if !IsNil(o.AliasesCount) { + toSerialize["aliases_count"] = o.AliasesCount + } + if !IsNil(o.IsActive) { + toSerialize["is_active"] = o.IsActive + } + if !IsNil(o.IsConfigured) { + toSerialize["is_configured"] = o.IsConfigured + } + if !IsNil(o.EmailsForwarded) { + toSerialize["emails_forwarded"] = o.EmailsForwarded + } + if !IsNil(o.EmailsBlocked) { + toSerialize["emails_blocked"] = o.EmailsBlocked + } + if !IsNil(o.EmailsReplied) { + toSerialize["emails_replied"] = o.EmailsReplied + } + return toSerialize, nil +} + +type NullableEmailForwardingStats struct { + value *EmailForwardingStats + isSet bool +} + +func (v NullableEmailForwardingStats) Get() *EmailForwardingStats { + return v.value +} + +func (v *NullableEmailForwardingStats) Set(val *EmailForwardingStats) { + v.value = val + v.isSet = true +} + +func (v NullableEmailForwardingStats) IsSet() bool { + return v.isSet +} + +func (v *NullableEmailForwardingStats) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEmailForwardingStats(val *EmailForwardingStats) *NullableEmailForwardingStats { + return &NullableEmailForwardingStats{value: val, isSet: true} +} + +func (v NullableEmailForwardingStats) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEmailForwardingStats) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_email_forwarding_stats_data.go b/model_email_forwarding_stats_data.go new file mode 100644 index 0000000..6b9d458 --- /dev/null +++ b/model_email_forwarding_stats_data.go @@ -0,0 +1,126 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the EmailForwardingStatsData type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EmailForwardingStatsData{} + +// EmailForwardingStatsData struct for EmailForwardingStatsData +type EmailForwardingStatsData struct { + Data *EmailForwardingStats `json:"data,omitempty"` +} + +// NewEmailForwardingStatsData instantiates a new EmailForwardingStatsData object +// This constructor will assign default values to properties that have it defined, +// 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 NewEmailForwardingStatsData() *EmailForwardingStatsData { + this := EmailForwardingStatsData{} + return &this +} + +// NewEmailForwardingStatsDataWithDefaults instantiates a new EmailForwardingStatsData object +// This 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 NewEmailForwardingStatsDataWithDefaults() *EmailForwardingStatsData { + this := EmailForwardingStatsData{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *EmailForwardingStatsData) GetData() EmailForwardingStats { + if o == nil || IsNil(o.Data) { + var ret EmailForwardingStats + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EmailForwardingStatsData) GetDataOk() (*EmailForwardingStats, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *EmailForwardingStatsData) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given EmailForwardingStats and assigns it to the Data field. +func (o *EmailForwardingStatsData) SetData(v EmailForwardingStats) { + o.Data = &v +} + +func (o EmailForwardingStatsData) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EmailForwardingStatsData) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + return toSerialize, nil +} + +type NullableEmailForwardingStatsData struct { + value *EmailForwardingStatsData + isSet bool +} + +func (v NullableEmailForwardingStatsData) Get() *EmailForwardingStatsData { + return v.value +} + +func (v *NullableEmailForwardingStatsData) Set(val *EmailForwardingStatsData) { + v.value = val + v.isSet = true +} + +func (v NullableEmailForwardingStatsData) IsSet() bool { + return v.isSet +} + +func (v *NullableEmailForwardingStatsData) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEmailForwardingStatsData(val *EmailForwardingStatsData) *NullableEmailForwardingStatsData { + return &NullableEmailForwardingStatsData{value: val, isSet: true} +} + +func (v NullableEmailForwardingStatsData) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEmailForwardingStatsData) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_email_forwardings_aliases_store_201_response.go b/model_email_forwardings_aliases_store_201_response.go new file mode 100644 index 0000000..398a9f1 --- /dev/null +++ b/model_email_forwardings_aliases_store_201_response.go @@ -0,0 +1,172 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the EmailForwardingsAliasesStore201Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EmailForwardingsAliasesStore201Response{} + +// EmailForwardingsAliasesStore201Response struct for EmailForwardingsAliasesStore201Response +type EmailForwardingsAliasesStore201Response struct { + Data *EmailForwardingAlias `json:"data,omitempty"` + Message NullableString `json:"message,omitempty"` +} + +// NewEmailForwardingsAliasesStore201Response instantiates a new EmailForwardingsAliasesStore201Response object +// This constructor will assign default values to properties that have it defined, +// 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 NewEmailForwardingsAliasesStore201Response() *EmailForwardingsAliasesStore201Response { + this := EmailForwardingsAliasesStore201Response{} + return &this +} + +// NewEmailForwardingsAliasesStore201ResponseWithDefaults instantiates a new EmailForwardingsAliasesStore201Response object +// This 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 NewEmailForwardingsAliasesStore201ResponseWithDefaults() *EmailForwardingsAliasesStore201Response { + this := EmailForwardingsAliasesStore201Response{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *EmailForwardingsAliasesStore201Response) GetData() EmailForwardingAlias { + if o == nil || IsNil(o.Data) { + var ret EmailForwardingAlias + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EmailForwardingsAliasesStore201Response) GetDataOk() (*EmailForwardingAlias, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *EmailForwardingsAliasesStore201Response) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given EmailForwardingAlias and assigns it to the Data field. +func (o *EmailForwardingsAliasesStore201Response) SetData(v EmailForwardingAlias) { + o.Data = &v +} + +// GetMessage returns the Message field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EmailForwardingsAliasesStore201Response) GetMessage() string { + if o == nil || IsNil(o.Message.Get()) { + var ret string + return ret + } + return *o.Message.Get() +} + +// GetMessageOk returns a tuple with the Message 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 *EmailForwardingsAliasesStore201Response) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Message.Get(), o.Message.IsSet() +} + +// HasMessage returns a boolean if a field has been set. +func (o *EmailForwardingsAliasesStore201Response) HasMessage() bool { + if o != nil && o.Message.IsSet() { + return true + } + + return false +} + +// SetMessage gets a reference to the given NullableString and assigns it to the Message field. +func (o *EmailForwardingsAliasesStore201Response) SetMessage(v string) { + o.Message.Set(&v) +} +// SetMessageNil sets the value for Message to be an explicit nil +func (o *EmailForwardingsAliasesStore201Response) SetMessageNil() { + o.Message.Set(nil) +} + +// UnsetMessage ensures that no value is present for Message, not even an explicit nil +func (o *EmailForwardingsAliasesStore201Response) UnsetMessage() { + o.Message.Unset() +} + +func (o EmailForwardingsAliasesStore201Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EmailForwardingsAliasesStore201Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + if o.Message.IsSet() { + toSerialize["message"] = o.Message.Get() + } + return toSerialize, nil +} + +type NullableEmailForwardingsAliasesStore201Response struct { + value *EmailForwardingsAliasesStore201Response + isSet bool +} + +func (v NullableEmailForwardingsAliasesStore201Response) Get() *EmailForwardingsAliasesStore201Response { + return v.value +} + +func (v *NullableEmailForwardingsAliasesStore201Response) Set(val *EmailForwardingsAliasesStore201Response) { + v.value = val + v.isSet = true +} + +func (v NullableEmailForwardingsAliasesStore201Response) IsSet() bool { + return v.isSet +} + +func (v *NullableEmailForwardingsAliasesStore201Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEmailForwardingsAliasesStore201Response(val *EmailForwardingsAliasesStore201Response) *NullableEmailForwardingsAliasesStore201Response { + return &NullableEmailForwardingsAliasesStore201Response{value: val, isSet: true} +} + +func (v NullableEmailForwardingsAliasesStore201Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEmailForwardingsAliasesStore201Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_email_forwardings_recipients_store_201_response.go b/model_email_forwardings_recipients_store_201_response.go new file mode 100644 index 0000000..ac94014 --- /dev/null +++ b/model_email_forwardings_recipients_store_201_response.go @@ -0,0 +1,172 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the EmailForwardingsRecipientsStore201Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EmailForwardingsRecipientsStore201Response{} + +// EmailForwardingsRecipientsStore201Response struct for EmailForwardingsRecipientsStore201Response +type EmailForwardingsRecipientsStore201Response struct { + Data *EmailForwardingRecipient `json:"data,omitempty"` + Message NullableString `json:"message,omitempty"` +} + +// NewEmailForwardingsRecipientsStore201Response instantiates a new EmailForwardingsRecipientsStore201Response object +// This constructor will assign default values to properties that have it defined, +// 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 NewEmailForwardingsRecipientsStore201Response() *EmailForwardingsRecipientsStore201Response { + this := EmailForwardingsRecipientsStore201Response{} + return &this +} + +// NewEmailForwardingsRecipientsStore201ResponseWithDefaults instantiates a new EmailForwardingsRecipientsStore201Response object +// This 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 NewEmailForwardingsRecipientsStore201ResponseWithDefaults() *EmailForwardingsRecipientsStore201Response { + this := EmailForwardingsRecipientsStore201Response{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *EmailForwardingsRecipientsStore201Response) GetData() EmailForwardingRecipient { + if o == nil || IsNil(o.Data) { + var ret EmailForwardingRecipient + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EmailForwardingsRecipientsStore201Response) GetDataOk() (*EmailForwardingRecipient, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *EmailForwardingsRecipientsStore201Response) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given EmailForwardingRecipient and assigns it to the Data field. +func (o *EmailForwardingsRecipientsStore201Response) SetData(v EmailForwardingRecipient) { + o.Data = &v +} + +// GetMessage returns the Message field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EmailForwardingsRecipientsStore201Response) GetMessage() string { + if o == nil || IsNil(o.Message.Get()) { + var ret string + return ret + } + return *o.Message.Get() +} + +// GetMessageOk returns a tuple with the Message 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 *EmailForwardingsRecipientsStore201Response) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Message.Get(), o.Message.IsSet() +} + +// HasMessage returns a boolean if a field has been set. +func (o *EmailForwardingsRecipientsStore201Response) HasMessage() bool { + if o != nil && o.Message.IsSet() { + return true + } + + return false +} + +// SetMessage gets a reference to the given NullableString and assigns it to the Message field. +func (o *EmailForwardingsRecipientsStore201Response) SetMessage(v string) { + o.Message.Set(&v) +} +// SetMessageNil sets the value for Message to be an explicit nil +func (o *EmailForwardingsRecipientsStore201Response) SetMessageNil() { + o.Message.Set(nil) +} + +// UnsetMessage ensures that no value is present for Message, not even an explicit nil +func (o *EmailForwardingsRecipientsStore201Response) UnsetMessage() { + o.Message.Unset() +} + +func (o EmailForwardingsRecipientsStore201Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EmailForwardingsRecipientsStore201Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + if o.Message.IsSet() { + toSerialize["message"] = o.Message.Get() + } + return toSerialize, nil +} + +type NullableEmailForwardingsRecipientsStore201Response struct { + value *EmailForwardingsRecipientsStore201Response + isSet bool +} + +func (v NullableEmailForwardingsRecipientsStore201Response) Get() *EmailForwardingsRecipientsStore201Response { + return v.value +} + +func (v *NullableEmailForwardingsRecipientsStore201Response) Set(val *EmailForwardingsRecipientsStore201Response) { + v.value = val + v.isSet = true +} + +func (v NullableEmailForwardingsRecipientsStore201Response) IsSet() bool { + return v.isSet +} + +func (v *NullableEmailForwardingsRecipientsStore201Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEmailForwardingsRecipientsStore201Response(val *EmailForwardingsRecipientsStore201Response) *NullableEmailForwardingsRecipientsStore201Response { + return &NullableEmailForwardingsRecipientsStore201Response{value: val, isSet: true} +} + +func (v NullableEmailForwardingsRecipientsStore201Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEmailForwardingsRecipientsStore201Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_error_log.go b/model_error_log.go new file mode 100644 index 0000000..1af121b --- /dev/null +++ b/model_error_log.go @@ -0,0 +1,200 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the ErrorLog type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ErrorLog{} + +// ErrorLog struct for ErrorLog +type ErrorLog struct { + // The error message + Name *string `json:"name,omitempty"` + // The error's count + Count *int32 `json:"count,omitempty"` + Upstreams []ErrorLogUpstreamsInner `json:"upstreams,omitempty"` +} + +// NewErrorLog instantiates a new ErrorLog object +// This constructor will assign default values to properties that have it defined, +// 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 NewErrorLog() *ErrorLog { + this := ErrorLog{} + return &this +} + +// NewErrorLogWithDefaults instantiates a new ErrorLog object +// This 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 NewErrorLogWithDefaults() *ErrorLog { + this := ErrorLog{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *ErrorLog) 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 *ErrorLog) 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 *ErrorLog) 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 *ErrorLog) SetName(v string) { + o.Name = &v +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *ErrorLog) 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 *ErrorLog) 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 *ErrorLog) 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 *ErrorLog) SetCount(v int32) { + o.Count = &v +} + +// GetUpstreams returns the Upstreams field value if set, zero value otherwise. +func (o *ErrorLog) GetUpstreams() []ErrorLogUpstreamsInner { + if o == nil || IsNil(o.Upstreams) { + var ret []ErrorLogUpstreamsInner + return ret + } + return o.Upstreams +} + +// GetUpstreamsOk returns a tuple with the Upstreams field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ErrorLog) GetUpstreamsOk() ([]ErrorLogUpstreamsInner, bool) { + if o == nil || IsNil(o.Upstreams) { + return nil, false + } + return o.Upstreams, true +} + +// HasUpstreams returns a boolean if a field has been set. +func (o *ErrorLog) HasUpstreams() bool { + if o != nil && !IsNil(o.Upstreams) { + return true + } + + return false +} + +// SetUpstreams gets a reference to the given []ErrorLogUpstreamsInner and assigns it to the Upstreams field. +func (o *ErrorLog) SetUpstreams(v []ErrorLogUpstreamsInner) { + o.Upstreams = v +} + +func (o ErrorLog) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ErrorLog) 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.Upstreams) { + toSerialize["upstreams"] = o.Upstreams + } + return toSerialize, nil +} + +type NullableErrorLog struct { + value *ErrorLog + isSet bool +} + +func (v NullableErrorLog) Get() *ErrorLog { + return v.value +} + +func (v *NullableErrorLog) Set(val *ErrorLog) { + v.value = val + v.isSet = true +} + +func (v NullableErrorLog) IsSet() bool { + return v.isSet +} + +func (v *NullableErrorLog) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableErrorLog(val *ErrorLog) *NullableErrorLog { + return &NullableErrorLog{value: val, isSet: true} +} + +func (v NullableErrorLog) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableErrorLog) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_error_log_chart.go b/model_error_log_chart.go new file mode 100644 index 0000000..0daa67d --- /dev/null +++ b/model_error_log_chart.go @@ -0,0 +1,162 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the ErrorLogChart type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ErrorLogChart{} + +// ErrorLogChart struct for ErrorLogChart +type ErrorLogChart struct { + Statistics *ErrorLogChartStatistics `json:"statistics,omitempty"` + Charts *ErrorLogChartCharts `json:"charts,omitempty"` +} + +// NewErrorLogChart instantiates a new ErrorLogChart object +// This constructor will assign default values to properties that have it defined, +// 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 NewErrorLogChart() *ErrorLogChart { + this := ErrorLogChart{} + return &this +} + +// NewErrorLogChartWithDefaults instantiates a new ErrorLogChart object +// This 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 NewErrorLogChartWithDefaults() *ErrorLogChart { + this := ErrorLogChart{} + return &this +} + +// GetStatistics returns the Statistics field value if set, zero value otherwise. +func (o *ErrorLogChart) GetStatistics() ErrorLogChartStatistics { + if o == nil || IsNil(o.Statistics) { + var ret ErrorLogChartStatistics + return ret + } + return *o.Statistics +} + +// GetStatisticsOk returns a tuple with the Statistics field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ErrorLogChart) GetStatisticsOk() (*ErrorLogChartStatistics, bool) { + if o == nil || IsNil(o.Statistics) { + return nil, false + } + return o.Statistics, true +} + +// HasStatistics returns a boolean if a field has been set. +func (o *ErrorLogChart) HasStatistics() bool { + if o != nil && !IsNil(o.Statistics) { + return true + } + + return false +} + +// SetStatistics gets a reference to the given ErrorLogChartStatistics and assigns it to the Statistics field. +func (o *ErrorLogChart) SetStatistics(v ErrorLogChartStatistics) { + o.Statistics = &v +} + +// GetCharts returns the Charts field value if set, zero value otherwise. +func (o *ErrorLogChart) GetCharts() ErrorLogChartCharts { + if o == nil || IsNil(o.Charts) { + var ret ErrorLogChartCharts + return ret + } + return *o.Charts +} + +// GetChartsOk returns a tuple with the Charts field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ErrorLogChart) GetChartsOk() (*ErrorLogChartCharts, bool) { + if o == nil || IsNil(o.Charts) { + return nil, false + } + return o.Charts, true +} + +// HasCharts returns a boolean if a field has been set. +func (o *ErrorLogChart) HasCharts() bool { + if o != nil && !IsNil(o.Charts) { + return true + } + + return false +} + +// SetCharts gets a reference to the given ErrorLogChartCharts and assigns it to the Charts field. +func (o *ErrorLogChart) SetCharts(v ErrorLogChartCharts) { + o.Charts = &v +} + +func (o ErrorLogChart) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ErrorLogChart) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Statistics) { + toSerialize["statistics"] = o.Statistics + } + if !IsNil(o.Charts) { + toSerialize["charts"] = o.Charts + } + return toSerialize, nil +} + +type NullableErrorLogChart struct { + value *ErrorLogChart + isSet bool +} + +func (v NullableErrorLogChart) Get() *ErrorLogChart { + return v.value +} + +func (v *NullableErrorLogChart) Set(val *ErrorLogChart) { + v.value = val + v.isSet = true +} + +func (v NullableErrorLogChart) IsSet() bool { + return v.isSet +} + +func (v *NullableErrorLogChart) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableErrorLogChart(val *ErrorLogChart) *NullableErrorLogChart { + return &NullableErrorLogChart{value: val, isSet: true} +} + +func (v NullableErrorLogChart) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableErrorLogChart) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_error_log_chart_charts.go b/model_error_log_chart_charts.go new file mode 100644 index 0000000..7129896 --- /dev/null +++ b/model_error_log_chart_charts.go @@ -0,0 +1,126 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the ErrorLogChartCharts type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ErrorLogChartCharts{} + +// ErrorLogChartCharts struct for ErrorLogChartCharts +type ErrorLogChartCharts struct { + StatusCode *ErrorLogChartChartsStatusCode `json:"status_code,omitempty"` +} + +// NewErrorLogChartCharts instantiates a new ErrorLogChartCharts object +// This constructor will assign default values to properties that have it defined, +// 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 NewErrorLogChartCharts() *ErrorLogChartCharts { + this := ErrorLogChartCharts{} + return &this +} + +// NewErrorLogChartChartsWithDefaults instantiates a new ErrorLogChartCharts object +// This 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 NewErrorLogChartChartsWithDefaults() *ErrorLogChartCharts { + this := ErrorLogChartCharts{} + return &this +} + +// GetStatusCode returns the StatusCode field value if set, zero value otherwise. +func (o *ErrorLogChartCharts) GetStatusCode() ErrorLogChartChartsStatusCode { + if o == nil || IsNil(o.StatusCode) { + var ret ErrorLogChartChartsStatusCode + return ret + } + return *o.StatusCode +} + +// GetStatusCodeOk returns a tuple with the StatusCode field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ErrorLogChartCharts) GetStatusCodeOk() (*ErrorLogChartChartsStatusCode, bool) { + if o == nil || IsNil(o.StatusCode) { + return nil, false + } + return o.StatusCode, true +} + +// HasStatusCode returns a boolean if a field has been set. +func (o *ErrorLogChartCharts) HasStatusCode() bool { + if o != nil && !IsNil(o.StatusCode) { + return true + } + + return false +} + +// SetStatusCode gets a reference to the given ErrorLogChartChartsStatusCode and assigns it to the StatusCode field. +func (o *ErrorLogChartCharts) SetStatusCode(v ErrorLogChartChartsStatusCode) { + o.StatusCode = &v +} + +func (o ErrorLogChartCharts) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ErrorLogChartCharts) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.StatusCode) { + toSerialize["status_code"] = o.StatusCode + } + return toSerialize, nil +} + +type NullableErrorLogChartCharts struct { + value *ErrorLogChartCharts + isSet bool +} + +func (v NullableErrorLogChartCharts) Get() *ErrorLogChartCharts { + return v.value +} + +func (v *NullableErrorLogChartCharts) Set(val *ErrorLogChartCharts) { + v.value = val + v.isSet = true +} + +func (v NullableErrorLogChartCharts) IsSet() bool { + return v.isSet +} + +func (v *NullableErrorLogChartCharts) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableErrorLogChartCharts(val *ErrorLogChartCharts) *NullableErrorLogChartCharts { + return &NullableErrorLogChartCharts{value: val, isSet: true} +} + +func (v NullableErrorLogChartCharts) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableErrorLogChartCharts) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_error_log_chart_charts_status_code.go b/model_error_log_chart_charts_status_code.go new file mode 100644 index 0000000..089c8c9 --- /dev/null +++ b/model_error_log_chart_charts_status_code.go @@ -0,0 +1,199 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" + "time" +) + +// checks if the ErrorLogChartChartsStatusCode type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ErrorLogChartChartsStatusCode{} + +// ErrorLogChartChartsStatusCode struct for ErrorLogChartChartsStatusCode +type ErrorLogChartChartsStatusCode struct { + Title *string `json:"title,omitempty"` + Categories []time.Time `json:"categories,omitempty"` + Series []ErrorLogChartChartsStatusCodeSeriesInner `json:"series,omitempty"` +} + +// NewErrorLogChartChartsStatusCode instantiates a new ErrorLogChartChartsStatusCode object +// This constructor will assign default values to properties that have it defined, +// 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 NewErrorLogChartChartsStatusCode() *ErrorLogChartChartsStatusCode { + this := ErrorLogChartChartsStatusCode{} + return &this +} + +// NewErrorLogChartChartsStatusCodeWithDefaults instantiates a new ErrorLogChartChartsStatusCode object +// This 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 NewErrorLogChartChartsStatusCodeWithDefaults() *ErrorLogChartChartsStatusCode { + this := ErrorLogChartChartsStatusCode{} + return &this +} + +// GetTitle returns the Title field value if set, zero value otherwise. +func (o *ErrorLogChartChartsStatusCode) 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 *ErrorLogChartChartsStatusCode) 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 *ErrorLogChartChartsStatusCode) 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 *ErrorLogChartChartsStatusCode) SetTitle(v string) { + o.Title = &v +} + +// GetCategories returns the Categories field value if set, zero value otherwise. +func (o *ErrorLogChartChartsStatusCode) GetCategories() []time.Time { + if o == nil || IsNil(o.Categories) { + var ret []time.Time + return ret + } + return o.Categories +} + +// GetCategoriesOk returns a tuple with the Categories field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ErrorLogChartChartsStatusCode) GetCategoriesOk() ([]time.Time, bool) { + if o == nil || IsNil(o.Categories) { + return nil, false + } + return o.Categories, true +} + +// HasCategories returns a boolean if a field has been set. +func (o *ErrorLogChartChartsStatusCode) HasCategories() bool { + if o != nil && !IsNil(o.Categories) { + return true + } + + return false +} + +// SetCategories gets a reference to the given []time.Time and assigns it to the Categories field. +func (o *ErrorLogChartChartsStatusCode) SetCategories(v []time.Time) { + o.Categories = v +} + +// GetSeries returns the Series field value if set, zero value otherwise. +func (o *ErrorLogChartChartsStatusCode) GetSeries() []ErrorLogChartChartsStatusCodeSeriesInner { + if o == nil || IsNil(o.Series) { + var ret []ErrorLogChartChartsStatusCodeSeriesInner + return ret + } + return o.Series +} + +// GetSeriesOk returns a tuple with the Series field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ErrorLogChartChartsStatusCode) GetSeriesOk() ([]ErrorLogChartChartsStatusCodeSeriesInner, bool) { + if o == nil || IsNil(o.Series) { + return nil, false + } + return o.Series, true +} + +// HasSeries returns a boolean if a field has been set. +func (o *ErrorLogChartChartsStatusCode) HasSeries() bool { + if o != nil && !IsNil(o.Series) { + return true + } + + return false +} + +// SetSeries gets a reference to the given []ErrorLogChartChartsStatusCodeSeriesInner and assigns it to the Series field. +func (o *ErrorLogChartChartsStatusCode) SetSeries(v []ErrorLogChartChartsStatusCodeSeriesInner) { + o.Series = v +} + +func (o ErrorLogChartChartsStatusCode) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ErrorLogChartChartsStatusCode) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Title) { + toSerialize["title"] = o.Title + } + if !IsNil(o.Categories) { + toSerialize["categories"] = o.Categories + } + if !IsNil(o.Series) { + toSerialize["series"] = o.Series + } + return toSerialize, nil +} + +type NullableErrorLogChartChartsStatusCode struct { + value *ErrorLogChartChartsStatusCode + isSet bool +} + +func (v NullableErrorLogChartChartsStatusCode) Get() *ErrorLogChartChartsStatusCode { + return v.value +} + +func (v *NullableErrorLogChartChartsStatusCode) Set(val *ErrorLogChartChartsStatusCode) { + v.value = val + v.isSet = true +} + +func (v NullableErrorLogChartChartsStatusCode) IsSet() bool { + return v.isSet +} + +func (v *NullableErrorLogChartChartsStatusCode) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableErrorLogChartChartsStatusCode(val *ErrorLogChartChartsStatusCode) *NullableErrorLogChartChartsStatusCode { + return &NullableErrorLogChartChartsStatusCode{value: val, isSet: true} +} + +func (v NullableErrorLogChartChartsStatusCode) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableErrorLogChartChartsStatusCode) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_error_log_chart_charts_status_code_series_inner.go b/model_error_log_chart_charts_status_code_series_inner.go new file mode 100644 index 0000000..d23ec11 --- /dev/null +++ b/model_error_log_chart_charts_status_code_series_inner.go @@ -0,0 +1,163 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the ErrorLogChartChartsStatusCodeSeriesInner type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ErrorLogChartChartsStatusCodeSeriesInner{} + +// ErrorLogChartChartsStatusCodeSeriesInner struct for ErrorLogChartChartsStatusCodeSeriesInner +type ErrorLogChartChartsStatusCodeSeriesInner struct { + // The error message + Name *string `json:"name,omitempty"` + Data []int32 `json:"data,omitempty"` +} + +// NewErrorLogChartChartsStatusCodeSeriesInner instantiates a new ErrorLogChartChartsStatusCodeSeriesInner object +// This constructor will assign default values to properties that have it defined, +// 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 NewErrorLogChartChartsStatusCodeSeriesInner() *ErrorLogChartChartsStatusCodeSeriesInner { + this := ErrorLogChartChartsStatusCodeSeriesInner{} + return &this +} + +// NewErrorLogChartChartsStatusCodeSeriesInnerWithDefaults instantiates a new ErrorLogChartChartsStatusCodeSeriesInner object +// This 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 NewErrorLogChartChartsStatusCodeSeriesInnerWithDefaults() *ErrorLogChartChartsStatusCodeSeriesInner { + this := ErrorLogChartChartsStatusCodeSeriesInner{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *ErrorLogChartChartsStatusCodeSeriesInner) 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 *ErrorLogChartChartsStatusCodeSeriesInner) 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 *ErrorLogChartChartsStatusCodeSeriesInner) 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 *ErrorLogChartChartsStatusCodeSeriesInner) SetName(v string) { + o.Name = &v +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *ErrorLogChartChartsStatusCodeSeriesInner) GetData() []int32 { + if o == nil || IsNil(o.Data) { + var ret []int32 + return ret + } + return o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ErrorLogChartChartsStatusCodeSeriesInner) GetDataOk() ([]int32, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *ErrorLogChartChartsStatusCodeSeriesInner) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given []int32 and assigns it to the Data field. +func (o *ErrorLogChartChartsStatusCodeSeriesInner) SetData(v []int32) { + o.Data = v +} + +func (o ErrorLogChartChartsStatusCodeSeriesInner) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ErrorLogChartChartsStatusCodeSeriesInner) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + return toSerialize, nil +} + +type NullableErrorLogChartChartsStatusCodeSeriesInner struct { + value *ErrorLogChartChartsStatusCodeSeriesInner + isSet bool +} + +func (v NullableErrorLogChartChartsStatusCodeSeriesInner) Get() *ErrorLogChartChartsStatusCodeSeriesInner { + return v.value +} + +func (v *NullableErrorLogChartChartsStatusCodeSeriesInner) Set(val *ErrorLogChartChartsStatusCodeSeriesInner) { + v.value = val + v.isSet = true +} + +func (v NullableErrorLogChartChartsStatusCodeSeriesInner) IsSet() bool { + return v.isSet +} + +func (v *NullableErrorLogChartChartsStatusCodeSeriesInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableErrorLogChartChartsStatusCodeSeriesInner(val *ErrorLogChartChartsStatusCodeSeriesInner) *NullableErrorLogChartChartsStatusCodeSeriesInner { + return &NullableErrorLogChartChartsStatusCodeSeriesInner{value: val, isSet: true} +} + +func (v NullableErrorLogChartChartsStatusCodeSeriesInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableErrorLogChartChartsStatusCodeSeriesInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_error_log_chart_data.go b/model_error_log_chart_data.go new file mode 100644 index 0000000..551c4df --- /dev/null +++ b/model_error_log_chart_data.go @@ -0,0 +1,126 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the ErrorLogChartData type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ErrorLogChartData{} + +// ErrorLogChartData struct for ErrorLogChartData +type ErrorLogChartData struct { + Data *ErrorLogChart `json:"data,omitempty"` +} + +// NewErrorLogChartData instantiates a new ErrorLogChartData object +// This constructor will assign default values to properties that have it defined, +// 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 NewErrorLogChartData() *ErrorLogChartData { + this := ErrorLogChartData{} + return &this +} + +// NewErrorLogChartDataWithDefaults instantiates a new ErrorLogChartData object +// This 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 NewErrorLogChartDataWithDefaults() *ErrorLogChartData { + this := ErrorLogChartData{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *ErrorLogChartData) GetData() ErrorLogChart { + if o == nil || IsNil(o.Data) { + var ret ErrorLogChart + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ErrorLogChartData) GetDataOk() (*ErrorLogChart, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *ErrorLogChartData) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given ErrorLogChart and assigns it to the Data field. +func (o *ErrorLogChartData) SetData(v ErrorLogChart) { + o.Data = &v +} + +func (o ErrorLogChartData) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ErrorLogChartData) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + return toSerialize, nil +} + +type NullableErrorLogChartData struct { + value *ErrorLogChartData + isSet bool +} + +func (v NullableErrorLogChartData) Get() *ErrorLogChartData { + return v.value +} + +func (v *NullableErrorLogChartData) Set(val *ErrorLogChartData) { + v.value = val + v.isSet = true +} + +func (v NullableErrorLogChartData) IsSet() bool { + return v.isSet +} + +func (v *NullableErrorLogChartData) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableErrorLogChartData(val *ErrorLogChartData) *NullableErrorLogChartData { + return &NullableErrorLogChartData{value: val, isSet: true} +} + +func (v NullableErrorLogChartData) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableErrorLogChartData) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_error_log_chart_statistics.go b/model_error_log_chart_statistics.go new file mode 100644 index 0000000..4ec5851 --- /dev/null +++ b/model_error_log_chart_statistics.go @@ -0,0 +1,127 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the ErrorLogChartStatistics type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ErrorLogChartStatistics{} + +// ErrorLogChartStatistics struct for ErrorLogChartStatistics +type ErrorLogChartStatistics struct { + // where key is error and value is its count + StatusCodes map[string]interface{} `json:"status_codes,omitempty"` +} + +// NewErrorLogChartStatistics instantiates a new ErrorLogChartStatistics object +// This constructor will assign default values to properties that have it defined, +// 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 NewErrorLogChartStatistics() *ErrorLogChartStatistics { + this := ErrorLogChartStatistics{} + return &this +} + +// NewErrorLogChartStatisticsWithDefaults instantiates a new ErrorLogChartStatistics object +// This 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 NewErrorLogChartStatisticsWithDefaults() *ErrorLogChartStatistics { + this := ErrorLogChartStatistics{} + return &this +} + +// GetStatusCodes returns the StatusCodes field value if set, zero value otherwise. +func (o *ErrorLogChartStatistics) GetStatusCodes() map[string]interface{} { + if o == nil || IsNil(o.StatusCodes) { + var ret map[string]interface{} + return ret + } + return o.StatusCodes +} + +// GetStatusCodesOk returns a tuple with the StatusCodes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ErrorLogChartStatistics) GetStatusCodesOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.StatusCodes) { + return map[string]interface{}{}, false + } + return o.StatusCodes, true +} + +// HasStatusCodes returns a boolean if a field has been set. +func (o *ErrorLogChartStatistics) HasStatusCodes() bool { + if o != nil && !IsNil(o.StatusCodes) { + return true + } + + return false +} + +// SetStatusCodes gets a reference to the given map[string]interface{} and assigns it to the StatusCodes field. +func (o *ErrorLogChartStatistics) SetStatusCodes(v map[string]interface{}) { + o.StatusCodes = v +} + +func (o ErrorLogChartStatistics) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ErrorLogChartStatistics) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.StatusCodes) { + toSerialize["status_codes"] = o.StatusCodes + } + return toSerialize, nil +} + +type NullableErrorLogChartStatistics struct { + value *ErrorLogChartStatistics + isSet bool +} + +func (v NullableErrorLogChartStatistics) Get() *ErrorLogChartStatistics { + return v.value +} + +func (v *NullableErrorLogChartStatistics) Set(val *ErrorLogChartStatistics) { + v.value = val + v.isSet = true +} + +func (v NullableErrorLogChartStatistics) IsSet() bool { + return v.isSet +} + +func (v *NullableErrorLogChartStatistics) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableErrorLogChartStatistics(val *ErrorLogChartStatistics) *NullableErrorLogChartStatistics { + return &NullableErrorLogChartStatistics{value: val, isSet: true} +} + +func (v NullableErrorLogChartStatistics) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableErrorLogChartStatistics) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_error_log_upstreams_inner.go b/model_error_log_upstreams_inner.go new file mode 100644 index 0000000..807774f --- /dev/null +++ b/model_error_log_upstreams_inner.go @@ -0,0 +1,164 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the ErrorLogUpstreamsInner type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ErrorLogUpstreamsInner{} + +// ErrorLogUpstreamsInner struct for ErrorLogUpstreamsInner +type ErrorLogUpstreamsInner struct { + // The upstream's address + Address *string `json:"address,omitempty"` + // Error count per upstream + Count *int32 `json:"count,omitempty"` +} + +// NewErrorLogUpstreamsInner instantiates a new ErrorLogUpstreamsInner object +// This constructor will assign default values to properties that have it defined, +// 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 NewErrorLogUpstreamsInner() *ErrorLogUpstreamsInner { + this := ErrorLogUpstreamsInner{} + return &this +} + +// NewErrorLogUpstreamsInnerWithDefaults instantiates a new ErrorLogUpstreamsInner object +// This 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 NewErrorLogUpstreamsInnerWithDefaults() *ErrorLogUpstreamsInner { + this := ErrorLogUpstreamsInner{} + return &this +} + +// GetAddress returns the Address field value if set, zero value otherwise. +func (o *ErrorLogUpstreamsInner) GetAddress() string { + if o == nil || IsNil(o.Address) { + var ret string + return ret + } + return *o.Address +} + +// GetAddressOk returns a tuple with the Address field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ErrorLogUpstreamsInner) GetAddressOk() (*string, bool) { + if o == nil || IsNil(o.Address) { + return nil, false + } + return o.Address, true +} + +// HasAddress returns a boolean if a field has been set. +func (o *ErrorLogUpstreamsInner) HasAddress() bool { + if o != nil && !IsNil(o.Address) { + return true + } + + return false +} + +// SetAddress gets a reference to the given string and assigns it to the Address field. +func (o *ErrorLogUpstreamsInner) SetAddress(v string) { + o.Address = &v +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *ErrorLogUpstreamsInner) 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 *ErrorLogUpstreamsInner) 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 *ErrorLogUpstreamsInner) 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 *ErrorLogUpstreamsInner) SetCount(v int32) { + o.Count = &v +} + +func (o ErrorLogUpstreamsInner) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ErrorLogUpstreamsInner) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Address) { + toSerialize["address"] = o.Address + } + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + return toSerialize, nil +} + +type NullableErrorLogUpstreamsInner struct { + value *ErrorLogUpstreamsInner + isSet bool +} + +func (v NullableErrorLogUpstreamsInner) Get() *ErrorLogUpstreamsInner { + return v.value +} + +func (v *NullableErrorLogUpstreamsInner) Set(val *ErrorLogUpstreamsInner) { + v.value = val + v.isSet = true +} + +func (v NullableErrorLogUpstreamsInner) IsSet() bool { + return v.isSet +} + +func (v *NullableErrorLogUpstreamsInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableErrorLogUpstreamsInner(val *ErrorLogUpstreamsInner) *NullableErrorLogUpstreamsInner { + return &NullableErrorLogUpstreamsInner{value: val, isSet: true} +} + +func (v NullableErrorLogUpstreamsInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableErrorLogUpstreamsInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_error_logs_data.go b/model_error_logs_data.go new file mode 100644 index 0000000..a628f33 --- /dev/null +++ b/model_error_logs_data.go @@ -0,0 +1,126 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the ErrorLogsData type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ErrorLogsData{} + +// ErrorLogsData struct for ErrorLogsData +type ErrorLogsData struct { + Data []ErrorLog `json:"data,omitempty"` +} + +// NewErrorLogsData instantiates a new ErrorLogsData object +// This constructor will assign default values to properties that have it defined, +// 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 NewErrorLogsData() *ErrorLogsData { + this := ErrorLogsData{} + return &this +} + +// NewErrorLogsDataWithDefaults instantiates a new ErrorLogsData object +// This 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 NewErrorLogsDataWithDefaults() *ErrorLogsData { + this := ErrorLogsData{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *ErrorLogsData) GetData() []ErrorLog { + if o == nil || IsNil(o.Data) { + var ret []ErrorLog + return ret + } + return o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ErrorLogsData) GetDataOk() ([]ErrorLog, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *ErrorLogsData) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given []ErrorLog and assigns it to the Data field. +func (o *ErrorLogsData) SetData(v []ErrorLog) { + o.Data = v +} + +func (o ErrorLogsData) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ErrorLogsData) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + return toSerialize, nil +} + +type NullableErrorLogsData struct { + value *ErrorLogsData + isSet bool +} + +func (v NullableErrorLogsData) Get() *ErrorLogsData { + return v.value +} + +func (v *NullableErrorLogsData) Set(val *ErrorLogsData) { + v.value = val + v.isSet = true +} + +func (v NullableErrorLogsData) IsSet() bool { + return v.isSet +} + +func (v *NullableErrorLogsData) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableErrorLogsData(val *ErrorLogsData) *NullableErrorLogsData { + return &NullableErrorLogsData{value: val, isSet: true} +} + +func (v NullableErrorLogsData) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableErrorLogsData) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_estimated_cost.go b/model_estimated_cost.go new file mode 100644 index 0000000..0d8541c --- /dev/null +++ b/model_estimated_cost.go @@ -0,0 +1,198 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the EstimatedCost type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EstimatedCost{} + +// EstimatedCost struct for EstimatedCost +type EstimatedCost struct { + Period *string `json:"period,omitempty"` + Currency *string `json:"currency,omitempty"` + Value *float32 `json:"value,omitempty"` +} + +// NewEstimatedCost instantiates a new EstimatedCost object +// This constructor will assign default values to properties that have it defined, +// 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 NewEstimatedCost() *EstimatedCost { + this := EstimatedCost{} + return &this +} + +// NewEstimatedCostWithDefaults instantiates a new EstimatedCost object +// This 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 NewEstimatedCostWithDefaults() *EstimatedCost { + this := EstimatedCost{} + return &this +} + +// GetPeriod returns the Period field value if set, zero value otherwise. +func (o *EstimatedCost) GetPeriod() string { + if o == nil || IsNil(o.Period) { + var ret string + return ret + } + return *o.Period +} + +// GetPeriodOk returns a tuple with the Period field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EstimatedCost) GetPeriodOk() (*string, bool) { + if o == nil || IsNil(o.Period) { + return nil, false + } + return o.Period, true +} + +// HasPeriod returns a boolean if a field has been set. +func (o *EstimatedCost) HasPeriod() bool { + if o != nil && !IsNil(o.Period) { + return true + } + + return false +} + +// SetPeriod gets a reference to the given string and assigns it to the Period field. +func (o *EstimatedCost) SetPeriod(v string) { + o.Period = &v +} + +// GetCurrency returns the Currency field value if set, zero value otherwise. +func (o *EstimatedCost) GetCurrency() string { + if o == nil || IsNil(o.Currency) { + var ret string + return ret + } + return *o.Currency +} + +// GetCurrencyOk returns a tuple with the Currency field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EstimatedCost) GetCurrencyOk() (*string, bool) { + if o == nil || IsNil(o.Currency) { + return nil, false + } + return o.Currency, true +} + +// HasCurrency returns a boolean if a field has been set. +func (o *EstimatedCost) HasCurrency() bool { + if o != nil && !IsNil(o.Currency) { + return true + } + + return false +} + +// SetCurrency gets a reference to the given string and assigns it to the Currency field. +func (o *EstimatedCost) SetCurrency(v string) { + o.Currency = &v +} + +// GetValue returns the Value field value if set, zero value otherwise. +func (o *EstimatedCost) GetValue() float32 { + if o == nil || IsNil(o.Value) { + var ret float32 + return ret + } + return *o.Value +} + +// GetValueOk returns a tuple with the Value field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EstimatedCost) GetValueOk() (*float32, bool) { + if o == nil || IsNil(o.Value) { + return nil, false + } + return o.Value, true +} + +// HasValue returns a boolean if a field has been set. +func (o *EstimatedCost) HasValue() bool { + if o != nil && !IsNil(o.Value) { + return true + } + + return false +} + +// SetValue gets a reference to the given float32 and assigns it to the Value field. +func (o *EstimatedCost) SetValue(v float32) { + o.Value = &v +} + +func (o EstimatedCost) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EstimatedCost) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Period) { + toSerialize["period"] = o.Period + } + if !IsNil(o.Currency) { + toSerialize["currency"] = o.Currency + } + if !IsNil(o.Value) { + toSerialize["value"] = o.Value + } + return toSerialize, nil +} + +type NullableEstimatedCost struct { + value *EstimatedCost + isSet bool +} + +func (v NullableEstimatedCost) Get() *EstimatedCost { + return v.value +} + +func (v *NullableEstimatedCost) Set(val *EstimatedCost) { + v.value = val + v.isSet = true +} + +func (v NullableEstimatedCost) IsSet() bool { + return v.isSet +} + +func (v *NullableEstimatedCost) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEstimatedCost(val *EstimatedCost) *NullableEstimatedCost { + return &NullableEstimatedCost{value: val, isSet: true} +} + +func (v NullableEstimatedCost) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEstimatedCost) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_expected_response.go b/model_expected_response.go new file mode 100644 index 0000000..83e42c7 --- /dev/null +++ b/model_expected_response.go @@ -0,0 +1,199 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the ExpectedResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ExpectedResponse{} + +// ExpectedResponse struct for ExpectedResponse +type ExpectedResponse struct { + // List of expected http status code + Codes []int32 `json:"codes,omitempty"` + Headers *map[string][]string `json:"headers,omitempty"` + Body *string `json:"body,omitempty"` +} + +// NewExpectedResponse instantiates a new ExpectedResponse object +// This constructor will assign default values to properties that have it defined, +// 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 NewExpectedResponse() *ExpectedResponse { + this := ExpectedResponse{} + return &this +} + +// NewExpectedResponseWithDefaults instantiates a new ExpectedResponse object +// This 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 NewExpectedResponseWithDefaults() *ExpectedResponse { + this := ExpectedResponse{} + return &this +} + +// GetCodes returns the Codes field value if set, zero value otherwise. +func (o *ExpectedResponse) GetCodes() []int32 { + if o == nil || IsNil(o.Codes) { + var ret []int32 + return ret + } + return o.Codes +} + +// GetCodesOk returns a tuple with the Codes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExpectedResponse) GetCodesOk() ([]int32, bool) { + if o == nil || IsNil(o.Codes) { + return nil, false + } + return o.Codes, true +} + +// HasCodes returns a boolean if a field has been set. +func (o *ExpectedResponse) HasCodes() bool { + if o != nil && !IsNil(o.Codes) { + return true + } + + return false +} + +// SetCodes gets a reference to the given []int32 and assigns it to the Codes field. +func (o *ExpectedResponse) SetCodes(v []int32) { + o.Codes = v +} + +// GetHeaders returns the Headers field value if set, zero value otherwise. +func (o *ExpectedResponse) GetHeaders() map[string][]string { + if o == nil || IsNil(o.Headers) { + var ret map[string][]string + return ret + } + return *o.Headers +} + +// GetHeadersOk returns a tuple with the Headers field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExpectedResponse) GetHeadersOk() (*map[string][]string, bool) { + if o == nil || IsNil(o.Headers) { + return nil, false + } + return o.Headers, true +} + +// HasHeaders returns a boolean if a field has been set. +func (o *ExpectedResponse) HasHeaders() bool { + if o != nil && !IsNil(o.Headers) { + return true + } + + return false +} + +// SetHeaders gets a reference to the given map[string][]string and assigns it to the Headers field. +func (o *ExpectedResponse) SetHeaders(v map[string][]string) { + o.Headers = &v +} + +// GetBody returns the Body field value if set, zero value otherwise. +func (o *ExpectedResponse) GetBody() string { + if o == nil || IsNil(o.Body) { + var ret string + return ret + } + return *o.Body +} + +// GetBodyOk returns a tuple with the Body field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExpectedResponse) GetBodyOk() (*string, bool) { + if o == nil || IsNil(o.Body) { + return nil, false + } + return o.Body, true +} + +// HasBody returns a boolean if a field has been set. +func (o *ExpectedResponse) HasBody() bool { + if o != nil && !IsNil(o.Body) { + return true + } + + return false +} + +// SetBody gets a reference to the given string and assigns it to the Body field. +func (o *ExpectedResponse) SetBody(v string) { + o.Body = &v +} + +func (o ExpectedResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ExpectedResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Codes) { + toSerialize["codes"] = o.Codes + } + if !IsNil(o.Headers) { + toSerialize["headers"] = o.Headers + } + if !IsNil(o.Body) { + toSerialize["body"] = o.Body + } + return toSerialize, nil +} + +type NullableExpectedResponse struct { + value *ExpectedResponse + isSet bool +} + +func (v NullableExpectedResponse) Get() *ExpectedResponse { + return v.value +} + +func (v *NullableExpectedResponse) Set(val *ExpectedResponse) { + v.value = val + v.isSet = true +} + +func (v NullableExpectedResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableExpectedResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableExpectedResponse(val *ExpectedResponse) *NullableExpectedResponse { + return &NullableExpectedResponse{value: val, isSet: true} +} + +func (v NullableExpectedResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableExpectedResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_feature_definition.go b/model_feature_definition.go new file mode 100644 index 0000000..ed983d8 --- /dev/null +++ b/model_feature_definition.go @@ -0,0 +1,198 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the FeatureDefinition type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FeatureDefinition{} + +// FeatureDefinition struct for FeatureDefinition +type FeatureDefinition struct { + Id *string `json:"id,omitempty"` + Plans *FeatureDefinitionPlans `json:"plans,omitempty"` + Meta *FeatureDefinitionMeta `json:"meta,omitempty"` +} + +// NewFeatureDefinition instantiates a new FeatureDefinition object +// This constructor will assign default values to properties that have it defined, +// 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 NewFeatureDefinition() *FeatureDefinition { + this := FeatureDefinition{} + return &this +} + +// NewFeatureDefinitionWithDefaults instantiates a new FeatureDefinition object +// This 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 NewFeatureDefinitionWithDefaults() *FeatureDefinition { + this := FeatureDefinition{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *FeatureDefinition) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FeatureDefinition) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *FeatureDefinition) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *FeatureDefinition) SetId(v string) { + o.Id = &v +} + +// GetPlans returns the Plans field value if set, zero value otherwise. +func (o *FeatureDefinition) GetPlans() FeatureDefinitionPlans { + if o == nil || IsNil(o.Plans) { + var ret FeatureDefinitionPlans + return ret + } + return *o.Plans +} + +// GetPlansOk returns a tuple with the Plans field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FeatureDefinition) GetPlansOk() (*FeatureDefinitionPlans, bool) { + if o == nil || IsNil(o.Plans) { + return nil, false + } + return o.Plans, true +} + +// HasPlans returns a boolean if a field has been set. +func (o *FeatureDefinition) HasPlans() bool { + if o != nil && !IsNil(o.Plans) { + return true + } + + return false +} + +// SetPlans gets a reference to the given FeatureDefinitionPlans and assigns it to the Plans field. +func (o *FeatureDefinition) SetPlans(v FeatureDefinitionPlans) { + o.Plans = &v +} + +// GetMeta returns the Meta field value if set, zero value otherwise. +func (o *FeatureDefinition) GetMeta() FeatureDefinitionMeta { + if o == nil || IsNil(o.Meta) { + var ret FeatureDefinitionMeta + return ret + } + return *o.Meta +} + +// GetMetaOk returns a tuple with the Meta field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FeatureDefinition) GetMetaOk() (*FeatureDefinitionMeta, bool) { + if o == nil || IsNil(o.Meta) { + return nil, false + } + return o.Meta, true +} + +// HasMeta returns a boolean if a field has been set. +func (o *FeatureDefinition) HasMeta() bool { + if o != nil && !IsNil(o.Meta) { + return true + } + + return false +} + +// SetMeta gets a reference to the given FeatureDefinitionMeta and assigns it to the Meta field. +func (o *FeatureDefinition) SetMeta(v FeatureDefinitionMeta) { + o.Meta = &v +} + +func (o FeatureDefinition) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FeatureDefinition) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Plans) { + toSerialize["plans"] = o.Plans + } + if !IsNil(o.Meta) { + toSerialize["meta"] = o.Meta + } + return toSerialize, nil +} + +type NullableFeatureDefinition struct { + value *FeatureDefinition + isSet bool +} + +func (v NullableFeatureDefinition) Get() *FeatureDefinition { + return v.value +} + +func (v *NullableFeatureDefinition) Set(val *FeatureDefinition) { + v.value = val + v.isSet = true +} + +func (v NullableFeatureDefinition) IsSet() bool { + return v.isSet +} + +func (v *NullableFeatureDefinition) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFeatureDefinition(val *FeatureDefinition) *NullableFeatureDefinition { + return &NullableFeatureDefinition{value: val, isSet: true} +} + +func (v NullableFeatureDefinition) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFeatureDefinition) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_feature_definition_meta.go b/model_feature_definition_meta.go new file mode 100644 index 0000000..9dfc472 --- /dev/null +++ b/model_feature_definition_meta.go @@ -0,0 +1,162 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the FeatureDefinitionMeta type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FeatureDefinitionMeta{} + +// FeatureDefinitionMeta struct for FeatureDefinitionMeta +type FeatureDefinitionMeta struct { + Label *string `json:"label,omitempty"` + Description *string `json:"description,omitempty"` +} + +// NewFeatureDefinitionMeta instantiates a new FeatureDefinitionMeta object +// This constructor will assign default values to properties that have it defined, +// 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 NewFeatureDefinitionMeta() *FeatureDefinitionMeta { + this := FeatureDefinitionMeta{} + return &this +} + +// NewFeatureDefinitionMetaWithDefaults instantiates a new FeatureDefinitionMeta object +// This 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 NewFeatureDefinitionMetaWithDefaults() *FeatureDefinitionMeta { + this := FeatureDefinitionMeta{} + return &this +} + +// GetLabel returns the Label field value if set, zero value otherwise. +func (o *FeatureDefinitionMeta) GetLabel() string { + if o == nil || IsNil(o.Label) { + var ret string + return ret + } + return *o.Label +} + +// GetLabelOk returns a tuple with the Label field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FeatureDefinitionMeta) GetLabelOk() (*string, bool) { + if o == nil || IsNil(o.Label) { + return nil, false + } + return o.Label, true +} + +// HasLabel returns a boolean if a field has been set. +func (o *FeatureDefinitionMeta) HasLabel() bool { + if o != nil && !IsNil(o.Label) { + return true + } + + return false +} + +// SetLabel gets a reference to the given string and assigns it to the Label field. +func (o *FeatureDefinitionMeta) SetLabel(v string) { + o.Label = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *FeatureDefinitionMeta) 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 *FeatureDefinitionMeta) 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 *FeatureDefinitionMeta) 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 *FeatureDefinitionMeta) SetDescription(v string) { + o.Description = &v +} + +func (o FeatureDefinitionMeta) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FeatureDefinitionMeta) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Label) { + toSerialize["label"] = o.Label + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + return toSerialize, nil +} + +type NullableFeatureDefinitionMeta struct { + value *FeatureDefinitionMeta + isSet bool +} + +func (v NullableFeatureDefinitionMeta) Get() *FeatureDefinitionMeta { + return v.value +} + +func (v *NullableFeatureDefinitionMeta) Set(val *FeatureDefinitionMeta) { + v.value = val + v.isSet = true +} + +func (v NullableFeatureDefinitionMeta) IsSet() bool { + return v.isSet +} + +func (v *NullableFeatureDefinitionMeta) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFeatureDefinitionMeta(val *FeatureDefinitionMeta) *NullableFeatureDefinitionMeta { + return &NullableFeatureDefinitionMeta{value: val, isSet: true} +} + +func (v NullableFeatureDefinitionMeta) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFeatureDefinitionMeta) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_feature_definition_plans.go b/model_feature_definition_plans.go new file mode 100644 index 0000000..7c8d905 --- /dev/null +++ b/model_feature_definition_plans.go @@ -0,0 +1,320 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the FeatureDefinitionPlans type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FeatureDefinitionPlans{} + +// FeatureDefinitionPlans struct for FeatureDefinitionPlans +type FeatureDefinitionPlans struct { + Var0 NullableFeaturePlanDefinition `json:"0,omitempty"` + Var1 NullableFeaturePlanDefinition `json:"1,omitempty"` + Var2 NullableFeaturePlanDefinition `json:"2,omitempty"` + Var3 NullableFeaturePlanDefinition `json:"3,omitempty"` + Var4 NullableFeaturePlanDefinition `json:"4,omitempty"` +} + +// NewFeatureDefinitionPlans instantiates a new FeatureDefinitionPlans object +// This constructor will assign default values to properties that have it defined, +// 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 NewFeatureDefinitionPlans() *FeatureDefinitionPlans { + this := FeatureDefinitionPlans{} + return &this +} + +// NewFeatureDefinitionPlansWithDefaults instantiates a new FeatureDefinitionPlans object +// This 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 NewFeatureDefinitionPlansWithDefaults() *FeatureDefinitionPlans { + this := FeatureDefinitionPlans{} + return &this +} + +// GetVar0 returns the Var0 field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *FeatureDefinitionPlans) GetVar0() FeaturePlanDefinition { + if o == nil || IsNil(o.Var0.Get()) { + var ret FeaturePlanDefinition + return ret + } + return *o.Var0.Get() +} + +// GetVar0Ok returns a tuple with the Var0 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 *FeatureDefinitionPlans) GetVar0Ok() (*FeaturePlanDefinition, bool) { + if o == nil { + return nil, false + } + return o.Var0.Get(), o.Var0.IsSet() +} + +// HasVar0 returns a boolean if a field has been set. +func (o *FeatureDefinitionPlans) HasVar0() bool { + if o != nil && o.Var0.IsSet() { + return true + } + + return false +} + +// SetVar0 gets a reference to the given NullableFeaturePlanDefinition and assigns it to the Var0 field. +func (o *FeatureDefinitionPlans) SetVar0(v FeaturePlanDefinition) { + o.Var0.Set(&v) +} +// SetVar0Nil sets the value for Var0 to be an explicit nil +func (o *FeatureDefinitionPlans) SetVar0Nil() { + o.Var0.Set(nil) +} + +// UnsetVar0 ensures that no value is present for Var0, not even an explicit nil +func (o *FeatureDefinitionPlans) UnsetVar0() { + o.Var0.Unset() +} + +// GetVar1 returns the Var1 field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *FeatureDefinitionPlans) GetVar1() FeaturePlanDefinition { + if o == nil || IsNil(o.Var1.Get()) { + var ret FeaturePlanDefinition + return ret + } + return *o.Var1.Get() +} + +// GetVar1Ok returns a tuple with the Var1 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 *FeatureDefinitionPlans) GetVar1Ok() (*FeaturePlanDefinition, bool) { + if o == nil { + return nil, false + } + return o.Var1.Get(), o.Var1.IsSet() +} + +// HasVar1 returns a boolean if a field has been set. +func (o *FeatureDefinitionPlans) HasVar1() bool { + if o != nil && o.Var1.IsSet() { + return true + } + + return false +} + +// SetVar1 gets a reference to the given NullableFeaturePlanDefinition and assigns it to the Var1 field. +func (o *FeatureDefinitionPlans) SetVar1(v FeaturePlanDefinition) { + o.Var1.Set(&v) +} +// SetVar1Nil sets the value for Var1 to be an explicit nil +func (o *FeatureDefinitionPlans) SetVar1Nil() { + o.Var1.Set(nil) +} + +// UnsetVar1 ensures that no value is present for Var1, not even an explicit nil +func (o *FeatureDefinitionPlans) UnsetVar1() { + o.Var1.Unset() +} + +// GetVar2 returns the Var2 field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *FeatureDefinitionPlans) GetVar2() FeaturePlanDefinition { + if o == nil || IsNil(o.Var2.Get()) { + var ret FeaturePlanDefinition + return ret + } + return *o.Var2.Get() +} + +// GetVar2Ok returns a tuple with the Var2 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 *FeatureDefinitionPlans) GetVar2Ok() (*FeaturePlanDefinition, bool) { + if o == nil { + return nil, false + } + return o.Var2.Get(), o.Var2.IsSet() +} + +// HasVar2 returns a boolean if a field has been set. +func (o *FeatureDefinitionPlans) HasVar2() bool { + if o != nil && o.Var2.IsSet() { + return true + } + + return false +} + +// SetVar2 gets a reference to the given NullableFeaturePlanDefinition and assigns it to the Var2 field. +func (o *FeatureDefinitionPlans) SetVar2(v FeaturePlanDefinition) { + o.Var2.Set(&v) +} +// SetVar2Nil sets the value for Var2 to be an explicit nil +func (o *FeatureDefinitionPlans) SetVar2Nil() { + o.Var2.Set(nil) +} + +// UnsetVar2 ensures that no value is present for Var2, not even an explicit nil +func (o *FeatureDefinitionPlans) UnsetVar2() { + o.Var2.Unset() +} + +// GetVar3 returns the Var3 field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *FeatureDefinitionPlans) GetVar3() FeaturePlanDefinition { + if o == nil || IsNil(o.Var3.Get()) { + var ret FeaturePlanDefinition + return ret + } + return *o.Var3.Get() +} + +// GetVar3Ok returns a tuple with the Var3 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 *FeatureDefinitionPlans) GetVar3Ok() (*FeaturePlanDefinition, bool) { + if o == nil { + return nil, false + } + return o.Var3.Get(), o.Var3.IsSet() +} + +// HasVar3 returns a boolean if a field has been set. +func (o *FeatureDefinitionPlans) HasVar3() bool { + if o != nil && o.Var3.IsSet() { + return true + } + + return false +} + +// SetVar3 gets a reference to the given NullableFeaturePlanDefinition and assigns it to the Var3 field. +func (o *FeatureDefinitionPlans) SetVar3(v FeaturePlanDefinition) { + o.Var3.Set(&v) +} +// SetVar3Nil sets the value for Var3 to be an explicit nil +func (o *FeatureDefinitionPlans) SetVar3Nil() { + o.Var3.Set(nil) +} + +// UnsetVar3 ensures that no value is present for Var3, not even an explicit nil +func (o *FeatureDefinitionPlans) UnsetVar3() { + o.Var3.Unset() +} + +// GetVar4 returns the Var4 field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *FeatureDefinitionPlans) GetVar4() FeaturePlanDefinition { + if o == nil || IsNil(o.Var4.Get()) { + var ret FeaturePlanDefinition + return ret + } + return *o.Var4.Get() +} + +// GetVar4Ok returns a tuple with the Var4 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 *FeatureDefinitionPlans) GetVar4Ok() (*FeaturePlanDefinition, bool) { + if o == nil { + return nil, false + } + return o.Var4.Get(), o.Var4.IsSet() +} + +// HasVar4 returns a boolean if a field has been set. +func (o *FeatureDefinitionPlans) HasVar4() bool { + if o != nil && o.Var4.IsSet() { + return true + } + + return false +} + +// SetVar4 gets a reference to the given NullableFeaturePlanDefinition and assigns it to the Var4 field. +func (o *FeatureDefinitionPlans) SetVar4(v FeaturePlanDefinition) { + o.Var4.Set(&v) +} +// SetVar4Nil sets the value for Var4 to be an explicit nil +func (o *FeatureDefinitionPlans) SetVar4Nil() { + o.Var4.Set(nil) +} + +// UnsetVar4 ensures that no value is present for Var4, not even an explicit nil +func (o *FeatureDefinitionPlans) UnsetVar4() { + o.Var4.Unset() +} + +func (o FeatureDefinitionPlans) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FeatureDefinitionPlans) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.Var0.IsSet() { + toSerialize["0"] = o.Var0.Get() + } + if o.Var1.IsSet() { + toSerialize["1"] = o.Var1.Get() + } + if o.Var2.IsSet() { + toSerialize["2"] = o.Var2.Get() + } + if o.Var3.IsSet() { + toSerialize["3"] = o.Var3.Get() + } + if o.Var4.IsSet() { + toSerialize["4"] = o.Var4.Get() + } + return toSerialize, nil +} + +type NullableFeatureDefinitionPlans struct { + value *FeatureDefinitionPlans + isSet bool +} + +func (v NullableFeatureDefinitionPlans) Get() *FeatureDefinitionPlans { + return v.value +} + +func (v *NullableFeatureDefinitionPlans) Set(val *FeatureDefinitionPlans) { + v.value = val + v.isSet = true +} + +func (v NullableFeatureDefinitionPlans) IsSet() bool { + return v.isSet +} + +func (v *NullableFeatureDefinitionPlans) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFeatureDefinitionPlans(val *FeatureDefinitionPlans) *NullableFeatureDefinitionPlans { + return &NullableFeatureDefinitionPlans{value: val, isSet: true} +} + +func (v NullableFeatureDefinitionPlans) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFeatureDefinitionPlans) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_feature_plan_definition.go b/model_feature_plan_definition.go new file mode 100644 index 0000000..deafb9b --- /dev/null +++ b/model_feature_plan_definition.go @@ -0,0 +1,218 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the FeaturePlanDefinition type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FeaturePlanDefinition{} + +// FeaturePlanDefinition struct for FeaturePlanDefinition +type FeaturePlanDefinition struct { + Meta *FeaturePlanDefinitionMeta `json:"meta,omitempty"` + UsageLimit NullableUsageLimit `json:"usage_limit,omitempty"` + Pricing NullableFeaturePricing `json:"pricing,omitempty"` +} + +// NewFeaturePlanDefinition instantiates a new FeaturePlanDefinition object +// This constructor will assign default values to properties that have it defined, +// 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 NewFeaturePlanDefinition() *FeaturePlanDefinition { + this := FeaturePlanDefinition{} + return &this +} + +// NewFeaturePlanDefinitionWithDefaults instantiates a new FeaturePlanDefinition object +// This 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 NewFeaturePlanDefinitionWithDefaults() *FeaturePlanDefinition { + this := FeaturePlanDefinition{} + return &this +} + +// GetMeta returns the Meta field value if set, zero value otherwise. +func (o *FeaturePlanDefinition) GetMeta() FeaturePlanDefinitionMeta { + if o == nil || IsNil(o.Meta) { + var ret FeaturePlanDefinitionMeta + return ret + } + return *o.Meta +} + +// GetMetaOk returns a tuple with the Meta field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FeaturePlanDefinition) GetMetaOk() (*FeaturePlanDefinitionMeta, bool) { + if o == nil || IsNil(o.Meta) { + return nil, false + } + return o.Meta, true +} + +// HasMeta returns a boolean if a field has been set. +func (o *FeaturePlanDefinition) HasMeta() bool { + if o != nil && !IsNil(o.Meta) { + return true + } + + return false +} + +// SetMeta gets a reference to the given FeaturePlanDefinitionMeta and assigns it to the Meta field. +func (o *FeaturePlanDefinition) SetMeta(v FeaturePlanDefinitionMeta) { + o.Meta = &v +} + +// GetUsageLimit returns the UsageLimit field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *FeaturePlanDefinition) GetUsageLimit() UsageLimit { + if o == nil || IsNil(o.UsageLimit.Get()) { + var ret UsageLimit + return ret + } + return *o.UsageLimit.Get() +} + +// GetUsageLimitOk returns a tuple with the UsageLimit 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 *FeaturePlanDefinition) GetUsageLimitOk() (*UsageLimit, bool) { + if o == nil { + return nil, false + } + return o.UsageLimit.Get(), o.UsageLimit.IsSet() +} + +// HasUsageLimit returns a boolean if a field has been set. +func (o *FeaturePlanDefinition) HasUsageLimit() bool { + if o != nil && o.UsageLimit.IsSet() { + return true + } + + return false +} + +// SetUsageLimit gets a reference to the given NullableUsageLimit and assigns it to the UsageLimit field. +func (o *FeaturePlanDefinition) SetUsageLimit(v UsageLimit) { + o.UsageLimit.Set(&v) +} +// SetUsageLimitNil sets the value for UsageLimit to be an explicit nil +func (o *FeaturePlanDefinition) SetUsageLimitNil() { + o.UsageLimit.Set(nil) +} + +// UnsetUsageLimit ensures that no value is present for UsageLimit, not even an explicit nil +func (o *FeaturePlanDefinition) UnsetUsageLimit() { + o.UsageLimit.Unset() +} + +// GetPricing returns the Pricing field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *FeaturePlanDefinition) GetPricing() FeaturePricing { + if o == nil || IsNil(o.Pricing.Get()) { + var ret FeaturePricing + return ret + } + return *o.Pricing.Get() +} + +// GetPricingOk returns a tuple with the Pricing 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 *FeaturePlanDefinition) GetPricingOk() (*FeaturePricing, bool) { + if o == nil { + return nil, false + } + return o.Pricing.Get(), o.Pricing.IsSet() +} + +// HasPricing returns a boolean if a field has been set. +func (o *FeaturePlanDefinition) HasPricing() bool { + if o != nil && o.Pricing.IsSet() { + return true + } + + return false +} + +// SetPricing gets a reference to the given NullableFeaturePricing and assigns it to the Pricing field. +func (o *FeaturePlanDefinition) SetPricing(v FeaturePricing) { + o.Pricing.Set(&v) +} +// SetPricingNil sets the value for Pricing to be an explicit nil +func (o *FeaturePlanDefinition) SetPricingNil() { + o.Pricing.Set(nil) +} + +// UnsetPricing ensures that no value is present for Pricing, not even an explicit nil +func (o *FeaturePlanDefinition) UnsetPricing() { + o.Pricing.Unset() +} + +func (o FeaturePlanDefinition) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FeaturePlanDefinition) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Meta) { + toSerialize["meta"] = o.Meta + } + if o.UsageLimit.IsSet() { + toSerialize["usage_limit"] = o.UsageLimit.Get() + } + if o.Pricing.IsSet() { + toSerialize["pricing"] = o.Pricing.Get() + } + return toSerialize, nil +} + +type NullableFeaturePlanDefinition struct { + value *FeaturePlanDefinition + isSet bool +} + +func (v NullableFeaturePlanDefinition) Get() *FeaturePlanDefinition { + return v.value +} + +func (v *NullableFeaturePlanDefinition) Set(val *FeaturePlanDefinition) { + v.value = val + v.isSet = true +} + +func (v NullableFeaturePlanDefinition) IsSet() bool { + return v.isSet +} + +func (v *NullableFeaturePlanDefinition) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFeaturePlanDefinition(val *FeaturePlanDefinition) *NullableFeaturePlanDefinition { + return &NullableFeaturePlanDefinition{value: val, isSet: true} +} + +func (v NullableFeaturePlanDefinition) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFeaturePlanDefinition) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_feature_plan_definition_meta.go b/model_feature_plan_definition_meta.go new file mode 100644 index 0000000..61f6d97 --- /dev/null +++ b/model_feature_plan_definition_meta.go @@ -0,0 +1,162 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the FeaturePlanDefinitionMeta type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FeaturePlanDefinitionMeta{} + +// FeaturePlanDefinitionMeta struct for FeaturePlanDefinitionMeta +type FeaturePlanDefinitionMeta struct { + Labels []FeaturePlanDefinitionMetaLabelsInner `json:"labels,omitempty"` + Tip *string `json:"tip,omitempty"` +} + +// NewFeaturePlanDefinitionMeta instantiates a new FeaturePlanDefinitionMeta object +// This constructor will assign default values to properties that have it defined, +// 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 NewFeaturePlanDefinitionMeta() *FeaturePlanDefinitionMeta { + this := FeaturePlanDefinitionMeta{} + return &this +} + +// NewFeaturePlanDefinitionMetaWithDefaults instantiates a new FeaturePlanDefinitionMeta object +// This 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 NewFeaturePlanDefinitionMetaWithDefaults() *FeaturePlanDefinitionMeta { + this := FeaturePlanDefinitionMeta{} + return &this +} + +// GetLabels returns the Labels field value if set, zero value otherwise. +func (o *FeaturePlanDefinitionMeta) GetLabels() []FeaturePlanDefinitionMetaLabelsInner { + if o == nil || IsNil(o.Labels) { + var ret []FeaturePlanDefinitionMetaLabelsInner + return ret + } + return o.Labels +} + +// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FeaturePlanDefinitionMeta) GetLabelsOk() ([]FeaturePlanDefinitionMetaLabelsInner, bool) { + if o == nil || IsNil(o.Labels) { + return nil, false + } + return o.Labels, true +} + +// HasLabels returns a boolean if a field has been set. +func (o *FeaturePlanDefinitionMeta) HasLabels() bool { + if o != nil && !IsNil(o.Labels) { + return true + } + + return false +} + +// SetLabels gets a reference to the given []FeaturePlanDefinitionMetaLabelsInner and assigns it to the Labels field. +func (o *FeaturePlanDefinitionMeta) SetLabels(v []FeaturePlanDefinitionMetaLabelsInner) { + o.Labels = v +} + +// GetTip returns the Tip field value if set, zero value otherwise. +func (o *FeaturePlanDefinitionMeta) GetTip() string { + if o == nil || IsNil(o.Tip) { + var ret string + return ret + } + return *o.Tip +} + +// GetTipOk returns a tuple with the Tip field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FeaturePlanDefinitionMeta) GetTipOk() (*string, bool) { + if o == nil || IsNil(o.Tip) { + return nil, false + } + return o.Tip, true +} + +// HasTip returns a boolean if a field has been set. +func (o *FeaturePlanDefinitionMeta) HasTip() bool { + if o != nil && !IsNil(o.Tip) { + return true + } + + return false +} + +// SetTip gets a reference to the given string and assigns it to the Tip field. +func (o *FeaturePlanDefinitionMeta) SetTip(v string) { + o.Tip = &v +} + +func (o FeaturePlanDefinitionMeta) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FeaturePlanDefinitionMeta) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Labels) { + toSerialize["labels"] = o.Labels + } + if !IsNil(o.Tip) { + toSerialize["tip"] = o.Tip + } + return toSerialize, nil +} + +type NullableFeaturePlanDefinitionMeta struct { + value *FeaturePlanDefinitionMeta + isSet bool +} + +func (v NullableFeaturePlanDefinitionMeta) Get() *FeaturePlanDefinitionMeta { + return v.value +} + +func (v *NullableFeaturePlanDefinitionMeta) Set(val *FeaturePlanDefinitionMeta) { + v.value = val + v.isSet = true +} + +func (v NullableFeaturePlanDefinitionMeta) IsSet() bool { + return v.isSet +} + +func (v *NullableFeaturePlanDefinitionMeta) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFeaturePlanDefinitionMeta(val *FeaturePlanDefinitionMeta) *NullableFeaturePlanDefinitionMeta { + return &NullableFeaturePlanDefinitionMeta{value: val, isSet: true} +} + +func (v NullableFeaturePlanDefinitionMeta) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFeaturePlanDefinitionMeta) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_feature_plan_definition_meta_labels_inner.go b/model_feature_plan_definition_meta_labels_inner.go new file mode 100644 index 0000000..bb82251 --- /dev/null +++ b/model_feature_plan_definition_meta_labels_inner.go @@ -0,0 +1,105 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" + "fmt" +) + +// FeaturePlanDefinitionMetaLabelsInner struct for FeaturePlanDefinitionMetaLabelsInner +type FeaturePlanDefinitionMetaLabelsInner struct { + bool *bool + string *string +} + +// Unmarshal JSON data into any of the pointers in the struct +func (dst *FeaturePlanDefinitionMetaLabelsInner) UnmarshalJSON(data []byte) error { + var err error + // try to unmarshal JSON data into bool + err = json.Unmarshal(data, &dst.bool); + if err == nil { + jsonbool, _ := json.Marshal(dst.bool) + if string(jsonbool) == "{}" { // empty struct + dst.bool = nil + } else { + return nil // data stored in dst.bool, return on the first match + } + } else { + dst.bool = 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(FeaturePlanDefinitionMetaLabelsInner)") +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src *FeaturePlanDefinitionMetaLabelsInner) MarshalJSON() ([]byte, error) { + if src.bool != nil { + return json.Marshal(&src.bool) + } + + if src.string != nil { + return json.Marshal(&src.string) + } + + return nil, nil // no data in anyOf schemas +} + +type NullableFeaturePlanDefinitionMetaLabelsInner struct { + value *FeaturePlanDefinitionMetaLabelsInner + isSet bool +} + +func (v NullableFeaturePlanDefinitionMetaLabelsInner) Get() *FeaturePlanDefinitionMetaLabelsInner { + return v.value +} + +func (v *NullableFeaturePlanDefinitionMetaLabelsInner) Set(val *FeaturePlanDefinitionMetaLabelsInner) { + v.value = val + v.isSet = true +} + +func (v NullableFeaturePlanDefinitionMetaLabelsInner) IsSet() bool { + return v.isSet +} + +func (v *NullableFeaturePlanDefinitionMetaLabelsInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFeaturePlanDefinitionMetaLabelsInner(val *FeaturePlanDefinitionMetaLabelsInner) *NullableFeaturePlanDefinitionMetaLabelsInner { + return &NullableFeaturePlanDefinitionMetaLabelsInner{value: val, isSet: true} +} + +func (v NullableFeaturePlanDefinitionMetaLabelsInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFeaturePlanDefinitionMetaLabelsInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_feature_price.go b/model_feature_price.go new file mode 100644 index 0000000..15117cb --- /dev/null +++ b/model_feature_price.go @@ -0,0 +1,198 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the FeaturePrice type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FeaturePrice{} + +// FeaturePrice struct for FeaturePrice +type FeaturePrice struct { + MetricKey *string `json:"metric_key,omitempty"` + Currency *string `json:"currency,omitempty"` + Value *float32 `json:"value,omitempty"` +} + +// NewFeaturePrice instantiates a new FeaturePrice object +// This constructor will assign default values to properties that have it defined, +// 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 NewFeaturePrice() *FeaturePrice { + this := FeaturePrice{} + return &this +} + +// NewFeaturePriceWithDefaults instantiates a new FeaturePrice object +// This 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 NewFeaturePriceWithDefaults() *FeaturePrice { + this := FeaturePrice{} + return &this +} + +// GetMetricKey returns the MetricKey field value if set, zero value otherwise. +func (o *FeaturePrice) GetMetricKey() string { + if o == nil || IsNil(o.MetricKey) { + var ret string + return ret + } + return *o.MetricKey +} + +// GetMetricKeyOk returns a tuple with the MetricKey field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FeaturePrice) GetMetricKeyOk() (*string, bool) { + if o == nil || IsNil(o.MetricKey) { + return nil, false + } + return o.MetricKey, true +} + +// HasMetricKey returns a boolean if a field has been set. +func (o *FeaturePrice) HasMetricKey() bool { + if o != nil && !IsNil(o.MetricKey) { + return true + } + + return false +} + +// SetMetricKey gets a reference to the given string and assigns it to the MetricKey field. +func (o *FeaturePrice) SetMetricKey(v string) { + o.MetricKey = &v +} + +// GetCurrency returns the Currency field value if set, zero value otherwise. +func (o *FeaturePrice) GetCurrency() string { + if o == nil || IsNil(o.Currency) { + var ret string + return ret + } + return *o.Currency +} + +// GetCurrencyOk returns a tuple with the Currency field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FeaturePrice) GetCurrencyOk() (*string, bool) { + if o == nil || IsNil(o.Currency) { + return nil, false + } + return o.Currency, true +} + +// HasCurrency returns a boolean if a field has been set. +func (o *FeaturePrice) HasCurrency() bool { + if o != nil && !IsNil(o.Currency) { + return true + } + + return false +} + +// SetCurrency gets a reference to the given string and assigns it to the Currency field. +func (o *FeaturePrice) SetCurrency(v string) { + o.Currency = &v +} + +// GetValue returns the Value field value if set, zero value otherwise. +func (o *FeaturePrice) GetValue() float32 { + if o == nil || IsNil(o.Value) { + var ret float32 + return ret + } + return *o.Value +} + +// GetValueOk returns a tuple with the Value field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FeaturePrice) GetValueOk() (*float32, bool) { + if o == nil || IsNil(o.Value) { + return nil, false + } + return o.Value, true +} + +// HasValue returns a boolean if a field has been set. +func (o *FeaturePrice) HasValue() bool { + if o != nil && !IsNil(o.Value) { + return true + } + + return false +} + +// SetValue gets a reference to the given float32 and assigns it to the Value field. +func (o *FeaturePrice) SetValue(v float32) { + o.Value = &v +} + +func (o FeaturePrice) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FeaturePrice) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.MetricKey) { + toSerialize["metric_key"] = o.MetricKey + } + if !IsNil(o.Currency) { + toSerialize["currency"] = o.Currency + } + if !IsNil(o.Value) { + toSerialize["value"] = o.Value + } + return toSerialize, nil +} + +type NullableFeaturePrice struct { + value *FeaturePrice + isSet bool +} + +func (v NullableFeaturePrice) Get() *FeaturePrice { + return v.value +} + +func (v *NullableFeaturePrice) Set(val *FeaturePrice) { + v.value = val + v.isSet = true +} + +func (v NullableFeaturePrice) IsSet() bool { + return v.isSet +} + +func (v *NullableFeaturePrice) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFeaturePrice(val *FeaturePrice) *NullableFeaturePrice { + return &NullableFeaturePrice{value: val, isSet: true} +} + +func (v NullableFeaturePrice) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFeaturePrice) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_feature_pricing.go b/model_feature_pricing.go new file mode 100644 index 0000000..99cb4a4 --- /dev/null +++ b/model_feature_pricing.go @@ -0,0 +1,218 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the FeaturePricing type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FeaturePricing{} + +// FeaturePricing struct for FeaturePricing +type FeaturePricing struct { + FreeTier *int32 `json:"free_tier,omitempty"` + Flat NullableFeaturePrice `json:"flat,omitempty"` + PerUnit NullableFeaturePrice `json:"per_unit,omitempty"` +} + +// NewFeaturePricing instantiates a new FeaturePricing object +// This constructor will assign default values to properties that have it defined, +// 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 NewFeaturePricing() *FeaturePricing { + this := FeaturePricing{} + return &this +} + +// NewFeaturePricingWithDefaults instantiates a new FeaturePricing object +// This 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 NewFeaturePricingWithDefaults() *FeaturePricing { + this := FeaturePricing{} + return &this +} + +// GetFreeTier returns the FreeTier field value if set, zero value otherwise. +func (o *FeaturePricing) GetFreeTier() int32 { + if o == nil || IsNil(o.FreeTier) { + var ret int32 + return ret + } + return *o.FreeTier +} + +// GetFreeTierOk returns a tuple with the FreeTier field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FeaturePricing) GetFreeTierOk() (*int32, bool) { + if o == nil || IsNil(o.FreeTier) { + return nil, false + } + return o.FreeTier, true +} + +// HasFreeTier returns a boolean if a field has been set. +func (o *FeaturePricing) HasFreeTier() bool { + if o != nil && !IsNil(o.FreeTier) { + return true + } + + return false +} + +// SetFreeTier gets a reference to the given int32 and assigns it to the FreeTier field. +func (o *FeaturePricing) SetFreeTier(v int32) { + o.FreeTier = &v +} + +// GetFlat returns the Flat field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *FeaturePricing) GetFlat() FeaturePrice { + if o == nil || IsNil(o.Flat.Get()) { + var ret FeaturePrice + return ret + } + return *o.Flat.Get() +} + +// GetFlatOk returns a tuple with the Flat 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 *FeaturePricing) GetFlatOk() (*FeaturePrice, bool) { + if o == nil { + return nil, false + } + return o.Flat.Get(), o.Flat.IsSet() +} + +// HasFlat returns a boolean if a field has been set. +func (o *FeaturePricing) HasFlat() bool { + if o != nil && o.Flat.IsSet() { + return true + } + + return false +} + +// SetFlat gets a reference to the given NullableFeaturePrice and assigns it to the Flat field. +func (o *FeaturePricing) SetFlat(v FeaturePrice) { + o.Flat.Set(&v) +} +// SetFlatNil sets the value for Flat to be an explicit nil +func (o *FeaturePricing) SetFlatNil() { + o.Flat.Set(nil) +} + +// UnsetFlat ensures that no value is present for Flat, not even an explicit nil +func (o *FeaturePricing) UnsetFlat() { + o.Flat.Unset() +} + +// GetPerUnit returns the PerUnit field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *FeaturePricing) GetPerUnit() FeaturePrice { + if o == nil || IsNil(o.PerUnit.Get()) { + var ret FeaturePrice + return ret + } + return *o.PerUnit.Get() +} + +// GetPerUnitOk returns a tuple with the PerUnit 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 *FeaturePricing) GetPerUnitOk() (*FeaturePrice, bool) { + if o == nil { + return nil, false + } + return o.PerUnit.Get(), o.PerUnit.IsSet() +} + +// HasPerUnit returns a boolean if a field has been set. +func (o *FeaturePricing) HasPerUnit() bool { + if o != nil && o.PerUnit.IsSet() { + return true + } + + return false +} + +// SetPerUnit gets a reference to the given NullableFeaturePrice and assigns it to the PerUnit field. +func (o *FeaturePricing) SetPerUnit(v FeaturePrice) { + o.PerUnit.Set(&v) +} +// SetPerUnitNil sets the value for PerUnit to be an explicit nil +func (o *FeaturePricing) SetPerUnitNil() { + o.PerUnit.Set(nil) +} + +// UnsetPerUnit ensures that no value is present for PerUnit, not even an explicit nil +func (o *FeaturePricing) UnsetPerUnit() { + o.PerUnit.Unset() +} + +func (o FeaturePricing) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FeaturePricing) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.FreeTier) { + toSerialize["free_tier"] = o.FreeTier + } + if o.Flat.IsSet() { + toSerialize["flat"] = o.Flat.Get() + } + if o.PerUnit.IsSet() { + toSerialize["per_unit"] = o.PerUnit.Get() + } + return toSerialize, nil +} + +type NullableFeaturePricing struct { + value *FeaturePricing + isSet bool +} + +func (v NullableFeaturePricing) Get() *FeaturePricing { + return v.value +} + +func (v *NullableFeaturePricing) Set(val *FeaturePricing) { + v.value = val + v.isSet = true +} + +func (v NullableFeaturePricing) IsSet() bool { + return v.isSet +} + +func (v *NullableFeaturePricing) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFeaturePricing(val *FeaturePricing) *NullableFeaturePricing { + return &NullableFeaturePricing{value: val, isSet: true} +} + +func (v NullableFeaturePricing) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFeaturePricing) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_feature_set.go b/model_feature_set.go new file mode 100644 index 0000000..6f58399 --- /dev/null +++ b/model_feature_set.go @@ -0,0 +1,198 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the FeatureSet type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FeatureSet{} + +// FeatureSet struct for FeatureSet +type FeatureSet struct { + Id *string `json:"id,omitempty"` + Label *string `json:"label,omitempty"` + Features []FeatureDefinition `json:"features,omitempty"` +} + +// NewFeatureSet instantiates a new FeatureSet object +// This constructor will assign default values to properties that have it defined, +// 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 NewFeatureSet() *FeatureSet { + this := FeatureSet{} + return &this +} + +// NewFeatureSetWithDefaults instantiates a new FeatureSet object +// This 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 NewFeatureSetWithDefaults() *FeatureSet { + this := FeatureSet{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *FeatureSet) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FeatureSet) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *FeatureSet) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *FeatureSet) SetId(v string) { + o.Id = &v +} + +// GetLabel returns the Label field value if set, zero value otherwise. +func (o *FeatureSet) GetLabel() string { + if o == nil || IsNil(o.Label) { + var ret string + return ret + } + return *o.Label +} + +// GetLabelOk returns a tuple with the Label field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FeatureSet) GetLabelOk() (*string, bool) { + if o == nil || IsNil(o.Label) { + return nil, false + } + return o.Label, true +} + +// HasLabel returns a boolean if a field has been set. +func (o *FeatureSet) HasLabel() bool { + if o != nil && !IsNil(o.Label) { + return true + } + + return false +} + +// SetLabel gets a reference to the given string and assigns it to the Label field. +func (o *FeatureSet) SetLabel(v string) { + o.Label = &v +} + +// GetFeatures returns the Features field value if set, zero value otherwise. +func (o *FeatureSet) GetFeatures() []FeatureDefinition { + if o == nil || IsNil(o.Features) { + var ret []FeatureDefinition + return ret + } + return o.Features +} + +// GetFeaturesOk returns a tuple with the Features field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FeatureSet) GetFeaturesOk() ([]FeatureDefinition, bool) { + if o == nil || IsNil(o.Features) { + return nil, false + } + return o.Features, true +} + +// HasFeatures returns a boolean if a field has been set. +func (o *FeatureSet) HasFeatures() bool { + if o != nil && !IsNil(o.Features) { + return true + } + + return false +} + +// SetFeatures gets a reference to the given []FeatureDefinition and assigns it to the Features field. +func (o *FeatureSet) SetFeatures(v []FeatureDefinition) { + o.Features = v +} + +func (o FeatureSet) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FeatureSet) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Label) { + toSerialize["label"] = o.Label + } + if !IsNil(o.Features) { + toSerialize["features"] = o.Features + } + return toSerialize, nil +} + +type NullableFeatureSet struct { + value *FeatureSet + isSet bool +} + +func (v NullableFeatureSet) Get() *FeatureSet { + return v.value +} + +func (v *NullableFeatureSet) Set(val *FeatureSet) { + v.value = val + v.isSet = true +} + +func (v NullableFeatureSet) IsSet() bool { + return v.isSet +} + +func (v *NullableFeatureSet) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFeatureSet(val *FeatureSet) *NullableFeatureSet { + return &NullableFeatureSet{value: val, isSet: true} +} + +func (v NullableFeatureSet) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFeatureSet) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_feature_sets.go b/model_feature_sets.go new file mode 100644 index 0000000..932a24c --- /dev/null +++ b/model_feature_sets.go @@ -0,0 +1,198 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the FeatureSets type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FeatureSets{} + +// FeatureSets struct for FeatureSets +type FeatureSets struct { + Currency *Currency `json:"currency,omitempty"` + Plans []PlanInfo `json:"plans,omitempty"` + FeatureSets []FeatureSet `json:"feature_sets,omitempty"` +} + +// NewFeatureSets instantiates a new FeatureSets object +// This constructor will assign default values to properties that have it defined, +// 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 NewFeatureSets() *FeatureSets { + this := FeatureSets{} + return &this +} + +// NewFeatureSetsWithDefaults instantiates a new FeatureSets object +// This 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 NewFeatureSetsWithDefaults() *FeatureSets { + this := FeatureSets{} + return &this +} + +// GetCurrency returns the Currency field value if set, zero value otherwise. +func (o *FeatureSets) GetCurrency() Currency { + if o == nil || IsNil(o.Currency) { + var ret Currency + return ret + } + return *o.Currency +} + +// GetCurrencyOk returns a tuple with the Currency field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FeatureSets) GetCurrencyOk() (*Currency, bool) { + if o == nil || IsNil(o.Currency) { + return nil, false + } + return o.Currency, true +} + +// HasCurrency returns a boolean if a field has been set. +func (o *FeatureSets) HasCurrency() bool { + if o != nil && !IsNil(o.Currency) { + return true + } + + return false +} + +// SetCurrency gets a reference to the given Currency and assigns it to the Currency field. +func (o *FeatureSets) SetCurrency(v Currency) { + o.Currency = &v +} + +// GetPlans returns the Plans field value if set, zero value otherwise. +func (o *FeatureSets) GetPlans() []PlanInfo { + if o == nil || IsNil(o.Plans) { + var ret []PlanInfo + return ret + } + return o.Plans +} + +// GetPlansOk returns a tuple with the Plans field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FeatureSets) GetPlansOk() ([]PlanInfo, bool) { + if o == nil || IsNil(o.Plans) { + return nil, false + } + return o.Plans, true +} + +// HasPlans returns a boolean if a field has been set. +func (o *FeatureSets) HasPlans() bool { + if o != nil && !IsNil(o.Plans) { + return true + } + + return false +} + +// SetPlans gets a reference to the given []PlanInfo and assigns it to the Plans field. +func (o *FeatureSets) SetPlans(v []PlanInfo) { + o.Plans = v +} + +// GetFeatureSets returns the FeatureSets field value if set, zero value otherwise. +func (o *FeatureSets) GetFeatureSets() []FeatureSet { + if o == nil || IsNil(o.FeatureSets) { + var ret []FeatureSet + return ret + } + return o.FeatureSets +} + +// GetFeatureSetsOk returns a tuple with the FeatureSets field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FeatureSets) GetFeatureSetsOk() ([]FeatureSet, bool) { + if o == nil || IsNil(o.FeatureSets) { + return nil, false + } + return o.FeatureSets, true +} + +// HasFeatureSets returns a boolean if a field has been set. +func (o *FeatureSets) HasFeatureSets() bool { + if o != nil && !IsNil(o.FeatureSets) { + return true + } + + return false +} + +// SetFeatureSets gets a reference to the given []FeatureSet and assigns it to the FeatureSets field. +func (o *FeatureSets) SetFeatureSets(v []FeatureSet) { + o.FeatureSets = v +} + +func (o FeatureSets) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FeatureSets) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Currency) { + toSerialize["currency"] = o.Currency + } + if !IsNil(o.Plans) { + toSerialize["plans"] = o.Plans + } + if !IsNil(o.FeatureSets) { + toSerialize["feature_sets"] = o.FeatureSets + } + return toSerialize, nil +} + +type NullableFeatureSets struct { + value *FeatureSets + isSet bool +} + +func (v NullableFeatureSets) Get() *FeatureSets { + return v.value +} + +func (v *NullableFeatureSets) Set(val *FeatureSets) { + v.value = val + v.isSet = true +} + +func (v NullableFeatureSets) IsSet() bool { + return v.isSet +} + +func (v *NullableFeatureSets) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFeatureSets(val *FeatureSets) *NullableFeatureSets { + return &NullableFeatureSets{value: val, isSet: true} +} + +func (v NullableFeatureSets) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFeatureSets) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_feature_usage.go b/model_feature_usage.go new file mode 100644 index 0000000..11a309b --- /dev/null +++ b/model_feature_usage.go @@ -0,0 +1,244 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the FeatureUsage type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FeatureUsage{} + +// FeatureUsage struct for FeatureUsage +type FeatureUsage struct { + FeatureId *string `json:"feature_id,omitempty"` + Pricing NullableFeaturePricing `json:"pricing,omitempty"` + EstimatedCost *EstimatedCost `json:"estimated_cost,omitempty"` + Usage *float32 `json:"usage,omitempty"` +} + +// NewFeatureUsage instantiates a new FeatureUsage object +// This constructor will assign default values to properties that have it defined, +// 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 NewFeatureUsage() *FeatureUsage { + this := FeatureUsage{} + return &this +} + +// NewFeatureUsageWithDefaults instantiates a new FeatureUsage object +// This 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 NewFeatureUsageWithDefaults() *FeatureUsage { + this := FeatureUsage{} + return &this +} + +// GetFeatureId returns the FeatureId field value if set, zero value otherwise. +func (o *FeatureUsage) GetFeatureId() string { + if o == nil || IsNil(o.FeatureId) { + var ret string + return ret + } + return *o.FeatureId +} + +// GetFeatureIdOk returns a tuple with the FeatureId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FeatureUsage) GetFeatureIdOk() (*string, bool) { + if o == nil || IsNil(o.FeatureId) { + return nil, false + } + return o.FeatureId, true +} + +// HasFeatureId returns a boolean if a field has been set. +func (o *FeatureUsage) HasFeatureId() bool { + if o != nil && !IsNil(o.FeatureId) { + return true + } + + return false +} + +// SetFeatureId gets a reference to the given string and assigns it to the FeatureId field. +func (o *FeatureUsage) SetFeatureId(v string) { + o.FeatureId = &v +} + +// GetPricing returns the Pricing field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *FeatureUsage) GetPricing() FeaturePricing { + if o == nil || IsNil(o.Pricing.Get()) { + var ret FeaturePricing + return ret + } + return *o.Pricing.Get() +} + +// GetPricingOk returns a tuple with the Pricing 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 *FeatureUsage) GetPricingOk() (*FeaturePricing, bool) { + if o == nil { + return nil, false + } + return o.Pricing.Get(), o.Pricing.IsSet() +} + +// HasPricing returns a boolean if a field has been set. +func (o *FeatureUsage) HasPricing() bool { + if o != nil && o.Pricing.IsSet() { + return true + } + + return false +} + +// SetPricing gets a reference to the given NullableFeaturePricing and assigns it to the Pricing field. +func (o *FeatureUsage) SetPricing(v FeaturePricing) { + o.Pricing.Set(&v) +} +// SetPricingNil sets the value for Pricing to be an explicit nil +func (o *FeatureUsage) SetPricingNil() { + o.Pricing.Set(nil) +} + +// UnsetPricing ensures that no value is present for Pricing, not even an explicit nil +func (o *FeatureUsage) UnsetPricing() { + o.Pricing.Unset() +} + +// GetEstimatedCost returns the EstimatedCost field value if set, zero value otherwise. +func (o *FeatureUsage) GetEstimatedCost() EstimatedCost { + if o == nil || IsNil(o.EstimatedCost) { + var ret EstimatedCost + return ret + } + return *o.EstimatedCost +} + +// GetEstimatedCostOk returns a tuple with the EstimatedCost field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FeatureUsage) GetEstimatedCostOk() (*EstimatedCost, bool) { + if o == nil || IsNil(o.EstimatedCost) { + return nil, false + } + return o.EstimatedCost, true +} + +// HasEstimatedCost returns a boolean if a field has been set. +func (o *FeatureUsage) HasEstimatedCost() bool { + if o != nil && !IsNil(o.EstimatedCost) { + return true + } + + return false +} + +// SetEstimatedCost gets a reference to the given EstimatedCost and assigns it to the EstimatedCost field. +func (o *FeatureUsage) SetEstimatedCost(v EstimatedCost) { + o.EstimatedCost = &v +} + +// GetUsage returns the Usage field value if set, zero value otherwise. +func (o *FeatureUsage) GetUsage() float32 { + if o == nil || IsNil(o.Usage) { + var ret float32 + return ret + } + return *o.Usage +} + +// GetUsageOk returns a tuple with the Usage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FeatureUsage) GetUsageOk() (*float32, bool) { + if o == nil || IsNil(o.Usage) { + return nil, false + } + return o.Usage, true +} + +// HasUsage returns a boolean if a field has been set. +func (o *FeatureUsage) HasUsage() bool { + if o != nil && !IsNil(o.Usage) { + return true + } + + return false +} + +// SetUsage gets a reference to the given float32 and assigns it to the Usage field. +func (o *FeatureUsage) SetUsage(v float32) { + o.Usage = &v +} + +func (o FeatureUsage) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FeatureUsage) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.FeatureId) { + toSerialize["feature_id"] = o.FeatureId + } + if o.Pricing.IsSet() { + toSerialize["pricing"] = o.Pricing.Get() + } + if !IsNil(o.EstimatedCost) { + toSerialize["estimated_cost"] = o.EstimatedCost + } + if !IsNil(o.Usage) { + toSerialize["usage"] = o.Usage + } + return toSerialize, nil +} + +type NullableFeatureUsage struct { + value *FeatureUsage + isSet bool +} + +func (v NullableFeatureUsage) Get() *FeatureUsage { + return v.value +} + +func (v *NullableFeatureUsage) Set(val *FeatureUsage) { + v.value = val + v.isSet = true +} + +func (v NullableFeatureUsage) IsSet() bool { + return v.isSet +} + +func (v *NullableFeatureUsage) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFeatureUsage(val *FeatureUsage) *NullableFeatureUsage { + return &NullableFeatureUsage{value: val, isSet: true} +} + +func (v NullableFeatureUsage) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFeatureUsage) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_firewall.go b/model_firewall.go new file mode 100644 index 0000000..06c40bb --- /dev/null +++ b/model_firewall.go @@ -0,0 +1,272 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the Firewall type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Firewall{} + +// Firewall struct for Firewall +type Firewall struct { + IsEnabled *bool `json:"is_enabled,omitempty"` + DefaultAction *string `json:"default_action,omitempty"` + DefaultActionDetails map[string]interface{} `json:"default_action_details,omitempty"` + // True to verify that SNI and hostname are equal + VerifySni *bool `json:"verify_sni,omitempty"` + Rules []FirewallRuleView `json:"rules,omitempty"` +} + +// NewFirewall instantiates a new Firewall object +// This constructor will assign default values to properties that have it defined, +// 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 NewFirewall() *Firewall { + this := Firewall{} + var verifySni bool = false + this.VerifySni = &verifySni + return &this +} + +// NewFirewallWithDefaults instantiates a new Firewall object +// This 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 NewFirewallWithDefaults() *Firewall { + this := Firewall{} + var verifySni bool = false + this.VerifySni = &verifySni + return &this +} + +// GetIsEnabled returns the IsEnabled field value if set, zero value otherwise. +func (o *Firewall) GetIsEnabled() bool { + if o == nil || IsNil(o.IsEnabled) { + var ret bool + return ret + } + return *o.IsEnabled +} + +// GetIsEnabledOk returns a tuple with the IsEnabled field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Firewall) GetIsEnabledOk() (*bool, bool) { + if o == nil || IsNil(o.IsEnabled) { + return nil, false + } + return o.IsEnabled, true +} + +// HasIsEnabled returns a boolean if a field has been set. +func (o *Firewall) HasIsEnabled() bool { + if o != nil && !IsNil(o.IsEnabled) { + return true + } + + return false +} + +// SetIsEnabled gets a reference to the given bool and assigns it to the IsEnabled field. +func (o *Firewall) SetIsEnabled(v bool) { + o.IsEnabled = &v +} + +// GetDefaultAction returns the DefaultAction field value if set, zero value otherwise. +func (o *Firewall) GetDefaultAction() string { + if o == nil || IsNil(o.DefaultAction) { + var ret string + return ret + } + return *o.DefaultAction +} + +// GetDefaultActionOk returns a tuple with the DefaultAction field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Firewall) GetDefaultActionOk() (*string, bool) { + if o == nil || IsNil(o.DefaultAction) { + return nil, false + } + return o.DefaultAction, true +} + +// HasDefaultAction returns a boolean if a field has been set. +func (o *Firewall) HasDefaultAction() bool { + if o != nil && !IsNil(o.DefaultAction) { + return true + } + + return false +} + +// SetDefaultAction gets a reference to the given string and assigns it to the DefaultAction field. +func (o *Firewall) SetDefaultAction(v string) { + o.DefaultAction = &v +} + +// GetDefaultActionDetails returns the DefaultActionDetails field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Firewall) GetDefaultActionDetails() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + return o.DefaultActionDetails +} + +// GetDefaultActionDetailsOk returns a tuple with the DefaultActionDetails 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 *Firewall) GetDefaultActionDetailsOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.DefaultActionDetails) { + return map[string]interface{}{}, false + } + return o.DefaultActionDetails, true +} + +// HasDefaultActionDetails returns a boolean if a field has been set. +func (o *Firewall) HasDefaultActionDetails() bool { + if o != nil && IsNil(o.DefaultActionDetails) { + return true + } + + return false +} + +// SetDefaultActionDetails gets a reference to the given map[string]interface{} and assigns it to the DefaultActionDetails field. +func (o *Firewall) SetDefaultActionDetails(v map[string]interface{}) { + o.DefaultActionDetails = v +} + +// GetVerifySni returns the VerifySni field value if set, zero value otherwise. +func (o *Firewall) GetVerifySni() bool { + if o == nil || IsNil(o.VerifySni) { + var ret bool + return ret + } + return *o.VerifySni +} + +// GetVerifySniOk returns a tuple with the VerifySni field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Firewall) GetVerifySniOk() (*bool, bool) { + if o == nil || IsNil(o.VerifySni) { + return nil, false + } + return o.VerifySni, true +} + +// HasVerifySni returns a boolean if a field has been set. +func (o *Firewall) HasVerifySni() bool { + if o != nil && !IsNil(o.VerifySni) { + return true + } + + return false +} + +// SetVerifySni gets a reference to the given bool and assigns it to the VerifySni field. +func (o *Firewall) SetVerifySni(v bool) { + o.VerifySni = &v +} + +// GetRules returns the Rules field value if set, zero value otherwise. +func (o *Firewall) GetRules() []FirewallRuleView { + if o == nil || IsNil(o.Rules) { + var ret []FirewallRuleView + return ret + } + return o.Rules +} + +// GetRulesOk returns a tuple with the Rules field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Firewall) GetRulesOk() ([]FirewallRuleView, bool) { + if o == nil || IsNil(o.Rules) { + return nil, false + } + return o.Rules, true +} + +// HasRules returns a boolean if a field has been set. +func (o *Firewall) HasRules() bool { + if o != nil && !IsNil(o.Rules) { + return true + } + + return false +} + +// SetRules gets a reference to the given []FirewallRuleView and assigns it to the Rules field. +func (o *Firewall) SetRules(v []FirewallRuleView) { + o.Rules = v +} + +func (o Firewall) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Firewall) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: is_enabled is readOnly + if !IsNil(o.DefaultAction) { + toSerialize["default_action"] = o.DefaultAction + } + if o.DefaultActionDetails != nil { + toSerialize["default_action_details"] = o.DefaultActionDetails + } + if !IsNil(o.VerifySni) { + toSerialize["verify_sni"] = o.VerifySni + } + // skip: rules is readOnly + return toSerialize, nil +} + +type NullableFirewall struct { + value *Firewall + isSet bool +} + +func (v NullableFirewall) Get() *Firewall { + return v.value +} + +func (v *NullableFirewall) Set(val *Firewall) { + v.value = val + v.isSet = true +} + +func (v NullableFirewall) IsSet() bool { + return v.isSet +} + +func (v *NullableFirewall) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFirewall(val *Firewall) *NullableFirewall { + return &NullableFirewall{value: val, isSet: true} +} + +func (v NullableFirewall) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFirewall) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_firewall_action_details.go b/model_firewall_action_details.go new file mode 100644 index 0000000..f3744c2 --- /dev/null +++ b/model_firewall_action_details.go @@ -0,0 +1,153 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" + "fmt" +) + +// FirewallActionDetails - Details of bypass or challenge actions +type FirewallActionDetails struct { + BypassAction *BypassAction + ChallengeAction *ChallengeAction +} + +// BypassActionAsFirewallActionDetails is a convenience function that returns BypassAction wrapped in FirewallActionDetails +func BypassActionAsFirewallActionDetails(v *BypassAction) FirewallActionDetails { + return FirewallActionDetails{ + BypassAction: v, + } +} + +// ChallengeActionAsFirewallActionDetails is a convenience function that returns ChallengeAction wrapped in FirewallActionDetails +func ChallengeActionAsFirewallActionDetails(v *ChallengeAction) FirewallActionDetails { + return FirewallActionDetails{ + ChallengeAction: v, + } +} + + +// Unmarshal JSON data into one of the pointers in the struct +func (dst *FirewallActionDetails) 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 + } + + match := 0 + // try to unmarshal data into BypassAction + err = newStrictDecoder(data).Decode(&dst.BypassAction) + if err == nil { + jsonBypassAction, _ := json.Marshal(dst.BypassAction) + if string(jsonBypassAction) == "{}" { // empty struct + dst.BypassAction = nil + } else { + match++ + } + } else { + dst.BypassAction = nil + } + + // try to unmarshal data into ChallengeAction + err = newStrictDecoder(data).Decode(&dst.ChallengeAction) + if err == nil { + jsonChallengeAction, _ := json.Marshal(dst.ChallengeAction) + if string(jsonChallengeAction) == "{}" { // empty struct + dst.ChallengeAction = nil + } else { + match++ + } + } else { + dst.ChallengeAction = nil + } + + if match > 1 { // more than 1 match + // reset to nil + dst.BypassAction = nil + dst.ChallengeAction = nil + + return fmt.Errorf("data matches more than one schema in oneOf(FirewallActionDetails)") + } else if match == 1 { + return nil // exactly one match + } else { // no match + return fmt.Errorf("data failed to match schemas in oneOf(FirewallActionDetails)") + } +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src FirewallActionDetails) MarshalJSON() ([]byte, error) { + if src.BypassAction != nil { + return json.Marshal(&src.BypassAction) + } + + if src.ChallengeAction != nil { + return json.Marshal(&src.ChallengeAction) + } + + return nil, nil // no data in oneOf schemas +} + +// Get the actual instance +func (obj *FirewallActionDetails) GetActualInstance() (interface{}) { + if obj == nil { + return nil + } + if obj.BypassAction != nil { + return obj.BypassAction + } + + if obj.ChallengeAction != nil { + return obj.ChallengeAction + } + + // all schemas are nil + return nil +} + +type NullableFirewallActionDetails struct { + value *FirewallActionDetails + isSet bool +} + +func (v NullableFirewallActionDetails) Get() *FirewallActionDetails { + return v.value +} + +func (v *NullableFirewallActionDetails) Set(val *FirewallActionDetails) { + v.value = val + v.isSet = true +} + +func (v NullableFirewallActionDetails) IsSet() bool { + return v.isSet +} + +func (v *NullableFirewallActionDetails) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFirewallActionDetails(val *FirewallActionDetails) *NullableFirewallActionDetails { + return &NullableFirewallActionDetails{value: val, isSet: true} +} + +func (v NullableFirewallActionDetails) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFirewallActionDetails) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_firewall_index_200_response.go b/model_firewall_index_200_response.go new file mode 100644 index 0000000..f0d02f7 --- /dev/null +++ b/model_firewall_index_200_response.go @@ -0,0 +1,176 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the FirewallIndex200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FirewallIndex200Response{} + +// FirewallIndex200Response struct for FirewallIndex200Response +type FirewallIndex200Response struct { + // Deprecated + Data *Firewall `json:"data,omitempty"` + Message NullableString `json:"message,omitempty"` +} + +// NewFirewallIndex200Response instantiates a new FirewallIndex200Response object +// This constructor will assign default values to properties that have it defined, +// 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 NewFirewallIndex200Response() *FirewallIndex200Response { + this := FirewallIndex200Response{} + return &this +} + +// NewFirewallIndex200ResponseWithDefaults instantiates a new FirewallIndex200Response object +// This 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 NewFirewallIndex200ResponseWithDefaults() *FirewallIndex200Response { + this := FirewallIndex200Response{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +// Deprecated +func (o *FirewallIndex200Response) GetData() Firewall { + if o == nil || IsNil(o.Data) { + var ret Firewall + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +// Deprecated +func (o *FirewallIndex200Response) GetDataOk() (*Firewall, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *FirewallIndex200Response) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given Firewall and assigns it to the Data field. +// Deprecated +func (o *FirewallIndex200Response) SetData(v Firewall) { + o.Data = &v +} + +// GetMessage returns the Message field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *FirewallIndex200Response) GetMessage() string { + if o == nil || IsNil(o.Message.Get()) { + var ret string + return ret + } + return *o.Message.Get() +} + +// GetMessageOk returns a tuple with the Message 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 *FirewallIndex200Response) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Message.Get(), o.Message.IsSet() +} + +// HasMessage returns a boolean if a field has been set. +func (o *FirewallIndex200Response) HasMessage() bool { + if o != nil && o.Message.IsSet() { + return true + } + + return false +} + +// SetMessage gets a reference to the given NullableString and assigns it to the Message field. +func (o *FirewallIndex200Response) SetMessage(v string) { + o.Message.Set(&v) +} +// SetMessageNil sets the value for Message to be an explicit nil +func (o *FirewallIndex200Response) SetMessageNil() { + o.Message.Set(nil) +} + +// UnsetMessage ensures that no value is present for Message, not even an explicit nil +func (o *FirewallIndex200Response) UnsetMessage() { + o.Message.Unset() +} + +func (o FirewallIndex200Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FirewallIndex200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + if o.Message.IsSet() { + toSerialize["message"] = o.Message.Get() + } + return toSerialize, nil +} + +type NullableFirewallIndex200Response struct { + value *FirewallIndex200Response + isSet bool +} + +func (v NullableFirewallIndex200Response) Get() *FirewallIndex200Response { + return v.value +} + +func (v *NullableFirewallIndex200Response) Set(val *FirewallIndex200Response) { + v.value = val + v.isSet = true +} + +func (v NullableFirewallIndex200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableFirewallIndex200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFirewallIndex200Response(val *FirewallIndex200Response) *NullableFirewallIndex200Response { + return &NullableFirewallIndex200Response{value: val, isSet: true} +} + +func (v NullableFirewallIndex200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFirewallIndex200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_firewall_rule.go b/model_firewall_rule.go new file mode 100644 index 0000000..f9e2291 --- /dev/null +++ b/model_firewall_rule.go @@ -0,0 +1,324 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the FirewallRule type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FirewallRule{} + +// FirewallRule struct for FirewallRule +type FirewallRule struct { + ActionDetails NullableFirewallActionDetails `json:"action_details,omitempty"` + Id *string `json:"id,omitempty"` + Name string `json:"name"` + // Wireshark-like filter expression + FilterExpr string `json:"filter_expr"` + Action string `json:"action"` + IsEnabled *bool `json:"is_enabled,omitempty"` + Note *string `json:"note,omitempty"` +} + +// NewFirewallRule instantiates a new FirewallRule object +// This constructor will assign default values to properties that have it defined, +// 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 NewFirewallRule(name string, filterExpr string, action string) *FirewallRule { + this := FirewallRule{} + this.Name = name + this.FilterExpr = filterExpr + this.Action = action + return &this +} + +// NewFirewallRuleWithDefaults instantiates a new FirewallRule object +// This 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 NewFirewallRuleWithDefaults() *FirewallRule { + this := FirewallRule{} + return &this +} + +// GetActionDetails returns the ActionDetails field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *FirewallRule) GetActionDetails() FirewallActionDetails { + if o == nil || IsNil(o.ActionDetails.Get()) { + var ret FirewallActionDetails + return ret + } + return *o.ActionDetails.Get() +} + +// GetActionDetailsOk returns a tuple with the ActionDetails 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 *FirewallRule) GetActionDetailsOk() (*FirewallActionDetails, bool) { + if o == nil { + return nil, false + } + return o.ActionDetails.Get(), o.ActionDetails.IsSet() +} + +// HasActionDetails returns a boolean if a field has been set. +func (o *FirewallRule) HasActionDetails() bool { + if o != nil && o.ActionDetails.IsSet() { + return true + } + + return false +} + +// SetActionDetails gets a reference to the given NullableFirewallActionDetails and assigns it to the ActionDetails field. +func (o *FirewallRule) SetActionDetails(v FirewallActionDetails) { + o.ActionDetails.Set(&v) +} +// SetActionDetailsNil sets the value for ActionDetails to be an explicit nil +func (o *FirewallRule) SetActionDetailsNil() { + o.ActionDetails.Set(nil) +} + +// UnsetActionDetails ensures that no value is present for ActionDetails, not even an explicit nil +func (o *FirewallRule) UnsetActionDetails() { + o.ActionDetails.Unset() +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *FirewallRule) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FirewallRule) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *FirewallRule) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *FirewallRule) SetId(v string) { + o.Id = &v +} + +// GetName returns the Name field value +func (o *FirewallRule) 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 *FirewallRule) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *FirewallRule) SetName(v string) { + o.Name = v +} + +// GetFilterExpr returns the FilterExpr field value +func (o *FirewallRule) GetFilterExpr() string { + if o == nil { + var ret string + return ret + } + + return o.FilterExpr +} + +// GetFilterExprOk returns a tuple with the FilterExpr field value +// and a boolean to check if the value has been set. +func (o *FirewallRule) GetFilterExprOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.FilterExpr, true +} + +// SetFilterExpr sets field value +func (o *FirewallRule) SetFilterExpr(v string) { + o.FilterExpr = v +} + +// GetAction returns the Action field value +func (o *FirewallRule) GetAction() string { + if o == nil { + var ret string + return ret + } + + return o.Action +} + +// GetActionOk returns a tuple with the Action field value +// and a boolean to check if the value has been set. +func (o *FirewallRule) GetActionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Action, true +} + +// SetAction sets field value +func (o *FirewallRule) SetAction(v string) { + o.Action = v +} + +// GetIsEnabled returns the IsEnabled field value if set, zero value otherwise. +func (o *FirewallRule) GetIsEnabled() bool { + if o == nil || IsNil(o.IsEnabled) { + var ret bool + return ret + } + return *o.IsEnabled +} + +// GetIsEnabledOk returns a tuple with the IsEnabled field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FirewallRule) GetIsEnabledOk() (*bool, bool) { + if o == nil || IsNil(o.IsEnabled) { + return nil, false + } + return o.IsEnabled, true +} + +// HasIsEnabled returns a boolean if a field has been set. +func (o *FirewallRule) HasIsEnabled() bool { + if o != nil && !IsNil(o.IsEnabled) { + return true + } + + return false +} + +// SetIsEnabled gets a reference to the given bool and assigns it to the IsEnabled field. +func (o *FirewallRule) SetIsEnabled(v bool) { + o.IsEnabled = &v +} + +// GetNote returns the Note field value if set, zero value otherwise. +func (o *FirewallRule) GetNote() string { + if o == nil || IsNil(o.Note) { + var ret string + return ret + } + return *o.Note +} + +// GetNoteOk returns a tuple with the Note field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FirewallRule) GetNoteOk() (*string, bool) { + if o == nil || IsNil(o.Note) { + return nil, false + } + return o.Note, true +} + +// HasNote returns a boolean if a field has been set. +func (o *FirewallRule) HasNote() bool { + if o != nil && !IsNil(o.Note) { + return true + } + + return false +} + +// SetNote gets a reference to the given string and assigns it to the Note field. +func (o *FirewallRule) SetNote(v string) { + o.Note = &v +} + +func (o FirewallRule) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FirewallRule) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.ActionDetails.IsSet() { + toSerialize["action_details"] = o.ActionDetails.Get() + } + // skip: id is readOnly + toSerialize["name"] = o.Name + toSerialize["filter_expr"] = o.FilterExpr + toSerialize["action"] = o.Action + if !IsNil(o.IsEnabled) { + toSerialize["is_enabled"] = o.IsEnabled + } + if !IsNil(o.Note) { + toSerialize["note"] = o.Note + } + return toSerialize, nil +} + +type NullableFirewallRule struct { + value *FirewallRule + isSet bool +} + +func (v NullableFirewallRule) Get() *FirewallRule { + return v.value +} + +func (v *NullableFirewallRule) Set(val *FirewallRule) { + v.value = val + v.isSet = true +} + +func (v NullableFirewallRule) IsSet() bool { + return v.isSet +} + +func (v *NullableFirewallRule) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFirewallRule(val *FirewallRule) *NullableFirewallRule { + return &NullableFirewallRule{value: val, isSet: true} +} + +func (v NullableFirewallRule) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFirewallRule) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_firewall_rule_response.go b/model_firewall_rule_response.go new file mode 100644 index 0000000..4ce112c --- /dev/null +++ b/model_firewall_rule_response.go @@ -0,0 +1,172 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the FirewallRuleResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FirewallRuleResponse{} + +// FirewallRuleResponse struct for FirewallRuleResponse +type FirewallRuleResponse struct { + Data *FirewallRuleView `json:"data,omitempty"` + Message NullableString `json:"message,omitempty"` +} + +// NewFirewallRuleResponse instantiates a new FirewallRuleResponse object +// This constructor will assign default values to properties that have it defined, +// 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 NewFirewallRuleResponse() *FirewallRuleResponse { + this := FirewallRuleResponse{} + return &this +} + +// NewFirewallRuleResponseWithDefaults instantiates a new FirewallRuleResponse object +// This 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 NewFirewallRuleResponseWithDefaults() *FirewallRuleResponse { + this := FirewallRuleResponse{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *FirewallRuleResponse) GetData() FirewallRuleView { + if o == nil || IsNil(o.Data) { + var ret FirewallRuleView + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FirewallRuleResponse) GetDataOk() (*FirewallRuleView, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *FirewallRuleResponse) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given FirewallRuleView and assigns it to the Data field. +func (o *FirewallRuleResponse) SetData(v FirewallRuleView) { + o.Data = &v +} + +// GetMessage returns the Message field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *FirewallRuleResponse) GetMessage() string { + if o == nil || IsNil(o.Message.Get()) { + var ret string + return ret + } + return *o.Message.Get() +} + +// GetMessageOk returns a tuple with the Message 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 *FirewallRuleResponse) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Message.Get(), o.Message.IsSet() +} + +// HasMessage returns a boolean if a field has been set. +func (o *FirewallRuleResponse) HasMessage() bool { + if o != nil && o.Message.IsSet() { + return true + } + + return false +} + +// SetMessage gets a reference to the given NullableString and assigns it to the Message field. +func (o *FirewallRuleResponse) SetMessage(v string) { + o.Message.Set(&v) +} +// SetMessageNil sets the value for Message to be an explicit nil +func (o *FirewallRuleResponse) SetMessageNil() { + o.Message.Set(nil) +} + +// UnsetMessage ensures that no value is present for Message, not even an explicit nil +func (o *FirewallRuleResponse) UnsetMessage() { + o.Message.Unset() +} + +func (o FirewallRuleResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FirewallRuleResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + if o.Message.IsSet() { + toSerialize["message"] = o.Message.Get() + } + return toSerialize, nil +} + +type NullableFirewallRuleResponse struct { + value *FirewallRuleResponse + isSet bool +} + +func (v NullableFirewallRuleResponse) Get() *FirewallRuleResponse { + return v.value +} + +func (v *NullableFirewallRuleResponse) Set(val *FirewallRuleResponse) { + v.value = val + v.isSet = true +} + +func (v NullableFirewallRuleResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableFirewallRuleResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFirewallRuleResponse(val *FirewallRuleResponse) *NullableFirewallRuleResponse { + return &NullableFirewallRuleResponse{value: val, isSet: true} +} + +func (v NullableFirewallRuleResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFirewallRuleResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_firewall_rule_view.go b/model_firewall_rule_view.go new file mode 100644 index 0000000..ba6ae6a --- /dev/null +++ b/model_firewall_rule_view.go @@ -0,0 +1,341 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the FirewallRuleView type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FirewallRuleView{} + +// FirewallRuleView struct for FirewallRuleView +type FirewallRuleView struct { + ActionDetails map[string]interface{} `json:"action_details,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + // Wireshark-like filter expression + FilterExpr *string `json:"filter_expr,omitempty"` + Action *string `json:"action,omitempty"` + IsEnabled *bool `json:"is_enabled,omitempty"` + Note *string `json:"note,omitempty"` +} + +// NewFirewallRuleView instantiates a new FirewallRuleView object +// This constructor will assign default values to properties that have it defined, +// 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 NewFirewallRuleView() *FirewallRuleView { + this := FirewallRuleView{} + return &this +} + +// NewFirewallRuleViewWithDefaults instantiates a new FirewallRuleView object +// This 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 NewFirewallRuleViewWithDefaults() *FirewallRuleView { + this := FirewallRuleView{} + return &this +} + +// GetActionDetails returns the ActionDetails field value if set, zero value otherwise. +func (o *FirewallRuleView) GetActionDetails() map[string]interface{} { + if o == nil || IsNil(o.ActionDetails) { + var ret map[string]interface{} + return ret + } + return o.ActionDetails +} + +// GetActionDetailsOk returns a tuple with the ActionDetails field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FirewallRuleView) GetActionDetailsOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.ActionDetails) { + return map[string]interface{}{}, false + } + return o.ActionDetails, true +} + +// HasActionDetails returns a boolean if a field has been set. +func (o *FirewallRuleView) HasActionDetails() bool { + if o != nil && !IsNil(o.ActionDetails) { + return true + } + + return false +} + +// SetActionDetails gets a reference to the given map[string]interface{} and assigns it to the ActionDetails field. +func (o *FirewallRuleView) SetActionDetails(v map[string]interface{}) { + o.ActionDetails = v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *FirewallRuleView) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FirewallRuleView) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *FirewallRuleView) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *FirewallRuleView) SetId(v string) { + o.Id = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *FirewallRuleView) 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 *FirewallRuleView) 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 *FirewallRuleView) 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 *FirewallRuleView) SetName(v string) { + o.Name = &v +} + +// GetFilterExpr returns the FilterExpr field value if set, zero value otherwise. +func (o *FirewallRuleView) GetFilterExpr() string { + if o == nil || IsNil(o.FilterExpr) { + var ret string + return ret + } + return *o.FilterExpr +} + +// GetFilterExprOk returns a tuple with the FilterExpr field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FirewallRuleView) GetFilterExprOk() (*string, bool) { + if o == nil || IsNil(o.FilterExpr) { + return nil, false + } + return o.FilterExpr, true +} + +// HasFilterExpr returns a boolean if a field has been set. +func (o *FirewallRuleView) HasFilterExpr() bool { + if o != nil && !IsNil(o.FilterExpr) { + return true + } + + return false +} + +// SetFilterExpr gets a reference to the given string and assigns it to the FilterExpr field. +func (o *FirewallRuleView) SetFilterExpr(v string) { + o.FilterExpr = &v +} + +// GetAction returns the Action field value if set, zero value otherwise. +func (o *FirewallRuleView) GetAction() string { + if o == nil || IsNil(o.Action) { + var ret string + return ret + } + return *o.Action +} + +// GetActionOk returns a tuple with the Action field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FirewallRuleView) GetActionOk() (*string, bool) { + if o == nil || IsNil(o.Action) { + return nil, false + } + return o.Action, true +} + +// HasAction returns a boolean if a field has been set. +func (o *FirewallRuleView) HasAction() bool { + if o != nil && !IsNil(o.Action) { + return true + } + + return false +} + +// SetAction gets a reference to the given string and assigns it to the Action field. +func (o *FirewallRuleView) SetAction(v string) { + o.Action = &v +} + +// GetIsEnabled returns the IsEnabled field value if set, zero value otherwise. +func (o *FirewallRuleView) GetIsEnabled() bool { + if o == nil || IsNil(o.IsEnabled) { + var ret bool + return ret + } + return *o.IsEnabled +} + +// GetIsEnabledOk returns a tuple with the IsEnabled field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FirewallRuleView) GetIsEnabledOk() (*bool, bool) { + if o == nil || IsNil(o.IsEnabled) { + return nil, false + } + return o.IsEnabled, true +} + +// HasIsEnabled returns a boolean if a field has been set. +func (o *FirewallRuleView) HasIsEnabled() bool { + if o != nil && !IsNil(o.IsEnabled) { + return true + } + + return false +} + +// SetIsEnabled gets a reference to the given bool and assigns it to the IsEnabled field. +func (o *FirewallRuleView) SetIsEnabled(v bool) { + o.IsEnabled = &v +} + +// GetNote returns the Note field value if set, zero value otherwise. +func (o *FirewallRuleView) GetNote() string { + if o == nil || IsNil(o.Note) { + var ret string + return ret + } + return *o.Note +} + +// GetNoteOk returns a tuple with the Note field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FirewallRuleView) GetNoteOk() (*string, bool) { + if o == nil || IsNil(o.Note) { + return nil, false + } + return o.Note, true +} + +// HasNote returns a boolean if a field has been set. +func (o *FirewallRuleView) HasNote() bool { + if o != nil && !IsNil(o.Note) { + return true + } + + return false +} + +// SetNote gets a reference to the given string and assigns it to the Note field. +func (o *FirewallRuleView) SetNote(v string) { + o.Note = &v +} + +func (o FirewallRuleView) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FirewallRuleView) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.ActionDetails) { + toSerialize["action_details"] = o.ActionDetails + } + // skip: id is readOnly + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.FilterExpr) { + toSerialize["filter_expr"] = o.FilterExpr + } + if !IsNil(o.Action) { + toSerialize["action"] = o.Action + } + if !IsNil(o.IsEnabled) { + toSerialize["is_enabled"] = o.IsEnabled + } + if !IsNil(o.Note) { + toSerialize["note"] = o.Note + } + return toSerialize, nil +} + +type NullableFirewallRuleView struct { + value *FirewallRuleView + isSet bool +} + +func (v NullableFirewallRuleView) Get() *FirewallRuleView { + return v.value +} + +func (v *NullableFirewallRuleView) Set(val *FirewallRuleView) { + v.value = val + v.isSet = true +} + +func (v NullableFirewallRuleView) IsSet() bool { + return v.isSet +} + +func (v *NullableFirewallRuleView) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFirewallRuleView(val *FirewallRuleView) *NullableFirewallRuleView { + return &NullableFirewallRuleView{value: val, isSet: true} +} + +func (v NullableFirewallRuleView) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFirewallRuleView) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_firewall_rules_index_200_response.go b/model_firewall_rules_index_200_response.go new file mode 100644 index 0000000..c86c8e4 --- /dev/null +++ b/model_firewall_rules_index_200_response.go @@ -0,0 +1,198 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the FirewallRulesIndex200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FirewallRulesIndex200Response{} + +// FirewallRulesIndex200Response struct for FirewallRulesIndex200Response +type FirewallRulesIndex200Response struct { + Data []FirewallRuleView `json:"data,omitempty"` + Links *PaginatedResponseLinks `json:"links,omitempty"` + Meta *PaginatedResponseMeta `json:"meta,omitempty"` +} + +// NewFirewallRulesIndex200Response instantiates a new FirewallRulesIndex200Response object +// This constructor will assign default values to properties that have it defined, +// 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 NewFirewallRulesIndex200Response() *FirewallRulesIndex200Response { + this := FirewallRulesIndex200Response{} + return &this +} + +// NewFirewallRulesIndex200ResponseWithDefaults instantiates a new FirewallRulesIndex200Response object +// This 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 NewFirewallRulesIndex200ResponseWithDefaults() *FirewallRulesIndex200Response { + this := FirewallRulesIndex200Response{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *FirewallRulesIndex200Response) GetData() []FirewallRuleView { + if o == nil || IsNil(o.Data) { + var ret []FirewallRuleView + return ret + } + return o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FirewallRulesIndex200Response) GetDataOk() ([]FirewallRuleView, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *FirewallRulesIndex200Response) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given []FirewallRuleView and assigns it to the Data field. +func (o *FirewallRulesIndex200Response) SetData(v []FirewallRuleView) { + o.Data = v +} + +// GetLinks returns the Links field value if set, zero value otherwise. +func (o *FirewallRulesIndex200Response) GetLinks() PaginatedResponseLinks { + if o == nil || IsNil(o.Links) { + var ret PaginatedResponseLinks + return ret + } + return *o.Links +} + +// GetLinksOk returns a tuple with the Links field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FirewallRulesIndex200Response) GetLinksOk() (*PaginatedResponseLinks, bool) { + if o == nil || IsNil(o.Links) { + return nil, false + } + return o.Links, true +} + +// HasLinks returns a boolean if a field has been set. +func (o *FirewallRulesIndex200Response) HasLinks() bool { + if o != nil && !IsNil(o.Links) { + return true + } + + return false +} + +// SetLinks gets a reference to the given PaginatedResponseLinks and assigns it to the Links field. +func (o *FirewallRulesIndex200Response) SetLinks(v PaginatedResponseLinks) { + o.Links = &v +} + +// GetMeta returns the Meta field value if set, zero value otherwise. +func (o *FirewallRulesIndex200Response) GetMeta() PaginatedResponseMeta { + if o == nil || IsNil(o.Meta) { + var ret PaginatedResponseMeta + return ret + } + return *o.Meta +} + +// GetMetaOk returns a tuple with the Meta field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FirewallRulesIndex200Response) GetMetaOk() (*PaginatedResponseMeta, bool) { + if o == nil || IsNil(o.Meta) { + return nil, false + } + return o.Meta, true +} + +// HasMeta returns a boolean if a field has been set. +func (o *FirewallRulesIndex200Response) HasMeta() bool { + if o != nil && !IsNil(o.Meta) { + return true + } + + return false +} + +// SetMeta gets a reference to the given PaginatedResponseMeta and assigns it to the Meta field. +func (o *FirewallRulesIndex200Response) SetMeta(v PaginatedResponseMeta) { + o.Meta = &v +} + +func (o FirewallRulesIndex200Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FirewallRulesIndex200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + if !IsNil(o.Links) { + toSerialize["links"] = o.Links + } + if !IsNil(o.Meta) { + toSerialize["meta"] = o.Meta + } + return toSerialize, nil +} + +type NullableFirewallRulesIndex200Response struct { + value *FirewallRulesIndex200Response + isSet bool +} + +func (v NullableFirewallRulesIndex200Response) Get() *FirewallRulesIndex200Response { + return v.value +} + +func (v *NullableFirewallRulesIndex200Response) Set(val *FirewallRulesIndex200Response) { + v.value = val + v.isSet = true +} + +func (v NullableFirewallRulesIndex200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableFirewallRulesIndex200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFirewallRulesIndex200Response(val *FirewallRulesIndex200Response) *NullableFirewallRulesIndex200Response { + return &NullableFirewallRulesIndex200Response{value: val, isSet: true} +} + +func (v NullableFirewallRulesIndex200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFirewallRulesIndex200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_firewall_settings.go b/model_firewall_settings.go new file mode 100644 index 0000000..75f402c --- /dev/null +++ b/model_firewall_settings.go @@ -0,0 +1,247 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the FirewallSettings type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FirewallSettings{} + +// FirewallSettings struct for FirewallSettings +type FirewallSettings struct { + DefaultActionDetails NullableFirewallActionDetails `json:"default_action_details,omitempty"` + IsEnabled *bool `json:"is_enabled,omitempty"` + DefaultAction *string `json:"default_action,omitempty"` + // True to verify that SNI and hostname are equal + VerifySni *bool `json:"verify_sni,omitempty"` +} + +// NewFirewallSettings instantiates a new FirewallSettings object +// This constructor will assign default values to properties that have it defined, +// 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 NewFirewallSettings() *FirewallSettings { + this := FirewallSettings{} + var verifySni bool = false + this.VerifySni = &verifySni + return &this +} + +// NewFirewallSettingsWithDefaults instantiates a new FirewallSettings object +// This 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 NewFirewallSettingsWithDefaults() *FirewallSettings { + this := FirewallSettings{} + var verifySni bool = false + this.VerifySni = &verifySni + return &this +} + +// GetDefaultActionDetails returns the DefaultActionDetails field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *FirewallSettings) GetDefaultActionDetails() FirewallActionDetails { + if o == nil || IsNil(o.DefaultActionDetails.Get()) { + var ret FirewallActionDetails + return ret + } + return *o.DefaultActionDetails.Get() +} + +// GetDefaultActionDetailsOk returns a tuple with the DefaultActionDetails 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 *FirewallSettings) GetDefaultActionDetailsOk() (*FirewallActionDetails, bool) { + if o == nil { + return nil, false + } + return o.DefaultActionDetails.Get(), o.DefaultActionDetails.IsSet() +} + +// HasDefaultActionDetails returns a boolean if a field has been set. +func (o *FirewallSettings) HasDefaultActionDetails() bool { + if o != nil && o.DefaultActionDetails.IsSet() { + return true + } + + return false +} + +// SetDefaultActionDetails gets a reference to the given NullableFirewallActionDetails and assigns it to the DefaultActionDetails field. +func (o *FirewallSettings) SetDefaultActionDetails(v FirewallActionDetails) { + o.DefaultActionDetails.Set(&v) +} +// SetDefaultActionDetailsNil sets the value for DefaultActionDetails to be an explicit nil +func (o *FirewallSettings) SetDefaultActionDetailsNil() { + o.DefaultActionDetails.Set(nil) +} + +// UnsetDefaultActionDetails ensures that no value is present for DefaultActionDetails, not even an explicit nil +func (o *FirewallSettings) UnsetDefaultActionDetails() { + o.DefaultActionDetails.Unset() +} + +// GetIsEnabled returns the IsEnabled field value if set, zero value otherwise. +func (o *FirewallSettings) GetIsEnabled() bool { + if o == nil || IsNil(o.IsEnabled) { + var ret bool + return ret + } + return *o.IsEnabled +} + +// GetIsEnabledOk returns a tuple with the IsEnabled field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FirewallSettings) GetIsEnabledOk() (*bool, bool) { + if o == nil || IsNil(o.IsEnabled) { + return nil, false + } + return o.IsEnabled, true +} + +// HasIsEnabled returns a boolean if a field has been set. +func (o *FirewallSettings) HasIsEnabled() bool { + if o != nil && !IsNil(o.IsEnabled) { + return true + } + + return false +} + +// SetIsEnabled gets a reference to the given bool and assigns it to the IsEnabled field. +func (o *FirewallSettings) SetIsEnabled(v bool) { + o.IsEnabled = &v +} + +// GetDefaultAction returns the DefaultAction field value if set, zero value otherwise. +func (o *FirewallSettings) GetDefaultAction() string { + if o == nil || IsNil(o.DefaultAction) { + var ret string + return ret + } + return *o.DefaultAction +} + +// GetDefaultActionOk returns a tuple with the DefaultAction field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FirewallSettings) GetDefaultActionOk() (*string, bool) { + if o == nil || IsNil(o.DefaultAction) { + return nil, false + } + return o.DefaultAction, true +} + +// HasDefaultAction returns a boolean if a field has been set. +func (o *FirewallSettings) HasDefaultAction() bool { + if o != nil && !IsNil(o.DefaultAction) { + return true + } + + return false +} + +// SetDefaultAction gets a reference to the given string and assigns it to the DefaultAction field. +func (o *FirewallSettings) SetDefaultAction(v string) { + o.DefaultAction = &v +} + +// GetVerifySni returns the VerifySni field value if set, zero value otherwise. +func (o *FirewallSettings) GetVerifySni() bool { + if o == nil || IsNil(o.VerifySni) { + var ret bool + return ret + } + return *o.VerifySni +} + +// GetVerifySniOk returns a tuple with the VerifySni field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FirewallSettings) GetVerifySniOk() (*bool, bool) { + if o == nil || IsNil(o.VerifySni) { + return nil, false + } + return o.VerifySni, true +} + +// HasVerifySni returns a boolean if a field has been set. +func (o *FirewallSettings) HasVerifySni() bool { + if o != nil && !IsNil(o.VerifySni) { + return true + } + + return false +} + +// SetVerifySni gets a reference to the given bool and assigns it to the VerifySni field. +func (o *FirewallSettings) SetVerifySni(v bool) { + o.VerifySni = &v +} + +func (o FirewallSettings) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FirewallSettings) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.DefaultActionDetails.IsSet() { + toSerialize["default_action_details"] = o.DefaultActionDetails.Get() + } + // skip: is_enabled is readOnly + if !IsNil(o.DefaultAction) { + toSerialize["default_action"] = o.DefaultAction + } + if !IsNil(o.VerifySni) { + toSerialize["verify_sni"] = o.VerifySni + } + return toSerialize, nil +} + +type NullableFirewallSettings struct { + value *FirewallSettings + isSet bool +} + +func (v NullableFirewallSettings) Get() *FirewallSettings { + return v.value +} + +func (v *NullableFirewallSettings) Set(val *FirewallSettings) { + v.value = val + v.isSet = true +} + +func (v NullableFirewallSettings) IsSet() bool { + return v.isSet +} + +func (v *NullableFirewallSettings) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFirewallSettings(val *FirewallSettings) *NullableFirewallSettings { + return &NullableFirewallSettings{value: val, isSet: true} +} + +func (v NullableFirewallSettings) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFirewallSettings) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_firewall_settings_index_200_response.go b/model_firewall_settings_index_200_response.go new file mode 100644 index 0000000..55e5190 --- /dev/null +++ b/model_firewall_settings_index_200_response.go @@ -0,0 +1,172 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the FirewallSettingsIndex200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FirewallSettingsIndex200Response{} + +// FirewallSettingsIndex200Response struct for FirewallSettingsIndex200Response +type FirewallSettingsIndex200Response struct { + Data *FirewallSettingsView `json:"data,omitempty"` + Message NullableString `json:"message,omitempty"` +} + +// NewFirewallSettingsIndex200Response instantiates a new FirewallSettingsIndex200Response object +// This constructor will assign default values to properties that have it defined, +// 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 NewFirewallSettingsIndex200Response() *FirewallSettingsIndex200Response { + this := FirewallSettingsIndex200Response{} + return &this +} + +// NewFirewallSettingsIndex200ResponseWithDefaults instantiates a new FirewallSettingsIndex200Response object +// This 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 NewFirewallSettingsIndex200ResponseWithDefaults() *FirewallSettingsIndex200Response { + this := FirewallSettingsIndex200Response{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *FirewallSettingsIndex200Response) GetData() FirewallSettingsView { + if o == nil || IsNil(o.Data) { + var ret FirewallSettingsView + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FirewallSettingsIndex200Response) GetDataOk() (*FirewallSettingsView, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *FirewallSettingsIndex200Response) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given FirewallSettingsView and assigns it to the Data field. +func (o *FirewallSettingsIndex200Response) SetData(v FirewallSettingsView) { + o.Data = &v +} + +// GetMessage returns the Message field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *FirewallSettingsIndex200Response) GetMessage() string { + if o == nil || IsNil(o.Message.Get()) { + var ret string + return ret + } + return *o.Message.Get() +} + +// GetMessageOk returns a tuple with the Message 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 *FirewallSettingsIndex200Response) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Message.Get(), o.Message.IsSet() +} + +// HasMessage returns a boolean if a field has been set. +func (o *FirewallSettingsIndex200Response) HasMessage() bool { + if o != nil && o.Message.IsSet() { + return true + } + + return false +} + +// SetMessage gets a reference to the given NullableString and assigns it to the Message field. +func (o *FirewallSettingsIndex200Response) SetMessage(v string) { + o.Message.Set(&v) +} +// SetMessageNil sets the value for Message to be an explicit nil +func (o *FirewallSettingsIndex200Response) SetMessageNil() { + o.Message.Set(nil) +} + +// UnsetMessage ensures that no value is present for Message, not even an explicit nil +func (o *FirewallSettingsIndex200Response) UnsetMessage() { + o.Message.Unset() +} + +func (o FirewallSettingsIndex200Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FirewallSettingsIndex200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + if o.Message.IsSet() { + toSerialize["message"] = o.Message.Get() + } + return toSerialize, nil +} + +type NullableFirewallSettingsIndex200Response struct { + value *FirewallSettingsIndex200Response + isSet bool +} + +func (v NullableFirewallSettingsIndex200Response) Get() *FirewallSettingsIndex200Response { + return v.value +} + +func (v *NullableFirewallSettingsIndex200Response) Set(val *FirewallSettingsIndex200Response) { + v.value = val + v.isSet = true +} + +func (v NullableFirewallSettingsIndex200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableFirewallSettingsIndex200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFirewallSettingsIndex200Response(val *FirewallSettingsIndex200Response) *NullableFirewallSettingsIndex200Response { + return &NullableFirewallSettingsIndex200Response{value: val, isSet: true} +} + +func (v NullableFirewallSettingsIndex200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFirewallSettingsIndex200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_firewall_settings_view.go b/model_firewall_settings_view.go new file mode 100644 index 0000000..b8fab99 --- /dev/null +++ b/model_firewall_settings_view.go @@ -0,0 +1,238 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the FirewallSettingsView type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FirewallSettingsView{} + +// FirewallSettingsView struct for FirewallSettingsView +type FirewallSettingsView struct { + DefaultActionDetails map[string]interface{} `json:"default_action_details,omitempty"` + IsEnabled *bool `json:"is_enabled,omitempty"` + DefaultAction *string `json:"default_action,omitempty"` + // True to verify that SNI and hostname are equal + VerifySni *bool `json:"verify_sni,omitempty"` +} + +// NewFirewallSettingsView instantiates a new FirewallSettingsView object +// This constructor will assign default values to properties that have it defined, +// 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 NewFirewallSettingsView() *FirewallSettingsView { + this := FirewallSettingsView{} + var verifySni bool = false + this.VerifySni = &verifySni + return &this +} + +// NewFirewallSettingsViewWithDefaults instantiates a new FirewallSettingsView object +// This 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 NewFirewallSettingsViewWithDefaults() *FirewallSettingsView { + this := FirewallSettingsView{} + var verifySni bool = false + this.VerifySni = &verifySni + return &this +} + +// GetDefaultActionDetails returns the DefaultActionDetails field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *FirewallSettingsView) GetDefaultActionDetails() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + return o.DefaultActionDetails +} + +// GetDefaultActionDetailsOk returns a tuple with the DefaultActionDetails 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 *FirewallSettingsView) GetDefaultActionDetailsOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.DefaultActionDetails) { + return map[string]interface{}{}, false + } + return o.DefaultActionDetails, true +} + +// HasDefaultActionDetails returns a boolean if a field has been set. +func (o *FirewallSettingsView) HasDefaultActionDetails() bool { + if o != nil && IsNil(o.DefaultActionDetails) { + return true + } + + return false +} + +// SetDefaultActionDetails gets a reference to the given map[string]interface{} and assigns it to the DefaultActionDetails field. +func (o *FirewallSettingsView) SetDefaultActionDetails(v map[string]interface{}) { + o.DefaultActionDetails = v +} + +// GetIsEnabled returns the IsEnabled field value if set, zero value otherwise. +func (o *FirewallSettingsView) GetIsEnabled() bool { + if o == nil || IsNil(o.IsEnabled) { + var ret bool + return ret + } + return *o.IsEnabled +} + +// GetIsEnabledOk returns a tuple with the IsEnabled field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FirewallSettingsView) GetIsEnabledOk() (*bool, bool) { + if o == nil || IsNil(o.IsEnabled) { + return nil, false + } + return o.IsEnabled, true +} + +// HasIsEnabled returns a boolean if a field has been set. +func (o *FirewallSettingsView) HasIsEnabled() bool { + if o != nil && !IsNil(o.IsEnabled) { + return true + } + + return false +} + +// SetIsEnabled gets a reference to the given bool and assigns it to the IsEnabled field. +func (o *FirewallSettingsView) SetIsEnabled(v bool) { + o.IsEnabled = &v +} + +// GetDefaultAction returns the DefaultAction field value if set, zero value otherwise. +func (o *FirewallSettingsView) GetDefaultAction() string { + if o == nil || IsNil(o.DefaultAction) { + var ret string + return ret + } + return *o.DefaultAction +} + +// GetDefaultActionOk returns a tuple with the DefaultAction field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FirewallSettingsView) GetDefaultActionOk() (*string, bool) { + if o == nil || IsNil(o.DefaultAction) { + return nil, false + } + return o.DefaultAction, true +} + +// HasDefaultAction returns a boolean if a field has been set. +func (o *FirewallSettingsView) HasDefaultAction() bool { + if o != nil && !IsNil(o.DefaultAction) { + return true + } + + return false +} + +// SetDefaultAction gets a reference to the given string and assigns it to the DefaultAction field. +func (o *FirewallSettingsView) SetDefaultAction(v string) { + o.DefaultAction = &v +} + +// GetVerifySni returns the VerifySni field value if set, zero value otherwise. +func (o *FirewallSettingsView) GetVerifySni() bool { + if o == nil || IsNil(o.VerifySni) { + var ret bool + return ret + } + return *o.VerifySni +} + +// GetVerifySniOk returns a tuple with the VerifySni field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FirewallSettingsView) GetVerifySniOk() (*bool, bool) { + if o == nil || IsNil(o.VerifySni) { + return nil, false + } + return o.VerifySni, true +} + +// HasVerifySni returns a boolean if a field has been set. +func (o *FirewallSettingsView) HasVerifySni() bool { + if o != nil && !IsNil(o.VerifySni) { + return true + } + + return false +} + +// SetVerifySni gets a reference to the given bool and assigns it to the VerifySni field. +func (o *FirewallSettingsView) SetVerifySni(v bool) { + o.VerifySni = &v +} + +func (o FirewallSettingsView) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FirewallSettingsView) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.DefaultActionDetails != nil { + toSerialize["default_action_details"] = o.DefaultActionDetails + } + // skip: is_enabled is readOnly + if !IsNil(o.DefaultAction) { + toSerialize["default_action"] = o.DefaultAction + } + if !IsNil(o.VerifySni) { + toSerialize["verify_sni"] = o.VerifySni + } + return toSerialize, nil +} + +type NullableFirewallSettingsView struct { + value *FirewallSettingsView + isSet bool +} + +func (v NullableFirewallSettingsView) Get() *FirewallSettingsView { + return v.value +} + +func (v *NullableFirewallSettingsView) Set(val *FirewallSettingsView) { + v.value = val + v.isSet = true +} + +func (v NullableFirewallSettingsView) IsSet() bool { + return v.isSet +} + +func (v *NullableFirewallSettingsView) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFirewallSettingsView(val *FirewallSettingsView) *NullableFirewallSettingsView { + return &NullableFirewallSettingsView{value: val, isSet: true} +} + +func (v NullableFirewallSettingsView) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFirewallSettingsView) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_health_check.go b/model_health_check.go new file mode 100644 index 0000000..37ec51a --- /dev/null +++ b/model_health_check.go @@ -0,0 +1,611 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" + "time" +) + +// checks if the HealthCheck type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &HealthCheck{} + +// HealthCheck struct for HealthCheck +type HealthCheck struct { + RequestConfig *HealthCheckRequestConfig `json:"request_config,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + // can be IP/Host when type is `upstream`, otherwise it must be a valid record ID + Origin *string `json:"origin,omitempty"` + OriginType *string `json:"origin_type,omitempty"` + Upstreams []string `json:"upstreams,omitempty"` + // In milliseconds + Interval *int32 `json:"interval,omitempty"` + Threshold *int32 `json:"threshold,omitempty"` + Type *string `json:"type,omitempty"` + // The health-check is off or on + Status *bool `json:"status,omitempty"` + // Number of immediate retries in case of a timeout + Retries *int32 `json:"retries,omitempty"` + Zones []HealthCheckZone `json:"zones,omitempty"` + MonitoringUpdatedAt NullableTime `json:"monitoring_updated_at,omitempty"` +} + +// NewHealthCheck instantiates a new HealthCheck object +// This constructor will assign default values to properties that have it defined, +// 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 NewHealthCheck() *HealthCheck { + this := HealthCheck{} + var status bool = true + this.Status = &status + return &this +} + +// NewHealthCheckWithDefaults instantiates a new HealthCheck object +// This 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 NewHealthCheckWithDefaults() *HealthCheck { + this := HealthCheck{} + var status bool = true + this.Status = &status + return &this +} + +// GetRequestConfig returns the RequestConfig field value if set, zero value otherwise. +func (o *HealthCheck) GetRequestConfig() HealthCheckRequestConfig { + if o == nil || IsNil(o.RequestConfig) { + var ret HealthCheckRequestConfig + return ret + } + return *o.RequestConfig +} + +// GetRequestConfigOk returns a tuple with the RequestConfig field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HealthCheck) GetRequestConfigOk() (*HealthCheckRequestConfig, bool) { + if o == nil || IsNil(o.RequestConfig) { + return nil, false + } + return o.RequestConfig, true +} + +// HasRequestConfig returns a boolean if a field has been set. +func (o *HealthCheck) HasRequestConfig() bool { + if o != nil && !IsNil(o.RequestConfig) { + return true + } + + return false +} + +// SetRequestConfig gets a reference to the given HealthCheckRequestConfig and assigns it to the RequestConfig field. +func (o *HealthCheck) SetRequestConfig(v HealthCheckRequestConfig) { + o.RequestConfig = &v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *HealthCheck) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HealthCheck) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *HealthCheck) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *HealthCheck) SetId(v string) { + o.Id = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *HealthCheck) 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 *HealthCheck) 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 *HealthCheck) 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 *HealthCheck) SetName(v string) { + o.Name = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *HealthCheck) 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 *HealthCheck) 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 *HealthCheck) 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 *HealthCheck) SetDescription(v string) { + o.Description = &v +} + +// GetOrigin returns the Origin field value if set, zero value otherwise. +func (o *HealthCheck) GetOrigin() string { + if o == nil || IsNil(o.Origin) { + var ret string + return ret + } + return *o.Origin +} + +// GetOriginOk returns a tuple with the Origin field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HealthCheck) GetOriginOk() (*string, bool) { + if o == nil || IsNil(o.Origin) { + return nil, false + } + return o.Origin, true +} + +// HasOrigin returns a boolean if a field has been set. +func (o *HealthCheck) HasOrigin() bool { + if o != nil && !IsNil(o.Origin) { + return true + } + + return false +} + +// SetOrigin gets a reference to the given string and assigns it to the Origin field. +func (o *HealthCheck) SetOrigin(v string) { + o.Origin = &v +} + +// GetOriginType returns the OriginType field value if set, zero value otherwise. +func (o *HealthCheck) GetOriginType() string { + if o == nil || IsNil(o.OriginType) { + var ret string + return ret + } + return *o.OriginType +} + +// GetOriginTypeOk returns a tuple with the OriginType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HealthCheck) GetOriginTypeOk() (*string, bool) { + if o == nil || IsNil(o.OriginType) { + return nil, false + } + return o.OriginType, true +} + +// HasOriginType returns a boolean if a field has been set. +func (o *HealthCheck) HasOriginType() bool { + if o != nil && !IsNil(o.OriginType) { + return true + } + + return false +} + +// SetOriginType gets a reference to the given string and assigns it to the OriginType field. +func (o *HealthCheck) SetOriginType(v string) { + o.OriginType = &v +} + +// GetUpstreams returns the Upstreams field value if set, zero value otherwise. +func (o *HealthCheck) GetUpstreams() []string { + if o == nil || IsNil(o.Upstreams) { + var ret []string + return ret + } + return o.Upstreams +} + +// GetUpstreamsOk returns a tuple with the Upstreams field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HealthCheck) GetUpstreamsOk() ([]string, bool) { + if o == nil || IsNil(o.Upstreams) { + return nil, false + } + return o.Upstreams, true +} + +// HasUpstreams returns a boolean if a field has been set. +func (o *HealthCheck) HasUpstreams() bool { + if o != nil && !IsNil(o.Upstreams) { + return true + } + + return false +} + +// SetUpstreams gets a reference to the given []string and assigns it to the Upstreams field. +func (o *HealthCheck) SetUpstreams(v []string) { + o.Upstreams = v +} + +// GetInterval returns the Interval field value if set, zero value otherwise. +func (o *HealthCheck) GetInterval() int32 { + if o == nil || IsNil(o.Interval) { + var ret int32 + return ret + } + return *o.Interval +} + +// GetIntervalOk returns a tuple with the Interval field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HealthCheck) GetIntervalOk() (*int32, bool) { + if o == nil || IsNil(o.Interval) { + return nil, false + } + return o.Interval, true +} + +// HasInterval returns a boolean if a field has been set. +func (o *HealthCheck) HasInterval() bool { + if o != nil && !IsNil(o.Interval) { + return true + } + + return false +} + +// SetInterval gets a reference to the given int32 and assigns it to the Interval field. +func (o *HealthCheck) SetInterval(v int32) { + o.Interval = &v +} + +// GetThreshold returns the Threshold field value if set, zero value otherwise. +func (o *HealthCheck) GetThreshold() int32 { + if o == nil || IsNil(o.Threshold) { + var ret int32 + return ret + } + return *o.Threshold +} + +// GetThresholdOk returns a tuple with the Threshold field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HealthCheck) GetThresholdOk() (*int32, bool) { + if o == nil || IsNil(o.Threshold) { + return nil, false + } + return o.Threshold, true +} + +// HasThreshold returns a boolean if a field has been set. +func (o *HealthCheck) HasThreshold() bool { + if o != nil && !IsNil(o.Threshold) { + return true + } + + return false +} + +// SetThreshold gets a reference to the given int32 and assigns it to the Threshold field. +func (o *HealthCheck) SetThreshold(v int32) { + o.Threshold = &v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *HealthCheck) 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 *HealthCheck) 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 *HealthCheck) 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 *HealthCheck) SetType(v string) { + o.Type = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *HealthCheck) GetStatus() bool { + if o == nil || IsNil(o.Status) { + var ret bool + 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 *HealthCheck) GetStatusOk() (*bool, 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 *HealthCheck) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given bool and assigns it to the Status field. +func (o *HealthCheck) SetStatus(v bool) { + o.Status = &v +} + +// GetRetries returns the Retries field value if set, zero value otherwise. +func (o *HealthCheck) GetRetries() int32 { + if o == nil || IsNil(o.Retries) { + var ret int32 + return ret + } + return *o.Retries +} + +// GetRetriesOk returns a tuple with the Retries field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HealthCheck) GetRetriesOk() (*int32, bool) { + if o == nil || IsNil(o.Retries) { + return nil, false + } + return o.Retries, true +} + +// HasRetries returns a boolean if a field has been set. +func (o *HealthCheck) HasRetries() bool { + if o != nil && !IsNil(o.Retries) { + return true + } + + return false +} + +// SetRetries gets a reference to the given int32 and assigns it to the Retries field. +func (o *HealthCheck) SetRetries(v int32) { + o.Retries = &v +} + +// GetZones returns the Zones field value if set, zero value otherwise. +func (o *HealthCheck) GetZones() []HealthCheckZone { + if o == nil || IsNil(o.Zones) { + var ret []HealthCheckZone + return ret + } + return o.Zones +} + +// GetZonesOk returns a tuple with the Zones field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HealthCheck) GetZonesOk() ([]HealthCheckZone, bool) { + if o == nil || IsNil(o.Zones) { + return nil, false + } + return o.Zones, true +} + +// HasZones returns a boolean if a field has been set. +func (o *HealthCheck) HasZones() bool { + if o != nil && !IsNil(o.Zones) { + return true + } + + return false +} + +// SetZones gets a reference to the given []HealthCheckZone and assigns it to the Zones field. +func (o *HealthCheck) SetZones(v []HealthCheckZone) { + o.Zones = v +} + +// GetMonitoringUpdatedAt returns the MonitoringUpdatedAt field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *HealthCheck) GetMonitoringUpdatedAt() time.Time { + if o == nil || IsNil(o.MonitoringUpdatedAt.Get()) { + var ret time.Time + return ret + } + return *o.MonitoringUpdatedAt.Get() +} + +// GetMonitoringUpdatedAtOk returns a tuple with the MonitoringUpdatedAt 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 *HealthCheck) GetMonitoringUpdatedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.MonitoringUpdatedAt.Get(), o.MonitoringUpdatedAt.IsSet() +} + +// HasMonitoringUpdatedAt returns a boolean if a field has been set. +func (o *HealthCheck) HasMonitoringUpdatedAt() bool { + if o != nil && o.MonitoringUpdatedAt.IsSet() { + return true + } + + return false +} + +// SetMonitoringUpdatedAt gets a reference to the given NullableTime and assigns it to the MonitoringUpdatedAt field. +func (o *HealthCheck) SetMonitoringUpdatedAt(v time.Time) { + o.MonitoringUpdatedAt.Set(&v) +} +// SetMonitoringUpdatedAtNil sets the value for MonitoringUpdatedAt to be an explicit nil +func (o *HealthCheck) SetMonitoringUpdatedAtNil() { + o.MonitoringUpdatedAt.Set(nil) +} + +// UnsetMonitoringUpdatedAt ensures that no value is present for MonitoringUpdatedAt, not even an explicit nil +func (o *HealthCheck) UnsetMonitoringUpdatedAt() { + o.MonitoringUpdatedAt.Unset() +} + +func (o HealthCheck) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o HealthCheck) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.RequestConfig) { + toSerialize["request_config"] = o.RequestConfig + } + // skip: id is readOnly + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.Origin) { + toSerialize["origin"] = o.Origin + } + if !IsNil(o.OriginType) { + toSerialize["origin_type"] = o.OriginType + } + if !IsNil(o.Upstreams) { + toSerialize["upstreams"] = o.Upstreams + } + if !IsNil(o.Interval) { + toSerialize["interval"] = o.Interval + } + if !IsNil(o.Threshold) { + toSerialize["threshold"] = o.Threshold + } + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + if !IsNil(o.Retries) { + toSerialize["retries"] = o.Retries + } + if !IsNil(o.Zones) { + toSerialize["zones"] = o.Zones + } + if o.MonitoringUpdatedAt.IsSet() { + toSerialize["monitoring_updated_at"] = o.MonitoringUpdatedAt.Get() + } + return toSerialize, nil +} + +type NullableHealthCheck struct { + value *HealthCheck + isSet bool +} + +func (v NullableHealthCheck) Get() *HealthCheck { + return v.value +} + +func (v *NullableHealthCheck) Set(val *HealthCheck) { + v.value = val + v.isSet = true +} + +func (v NullableHealthCheck) IsSet() bool { + return v.isSet +} + +func (v *NullableHealthCheck) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableHealthCheck(val *HealthCheck) *NullableHealthCheck { + return &NullableHealthCheck{value: val, isSet: true} +} + +func (v NullableHealthCheck) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableHealthCheck) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_health_check_report_detail.go b/model_health_check_report_detail.go new file mode 100644 index 0000000..2bd71f1 --- /dev/null +++ b/model_health_check_report_detail.go @@ -0,0 +1,270 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the HealthCheckReportDetail type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &HealthCheckReportDetail{} + +// HealthCheckReportDetail struct for HealthCheckReportDetail +type HealthCheckReportDetail struct { + Date *string `json:"date,omitempty"` + Zone *string `json:"zone,omitempty"` + Upstream *string `json:"upstream,omitempty"` + Status *bool `json:"status,omitempty"` + Message *string `json:"message,omitempty"` +} + +// NewHealthCheckReportDetail instantiates a new HealthCheckReportDetail object +// This constructor will assign default values to properties that have it defined, +// 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 NewHealthCheckReportDetail() *HealthCheckReportDetail { + this := HealthCheckReportDetail{} + return &this +} + +// NewHealthCheckReportDetailWithDefaults instantiates a new HealthCheckReportDetail object +// This 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 NewHealthCheckReportDetailWithDefaults() *HealthCheckReportDetail { + this := HealthCheckReportDetail{} + return &this +} + +// GetDate returns the Date field value if set, zero value otherwise. +func (o *HealthCheckReportDetail) GetDate() string { + if o == nil || IsNil(o.Date) { + var ret string + return ret + } + return *o.Date +} + +// GetDateOk returns a tuple with the Date field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HealthCheckReportDetail) GetDateOk() (*string, bool) { + if o == nil || IsNil(o.Date) { + return nil, false + } + return o.Date, true +} + +// HasDate returns a boolean if a field has been set. +func (o *HealthCheckReportDetail) HasDate() bool { + if o != nil && !IsNil(o.Date) { + return true + } + + return false +} + +// SetDate gets a reference to the given string and assigns it to the Date field. +func (o *HealthCheckReportDetail) SetDate(v string) { + o.Date = &v +} + +// GetZone returns the Zone field value if set, zero value otherwise. +func (o *HealthCheckReportDetail) GetZone() string { + if o == nil || IsNil(o.Zone) { + var ret string + return ret + } + return *o.Zone +} + +// GetZoneOk returns a tuple with the Zone field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HealthCheckReportDetail) GetZoneOk() (*string, bool) { + if o == nil || IsNil(o.Zone) { + return nil, false + } + return o.Zone, true +} + +// HasZone returns a boolean if a field has been set. +func (o *HealthCheckReportDetail) HasZone() bool { + if o != nil && !IsNil(o.Zone) { + return true + } + + return false +} + +// SetZone gets a reference to the given string and assigns it to the Zone field. +func (o *HealthCheckReportDetail) SetZone(v string) { + o.Zone = &v +} + +// GetUpstream returns the Upstream field value if set, zero value otherwise. +func (o *HealthCheckReportDetail) GetUpstream() string { + if o == nil || IsNil(o.Upstream) { + var ret string + return ret + } + return *o.Upstream +} + +// GetUpstreamOk returns a tuple with the Upstream field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HealthCheckReportDetail) GetUpstreamOk() (*string, bool) { + if o == nil || IsNil(o.Upstream) { + return nil, false + } + return o.Upstream, true +} + +// HasUpstream returns a boolean if a field has been set. +func (o *HealthCheckReportDetail) HasUpstream() bool { + if o != nil && !IsNil(o.Upstream) { + return true + } + + return false +} + +// SetUpstream gets a reference to the given string and assigns it to the Upstream field. +func (o *HealthCheckReportDetail) SetUpstream(v string) { + o.Upstream = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *HealthCheckReportDetail) GetStatus() bool { + if o == nil || IsNil(o.Status) { + var ret bool + 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 *HealthCheckReportDetail) GetStatusOk() (*bool, 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 *HealthCheckReportDetail) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given bool and assigns it to the Status field. +func (o *HealthCheckReportDetail) SetStatus(v bool) { + o.Status = &v +} + +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *HealthCheckReportDetail) GetMessage() string { + if o == nil || IsNil(o.Message) { + var ret string + return ret + } + return *o.Message +} + +// GetMessageOk returns a tuple with the Message field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HealthCheckReportDetail) GetMessageOk() (*string, bool) { + if o == nil || IsNil(o.Message) { + return nil, false + } + return o.Message, true +} + +// HasMessage returns a boolean if a field has been set. +func (o *HealthCheckReportDetail) HasMessage() bool { + if o != nil && !IsNil(o.Message) { + return true + } + + return false +} + +// SetMessage gets a reference to the given string and assigns it to the Message field. +func (o *HealthCheckReportDetail) SetMessage(v string) { + o.Message = &v +} + +func (o HealthCheckReportDetail) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o HealthCheckReportDetail) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Date) { + toSerialize["date"] = o.Date + } + if !IsNil(o.Zone) { + toSerialize["zone"] = o.Zone + } + if !IsNil(o.Upstream) { + toSerialize["upstream"] = o.Upstream + } + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + if !IsNil(o.Message) { + toSerialize["message"] = o.Message + } + return toSerialize, nil +} + +type NullableHealthCheckReportDetail struct { + value *HealthCheckReportDetail + isSet bool +} + +func (v NullableHealthCheckReportDetail) Get() *HealthCheckReportDetail { + return v.value +} + +func (v *NullableHealthCheckReportDetail) Set(val *HealthCheckReportDetail) { + v.value = val + v.isSet = true +} + +func (v NullableHealthCheckReportDetail) IsSet() bool { + return v.isSet +} + +func (v *NullableHealthCheckReportDetail) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableHealthCheckReportDetail(val *HealthCheckReportDetail) *NullableHealthCheckReportDetail { + return &NullableHealthCheckReportDetail{value: val, isSet: true} +} + +func (v NullableHealthCheckReportDetail) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableHealthCheckReportDetail) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_health_check_report_summary.go b/model_health_check_report_summary.go new file mode 100644 index 0000000..7ba071b --- /dev/null +++ b/model_health_check_report_summary.go @@ -0,0 +1,270 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the HealthCheckReportSummary type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &HealthCheckReportSummary{} + +// HealthCheckReportSummary struct for HealthCheckReportSummary +type HealthCheckReportSummary struct { + Zone *string `json:"zone,omitempty"` + Status *bool `json:"status,omitempty"` + Total *int32 `json:"total,omitempty"` + Failed *int32 `json:"failed,omitempty"` + Details []HealthCheckReportSummaryDetail `json:"details,omitempty"` +} + +// NewHealthCheckReportSummary instantiates a new HealthCheckReportSummary object +// This constructor will assign default values to properties that have it defined, +// 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 NewHealthCheckReportSummary() *HealthCheckReportSummary { + this := HealthCheckReportSummary{} + return &this +} + +// NewHealthCheckReportSummaryWithDefaults instantiates a new HealthCheckReportSummary object +// This 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 NewHealthCheckReportSummaryWithDefaults() *HealthCheckReportSummary { + this := HealthCheckReportSummary{} + return &this +} + +// GetZone returns the Zone field value if set, zero value otherwise. +func (o *HealthCheckReportSummary) GetZone() string { + if o == nil || IsNil(o.Zone) { + var ret string + return ret + } + return *o.Zone +} + +// GetZoneOk returns a tuple with the Zone field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HealthCheckReportSummary) GetZoneOk() (*string, bool) { + if o == nil || IsNil(o.Zone) { + return nil, false + } + return o.Zone, true +} + +// HasZone returns a boolean if a field has been set. +func (o *HealthCheckReportSummary) HasZone() bool { + if o != nil && !IsNil(o.Zone) { + return true + } + + return false +} + +// SetZone gets a reference to the given string and assigns it to the Zone field. +func (o *HealthCheckReportSummary) SetZone(v string) { + o.Zone = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *HealthCheckReportSummary) GetStatus() bool { + if o == nil || IsNil(o.Status) { + var ret bool + 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 *HealthCheckReportSummary) GetStatusOk() (*bool, 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 *HealthCheckReportSummary) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given bool and assigns it to the Status field. +func (o *HealthCheckReportSummary) SetStatus(v bool) { + o.Status = &v +} + +// GetTotal returns the Total field value if set, zero value otherwise. +func (o *HealthCheckReportSummary) GetTotal() int32 { + if o == nil || IsNil(o.Total) { + var ret int32 + return ret + } + return *o.Total +} + +// GetTotalOk returns a tuple with the Total field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HealthCheckReportSummary) GetTotalOk() (*int32, bool) { + if o == nil || IsNil(o.Total) { + return nil, false + } + return o.Total, true +} + +// HasTotal returns a boolean if a field has been set. +func (o *HealthCheckReportSummary) HasTotal() bool { + if o != nil && !IsNil(o.Total) { + return true + } + + return false +} + +// SetTotal gets a reference to the given int32 and assigns it to the Total field. +func (o *HealthCheckReportSummary) SetTotal(v int32) { + o.Total = &v +} + +// GetFailed returns the Failed field value if set, zero value otherwise. +func (o *HealthCheckReportSummary) GetFailed() int32 { + if o == nil || IsNil(o.Failed) { + var ret int32 + 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 *HealthCheckReportSummary) GetFailedOk() (*int32, 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 *HealthCheckReportSummary) HasFailed() bool { + if o != nil && !IsNil(o.Failed) { + return true + } + + return false +} + +// SetFailed gets a reference to the given int32 and assigns it to the Failed field. +func (o *HealthCheckReportSummary) SetFailed(v int32) { + o.Failed = &v +} + +// GetDetails returns the Details field value if set, zero value otherwise. +func (o *HealthCheckReportSummary) GetDetails() []HealthCheckReportSummaryDetail { + if o == nil || IsNil(o.Details) { + var ret []HealthCheckReportSummaryDetail + return ret + } + return o.Details +} + +// GetDetailsOk returns a tuple with the Details field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HealthCheckReportSummary) GetDetailsOk() ([]HealthCheckReportSummaryDetail, bool) { + if o == nil || IsNil(o.Details) { + return nil, false + } + return o.Details, true +} + +// HasDetails returns a boolean if a field has been set. +func (o *HealthCheckReportSummary) HasDetails() bool { + if o != nil && !IsNil(o.Details) { + return true + } + + return false +} + +// SetDetails gets a reference to the given []HealthCheckReportSummaryDetail and assigns it to the Details field. +func (o *HealthCheckReportSummary) SetDetails(v []HealthCheckReportSummaryDetail) { + o.Details = v +} + +func (o HealthCheckReportSummary) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o HealthCheckReportSummary) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Zone) { + toSerialize["zone"] = o.Zone + } + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + if !IsNil(o.Total) { + toSerialize["total"] = o.Total + } + if !IsNil(o.Failed) { + toSerialize["failed"] = o.Failed + } + if !IsNil(o.Details) { + toSerialize["details"] = o.Details + } + return toSerialize, nil +} + +type NullableHealthCheckReportSummary struct { + value *HealthCheckReportSummary + isSet bool +} + +func (v NullableHealthCheckReportSummary) Get() *HealthCheckReportSummary { + return v.value +} + +func (v *NullableHealthCheckReportSummary) Set(val *HealthCheckReportSummary) { + v.value = val + v.isSet = true +} + +func (v NullableHealthCheckReportSummary) IsSet() bool { + return v.isSet +} + +func (v *NullableHealthCheckReportSummary) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableHealthCheckReportSummary(val *HealthCheckReportSummary) *NullableHealthCheckReportSummary { + return &NullableHealthCheckReportSummary{value: val, isSet: true} +} + +func (v NullableHealthCheckReportSummary) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableHealthCheckReportSummary) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_health_check_report_summary_detail.go b/model_health_check_report_summary_detail.go new file mode 100644 index 0000000..9ca5410 --- /dev/null +++ b/model_health_check_report_summary_detail.go @@ -0,0 +1,162 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the HealthCheckReportSummaryDetail type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &HealthCheckReportSummaryDetail{} + +// HealthCheckReportSummaryDetail struct for HealthCheckReportSummaryDetail +type HealthCheckReportSummaryDetail struct { + Date *string `json:"date,omitempty"` + Status *bool `json:"status,omitempty"` +} + +// NewHealthCheckReportSummaryDetail instantiates a new HealthCheckReportSummaryDetail object +// This constructor will assign default values to properties that have it defined, +// 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 NewHealthCheckReportSummaryDetail() *HealthCheckReportSummaryDetail { + this := HealthCheckReportSummaryDetail{} + return &this +} + +// NewHealthCheckReportSummaryDetailWithDefaults instantiates a new HealthCheckReportSummaryDetail object +// This 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 NewHealthCheckReportSummaryDetailWithDefaults() *HealthCheckReportSummaryDetail { + this := HealthCheckReportSummaryDetail{} + return &this +} + +// GetDate returns the Date field value if set, zero value otherwise. +func (o *HealthCheckReportSummaryDetail) GetDate() string { + if o == nil || IsNil(o.Date) { + var ret string + return ret + } + return *o.Date +} + +// GetDateOk returns a tuple with the Date field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HealthCheckReportSummaryDetail) GetDateOk() (*string, bool) { + if o == nil || IsNil(o.Date) { + return nil, false + } + return o.Date, true +} + +// HasDate returns a boolean if a field has been set. +func (o *HealthCheckReportSummaryDetail) HasDate() bool { + if o != nil && !IsNil(o.Date) { + return true + } + + return false +} + +// SetDate gets a reference to the given string and assigns it to the Date field. +func (o *HealthCheckReportSummaryDetail) SetDate(v string) { + o.Date = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *HealthCheckReportSummaryDetail) GetStatus() bool { + if o == nil || IsNil(o.Status) { + var ret bool + 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 *HealthCheckReportSummaryDetail) GetStatusOk() (*bool, 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 *HealthCheckReportSummaryDetail) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given bool and assigns it to the Status field. +func (o *HealthCheckReportSummaryDetail) SetStatus(v bool) { + o.Status = &v +} + +func (o HealthCheckReportSummaryDetail) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o HealthCheckReportSummaryDetail) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Date) { + toSerialize["date"] = o.Date + } + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + return toSerialize, nil +} + +type NullableHealthCheckReportSummaryDetail struct { + value *HealthCheckReportSummaryDetail + isSet bool +} + +func (v NullableHealthCheckReportSummaryDetail) Get() *HealthCheckReportSummaryDetail { + return v.value +} + +func (v *NullableHealthCheckReportSummaryDetail) Set(val *HealthCheckReportSummaryDetail) { + v.value = val + v.isSet = true +} + +func (v NullableHealthCheckReportSummaryDetail) IsSet() bool { + return v.isSet +} + +func (v *NullableHealthCheckReportSummaryDetail) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableHealthCheckReportSummaryDetail(val *HealthCheckReportSummaryDetail) *NullableHealthCheckReportSummaryDetail { + return &NullableHealthCheckReportSummaryDetail{value: val, isSet: true} +} + +func (v NullableHealthCheckReportSummaryDetail) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableHealthCheckReportSummaryDetail) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_health_check_request_config.go b/model_health_check_request_config.go new file mode 100644 index 0000000..53bfe45 --- /dev/null +++ b/model_health_check_request_config.go @@ -0,0 +1,148 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" + "fmt" +) + +// HealthCheckRequestConfig - struct for HealthCheckRequestConfig +type HealthCheckRequestConfig struct { + HttpConfig *HttpConfig + TcpConfig *TcpConfig +} + +// HttpConfigAsHealthCheckRequestConfig is a convenience function that returns HttpConfig wrapped in HealthCheckRequestConfig +func HttpConfigAsHealthCheckRequestConfig(v *HttpConfig) HealthCheckRequestConfig { + return HealthCheckRequestConfig{ + HttpConfig: v, + } +} + +// TcpConfigAsHealthCheckRequestConfig is a convenience function that returns TcpConfig wrapped in HealthCheckRequestConfig +func TcpConfigAsHealthCheckRequestConfig(v *TcpConfig) HealthCheckRequestConfig { + return HealthCheckRequestConfig{ + TcpConfig: v, + } +} + + +// Unmarshal JSON data into one of the pointers in the struct +func (dst *HealthCheckRequestConfig) UnmarshalJSON(data []byte) error { + var err error + match := 0 + // try to unmarshal data into HttpConfig + err = newStrictDecoder(data).Decode(&dst.HttpConfig) + if err == nil { + jsonHttpConfig, _ := json.Marshal(dst.HttpConfig) + if string(jsonHttpConfig) == "{}" { // empty struct + dst.HttpConfig = nil + } else { + match++ + } + } else { + dst.HttpConfig = nil + } + + // try to unmarshal data into TcpConfig + err = newStrictDecoder(data).Decode(&dst.TcpConfig) + if err == nil { + jsonTcpConfig, _ := json.Marshal(dst.TcpConfig) + if string(jsonTcpConfig) == "{}" { // empty struct + dst.TcpConfig = nil + } else { + match++ + } + } else { + dst.TcpConfig = nil + } + + if match > 1 { // more than 1 match + // reset to nil + dst.HttpConfig = nil + dst.TcpConfig = nil + + return fmt.Errorf("data matches more than one schema in oneOf(HealthCheckRequestConfig)") + } else if match == 1 { + return nil // exactly one match + } else { // no match + return fmt.Errorf("data failed to match schemas in oneOf(HealthCheckRequestConfig)") + } +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src HealthCheckRequestConfig) MarshalJSON() ([]byte, error) { + if src.HttpConfig != nil { + return json.Marshal(&src.HttpConfig) + } + + if src.TcpConfig != nil { + return json.Marshal(&src.TcpConfig) + } + + return nil, nil // no data in oneOf schemas +} + +// Get the actual instance +func (obj *HealthCheckRequestConfig) GetActualInstance() (interface{}) { + if obj == nil { + return nil + } + if obj.HttpConfig != nil { + return obj.HttpConfig + } + + if obj.TcpConfig != nil { + return obj.TcpConfig + } + + // all schemas are nil + return nil +} + +type NullableHealthCheckRequestConfig struct { + value *HealthCheckRequestConfig + isSet bool +} + +func (v NullableHealthCheckRequestConfig) Get() *HealthCheckRequestConfig { + return v.value +} + +func (v *NullableHealthCheckRequestConfig) Set(val *HealthCheckRequestConfig) { + v.value = val + v.isSet = true +} + +func (v NullableHealthCheckRequestConfig) IsSet() bool { + return v.isSet +} + +func (v *NullableHealthCheckRequestConfig) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableHealthCheckRequestConfig(val *HealthCheckRequestConfig) *NullableHealthCheckRequestConfig { + return &NullableHealthCheckRequestConfig{value: val, isSet: true} +} + +func (v NullableHealthCheckRequestConfig) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableHealthCheckRequestConfig) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_health_check_response.go b/model_health_check_response.go new file mode 100644 index 0000000..8c56b3d --- /dev/null +++ b/model_health_check_response.go @@ -0,0 +1,172 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the HealthCheckResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &HealthCheckResponse{} + +// HealthCheckResponse struct for HealthCheckResponse +type HealthCheckResponse struct { + Data *HealthCheckView `json:"data,omitempty"` + Message NullableString `json:"message,omitempty"` +} + +// NewHealthCheckResponse instantiates a new HealthCheckResponse object +// This constructor will assign default values to properties that have it defined, +// 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 NewHealthCheckResponse() *HealthCheckResponse { + this := HealthCheckResponse{} + return &this +} + +// NewHealthCheckResponseWithDefaults instantiates a new HealthCheckResponse object +// This 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 NewHealthCheckResponseWithDefaults() *HealthCheckResponse { + this := HealthCheckResponse{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *HealthCheckResponse) GetData() HealthCheckView { + if o == nil || IsNil(o.Data) { + var ret HealthCheckView + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HealthCheckResponse) GetDataOk() (*HealthCheckView, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *HealthCheckResponse) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given HealthCheckView and assigns it to the Data field. +func (o *HealthCheckResponse) SetData(v HealthCheckView) { + o.Data = &v +} + +// GetMessage returns the Message field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *HealthCheckResponse) GetMessage() string { + if o == nil || IsNil(o.Message.Get()) { + var ret string + return ret + } + return *o.Message.Get() +} + +// GetMessageOk returns a tuple with the Message 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 *HealthCheckResponse) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Message.Get(), o.Message.IsSet() +} + +// HasMessage returns a boolean if a field has been set. +func (o *HealthCheckResponse) HasMessage() bool { + if o != nil && o.Message.IsSet() { + return true + } + + return false +} + +// SetMessage gets a reference to the given NullableString and assigns it to the Message field. +func (o *HealthCheckResponse) SetMessage(v string) { + o.Message.Set(&v) +} +// SetMessageNil sets the value for Message to be an explicit nil +func (o *HealthCheckResponse) SetMessageNil() { + o.Message.Set(nil) +} + +// UnsetMessage ensures that no value is present for Message, not even an explicit nil +func (o *HealthCheckResponse) UnsetMessage() { + o.Message.Unset() +} + +func (o HealthCheckResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o HealthCheckResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + if o.Message.IsSet() { + toSerialize["message"] = o.Message.Get() + } + return toSerialize, nil +} + +type NullableHealthCheckResponse struct { + value *HealthCheckResponse + isSet bool +} + +func (v NullableHealthCheckResponse) Get() *HealthCheckResponse { + return v.value +} + +func (v *NullableHealthCheckResponse) Set(val *HealthCheckResponse) { + v.value = val + v.isSet = true +} + +func (v NullableHealthCheckResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableHealthCheckResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableHealthCheckResponse(val *HealthCheckResponse) *NullableHealthCheckResponse { + return &NullableHealthCheckResponse{value: val, isSet: true} +} + +func (v NullableHealthCheckResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableHealthCheckResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_health_check_view.go b/model_health_check_view.go new file mode 100644 index 0000000..956ef6d --- /dev/null +++ b/model_health_check_view.go @@ -0,0 +1,611 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" + "time" +) + +// checks if the HealthCheckView type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &HealthCheckView{} + +// HealthCheckView struct for HealthCheckView +type HealthCheckView struct { + RequestConfig map[string]interface{} `json:"request_config,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + // can be IP/Host when type is `upstream`, otherwise it must be a valid record ID + Origin *string `json:"origin,omitempty"` + OriginType *string `json:"origin_type,omitempty"` + Upstreams []string `json:"upstreams,omitempty"` + // In milliseconds + Interval *int32 `json:"interval,omitempty"` + Threshold *int32 `json:"threshold,omitempty"` + Type *string `json:"type,omitempty"` + // The health-check is off or on + Status *bool `json:"status,omitempty"` + // Number of immediate retries in case of a timeout + Retries *int32 `json:"retries,omitempty"` + Zones []HealthCheckZone `json:"zones,omitempty"` + MonitoringUpdatedAt NullableTime `json:"monitoring_updated_at,omitempty"` +} + +// NewHealthCheckView instantiates a new HealthCheckView object +// This constructor will assign default values to properties that have it defined, +// 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 NewHealthCheckView() *HealthCheckView { + this := HealthCheckView{} + var status bool = true + this.Status = &status + return &this +} + +// NewHealthCheckViewWithDefaults instantiates a new HealthCheckView object +// This 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 NewHealthCheckViewWithDefaults() *HealthCheckView { + this := HealthCheckView{} + var status bool = true + this.Status = &status + return &this +} + +// GetRequestConfig returns the RequestConfig field value if set, zero value otherwise. +func (o *HealthCheckView) GetRequestConfig() map[string]interface{} { + if o == nil || IsNil(o.RequestConfig) { + var ret map[string]interface{} + return ret + } + return o.RequestConfig +} + +// GetRequestConfigOk returns a tuple with the RequestConfig field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HealthCheckView) GetRequestConfigOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.RequestConfig) { + return map[string]interface{}{}, false + } + return o.RequestConfig, true +} + +// HasRequestConfig returns a boolean if a field has been set. +func (o *HealthCheckView) HasRequestConfig() bool { + if o != nil && !IsNil(o.RequestConfig) { + return true + } + + return false +} + +// SetRequestConfig gets a reference to the given map[string]interface{} and assigns it to the RequestConfig field. +func (o *HealthCheckView) SetRequestConfig(v map[string]interface{}) { + o.RequestConfig = v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *HealthCheckView) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HealthCheckView) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *HealthCheckView) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *HealthCheckView) SetId(v string) { + o.Id = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *HealthCheckView) 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 *HealthCheckView) 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 *HealthCheckView) 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 *HealthCheckView) SetName(v string) { + o.Name = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *HealthCheckView) 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 *HealthCheckView) 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 *HealthCheckView) 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 *HealthCheckView) SetDescription(v string) { + o.Description = &v +} + +// GetOrigin returns the Origin field value if set, zero value otherwise. +func (o *HealthCheckView) GetOrigin() string { + if o == nil || IsNil(o.Origin) { + var ret string + return ret + } + return *o.Origin +} + +// GetOriginOk returns a tuple with the Origin field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HealthCheckView) GetOriginOk() (*string, bool) { + if o == nil || IsNil(o.Origin) { + return nil, false + } + return o.Origin, true +} + +// HasOrigin returns a boolean if a field has been set. +func (o *HealthCheckView) HasOrigin() bool { + if o != nil && !IsNil(o.Origin) { + return true + } + + return false +} + +// SetOrigin gets a reference to the given string and assigns it to the Origin field. +func (o *HealthCheckView) SetOrigin(v string) { + o.Origin = &v +} + +// GetOriginType returns the OriginType field value if set, zero value otherwise. +func (o *HealthCheckView) GetOriginType() string { + if o == nil || IsNil(o.OriginType) { + var ret string + return ret + } + return *o.OriginType +} + +// GetOriginTypeOk returns a tuple with the OriginType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HealthCheckView) GetOriginTypeOk() (*string, bool) { + if o == nil || IsNil(o.OriginType) { + return nil, false + } + return o.OriginType, true +} + +// HasOriginType returns a boolean if a field has been set. +func (o *HealthCheckView) HasOriginType() bool { + if o != nil && !IsNil(o.OriginType) { + return true + } + + return false +} + +// SetOriginType gets a reference to the given string and assigns it to the OriginType field. +func (o *HealthCheckView) SetOriginType(v string) { + o.OriginType = &v +} + +// GetUpstreams returns the Upstreams field value if set, zero value otherwise. +func (o *HealthCheckView) GetUpstreams() []string { + if o == nil || IsNil(o.Upstreams) { + var ret []string + return ret + } + return o.Upstreams +} + +// GetUpstreamsOk returns a tuple with the Upstreams field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HealthCheckView) GetUpstreamsOk() ([]string, bool) { + if o == nil || IsNil(o.Upstreams) { + return nil, false + } + return o.Upstreams, true +} + +// HasUpstreams returns a boolean if a field has been set. +func (o *HealthCheckView) HasUpstreams() bool { + if o != nil && !IsNil(o.Upstreams) { + return true + } + + return false +} + +// SetUpstreams gets a reference to the given []string and assigns it to the Upstreams field. +func (o *HealthCheckView) SetUpstreams(v []string) { + o.Upstreams = v +} + +// GetInterval returns the Interval field value if set, zero value otherwise. +func (o *HealthCheckView) GetInterval() int32 { + if o == nil || IsNil(o.Interval) { + var ret int32 + return ret + } + return *o.Interval +} + +// GetIntervalOk returns a tuple with the Interval field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HealthCheckView) GetIntervalOk() (*int32, bool) { + if o == nil || IsNil(o.Interval) { + return nil, false + } + return o.Interval, true +} + +// HasInterval returns a boolean if a field has been set. +func (o *HealthCheckView) HasInterval() bool { + if o != nil && !IsNil(o.Interval) { + return true + } + + return false +} + +// SetInterval gets a reference to the given int32 and assigns it to the Interval field. +func (o *HealthCheckView) SetInterval(v int32) { + o.Interval = &v +} + +// GetThreshold returns the Threshold field value if set, zero value otherwise. +func (o *HealthCheckView) GetThreshold() int32 { + if o == nil || IsNil(o.Threshold) { + var ret int32 + return ret + } + return *o.Threshold +} + +// GetThresholdOk returns a tuple with the Threshold field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HealthCheckView) GetThresholdOk() (*int32, bool) { + if o == nil || IsNil(o.Threshold) { + return nil, false + } + return o.Threshold, true +} + +// HasThreshold returns a boolean if a field has been set. +func (o *HealthCheckView) HasThreshold() bool { + if o != nil && !IsNil(o.Threshold) { + return true + } + + return false +} + +// SetThreshold gets a reference to the given int32 and assigns it to the Threshold field. +func (o *HealthCheckView) SetThreshold(v int32) { + o.Threshold = &v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *HealthCheckView) 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 *HealthCheckView) 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 *HealthCheckView) 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 *HealthCheckView) SetType(v string) { + o.Type = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *HealthCheckView) GetStatus() bool { + if o == nil || IsNil(o.Status) { + var ret bool + 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 *HealthCheckView) GetStatusOk() (*bool, 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 *HealthCheckView) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given bool and assigns it to the Status field. +func (o *HealthCheckView) SetStatus(v bool) { + o.Status = &v +} + +// GetRetries returns the Retries field value if set, zero value otherwise. +func (o *HealthCheckView) GetRetries() int32 { + if o == nil || IsNil(o.Retries) { + var ret int32 + return ret + } + return *o.Retries +} + +// GetRetriesOk returns a tuple with the Retries field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HealthCheckView) GetRetriesOk() (*int32, bool) { + if o == nil || IsNil(o.Retries) { + return nil, false + } + return o.Retries, true +} + +// HasRetries returns a boolean if a field has been set. +func (o *HealthCheckView) HasRetries() bool { + if o != nil && !IsNil(o.Retries) { + return true + } + + return false +} + +// SetRetries gets a reference to the given int32 and assigns it to the Retries field. +func (o *HealthCheckView) SetRetries(v int32) { + o.Retries = &v +} + +// GetZones returns the Zones field value if set, zero value otherwise. +func (o *HealthCheckView) GetZones() []HealthCheckZone { + if o == nil || IsNil(o.Zones) { + var ret []HealthCheckZone + return ret + } + return o.Zones +} + +// GetZonesOk returns a tuple with the Zones field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HealthCheckView) GetZonesOk() ([]HealthCheckZone, bool) { + if o == nil || IsNil(o.Zones) { + return nil, false + } + return o.Zones, true +} + +// HasZones returns a boolean if a field has been set. +func (o *HealthCheckView) HasZones() bool { + if o != nil && !IsNil(o.Zones) { + return true + } + + return false +} + +// SetZones gets a reference to the given []HealthCheckZone and assigns it to the Zones field. +func (o *HealthCheckView) SetZones(v []HealthCheckZone) { + o.Zones = v +} + +// GetMonitoringUpdatedAt returns the MonitoringUpdatedAt field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *HealthCheckView) GetMonitoringUpdatedAt() time.Time { + if o == nil || IsNil(o.MonitoringUpdatedAt.Get()) { + var ret time.Time + return ret + } + return *o.MonitoringUpdatedAt.Get() +} + +// GetMonitoringUpdatedAtOk returns a tuple with the MonitoringUpdatedAt 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 *HealthCheckView) GetMonitoringUpdatedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.MonitoringUpdatedAt.Get(), o.MonitoringUpdatedAt.IsSet() +} + +// HasMonitoringUpdatedAt returns a boolean if a field has been set. +func (o *HealthCheckView) HasMonitoringUpdatedAt() bool { + if o != nil && o.MonitoringUpdatedAt.IsSet() { + return true + } + + return false +} + +// SetMonitoringUpdatedAt gets a reference to the given NullableTime and assigns it to the MonitoringUpdatedAt field. +func (o *HealthCheckView) SetMonitoringUpdatedAt(v time.Time) { + o.MonitoringUpdatedAt.Set(&v) +} +// SetMonitoringUpdatedAtNil sets the value for MonitoringUpdatedAt to be an explicit nil +func (o *HealthCheckView) SetMonitoringUpdatedAtNil() { + o.MonitoringUpdatedAt.Set(nil) +} + +// UnsetMonitoringUpdatedAt ensures that no value is present for MonitoringUpdatedAt, not even an explicit nil +func (o *HealthCheckView) UnsetMonitoringUpdatedAt() { + o.MonitoringUpdatedAt.Unset() +} + +func (o HealthCheckView) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o HealthCheckView) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.RequestConfig) { + toSerialize["request_config"] = o.RequestConfig + } + // skip: id is readOnly + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.Origin) { + toSerialize["origin"] = o.Origin + } + if !IsNil(o.OriginType) { + toSerialize["origin_type"] = o.OriginType + } + if !IsNil(o.Upstreams) { + toSerialize["upstreams"] = o.Upstreams + } + if !IsNil(o.Interval) { + toSerialize["interval"] = o.Interval + } + if !IsNil(o.Threshold) { + toSerialize["threshold"] = o.Threshold + } + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + if !IsNil(o.Retries) { + toSerialize["retries"] = o.Retries + } + if !IsNil(o.Zones) { + toSerialize["zones"] = o.Zones + } + if o.MonitoringUpdatedAt.IsSet() { + toSerialize["monitoring_updated_at"] = o.MonitoringUpdatedAt.Get() + } + return toSerialize, nil +} + +type NullableHealthCheckView struct { + value *HealthCheckView + isSet bool +} + +func (v NullableHealthCheckView) Get() *HealthCheckView { + return v.value +} + +func (v *NullableHealthCheckView) Set(val *HealthCheckView) { + v.value = val + v.isSet = true +} + +func (v NullableHealthCheckView) IsSet() bool { + return v.isSet +} + +func (v *NullableHealthCheckView) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableHealthCheckView(val *HealthCheckView) *NullableHealthCheckView { + return &NullableHealthCheckView{value: val, isSet: true} +} + +func (v NullableHealthCheckView) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableHealthCheckView) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_health_check_zone.go b/model_health_check_zone.go new file mode 100644 index 0000000..4f20215 --- /dev/null +++ b/model_health_check_zone.go @@ -0,0 +1,162 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the HealthCheckZone type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &HealthCheckZone{} + +// HealthCheckZone struct for HealthCheckZone +type HealthCheckZone struct { + Id *string `json:"id,omitempty"` + MonitoringLevel *string `json:"monitoring_level,omitempty"` +} + +// NewHealthCheckZone instantiates a new HealthCheckZone object +// This constructor will assign default values to properties that have it defined, +// 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 NewHealthCheckZone() *HealthCheckZone { + this := HealthCheckZone{} + return &this +} + +// NewHealthCheckZoneWithDefaults instantiates a new HealthCheckZone object +// This 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 NewHealthCheckZoneWithDefaults() *HealthCheckZone { + this := HealthCheckZone{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *HealthCheckZone) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HealthCheckZone) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *HealthCheckZone) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *HealthCheckZone) SetId(v string) { + o.Id = &v +} + +// GetMonitoringLevel returns the MonitoringLevel field value if set, zero value otherwise. +func (o *HealthCheckZone) GetMonitoringLevel() string { + if o == nil || IsNil(o.MonitoringLevel) { + var ret string + return ret + } + return *o.MonitoringLevel +} + +// GetMonitoringLevelOk returns a tuple with the MonitoringLevel field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HealthCheckZone) GetMonitoringLevelOk() (*string, bool) { + if o == nil || IsNil(o.MonitoringLevel) { + return nil, false + } + return o.MonitoringLevel, true +} + +// HasMonitoringLevel returns a boolean if a field has been set. +func (o *HealthCheckZone) HasMonitoringLevel() bool { + if o != nil && !IsNil(o.MonitoringLevel) { + return true + } + + return false +} + +// SetMonitoringLevel gets a reference to the given string and assigns it to the MonitoringLevel field. +func (o *HealthCheckZone) SetMonitoringLevel(v string) { + o.MonitoringLevel = &v +} + +func (o HealthCheckZone) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o HealthCheckZone) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.MonitoringLevel) { + toSerialize["monitoring_level"] = o.MonitoringLevel + } + return toSerialize, nil +} + +type NullableHealthCheckZone struct { + value *HealthCheckZone + isSet bool +} + +func (v NullableHealthCheckZone) Get() *HealthCheckZone { + return v.value +} + +func (v *NullableHealthCheckZone) Set(val *HealthCheckZone) { + v.value = val + v.isSet = true +} + +func (v NullableHealthCheckZone) IsSet() bool { + return v.isSet +} + +func (v *NullableHealthCheckZone) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableHealthCheckZone(val *HealthCheckZone) *NullableHealthCheckZone { + return &NullableHealthCheckZone{value: val, isSet: true} +} + +func (v NullableHealthCheckZone) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableHealthCheckZone) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_health_check_zone_name.go b/model_health_check_zone_name.go new file mode 100644 index 0000000..733b331 --- /dev/null +++ b/model_health_check_zone_name.go @@ -0,0 +1,162 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the HealthCheckZoneName type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &HealthCheckZoneName{} + +// HealthCheckZoneName struct for HealthCheckZoneName +type HealthCheckZoneName struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` +} + +// NewHealthCheckZoneName instantiates a new HealthCheckZoneName object +// This constructor will assign default values to properties that have it defined, +// 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 NewHealthCheckZoneName() *HealthCheckZoneName { + this := HealthCheckZoneName{} + return &this +} + +// NewHealthCheckZoneNameWithDefaults instantiates a new HealthCheckZoneName object +// This 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 NewHealthCheckZoneNameWithDefaults() *HealthCheckZoneName { + this := HealthCheckZoneName{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *HealthCheckZoneName) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HealthCheckZoneName) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *HealthCheckZoneName) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *HealthCheckZoneName) SetId(v string) { + o.Id = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *HealthCheckZoneName) 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 *HealthCheckZoneName) 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 *HealthCheckZoneName) 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 *HealthCheckZoneName) SetName(v string) { + o.Name = &v +} + +func (o HealthCheckZoneName) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o HealthCheckZoneName) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + return toSerialize, nil +} + +type NullableHealthCheckZoneName struct { + value *HealthCheckZoneName + isSet bool +} + +func (v NullableHealthCheckZoneName) Get() *HealthCheckZoneName { + return v.value +} + +func (v *NullableHealthCheckZoneName) Set(val *HealthCheckZoneName) { + v.value = val + v.isSet = true +} + +func (v NullableHealthCheckZoneName) IsSet() bool { + return v.isSet +} + +func (v *NullableHealthCheckZoneName) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableHealthCheckZoneName(val *HealthCheckZoneName) *NullableHealthCheckZoneName { + return &NullableHealthCheckZoneName{value: val, isSet: true} +} + +func (v NullableHealthCheckZoneName) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableHealthCheckZoneName) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_health_checks_zones_index_200_response.go b/model_health_checks_zones_index_200_response.go new file mode 100644 index 0000000..3007e76 --- /dev/null +++ b/model_health_checks_zones_index_200_response.go @@ -0,0 +1,172 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the HealthChecksZonesIndex200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &HealthChecksZonesIndex200Response{} + +// HealthChecksZonesIndex200Response struct for HealthChecksZonesIndex200Response +type HealthChecksZonesIndex200Response struct { + Data []HealthCheckZoneName `json:"data,omitempty"` + Message NullableString `json:"message,omitempty"` +} + +// NewHealthChecksZonesIndex200Response instantiates a new HealthChecksZonesIndex200Response object +// This constructor will assign default values to properties that have it defined, +// 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 NewHealthChecksZonesIndex200Response() *HealthChecksZonesIndex200Response { + this := HealthChecksZonesIndex200Response{} + return &this +} + +// NewHealthChecksZonesIndex200ResponseWithDefaults instantiates a new HealthChecksZonesIndex200Response object +// This 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 NewHealthChecksZonesIndex200ResponseWithDefaults() *HealthChecksZonesIndex200Response { + this := HealthChecksZonesIndex200Response{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *HealthChecksZonesIndex200Response) GetData() []HealthCheckZoneName { + if o == nil || IsNil(o.Data) { + var ret []HealthCheckZoneName + return ret + } + return o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HealthChecksZonesIndex200Response) GetDataOk() ([]HealthCheckZoneName, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *HealthChecksZonesIndex200Response) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given []HealthCheckZoneName and assigns it to the Data field. +func (o *HealthChecksZonesIndex200Response) SetData(v []HealthCheckZoneName) { + o.Data = v +} + +// GetMessage returns the Message field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *HealthChecksZonesIndex200Response) GetMessage() string { + if o == nil || IsNil(o.Message.Get()) { + var ret string + return ret + } + return *o.Message.Get() +} + +// GetMessageOk returns a tuple with the Message 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 *HealthChecksZonesIndex200Response) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Message.Get(), o.Message.IsSet() +} + +// HasMessage returns a boolean if a field has been set. +func (o *HealthChecksZonesIndex200Response) HasMessage() bool { + if o != nil && o.Message.IsSet() { + return true + } + + return false +} + +// SetMessage gets a reference to the given NullableString and assigns it to the Message field. +func (o *HealthChecksZonesIndex200Response) SetMessage(v string) { + o.Message.Set(&v) +} +// SetMessageNil sets the value for Message to be an explicit nil +func (o *HealthChecksZonesIndex200Response) SetMessageNil() { + o.Message.Set(nil) +} + +// UnsetMessage ensures that no value is present for Message, not even an explicit nil +func (o *HealthChecksZonesIndex200Response) UnsetMessage() { + o.Message.Unset() +} + +func (o HealthChecksZonesIndex200Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o HealthChecksZonesIndex200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + if o.Message.IsSet() { + toSerialize["message"] = o.Message.Get() + } + return toSerialize, nil +} + +type NullableHealthChecksZonesIndex200Response struct { + value *HealthChecksZonesIndex200Response + isSet bool +} + +func (v NullableHealthChecksZonesIndex200Response) Get() *HealthChecksZonesIndex200Response { + return v.value +} + +func (v *NullableHealthChecksZonesIndex200Response) Set(val *HealthChecksZonesIndex200Response) { + v.value = val + v.isSet = true +} + +func (v NullableHealthChecksZonesIndex200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableHealthChecksZonesIndex200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableHealthChecksZonesIndex200Response(val *HealthChecksZonesIndex200Response) *NullableHealthChecksZonesIndex200Response { + return &NullableHealthChecksZonesIndex200Response{value: val, isSet: true} +} + +func (v NullableHealthChecksZonesIndex200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableHealthChecksZonesIndex200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_high_requested_ip.go b/model_high_requested_ip.go new file mode 100644 index 0000000..ab4c1de --- /dev/null +++ b/model_high_requested_ip.go @@ -0,0 +1,162 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the HighRequestedIp type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &HighRequestedIp{} + +// HighRequestedIp struct for HighRequestedIp +type HighRequestedIp struct { + Ip *HighRequestedIpIp `json:"ip,omitempty"` + RequestCount *int32 `json:"request_count,omitempty"` +} + +// NewHighRequestedIp instantiates a new HighRequestedIp object +// This constructor will assign default values to properties that have it defined, +// 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 NewHighRequestedIp() *HighRequestedIp { + this := HighRequestedIp{} + return &this +} + +// NewHighRequestedIpWithDefaults instantiates a new HighRequestedIp object +// This 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 NewHighRequestedIpWithDefaults() *HighRequestedIp { + this := HighRequestedIp{} + return &this +} + +// GetIp returns the Ip field value if set, zero value otherwise. +func (o *HighRequestedIp) GetIp() HighRequestedIpIp { + if o == nil || IsNil(o.Ip) { + var ret HighRequestedIpIp + return ret + } + return *o.Ip +} + +// GetIpOk returns a tuple with the Ip field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HighRequestedIp) GetIpOk() (*HighRequestedIpIp, bool) { + if o == nil || IsNil(o.Ip) { + return nil, false + } + return o.Ip, true +} + +// HasIp returns a boolean if a field has been set. +func (o *HighRequestedIp) HasIp() bool { + if o != nil && !IsNil(o.Ip) { + return true + } + + return false +} + +// SetIp gets a reference to the given HighRequestedIpIp and assigns it to the Ip field. +func (o *HighRequestedIp) SetIp(v HighRequestedIpIp) { + o.Ip = &v +} + +// GetRequestCount returns the RequestCount field value if set, zero value otherwise. +func (o *HighRequestedIp) GetRequestCount() int32 { + if o == nil || IsNil(o.RequestCount) { + var ret int32 + return ret + } + return *o.RequestCount +} + +// GetRequestCountOk returns a tuple with the RequestCount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HighRequestedIp) GetRequestCountOk() (*int32, bool) { + if o == nil || IsNil(o.RequestCount) { + return nil, false + } + return o.RequestCount, true +} + +// HasRequestCount returns a boolean if a field has been set. +func (o *HighRequestedIp) HasRequestCount() bool { + if o != nil && !IsNil(o.RequestCount) { + return true + } + + return false +} + +// SetRequestCount gets a reference to the given int32 and assigns it to the RequestCount field. +func (o *HighRequestedIp) SetRequestCount(v int32) { + o.RequestCount = &v +} + +func (o HighRequestedIp) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o HighRequestedIp) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Ip) { + toSerialize["ip"] = o.Ip + } + if !IsNil(o.RequestCount) { + toSerialize["request_count"] = o.RequestCount + } + return toSerialize, nil +} + +type NullableHighRequestedIp struct { + value *HighRequestedIp + isSet bool +} + +func (v NullableHighRequestedIp) Get() *HighRequestedIp { + return v.value +} + +func (v *NullableHighRequestedIp) Set(val *HighRequestedIp) { + v.value = val + v.isSet = true +} + +func (v NullableHighRequestedIp) IsSet() bool { + return v.isSet +} + +func (v *NullableHighRequestedIp) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableHighRequestedIp(val *HighRequestedIp) *NullableHighRequestedIp { + return &NullableHighRequestedIp{value: val, isSet: true} +} + +func (v NullableHighRequestedIp) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableHighRequestedIp) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_high_requested_ip_ip.go b/model_high_requested_ip_ip.go new file mode 100644 index 0000000..4cff92b --- /dev/null +++ b/model_high_requested_ip_ip.go @@ -0,0 +1,87 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" + "fmt" +) + +// HighRequestedIpIp struct for HighRequestedIpIp +type HighRequestedIpIp struct { + string *string +} + +// Unmarshal JSON data into any of the pointers in the struct +func (dst *HighRequestedIpIp) UnmarshalJSON(data []byte) error { + var err error + // 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(HighRequestedIpIp)") +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src *HighRequestedIpIp) MarshalJSON() ([]byte, error) { + if src.string != nil { + return json.Marshal(&src.string) + } + + return nil, nil // no data in anyOf schemas +} + +type NullableHighRequestedIpIp struct { + value *HighRequestedIpIp + isSet bool +} + +func (v NullableHighRequestedIpIp) Get() *HighRequestedIpIp { + return v.value +} + +func (v *NullableHighRequestedIpIp) Set(val *HighRequestedIpIp) { + v.value = val + v.isSet = true +} + +func (v NullableHighRequestedIpIp) IsSet() bool { + return v.isSet +} + +func (v *NullableHighRequestedIpIp) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableHighRequestedIpIp(val *HighRequestedIpIp) *NullableHighRequestedIpIp { + return &NullableHighRequestedIpIp{value: val, isSet: true} +} + +func (v NullableHighRequestedIpIp) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableHighRequestedIpIp) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_http_config.go b/model_http_config.go new file mode 100644 index 0000000..53a5643 --- /dev/null +++ b/model_http_config.go @@ -0,0 +1,315 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the HttpConfig type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &HttpConfig{} + +// HttpConfig struct for HttpConfig +type HttpConfig struct { + Method string `json:"method"` + Port int32 `json:"port"` + // path for test + Path string `json:"path"` + AllowInsecure bool `json:"allow_insecure"` + ExpectedResponse ExpectedResponse `json:"expected_response"` + Headers map[string]string `json:"headers"` + FollowRedirects *bool `json:"follow_redirects,omitempty"` + // In milliseconds + Timeout int32 `json:"timeout"` +} + +// NewHttpConfig instantiates a new HttpConfig object +// This constructor will assign default values to properties that have it defined, +// 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 NewHttpConfig(method string, port int32, path string, allowInsecure bool, expectedResponse ExpectedResponse, headers map[string]string, timeout int32) *HttpConfig { + this := HttpConfig{} + this.Method = method + this.Port = port + this.Path = path + this.AllowInsecure = allowInsecure + this.ExpectedResponse = expectedResponse + this.Headers = headers + this.Timeout = timeout + return &this +} + +// NewHttpConfigWithDefaults instantiates a new HttpConfig object +// This 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 NewHttpConfigWithDefaults() *HttpConfig { + this := HttpConfig{} + return &this +} + +// GetMethod returns the Method field value +func (o *HttpConfig) GetMethod() string { + if o == nil { + var ret string + return ret + } + + return o.Method +} + +// GetMethodOk returns a tuple with the Method field value +// and a boolean to check if the value has been set. +func (o *HttpConfig) GetMethodOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Method, true +} + +// SetMethod sets field value +func (o *HttpConfig) SetMethod(v string) { + o.Method = v +} + +// GetPort returns the Port field value +func (o *HttpConfig) GetPort() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Port +} + +// GetPortOk returns a tuple with the Port field value +// and a boolean to check if the value has been set. +func (o *HttpConfig) GetPortOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Port, true +} + +// SetPort sets field value +func (o *HttpConfig) SetPort(v int32) { + o.Port = v +} + +// GetPath returns the Path field value +func (o *HttpConfig) GetPath() string { + if o == nil { + var ret string + return ret + } + + return o.Path +} + +// GetPathOk returns a tuple with the Path field value +// and a boolean to check if the value has been set. +func (o *HttpConfig) GetPathOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Path, true +} + +// SetPath sets field value +func (o *HttpConfig) SetPath(v string) { + o.Path = v +} + +// GetAllowInsecure returns the AllowInsecure field value +func (o *HttpConfig) GetAllowInsecure() bool { + if o == nil { + var ret bool + return ret + } + + return o.AllowInsecure +} + +// GetAllowInsecureOk returns a tuple with the AllowInsecure field value +// and a boolean to check if the value has been set. +func (o *HttpConfig) GetAllowInsecureOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.AllowInsecure, true +} + +// SetAllowInsecure sets field value +func (o *HttpConfig) SetAllowInsecure(v bool) { + o.AllowInsecure = v +} + +// GetExpectedResponse returns the ExpectedResponse field value +func (o *HttpConfig) GetExpectedResponse() ExpectedResponse { + if o == nil { + var ret ExpectedResponse + return ret + } + + return o.ExpectedResponse +} + +// GetExpectedResponseOk returns a tuple with the ExpectedResponse field value +// and a boolean to check if the value has been set. +func (o *HttpConfig) GetExpectedResponseOk() (*ExpectedResponse, bool) { + if o == nil { + return nil, false + } + return &o.ExpectedResponse, true +} + +// SetExpectedResponse sets field value +func (o *HttpConfig) SetExpectedResponse(v ExpectedResponse) { + o.ExpectedResponse = v +} + +// GetHeaders returns the Headers field value +func (o *HttpConfig) GetHeaders() map[string]string { + if o == nil { + var ret map[string]string + return ret + } + + return o.Headers +} + +// GetHeadersOk returns a tuple with the Headers field value +// and a boolean to check if the value has been set. +func (o *HttpConfig) GetHeadersOk() (*map[string]string, bool) { + if o == nil { + return nil, false + } + return &o.Headers, true +} + +// SetHeaders sets field value +func (o *HttpConfig) SetHeaders(v map[string]string) { + o.Headers = v +} + +// GetFollowRedirects returns the FollowRedirects field value if set, zero value otherwise. +func (o *HttpConfig) GetFollowRedirects() bool { + if o == nil || IsNil(o.FollowRedirects) { + var ret bool + return ret + } + return *o.FollowRedirects +} + +// GetFollowRedirectsOk returns a tuple with the FollowRedirects field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HttpConfig) GetFollowRedirectsOk() (*bool, bool) { + if o == nil || IsNil(o.FollowRedirects) { + return nil, false + } + return o.FollowRedirects, true +} + +// HasFollowRedirects returns a boolean if a field has been set. +func (o *HttpConfig) HasFollowRedirects() bool { + if o != nil && !IsNil(o.FollowRedirects) { + return true + } + + return false +} + +// SetFollowRedirects gets a reference to the given bool and assigns it to the FollowRedirects field. +func (o *HttpConfig) SetFollowRedirects(v bool) { + o.FollowRedirects = &v +} + +// GetTimeout returns the Timeout field value +func (o *HttpConfig) GetTimeout() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Timeout +} + +// GetTimeoutOk returns a tuple with the Timeout field value +// and a boolean to check if the value has been set. +func (o *HttpConfig) GetTimeoutOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Timeout, true +} + +// SetTimeout sets field value +func (o *HttpConfig) SetTimeout(v int32) { + o.Timeout = v +} + +func (o HttpConfig) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o HttpConfig) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["method"] = o.Method + toSerialize["port"] = o.Port + toSerialize["path"] = o.Path + toSerialize["allow_insecure"] = o.AllowInsecure + toSerialize["expected_response"] = o.ExpectedResponse + toSerialize["headers"] = o.Headers + // skip: follow_redirects is readOnly + toSerialize["timeout"] = o.Timeout + return toSerialize, nil +} + +type NullableHttpConfig struct { + value *HttpConfig + isSet bool +} + +func (v NullableHttpConfig) Get() *HttpConfig { + return v.value +} + +func (v *NullableHttpConfig) Set(val *HttpConfig) { + v.value = val + v.isSet = true +} + +func (v NullableHttpConfig) IsSet() bool { + return v.isSet +} + +func (v *NullableHttpConfig) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableHttpConfig(val *HttpConfig) *NullableHttpConfig { + return &NullableHttpConfig{value: val, isSet: true} +} + +func (v NullableHttpConfig) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableHttpConfig) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_image_resize.go b/model_image_resize.go new file mode 100644 index 0000000..29f2d29 --- /dev/null +++ b/model_image_resize.go @@ -0,0 +1,210 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the ImageResize type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ImageResize{} + +// ImageResize struct for ImageResize +type ImageResize struct { + Status *string `json:"status,omitempty"` + HeightBy *string `json:"height_by,omitempty"` + WidthBy *string `json:"width_by,omitempty"` +} + +// NewImageResize instantiates a new ImageResize object +// This constructor will assign default values to properties that have it defined, +// 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 NewImageResize() *ImageResize { + this := ImageResize{} + var status string = "off" + this.Status = &status + var heightBy string = "height" + this.HeightBy = &heightBy + var widthBy string = "width" + this.WidthBy = &widthBy + return &this +} + +// NewImageResizeWithDefaults instantiates a new ImageResize object +// This 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 NewImageResizeWithDefaults() *ImageResize { + this := ImageResize{} + var status string = "off" + this.Status = &status + var heightBy string = "height" + this.HeightBy = &heightBy + var widthBy string = "width" + this.WidthBy = &widthBy + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *ImageResize) GetStatus() string { + if o == nil || IsNil(o.Status) { + var ret string + 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 *ImageResize) GetStatusOk() (*string, 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 *ImageResize) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *ImageResize) SetStatus(v string) { + o.Status = &v +} + +// GetHeightBy returns the HeightBy field value if set, zero value otherwise. +func (o *ImageResize) GetHeightBy() string { + if o == nil || IsNil(o.HeightBy) { + var ret string + return ret + } + return *o.HeightBy +} + +// GetHeightByOk returns a tuple with the HeightBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ImageResize) GetHeightByOk() (*string, bool) { + if o == nil || IsNil(o.HeightBy) { + return nil, false + } + return o.HeightBy, true +} + +// HasHeightBy returns a boolean if a field has been set. +func (o *ImageResize) HasHeightBy() bool { + if o != nil && !IsNil(o.HeightBy) { + return true + } + + return false +} + +// SetHeightBy gets a reference to the given string and assigns it to the HeightBy field. +func (o *ImageResize) SetHeightBy(v string) { + o.HeightBy = &v +} + +// GetWidthBy returns the WidthBy field value if set, zero value otherwise. +func (o *ImageResize) GetWidthBy() string { + if o == nil || IsNil(o.WidthBy) { + var ret string + return ret + } + return *o.WidthBy +} + +// GetWidthByOk returns a tuple with the WidthBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ImageResize) GetWidthByOk() (*string, bool) { + if o == nil || IsNil(o.WidthBy) { + return nil, false + } + return o.WidthBy, true +} + +// HasWidthBy returns a boolean if a field has been set. +func (o *ImageResize) HasWidthBy() bool { + if o != nil && !IsNil(o.WidthBy) { + return true + } + + return false +} + +// SetWidthBy gets a reference to the given string and assigns it to the WidthBy field. +func (o *ImageResize) SetWidthBy(v string) { + o.WidthBy = &v +} + +func (o ImageResize) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ImageResize) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + if !IsNil(o.HeightBy) { + toSerialize["height_by"] = o.HeightBy + } + if !IsNil(o.WidthBy) { + toSerialize["width_by"] = o.WidthBy + } + return toSerialize, nil +} + +type NullableImageResize struct { + value *ImageResize + isSet bool +} + +func (v NullableImageResize) Get() *ImageResize { + return v.value +} + +func (v *NullableImageResize) Set(val *ImageResize) { + v.value = val + v.isSet = true +} + +func (v NullableImageResize) IsSet() bool { + return v.isSet +} + +func (v *NullableImageResize) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableImageResize(val *ImageResize) *NullableImageResize { + return &NullableImageResize{value: val, isSet: true} +} + +func (v NullableImageResize) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableImageResize) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_image_resize_response.go b/model_image_resize_response.go new file mode 100644 index 0000000..8be9c57 --- /dev/null +++ b/model_image_resize_response.go @@ -0,0 +1,172 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the ImageResizeResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ImageResizeResponse{} + +// ImageResizeResponse struct for ImageResizeResponse +type ImageResizeResponse struct { + Data *ImageResize `json:"data,omitempty"` + Message NullableString `json:"message,omitempty"` +} + +// NewImageResizeResponse instantiates a new ImageResizeResponse object +// This constructor will assign default values to properties that have it defined, +// 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 NewImageResizeResponse() *ImageResizeResponse { + this := ImageResizeResponse{} + return &this +} + +// NewImageResizeResponseWithDefaults instantiates a new ImageResizeResponse object +// This 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 NewImageResizeResponseWithDefaults() *ImageResizeResponse { + this := ImageResizeResponse{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *ImageResizeResponse) GetData() ImageResize { + if o == nil || IsNil(o.Data) { + var ret ImageResize + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ImageResizeResponse) GetDataOk() (*ImageResize, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *ImageResizeResponse) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given ImageResize and assigns it to the Data field. +func (o *ImageResizeResponse) SetData(v ImageResize) { + o.Data = &v +} + +// GetMessage returns the Message field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ImageResizeResponse) GetMessage() string { + if o == nil || IsNil(o.Message.Get()) { + var ret string + return ret + } + return *o.Message.Get() +} + +// GetMessageOk returns a tuple with the Message 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 *ImageResizeResponse) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Message.Get(), o.Message.IsSet() +} + +// HasMessage returns a boolean if a field has been set. +func (o *ImageResizeResponse) HasMessage() bool { + if o != nil && o.Message.IsSet() { + return true + } + + return false +} + +// SetMessage gets a reference to the given NullableString and assigns it to the Message field. +func (o *ImageResizeResponse) SetMessage(v string) { + o.Message.Set(&v) +} +// SetMessageNil sets the value for Message to be an explicit nil +func (o *ImageResizeResponse) SetMessageNil() { + o.Message.Set(nil) +} + +// UnsetMessage ensures that no value is present for Message, not even an explicit nil +func (o *ImageResizeResponse) UnsetMessage() { + o.Message.Unset() +} + +func (o ImageResizeResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ImageResizeResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + if o.Message.IsSet() { + toSerialize["message"] = o.Message.Get() + } + return toSerialize, nil +} + +type NullableImageResizeResponse struct { + value *ImageResizeResponse + isSet bool +} + +func (v NullableImageResizeResponse) Get() *ImageResizeResponse { + return v.value +} + +func (v *NullableImageResizeResponse) Set(val *ImageResizeResponse) { + v.value = val + v.isSet = true +} + +func (v NullableImageResizeResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableImageResizeResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableImageResizeResponse(val *ImageResizeResponse) *NullableImageResizeResponse { + return &NullableImageResizeResponse{value: val, isSet: true} +} + +func (v NullableImageResizeResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableImageResizeResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_lists_index_200_response.go b/model_lists_index_200_response.go new file mode 100644 index 0000000..fec25e5 --- /dev/null +++ b/model_lists_index_200_response.go @@ -0,0 +1,198 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the ListsIndex200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListsIndex200Response{} + +// ListsIndex200Response struct for ListsIndex200Response +type ListsIndex200Response struct { + Data []DynamicField `json:"data,omitempty"` + Links *PaginatedResponseLinks `json:"links,omitempty"` + Meta *PaginatedResponseMeta `json:"meta,omitempty"` +} + +// NewListsIndex200Response instantiates a new ListsIndex200Response object +// This constructor will assign default values to properties that have it defined, +// 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 NewListsIndex200Response() *ListsIndex200Response { + this := ListsIndex200Response{} + return &this +} + +// NewListsIndex200ResponseWithDefaults instantiates a new ListsIndex200Response object +// This 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 NewListsIndex200ResponseWithDefaults() *ListsIndex200Response { + this := ListsIndex200Response{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *ListsIndex200Response) GetData() []DynamicField { + if o == nil || IsNil(o.Data) { + var ret []DynamicField + return ret + } + return o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListsIndex200Response) GetDataOk() ([]DynamicField, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *ListsIndex200Response) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given []DynamicField and assigns it to the Data field. +func (o *ListsIndex200Response) SetData(v []DynamicField) { + o.Data = v +} + +// GetLinks returns the Links field value if set, zero value otherwise. +func (o *ListsIndex200Response) GetLinks() PaginatedResponseLinks { + if o == nil || IsNil(o.Links) { + var ret PaginatedResponseLinks + return ret + } + return *o.Links +} + +// GetLinksOk returns a tuple with the Links field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListsIndex200Response) GetLinksOk() (*PaginatedResponseLinks, bool) { + if o == nil || IsNil(o.Links) { + return nil, false + } + return o.Links, true +} + +// HasLinks returns a boolean if a field has been set. +func (o *ListsIndex200Response) HasLinks() bool { + if o != nil && !IsNil(o.Links) { + return true + } + + return false +} + +// SetLinks gets a reference to the given PaginatedResponseLinks and assigns it to the Links field. +func (o *ListsIndex200Response) SetLinks(v PaginatedResponseLinks) { + o.Links = &v +} + +// GetMeta returns the Meta field value if set, zero value otherwise. +func (o *ListsIndex200Response) GetMeta() PaginatedResponseMeta { + if o == nil || IsNil(o.Meta) { + var ret PaginatedResponseMeta + return ret + } + return *o.Meta +} + +// GetMetaOk returns a tuple with the Meta field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListsIndex200Response) GetMetaOk() (*PaginatedResponseMeta, bool) { + if o == nil || IsNil(o.Meta) { + return nil, false + } + return o.Meta, true +} + +// HasMeta returns a boolean if a field has been set. +func (o *ListsIndex200Response) HasMeta() bool { + if o != nil && !IsNil(o.Meta) { + return true + } + + return false +} + +// SetMeta gets a reference to the given PaginatedResponseMeta and assigns it to the Meta field. +func (o *ListsIndex200Response) SetMeta(v PaginatedResponseMeta) { + o.Meta = &v +} + +func (o ListsIndex200Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListsIndex200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + if !IsNil(o.Links) { + toSerialize["links"] = o.Links + } + if !IsNil(o.Meta) { + toSerialize["meta"] = o.Meta + } + return toSerialize, nil +} + +type NullableListsIndex200Response struct { + value *ListsIndex200Response + isSet bool +} + +func (v NullableListsIndex200Response) Get() *ListsIndex200Response { + return v.value +} + +func (v *NullableListsIndex200Response) Set(val *ListsIndex200Response) { + v.value = val + v.isSet = true +} + +func (v NullableListsIndex200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableListsIndex200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListsIndex200Response(val *ListsIndex200Response) *NullableListsIndex200Response { + return &NullableListsIndex200Response{value: val, isSet: true} +} + +func (v NullableListsIndex200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListsIndex200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_load_balancer.go b/model_load_balancer.go new file mode 100644 index 0000000..01e363d --- /dev/null +++ b/model_load_balancer.go @@ -0,0 +1,371 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" + "time" +) + +// checks if the LoadBalancer type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LoadBalancer{} + +// LoadBalancer struct for LoadBalancer +type LoadBalancer struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + Status *bool `json:"status,omitempty"` + Method *string `json:"method,omitempty"` + Pools []LoadBalancerPool `json:"pools,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty"` + UpdatedAt *time.Time `json:"updated_at,omitempty"` +} + +// NewLoadBalancer instantiates a new LoadBalancer object +// This constructor will assign default values to properties that have it defined, +// 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 NewLoadBalancer() *LoadBalancer { + this := LoadBalancer{} + return &this +} + +// NewLoadBalancerWithDefaults instantiates a new LoadBalancer object +// This 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 NewLoadBalancerWithDefaults() *LoadBalancer { + this := LoadBalancer{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *LoadBalancer) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadBalancer) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *LoadBalancer) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *LoadBalancer) SetId(v string) { + o.Id = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *LoadBalancer) 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 *LoadBalancer) 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 *LoadBalancer) 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 *LoadBalancer) SetName(v string) { + o.Name = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *LoadBalancer) 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 *LoadBalancer) 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 *LoadBalancer) 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 *LoadBalancer) SetDescription(v string) { + o.Description = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *LoadBalancer) GetStatus() bool { + if o == nil || IsNil(o.Status) { + var ret bool + 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 *LoadBalancer) GetStatusOk() (*bool, 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 *LoadBalancer) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given bool and assigns it to the Status field. +func (o *LoadBalancer) SetStatus(v bool) { + o.Status = &v +} + +// GetMethod returns the Method field value if set, zero value otherwise. +func (o *LoadBalancer) GetMethod() string { + if o == nil || IsNil(o.Method) { + var ret string + return ret + } + return *o.Method +} + +// GetMethodOk returns a tuple with the Method field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadBalancer) GetMethodOk() (*string, bool) { + if o == nil || IsNil(o.Method) { + return nil, false + } + return o.Method, true +} + +// HasMethod returns a boolean if a field has been set. +func (o *LoadBalancer) HasMethod() bool { + if o != nil && !IsNil(o.Method) { + return true + } + + return false +} + +// SetMethod gets a reference to the given string and assigns it to the Method field. +func (o *LoadBalancer) SetMethod(v string) { + o.Method = &v +} + +// GetPools returns the Pools field value if set, zero value otherwise. +func (o *LoadBalancer) GetPools() []LoadBalancerPool { + if o == nil || IsNil(o.Pools) { + var ret []LoadBalancerPool + return ret + } + return o.Pools +} + +// GetPoolsOk returns a tuple with the Pools field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadBalancer) GetPoolsOk() ([]LoadBalancerPool, bool) { + if o == nil || IsNil(o.Pools) { + return nil, false + } + return o.Pools, true +} + +// HasPools returns a boolean if a field has been set. +func (o *LoadBalancer) HasPools() bool { + if o != nil && !IsNil(o.Pools) { + return true + } + + return false +} + +// SetPools gets a reference to the given []LoadBalancerPool and assigns it to the Pools field. +func (o *LoadBalancer) SetPools(v []LoadBalancerPool) { + o.Pools = v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *LoadBalancer) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadBalancer) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *LoadBalancer) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *LoadBalancer) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *LoadBalancer) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadBalancer) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *LoadBalancer) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *LoadBalancer) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +func (o LoadBalancer) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o LoadBalancer) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: id is readOnly + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + if !IsNil(o.Method) { + toSerialize["method"] = o.Method + } + // skip: pools is readOnly + // skip: created_at is readOnly + // skip: updated_at is readOnly + return toSerialize, nil +} + +type NullableLoadBalancer struct { + value *LoadBalancer + isSet bool +} + +func (v NullableLoadBalancer) Get() *LoadBalancer { + return v.value +} + +func (v *NullableLoadBalancer) Set(val *LoadBalancer) { + v.value = val + v.isSet = true +} + +func (v NullableLoadBalancer) IsSet() bool { + return v.isSet +} + +func (v *NullableLoadBalancer) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLoadBalancer(val *LoadBalancer) *NullableLoadBalancer { + return &NullableLoadBalancer{value: val, isSet: true} +} + +func (v NullableLoadBalancer) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLoadBalancer) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_load_balancer_data.go b/model_load_balancer_data.go new file mode 100644 index 0000000..a772a0f --- /dev/null +++ b/model_load_balancer_data.go @@ -0,0 +1,126 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the LoadBalancerData type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LoadBalancerData{} + +// LoadBalancerData struct for LoadBalancerData +type LoadBalancerData struct { + Data *LoadBalancer `json:"data,omitempty"` +} + +// NewLoadBalancerData instantiates a new LoadBalancerData object +// This constructor will assign default values to properties that have it defined, +// 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 NewLoadBalancerData() *LoadBalancerData { + this := LoadBalancerData{} + return &this +} + +// NewLoadBalancerDataWithDefaults instantiates a new LoadBalancerData object +// This 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 NewLoadBalancerDataWithDefaults() *LoadBalancerData { + this := LoadBalancerData{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *LoadBalancerData) GetData() LoadBalancer { + if o == nil || IsNil(o.Data) { + var ret LoadBalancer + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadBalancerData) GetDataOk() (*LoadBalancer, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *LoadBalancerData) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given LoadBalancer and assigns it to the Data field. +func (o *LoadBalancerData) SetData(v LoadBalancer) { + o.Data = &v +} + +func (o LoadBalancerData) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o LoadBalancerData) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + return toSerialize, nil +} + +type NullableLoadBalancerData struct { + value *LoadBalancerData + isSet bool +} + +func (v NullableLoadBalancerData) Get() *LoadBalancerData { + return v.value +} + +func (v *NullableLoadBalancerData) Set(val *LoadBalancerData) { + v.value = val + v.isSet = true +} + +func (v NullableLoadBalancerData) IsSet() bool { + return v.isSet +} + +func (v *NullableLoadBalancerData) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLoadBalancerData(val *LoadBalancerData) *NullableLoadBalancerData { + return &NullableLoadBalancerData{value: val, isSet: true} +} + +func (v NullableLoadBalancerData) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLoadBalancerData) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_load_balancer_origin.go b/model_load_balancer_origin.go new file mode 100644 index 0000000..91211aa --- /dev/null +++ b/model_load_balancer_origin.go @@ -0,0 +1,449 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" + "time" +) + +// checks if the LoadBalancerOrigin type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LoadBalancerOrigin{} + +// LoadBalancerOrigin struct for LoadBalancerOrigin +type LoadBalancerOrigin struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Status *bool `json:"status,omitempty"` + Address *string `json:"address,omitempty"` + Port *int32 `json:"port,omitempty"` + Weight *int32 `json:"weight,omitempty"` + Protocol *string `json:"protocol,omitempty"` + HostHeader *string `json:"host_header,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty"` + UpdatedAt *time.Time `json:"updated_at,omitempty"` +} + +// NewLoadBalancerOrigin instantiates a new LoadBalancerOrigin object +// This constructor will assign default values to properties that have it defined, +// 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 NewLoadBalancerOrigin() *LoadBalancerOrigin { + this := LoadBalancerOrigin{} + var protocol string = "auto" + this.Protocol = &protocol + return &this +} + +// NewLoadBalancerOriginWithDefaults instantiates a new LoadBalancerOrigin object +// This 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 NewLoadBalancerOriginWithDefaults() *LoadBalancerOrigin { + this := LoadBalancerOrigin{} + var protocol string = "auto" + this.Protocol = &protocol + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *LoadBalancerOrigin) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadBalancerOrigin) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *LoadBalancerOrigin) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *LoadBalancerOrigin) SetId(v string) { + o.Id = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *LoadBalancerOrigin) 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 *LoadBalancerOrigin) 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 *LoadBalancerOrigin) 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 *LoadBalancerOrigin) SetName(v string) { + o.Name = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *LoadBalancerOrigin) GetStatus() bool { + if o == nil || IsNil(o.Status) { + var ret bool + 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 *LoadBalancerOrigin) GetStatusOk() (*bool, 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 *LoadBalancerOrigin) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given bool and assigns it to the Status field. +func (o *LoadBalancerOrigin) SetStatus(v bool) { + o.Status = &v +} + +// GetAddress returns the Address field value if set, zero value otherwise. +func (o *LoadBalancerOrigin) GetAddress() string { + if o == nil || IsNil(o.Address) { + var ret string + return ret + } + return *o.Address +} + +// GetAddressOk returns a tuple with the Address field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadBalancerOrigin) GetAddressOk() (*string, bool) { + if o == nil || IsNil(o.Address) { + return nil, false + } + return o.Address, true +} + +// HasAddress returns a boolean if a field has been set. +func (o *LoadBalancerOrigin) HasAddress() bool { + if o != nil && !IsNil(o.Address) { + return true + } + + return false +} + +// SetAddress gets a reference to the given string and assigns it to the Address field. +func (o *LoadBalancerOrigin) SetAddress(v string) { + o.Address = &v +} + +// GetPort returns the Port field value if set, zero value otherwise. +func (o *LoadBalancerOrigin) GetPort() int32 { + if o == nil || IsNil(o.Port) { + var ret int32 + return ret + } + return *o.Port +} + +// GetPortOk returns a tuple with the Port field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadBalancerOrigin) GetPortOk() (*int32, bool) { + if o == nil || IsNil(o.Port) { + return nil, false + } + return o.Port, true +} + +// HasPort returns a boolean if a field has been set. +func (o *LoadBalancerOrigin) HasPort() bool { + if o != nil && !IsNil(o.Port) { + return true + } + + return false +} + +// SetPort gets a reference to the given int32 and assigns it to the Port field. +func (o *LoadBalancerOrigin) SetPort(v int32) { + o.Port = &v +} + +// GetWeight returns the Weight field value if set, zero value otherwise. +func (o *LoadBalancerOrigin) GetWeight() int32 { + if o == nil || IsNil(o.Weight) { + var ret int32 + return ret + } + return *o.Weight +} + +// GetWeightOk returns a tuple with the Weight field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadBalancerOrigin) GetWeightOk() (*int32, bool) { + if o == nil || IsNil(o.Weight) { + return nil, false + } + return o.Weight, true +} + +// HasWeight returns a boolean if a field has been set. +func (o *LoadBalancerOrigin) HasWeight() bool { + if o != nil && !IsNil(o.Weight) { + return true + } + + return false +} + +// SetWeight gets a reference to the given int32 and assigns it to the Weight field. +func (o *LoadBalancerOrigin) SetWeight(v int32) { + o.Weight = &v +} + +// GetProtocol returns the Protocol field value if set, zero value otherwise. +func (o *LoadBalancerOrigin) GetProtocol() string { + if o == nil || IsNil(o.Protocol) { + var ret string + return ret + } + return *o.Protocol +} + +// GetProtocolOk returns a tuple with the Protocol field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadBalancerOrigin) GetProtocolOk() (*string, bool) { + if o == nil || IsNil(o.Protocol) { + return nil, false + } + return o.Protocol, true +} + +// HasProtocol returns a boolean if a field has been set. +func (o *LoadBalancerOrigin) HasProtocol() bool { + if o != nil && !IsNil(o.Protocol) { + return true + } + + return false +} + +// SetProtocol gets a reference to the given string and assigns it to the Protocol field. +func (o *LoadBalancerOrigin) SetProtocol(v string) { + o.Protocol = &v +} + +// GetHostHeader returns the HostHeader field value if set, zero value otherwise. +func (o *LoadBalancerOrigin) GetHostHeader() string { + if o == nil || IsNil(o.HostHeader) { + var ret string + return ret + } + return *o.HostHeader +} + +// GetHostHeaderOk returns a tuple with the HostHeader field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadBalancerOrigin) GetHostHeaderOk() (*string, bool) { + if o == nil || IsNil(o.HostHeader) { + return nil, false + } + return o.HostHeader, true +} + +// HasHostHeader returns a boolean if a field has been set. +func (o *LoadBalancerOrigin) HasHostHeader() bool { + if o != nil && !IsNil(o.HostHeader) { + return true + } + + return false +} + +// SetHostHeader gets a reference to the given string and assigns it to the HostHeader field. +func (o *LoadBalancerOrigin) SetHostHeader(v string) { + o.HostHeader = &v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *LoadBalancerOrigin) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadBalancerOrigin) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *LoadBalancerOrigin) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *LoadBalancerOrigin) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *LoadBalancerOrigin) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadBalancerOrigin) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *LoadBalancerOrigin) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *LoadBalancerOrigin) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +func (o LoadBalancerOrigin) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o LoadBalancerOrigin) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: id is readOnly + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + if !IsNil(o.Address) { + toSerialize["address"] = o.Address + } + if !IsNil(o.Port) { + toSerialize["port"] = o.Port + } + if !IsNil(o.Weight) { + toSerialize["weight"] = o.Weight + } + if !IsNil(o.Protocol) { + toSerialize["protocol"] = o.Protocol + } + if !IsNil(o.HostHeader) { + toSerialize["host_header"] = o.HostHeader + } + // skip: created_at is readOnly + // skip: updated_at is readOnly + return toSerialize, nil +} + +type NullableLoadBalancerOrigin struct { + value *LoadBalancerOrigin + isSet bool +} + +func (v NullableLoadBalancerOrigin) Get() *LoadBalancerOrigin { + return v.value +} + +func (v *NullableLoadBalancerOrigin) Set(val *LoadBalancerOrigin) { + v.value = val + v.isSet = true +} + +func (v NullableLoadBalancerOrigin) IsSet() bool { + return v.isSet +} + +func (v *NullableLoadBalancerOrigin) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLoadBalancerOrigin(val *LoadBalancerOrigin) *NullableLoadBalancerOrigin { + return &NullableLoadBalancerOrigin{value: val, isSet: true} +} + +func (v NullableLoadBalancerOrigin) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLoadBalancerOrigin) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_load_balancer_origin_data.go b/model_load_balancer_origin_data.go new file mode 100644 index 0000000..7276edb --- /dev/null +++ b/model_load_balancer_origin_data.go @@ -0,0 +1,126 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the LoadBalancerOriginData type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LoadBalancerOriginData{} + +// LoadBalancerOriginData struct for LoadBalancerOriginData +type LoadBalancerOriginData struct { + Data *LoadBalancerOrigin `json:"data,omitempty"` +} + +// NewLoadBalancerOriginData instantiates a new LoadBalancerOriginData object +// This constructor will assign default values to properties that have it defined, +// 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 NewLoadBalancerOriginData() *LoadBalancerOriginData { + this := LoadBalancerOriginData{} + return &this +} + +// NewLoadBalancerOriginDataWithDefaults instantiates a new LoadBalancerOriginData object +// This 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 NewLoadBalancerOriginDataWithDefaults() *LoadBalancerOriginData { + this := LoadBalancerOriginData{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *LoadBalancerOriginData) GetData() LoadBalancerOrigin { + if o == nil || IsNil(o.Data) { + var ret LoadBalancerOrigin + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadBalancerOriginData) GetDataOk() (*LoadBalancerOrigin, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *LoadBalancerOriginData) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given LoadBalancerOrigin and assigns it to the Data field. +func (o *LoadBalancerOriginData) SetData(v LoadBalancerOrigin) { + o.Data = &v +} + +func (o LoadBalancerOriginData) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o LoadBalancerOriginData) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + return toSerialize, nil +} + +type NullableLoadBalancerOriginData struct { + value *LoadBalancerOriginData + isSet bool +} + +func (v NullableLoadBalancerOriginData) Get() *LoadBalancerOriginData { + return v.value +} + +func (v *NullableLoadBalancerOriginData) Set(val *LoadBalancerOriginData) { + v.value = val + v.isSet = true +} + +func (v NullableLoadBalancerOriginData) IsSet() bool { + return v.isSet +} + +func (v *NullableLoadBalancerOriginData) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLoadBalancerOriginData(val *LoadBalancerOriginData) *NullableLoadBalancerOriginData { + return &NullableLoadBalancerOriginData{value: val, isSet: true} +} + +func (v NullableLoadBalancerOriginData) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLoadBalancerOriginData) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_load_balancer_origin_response.go b/model_load_balancer_origin_response.go new file mode 100644 index 0000000..ea34508 --- /dev/null +++ b/model_load_balancer_origin_response.go @@ -0,0 +1,172 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the LoadBalancerOriginResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LoadBalancerOriginResponse{} + +// LoadBalancerOriginResponse struct for LoadBalancerOriginResponse +type LoadBalancerOriginResponse struct { + Data *LoadBalancerOrigin `json:"data,omitempty"` + Message NullableString `json:"message,omitempty"` +} + +// NewLoadBalancerOriginResponse instantiates a new LoadBalancerOriginResponse object +// This constructor will assign default values to properties that have it defined, +// 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 NewLoadBalancerOriginResponse() *LoadBalancerOriginResponse { + this := LoadBalancerOriginResponse{} + return &this +} + +// NewLoadBalancerOriginResponseWithDefaults instantiates a new LoadBalancerOriginResponse object +// This 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 NewLoadBalancerOriginResponseWithDefaults() *LoadBalancerOriginResponse { + this := LoadBalancerOriginResponse{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *LoadBalancerOriginResponse) GetData() LoadBalancerOrigin { + if o == nil || IsNil(o.Data) { + var ret LoadBalancerOrigin + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadBalancerOriginResponse) GetDataOk() (*LoadBalancerOrigin, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *LoadBalancerOriginResponse) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given LoadBalancerOrigin and assigns it to the Data field. +func (o *LoadBalancerOriginResponse) SetData(v LoadBalancerOrigin) { + o.Data = &v +} + +// GetMessage returns the Message field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *LoadBalancerOriginResponse) GetMessage() string { + if o == nil || IsNil(o.Message.Get()) { + var ret string + return ret + } + return *o.Message.Get() +} + +// GetMessageOk returns a tuple with the Message 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 *LoadBalancerOriginResponse) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Message.Get(), o.Message.IsSet() +} + +// HasMessage returns a boolean if a field has been set. +func (o *LoadBalancerOriginResponse) HasMessage() bool { + if o != nil && o.Message.IsSet() { + return true + } + + return false +} + +// SetMessage gets a reference to the given NullableString and assigns it to the Message field. +func (o *LoadBalancerOriginResponse) SetMessage(v string) { + o.Message.Set(&v) +} +// SetMessageNil sets the value for Message to be an explicit nil +func (o *LoadBalancerOriginResponse) SetMessageNil() { + o.Message.Set(nil) +} + +// UnsetMessage ensures that no value is present for Message, not even an explicit nil +func (o *LoadBalancerOriginResponse) UnsetMessage() { + o.Message.Unset() +} + +func (o LoadBalancerOriginResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o LoadBalancerOriginResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + if o.Message.IsSet() { + toSerialize["message"] = o.Message.Get() + } + return toSerialize, nil +} + +type NullableLoadBalancerOriginResponse struct { + value *LoadBalancerOriginResponse + isSet bool +} + +func (v NullableLoadBalancerOriginResponse) Get() *LoadBalancerOriginResponse { + return v.value +} + +func (v *NullableLoadBalancerOriginResponse) Set(val *LoadBalancerOriginResponse) { + v.value = val + v.isSet = true +} + +func (v NullableLoadBalancerOriginResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableLoadBalancerOriginResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLoadBalancerOriginResponse(val *LoadBalancerOriginResponse) *NullableLoadBalancerOriginResponse { + return &NullableLoadBalancerOriginResponse{value: val, isSet: true} +} + +func (v NullableLoadBalancerOriginResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLoadBalancerOriginResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_load_balancer_origin_store.go b/model_load_balancer_origin_store.go new file mode 100644 index 0000000..bf8db15 --- /dev/null +++ b/model_load_balancer_origin_store.go @@ -0,0 +1,299 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the LoadBalancerOriginStore type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LoadBalancerOriginStore{} + +// LoadBalancerOriginStore struct for LoadBalancerOriginStore +type LoadBalancerOriginStore struct { + Name *string `json:"name,omitempty"` + Status bool `json:"status"` + Address string `json:"address"` + Port int32 `json:"port"` + Weight int32 `json:"weight"` + Protocol string `json:"protocol"` + HostHeader *string `json:"host_header,omitempty"` +} + +// NewLoadBalancerOriginStore instantiates a new LoadBalancerOriginStore object +// This constructor will assign default values to properties that have it defined, +// 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 NewLoadBalancerOriginStore(status bool, address string, port int32, weight int32, protocol string) *LoadBalancerOriginStore { + this := LoadBalancerOriginStore{} + this.Status = status + this.Address = address + this.Port = port + this.Weight = weight + this.Protocol = protocol + return &this +} + +// NewLoadBalancerOriginStoreWithDefaults instantiates a new LoadBalancerOriginStore object +// This 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 NewLoadBalancerOriginStoreWithDefaults() *LoadBalancerOriginStore { + this := LoadBalancerOriginStore{} + var protocol string = "auto" + this.Protocol = protocol + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *LoadBalancerOriginStore) 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 *LoadBalancerOriginStore) 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 *LoadBalancerOriginStore) 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 *LoadBalancerOriginStore) SetName(v string) { + o.Name = &v +} + +// GetStatus returns the Status field value +func (o *LoadBalancerOriginStore) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *LoadBalancerOriginStore) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *LoadBalancerOriginStore) SetStatus(v bool) { + o.Status = v +} + +// GetAddress returns the Address field value +func (o *LoadBalancerOriginStore) GetAddress() string { + if o == nil { + var ret string + return ret + } + + return o.Address +} + +// GetAddressOk returns a tuple with the Address field value +// and a boolean to check if the value has been set. +func (o *LoadBalancerOriginStore) GetAddressOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Address, true +} + +// SetAddress sets field value +func (o *LoadBalancerOriginStore) SetAddress(v string) { + o.Address = v +} + +// GetPort returns the Port field value +func (o *LoadBalancerOriginStore) GetPort() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Port +} + +// GetPortOk returns a tuple with the Port field value +// and a boolean to check if the value has been set. +func (o *LoadBalancerOriginStore) GetPortOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Port, true +} + +// SetPort sets field value +func (o *LoadBalancerOriginStore) SetPort(v int32) { + o.Port = v +} + +// GetWeight returns the Weight field value +func (o *LoadBalancerOriginStore) GetWeight() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Weight +} + +// GetWeightOk returns a tuple with the Weight field value +// and a boolean to check if the value has been set. +func (o *LoadBalancerOriginStore) GetWeightOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Weight, true +} + +// SetWeight sets field value +func (o *LoadBalancerOriginStore) SetWeight(v int32) { + o.Weight = v +} + +// GetProtocol returns the Protocol field value +func (o *LoadBalancerOriginStore) GetProtocol() string { + if o == nil { + var ret string + return ret + } + + return o.Protocol +} + +// GetProtocolOk returns a tuple with the Protocol field value +// and a boolean to check if the value has been set. +func (o *LoadBalancerOriginStore) GetProtocolOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Protocol, true +} + +// SetProtocol sets field value +func (o *LoadBalancerOriginStore) SetProtocol(v string) { + o.Protocol = v +} + +// GetHostHeader returns the HostHeader field value if set, zero value otherwise. +func (o *LoadBalancerOriginStore) GetHostHeader() string { + if o == nil || IsNil(o.HostHeader) { + var ret string + return ret + } + return *o.HostHeader +} + +// GetHostHeaderOk returns a tuple with the HostHeader field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadBalancerOriginStore) GetHostHeaderOk() (*string, bool) { + if o == nil || IsNil(o.HostHeader) { + return nil, false + } + return o.HostHeader, true +} + +// HasHostHeader returns a boolean if a field has been set. +func (o *LoadBalancerOriginStore) HasHostHeader() bool { + if o != nil && !IsNil(o.HostHeader) { + return true + } + + return false +} + +// SetHostHeader gets a reference to the given string and assigns it to the HostHeader field. +func (o *LoadBalancerOriginStore) SetHostHeader(v string) { + o.HostHeader = &v +} + +func (o LoadBalancerOriginStore) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o LoadBalancerOriginStore) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + toSerialize["status"] = o.Status + toSerialize["address"] = o.Address + toSerialize["port"] = o.Port + toSerialize["weight"] = o.Weight + toSerialize["protocol"] = o.Protocol + if !IsNil(o.HostHeader) { + toSerialize["host_header"] = o.HostHeader + } + return toSerialize, nil +} + +type NullableLoadBalancerOriginStore struct { + value *LoadBalancerOriginStore + isSet bool +} + +func (v NullableLoadBalancerOriginStore) Get() *LoadBalancerOriginStore { + return v.value +} + +func (v *NullableLoadBalancerOriginStore) Set(val *LoadBalancerOriginStore) { + v.value = val + v.isSet = true +} + +func (v NullableLoadBalancerOriginStore) IsSet() bool { + return v.isSet +} + +func (v *NullableLoadBalancerOriginStore) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLoadBalancerOriginStore(val *LoadBalancerOriginStore) *NullableLoadBalancerOriginStore { + return &NullableLoadBalancerOriginStore{value: val, isSet: true} +} + +func (v NullableLoadBalancerOriginStore) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLoadBalancerOriginStore) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_load_balancer_pool.go b/model_load_balancer_pool.go new file mode 100644 index 0000000..2c01b4b --- /dev/null +++ b/model_load_balancer_pool.go @@ -0,0 +1,570 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" + "time" +) + +// checks if the LoadBalancerPool type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LoadBalancerPool{} + +// LoadBalancerPool struct for LoadBalancerPool +type LoadBalancerPool struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + Status *bool `json:"status,omitempty"` + // Zero means the default pool + Priority *int32 `json:"priority,omitempty"` + Method *string `json:"method,omitempty"` + Keepalive *string `json:"keepalive,omitempty"` + NextUpstreamTcp *string `json:"next_upstream_tcp,omitempty"` + Regions []string `json:"regions,omitempty"` + Origins []LoadBalancerOrigin `json:"origins,omitempty"` + MonitoringStatus NullableMonitoringStatus `json:"monitoring_status,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty"` + UpdatedAt *time.Time `json:"updated_at,omitempty"` +} + +// NewLoadBalancerPool instantiates a new LoadBalancerPool object +// This constructor will assign default values to properties that have it defined, +// 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 NewLoadBalancerPool() *LoadBalancerPool { + this := LoadBalancerPool{} + var keepalive string = "off" + this.Keepalive = &keepalive + var nextUpstreamTcp string = "off" + this.NextUpstreamTcp = &nextUpstreamTcp + return &this +} + +// NewLoadBalancerPoolWithDefaults instantiates a new LoadBalancerPool object +// This 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 NewLoadBalancerPoolWithDefaults() *LoadBalancerPool { + this := LoadBalancerPool{} + var keepalive string = "off" + this.Keepalive = &keepalive + var nextUpstreamTcp string = "off" + this.NextUpstreamTcp = &nextUpstreamTcp + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *LoadBalancerPool) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadBalancerPool) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *LoadBalancerPool) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *LoadBalancerPool) SetId(v string) { + o.Id = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *LoadBalancerPool) 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 *LoadBalancerPool) 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 *LoadBalancerPool) 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 *LoadBalancerPool) SetName(v string) { + o.Name = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *LoadBalancerPool) 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 *LoadBalancerPool) 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 *LoadBalancerPool) 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 *LoadBalancerPool) SetDescription(v string) { + o.Description = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *LoadBalancerPool) GetStatus() bool { + if o == nil || IsNil(o.Status) { + var ret bool + 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 *LoadBalancerPool) GetStatusOk() (*bool, 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 *LoadBalancerPool) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given bool and assigns it to the Status field. +func (o *LoadBalancerPool) SetStatus(v bool) { + o.Status = &v +} + +// GetPriority returns the Priority field value if set, zero value otherwise. +func (o *LoadBalancerPool) GetPriority() int32 { + if o == nil || IsNil(o.Priority) { + var ret int32 + return ret + } + return *o.Priority +} + +// GetPriorityOk returns a tuple with the Priority field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadBalancerPool) GetPriorityOk() (*int32, bool) { + if o == nil || IsNil(o.Priority) { + return nil, false + } + return o.Priority, true +} + +// HasPriority returns a boolean if a field has been set. +func (o *LoadBalancerPool) HasPriority() bool { + if o != nil && !IsNil(o.Priority) { + return true + } + + return false +} + +// SetPriority gets a reference to the given int32 and assigns it to the Priority field. +func (o *LoadBalancerPool) SetPriority(v int32) { + o.Priority = &v +} + +// GetMethod returns the Method field value if set, zero value otherwise. +func (o *LoadBalancerPool) GetMethod() string { + if o == nil || IsNil(o.Method) { + var ret string + return ret + } + return *o.Method +} + +// GetMethodOk returns a tuple with the Method field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadBalancerPool) GetMethodOk() (*string, bool) { + if o == nil || IsNil(o.Method) { + return nil, false + } + return o.Method, true +} + +// HasMethod returns a boolean if a field has been set. +func (o *LoadBalancerPool) HasMethod() bool { + if o != nil && !IsNil(o.Method) { + return true + } + + return false +} + +// SetMethod gets a reference to the given string and assigns it to the Method field. +func (o *LoadBalancerPool) SetMethod(v string) { + o.Method = &v +} + +// GetKeepalive returns the Keepalive field value if set, zero value otherwise. +func (o *LoadBalancerPool) GetKeepalive() string { + if o == nil || IsNil(o.Keepalive) { + var ret string + return ret + } + return *o.Keepalive +} + +// GetKeepaliveOk returns a tuple with the Keepalive field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadBalancerPool) GetKeepaliveOk() (*string, bool) { + if o == nil || IsNil(o.Keepalive) { + return nil, false + } + return o.Keepalive, true +} + +// HasKeepalive returns a boolean if a field has been set. +func (o *LoadBalancerPool) HasKeepalive() bool { + if o != nil && !IsNil(o.Keepalive) { + return true + } + + return false +} + +// SetKeepalive gets a reference to the given string and assigns it to the Keepalive field. +func (o *LoadBalancerPool) SetKeepalive(v string) { + o.Keepalive = &v +} + +// GetNextUpstreamTcp returns the NextUpstreamTcp field value if set, zero value otherwise. +func (o *LoadBalancerPool) GetNextUpstreamTcp() string { + if o == nil || IsNil(o.NextUpstreamTcp) { + var ret string + return ret + } + return *o.NextUpstreamTcp +} + +// GetNextUpstreamTcpOk returns a tuple with the NextUpstreamTcp field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadBalancerPool) GetNextUpstreamTcpOk() (*string, bool) { + if o == nil || IsNil(o.NextUpstreamTcp) { + return nil, false + } + return o.NextUpstreamTcp, true +} + +// HasNextUpstreamTcp returns a boolean if a field has been set. +func (o *LoadBalancerPool) HasNextUpstreamTcp() bool { + if o != nil && !IsNil(o.NextUpstreamTcp) { + return true + } + + return false +} + +// SetNextUpstreamTcp gets a reference to the given string and assigns it to the NextUpstreamTcp field. +func (o *LoadBalancerPool) SetNextUpstreamTcp(v string) { + o.NextUpstreamTcp = &v +} + +// GetRegions returns the Regions field value if set, zero value otherwise. +func (o *LoadBalancerPool) GetRegions() []string { + if o == nil || IsNil(o.Regions) { + var ret []string + return ret + } + return o.Regions +} + +// GetRegionsOk returns a tuple with the Regions field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadBalancerPool) GetRegionsOk() ([]string, bool) { + if o == nil || IsNil(o.Regions) { + return nil, false + } + return o.Regions, true +} + +// HasRegions returns a boolean if a field has been set. +func (o *LoadBalancerPool) HasRegions() bool { + if o != nil && !IsNil(o.Regions) { + return true + } + + return false +} + +// SetRegions gets a reference to the given []string and assigns it to the Regions field. +func (o *LoadBalancerPool) SetRegions(v []string) { + o.Regions = v +} + +// GetOrigins returns the Origins field value if set, zero value otherwise. +func (o *LoadBalancerPool) GetOrigins() []LoadBalancerOrigin { + if o == nil || IsNil(o.Origins) { + var ret []LoadBalancerOrigin + return ret + } + return o.Origins +} + +// GetOriginsOk returns a tuple with the Origins field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadBalancerPool) GetOriginsOk() ([]LoadBalancerOrigin, bool) { + if o == nil || IsNil(o.Origins) { + return nil, false + } + return o.Origins, true +} + +// HasOrigins returns a boolean if a field has been set. +func (o *LoadBalancerPool) HasOrigins() bool { + if o != nil && !IsNil(o.Origins) { + return true + } + + return false +} + +// SetOrigins gets a reference to the given []LoadBalancerOrigin and assigns it to the Origins field. +func (o *LoadBalancerPool) SetOrigins(v []LoadBalancerOrigin) { + o.Origins = v +} + +// GetMonitoringStatus returns the MonitoringStatus field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *LoadBalancerPool) GetMonitoringStatus() MonitoringStatus { + if o == nil || IsNil(o.MonitoringStatus.Get()) { + var ret MonitoringStatus + return ret + } + return *o.MonitoringStatus.Get() +} + +// GetMonitoringStatusOk returns a tuple with the MonitoringStatus 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 *LoadBalancerPool) GetMonitoringStatusOk() (*MonitoringStatus, bool) { + if o == nil { + return nil, false + } + return o.MonitoringStatus.Get(), o.MonitoringStatus.IsSet() +} + +// HasMonitoringStatus returns a boolean if a field has been set. +func (o *LoadBalancerPool) HasMonitoringStatus() bool { + if o != nil && o.MonitoringStatus.IsSet() { + return true + } + + return false +} + +// SetMonitoringStatus gets a reference to the given NullableMonitoringStatus and assigns it to the MonitoringStatus field. +func (o *LoadBalancerPool) SetMonitoringStatus(v MonitoringStatus) { + o.MonitoringStatus.Set(&v) +} +// SetMonitoringStatusNil sets the value for MonitoringStatus to be an explicit nil +func (o *LoadBalancerPool) SetMonitoringStatusNil() { + o.MonitoringStatus.Set(nil) +} + +// UnsetMonitoringStatus ensures that no value is present for MonitoringStatus, not even an explicit nil +func (o *LoadBalancerPool) UnsetMonitoringStatus() { + o.MonitoringStatus.Unset() +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *LoadBalancerPool) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadBalancerPool) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *LoadBalancerPool) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *LoadBalancerPool) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *LoadBalancerPool) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadBalancerPool) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *LoadBalancerPool) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *LoadBalancerPool) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +func (o LoadBalancerPool) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o LoadBalancerPool) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: id is readOnly + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + if !IsNil(o.Priority) { + toSerialize["priority"] = o.Priority + } + if !IsNil(o.Method) { + toSerialize["method"] = o.Method + } + if !IsNil(o.Keepalive) { + toSerialize["keepalive"] = o.Keepalive + } + if !IsNil(o.NextUpstreamTcp) { + toSerialize["next_upstream_tcp"] = o.NextUpstreamTcp + } + if !IsNil(o.Regions) { + toSerialize["regions"] = o.Regions + } + // skip: origins is readOnly + if o.MonitoringStatus.IsSet() { + toSerialize["monitoring_status"] = o.MonitoringStatus.Get() + } + // skip: created_at is readOnly + // skip: updated_at is readOnly + return toSerialize, nil +} + +type NullableLoadBalancerPool struct { + value *LoadBalancerPool + isSet bool +} + +func (v NullableLoadBalancerPool) Get() *LoadBalancerPool { + return v.value +} + +func (v *NullableLoadBalancerPool) Set(val *LoadBalancerPool) { + v.value = val + v.isSet = true +} + +func (v NullableLoadBalancerPool) IsSet() bool { + return v.isSet +} + +func (v *NullableLoadBalancerPool) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLoadBalancerPool(val *LoadBalancerPool) *NullableLoadBalancerPool { + return &NullableLoadBalancerPool{value: val, isSet: true} +} + +func (v NullableLoadBalancerPool) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLoadBalancerPool) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_load_balancer_pool_data.go b/model_load_balancer_pool_data.go new file mode 100644 index 0000000..5555cae --- /dev/null +++ b/model_load_balancer_pool_data.go @@ -0,0 +1,126 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the LoadBalancerPoolData type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LoadBalancerPoolData{} + +// LoadBalancerPoolData struct for LoadBalancerPoolData +type LoadBalancerPoolData struct { + Data *LoadBalancerPool `json:"data,omitempty"` +} + +// NewLoadBalancerPoolData instantiates a new LoadBalancerPoolData object +// This constructor will assign default values to properties that have it defined, +// 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 NewLoadBalancerPoolData() *LoadBalancerPoolData { + this := LoadBalancerPoolData{} + return &this +} + +// NewLoadBalancerPoolDataWithDefaults instantiates a new LoadBalancerPoolData object +// This 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 NewLoadBalancerPoolDataWithDefaults() *LoadBalancerPoolData { + this := LoadBalancerPoolData{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *LoadBalancerPoolData) GetData() LoadBalancerPool { + if o == nil || IsNil(o.Data) { + var ret LoadBalancerPool + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadBalancerPoolData) GetDataOk() (*LoadBalancerPool, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *LoadBalancerPoolData) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given LoadBalancerPool and assigns it to the Data field. +func (o *LoadBalancerPoolData) SetData(v LoadBalancerPool) { + o.Data = &v +} + +func (o LoadBalancerPoolData) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o LoadBalancerPoolData) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + return toSerialize, nil +} + +type NullableLoadBalancerPoolData struct { + value *LoadBalancerPoolData + isSet bool +} + +func (v NullableLoadBalancerPoolData) Get() *LoadBalancerPoolData { + return v.value +} + +func (v *NullableLoadBalancerPoolData) Set(val *LoadBalancerPoolData) { + v.value = val + v.isSet = true +} + +func (v NullableLoadBalancerPoolData) IsSet() bool { + return v.isSet +} + +func (v *NullableLoadBalancerPoolData) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLoadBalancerPoolData(val *LoadBalancerPoolData) *NullableLoadBalancerPoolData { + return &NullableLoadBalancerPoolData{value: val, isSet: true} +} + +func (v NullableLoadBalancerPoolData) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLoadBalancerPoolData) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_load_balancer_pool_response.go b/model_load_balancer_pool_response.go new file mode 100644 index 0000000..027c3a7 --- /dev/null +++ b/model_load_balancer_pool_response.go @@ -0,0 +1,172 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the LoadBalancerPoolResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LoadBalancerPoolResponse{} + +// LoadBalancerPoolResponse struct for LoadBalancerPoolResponse +type LoadBalancerPoolResponse struct { + Data []LoadBalancerPool `json:"data,omitempty"` + Message NullableString `json:"message,omitempty"` +} + +// NewLoadBalancerPoolResponse instantiates a new LoadBalancerPoolResponse object +// This constructor will assign default values to properties that have it defined, +// 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 NewLoadBalancerPoolResponse() *LoadBalancerPoolResponse { + this := LoadBalancerPoolResponse{} + return &this +} + +// NewLoadBalancerPoolResponseWithDefaults instantiates a new LoadBalancerPoolResponse object +// This 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 NewLoadBalancerPoolResponseWithDefaults() *LoadBalancerPoolResponse { + this := LoadBalancerPoolResponse{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *LoadBalancerPoolResponse) GetData() []LoadBalancerPool { + if o == nil || IsNil(o.Data) { + var ret []LoadBalancerPool + return ret + } + return o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadBalancerPoolResponse) GetDataOk() ([]LoadBalancerPool, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *LoadBalancerPoolResponse) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given []LoadBalancerPool and assigns it to the Data field. +func (o *LoadBalancerPoolResponse) SetData(v []LoadBalancerPool) { + o.Data = v +} + +// GetMessage returns the Message field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *LoadBalancerPoolResponse) GetMessage() string { + if o == nil || IsNil(o.Message.Get()) { + var ret string + return ret + } + return *o.Message.Get() +} + +// GetMessageOk returns a tuple with the Message 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 *LoadBalancerPoolResponse) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Message.Get(), o.Message.IsSet() +} + +// HasMessage returns a boolean if a field has been set. +func (o *LoadBalancerPoolResponse) HasMessage() bool { + if o != nil && o.Message.IsSet() { + return true + } + + return false +} + +// SetMessage gets a reference to the given NullableString and assigns it to the Message field. +func (o *LoadBalancerPoolResponse) SetMessage(v string) { + o.Message.Set(&v) +} +// SetMessageNil sets the value for Message to be an explicit nil +func (o *LoadBalancerPoolResponse) SetMessageNil() { + o.Message.Set(nil) +} + +// UnsetMessage ensures that no value is present for Message, not even an explicit nil +func (o *LoadBalancerPoolResponse) UnsetMessage() { + o.Message.Unset() +} + +func (o LoadBalancerPoolResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o LoadBalancerPoolResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + if o.Message.IsSet() { + toSerialize["message"] = o.Message.Get() + } + return toSerialize, nil +} + +type NullableLoadBalancerPoolResponse struct { + value *LoadBalancerPoolResponse + isSet bool +} + +func (v NullableLoadBalancerPoolResponse) Get() *LoadBalancerPoolResponse { + return v.value +} + +func (v *NullableLoadBalancerPoolResponse) Set(val *LoadBalancerPoolResponse) { + v.value = val + v.isSet = true +} + +func (v NullableLoadBalancerPoolResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableLoadBalancerPoolResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLoadBalancerPoolResponse(val *LoadBalancerPoolResponse) *NullableLoadBalancerPoolResponse { + return &NullableLoadBalancerPoolResponse{value: val, isSet: true} +} + +func (v NullableLoadBalancerPoolResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLoadBalancerPoolResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_load_balancer_pool_store.go b/model_load_balancer_pool_store.go new file mode 100644 index 0000000..e254e06 --- /dev/null +++ b/model_load_balancer_pool_store.go @@ -0,0 +1,374 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the LoadBalancerPoolStore type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LoadBalancerPoolStore{} + +// LoadBalancerPoolStore struct for LoadBalancerPoolStore +type LoadBalancerPoolStore struct { + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Status bool `json:"status"` + // Zero means the default pool + Priority *int32 `json:"priority,omitempty"` + Method string `json:"method"` + Keepalive string `json:"keepalive"` + NextUpstreamTcp string `json:"next_upstream_tcp"` + Regions []string `json:"regions,omitempty"` + Origins []LoadBalancerOriginStore `json:"origins,omitempty"` +} + +// NewLoadBalancerPoolStore instantiates a new LoadBalancerPoolStore object +// This constructor will assign default values to properties that have it defined, +// 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 NewLoadBalancerPoolStore(name string, status bool, method string, keepalive string, nextUpstreamTcp string) *LoadBalancerPoolStore { + this := LoadBalancerPoolStore{} + this.Name = name + this.Status = status + this.Method = method + this.Keepalive = keepalive + this.NextUpstreamTcp = nextUpstreamTcp + return &this +} + +// NewLoadBalancerPoolStoreWithDefaults instantiates a new LoadBalancerPoolStore object +// This 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 NewLoadBalancerPoolStoreWithDefaults() *LoadBalancerPoolStore { + this := LoadBalancerPoolStore{} + var keepalive string = "off" + this.Keepalive = keepalive + var nextUpstreamTcp string = "off" + this.NextUpstreamTcp = nextUpstreamTcp + return &this +} + +// GetName returns the Name field value +func (o *LoadBalancerPoolStore) 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 *LoadBalancerPoolStore) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *LoadBalancerPoolStore) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *LoadBalancerPoolStore) 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 *LoadBalancerPoolStore) 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 *LoadBalancerPoolStore) 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 *LoadBalancerPoolStore) SetDescription(v string) { + o.Description = &v +} + +// GetStatus returns the Status field value +func (o *LoadBalancerPoolStore) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *LoadBalancerPoolStore) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *LoadBalancerPoolStore) SetStatus(v bool) { + o.Status = v +} + +// GetPriority returns the Priority field value if set, zero value otherwise. +func (o *LoadBalancerPoolStore) GetPriority() int32 { + if o == nil || IsNil(o.Priority) { + var ret int32 + return ret + } + return *o.Priority +} + +// GetPriorityOk returns a tuple with the Priority field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadBalancerPoolStore) GetPriorityOk() (*int32, bool) { + if o == nil || IsNil(o.Priority) { + return nil, false + } + return o.Priority, true +} + +// HasPriority returns a boolean if a field has been set. +func (o *LoadBalancerPoolStore) HasPriority() bool { + if o != nil && !IsNil(o.Priority) { + return true + } + + return false +} + +// SetPriority gets a reference to the given int32 and assigns it to the Priority field. +func (o *LoadBalancerPoolStore) SetPriority(v int32) { + o.Priority = &v +} + +// GetMethod returns the Method field value +func (o *LoadBalancerPoolStore) GetMethod() string { + if o == nil { + var ret string + return ret + } + + return o.Method +} + +// GetMethodOk returns a tuple with the Method field value +// and a boolean to check if the value has been set. +func (o *LoadBalancerPoolStore) GetMethodOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Method, true +} + +// SetMethod sets field value +func (o *LoadBalancerPoolStore) SetMethod(v string) { + o.Method = v +} + +// GetKeepalive returns the Keepalive field value +func (o *LoadBalancerPoolStore) GetKeepalive() string { + if o == nil { + var ret string + return ret + } + + return o.Keepalive +} + +// GetKeepaliveOk returns a tuple with the Keepalive field value +// and a boolean to check if the value has been set. +func (o *LoadBalancerPoolStore) GetKeepaliveOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Keepalive, true +} + +// SetKeepalive sets field value +func (o *LoadBalancerPoolStore) SetKeepalive(v string) { + o.Keepalive = v +} + +// GetNextUpstreamTcp returns the NextUpstreamTcp field value +func (o *LoadBalancerPoolStore) GetNextUpstreamTcp() string { + if o == nil { + var ret string + return ret + } + + return o.NextUpstreamTcp +} + +// GetNextUpstreamTcpOk returns a tuple with the NextUpstreamTcp field value +// and a boolean to check if the value has been set. +func (o *LoadBalancerPoolStore) GetNextUpstreamTcpOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.NextUpstreamTcp, true +} + +// SetNextUpstreamTcp sets field value +func (o *LoadBalancerPoolStore) SetNextUpstreamTcp(v string) { + o.NextUpstreamTcp = v +} + +// GetRegions returns the Regions field value if set, zero value otherwise. +func (o *LoadBalancerPoolStore) GetRegions() []string { + if o == nil || IsNil(o.Regions) { + var ret []string + return ret + } + return o.Regions +} + +// GetRegionsOk returns a tuple with the Regions field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadBalancerPoolStore) GetRegionsOk() ([]string, bool) { + if o == nil || IsNil(o.Regions) { + return nil, false + } + return o.Regions, true +} + +// HasRegions returns a boolean if a field has been set. +func (o *LoadBalancerPoolStore) HasRegions() bool { + if o != nil && !IsNil(o.Regions) { + return true + } + + return false +} + +// SetRegions gets a reference to the given []string and assigns it to the Regions field. +func (o *LoadBalancerPoolStore) SetRegions(v []string) { + o.Regions = v +} + +// GetOrigins returns the Origins field value if set, zero value otherwise. +func (o *LoadBalancerPoolStore) GetOrigins() []LoadBalancerOriginStore { + if o == nil || IsNil(o.Origins) { + var ret []LoadBalancerOriginStore + return ret + } + return o.Origins +} + +// GetOriginsOk returns a tuple with the Origins field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadBalancerPoolStore) GetOriginsOk() ([]LoadBalancerOriginStore, bool) { + if o == nil || IsNil(o.Origins) { + return nil, false + } + return o.Origins, true +} + +// HasOrigins returns a boolean if a field has been set. +func (o *LoadBalancerPoolStore) HasOrigins() bool { + if o != nil && !IsNil(o.Origins) { + return true + } + + return false +} + +// SetOrigins gets a reference to the given []LoadBalancerOriginStore and assigns it to the Origins field. +func (o *LoadBalancerPoolStore) SetOrigins(v []LoadBalancerOriginStore) { + o.Origins = v +} + +func (o LoadBalancerPoolStore) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o LoadBalancerPoolStore) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + toSerialize["status"] = o.Status + if !IsNil(o.Priority) { + toSerialize["priority"] = o.Priority + } + toSerialize["method"] = o.Method + toSerialize["keepalive"] = o.Keepalive + toSerialize["next_upstream_tcp"] = o.NextUpstreamTcp + if !IsNil(o.Regions) { + toSerialize["regions"] = o.Regions + } + if !IsNil(o.Origins) { + toSerialize["origins"] = o.Origins + } + return toSerialize, nil +} + +type NullableLoadBalancerPoolStore struct { + value *LoadBalancerPoolStore + isSet bool +} + +func (v NullableLoadBalancerPoolStore) Get() *LoadBalancerPoolStore { + return v.value +} + +func (v *NullableLoadBalancerPoolStore) Set(val *LoadBalancerPoolStore) { + v.value = val + v.isSet = true +} + +func (v NullableLoadBalancerPoolStore) IsSet() bool { + return v.isSet +} + +func (v *NullableLoadBalancerPoolStore) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLoadBalancerPoolStore(val *LoadBalancerPoolStore) *NullableLoadBalancerPoolStore { + return &NullableLoadBalancerPoolStore{value: val, isSet: true} +} + +func (v NullableLoadBalancerPoolStore) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLoadBalancerPoolStore) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_load_balancer_region.go b/model_load_balancer_region.go new file mode 100644 index 0000000..89e2da5 --- /dev/null +++ b/model_load_balancer_region.go @@ -0,0 +1,196 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the LoadBalancerRegion type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LoadBalancerRegion{} + +// LoadBalancerRegion struct for LoadBalancerRegion +type LoadBalancerRegion struct { + Id *string `json:"id,omitempty"` + Region *string `json:"region,omitempty"` + Name *string `json:"name,omitempty"` +} + +// NewLoadBalancerRegion instantiates a new LoadBalancerRegion object +// This constructor will assign default values to properties that have it defined, +// 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 NewLoadBalancerRegion() *LoadBalancerRegion { + this := LoadBalancerRegion{} + return &this +} + +// NewLoadBalancerRegionWithDefaults instantiates a new LoadBalancerRegion object +// This 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 NewLoadBalancerRegionWithDefaults() *LoadBalancerRegion { + this := LoadBalancerRegion{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *LoadBalancerRegion) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadBalancerRegion) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *LoadBalancerRegion) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *LoadBalancerRegion) SetId(v string) { + o.Id = &v +} + +// GetRegion returns the Region field value if set, zero value otherwise. +func (o *LoadBalancerRegion) GetRegion() string { + if o == nil || IsNil(o.Region) { + var ret string + return ret + } + return *o.Region +} + +// GetRegionOk returns a tuple with the Region field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadBalancerRegion) GetRegionOk() (*string, bool) { + if o == nil || IsNil(o.Region) { + return nil, false + } + return o.Region, true +} + +// HasRegion returns a boolean if a field has been set. +func (o *LoadBalancerRegion) HasRegion() bool { + if o != nil && !IsNil(o.Region) { + return true + } + + return false +} + +// SetRegion gets a reference to the given string and assigns it to the Region field. +func (o *LoadBalancerRegion) SetRegion(v string) { + o.Region = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *LoadBalancerRegion) 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 *LoadBalancerRegion) 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 *LoadBalancerRegion) 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 *LoadBalancerRegion) SetName(v string) { + o.Name = &v +} + +func (o LoadBalancerRegion) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o LoadBalancerRegion) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Region) { + toSerialize["region"] = o.Region + } + // skip: name is readOnly + return toSerialize, nil +} + +type NullableLoadBalancerRegion struct { + value *LoadBalancerRegion + isSet bool +} + +func (v NullableLoadBalancerRegion) Get() *LoadBalancerRegion { + return v.value +} + +func (v *NullableLoadBalancerRegion) Set(val *LoadBalancerRegion) { + v.value = val + v.isSet = true +} + +func (v NullableLoadBalancerRegion) IsSet() bool { + return v.isSet +} + +func (v *NullableLoadBalancerRegion) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLoadBalancerRegion(val *LoadBalancerRegion) *NullableLoadBalancerRegion { + return &NullableLoadBalancerRegion{value: val, isSet: true} +} + +func (v NullableLoadBalancerRegion) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLoadBalancerRegion) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_load_balancer_response.go b/model_load_balancer_response.go new file mode 100644 index 0000000..b4bd003 --- /dev/null +++ b/model_load_balancer_response.go @@ -0,0 +1,172 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the LoadBalancerResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LoadBalancerResponse{} + +// LoadBalancerResponse struct for LoadBalancerResponse +type LoadBalancerResponse struct { + Data *LoadBalancer `json:"data,omitempty"` + Message NullableString `json:"message,omitempty"` +} + +// NewLoadBalancerResponse instantiates a new LoadBalancerResponse object +// This constructor will assign default values to properties that have it defined, +// 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 NewLoadBalancerResponse() *LoadBalancerResponse { + this := LoadBalancerResponse{} + return &this +} + +// NewLoadBalancerResponseWithDefaults instantiates a new LoadBalancerResponse object +// This 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 NewLoadBalancerResponseWithDefaults() *LoadBalancerResponse { + this := LoadBalancerResponse{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *LoadBalancerResponse) GetData() LoadBalancer { + if o == nil || IsNil(o.Data) { + var ret LoadBalancer + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadBalancerResponse) GetDataOk() (*LoadBalancer, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *LoadBalancerResponse) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given LoadBalancer and assigns it to the Data field. +func (o *LoadBalancerResponse) SetData(v LoadBalancer) { + o.Data = &v +} + +// GetMessage returns the Message field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *LoadBalancerResponse) GetMessage() string { + if o == nil || IsNil(o.Message.Get()) { + var ret string + return ret + } + return *o.Message.Get() +} + +// GetMessageOk returns a tuple with the Message 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 *LoadBalancerResponse) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Message.Get(), o.Message.IsSet() +} + +// HasMessage returns a boolean if a field has been set. +func (o *LoadBalancerResponse) HasMessage() bool { + if o != nil && o.Message.IsSet() { + return true + } + + return false +} + +// SetMessage gets a reference to the given NullableString and assigns it to the Message field. +func (o *LoadBalancerResponse) SetMessage(v string) { + o.Message.Set(&v) +} +// SetMessageNil sets the value for Message to be an explicit nil +func (o *LoadBalancerResponse) SetMessageNil() { + o.Message.Set(nil) +} + +// UnsetMessage ensures that no value is present for Message, not even an explicit nil +func (o *LoadBalancerResponse) UnsetMessage() { + o.Message.Unset() +} + +func (o LoadBalancerResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o LoadBalancerResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + if o.Message.IsSet() { + toSerialize["message"] = o.Message.Get() + } + return toSerialize, nil +} + +type NullableLoadBalancerResponse struct { + value *LoadBalancerResponse + isSet bool +} + +func (v NullableLoadBalancerResponse) Get() *LoadBalancerResponse { + return v.value +} + +func (v *NullableLoadBalancerResponse) Set(val *LoadBalancerResponse) { + v.value = val + v.isSet = true +} + +func (v NullableLoadBalancerResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableLoadBalancerResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLoadBalancerResponse(val *LoadBalancerResponse) *NullableLoadBalancerResponse { + return &NullableLoadBalancerResponse{value: val, isSet: true} +} + +func (v NullableLoadBalancerResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLoadBalancerResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_load_balancer_setting.go b/model_load_balancer_setting.go new file mode 100644 index 0000000..686e4ee --- /dev/null +++ b/model_load_balancer_setting.go @@ -0,0 +1,324 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the LoadBalancerSetting type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LoadBalancerSetting{} + +// LoadBalancerSetting struct for LoadBalancerSetting +type LoadBalancerSetting struct { + Method *string `json:"method,omitempty"` + NextUpstreamTcp *string `json:"next_upstream_tcp,omitempty"` + Protocol *string `json:"protocol,omitempty"` + Keepalive *string `json:"keepalive,omitempty"` + // Zero will disable failing strategy. + MaxFails *float32 `json:"max_fails,omitempty"` + // Human friendly time duration. + FailTimeout *string `json:"fail_timeout,omitempty"` +} + +// NewLoadBalancerSetting instantiates a new LoadBalancerSetting object +// This constructor will assign default values to properties that have it defined, +// 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 NewLoadBalancerSetting() *LoadBalancerSetting { + this := LoadBalancerSetting{} + var nextUpstreamTcp string = "off" + this.NextUpstreamTcp = &nextUpstreamTcp + var keepalive string = "off" + this.Keepalive = &keepalive + var maxFails float32 = 0 + this.MaxFails = &maxFails + var failTimeout string = "10s" + this.FailTimeout = &failTimeout + return &this +} + +// NewLoadBalancerSettingWithDefaults instantiates a new LoadBalancerSetting object +// This 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 NewLoadBalancerSettingWithDefaults() *LoadBalancerSetting { + this := LoadBalancerSetting{} + var nextUpstreamTcp string = "off" + this.NextUpstreamTcp = &nextUpstreamTcp + var keepalive string = "off" + this.Keepalive = &keepalive + var maxFails float32 = 0 + this.MaxFails = &maxFails + var failTimeout string = "10s" + this.FailTimeout = &failTimeout + return &this +} + +// GetMethod returns the Method field value if set, zero value otherwise. +func (o *LoadBalancerSetting) GetMethod() string { + if o == nil || IsNil(o.Method) { + var ret string + return ret + } + return *o.Method +} + +// GetMethodOk returns a tuple with the Method field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadBalancerSetting) GetMethodOk() (*string, bool) { + if o == nil || IsNil(o.Method) { + return nil, false + } + return o.Method, true +} + +// HasMethod returns a boolean if a field has been set. +func (o *LoadBalancerSetting) HasMethod() bool { + if o != nil && !IsNil(o.Method) { + return true + } + + return false +} + +// SetMethod gets a reference to the given string and assigns it to the Method field. +func (o *LoadBalancerSetting) SetMethod(v string) { + o.Method = &v +} + +// GetNextUpstreamTcp returns the NextUpstreamTcp field value if set, zero value otherwise. +func (o *LoadBalancerSetting) GetNextUpstreamTcp() string { + if o == nil || IsNil(o.NextUpstreamTcp) { + var ret string + return ret + } + return *o.NextUpstreamTcp +} + +// GetNextUpstreamTcpOk returns a tuple with the NextUpstreamTcp field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadBalancerSetting) GetNextUpstreamTcpOk() (*string, bool) { + if o == nil || IsNil(o.NextUpstreamTcp) { + return nil, false + } + return o.NextUpstreamTcp, true +} + +// HasNextUpstreamTcp returns a boolean if a field has been set. +func (o *LoadBalancerSetting) HasNextUpstreamTcp() bool { + if o != nil && !IsNil(o.NextUpstreamTcp) { + return true + } + + return false +} + +// SetNextUpstreamTcp gets a reference to the given string and assigns it to the NextUpstreamTcp field. +func (o *LoadBalancerSetting) SetNextUpstreamTcp(v string) { + o.NextUpstreamTcp = &v +} + +// GetProtocol returns the Protocol field value if set, zero value otherwise. +func (o *LoadBalancerSetting) GetProtocol() string { + if o == nil || IsNil(o.Protocol) { + var ret string + return ret + } + return *o.Protocol +} + +// GetProtocolOk returns a tuple with the Protocol field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadBalancerSetting) GetProtocolOk() (*string, bool) { + if o == nil || IsNil(o.Protocol) { + return nil, false + } + return o.Protocol, true +} + +// HasProtocol returns a boolean if a field has been set. +func (o *LoadBalancerSetting) HasProtocol() bool { + if o != nil && !IsNil(o.Protocol) { + return true + } + + return false +} + +// SetProtocol gets a reference to the given string and assigns it to the Protocol field. +func (o *LoadBalancerSetting) SetProtocol(v string) { + o.Protocol = &v +} + +// GetKeepalive returns the Keepalive field value if set, zero value otherwise. +func (o *LoadBalancerSetting) GetKeepalive() string { + if o == nil || IsNil(o.Keepalive) { + var ret string + return ret + } + return *o.Keepalive +} + +// GetKeepaliveOk returns a tuple with the Keepalive field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadBalancerSetting) GetKeepaliveOk() (*string, bool) { + if o == nil || IsNil(o.Keepalive) { + return nil, false + } + return o.Keepalive, true +} + +// HasKeepalive returns a boolean if a field has been set. +func (o *LoadBalancerSetting) HasKeepalive() bool { + if o != nil && !IsNil(o.Keepalive) { + return true + } + + return false +} + +// SetKeepalive gets a reference to the given string and assigns it to the Keepalive field. +func (o *LoadBalancerSetting) SetKeepalive(v string) { + o.Keepalive = &v +} + +// GetMaxFails returns the MaxFails field value if set, zero value otherwise. +func (o *LoadBalancerSetting) GetMaxFails() float32 { + if o == nil || IsNil(o.MaxFails) { + var ret float32 + return ret + } + return *o.MaxFails +} + +// GetMaxFailsOk returns a tuple with the MaxFails field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadBalancerSetting) GetMaxFailsOk() (*float32, bool) { + if o == nil || IsNil(o.MaxFails) { + return nil, false + } + return o.MaxFails, true +} + +// HasMaxFails returns a boolean if a field has been set. +func (o *LoadBalancerSetting) HasMaxFails() bool { + if o != nil && !IsNil(o.MaxFails) { + return true + } + + return false +} + +// SetMaxFails gets a reference to the given float32 and assigns it to the MaxFails field. +func (o *LoadBalancerSetting) SetMaxFails(v float32) { + o.MaxFails = &v +} + +// GetFailTimeout returns the FailTimeout field value if set, zero value otherwise. +func (o *LoadBalancerSetting) GetFailTimeout() string { + if o == nil || IsNil(o.FailTimeout) { + var ret string + return ret + } + return *o.FailTimeout +} + +// GetFailTimeoutOk returns a tuple with the FailTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadBalancerSetting) GetFailTimeoutOk() (*string, bool) { + if o == nil || IsNil(o.FailTimeout) { + return nil, false + } + return o.FailTimeout, true +} + +// HasFailTimeout returns a boolean if a field has been set. +func (o *LoadBalancerSetting) HasFailTimeout() bool { + if o != nil && !IsNil(o.FailTimeout) { + return true + } + + return false +} + +// SetFailTimeout gets a reference to the given string and assigns it to the FailTimeout field. +func (o *LoadBalancerSetting) SetFailTimeout(v string) { + o.FailTimeout = &v +} + +func (o LoadBalancerSetting) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o LoadBalancerSetting) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Method) { + toSerialize["method"] = o.Method + } + if !IsNil(o.NextUpstreamTcp) { + toSerialize["next_upstream_tcp"] = o.NextUpstreamTcp + } + if !IsNil(o.Protocol) { + toSerialize["protocol"] = o.Protocol + } + if !IsNil(o.Keepalive) { + toSerialize["keepalive"] = o.Keepalive + } + if !IsNil(o.MaxFails) { + toSerialize["max_fails"] = o.MaxFails + } + if !IsNil(o.FailTimeout) { + toSerialize["fail_timeout"] = o.FailTimeout + } + return toSerialize, nil +} + +type NullableLoadBalancerSetting struct { + value *LoadBalancerSetting + isSet bool +} + +func (v NullableLoadBalancerSetting) Get() *LoadBalancerSetting { + return v.value +} + +func (v *NullableLoadBalancerSetting) Set(val *LoadBalancerSetting) { + v.value = val + v.isSet = true +} + +func (v NullableLoadBalancerSetting) IsSet() bool { + return v.isSet +} + +func (v *NullableLoadBalancerSetting) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLoadBalancerSetting(val *LoadBalancerSetting) *NullableLoadBalancerSetting { + return &NullableLoadBalancerSetting{value: val, isSet: true} +} + +func (v NullableLoadBalancerSetting) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLoadBalancerSetting) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_load_balancer_settings_data.go b/model_load_balancer_settings_data.go new file mode 100644 index 0000000..0daf571 --- /dev/null +++ b/model_load_balancer_settings_data.go @@ -0,0 +1,126 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the LoadBalancerSettingsData type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LoadBalancerSettingsData{} + +// LoadBalancerSettingsData struct for LoadBalancerSettingsData +type LoadBalancerSettingsData struct { + Data *LoadBalancerSetting `json:"data,omitempty"` +} + +// NewLoadBalancerSettingsData instantiates a new LoadBalancerSettingsData object +// This constructor will assign default values to properties that have it defined, +// 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 NewLoadBalancerSettingsData() *LoadBalancerSettingsData { + this := LoadBalancerSettingsData{} + return &this +} + +// NewLoadBalancerSettingsDataWithDefaults instantiates a new LoadBalancerSettingsData object +// This 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 NewLoadBalancerSettingsDataWithDefaults() *LoadBalancerSettingsData { + this := LoadBalancerSettingsData{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *LoadBalancerSettingsData) GetData() LoadBalancerSetting { + if o == nil || IsNil(o.Data) { + var ret LoadBalancerSetting + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadBalancerSettingsData) GetDataOk() (*LoadBalancerSetting, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *LoadBalancerSettingsData) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given LoadBalancerSetting and assigns it to the Data field. +func (o *LoadBalancerSettingsData) SetData(v LoadBalancerSetting) { + o.Data = &v +} + +func (o LoadBalancerSettingsData) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o LoadBalancerSettingsData) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + return toSerialize, nil +} + +type NullableLoadBalancerSettingsData struct { + value *LoadBalancerSettingsData + isSet bool +} + +func (v NullableLoadBalancerSettingsData) Get() *LoadBalancerSettingsData { + return v.value +} + +func (v *NullableLoadBalancerSettingsData) Set(val *LoadBalancerSettingsData) { + v.value = val + v.isSet = true +} + +func (v NullableLoadBalancerSettingsData) IsSet() bool { + return v.isSet +} + +func (v *NullableLoadBalancerSettingsData) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLoadBalancerSettingsData(val *LoadBalancerSettingsData) *NullableLoadBalancerSettingsData { + return &NullableLoadBalancerSettingsData{value: val, isSet: true} +} + +func (v NullableLoadBalancerSettingsData) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLoadBalancerSettingsData) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_load_balancer_store.go b/model_load_balancer_store.go new file mode 100644 index 0000000..d289971 --- /dev/null +++ b/model_load_balancer_store.go @@ -0,0 +1,207 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the LoadBalancerStore type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LoadBalancerStore{} + +// LoadBalancerStore struct for LoadBalancerStore +type LoadBalancerStore struct { + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Status bool `json:"status"` + Method string `json:"method"` +} + +// NewLoadBalancerStore instantiates a new LoadBalancerStore object +// This constructor will assign default values to properties that have it defined, +// 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 NewLoadBalancerStore(name string, status bool, method string) *LoadBalancerStore { + this := LoadBalancerStore{} + this.Name = name + this.Status = status + this.Method = method + return &this +} + +// NewLoadBalancerStoreWithDefaults instantiates a new LoadBalancerStore object +// This 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 NewLoadBalancerStoreWithDefaults() *LoadBalancerStore { + this := LoadBalancerStore{} + return &this +} + +// GetName returns the Name field value +func (o *LoadBalancerStore) 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 *LoadBalancerStore) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *LoadBalancerStore) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *LoadBalancerStore) 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 *LoadBalancerStore) 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 *LoadBalancerStore) 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 *LoadBalancerStore) SetDescription(v string) { + o.Description = &v +} + +// GetStatus returns the Status field value +func (o *LoadBalancerStore) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *LoadBalancerStore) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *LoadBalancerStore) SetStatus(v bool) { + o.Status = v +} + +// GetMethod returns the Method field value +func (o *LoadBalancerStore) GetMethod() string { + if o == nil { + var ret string + return ret + } + + return o.Method +} + +// GetMethodOk returns a tuple with the Method field value +// and a boolean to check if the value has been set. +func (o *LoadBalancerStore) GetMethodOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Method, true +} + +// SetMethod sets field value +func (o *LoadBalancerStore) SetMethod(v string) { + o.Method = v +} + +func (o LoadBalancerStore) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o LoadBalancerStore) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + toSerialize["status"] = o.Status + toSerialize["method"] = o.Method + return toSerialize, nil +} + +type NullableLoadBalancerStore struct { + value *LoadBalancerStore + isSet bool +} + +func (v NullableLoadBalancerStore) Get() *LoadBalancerStore { + return v.value +} + +func (v *NullableLoadBalancerStore) Set(val *LoadBalancerStore) { + v.value = val + v.isSet = true +} + +func (v NullableLoadBalancerStore) IsSet() bool { + return v.isSet +} + +func (v *NullableLoadBalancerStore) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLoadBalancerStore(val *LoadBalancerStore) *NullableLoadBalancerStore { + return &NullableLoadBalancerStore{value: val, isSet: true} +} + +func (v NullableLoadBalancerStore) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLoadBalancerStore) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_load_balancers_index_200_response.go b/model_load_balancers_index_200_response.go new file mode 100644 index 0000000..c783bc8 --- /dev/null +++ b/model_load_balancers_index_200_response.go @@ -0,0 +1,126 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the LoadBalancersIndex200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LoadBalancersIndex200Response{} + +// LoadBalancersIndex200Response struct for LoadBalancersIndex200Response +type LoadBalancersIndex200Response struct { + Data []LoadBalancer `json:"data,omitempty"` +} + +// NewLoadBalancersIndex200Response instantiates a new LoadBalancersIndex200Response object +// This constructor will assign default values to properties that have it defined, +// 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 NewLoadBalancersIndex200Response() *LoadBalancersIndex200Response { + this := LoadBalancersIndex200Response{} + return &this +} + +// NewLoadBalancersIndex200ResponseWithDefaults instantiates a new LoadBalancersIndex200Response object +// This 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 NewLoadBalancersIndex200ResponseWithDefaults() *LoadBalancersIndex200Response { + this := LoadBalancersIndex200Response{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *LoadBalancersIndex200Response) GetData() []LoadBalancer { + if o == nil || IsNil(o.Data) { + var ret []LoadBalancer + return ret + } + return o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadBalancersIndex200Response) GetDataOk() ([]LoadBalancer, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *LoadBalancersIndex200Response) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given []LoadBalancer and assigns it to the Data field. +func (o *LoadBalancersIndex200Response) SetData(v []LoadBalancer) { + o.Data = v +} + +func (o LoadBalancersIndex200Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o LoadBalancersIndex200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + return toSerialize, nil +} + +type NullableLoadBalancersIndex200Response struct { + value *LoadBalancersIndex200Response + isSet bool +} + +func (v NullableLoadBalancersIndex200Response) Get() *LoadBalancersIndex200Response { + return v.value +} + +func (v *NullableLoadBalancersIndex200Response) Set(val *LoadBalancersIndex200Response) { + v.value = val + v.isSet = true +} + +func (v NullableLoadBalancersIndex200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableLoadBalancersIndex200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLoadBalancersIndex200Response(val *LoadBalancersIndex200Response) *NullableLoadBalancersIndex200Response { + return &NullableLoadBalancersIndex200Response{value: val, isSet: true} +} + +func (v NullableLoadBalancersIndex200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLoadBalancersIndex200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_load_balancers_pools_index_200_response.go b/model_load_balancers_pools_index_200_response.go new file mode 100644 index 0000000..4919fc7 --- /dev/null +++ b/model_load_balancers_pools_index_200_response.go @@ -0,0 +1,126 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the LoadBalancersPoolsIndex200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LoadBalancersPoolsIndex200Response{} + +// LoadBalancersPoolsIndex200Response struct for LoadBalancersPoolsIndex200Response +type LoadBalancersPoolsIndex200Response struct { + Data []LoadBalancerPool `json:"data,omitempty"` +} + +// NewLoadBalancersPoolsIndex200Response instantiates a new LoadBalancersPoolsIndex200Response object +// This constructor will assign default values to properties that have it defined, +// 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 NewLoadBalancersPoolsIndex200Response() *LoadBalancersPoolsIndex200Response { + this := LoadBalancersPoolsIndex200Response{} + return &this +} + +// NewLoadBalancersPoolsIndex200ResponseWithDefaults instantiates a new LoadBalancersPoolsIndex200Response object +// This 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 NewLoadBalancersPoolsIndex200ResponseWithDefaults() *LoadBalancersPoolsIndex200Response { + this := LoadBalancersPoolsIndex200Response{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *LoadBalancersPoolsIndex200Response) GetData() []LoadBalancerPool { + if o == nil || IsNil(o.Data) { + var ret []LoadBalancerPool + return ret + } + return o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadBalancersPoolsIndex200Response) GetDataOk() ([]LoadBalancerPool, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *LoadBalancersPoolsIndex200Response) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given []LoadBalancerPool and assigns it to the Data field. +func (o *LoadBalancersPoolsIndex200Response) SetData(v []LoadBalancerPool) { + o.Data = v +} + +func (o LoadBalancersPoolsIndex200Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o LoadBalancersPoolsIndex200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + return toSerialize, nil +} + +type NullableLoadBalancersPoolsIndex200Response struct { + value *LoadBalancersPoolsIndex200Response + isSet bool +} + +func (v NullableLoadBalancersPoolsIndex200Response) Get() *LoadBalancersPoolsIndex200Response { + return v.value +} + +func (v *NullableLoadBalancersPoolsIndex200Response) Set(val *LoadBalancersPoolsIndex200Response) { + v.value = val + v.isSet = true +} + +func (v NullableLoadBalancersPoolsIndex200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableLoadBalancersPoolsIndex200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLoadBalancersPoolsIndex200Response(val *LoadBalancersPoolsIndex200Response) *NullableLoadBalancersPoolsIndex200Response { + return &NullableLoadBalancersPoolsIndex200Response{value: val, isSet: true} +} + +func (v NullableLoadBalancersPoolsIndex200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLoadBalancersPoolsIndex200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_load_balancers_pools_origins_index_200_response.go b/model_load_balancers_pools_origins_index_200_response.go new file mode 100644 index 0000000..49473d8 --- /dev/null +++ b/model_load_balancers_pools_origins_index_200_response.go @@ -0,0 +1,126 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the LoadBalancersPoolsOriginsIndex200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LoadBalancersPoolsOriginsIndex200Response{} + +// LoadBalancersPoolsOriginsIndex200Response struct for LoadBalancersPoolsOriginsIndex200Response +type LoadBalancersPoolsOriginsIndex200Response struct { + Data []LoadBalancerOrigin `json:"data,omitempty"` +} + +// NewLoadBalancersPoolsOriginsIndex200Response instantiates a new LoadBalancersPoolsOriginsIndex200Response object +// This constructor will assign default values to properties that have it defined, +// 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 NewLoadBalancersPoolsOriginsIndex200Response() *LoadBalancersPoolsOriginsIndex200Response { + this := LoadBalancersPoolsOriginsIndex200Response{} + return &this +} + +// NewLoadBalancersPoolsOriginsIndex200ResponseWithDefaults instantiates a new LoadBalancersPoolsOriginsIndex200Response object +// This 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 NewLoadBalancersPoolsOriginsIndex200ResponseWithDefaults() *LoadBalancersPoolsOriginsIndex200Response { + this := LoadBalancersPoolsOriginsIndex200Response{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *LoadBalancersPoolsOriginsIndex200Response) GetData() []LoadBalancerOrigin { + if o == nil || IsNil(o.Data) { + var ret []LoadBalancerOrigin + return ret + } + return o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadBalancersPoolsOriginsIndex200Response) GetDataOk() ([]LoadBalancerOrigin, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *LoadBalancersPoolsOriginsIndex200Response) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given []LoadBalancerOrigin and assigns it to the Data field. +func (o *LoadBalancersPoolsOriginsIndex200Response) SetData(v []LoadBalancerOrigin) { + o.Data = v +} + +func (o LoadBalancersPoolsOriginsIndex200Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o LoadBalancersPoolsOriginsIndex200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + return toSerialize, nil +} + +type NullableLoadBalancersPoolsOriginsIndex200Response struct { + value *LoadBalancersPoolsOriginsIndex200Response + isSet bool +} + +func (v NullableLoadBalancersPoolsOriginsIndex200Response) Get() *LoadBalancersPoolsOriginsIndex200Response { + return v.value +} + +func (v *NullableLoadBalancersPoolsOriginsIndex200Response) Set(val *LoadBalancersPoolsOriginsIndex200Response) { + v.value = val + v.isSet = true +} + +func (v NullableLoadBalancersPoolsOriginsIndex200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableLoadBalancersPoolsOriginsIndex200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLoadBalancersPoolsOriginsIndex200Response(val *LoadBalancersPoolsOriginsIndex200Response) *NullableLoadBalancersPoolsOriginsIndex200Response { + return &NullableLoadBalancersPoolsOriginsIndex200Response{value: val, isSet: true} +} + +func (v NullableLoadBalancersPoolsOriginsIndex200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLoadBalancersPoolsOriginsIndex200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_load_balancers_regions_index_200_response.go b/model_load_balancers_regions_index_200_response.go new file mode 100644 index 0000000..9402bc6 --- /dev/null +++ b/model_load_balancers_regions_index_200_response.go @@ -0,0 +1,126 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the LoadBalancersRegionsIndex200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LoadBalancersRegionsIndex200Response{} + +// LoadBalancersRegionsIndex200Response struct for LoadBalancersRegionsIndex200Response +type LoadBalancersRegionsIndex200Response struct { + Data []LoadBalancerRegion `json:"data,omitempty"` +} + +// NewLoadBalancersRegionsIndex200Response instantiates a new LoadBalancersRegionsIndex200Response object +// This constructor will assign default values to properties that have it defined, +// 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 NewLoadBalancersRegionsIndex200Response() *LoadBalancersRegionsIndex200Response { + this := LoadBalancersRegionsIndex200Response{} + return &this +} + +// NewLoadBalancersRegionsIndex200ResponseWithDefaults instantiates a new LoadBalancersRegionsIndex200Response object +// This 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 NewLoadBalancersRegionsIndex200ResponseWithDefaults() *LoadBalancersRegionsIndex200Response { + this := LoadBalancersRegionsIndex200Response{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *LoadBalancersRegionsIndex200Response) GetData() []LoadBalancerRegion { + if o == nil || IsNil(o.Data) { + var ret []LoadBalancerRegion + return ret + } + return o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadBalancersRegionsIndex200Response) GetDataOk() ([]LoadBalancerRegion, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *LoadBalancersRegionsIndex200Response) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given []LoadBalancerRegion and assigns it to the Data field. +func (o *LoadBalancersRegionsIndex200Response) SetData(v []LoadBalancerRegion) { + o.Data = v +} + +func (o LoadBalancersRegionsIndex200Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o LoadBalancersRegionsIndex200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + return toSerialize, nil +} + +type NullableLoadBalancersRegionsIndex200Response struct { + value *LoadBalancersRegionsIndex200Response + isSet bool +} + +func (v NullableLoadBalancersRegionsIndex200Response) Get() *LoadBalancersRegionsIndex200Response { + return v.value +} + +func (v *NullableLoadBalancersRegionsIndex200Response) Set(val *LoadBalancersRegionsIndex200Response) { + v.value = val + v.isSet = true +} + +func (v NullableLoadBalancersRegionsIndex200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableLoadBalancersRegionsIndex200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLoadBalancersRegionsIndex200Response(val *LoadBalancersRegionsIndex200Response) *NullableLoadBalancersRegionsIndex200Response { + return &NullableLoadBalancersRegionsIndex200Response{value: val, isSet: true} +} + +func (v NullableLoadBalancersRegionsIndex200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLoadBalancersRegionsIndex200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_load_balancers_settings_update_200_response.go b/model_load_balancers_settings_update_200_response.go new file mode 100644 index 0000000..6123a49 --- /dev/null +++ b/model_load_balancers_settings_update_200_response.go @@ -0,0 +1,172 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the LoadBalancersSettingsUpdate200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LoadBalancersSettingsUpdate200Response{} + +// LoadBalancersSettingsUpdate200Response struct for LoadBalancersSettingsUpdate200Response +type LoadBalancersSettingsUpdate200Response struct { + Data *LoadBalancerSetting `json:"data,omitempty"` + Message NullableString `json:"message,omitempty"` +} + +// NewLoadBalancersSettingsUpdate200Response instantiates a new LoadBalancersSettingsUpdate200Response object +// This constructor will assign default values to properties that have it defined, +// 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 NewLoadBalancersSettingsUpdate200Response() *LoadBalancersSettingsUpdate200Response { + this := LoadBalancersSettingsUpdate200Response{} + return &this +} + +// NewLoadBalancersSettingsUpdate200ResponseWithDefaults instantiates a new LoadBalancersSettingsUpdate200Response object +// This 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 NewLoadBalancersSettingsUpdate200ResponseWithDefaults() *LoadBalancersSettingsUpdate200Response { + this := LoadBalancersSettingsUpdate200Response{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *LoadBalancersSettingsUpdate200Response) GetData() LoadBalancerSetting { + if o == nil || IsNil(o.Data) { + var ret LoadBalancerSetting + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadBalancersSettingsUpdate200Response) GetDataOk() (*LoadBalancerSetting, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *LoadBalancersSettingsUpdate200Response) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given LoadBalancerSetting and assigns it to the Data field. +func (o *LoadBalancersSettingsUpdate200Response) SetData(v LoadBalancerSetting) { + o.Data = &v +} + +// GetMessage returns the Message field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *LoadBalancersSettingsUpdate200Response) GetMessage() string { + if o == nil || IsNil(o.Message.Get()) { + var ret string + return ret + } + return *o.Message.Get() +} + +// GetMessageOk returns a tuple with the Message 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 *LoadBalancersSettingsUpdate200Response) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Message.Get(), o.Message.IsSet() +} + +// HasMessage returns a boolean if a field has been set. +func (o *LoadBalancersSettingsUpdate200Response) HasMessage() bool { + if o != nil && o.Message.IsSet() { + return true + } + + return false +} + +// SetMessage gets a reference to the given NullableString and assigns it to the Message field. +func (o *LoadBalancersSettingsUpdate200Response) SetMessage(v string) { + o.Message.Set(&v) +} +// SetMessageNil sets the value for Message to be an explicit nil +func (o *LoadBalancersSettingsUpdate200Response) SetMessageNil() { + o.Message.Set(nil) +} + +// UnsetMessage ensures that no value is present for Message, not even an explicit nil +func (o *LoadBalancersSettingsUpdate200Response) UnsetMessage() { + o.Message.Unset() +} + +func (o LoadBalancersSettingsUpdate200Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o LoadBalancersSettingsUpdate200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + if o.Message.IsSet() { + toSerialize["message"] = o.Message.Get() + } + return toSerialize, nil +} + +type NullableLoadBalancersSettingsUpdate200Response struct { + value *LoadBalancersSettingsUpdate200Response + isSet bool +} + +func (v NullableLoadBalancersSettingsUpdate200Response) Get() *LoadBalancersSettingsUpdate200Response { + return v.value +} + +func (v *NullableLoadBalancersSettingsUpdate200Response) Set(val *LoadBalancersSettingsUpdate200Response) { + v.value = val + v.isSet = true +} + +func (v NullableLoadBalancersSettingsUpdate200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableLoadBalancersSettingsUpdate200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLoadBalancersSettingsUpdate200Response(val *LoadBalancersSettingsUpdate200Response) *NullableLoadBalancersSettingsUpdate200Response { + return &NullableLoadBalancersSettingsUpdate200Response{value: val, isSet: true} +} + +func (v NullableLoadBalancersSettingsUpdate200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLoadBalancersSettingsUpdate200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_log_forwarder.go b/model_log_forwarder.go new file mode 100644 index 0000000..530d1ee --- /dev/null +++ b/model_log_forwarder.go @@ -0,0 +1,279 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the LogForwarder type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LogForwarder{} + +// LogForwarder struct for LogForwarder +type LogForwarder struct { + Name string `json:"name"` + Description string `json:"description"` + Type string `json:"type"` + ConnectionType string `json:"connection_type"` + DataFormat LogForwarderDataFormat `json:"data_format"` + Settings LogForwarderSetting `json:"settings"` + Status bool `json:"status"` +} + +// NewLogForwarder instantiates a new LogForwarder object +// This constructor will assign default values to properties that have it defined, +// 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 NewLogForwarder(name string, description string, type_ string, connectionType string, dataFormat LogForwarderDataFormat, settings LogForwarderSetting, status bool) *LogForwarder { + this := LogForwarder{} + this.Name = name + this.Description = description + this.Type = type_ + this.ConnectionType = connectionType + this.DataFormat = dataFormat + this.Settings = settings + this.Status = status + return &this +} + +// NewLogForwarderWithDefaults instantiates a new LogForwarder object +// This 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 NewLogForwarderWithDefaults() *LogForwarder { + this := LogForwarder{} + return &this +} + +// GetName returns the Name field value +func (o *LogForwarder) 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 *LogForwarder) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *LogForwarder) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value +func (o *LogForwarder) 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 *LogForwarder) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Description, true +} + +// SetDescription sets field value +func (o *LogForwarder) SetDescription(v string) { + o.Description = v +} + +// GetType returns the Type field value +func (o *LogForwarder) 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 *LogForwarder) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *LogForwarder) SetType(v string) { + o.Type = v +} + +// GetConnectionType returns the ConnectionType field value +func (o *LogForwarder) GetConnectionType() string { + if o == nil { + var ret string + return ret + } + + return o.ConnectionType +} + +// GetConnectionTypeOk returns a tuple with the ConnectionType field value +// and a boolean to check if the value has been set. +func (o *LogForwarder) GetConnectionTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ConnectionType, true +} + +// SetConnectionType sets field value +func (o *LogForwarder) SetConnectionType(v string) { + o.ConnectionType = v +} + +// GetDataFormat returns the DataFormat field value +func (o *LogForwarder) GetDataFormat() LogForwarderDataFormat { + if o == nil { + var ret LogForwarderDataFormat + return ret + } + + return o.DataFormat +} + +// GetDataFormatOk returns a tuple with the DataFormat field value +// and a boolean to check if the value has been set. +func (o *LogForwarder) GetDataFormatOk() (*LogForwarderDataFormat, bool) { + if o == nil { + return nil, false + } + return &o.DataFormat, true +} + +// SetDataFormat sets field value +func (o *LogForwarder) SetDataFormat(v LogForwarderDataFormat) { + o.DataFormat = v +} + +// GetSettings returns the Settings field value +func (o *LogForwarder) GetSettings() LogForwarderSetting { + if o == nil { + var ret LogForwarderSetting + return ret + } + + return o.Settings +} + +// GetSettingsOk returns a tuple with the Settings field value +// and a boolean to check if the value has been set. +func (o *LogForwarder) GetSettingsOk() (*LogForwarderSetting, bool) { + if o == nil { + return nil, false + } + return &o.Settings, true +} + +// SetSettings sets field value +func (o *LogForwarder) SetSettings(v LogForwarderSetting) { + o.Settings = v +} + +// GetStatus returns the Status field value +func (o *LogForwarder) GetStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *LogForwarder) GetStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *LogForwarder) SetStatus(v bool) { + o.Status = v +} + +func (o LogForwarder) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o LogForwarder) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + toSerialize["description"] = o.Description + toSerialize["type"] = o.Type + toSerialize["connection_type"] = o.ConnectionType + toSerialize["data_format"] = o.DataFormat + toSerialize["settings"] = o.Settings + toSerialize["status"] = o.Status + return toSerialize, nil +} + +type NullableLogForwarder struct { + value *LogForwarder + isSet bool +} + +func (v NullableLogForwarder) Get() *LogForwarder { + return v.value +} + +func (v *NullableLogForwarder) Set(val *LogForwarder) { + v.value = val + v.isSet = true +} + +func (v NullableLogForwarder) IsSet() bool { + return v.isSet +} + +func (v *NullableLogForwarder) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLogForwarder(val *LogForwarder) *NullableLogForwarder { + return &NullableLogForwarder{value: val, isSet: true} +} + +func (v NullableLogForwarder) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLogForwarder) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_log_forwarder_access_log_type.go b/model_log_forwarder_access_log_type.go new file mode 100644 index 0000000..6824660 --- /dev/null +++ b/model_log_forwarder_access_log_type.go @@ -0,0 +1,738 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the LogForwarderAccessLogType type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LogForwarderAccessLogType{} + +// LogForwarderAccessLogType Access log type +type LogForwarderAccessLogType struct { + Method *bool `json:"method,omitempty"` + Scheme *bool `json:"scheme,omitempty"` + Domain *bool `json:"domain,omitempty"` + Uri *bool `json:"uri,omitempty"` + QueryString *bool `json:"query_string,omitempty"` + Referer *bool `json:"referer,omitempty"` + Ip *bool `json:"ip,omitempty"` + Ua *bool `json:"ua,omitempty"` + Country *bool `json:"country,omitempty"` + Asn *bool `json:"asn,omitempty"` + ContentType *bool `json:"content_type,omitempty"` + Status *bool `json:"status,omitempty"` + ServerPort *bool `json:"server_port,omitempty"` + BytesSent *bool `json:"bytes_sent,omitempty"` + BytesReceived *bool `json:"bytes_received,omitempty"` + UpstreamTime *bool `json:"upstream_time,omitempty"` + Cache *bool `json:"cache,omitempty"` + RequestId *bool `json:"request_id,omitempty"` +} + +// NewLogForwarderAccessLogType instantiates a new LogForwarderAccessLogType object +// This constructor will assign default values to properties that have it defined, +// 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 NewLogForwarderAccessLogType() *LogForwarderAccessLogType { + this := LogForwarderAccessLogType{} + return &this +} + +// NewLogForwarderAccessLogTypeWithDefaults instantiates a new LogForwarderAccessLogType object +// This 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 NewLogForwarderAccessLogTypeWithDefaults() *LogForwarderAccessLogType { + this := LogForwarderAccessLogType{} + return &this +} + +// GetMethod returns the Method field value if set, zero value otherwise. +func (o *LogForwarderAccessLogType) GetMethod() bool { + if o == nil || IsNil(o.Method) { + var ret bool + return ret + } + return *o.Method +} + +// GetMethodOk returns a tuple with the Method field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LogForwarderAccessLogType) GetMethodOk() (*bool, bool) { + if o == nil || IsNil(o.Method) { + return nil, false + } + return o.Method, true +} + +// HasMethod returns a boolean if a field has been set. +func (o *LogForwarderAccessLogType) HasMethod() bool { + if o != nil && !IsNil(o.Method) { + return true + } + + return false +} + +// SetMethod gets a reference to the given bool and assigns it to the Method field. +func (o *LogForwarderAccessLogType) SetMethod(v bool) { + o.Method = &v +} + +// GetScheme returns the Scheme field value if set, zero value otherwise. +func (o *LogForwarderAccessLogType) GetScheme() bool { + if o == nil || IsNil(o.Scheme) { + var ret bool + return ret + } + return *o.Scheme +} + +// GetSchemeOk returns a tuple with the Scheme field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LogForwarderAccessLogType) GetSchemeOk() (*bool, bool) { + if o == nil || IsNil(o.Scheme) { + return nil, false + } + return o.Scheme, true +} + +// HasScheme returns a boolean if a field has been set. +func (o *LogForwarderAccessLogType) HasScheme() bool { + if o != nil && !IsNil(o.Scheme) { + return true + } + + return false +} + +// SetScheme gets a reference to the given bool and assigns it to the Scheme field. +func (o *LogForwarderAccessLogType) SetScheme(v bool) { + o.Scheme = &v +} + +// GetDomain returns the Domain field value if set, zero value otherwise. +func (o *LogForwarderAccessLogType) GetDomain() bool { + if o == nil || IsNil(o.Domain) { + var ret bool + return ret + } + return *o.Domain +} + +// GetDomainOk returns a tuple with the Domain field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LogForwarderAccessLogType) GetDomainOk() (*bool, bool) { + if o == nil || IsNil(o.Domain) { + return nil, false + } + return o.Domain, true +} + +// HasDomain returns a boolean if a field has been set. +func (o *LogForwarderAccessLogType) HasDomain() bool { + if o != nil && !IsNil(o.Domain) { + return true + } + + return false +} + +// SetDomain gets a reference to the given bool and assigns it to the Domain field. +func (o *LogForwarderAccessLogType) SetDomain(v bool) { + o.Domain = &v +} + +// GetUri returns the Uri field value if set, zero value otherwise. +func (o *LogForwarderAccessLogType) GetUri() bool { + if o == nil || IsNil(o.Uri) { + var ret bool + return ret + } + return *o.Uri +} + +// GetUriOk returns a tuple with the Uri field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LogForwarderAccessLogType) GetUriOk() (*bool, bool) { + if o == nil || IsNil(o.Uri) { + return nil, false + } + return o.Uri, true +} + +// HasUri returns a boolean if a field has been set. +func (o *LogForwarderAccessLogType) HasUri() bool { + if o != nil && !IsNil(o.Uri) { + return true + } + + return false +} + +// SetUri gets a reference to the given bool and assigns it to the Uri field. +func (o *LogForwarderAccessLogType) SetUri(v bool) { + o.Uri = &v +} + +// GetQueryString returns the QueryString field value if set, zero value otherwise. +func (o *LogForwarderAccessLogType) GetQueryString() bool { + if o == nil || IsNil(o.QueryString) { + var ret bool + return ret + } + return *o.QueryString +} + +// GetQueryStringOk returns a tuple with the QueryString field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LogForwarderAccessLogType) GetQueryStringOk() (*bool, bool) { + if o == nil || IsNil(o.QueryString) { + return nil, false + } + return o.QueryString, true +} + +// HasQueryString returns a boolean if a field has been set. +func (o *LogForwarderAccessLogType) HasQueryString() bool { + if o != nil && !IsNil(o.QueryString) { + return true + } + + return false +} + +// SetQueryString gets a reference to the given bool and assigns it to the QueryString field. +func (o *LogForwarderAccessLogType) SetQueryString(v bool) { + o.QueryString = &v +} + +// GetReferer returns the Referer field value if set, zero value otherwise. +func (o *LogForwarderAccessLogType) GetReferer() bool { + if o == nil || IsNil(o.Referer) { + var ret bool + return ret + } + return *o.Referer +} + +// GetRefererOk returns a tuple with the Referer field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LogForwarderAccessLogType) GetRefererOk() (*bool, bool) { + if o == nil || IsNil(o.Referer) { + return nil, false + } + return o.Referer, true +} + +// HasReferer returns a boolean if a field has been set. +func (o *LogForwarderAccessLogType) HasReferer() bool { + if o != nil && !IsNil(o.Referer) { + return true + } + + return false +} + +// SetReferer gets a reference to the given bool and assigns it to the Referer field. +func (o *LogForwarderAccessLogType) SetReferer(v bool) { + o.Referer = &v +} + +// GetIp returns the Ip field value if set, zero value otherwise. +func (o *LogForwarderAccessLogType) GetIp() bool { + if o == nil || IsNil(o.Ip) { + var ret bool + return ret + } + return *o.Ip +} + +// GetIpOk returns a tuple with the Ip field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LogForwarderAccessLogType) GetIpOk() (*bool, bool) { + if o == nil || IsNil(o.Ip) { + return nil, false + } + return o.Ip, true +} + +// HasIp returns a boolean if a field has been set. +func (o *LogForwarderAccessLogType) HasIp() bool { + if o != nil && !IsNil(o.Ip) { + return true + } + + return false +} + +// SetIp gets a reference to the given bool and assigns it to the Ip field. +func (o *LogForwarderAccessLogType) SetIp(v bool) { + o.Ip = &v +} + +// GetUa returns the Ua field value if set, zero value otherwise. +func (o *LogForwarderAccessLogType) GetUa() bool { + if o == nil || IsNil(o.Ua) { + var ret bool + return ret + } + return *o.Ua +} + +// GetUaOk returns a tuple with the Ua field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LogForwarderAccessLogType) GetUaOk() (*bool, bool) { + if o == nil || IsNil(o.Ua) { + return nil, false + } + return o.Ua, true +} + +// HasUa returns a boolean if a field has been set. +func (o *LogForwarderAccessLogType) HasUa() bool { + if o != nil && !IsNil(o.Ua) { + return true + } + + return false +} + +// SetUa gets a reference to the given bool and assigns it to the Ua field. +func (o *LogForwarderAccessLogType) SetUa(v bool) { + o.Ua = &v +} + +// GetCountry returns the Country field value if set, zero value otherwise. +func (o *LogForwarderAccessLogType) GetCountry() bool { + if o == nil || IsNil(o.Country) { + var ret bool + return ret + } + return *o.Country +} + +// GetCountryOk returns a tuple with the Country field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LogForwarderAccessLogType) GetCountryOk() (*bool, bool) { + if o == nil || IsNil(o.Country) { + return nil, false + } + return o.Country, true +} + +// HasCountry returns a boolean if a field has been set. +func (o *LogForwarderAccessLogType) HasCountry() bool { + if o != nil && !IsNil(o.Country) { + return true + } + + return false +} + +// SetCountry gets a reference to the given bool and assigns it to the Country field. +func (o *LogForwarderAccessLogType) SetCountry(v bool) { + o.Country = &v +} + +// GetAsn returns the Asn field value if set, zero value otherwise. +func (o *LogForwarderAccessLogType) GetAsn() bool { + if o == nil || IsNil(o.Asn) { + var ret bool + return ret + } + return *o.Asn +} + +// GetAsnOk returns a tuple with the Asn field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LogForwarderAccessLogType) GetAsnOk() (*bool, bool) { + if o == nil || IsNil(o.Asn) { + return nil, false + } + return o.Asn, true +} + +// HasAsn returns a boolean if a field has been set. +func (o *LogForwarderAccessLogType) HasAsn() bool { + if o != nil && !IsNil(o.Asn) { + return true + } + + return false +} + +// SetAsn gets a reference to the given bool and assigns it to the Asn field. +func (o *LogForwarderAccessLogType) SetAsn(v bool) { + o.Asn = &v +} + +// GetContentType returns the ContentType field value if set, zero value otherwise. +func (o *LogForwarderAccessLogType) GetContentType() bool { + if o == nil || IsNil(o.ContentType) { + var ret bool + return ret + } + return *o.ContentType +} + +// GetContentTypeOk returns a tuple with the ContentType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LogForwarderAccessLogType) GetContentTypeOk() (*bool, bool) { + if o == nil || IsNil(o.ContentType) { + return nil, false + } + return o.ContentType, true +} + +// HasContentType returns a boolean if a field has been set. +func (o *LogForwarderAccessLogType) HasContentType() bool { + if o != nil && !IsNil(o.ContentType) { + return true + } + + return false +} + +// SetContentType gets a reference to the given bool and assigns it to the ContentType field. +func (o *LogForwarderAccessLogType) SetContentType(v bool) { + o.ContentType = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *LogForwarderAccessLogType) GetStatus() bool { + if o == nil || IsNil(o.Status) { + var ret bool + 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 *LogForwarderAccessLogType) GetStatusOk() (*bool, 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 *LogForwarderAccessLogType) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given bool and assigns it to the Status field. +func (o *LogForwarderAccessLogType) SetStatus(v bool) { + o.Status = &v +} + +// GetServerPort returns the ServerPort field value if set, zero value otherwise. +func (o *LogForwarderAccessLogType) GetServerPort() bool { + if o == nil || IsNil(o.ServerPort) { + var ret bool + return ret + } + return *o.ServerPort +} + +// GetServerPortOk returns a tuple with the ServerPort field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LogForwarderAccessLogType) GetServerPortOk() (*bool, bool) { + if o == nil || IsNil(o.ServerPort) { + return nil, false + } + return o.ServerPort, true +} + +// HasServerPort returns a boolean if a field has been set. +func (o *LogForwarderAccessLogType) HasServerPort() bool { + if o != nil && !IsNil(o.ServerPort) { + return true + } + + return false +} + +// SetServerPort gets a reference to the given bool and assigns it to the ServerPort field. +func (o *LogForwarderAccessLogType) SetServerPort(v bool) { + o.ServerPort = &v +} + +// GetBytesSent returns the BytesSent field value if set, zero value otherwise. +func (o *LogForwarderAccessLogType) GetBytesSent() bool { + if o == nil || IsNil(o.BytesSent) { + var ret bool + return ret + } + return *o.BytesSent +} + +// GetBytesSentOk returns a tuple with the BytesSent field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LogForwarderAccessLogType) GetBytesSentOk() (*bool, bool) { + if o == nil || IsNil(o.BytesSent) { + return nil, false + } + return o.BytesSent, true +} + +// HasBytesSent returns a boolean if a field has been set. +func (o *LogForwarderAccessLogType) HasBytesSent() bool { + if o != nil && !IsNil(o.BytesSent) { + return true + } + + return false +} + +// SetBytesSent gets a reference to the given bool and assigns it to the BytesSent field. +func (o *LogForwarderAccessLogType) SetBytesSent(v bool) { + o.BytesSent = &v +} + +// GetBytesReceived returns the BytesReceived field value if set, zero value otherwise. +func (o *LogForwarderAccessLogType) GetBytesReceived() bool { + if o == nil || IsNil(o.BytesReceived) { + var ret bool + return ret + } + return *o.BytesReceived +} + +// GetBytesReceivedOk returns a tuple with the BytesReceived field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LogForwarderAccessLogType) GetBytesReceivedOk() (*bool, bool) { + if o == nil || IsNil(o.BytesReceived) { + return nil, false + } + return o.BytesReceived, true +} + +// HasBytesReceived returns a boolean if a field has been set. +func (o *LogForwarderAccessLogType) HasBytesReceived() bool { + if o != nil && !IsNil(o.BytesReceived) { + return true + } + + return false +} + +// SetBytesReceived gets a reference to the given bool and assigns it to the BytesReceived field. +func (o *LogForwarderAccessLogType) SetBytesReceived(v bool) { + o.BytesReceived = &v +} + +// GetUpstreamTime returns the UpstreamTime field value if set, zero value otherwise. +func (o *LogForwarderAccessLogType) GetUpstreamTime() bool { + if o == nil || IsNil(o.UpstreamTime) { + var ret bool + return ret + } + return *o.UpstreamTime +} + +// GetUpstreamTimeOk returns a tuple with the UpstreamTime field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LogForwarderAccessLogType) GetUpstreamTimeOk() (*bool, bool) { + if o == nil || IsNil(o.UpstreamTime) { + return nil, false + } + return o.UpstreamTime, true +} + +// HasUpstreamTime returns a boolean if a field has been set. +func (o *LogForwarderAccessLogType) HasUpstreamTime() bool { + if o != nil && !IsNil(o.UpstreamTime) { + return true + } + + return false +} + +// SetUpstreamTime gets a reference to the given bool and assigns it to the UpstreamTime field. +func (o *LogForwarderAccessLogType) SetUpstreamTime(v bool) { + o.UpstreamTime = &v +} + +// GetCache returns the Cache field value if set, zero value otherwise. +func (o *LogForwarderAccessLogType) GetCache() bool { + if o == nil || IsNil(o.Cache) { + var ret bool + return ret + } + return *o.Cache +} + +// GetCacheOk returns a tuple with the Cache field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LogForwarderAccessLogType) GetCacheOk() (*bool, bool) { + if o == nil || IsNil(o.Cache) { + return nil, false + } + return o.Cache, true +} + +// HasCache returns a boolean if a field has been set. +func (o *LogForwarderAccessLogType) HasCache() bool { + if o != nil && !IsNil(o.Cache) { + return true + } + + return false +} + +// SetCache gets a reference to the given bool and assigns it to the Cache field. +func (o *LogForwarderAccessLogType) SetCache(v bool) { + o.Cache = &v +} + +// GetRequestId returns the RequestId field value if set, zero value otherwise. +func (o *LogForwarderAccessLogType) GetRequestId() bool { + if o == nil || IsNil(o.RequestId) { + var ret bool + return ret + } + return *o.RequestId +} + +// GetRequestIdOk returns a tuple with the RequestId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LogForwarderAccessLogType) GetRequestIdOk() (*bool, bool) { + if o == nil || IsNil(o.RequestId) { + return nil, false + } + return o.RequestId, true +} + +// HasRequestId returns a boolean if a field has been set. +func (o *LogForwarderAccessLogType) HasRequestId() bool { + if o != nil && !IsNil(o.RequestId) { + return true + } + + return false +} + +// SetRequestId gets a reference to the given bool and assigns it to the RequestId field. +func (o *LogForwarderAccessLogType) SetRequestId(v bool) { + o.RequestId = &v +} + +func (o LogForwarderAccessLogType) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o LogForwarderAccessLogType) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Method) { + toSerialize["method"] = o.Method + } + if !IsNil(o.Scheme) { + toSerialize["scheme"] = o.Scheme + } + if !IsNil(o.Domain) { + toSerialize["domain"] = o.Domain + } + if !IsNil(o.Uri) { + toSerialize["uri"] = o.Uri + } + if !IsNil(o.QueryString) { + toSerialize["query_string"] = o.QueryString + } + if !IsNil(o.Referer) { + toSerialize["referer"] = o.Referer + } + if !IsNil(o.Ip) { + toSerialize["ip"] = o.Ip + } + if !IsNil(o.Ua) { + toSerialize["ua"] = o.Ua + } + if !IsNil(o.Country) { + toSerialize["country"] = o.Country + } + if !IsNil(o.Asn) { + toSerialize["asn"] = o.Asn + } + if !IsNil(o.ContentType) { + toSerialize["content_type"] = o.ContentType + } + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + if !IsNil(o.ServerPort) { + toSerialize["server_port"] = o.ServerPort + } + if !IsNil(o.BytesSent) { + toSerialize["bytes_sent"] = o.BytesSent + } + if !IsNil(o.BytesReceived) { + toSerialize["bytes_received"] = o.BytesReceived + } + if !IsNil(o.UpstreamTime) { + toSerialize["upstream_time"] = o.UpstreamTime + } + if !IsNil(o.Cache) { + toSerialize["cache"] = o.Cache + } + if !IsNil(o.RequestId) { + toSerialize["request_id"] = o.RequestId + } + return toSerialize, nil +} + +type NullableLogForwarderAccessLogType struct { + value *LogForwarderAccessLogType + isSet bool +} + +func (v NullableLogForwarderAccessLogType) Get() *LogForwarderAccessLogType { + return v.value +} + +func (v *NullableLogForwarderAccessLogType) Set(val *LogForwarderAccessLogType) { + v.value = val + v.isSet = true +} + +func (v NullableLogForwarderAccessLogType) IsSet() bool { + return v.isSet +} + +func (v *NullableLogForwarderAccessLogType) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLogForwarderAccessLogType(val *LogForwarderAccessLogType) *NullableLogForwarderAccessLogType { + return &NullableLogForwarderAccessLogType{value: val, isSet: true} +} + +func (v NullableLogForwarderAccessLogType) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLogForwarderAccessLogType) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_log_forwarder_data_format.go b/model_log_forwarder_data_format.go new file mode 100644 index 0000000..67aa85d --- /dev/null +++ b/model_log_forwarder_data_format.go @@ -0,0 +1,208 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" + "fmt" +) + +// LogForwarderDataFormat - struct for LogForwarderDataFormat +type LogForwarderDataFormat struct { + LogForwarderAccessLogType *LogForwarderAccessLogType + LogForwarderDNSType *LogForwarderDNSType + LogForwarderErrorType *LogForwarderErrorType + LogForwarderWAFType *LogForwarderWAFType +} + +// LogForwarderAccessLogTypeAsLogForwarderDataFormat is a convenience function that returns LogForwarderAccessLogType wrapped in LogForwarderDataFormat +func LogForwarderAccessLogTypeAsLogForwarderDataFormat(v *LogForwarderAccessLogType) LogForwarderDataFormat { + return LogForwarderDataFormat{ + LogForwarderAccessLogType: v, + } +} + +// LogForwarderDNSTypeAsLogForwarderDataFormat is a convenience function that returns LogForwarderDNSType wrapped in LogForwarderDataFormat +func LogForwarderDNSTypeAsLogForwarderDataFormat(v *LogForwarderDNSType) LogForwarderDataFormat { + return LogForwarderDataFormat{ + LogForwarderDNSType: v, + } +} + +// LogForwarderErrorTypeAsLogForwarderDataFormat is a convenience function that returns LogForwarderErrorType wrapped in LogForwarderDataFormat +func LogForwarderErrorTypeAsLogForwarderDataFormat(v *LogForwarderErrorType) LogForwarderDataFormat { + return LogForwarderDataFormat{ + LogForwarderErrorType: v, + } +} + +// LogForwarderWAFTypeAsLogForwarderDataFormat is a convenience function that returns LogForwarderWAFType wrapped in LogForwarderDataFormat +func LogForwarderWAFTypeAsLogForwarderDataFormat(v *LogForwarderWAFType) LogForwarderDataFormat { + return LogForwarderDataFormat{ + LogForwarderWAFType: v, + } +} + + +// Unmarshal JSON data into one of the pointers in the struct +func (dst *LogForwarderDataFormat) UnmarshalJSON(data []byte) error { + var err error + match := 0 + // try to unmarshal data into LogForwarderAccessLogType + err = newStrictDecoder(data).Decode(&dst.LogForwarderAccessLogType) + if err == nil { + jsonLogForwarderAccessLogType, _ := json.Marshal(dst.LogForwarderAccessLogType) + if string(jsonLogForwarderAccessLogType) == "{}" { // empty struct + dst.LogForwarderAccessLogType = nil + } else { + match++ + } + } else { + dst.LogForwarderAccessLogType = nil + } + + // try to unmarshal data into LogForwarderDNSType + err = newStrictDecoder(data).Decode(&dst.LogForwarderDNSType) + if err == nil { + jsonLogForwarderDNSType, _ := json.Marshal(dst.LogForwarderDNSType) + if string(jsonLogForwarderDNSType) == "{}" { // empty struct + dst.LogForwarderDNSType = nil + } else { + match++ + } + } else { + dst.LogForwarderDNSType = nil + } + + // try to unmarshal data into LogForwarderErrorType + err = newStrictDecoder(data).Decode(&dst.LogForwarderErrorType) + if err == nil { + jsonLogForwarderErrorType, _ := json.Marshal(dst.LogForwarderErrorType) + if string(jsonLogForwarderErrorType) == "{}" { // empty struct + dst.LogForwarderErrorType = nil + } else { + match++ + } + } else { + dst.LogForwarderErrorType = nil + } + + // try to unmarshal data into LogForwarderWAFType + err = newStrictDecoder(data).Decode(&dst.LogForwarderWAFType) + if err == nil { + jsonLogForwarderWAFType, _ := json.Marshal(dst.LogForwarderWAFType) + if string(jsonLogForwarderWAFType) == "{}" { // empty struct + dst.LogForwarderWAFType = nil + } else { + match++ + } + } else { + dst.LogForwarderWAFType = nil + } + + if match > 1 { // more than 1 match + // reset to nil + dst.LogForwarderAccessLogType = nil + dst.LogForwarderDNSType = nil + dst.LogForwarderErrorType = nil + dst.LogForwarderWAFType = nil + + return fmt.Errorf("data matches more than one schema in oneOf(LogForwarderDataFormat)") + } else if match == 1 { + return nil // exactly one match + } else { // no match + return fmt.Errorf("data failed to match schemas in oneOf(LogForwarderDataFormat)") + } +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src LogForwarderDataFormat) MarshalJSON() ([]byte, error) { + if src.LogForwarderAccessLogType != nil { + return json.Marshal(&src.LogForwarderAccessLogType) + } + + if src.LogForwarderDNSType != nil { + return json.Marshal(&src.LogForwarderDNSType) + } + + if src.LogForwarderErrorType != nil { + return json.Marshal(&src.LogForwarderErrorType) + } + + if src.LogForwarderWAFType != nil { + return json.Marshal(&src.LogForwarderWAFType) + } + + return nil, nil // no data in oneOf schemas +} + +// Get the actual instance +func (obj *LogForwarderDataFormat) GetActualInstance() (interface{}) { + if obj == nil { + return nil + } + if obj.LogForwarderAccessLogType != nil { + return obj.LogForwarderAccessLogType + } + + if obj.LogForwarderDNSType != nil { + return obj.LogForwarderDNSType + } + + if obj.LogForwarderErrorType != nil { + return obj.LogForwarderErrorType + } + + if obj.LogForwarderWAFType != nil { + return obj.LogForwarderWAFType + } + + // all schemas are nil + return nil +} + +type NullableLogForwarderDataFormat struct { + value *LogForwarderDataFormat + isSet bool +} + +func (v NullableLogForwarderDataFormat) Get() *LogForwarderDataFormat { + return v.value +} + +func (v *NullableLogForwarderDataFormat) Set(val *LogForwarderDataFormat) { + v.value = val + v.isSet = true +} + +func (v NullableLogForwarderDataFormat) IsSet() bool { + return v.isSet +} + +func (v *NullableLogForwarderDataFormat) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLogForwarderDataFormat(val *LogForwarderDataFormat) *NullableLogForwarderDataFormat { + return &NullableLogForwarderDataFormat{value: val, isSet: true} +} + +func (v NullableLogForwarderDataFormat) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLogForwarderDataFormat) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_log_forwarder_datadog_connection_type.go b/model_log_forwarder_datadog_connection_type.go new file mode 100644 index 0000000..ab53fc8 --- /dev/null +++ b/model_log_forwarder_datadog_connection_type.go @@ -0,0 +1,306 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the LogForwarderDatadogConnectionType type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LogForwarderDatadogConnectionType{} + +// LogForwarderDatadogConnectionType Datadog connection +type LogForwarderDatadogConnectionType struct { + SampleRate *int32 `json:"sample_rate,omitempty"` + Url *string `json:"url,omitempty"` + ApiKey *string `json:"api_key,omitempty"` + AppKey *string `json:"app_key,omitempty"` + FlushInterval *int32 `json:"flush_interval,omitempty"` + BufferSize *int32 `json:"buffer_size,omitempty"` +} + +// NewLogForwarderDatadogConnectionType instantiates a new LogForwarderDatadogConnectionType object +// This constructor will assign default values to properties that have it defined, +// 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 NewLogForwarderDatadogConnectionType() *LogForwarderDatadogConnectionType { + this := LogForwarderDatadogConnectionType{} + return &this +} + +// NewLogForwarderDatadogConnectionTypeWithDefaults instantiates a new LogForwarderDatadogConnectionType object +// This 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 NewLogForwarderDatadogConnectionTypeWithDefaults() *LogForwarderDatadogConnectionType { + this := LogForwarderDatadogConnectionType{} + return &this +} + +// GetSampleRate returns the SampleRate field value if set, zero value otherwise. +func (o *LogForwarderDatadogConnectionType) GetSampleRate() int32 { + if o == nil || IsNil(o.SampleRate) { + var ret int32 + return ret + } + return *o.SampleRate +} + +// GetSampleRateOk returns a tuple with the SampleRate field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LogForwarderDatadogConnectionType) GetSampleRateOk() (*int32, bool) { + if o == nil || IsNil(o.SampleRate) { + return nil, false + } + return o.SampleRate, true +} + +// HasSampleRate returns a boolean if a field has been set. +func (o *LogForwarderDatadogConnectionType) HasSampleRate() bool { + if o != nil && !IsNil(o.SampleRate) { + return true + } + + return false +} + +// SetSampleRate gets a reference to the given int32 and assigns it to the SampleRate field. +func (o *LogForwarderDatadogConnectionType) SetSampleRate(v int32) { + o.SampleRate = &v +} + +// GetUrl returns the Url field value if set, zero value otherwise. +func (o *LogForwarderDatadogConnectionType) GetUrl() string { + if o == nil || IsNil(o.Url) { + var ret string + return ret + } + return *o.Url +} + +// GetUrlOk returns a tuple with the Url field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LogForwarderDatadogConnectionType) GetUrlOk() (*string, bool) { + if o == nil || IsNil(o.Url) { + return nil, false + } + return o.Url, true +} + +// HasUrl returns a boolean if a field has been set. +func (o *LogForwarderDatadogConnectionType) HasUrl() bool { + if o != nil && !IsNil(o.Url) { + return true + } + + return false +} + +// SetUrl gets a reference to the given string and assigns it to the Url field. +func (o *LogForwarderDatadogConnectionType) SetUrl(v string) { + o.Url = &v +} + +// GetApiKey returns the ApiKey field value if set, zero value otherwise. +func (o *LogForwarderDatadogConnectionType) 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 *LogForwarderDatadogConnectionType) 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 *LogForwarderDatadogConnectionType) 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 *LogForwarderDatadogConnectionType) SetApiKey(v string) { + o.ApiKey = &v +} + +// GetAppKey returns the AppKey field value if set, zero value otherwise. +func (o *LogForwarderDatadogConnectionType) GetAppKey() string { + if o == nil || IsNil(o.AppKey) { + var ret string + return ret + } + return *o.AppKey +} + +// GetAppKeyOk returns a tuple with the AppKey field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LogForwarderDatadogConnectionType) GetAppKeyOk() (*string, bool) { + if o == nil || IsNil(o.AppKey) { + return nil, false + } + return o.AppKey, true +} + +// HasAppKey returns a boolean if a field has been set. +func (o *LogForwarderDatadogConnectionType) HasAppKey() bool { + if o != nil && !IsNil(o.AppKey) { + return true + } + + return false +} + +// SetAppKey gets a reference to the given string and assigns it to the AppKey field. +func (o *LogForwarderDatadogConnectionType) SetAppKey(v string) { + o.AppKey = &v +} + +// GetFlushInterval returns the FlushInterval field value if set, zero value otherwise. +func (o *LogForwarderDatadogConnectionType) GetFlushInterval() int32 { + if o == nil || IsNil(o.FlushInterval) { + var ret int32 + return ret + } + return *o.FlushInterval +} + +// GetFlushIntervalOk returns a tuple with the FlushInterval field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LogForwarderDatadogConnectionType) GetFlushIntervalOk() (*int32, bool) { + if o == nil || IsNil(o.FlushInterval) { + return nil, false + } + return o.FlushInterval, true +} + +// HasFlushInterval returns a boolean if a field has been set. +func (o *LogForwarderDatadogConnectionType) HasFlushInterval() bool { + if o != nil && !IsNil(o.FlushInterval) { + return true + } + + return false +} + +// SetFlushInterval gets a reference to the given int32 and assigns it to the FlushInterval field. +func (o *LogForwarderDatadogConnectionType) SetFlushInterval(v int32) { + o.FlushInterval = &v +} + +// GetBufferSize returns the BufferSize field value if set, zero value otherwise. +func (o *LogForwarderDatadogConnectionType) GetBufferSize() int32 { + if o == nil || IsNil(o.BufferSize) { + var ret int32 + return ret + } + return *o.BufferSize +} + +// GetBufferSizeOk returns a tuple with the BufferSize field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LogForwarderDatadogConnectionType) GetBufferSizeOk() (*int32, bool) { + if o == nil || IsNil(o.BufferSize) { + return nil, false + } + return o.BufferSize, true +} + +// HasBufferSize returns a boolean if a field has been set. +func (o *LogForwarderDatadogConnectionType) HasBufferSize() bool { + if o != nil && !IsNil(o.BufferSize) { + return true + } + + return false +} + +// SetBufferSize gets a reference to the given int32 and assigns it to the BufferSize field. +func (o *LogForwarderDatadogConnectionType) SetBufferSize(v int32) { + o.BufferSize = &v +} + +func (o LogForwarderDatadogConnectionType) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o LogForwarderDatadogConnectionType) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.SampleRate) { + toSerialize["sample_rate"] = o.SampleRate + } + if !IsNil(o.Url) { + toSerialize["url"] = o.Url + } + if !IsNil(o.ApiKey) { + toSerialize["api_key"] = o.ApiKey + } + if !IsNil(o.AppKey) { + toSerialize["app_key"] = o.AppKey + } + if !IsNil(o.FlushInterval) { + toSerialize["flush_interval"] = o.FlushInterval + } + if !IsNil(o.BufferSize) { + toSerialize["buffer_size"] = o.BufferSize + } + return toSerialize, nil +} + +type NullableLogForwarderDatadogConnectionType struct { + value *LogForwarderDatadogConnectionType + isSet bool +} + +func (v NullableLogForwarderDatadogConnectionType) Get() *LogForwarderDatadogConnectionType { + return v.value +} + +func (v *NullableLogForwarderDatadogConnectionType) Set(val *LogForwarderDatadogConnectionType) { + v.value = val + v.isSet = true +} + +func (v NullableLogForwarderDatadogConnectionType) IsSet() bool { + return v.isSet +} + +func (v *NullableLogForwarderDatadogConnectionType) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLogForwarderDatadogConnectionType(val *LogForwarderDatadogConnectionType) *NullableLogForwarderDatadogConnectionType { + return &NullableLogForwarderDatadogConnectionType{value: val, isSet: true} +} + +func (v NullableLogForwarderDatadogConnectionType) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLogForwarderDatadogConnectionType) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_log_forwarder_dns_type.go b/model_log_forwarder_dns_type.go new file mode 100644 index 0000000..45f69c9 --- /dev/null +++ b/model_log_forwarder_dns_type.go @@ -0,0 +1,414 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the LogForwarderDNSType type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LogForwarderDNSType{} + +// LogForwarderDNSType Dns log type +type LogForwarderDNSType struct { + Timestamp *bool `json:"timestamp,omitempty"` + Uuid *bool `json:"uuid,omitempty"` + Record *bool `json:"record,omitempty"` + Type *bool `json:"type,omitempty"` + Ip *bool `json:"ip,omitempty"` + Country *bool `json:"country,omitempty"` + Asn *bool `json:"asn,omitempty"` + ResponseCode *bool `json:"response_code,omitempty"` + ProcessTime *bool `json:"process_time,omitempty"` +} + +// NewLogForwarderDNSType instantiates a new LogForwarderDNSType object +// This constructor will assign default values to properties that have it defined, +// 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 NewLogForwarderDNSType() *LogForwarderDNSType { + this := LogForwarderDNSType{} + return &this +} + +// NewLogForwarderDNSTypeWithDefaults instantiates a new LogForwarderDNSType object +// This 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 NewLogForwarderDNSTypeWithDefaults() *LogForwarderDNSType { + this := LogForwarderDNSType{} + return &this +} + +// GetTimestamp returns the Timestamp field value if set, zero value otherwise. +func (o *LogForwarderDNSType) GetTimestamp() bool { + if o == nil || IsNil(o.Timestamp) { + var ret bool + return ret + } + return *o.Timestamp +} + +// GetTimestampOk returns a tuple with the Timestamp field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LogForwarderDNSType) GetTimestampOk() (*bool, bool) { + if o == nil || IsNil(o.Timestamp) { + return nil, false + } + return o.Timestamp, true +} + +// HasTimestamp returns a boolean if a field has been set. +func (o *LogForwarderDNSType) HasTimestamp() bool { + if o != nil && !IsNil(o.Timestamp) { + return true + } + + return false +} + +// SetTimestamp gets a reference to the given bool and assigns it to the Timestamp field. +func (o *LogForwarderDNSType) SetTimestamp(v bool) { + o.Timestamp = &v +} + +// GetUuid returns the Uuid field value if set, zero value otherwise. +func (o *LogForwarderDNSType) GetUuid() bool { + if o == nil || IsNil(o.Uuid) { + var ret bool + return ret + } + return *o.Uuid +} + +// GetUuidOk returns a tuple with the Uuid field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LogForwarderDNSType) GetUuidOk() (*bool, bool) { + if o == nil || IsNil(o.Uuid) { + return nil, false + } + return o.Uuid, true +} + +// HasUuid returns a boolean if a field has been set. +func (o *LogForwarderDNSType) HasUuid() bool { + if o != nil && !IsNil(o.Uuid) { + return true + } + + return false +} + +// SetUuid gets a reference to the given bool and assigns it to the Uuid field. +func (o *LogForwarderDNSType) SetUuid(v bool) { + o.Uuid = &v +} + +// GetRecord returns the Record field value if set, zero value otherwise. +func (o *LogForwarderDNSType) GetRecord() bool { + if o == nil || IsNil(o.Record) { + var ret bool + return ret + } + return *o.Record +} + +// GetRecordOk returns a tuple with the Record field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LogForwarderDNSType) GetRecordOk() (*bool, bool) { + if o == nil || IsNil(o.Record) { + return nil, false + } + return o.Record, true +} + +// HasRecord returns a boolean if a field has been set. +func (o *LogForwarderDNSType) HasRecord() bool { + if o != nil && !IsNil(o.Record) { + return true + } + + return false +} + +// SetRecord gets a reference to the given bool and assigns it to the Record field. +func (o *LogForwarderDNSType) SetRecord(v bool) { + o.Record = &v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *LogForwarderDNSType) GetType() bool { + if o == nil || IsNil(o.Type) { + var ret bool + 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 *LogForwarderDNSType) GetTypeOk() (*bool, 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 *LogForwarderDNSType) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given bool and assigns it to the Type field. +func (o *LogForwarderDNSType) SetType(v bool) { + o.Type = &v +} + +// GetIp returns the Ip field value if set, zero value otherwise. +func (o *LogForwarderDNSType) GetIp() bool { + if o == nil || IsNil(o.Ip) { + var ret bool + return ret + } + return *o.Ip +} + +// GetIpOk returns a tuple with the Ip field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LogForwarderDNSType) GetIpOk() (*bool, bool) { + if o == nil || IsNil(o.Ip) { + return nil, false + } + return o.Ip, true +} + +// HasIp returns a boolean if a field has been set. +func (o *LogForwarderDNSType) HasIp() bool { + if o != nil && !IsNil(o.Ip) { + return true + } + + return false +} + +// SetIp gets a reference to the given bool and assigns it to the Ip field. +func (o *LogForwarderDNSType) SetIp(v bool) { + o.Ip = &v +} + +// GetCountry returns the Country field value if set, zero value otherwise. +func (o *LogForwarderDNSType) GetCountry() bool { + if o == nil || IsNil(o.Country) { + var ret bool + return ret + } + return *o.Country +} + +// GetCountryOk returns a tuple with the Country field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LogForwarderDNSType) GetCountryOk() (*bool, bool) { + if o == nil || IsNil(o.Country) { + return nil, false + } + return o.Country, true +} + +// HasCountry returns a boolean if a field has been set. +func (o *LogForwarderDNSType) HasCountry() bool { + if o != nil && !IsNil(o.Country) { + return true + } + + return false +} + +// SetCountry gets a reference to the given bool and assigns it to the Country field. +func (o *LogForwarderDNSType) SetCountry(v bool) { + o.Country = &v +} + +// GetAsn returns the Asn field value if set, zero value otherwise. +func (o *LogForwarderDNSType) GetAsn() bool { + if o == nil || IsNil(o.Asn) { + var ret bool + return ret + } + return *o.Asn +} + +// GetAsnOk returns a tuple with the Asn field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LogForwarderDNSType) GetAsnOk() (*bool, bool) { + if o == nil || IsNil(o.Asn) { + return nil, false + } + return o.Asn, true +} + +// HasAsn returns a boolean if a field has been set. +func (o *LogForwarderDNSType) HasAsn() bool { + if o != nil && !IsNil(o.Asn) { + return true + } + + return false +} + +// SetAsn gets a reference to the given bool and assigns it to the Asn field. +func (o *LogForwarderDNSType) SetAsn(v bool) { + o.Asn = &v +} + +// GetResponseCode returns the ResponseCode field value if set, zero value otherwise. +func (o *LogForwarderDNSType) GetResponseCode() bool { + if o == nil || IsNil(o.ResponseCode) { + var ret bool + return ret + } + return *o.ResponseCode +} + +// GetResponseCodeOk returns a tuple with the ResponseCode field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LogForwarderDNSType) GetResponseCodeOk() (*bool, bool) { + if o == nil || IsNil(o.ResponseCode) { + return nil, false + } + return o.ResponseCode, true +} + +// HasResponseCode returns a boolean if a field has been set. +func (o *LogForwarderDNSType) HasResponseCode() bool { + if o != nil && !IsNil(o.ResponseCode) { + return true + } + + return false +} + +// SetResponseCode gets a reference to the given bool and assigns it to the ResponseCode field. +func (o *LogForwarderDNSType) SetResponseCode(v bool) { + o.ResponseCode = &v +} + +// GetProcessTime returns the ProcessTime field value if set, zero value otherwise. +func (o *LogForwarderDNSType) GetProcessTime() bool { + if o == nil || IsNil(o.ProcessTime) { + var ret bool + return ret + } + return *o.ProcessTime +} + +// GetProcessTimeOk returns a tuple with the ProcessTime field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LogForwarderDNSType) GetProcessTimeOk() (*bool, bool) { + if o == nil || IsNil(o.ProcessTime) { + return nil, false + } + return o.ProcessTime, true +} + +// HasProcessTime returns a boolean if a field has been set. +func (o *LogForwarderDNSType) HasProcessTime() bool { + if o != nil && !IsNil(o.ProcessTime) { + return true + } + + return false +} + +// SetProcessTime gets a reference to the given bool and assigns it to the ProcessTime field. +func (o *LogForwarderDNSType) SetProcessTime(v bool) { + o.ProcessTime = &v +} + +func (o LogForwarderDNSType) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o LogForwarderDNSType) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Timestamp) { + toSerialize["timestamp"] = o.Timestamp + } + if !IsNil(o.Uuid) { + toSerialize["uuid"] = o.Uuid + } + if !IsNil(o.Record) { + toSerialize["record"] = o.Record + } + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Ip) { + toSerialize["ip"] = o.Ip + } + if !IsNil(o.Country) { + toSerialize["country"] = o.Country + } + if !IsNil(o.Asn) { + toSerialize["asn"] = o.Asn + } + if !IsNil(o.ResponseCode) { + toSerialize["response_code"] = o.ResponseCode + } + if !IsNil(o.ProcessTime) { + toSerialize["process_time"] = o.ProcessTime + } + return toSerialize, nil +} + +type NullableLogForwarderDNSType struct { + value *LogForwarderDNSType + isSet bool +} + +func (v NullableLogForwarderDNSType) Get() *LogForwarderDNSType { + return v.value +} + +func (v *NullableLogForwarderDNSType) Set(val *LogForwarderDNSType) { + v.value = val + v.isSet = true +} + +func (v NullableLogForwarderDNSType) IsSet() bool { + return v.isSet +} + +func (v *NullableLogForwarderDNSType) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLogForwarderDNSType(val *LogForwarderDNSType) *NullableLogForwarderDNSType { + return &NullableLogForwarderDNSType{value: val, isSet: true} +} + +func (v NullableLogForwarderDNSType) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLogForwarderDNSType) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_log_forwarder_error_type.go b/model_log_forwarder_error_type.go new file mode 100644 index 0000000..79dde82 --- /dev/null +++ b/model_log_forwarder_error_type.go @@ -0,0 +1,558 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the LogForwarderErrorType type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LogForwarderErrorType{} + +// LogForwarderErrorType Error log type +type LogForwarderErrorType struct { + ClientIp *bool `json:"client_ip,omitempty"` + UpstreamProto *bool `json:"upstream_proto,omitempty"` + UpstreamUri *bool `json:"upstream_uri,omitempty"` + UpstreamPort *bool `json:"upstream_port,omitempty"` + UpstreamIp *bool `json:"upstream_ip,omitempty"` + DomainName *bool `json:"domain_name,omitempty"` + HttpVersion *bool `json:"http_version,omitempty"` + RequestMethod *bool `json:"request_method,omitempty"` + RequestUri *bool `json:"request_uri,omitempty"` + RealTimestamp *bool `json:"real_timestamp,omitempty"` + ErrorMessage *bool `json:"error_message,omitempty"` + PopSite *bool `json:"pop_site,omitempty"` + RequestId *bool `json:"request_id,omitempty"` +} + +// NewLogForwarderErrorType instantiates a new LogForwarderErrorType object +// This constructor will assign default values to properties that have it defined, +// 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 NewLogForwarderErrorType() *LogForwarderErrorType { + this := LogForwarderErrorType{} + return &this +} + +// NewLogForwarderErrorTypeWithDefaults instantiates a new LogForwarderErrorType object +// This 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 NewLogForwarderErrorTypeWithDefaults() *LogForwarderErrorType { + this := LogForwarderErrorType{} + return &this +} + +// GetClientIp returns the ClientIp field value if set, zero value otherwise. +func (o *LogForwarderErrorType) GetClientIp() bool { + if o == nil || IsNil(o.ClientIp) { + var ret bool + return ret + } + return *o.ClientIp +} + +// GetClientIpOk returns a tuple with the ClientIp field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LogForwarderErrorType) GetClientIpOk() (*bool, bool) { + if o == nil || IsNil(o.ClientIp) { + return nil, false + } + return o.ClientIp, true +} + +// HasClientIp returns a boolean if a field has been set. +func (o *LogForwarderErrorType) HasClientIp() bool { + if o != nil && !IsNil(o.ClientIp) { + return true + } + + return false +} + +// SetClientIp gets a reference to the given bool and assigns it to the ClientIp field. +func (o *LogForwarderErrorType) SetClientIp(v bool) { + o.ClientIp = &v +} + +// GetUpstreamProto returns the UpstreamProto field value if set, zero value otherwise. +func (o *LogForwarderErrorType) GetUpstreamProto() bool { + if o == nil || IsNil(o.UpstreamProto) { + var ret bool + return ret + } + return *o.UpstreamProto +} + +// GetUpstreamProtoOk returns a tuple with the UpstreamProto field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LogForwarderErrorType) GetUpstreamProtoOk() (*bool, bool) { + if o == nil || IsNil(o.UpstreamProto) { + return nil, false + } + return o.UpstreamProto, true +} + +// HasUpstreamProto returns a boolean if a field has been set. +func (o *LogForwarderErrorType) HasUpstreamProto() bool { + if o != nil && !IsNil(o.UpstreamProto) { + return true + } + + return false +} + +// SetUpstreamProto gets a reference to the given bool and assigns it to the UpstreamProto field. +func (o *LogForwarderErrorType) SetUpstreamProto(v bool) { + o.UpstreamProto = &v +} + +// GetUpstreamUri returns the UpstreamUri field value if set, zero value otherwise. +func (o *LogForwarderErrorType) GetUpstreamUri() bool { + if o == nil || IsNil(o.UpstreamUri) { + var ret bool + return ret + } + return *o.UpstreamUri +} + +// GetUpstreamUriOk returns a tuple with the UpstreamUri field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LogForwarderErrorType) GetUpstreamUriOk() (*bool, bool) { + if o == nil || IsNil(o.UpstreamUri) { + return nil, false + } + return o.UpstreamUri, true +} + +// HasUpstreamUri returns a boolean if a field has been set. +func (o *LogForwarderErrorType) HasUpstreamUri() bool { + if o != nil && !IsNil(o.UpstreamUri) { + return true + } + + return false +} + +// SetUpstreamUri gets a reference to the given bool and assigns it to the UpstreamUri field. +func (o *LogForwarderErrorType) SetUpstreamUri(v bool) { + o.UpstreamUri = &v +} + +// GetUpstreamPort returns the UpstreamPort field value if set, zero value otherwise. +func (o *LogForwarderErrorType) GetUpstreamPort() bool { + if o == nil || IsNil(o.UpstreamPort) { + var ret bool + return ret + } + return *o.UpstreamPort +} + +// GetUpstreamPortOk returns a tuple with the UpstreamPort field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LogForwarderErrorType) GetUpstreamPortOk() (*bool, bool) { + if o == nil || IsNil(o.UpstreamPort) { + return nil, false + } + return o.UpstreamPort, true +} + +// HasUpstreamPort returns a boolean if a field has been set. +func (o *LogForwarderErrorType) HasUpstreamPort() bool { + if o != nil && !IsNil(o.UpstreamPort) { + return true + } + + return false +} + +// SetUpstreamPort gets a reference to the given bool and assigns it to the UpstreamPort field. +func (o *LogForwarderErrorType) SetUpstreamPort(v bool) { + o.UpstreamPort = &v +} + +// GetUpstreamIp returns the UpstreamIp field value if set, zero value otherwise. +func (o *LogForwarderErrorType) GetUpstreamIp() bool { + if o == nil || IsNil(o.UpstreamIp) { + var ret bool + return ret + } + return *o.UpstreamIp +} + +// GetUpstreamIpOk returns a tuple with the UpstreamIp field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LogForwarderErrorType) GetUpstreamIpOk() (*bool, bool) { + if o == nil || IsNil(o.UpstreamIp) { + return nil, false + } + return o.UpstreamIp, true +} + +// HasUpstreamIp returns a boolean if a field has been set. +func (o *LogForwarderErrorType) HasUpstreamIp() bool { + if o != nil && !IsNil(o.UpstreamIp) { + return true + } + + return false +} + +// SetUpstreamIp gets a reference to the given bool and assigns it to the UpstreamIp field. +func (o *LogForwarderErrorType) SetUpstreamIp(v bool) { + o.UpstreamIp = &v +} + +// GetDomainName returns the DomainName field value if set, zero value otherwise. +func (o *LogForwarderErrorType) GetDomainName() bool { + if o == nil || IsNil(o.DomainName) { + var ret bool + return ret + } + return *o.DomainName +} + +// GetDomainNameOk returns a tuple with the DomainName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LogForwarderErrorType) GetDomainNameOk() (*bool, bool) { + if o == nil || IsNil(o.DomainName) { + return nil, false + } + return o.DomainName, true +} + +// HasDomainName returns a boolean if a field has been set. +func (o *LogForwarderErrorType) HasDomainName() bool { + if o != nil && !IsNil(o.DomainName) { + return true + } + + return false +} + +// SetDomainName gets a reference to the given bool and assigns it to the DomainName field. +func (o *LogForwarderErrorType) SetDomainName(v bool) { + o.DomainName = &v +} + +// GetHttpVersion returns the HttpVersion field value if set, zero value otherwise. +func (o *LogForwarderErrorType) GetHttpVersion() bool { + if o == nil || IsNil(o.HttpVersion) { + var ret bool + return ret + } + return *o.HttpVersion +} + +// GetHttpVersionOk returns a tuple with the HttpVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LogForwarderErrorType) GetHttpVersionOk() (*bool, bool) { + if o == nil || IsNil(o.HttpVersion) { + return nil, false + } + return o.HttpVersion, true +} + +// HasHttpVersion returns a boolean if a field has been set. +func (o *LogForwarderErrorType) HasHttpVersion() bool { + if o != nil && !IsNil(o.HttpVersion) { + return true + } + + return false +} + +// SetHttpVersion gets a reference to the given bool and assigns it to the HttpVersion field. +func (o *LogForwarderErrorType) SetHttpVersion(v bool) { + o.HttpVersion = &v +} + +// GetRequestMethod returns the RequestMethod field value if set, zero value otherwise. +func (o *LogForwarderErrorType) GetRequestMethod() bool { + if o == nil || IsNil(o.RequestMethod) { + var ret bool + return ret + } + return *o.RequestMethod +} + +// GetRequestMethodOk returns a tuple with the RequestMethod field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LogForwarderErrorType) GetRequestMethodOk() (*bool, bool) { + if o == nil || IsNil(o.RequestMethod) { + return nil, false + } + return o.RequestMethod, true +} + +// HasRequestMethod returns a boolean if a field has been set. +func (o *LogForwarderErrorType) HasRequestMethod() bool { + if o != nil && !IsNil(o.RequestMethod) { + return true + } + + return false +} + +// SetRequestMethod gets a reference to the given bool and assigns it to the RequestMethod field. +func (o *LogForwarderErrorType) SetRequestMethod(v bool) { + o.RequestMethod = &v +} + +// GetRequestUri returns the RequestUri field value if set, zero value otherwise. +func (o *LogForwarderErrorType) GetRequestUri() bool { + if o == nil || IsNil(o.RequestUri) { + var ret bool + return ret + } + return *o.RequestUri +} + +// GetRequestUriOk returns a tuple with the RequestUri field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LogForwarderErrorType) GetRequestUriOk() (*bool, bool) { + if o == nil || IsNil(o.RequestUri) { + return nil, false + } + return o.RequestUri, true +} + +// HasRequestUri returns a boolean if a field has been set. +func (o *LogForwarderErrorType) HasRequestUri() bool { + if o != nil && !IsNil(o.RequestUri) { + return true + } + + return false +} + +// SetRequestUri gets a reference to the given bool and assigns it to the RequestUri field. +func (o *LogForwarderErrorType) SetRequestUri(v bool) { + o.RequestUri = &v +} + +// GetRealTimestamp returns the RealTimestamp field value if set, zero value otherwise. +func (o *LogForwarderErrorType) GetRealTimestamp() bool { + if o == nil || IsNil(o.RealTimestamp) { + var ret bool + return ret + } + return *o.RealTimestamp +} + +// GetRealTimestampOk returns a tuple with the RealTimestamp field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LogForwarderErrorType) GetRealTimestampOk() (*bool, bool) { + if o == nil || IsNil(o.RealTimestamp) { + return nil, false + } + return o.RealTimestamp, true +} + +// HasRealTimestamp returns a boolean if a field has been set. +func (o *LogForwarderErrorType) HasRealTimestamp() bool { + if o != nil && !IsNil(o.RealTimestamp) { + return true + } + + return false +} + +// SetRealTimestamp gets a reference to the given bool and assigns it to the RealTimestamp field. +func (o *LogForwarderErrorType) SetRealTimestamp(v bool) { + o.RealTimestamp = &v +} + +// GetErrorMessage returns the ErrorMessage field value if set, zero value otherwise. +func (o *LogForwarderErrorType) GetErrorMessage() bool { + if o == nil || IsNil(o.ErrorMessage) { + var ret bool + return ret + } + return *o.ErrorMessage +} + +// GetErrorMessageOk returns a tuple with the ErrorMessage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LogForwarderErrorType) GetErrorMessageOk() (*bool, bool) { + if o == nil || IsNil(o.ErrorMessage) { + return nil, false + } + return o.ErrorMessage, true +} + +// HasErrorMessage returns a boolean if a field has been set. +func (o *LogForwarderErrorType) HasErrorMessage() bool { + if o != nil && !IsNil(o.ErrorMessage) { + return true + } + + return false +} + +// SetErrorMessage gets a reference to the given bool and assigns it to the ErrorMessage field. +func (o *LogForwarderErrorType) SetErrorMessage(v bool) { + o.ErrorMessage = &v +} + +// GetPopSite returns the PopSite field value if set, zero value otherwise. +func (o *LogForwarderErrorType) GetPopSite() bool { + if o == nil || IsNil(o.PopSite) { + var ret bool + return ret + } + return *o.PopSite +} + +// GetPopSiteOk returns a tuple with the PopSite field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LogForwarderErrorType) GetPopSiteOk() (*bool, bool) { + if o == nil || IsNil(o.PopSite) { + return nil, false + } + return o.PopSite, true +} + +// HasPopSite returns a boolean if a field has been set. +func (o *LogForwarderErrorType) HasPopSite() bool { + if o != nil && !IsNil(o.PopSite) { + return true + } + + return false +} + +// SetPopSite gets a reference to the given bool and assigns it to the PopSite field. +func (o *LogForwarderErrorType) SetPopSite(v bool) { + o.PopSite = &v +} + +// GetRequestId returns the RequestId field value if set, zero value otherwise. +func (o *LogForwarderErrorType) GetRequestId() bool { + if o == nil || IsNil(o.RequestId) { + var ret bool + return ret + } + return *o.RequestId +} + +// GetRequestIdOk returns a tuple with the RequestId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LogForwarderErrorType) GetRequestIdOk() (*bool, bool) { + if o == nil || IsNil(o.RequestId) { + return nil, false + } + return o.RequestId, true +} + +// HasRequestId returns a boolean if a field has been set. +func (o *LogForwarderErrorType) HasRequestId() bool { + if o != nil && !IsNil(o.RequestId) { + return true + } + + return false +} + +// SetRequestId gets a reference to the given bool and assigns it to the RequestId field. +func (o *LogForwarderErrorType) SetRequestId(v bool) { + o.RequestId = &v +} + +func (o LogForwarderErrorType) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o LogForwarderErrorType) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.ClientIp) { + toSerialize["client_ip"] = o.ClientIp + } + if !IsNil(o.UpstreamProto) { + toSerialize["upstream_proto"] = o.UpstreamProto + } + if !IsNil(o.UpstreamUri) { + toSerialize["upstream_uri"] = o.UpstreamUri + } + if !IsNil(o.UpstreamPort) { + toSerialize["upstream_port"] = o.UpstreamPort + } + if !IsNil(o.UpstreamIp) { + toSerialize["upstream_ip"] = o.UpstreamIp + } + if !IsNil(o.DomainName) { + toSerialize["domain_name"] = o.DomainName + } + if !IsNil(o.HttpVersion) { + toSerialize["http_version"] = o.HttpVersion + } + if !IsNil(o.RequestMethod) { + toSerialize["request_method"] = o.RequestMethod + } + if !IsNil(o.RequestUri) { + toSerialize["request_uri"] = o.RequestUri + } + if !IsNil(o.RealTimestamp) { + toSerialize["real_timestamp"] = o.RealTimestamp + } + if !IsNil(o.ErrorMessage) { + toSerialize["error_message"] = o.ErrorMessage + } + if !IsNil(o.PopSite) { + toSerialize["pop_site"] = o.PopSite + } + if !IsNil(o.RequestId) { + toSerialize["request_id"] = o.RequestId + } + return toSerialize, nil +} + +type NullableLogForwarderErrorType struct { + value *LogForwarderErrorType + isSet bool +} + +func (v NullableLogForwarderErrorType) Get() *LogForwarderErrorType { + return v.value +} + +func (v *NullableLogForwarderErrorType) Set(val *LogForwarderErrorType) { + v.value = val + v.isSet = true +} + +func (v NullableLogForwarderErrorType) IsSet() bool { + return v.isSet +} + +func (v *NullableLogForwarderErrorType) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLogForwarderErrorType(val *LogForwarderErrorType) *NullableLogForwarderErrorType { + return &NullableLogForwarderErrorType{value: val, isSet: true} +} + +func (v NullableLogForwarderErrorType) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLogForwarderErrorType) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_log_forwarder_generic.go b/model_log_forwarder_generic.go new file mode 100644 index 0000000..b381cc5 --- /dev/null +++ b/model_log_forwarder_generic.go @@ -0,0 +1,342 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the LogForwarderGeneric type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LogForwarderGeneric{} + +// LogForwarderGeneric struct for LogForwarderGeneric +type LogForwarderGeneric struct { + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + Type *string `json:"type,omitempty"` + ConnectionType *string `json:"connection_type,omitempty"` + DataFormat map[string]interface{} `json:"data_format,omitempty"` + Settings map[string]interface{} `json:"settings,omitempty"` + Status *bool `json:"status,omitempty"` +} + +// NewLogForwarderGeneric instantiates a new LogForwarderGeneric object +// This constructor will assign default values to properties that have it defined, +// 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 NewLogForwarderGeneric() *LogForwarderGeneric { + this := LogForwarderGeneric{} + return &this +} + +// NewLogForwarderGenericWithDefaults instantiates a new LogForwarderGeneric object +// This 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 NewLogForwarderGenericWithDefaults() *LogForwarderGeneric { + this := LogForwarderGeneric{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *LogForwarderGeneric) 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 *LogForwarderGeneric) 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 *LogForwarderGeneric) 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 *LogForwarderGeneric) SetName(v string) { + o.Name = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *LogForwarderGeneric) 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 *LogForwarderGeneric) 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 *LogForwarderGeneric) 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 *LogForwarderGeneric) SetDescription(v string) { + o.Description = &v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *LogForwarderGeneric) 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 *LogForwarderGeneric) 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 *LogForwarderGeneric) 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 *LogForwarderGeneric) SetType(v string) { + o.Type = &v +} + +// GetConnectionType returns the ConnectionType field value if set, zero value otherwise. +func (o *LogForwarderGeneric) GetConnectionType() string { + if o == nil || IsNil(o.ConnectionType) { + var ret string + return ret + } + return *o.ConnectionType +} + +// GetConnectionTypeOk returns a tuple with the ConnectionType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LogForwarderGeneric) GetConnectionTypeOk() (*string, bool) { + if o == nil || IsNil(o.ConnectionType) { + return nil, false + } + return o.ConnectionType, true +} + +// HasConnectionType returns a boolean if a field has been set. +func (o *LogForwarderGeneric) HasConnectionType() bool { + if o != nil && !IsNil(o.ConnectionType) { + return true + } + + return false +} + +// SetConnectionType gets a reference to the given string and assigns it to the ConnectionType field. +func (o *LogForwarderGeneric) SetConnectionType(v string) { + o.ConnectionType = &v +} + +// GetDataFormat returns the DataFormat field value if set, zero value otherwise. +func (o *LogForwarderGeneric) GetDataFormat() map[string]interface{} { + if o == nil || IsNil(o.DataFormat) { + var ret map[string]interface{} + return ret + } + return o.DataFormat +} + +// GetDataFormatOk returns a tuple with the DataFormat field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LogForwarderGeneric) GetDataFormatOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.DataFormat) { + return map[string]interface{}{}, false + } + return o.DataFormat, true +} + +// HasDataFormat returns a boolean if a field has been set. +func (o *LogForwarderGeneric) HasDataFormat() bool { + if o != nil && !IsNil(o.DataFormat) { + return true + } + + return false +} + +// SetDataFormat gets a reference to the given map[string]interface{} and assigns it to the DataFormat field. +func (o *LogForwarderGeneric) SetDataFormat(v map[string]interface{}) { + o.DataFormat = v +} + +// GetSettings returns the Settings field value if set, zero value otherwise. +func (o *LogForwarderGeneric) GetSettings() map[string]interface{} { + if o == nil || IsNil(o.Settings) { + var ret map[string]interface{} + return ret + } + return o.Settings +} + +// GetSettingsOk returns a tuple with the Settings field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LogForwarderGeneric) GetSettingsOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Settings) { + return map[string]interface{}{}, false + } + return o.Settings, true +} + +// HasSettings returns a boolean if a field has been set. +func (o *LogForwarderGeneric) HasSettings() bool { + if o != nil && !IsNil(o.Settings) { + return true + } + + return false +} + +// SetSettings gets a reference to the given map[string]interface{} and assigns it to the Settings field. +func (o *LogForwarderGeneric) SetSettings(v map[string]interface{}) { + o.Settings = v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *LogForwarderGeneric) GetStatus() bool { + if o == nil || IsNil(o.Status) { + var ret bool + 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 *LogForwarderGeneric) GetStatusOk() (*bool, 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 *LogForwarderGeneric) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given bool and assigns it to the Status field. +func (o *LogForwarderGeneric) SetStatus(v bool) { + o.Status = &v +} + +func (o LogForwarderGeneric) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o LogForwarderGeneric) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.ConnectionType) { + toSerialize["connection_type"] = o.ConnectionType + } + if !IsNil(o.DataFormat) { + toSerialize["data_format"] = o.DataFormat + } + if !IsNil(o.Settings) { + toSerialize["settings"] = o.Settings + } + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + return toSerialize, nil +} + +type NullableLogForwarderGeneric struct { + value *LogForwarderGeneric + isSet bool +} + +func (v NullableLogForwarderGeneric) Get() *LogForwarderGeneric { + return v.value +} + +func (v *NullableLogForwarderGeneric) Set(val *LogForwarderGeneric) { + v.value = val + v.isSet = true +} + +func (v NullableLogForwarderGeneric) IsSet() bool { + return v.isSet +} + +func (v *NullableLogForwarderGeneric) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLogForwarderGeneric(val *LogForwarderGeneric) *NullableLogForwarderGeneric { + return &NullableLogForwarderGeneric{value: val, isSet: true} +} + +func (v NullableLogForwarderGeneric) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLogForwarderGeneric) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_log_forwarder_kafka_connection_type.go b/model_log_forwarder_kafka_connection_type.go new file mode 100644 index 0000000..740e750 --- /dev/null +++ b/model_log_forwarder_kafka_connection_type.go @@ -0,0 +1,306 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the LogForwarderKafkaConnectionType type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LogForwarderKafkaConnectionType{} + +// LogForwarderKafkaConnectionType Kafka connection +type LogForwarderKafkaConnectionType struct { + SampleRate *int32 `json:"sample_rate,omitempty"` + KafkaVersion *string `json:"kafka_version,omitempty"` + KafkaBrokers []string `json:"kafka_brokers,omitempty"` + KafkaTopicToWrite *string `json:"kafka_topic_to_write,omitempty"` + KafkaProducerBatchSize *int32 `json:"kafka_producer_batch_size,omitempty"` + KafkaProducerFlushFrequencyMs *int32 `json:"kafka_producer_flush_frequency_ms,omitempty"` +} + +// NewLogForwarderKafkaConnectionType instantiates a new LogForwarderKafkaConnectionType object +// This constructor will assign default values to properties that have it defined, +// 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 NewLogForwarderKafkaConnectionType() *LogForwarderKafkaConnectionType { + this := LogForwarderKafkaConnectionType{} + return &this +} + +// NewLogForwarderKafkaConnectionTypeWithDefaults instantiates a new LogForwarderKafkaConnectionType object +// This 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 NewLogForwarderKafkaConnectionTypeWithDefaults() *LogForwarderKafkaConnectionType { + this := LogForwarderKafkaConnectionType{} + return &this +} + +// GetSampleRate returns the SampleRate field value if set, zero value otherwise. +func (o *LogForwarderKafkaConnectionType) GetSampleRate() int32 { + if o == nil || IsNil(o.SampleRate) { + var ret int32 + return ret + } + return *o.SampleRate +} + +// GetSampleRateOk returns a tuple with the SampleRate field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LogForwarderKafkaConnectionType) GetSampleRateOk() (*int32, bool) { + if o == nil || IsNil(o.SampleRate) { + return nil, false + } + return o.SampleRate, true +} + +// HasSampleRate returns a boolean if a field has been set. +func (o *LogForwarderKafkaConnectionType) HasSampleRate() bool { + if o != nil && !IsNil(o.SampleRate) { + return true + } + + return false +} + +// SetSampleRate gets a reference to the given int32 and assigns it to the SampleRate field. +func (o *LogForwarderKafkaConnectionType) SetSampleRate(v int32) { + o.SampleRate = &v +} + +// GetKafkaVersion returns the KafkaVersion field value if set, zero value otherwise. +func (o *LogForwarderKafkaConnectionType) GetKafkaVersion() string { + if o == nil || IsNil(o.KafkaVersion) { + var ret string + return ret + } + return *o.KafkaVersion +} + +// GetKafkaVersionOk returns a tuple with the KafkaVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LogForwarderKafkaConnectionType) GetKafkaVersionOk() (*string, bool) { + if o == nil || IsNil(o.KafkaVersion) { + return nil, false + } + return o.KafkaVersion, true +} + +// HasKafkaVersion returns a boolean if a field has been set. +func (o *LogForwarderKafkaConnectionType) HasKafkaVersion() bool { + if o != nil && !IsNil(o.KafkaVersion) { + return true + } + + return false +} + +// SetKafkaVersion gets a reference to the given string and assigns it to the KafkaVersion field. +func (o *LogForwarderKafkaConnectionType) SetKafkaVersion(v string) { + o.KafkaVersion = &v +} + +// GetKafkaBrokers returns the KafkaBrokers field value if set, zero value otherwise. +func (o *LogForwarderKafkaConnectionType) GetKafkaBrokers() []string { + if o == nil || IsNil(o.KafkaBrokers) { + var ret []string + return ret + } + return o.KafkaBrokers +} + +// GetKafkaBrokersOk returns a tuple with the KafkaBrokers field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LogForwarderKafkaConnectionType) GetKafkaBrokersOk() ([]string, bool) { + if o == nil || IsNil(o.KafkaBrokers) { + return nil, false + } + return o.KafkaBrokers, true +} + +// HasKafkaBrokers returns a boolean if a field has been set. +func (o *LogForwarderKafkaConnectionType) HasKafkaBrokers() bool { + if o != nil && !IsNil(o.KafkaBrokers) { + return true + } + + return false +} + +// SetKafkaBrokers gets a reference to the given []string and assigns it to the KafkaBrokers field. +func (o *LogForwarderKafkaConnectionType) SetKafkaBrokers(v []string) { + o.KafkaBrokers = v +} + +// GetKafkaTopicToWrite returns the KafkaTopicToWrite field value if set, zero value otherwise. +func (o *LogForwarderKafkaConnectionType) GetKafkaTopicToWrite() string { + if o == nil || IsNil(o.KafkaTopicToWrite) { + var ret string + return ret + } + return *o.KafkaTopicToWrite +} + +// GetKafkaTopicToWriteOk returns a tuple with the KafkaTopicToWrite field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LogForwarderKafkaConnectionType) GetKafkaTopicToWriteOk() (*string, bool) { + if o == nil || IsNil(o.KafkaTopicToWrite) { + return nil, false + } + return o.KafkaTopicToWrite, true +} + +// HasKafkaTopicToWrite returns a boolean if a field has been set. +func (o *LogForwarderKafkaConnectionType) HasKafkaTopicToWrite() bool { + if o != nil && !IsNil(o.KafkaTopicToWrite) { + return true + } + + return false +} + +// SetKafkaTopicToWrite gets a reference to the given string and assigns it to the KafkaTopicToWrite field. +func (o *LogForwarderKafkaConnectionType) SetKafkaTopicToWrite(v string) { + o.KafkaTopicToWrite = &v +} + +// GetKafkaProducerBatchSize returns the KafkaProducerBatchSize field value if set, zero value otherwise. +func (o *LogForwarderKafkaConnectionType) GetKafkaProducerBatchSize() int32 { + if o == nil || IsNil(o.KafkaProducerBatchSize) { + var ret int32 + return ret + } + return *o.KafkaProducerBatchSize +} + +// GetKafkaProducerBatchSizeOk returns a tuple with the KafkaProducerBatchSize field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LogForwarderKafkaConnectionType) GetKafkaProducerBatchSizeOk() (*int32, bool) { + if o == nil || IsNil(o.KafkaProducerBatchSize) { + return nil, false + } + return o.KafkaProducerBatchSize, true +} + +// HasKafkaProducerBatchSize returns a boolean if a field has been set. +func (o *LogForwarderKafkaConnectionType) HasKafkaProducerBatchSize() bool { + if o != nil && !IsNil(o.KafkaProducerBatchSize) { + return true + } + + return false +} + +// SetKafkaProducerBatchSize gets a reference to the given int32 and assigns it to the KafkaProducerBatchSize field. +func (o *LogForwarderKafkaConnectionType) SetKafkaProducerBatchSize(v int32) { + o.KafkaProducerBatchSize = &v +} + +// GetKafkaProducerFlushFrequencyMs returns the KafkaProducerFlushFrequencyMs field value if set, zero value otherwise. +func (o *LogForwarderKafkaConnectionType) GetKafkaProducerFlushFrequencyMs() int32 { + if o == nil || IsNil(o.KafkaProducerFlushFrequencyMs) { + var ret int32 + return ret + } + return *o.KafkaProducerFlushFrequencyMs +} + +// GetKafkaProducerFlushFrequencyMsOk returns a tuple with the KafkaProducerFlushFrequencyMs field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LogForwarderKafkaConnectionType) GetKafkaProducerFlushFrequencyMsOk() (*int32, bool) { + if o == nil || IsNil(o.KafkaProducerFlushFrequencyMs) { + return nil, false + } + return o.KafkaProducerFlushFrequencyMs, true +} + +// HasKafkaProducerFlushFrequencyMs returns a boolean if a field has been set. +func (o *LogForwarderKafkaConnectionType) HasKafkaProducerFlushFrequencyMs() bool { + if o != nil && !IsNil(o.KafkaProducerFlushFrequencyMs) { + return true + } + + return false +} + +// SetKafkaProducerFlushFrequencyMs gets a reference to the given int32 and assigns it to the KafkaProducerFlushFrequencyMs field. +func (o *LogForwarderKafkaConnectionType) SetKafkaProducerFlushFrequencyMs(v int32) { + o.KafkaProducerFlushFrequencyMs = &v +} + +func (o LogForwarderKafkaConnectionType) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o LogForwarderKafkaConnectionType) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.SampleRate) { + toSerialize["sample_rate"] = o.SampleRate + } + if !IsNil(o.KafkaVersion) { + toSerialize["kafka_version"] = o.KafkaVersion + } + if !IsNil(o.KafkaBrokers) { + toSerialize["kafka_brokers"] = o.KafkaBrokers + } + if !IsNil(o.KafkaTopicToWrite) { + toSerialize["kafka_topic_to_write"] = o.KafkaTopicToWrite + } + if !IsNil(o.KafkaProducerBatchSize) { + toSerialize["kafka_producer_batch_size"] = o.KafkaProducerBatchSize + } + if !IsNil(o.KafkaProducerFlushFrequencyMs) { + toSerialize["kafka_producer_flush_frequency_ms"] = o.KafkaProducerFlushFrequencyMs + } + return toSerialize, nil +} + +type NullableLogForwarderKafkaConnectionType struct { + value *LogForwarderKafkaConnectionType + isSet bool +} + +func (v NullableLogForwarderKafkaConnectionType) Get() *LogForwarderKafkaConnectionType { + return v.value +} + +func (v *NullableLogForwarderKafkaConnectionType) Set(val *LogForwarderKafkaConnectionType) { + v.value = val + v.isSet = true +} + +func (v NullableLogForwarderKafkaConnectionType) IsSet() bool { + return v.isSet +} + +func (v *NullableLogForwarderKafkaConnectionType) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLogForwarderKafkaConnectionType(val *LogForwarderKafkaConnectionType) *NullableLogForwarderKafkaConnectionType { + return &NullableLogForwarderKafkaConnectionType{value: val, isSet: true} +} + +func (v NullableLogForwarderKafkaConnectionType) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLogForwarderKafkaConnectionType) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_log_forwarder_loggly_connection_type.go b/model_log_forwarder_loggly_connection_type.go new file mode 100644 index 0000000..0bf3f79 --- /dev/null +++ b/model_log_forwarder_loggly_connection_type.go @@ -0,0 +1,270 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the LogForwarderLogglyConnectionType type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LogForwarderLogglyConnectionType{} + +// LogForwarderLogglyConnectionType Loggly connection +type LogForwarderLogglyConnectionType struct { + SampleRate *int32 `json:"sample_rate,omitempty"` + Token *string `json:"token,omitempty"` + Url *string `json:"url,omitempty"` + FlushInterval *int32 `json:"flush_interval,omitempty"` + BufferSize *int32 `json:"buffer_size,omitempty"` +} + +// NewLogForwarderLogglyConnectionType instantiates a new LogForwarderLogglyConnectionType object +// This constructor will assign default values to properties that have it defined, +// 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 NewLogForwarderLogglyConnectionType() *LogForwarderLogglyConnectionType { + this := LogForwarderLogglyConnectionType{} + return &this +} + +// NewLogForwarderLogglyConnectionTypeWithDefaults instantiates a new LogForwarderLogglyConnectionType object +// This 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 NewLogForwarderLogglyConnectionTypeWithDefaults() *LogForwarderLogglyConnectionType { + this := LogForwarderLogglyConnectionType{} + return &this +} + +// GetSampleRate returns the SampleRate field value if set, zero value otherwise. +func (o *LogForwarderLogglyConnectionType) GetSampleRate() int32 { + if o == nil || IsNil(o.SampleRate) { + var ret int32 + return ret + } + return *o.SampleRate +} + +// GetSampleRateOk returns a tuple with the SampleRate field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LogForwarderLogglyConnectionType) GetSampleRateOk() (*int32, bool) { + if o == nil || IsNil(o.SampleRate) { + return nil, false + } + return o.SampleRate, true +} + +// HasSampleRate returns a boolean if a field has been set. +func (o *LogForwarderLogglyConnectionType) HasSampleRate() bool { + if o != nil && !IsNil(o.SampleRate) { + return true + } + + return false +} + +// SetSampleRate gets a reference to the given int32 and assigns it to the SampleRate field. +func (o *LogForwarderLogglyConnectionType) SetSampleRate(v int32) { + o.SampleRate = &v +} + +// GetToken returns the Token field value if set, zero value otherwise. +func (o *LogForwarderLogglyConnectionType) GetToken() string { + if o == nil || IsNil(o.Token) { + var ret string + return ret + } + return *o.Token +} + +// GetTokenOk returns a tuple with the Token field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LogForwarderLogglyConnectionType) GetTokenOk() (*string, bool) { + if o == nil || IsNil(o.Token) { + return nil, false + } + return o.Token, true +} + +// HasToken returns a boolean if a field has been set. +func (o *LogForwarderLogglyConnectionType) HasToken() bool { + if o != nil && !IsNil(o.Token) { + return true + } + + return false +} + +// SetToken gets a reference to the given string and assigns it to the Token field. +func (o *LogForwarderLogglyConnectionType) SetToken(v string) { + o.Token = &v +} + +// GetUrl returns the Url field value if set, zero value otherwise. +func (o *LogForwarderLogglyConnectionType) GetUrl() string { + if o == nil || IsNil(o.Url) { + var ret string + return ret + } + return *o.Url +} + +// GetUrlOk returns a tuple with the Url field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LogForwarderLogglyConnectionType) GetUrlOk() (*string, bool) { + if o == nil || IsNil(o.Url) { + return nil, false + } + return o.Url, true +} + +// HasUrl returns a boolean if a field has been set. +func (o *LogForwarderLogglyConnectionType) HasUrl() bool { + if o != nil && !IsNil(o.Url) { + return true + } + + return false +} + +// SetUrl gets a reference to the given string and assigns it to the Url field. +func (o *LogForwarderLogglyConnectionType) SetUrl(v string) { + o.Url = &v +} + +// GetFlushInterval returns the FlushInterval field value if set, zero value otherwise. +func (o *LogForwarderLogglyConnectionType) GetFlushInterval() int32 { + if o == nil || IsNil(o.FlushInterval) { + var ret int32 + return ret + } + return *o.FlushInterval +} + +// GetFlushIntervalOk returns a tuple with the FlushInterval field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LogForwarderLogglyConnectionType) GetFlushIntervalOk() (*int32, bool) { + if o == nil || IsNil(o.FlushInterval) { + return nil, false + } + return o.FlushInterval, true +} + +// HasFlushInterval returns a boolean if a field has been set. +func (o *LogForwarderLogglyConnectionType) HasFlushInterval() bool { + if o != nil && !IsNil(o.FlushInterval) { + return true + } + + return false +} + +// SetFlushInterval gets a reference to the given int32 and assigns it to the FlushInterval field. +func (o *LogForwarderLogglyConnectionType) SetFlushInterval(v int32) { + o.FlushInterval = &v +} + +// GetBufferSize returns the BufferSize field value if set, zero value otherwise. +func (o *LogForwarderLogglyConnectionType) GetBufferSize() int32 { + if o == nil || IsNil(o.BufferSize) { + var ret int32 + return ret + } + return *o.BufferSize +} + +// GetBufferSizeOk returns a tuple with the BufferSize field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LogForwarderLogglyConnectionType) GetBufferSizeOk() (*int32, bool) { + if o == nil || IsNil(o.BufferSize) { + return nil, false + } + return o.BufferSize, true +} + +// HasBufferSize returns a boolean if a field has been set. +func (o *LogForwarderLogglyConnectionType) HasBufferSize() bool { + if o != nil && !IsNil(o.BufferSize) { + return true + } + + return false +} + +// SetBufferSize gets a reference to the given int32 and assigns it to the BufferSize field. +func (o *LogForwarderLogglyConnectionType) SetBufferSize(v int32) { + o.BufferSize = &v +} + +func (o LogForwarderLogglyConnectionType) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o LogForwarderLogglyConnectionType) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.SampleRate) { + toSerialize["sample_rate"] = o.SampleRate + } + if !IsNil(o.Token) { + toSerialize["token"] = o.Token + } + if !IsNil(o.Url) { + toSerialize["url"] = o.Url + } + if !IsNil(o.FlushInterval) { + toSerialize["flush_interval"] = o.FlushInterval + } + if !IsNil(o.BufferSize) { + toSerialize["buffer_size"] = o.BufferSize + } + return toSerialize, nil +} + +type NullableLogForwarderLogglyConnectionType struct { + value *LogForwarderLogglyConnectionType + isSet bool +} + +func (v NullableLogForwarderLogglyConnectionType) Get() *LogForwarderLogglyConnectionType { + return v.value +} + +func (v *NullableLogForwarderLogglyConnectionType) Set(val *LogForwarderLogglyConnectionType) { + v.value = val + v.isSet = true +} + +func (v NullableLogForwarderLogglyConnectionType) IsSet() bool { + return v.isSet +} + +func (v *NullableLogForwarderLogglyConnectionType) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLogForwarderLogglyConnectionType(val *LogForwarderLogglyConnectionType) *NullableLogForwarderLogglyConnectionType { + return &NullableLogForwarderLogglyConnectionType{value: val, isSet: true} +} + +func (v NullableLogForwarderLogglyConnectionType) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLogForwarderLogglyConnectionType) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_log_forwarder_response.go b/model_log_forwarder_response.go new file mode 100644 index 0000000..ab76c78 --- /dev/null +++ b/model_log_forwarder_response.go @@ -0,0 +1,172 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the LogForwarderResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LogForwarderResponse{} + +// LogForwarderResponse struct for LogForwarderResponse +type LogForwarderResponse struct { + Data *LogForwarderGeneric `json:"data,omitempty"` + Message NullableString `json:"message,omitempty"` +} + +// NewLogForwarderResponse instantiates a new LogForwarderResponse object +// This constructor will assign default values to properties that have it defined, +// 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 NewLogForwarderResponse() *LogForwarderResponse { + this := LogForwarderResponse{} + return &this +} + +// NewLogForwarderResponseWithDefaults instantiates a new LogForwarderResponse object +// This 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 NewLogForwarderResponseWithDefaults() *LogForwarderResponse { + this := LogForwarderResponse{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *LogForwarderResponse) GetData() LogForwarderGeneric { + if o == nil || IsNil(o.Data) { + var ret LogForwarderGeneric + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LogForwarderResponse) GetDataOk() (*LogForwarderGeneric, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *LogForwarderResponse) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given LogForwarderGeneric and assigns it to the Data field. +func (o *LogForwarderResponse) SetData(v LogForwarderGeneric) { + o.Data = &v +} + +// GetMessage returns the Message field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *LogForwarderResponse) GetMessage() string { + if o == nil || IsNil(o.Message.Get()) { + var ret string + return ret + } + return *o.Message.Get() +} + +// GetMessageOk returns a tuple with the Message 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 *LogForwarderResponse) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Message.Get(), o.Message.IsSet() +} + +// HasMessage returns a boolean if a field has been set. +func (o *LogForwarderResponse) HasMessage() bool { + if o != nil && o.Message.IsSet() { + return true + } + + return false +} + +// SetMessage gets a reference to the given NullableString and assigns it to the Message field. +func (o *LogForwarderResponse) SetMessage(v string) { + o.Message.Set(&v) +} +// SetMessageNil sets the value for Message to be an explicit nil +func (o *LogForwarderResponse) SetMessageNil() { + o.Message.Set(nil) +} + +// UnsetMessage ensures that no value is present for Message, not even an explicit nil +func (o *LogForwarderResponse) UnsetMessage() { + o.Message.Unset() +} + +func (o LogForwarderResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o LogForwarderResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + if o.Message.IsSet() { + toSerialize["message"] = o.Message.Get() + } + return toSerialize, nil +} + +type NullableLogForwarderResponse struct { + value *LogForwarderResponse + isSet bool +} + +func (v NullableLogForwarderResponse) Get() *LogForwarderResponse { + return v.value +} + +func (v *NullableLogForwarderResponse) Set(val *LogForwarderResponse) { + v.value = val + v.isSet = true +} + +func (v NullableLogForwarderResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableLogForwarderResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLogForwarderResponse(val *LogForwarderResponse) *NullableLogForwarderResponse { + return &NullableLogForwarderResponse{value: val, isSet: true} +} + +func (v NullableLogForwarderResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLogForwarderResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_log_forwarder_s3_connection_type.go b/model_log_forwarder_s3_connection_type.go new file mode 100644 index 0000000..79ffceb --- /dev/null +++ b/model_log_forwarder_s3_connection_type.go @@ -0,0 +1,342 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the LogForwarderS3ConnectionType type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LogForwarderS3ConnectionType{} + +// LogForwarderS3ConnectionType ArvanS3, AmazonS3, AlibabaS3 and Custom S3 connections +type LogForwarderS3ConnectionType struct { + SampleRate *int32 `json:"sample_rate,omitempty"` + S3Endpoint *string `json:"s3_endpoint,omitempty"` + AccessKey *string `json:"access_key,omitempty"` + SecretKey *string `json:"secret_key,omitempty"` + BucketName *string `json:"bucket_name,omitempty"` + ObjectSize *int32 `json:"object_size,omitempty"` + FlushInterval *int32 `json:"flush_interval,omitempty"` +} + +// NewLogForwarderS3ConnectionType instantiates a new LogForwarderS3ConnectionType object +// This constructor will assign default values to properties that have it defined, +// 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 NewLogForwarderS3ConnectionType() *LogForwarderS3ConnectionType { + this := LogForwarderS3ConnectionType{} + return &this +} + +// NewLogForwarderS3ConnectionTypeWithDefaults instantiates a new LogForwarderS3ConnectionType object +// This 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 NewLogForwarderS3ConnectionTypeWithDefaults() *LogForwarderS3ConnectionType { + this := LogForwarderS3ConnectionType{} + return &this +} + +// GetSampleRate returns the SampleRate field value if set, zero value otherwise. +func (o *LogForwarderS3ConnectionType) GetSampleRate() int32 { + if o == nil || IsNil(o.SampleRate) { + var ret int32 + return ret + } + return *o.SampleRate +} + +// GetSampleRateOk returns a tuple with the SampleRate field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LogForwarderS3ConnectionType) GetSampleRateOk() (*int32, bool) { + if o == nil || IsNil(o.SampleRate) { + return nil, false + } + return o.SampleRate, true +} + +// HasSampleRate returns a boolean if a field has been set. +func (o *LogForwarderS3ConnectionType) HasSampleRate() bool { + if o != nil && !IsNil(o.SampleRate) { + return true + } + + return false +} + +// SetSampleRate gets a reference to the given int32 and assigns it to the SampleRate field. +func (o *LogForwarderS3ConnectionType) SetSampleRate(v int32) { + o.SampleRate = &v +} + +// GetS3Endpoint returns the S3Endpoint field value if set, zero value otherwise. +func (o *LogForwarderS3ConnectionType) GetS3Endpoint() string { + if o == nil || IsNil(o.S3Endpoint) { + var ret string + return ret + } + return *o.S3Endpoint +} + +// GetS3EndpointOk returns a tuple with the S3Endpoint field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LogForwarderS3ConnectionType) GetS3EndpointOk() (*string, bool) { + if o == nil || IsNil(o.S3Endpoint) { + return nil, false + } + return o.S3Endpoint, true +} + +// HasS3Endpoint returns a boolean if a field has been set. +func (o *LogForwarderS3ConnectionType) HasS3Endpoint() bool { + if o != nil && !IsNil(o.S3Endpoint) { + return true + } + + return false +} + +// SetS3Endpoint gets a reference to the given string and assigns it to the S3Endpoint field. +func (o *LogForwarderS3ConnectionType) SetS3Endpoint(v string) { + o.S3Endpoint = &v +} + +// GetAccessKey returns the AccessKey field value if set, zero value otherwise. +func (o *LogForwarderS3ConnectionType) GetAccessKey() string { + if o == nil || IsNil(o.AccessKey) { + var ret string + return ret + } + return *o.AccessKey +} + +// GetAccessKeyOk returns a tuple with the AccessKey field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LogForwarderS3ConnectionType) GetAccessKeyOk() (*string, bool) { + if o == nil || IsNil(o.AccessKey) { + return nil, false + } + return o.AccessKey, true +} + +// HasAccessKey returns a boolean if a field has been set. +func (o *LogForwarderS3ConnectionType) HasAccessKey() bool { + if o != nil && !IsNil(o.AccessKey) { + return true + } + + return false +} + +// SetAccessKey gets a reference to the given string and assigns it to the AccessKey field. +func (o *LogForwarderS3ConnectionType) SetAccessKey(v string) { + o.AccessKey = &v +} + +// GetSecretKey returns the SecretKey field value if set, zero value otherwise. +func (o *LogForwarderS3ConnectionType) GetSecretKey() string { + if o == nil || IsNil(o.SecretKey) { + var ret string + return ret + } + return *o.SecretKey +} + +// GetSecretKeyOk returns a tuple with the SecretKey field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LogForwarderS3ConnectionType) GetSecretKeyOk() (*string, bool) { + if o == nil || IsNil(o.SecretKey) { + return nil, false + } + return o.SecretKey, true +} + +// HasSecretKey returns a boolean if a field has been set. +func (o *LogForwarderS3ConnectionType) HasSecretKey() bool { + if o != nil && !IsNil(o.SecretKey) { + return true + } + + return false +} + +// SetSecretKey gets a reference to the given string and assigns it to the SecretKey field. +func (o *LogForwarderS3ConnectionType) SetSecretKey(v string) { + o.SecretKey = &v +} + +// GetBucketName returns the BucketName field value if set, zero value otherwise. +func (o *LogForwarderS3ConnectionType) GetBucketName() string { + if o == nil || IsNil(o.BucketName) { + var ret string + return ret + } + return *o.BucketName +} + +// GetBucketNameOk returns a tuple with the BucketName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LogForwarderS3ConnectionType) GetBucketNameOk() (*string, bool) { + if o == nil || IsNil(o.BucketName) { + return nil, false + } + return o.BucketName, true +} + +// HasBucketName returns a boolean if a field has been set. +func (o *LogForwarderS3ConnectionType) HasBucketName() bool { + if o != nil && !IsNil(o.BucketName) { + return true + } + + return false +} + +// SetBucketName gets a reference to the given string and assigns it to the BucketName field. +func (o *LogForwarderS3ConnectionType) SetBucketName(v string) { + o.BucketName = &v +} + +// GetObjectSize returns the ObjectSize field value if set, zero value otherwise. +func (o *LogForwarderS3ConnectionType) GetObjectSize() int32 { + if o == nil || IsNil(o.ObjectSize) { + var ret int32 + return ret + } + return *o.ObjectSize +} + +// GetObjectSizeOk returns a tuple with the ObjectSize field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LogForwarderS3ConnectionType) GetObjectSizeOk() (*int32, bool) { + if o == nil || IsNil(o.ObjectSize) { + return nil, false + } + return o.ObjectSize, true +} + +// HasObjectSize returns a boolean if a field has been set. +func (o *LogForwarderS3ConnectionType) HasObjectSize() bool { + if o != nil && !IsNil(o.ObjectSize) { + return true + } + + return false +} + +// SetObjectSize gets a reference to the given int32 and assigns it to the ObjectSize field. +func (o *LogForwarderS3ConnectionType) SetObjectSize(v int32) { + o.ObjectSize = &v +} + +// GetFlushInterval returns the FlushInterval field value if set, zero value otherwise. +func (o *LogForwarderS3ConnectionType) GetFlushInterval() int32 { + if o == nil || IsNil(o.FlushInterval) { + var ret int32 + return ret + } + return *o.FlushInterval +} + +// GetFlushIntervalOk returns a tuple with the FlushInterval field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LogForwarderS3ConnectionType) GetFlushIntervalOk() (*int32, bool) { + if o == nil || IsNil(o.FlushInterval) { + return nil, false + } + return o.FlushInterval, true +} + +// HasFlushInterval returns a boolean if a field has been set. +func (o *LogForwarderS3ConnectionType) HasFlushInterval() bool { + if o != nil && !IsNil(o.FlushInterval) { + return true + } + + return false +} + +// SetFlushInterval gets a reference to the given int32 and assigns it to the FlushInterval field. +func (o *LogForwarderS3ConnectionType) SetFlushInterval(v int32) { + o.FlushInterval = &v +} + +func (o LogForwarderS3ConnectionType) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o LogForwarderS3ConnectionType) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.SampleRate) { + toSerialize["sample_rate"] = o.SampleRate + } + if !IsNil(o.S3Endpoint) { + toSerialize["s3_endpoint"] = o.S3Endpoint + } + if !IsNil(o.AccessKey) { + toSerialize["access_key"] = o.AccessKey + } + if !IsNil(o.SecretKey) { + toSerialize["secret_key"] = o.SecretKey + } + if !IsNil(o.BucketName) { + toSerialize["bucket_name"] = o.BucketName + } + if !IsNil(o.ObjectSize) { + toSerialize["object_size"] = o.ObjectSize + } + if !IsNil(o.FlushInterval) { + toSerialize["flush_interval"] = o.FlushInterval + } + return toSerialize, nil +} + +type NullableLogForwarderS3ConnectionType struct { + value *LogForwarderS3ConnectionType + isSet bool +} + +func (v NullableLogForwarderS3ConnectionType) Get() *LogForwarderS3ConnectionType { + return v.value +} + +func (v *NullableLogForwarderS3ConnectionType) Set(val *LogForwarderS3ConnectionType) { + v.value = val + v.isSet = true +} + +func (v NullableLogForwarderS3ConnectionType) IsSet() bool { + return v.isSet +} + +func (v *NullableLogForwarderS3ConnectionType) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLogForwarderS3ConnectionType(val *LogForwarderS3ConnectionType) *NullableLogForwarderS3ConnectionType { + return &NullableLogForwarderS3ConnectionType{value: val, isSet: true} +} + +func (v NullableLogForwarderS3ConnectionType) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLogForwarderS3ConnectionType) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_log_forwarder_setting.go b/model_log_forwarder_setting.go new file mode 100644 index 0000000..c4de900 --- /dev/null +++ b/model_log_forwarder_setting.go @@ -0,0 +1,238 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" + "fmt" +) + +// LogForwarderSetting - struct for LogForwarderSetting +type LogForwarderSetting struct { + LogForwarderDatadogConnectionType *LogForwarderDatadogConnectionType + LogForwarderKafkaConnectionType *LogForwarderKafkaConnectionType + LogForwarderLogglyConnectionType *LogForwarderLogglyConnectionType + LogForwarderS3ConnectionType *LogForwarderS3ConnectionType + LogForwarderSyslogConnectionType *LogForwarderSyslogConnectionType +} + +// LogForwarderDatadogConnectionTypeAsLogForwarderSetting is a convenience function that returns LogForwarderDatadogConnectionType wrapped in LogForwarderSetting +func LogForwarderDatadogConnectionTypeAsLogForwarderSetting(v *LogForwarderDatadogConnectionType) LogForwarderSetting { + return LogForwarderSetting{ + LogForwarderDatadogConnectionType: v, + } +} + +// LogForwarderKafkaConnectionTypeAsLogForwarderSetting is a convenience function that returns LogForwarderKafkaConnectionType wrapped in LogForwarderSetting +func LogForwarderKafkaConnectionTypeAsLogForwarderSetting(v *LogForwarderKafkaConnectionType) LogForwarderSetting { + return LogForwarderSetting{ + LogForwarderKafkaConnectionType: v, + } +} + +// LogForwarderLogglyConnectionTypeAsLogForwarderSetting is a convenience function that returns LogForwarderLogglyConnectionType wrapped in LogForwarderSetting +func LogForwarderLogglyConnectionTypeAsLogForwarderSetting(v *LogForwarderLogglyConnectionType) LogForwarderSetting { + return LogForwarderSetting{ + LogForwarderLogglyConnectionType: v, + } +} + +// LogForwarderS3ConnectionTypeAsLogForwarderSetting is a convenience function that returns LogForwarderS3ConnectionType wrapped in LogForwarderSetting +func LogForwarderS3ConnectionTypeAsLogForwarderSetting(v *LogForwarderS3ConnectionType) LogForwarderSetting { + return LogForwarderSetting{ + LogForwarderS3ConnectionType: v, + } +} + +// LogForwarderSyslogConnectionTypeAsLogForwarderSetting is a convenience function that returns LogForwarderSyslogConnectionType wrapped in LogForwarderSetting +func LogForwarderSyslogConnectionTypeAsLogForwarderSetting(v *LogForwarderSyslogConnectionType) LogForwarderSetting { + return LogForwarderSetting{ + LogForwarderSyslogConnectionType: v, + } +} + + +// Unmarshal JSON data into one of the pointers in the struct +func (dst *LogForwarderSetting) UnmarshalJSON(data []byte) error { + var err error + match := 0 + // try to unmarshal data into LogForwarderDatadogConnectionType + err = newStrictDecoder(data).Decode(&dst.LogForwarderDatadogConnectionType) + if err == nil { + jsonLogForwarderDatadogConnectionType, _ := json.Marshal(dst.LogForwarderDatadogConnectionType) + if string(jsonLogForwarderDatadogConnectionType) == "{}" { // empty struct + dst.LogForwarderDatadogConnectionType = nil + } else { + match++ + } + } else { + dst.LogForwarderDatadogConnectionType = nil + } + + // try to unmarshal data into LogForwarderKafkaConnectionType + err = newStrictDecoder(data).Decode(&dst.LogForwarderKafkaConnectionType) + if err == nil { + jsonLogForwarderKafkaConnectionType, _ := json.Marshal(dst.LogForwarderKafkaConnectionType) + if string(jsonLogForwarderKafkaConnectionType) == "{}" { // empty struct + dst.LogForwarderKafkaConnectionType = nil + } else { + match++ + } + } else { + dst.LogForwarderKafkaConnectionType = nil + } + + // try to unmarshal data into LogForwarderLogglyConnectionType + err = newStrictDecoder(data).Decode(&dst.LogForwarderLogglyConnectionType) + if err == nil { + jsonLogForwarderLogglyConnectionType, _ := json.Marshal(dst.LogForwarderLogglyConnectionType) + if string(jsonLogForwarderLogglyConnectionType) == "{}" { // empty struct + dst.LogForwarderLogglyConnectionType = nil + } else { + match++ + } + } else { + dst.LogForwarderLogglyConnectionType = nil + } + + // try to unmarshal data into LogForwarderS3ConnectionType + err = newStrictDecoder(data).Decode(&dst.LogForwarderS3ConnectionType) + if err == nil { + jsonLogForwarderS3ConnectionType, _ := json.Marshal(dst.LogForwarderS3ConnectionType) + if string(jsonLogForwarderS3ConnectionType) == "{}" { // empty struct + dst.LogForwarderS3ConnectionType = nil + } else { + match++ + } + } else { + dst.LogForwarderS3ConnectionType = nil + } + + // try to unmarshal data into LogForwarderSyslogConnectionType + err = newStrictDecoder(data).Decode(&dst.LogForwarderSyslogConnectionType) + if err == nil { + jsonLogForwarderSyslogConnectionType, _ := json.Marshal(dst.LogForwarderSyslogConnectionType) + if string(jsonLogForwarderSyslogConnectionType) == "{}" { // empty struct + dst.LogForwarderSyslogConnectionType = nil + } else { + match++ + } + } else { + dst.LogForwarderSyslogConnectionType = nil + } + + if match > 1 { // more than 1 match + // reset to nil + dst.LogForwarderDatadogConnectionType = nil + dst.LogForwarderKafkaConnectionType = nil + dst.LogForwarderLogglyConnectionType = nil + dst.LogForwarderS3ConnectionType = nil + dst.LogForwarderSyslogConnectionType = nil + + return fmt.Errorf("data matches more than one schema in oneOf(LogForwarderSetting)") + } else if match == 1 { + return nil // exactly one match + } else { // no match + return fmt.Errorf("data failed to match schemas in oneOf(LogForwarderSetting)") + } +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src LogForwarderSetting) MarshalJSON() ([]byte, error) { + if src.LogForwarderDatadogConnectionType != nil { + return json.Marshal(&src.LogForwarderDatadogConnectionType) + } + + if src.LogForwarderKafkaConnectionType != nil { + return json.Marshal(&src.LogForwarderKafkaConnectionType) + } + + if src.LogForwarderLogglyConnectionType != nil { + return json.Marshal(&src.LogForwarderLogglyConnectionType) + } + + if src.LogForwarderS3ConnectionType != nil { + return json.Marshal(&src.LogForwarderS3ConnectionType) + } + + if src.LogForwarderSyslogConnectionType != nil { + return json.Marshal(&src.LogForwarderSyslogConnectionType) + } + + return nil, nil // no data in oneOf schemas +} + +// Get the actual instance +func (obj *LogForwarderSetting) GetActualInstance() (interface{}) { + if obj == nil { + return nil + } + if obj.LogForwarderDatadogConnectionType != nil { + return obj.LogForwarderDatadogConnectionType + } + + if obj.LogForwarderKafkaConnectionType != nil { + return obj.LogForwarderKafkaConnectionType + } + + if obj.LogForwarderLogglyConnectionType != nil { + return obj.LogForwarderLogglyConnectionType + } + + if obj.LogForwarderS3ConnectionType != nil { + return obj.LogForwarderS3ConnectionType + } + + if obj.LogForwarderSyslogConnectionType != nil { + return obj.LogForwarderSyslogConnectionType + } + + // all schemas are nil + return nil +} + +type NullableLogForwarderSetting struct { + value *LogForwarderSetting + isSet bool +} + +func (v NullableLogForwarderSetting) Get() *LogForwarderSetting { + return v.value +} + +func (v *NullableLogForwarderSetting) Set(val *LogForwarderSetting) { + v.value = val + v.isSet = true +} + +func (v NullableLogForwarderSetting) IsSet() bool { + return v.isSet +} + +func (v *NullableLogForwarderSetting) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLogForwarderSetting(val *LogForwarderSetting) *NullableLogForwarderSetting { + return &NullableLogForwarderSetting{value: val, isSet: true} +} + +func (v NullableLogForwarderSetting) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLogForwarderSetting) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_log_forwarder_summary.go b/model_log_forwarder_summary.go new file mode 100644 index 0000000..ffa0ae9 --- /dev/null +++ b/model_log_forwarder_summary.go @@ -0,0 +1,306 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the LogForwarderSummary type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LogForwarderSummary{} + +// LogForwarderSummary struct for LogForwarderSummary +type LogForwarderSummary struct { + Id *string `json:"id,omitempty"` + Type *string `json:"type,omitempty"` + ConnectionType *string `json:"connection_type,omitempty"` + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + Status *bool `json:"status,omitempty"` +} + +// NewLogForwarderSummary instantiates a new LogForwarderSummary object +// This constructor will assign default values to properties that have it defined, +// 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 NewLogForwarderSummary() *LogForwarderSummary { + this := LogForwarderSummary{} + return &this +} + +// NewLogForwarderSummaryWithDefaults instantiates a new LogForwarderSummary object +// This 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 NewLogForwarderSummaryWithDefaults() *LogForwarderSummary { + this := LogForwarderSummary{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *LogForwarderSummary) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LogForwarderSummary) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *LogForwarderSummary) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *LogForwarderSummary) SetId(v string) { + o.Id = &v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *LogForwarderSummary) 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 *LogForwarderSummary) 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 *LogForwarderSummary) 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 *LogForwarderSummary) SetType(v string) { + o.Type = &v +} + +// GetConnectionType returns the ConnectionType field value if set, zero value otherwise. +func (o *LogForwarderSummary) GetConnectionType() string { + if o == nil || IsNil(o.ConnectionType) { + var ret string + return ret + } + return *o.ConnectionType +} + +// GetConnectionTypeOk returns a tuple with the ConnectionType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LogForwarderSummary) GetConnectionTypeOk() (*string, bool) { + if o == nil || IsNil(o.ConnectionType) { + return nil, false + } + return o.ConnectionType, true +} + +// HasConnectionType returns a boolean if a field has been set. +func (o *LogForwarderSummary) HasConnectionType() bool { + if o != nil && !IsNil(o.ConnectionType) { + return true + } + + return false +} + +// SetConnectionType gets a reference to the given string and assigns it to the ConnectionType field. +func (o *LogForwarderSummary) SetConnectionType(v string) { + o.ConnectionType = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *LogForwarderSummary) 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 *LogForwarderSummary) 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 *LogForwarderSummary) 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 *LogForwarderSummary) SetName(v string) { + o.Name = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *LogForwarderSummary) 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 *LogForwarderSummary) 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 *LogForwarderSummary) 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 *LogForwarderSummary) SetDescription(v string) { + o.Description = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *LogForwarderSummary) GetStatus() bool { + if o == nil || IsNil(o.Status) { + var ret bool + 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 *LogForwarderSummary) GetStatusOk() (*bool, 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 *LogForwarderSummary) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given bool and assigns it to the Status field. +func (o *LogForwarderSummary) SetStatus(v bool) { + o.Status = &v +} + +func (o LogForwarderSummary) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o LogForwarderSummary) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.ConnectionType) { + toSerialize["connection_type"] = o.ConnectionType + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + return toSerialize, nil +} + +type NullableLogForwarderSummary struct { + value *LogForwarderSummary + isSet bool +} + +func (v NullableLogForwarderSummary) Get() *LogForwarderSummary { + return v.value +} + +func (v *NullableLogForwarderSummary) Set(val *LogForwarderSummary) { + v.value = val + v.isSet = true +} + +func (v NullableLogForwarderSummary) IsSet() bool { + return v.isSet +} + +func (v *NullableLogForwarderSummary) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLogForwarderSummary(val *LogForwarderSummary) *NullableLogForwarderSummary { + return &NullableLogForwarderSummary{value: val, isSet: true} +} + +func (v NullableLogForwarderSummary) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLogForwarderSummary) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_log_forwarder_syslog_connection_type.go b/model_log_forwarder_syslog_connection_type.go new file mode 100644 index 0000000..f75d6c0 --- /dev/null +++ b/model_log_forwarder_syslog_connection_type.go @@ -0,0 +1,342 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the LogForwarderSyslogConnectionType type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LogForwarderSyslogConnectionType{} + +// LogForwarderSyslogConnectionType Syslog connection +type LogForwarderSyslogConnectionType struct { + SampleRate *int32 `json:"sample_rate,omitempty"` + Logtype *string `json:"logtype,omitempty"` + Host *string `json:"host,omitempty"` + Port *int32 `json:"port,omitempty"` + Tls *bool `json:"tls,omitempty"` + Cert *string `json:"cert,omitempty"` + RetryTime *int32 `json:"retry_time,omitempty"` +} + +// NewLogForwarderSyslogConnectionType instantiates a new LogForwarderSyslogConnectionType object +// This constructor will assign default values to properties that have it defined, +// 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 NewLogForwarderSyslogConnectionType() *LogForwarderSyslogConnectionType { + this := LogForwarderSyslogConnectionType{} + return &this +} + +// NewLogForwarderSyslogConnectionTypeWithDefaults instantiates a new LogForwarderSyslogConnectionType object +// This 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 NewLogForwarderSyslogConnectionTypeWithDefaults() *LogForwarderSyslogConnectionType { + this := LogForwarderSyslogConnectionType{} + return &this +} + +// GetSampleRate returns the SampleRate field value if set, zero value otherwise. +func (o *LogForwarderSyslogConnectionType) GetSampleRate() int32 { + if o == nil || IsNil(o.SampleRate) { + var ret int32 + return ret + } + return *o.SampleRate +} + +// GetSampleRateOk returns a tuple with the SampleRate field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LogForwarderSyslogConnectionType) GetSampleRateOk() (*int32, bool) { + if o == nil || IsNil(o.SampleRate) { + return nil, false + } + return o.SampleRate, true +} + +// HasSampleRate returns a boolean if a field has been set. +func (o *LogForwarderSyslogConnectionType) HasSampleRate() bool { + if o != nil && !IsNil(o.SampleRate) { + return true + } + + return false +} + +// SetSampleRate gets a reference to the given int32 and assigns it to the SampleRate field. +func (o *LogForwarderSyslogConnectionType) SetSampleRate(v int32) { + o.SampleRate = &v +} + +// GetLogtype returns the Logtype field value if set, zero value otherwise. +func (o *LogForwarderSyslogConnectionType) GetLogtype() string { + if o == nil || IsNil(o.Logtype) { + var ret string + return ret + } + return *o.Logtype +} + +// GetLogtypeOk returns a tuple with the Logtype field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LogForwarderSyslogConnectionType) GetLogtypeOk() (*string, bool) { + if o == nil || IsNil(o.Logtype) { + return nil, false + } + return o.Logtype, true +} + +// HasLogtype returns a boolean if a field has been set. +func (o *LogForwarderSyslogConnectionType) HasLogtype() bool { + if o != nil && !IsNil(o.Logtype) { + return true + } + + return false +} + +// SetLogtype gets a reference to the given string and assigns it to the Logtype field. +func (o *LogForwarderSyslogConnectionType) SetLogtype(v string) { + o.Logtype = &v +} + +// GetHost returns the Host field value if set, zero value otherwise. +func (o *LogForwarderSyslogConnectionType) GetHost() string { + if o == nil || IsNil(o.Host) { + var ret string + return ret + } + return *o.Host +} + +// GetHostOk returns a tuple with the Host field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LogForwarderSyslogConnectionType) GetHostOk() (*string, bool) { + if o == nil || IsNil(o.Host) { + return nil, false + } + return o.Host, true +} + +// HasHost returns a boolean if a field has been set. +func (o *LogForwarderSyslogConnectionType) HasHost() bool { + if o != nil && !IsNil(o.Host) { + return true + } + + return false +} + +// SetHost gets a reference to the given string and assigns it to the Host field. +func (o *LogForwarderSyslogConnectionType) SetHost(v string) { + o.Host = &v +} + +// GetPort returns the Port field value if set, zero value otherwise. +func (o *LogForwarderSyslogConnectionType) GetPort() int32 { + if o == nil || IsNil(o.Port) { + var ret int32 + return ret + } + return *o.Port +} + +// GetPortOk returns a tuple with the Port field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LogForwarderSyslogConnectionType) GetPortOk() (*int32, bool) { + if o == nil || IsNil(o.Port) { + return nil, false + } + return o.Port, true +} + +// HasPort returns a boolean if a field has been set. +func (o *LogForwarderSyslogConnectionType) HasPort() bool { + if o != nil && !IsNil(o.Port) { + return true + } + + return false +} + +// SetPort gets a reference to the given int32 and assigns it to the Port field. +func (o *LogForwarderSyslogConnectionType) SetPort(v int32) { + o.Port = &v +} + +// GetTls returns the Tls field value if set, zero value otherwise. +func (o *LogForwarderSyslogConnectionType) GetTls() bool { + if o == nil || IsNil(o.Tls) { + var ret bool + return ret + } + return *o.Tls +} + +// GetTlsOk returns a tuple with the Tls field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LogForwarderSyslogConnectionType) GetTlsOk() (*bool, bool) { + if o == nil || IsNil(o.Tls) { + return nil, false + } + return o.Tls, true +} + +// HasTls returns a boolean if a field has been set. +func (o *LogForwarderSyslogConnectionType) HasTls() bool { + if o != nil && !IsNil(o.Tls) { + return true + } + + return false +} + +// SetTls gets a reference to the given bool and assigns it to the Tls field. +func (o *LogForwarderSyslogConnectionType) SetTls(v bool) { + o.Tls = &v +} + +// GetCert returns the Cert field value if set, zero value otherwise. +func (o *LogForwarderSyslogConnectionType) GetCert() string { + if o == nil || IsNil(o.Cert) { + var ret string + return ret + } + return *o.Cert +} + +// GetCertOk returns a tuple with the Cert field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LogForwarderSyslogConnectionType) GetCertOk() (*string, bool) { + if o == nil || IsNil(o.Cert) { + return nil, false + } + return o.Cert, true +} + +// HasCert returns a boolean if a field has been set. +func (o *LogForwarderSyslogConnectionType) HasCert() bool { + if o != nil && !IsNil(o.Cert) { + return true + } + + return false +} + +// SetCert gets a reference to the given string and assigns it to the Cert field. +func (o *LogForwarderSyslogConnectionType) SetCert(v string) { + o.Cert = &v +} + +// GetRetryTime returns the RetryTime field value if set, zero value otherwise. +func (o *LogForwarderSyslogConnectionType) GetRetryTime() int32 { + if o == nil || IsNil(o.RetryTime) { + var ret int32 + return ret + } + return *o.RetryTime +} + +// GetRetryTimeOk returns a tuple with the RetryTime field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LogForwarderSyslogConnectionType) GetRetryTimeOk() (*int32, bool) { + if o == nil || IsNil(o.RetryTime) { + return nil, false + } + return o.RetryTime, true +} + +// HasRetryTime returns a boolean if a field has been set. +func (o *LogForwarderSyslogConnectionType) HasRetryTime() bool { + if o != nil && !IsNil(o.RetryTime) { + return true + } + + return false +} + +// SetRetryTime gets a reference to the given int32 and assigns it to the RetryTime field. +func (o *LogForwarderSyslogConnectionType) SetRetryTime(v int32) { + o.RetryTime = &v +} + +func (o LogForwarderSyslogConnectionType) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o LogForwarderSyslogConnectionType) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.SampleRate) { + toSerialize["sample_rate"] = o.SampleRate + } + if !IsNil(o.Logtype) { + toSerialize["logtype"] = o.Logtype + } + if !IsNil(o.Host) { + toSerialize["host"] = o.Host + } + if !IsNil(o.Port) { + toSerialize["port"] = o.Port + } + if !IsNil(o.Tls) { + toSerialize["tls"] = o.Tls + } + if !IsNil(o.Cert) { + toSerialize["cert"] = o.Cert + } + if !IsNil(o.RetryTime) { + toSerialize["retry_time"] = o.RetryTime + } + return toSerialize, nil +} + +type NullableLogForwarderSyslogConnectionType struct { + value *LogForwarderSyslogConnectionType + isSet bool +} + +func (v NullableLogForwarderSyslogConnectionType) Get() *LogForwarderSyslogConnectionType { + return v.value +} + +func (v *NullableLogForwarderSyslogConnectionType) Set(val *LogForwarderSyslogConnectionType) { + v.value = val + v.isSet = true +} + +func (v NullableLogForwarderSyslogConnectionType) IsSet() bool { + return v.isSet +} + +func (v *NullableLogForwarderSyslogConnectionType) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLogForwarderSyslogConnectionType(val *LogForwarderSyslogConnectionType) *NullableLogForwarderSyslogConnectionType { + return &NullableLogForwarderSyslogConnectionType{value: val, isSet: true} +} + +func (v NullableLogForwarderSyslogConnectionType) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLogForwarderSyslogConnectionType) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_log_forwarder_waf_type.go b/model_log_forwarder_waf_type.go new file mode 100644 index 0000000..97361f8 --- /dev/null +++ b/model_log_forwarder_waf_type.go @@ -0,0 +1,270 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the LogForwarderWAFType type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LogForwarderWAFType{} + +// LogForwarderWAFType Waf log type +type LogForwarderWAFType struct { + Product *bool `json:"product,omitempty"` + Timestamp *bool `json:"timestamp,omitempty"` + RemoteAddress *bool `json:"remote_address,omitempty"` + Domain *bool `json:"domain,omitempty"` + Data *bool `json:"data,omitempty"` +} + +// NewLogForwarderWAFType instantiates a new LogForwarderWAFType object +// This constructor will assign default values to properties that have it defined, +// 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 NewLogForwarderWAFType() *LogForwarderWAFType { + this := LogForwarderWAFType{} + return &this +} + +// NewLogForwarderWAFTypeWithDefaults instantiates a new LogForwarderWAFType object +// This 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 NewLogForwarderWAFTypeWithDefaults() *LogForwarderWAFType { + this := LogForwarderWAFType{} + return &this +} + +// GetProduct returns the Product field value if set, zero value otherwise. +func (o *LogForwarderWAFType) GetProduct() bool { + if o == nil || IsNil(o.Product) { + var ret bool + return ret + } + return *o.Product +} + +// GetProductOk returns a tuple with the Product field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LogForwarderWAFType) GetProductOk() (*bool, bool) { + if o == nil || IsNil(o.Product) { + return nil, false + } + return o.Product, true +} + +// HasProduct returns a boolean if a field has been set. +func (o *LogForwarderWAFType) HasProduct() bool { + if o != nil && !IsNil(o.Product) { + return true + } + + return false +} + +// SetProduct gets a reference to the given bool and assigns it to the Product field. +func (o *LogForwarderWAFType) SetProduct(v bool) { + o.Product = &v +} + +// GetTimestamp returns the Timestamp field value if set, zero value otherwise. +func (o *LogForwarderWAFType) GetTimestamp() bool { + if o == nil || IsNil(o.Timestamp) { + var ret bool + return ret + } + return *o.Timestamp +} + +// GetTimestampOk returns a tuple with the Timestamp field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LogForwarderWAFType) GetTimestampOk() (*bool, bool) { + if o == nil || IsNil(o.Timestamp) { + return nil, false + } + return o.Timestamp, true +} + +// HasTimestamp returns a boolean if a field has been set. +func (o *LogForwarderWAFType) HasTimestamp() bool { + if o != nil && !IsNil(o.Timestamp) { + return true + } + + return false +} + +// SetTimestamp gets a reference to the given bool and assigns it to the Timestamp field. +func (o *LogForwarderWAFType) SetTimestamp(v bool) { + o.Timestamp = &v +} + +// GetRemoteAddress returns the RemoteAddress field value if set, zero value otherwise. +func (o *LogForwarderWAFType) GetRemoteAddress() bool { + if o == nil || IsNil(o.RemoteAddress) { + var ret bool + return ret + } + return *o.RemoteAddress +} + +// GetRemoteAddressOk returns a tuple with the RemoteAddress field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LogForwarderWAFType) GetRemoteAddressOk() (*bool, bool) { + if o == nil || IsNil(o.RemoteAddress) { + return nil, false + } + return o.RemoteAddress, true +} + +// HasRemoteAddress returns a boolean if a field has been set. +func (o *LogForwarderWAFType) HasRemoteAddress() bool { + if o != nil && !IsNil(o.RemoteAddress) { + return true + } + + return false +} + +// SetRemoteAddress gets a reference to the given bool and assigns it to the RemoteAddress field. +func (o *LogForwarderWAFType) SetRemoteAddress(v bool) { + o.RemoteAddress = &v +} + +// GetDomain returns the Domain field value if set, zero value otherwise. +func (o *LogForwarderWAFType) GetDomain() bool { + if o == nil || IsNil(o.Domain) { + var ret bool + return ret + } + return *o.Domain +} + +// GetDomainOk returns a tuple with the Domain field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LogForwarderWAFType) GetDomainOk() (*bool, bool) { + if o == nil || IsNil(o.Domain) { + return nil, false + } + return o.Domain, true +} + +// HasDomain returns a boolean if a field has been set. +func (o *LogForwarderWAFType) HasDomain() bool { + if o != nil && !IsNil(o.Domain) { + return true + } + + return false +} + +// SetDomain gets a reference to the given bool and assigns it to the Domain field. +func (o *LogForwarderWAFType) SetDomain(v bool) { + o.Domain = &v +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *LogForwarderWAFType) GetData() bool { + if o == nil || IsNil(o.Data) { + var ret bool + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LogForwarderWAFType) GetDataOk() (*bool, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *LogForwarderWAFType) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given bool and assigns it to the Data field. +func (o *LogForwarderWAFType) SetData(v bool) { + o.Data = &v +} + +func (o LogForwarderWAFType) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o LogForwarderWAFType) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Product) { + toSerialize["product"] = o.Product + } + if !IsNil(o.Timestamp) { + toSerialize["timestamp"] = o.Timestamp + } + if !IsNil(o.RemoteAddress) { + toSerialize["remote_address"] = o.RemoteAddress + } + if !IsNil(o.Domain) { + toSerialize["domain"] = o.Domain + } + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + return toSerialize, nil +} + +type NullableLogForwarderWAFType struct { + value *LogForwarderWAFType + isSet bool +} + +func (v NullableLogForwarderWAFType) Get() *LogForwarderWAFType { + return v.value +} + +func (v *NullableLogForwarderWAFType) Set(val *LogForwarderWAFType) { + v.value = val + v.isSet = true +} + +func (v NullableLogForwarderWAFType) IsSet() bool { + return v.isSet +} + +func (v *NullableLogForwarderWAFType) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLogForwarderWAFType(val *LogForwarderWAFType) *NullableLogForwarderWAFType { + return &NullableLogForwarderWAFType{value: val, isSet: true} +} + +func (v NullableLogForwarderWAFType) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLogForwarderWAFType) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_log_forwarders_index_200_response.go b/model_log_forwarders_index_200_response.go new file mode 100644 index 0000000..c9555cd --- /dev/null +++ b/model_log_forwarders_index_200_response.go @@ -0,0 +1,198 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the LogForwardersIndex200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LogForwardersIndex200Response{} + +// LogForwardersIndex200Response struct for LogForwardersIndex200Response +type LogForwardersIndex200Response struct { + Data []LogForwarderSummary `json:"data,omitempty"` + Links *PaginatedResponseLinks `json:"links,omitempty"` + Meta *PaginatedResponseMeta `json:"meta,omitempty"` +} + +// NewLogForwardersIndex200Response instantiates a new LogForwardersIndex200Response object +// This constructor will assign default values to properties that have it defined, +// 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 NewLogForwardersIndex200Response() *LogForwardersIndex200Response { + this := LogForwardersIndex200Response{} + return &this +} + +// NewLogForwardersIndex200ResponseWithDefaults instantiates a new LogForwardersIndex200Response object +// This 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 NewLogForwardersIndex200ResponseWithDefaults() *LogForwardersIndex200Response { + this := LogForwardersIndex200Response{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *LogForwardersIndex200Response) GetData() []LogForwarderSummary { + if o == nil || IsNil(o.Data) { + var ret []LogForwarderSummary + return ret + } + return o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LogForwardersIndex200Response) GetDataOk() ([]LogForwarderSummary, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *LogForwardersIndex200Response) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given []LogForwarderSummary and assigns it to the Data field. +func (o *LogForwardersIndex200Response) SetData(v []LogForwarderSummary) { + o.Data = v +} + +// GetLinks returns the Links field value if set, zero value otherwise. +func (o *LogForwardersIndex200Response) GetLinks() PaginatedResponseLinks { + if o == nil || IsNil(o.Links) { + var ret PaginatedResponseLinks + return ret + } + return *o.Links +} + +// GetLinksOk returns a tuple with the Links field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LogForwardersIndex200Response) GetLinksOk() (*PaginatedResponseLinks, bool) { + if o == nil || IsNil(o.Links) { + return nil, false + } + return o.Links, true +} + +// HasLinks returns a boolean if a field has been set. +func (o *LogForwardersIndex200Response) HasLinks() bool { + if o != nil && !IsNil(o.Links) { + return true + } + + return false +} + +// SetLinks gets a reference to the given PaginatedResponseLinks and assigns it to the Links field. +func (o *LogForwardersIndex200Response) SetLinks(v PaginatedResponseLinks) { + o.Links = &v +} + +// GetMeta returns the Meta field value if set, zero value otherwise. +func (o *LogForwardersIndex200Response) GetMeta() PaginatedResponseMeta { + if o == nil || IsNil(o.Meta) { + var ret PaginatedResponseMeta + return ret + } + return *o.Meta +} + +// GetMetaOk returns a tuple with the Meta field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LogForwardersIndex200Response) GetMetaOk() (*PaginatedResponseMeta, bool) { + if o == nil || IsNil(o.Meta) { + return nil, false + } + return o.Meta, true +} + +// HasMeta returns a boolean if a field has been set. +func (o *LogForwardersIndex200Response) HasMeta() bool { + if o != nil && !IsNil(o.Meta) { + return true + } + + return false +} + +// SetMeta gets a reference to the given PaginatedResponseMeta and assigns it to the Meta field. +func (o *LogForwardersIndex200Response) SetMeta(v PaginatedResponseMeta) { + o.Meta = &v +} + +func (o LogForwardersIndex200Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o LogForwardersIndex200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + if !IsNil(o.Links) { + toSerialize["links"] = o.Links + } + if !IsNil(o.Meta) { + toSerialize["meta"] = o.Meta + } + return toSerialize, nil +} + +type NullableLogForwardersIndex200Response struct { + value *LogForwardersIndex200Response + isSet bool +} + +func (v NullableLogForwardersIndex200Response) Get() *LogForwardersIndex200Response { + return v.value +} + +func (v *NullableLogForwardersIndex200Response) Set(val *LogForwardersIndex200Response) { + v.value = val + v.isSet = true +} + +func (v NullableLogForwardersIndex200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableLogForwardersIndex200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLogForwardersIndex200Response(val *LogForwardersIndex200Response) *NullableLogForwardersIndex200Response { + return &NullableLogForwardersIndex200Response{value: val, isSet: true} +} + +func (v NullableLogForwardersIndex200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLogForwardersIndex200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_map_traffics_data.go b/model_map_traffics_data.go new file mode 100644 index 0000000..07161e0 --- /dev/null +++ b/model_map_traffics_data.go @@ -0,0 +1,162 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the MapTrafficsData type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &MapTrafficsData{} + +// MapTrafficsData struct for MapTrafficsData +type MapTrafficsData struct { + Data *map[string]interface{} `json:"data,omitempty"` + Lists []CountryList `json:"lists,omitempty"` +} + +// NewMapTrafficsData instantiates a new MapTrafficsData object +// This constructor will assign default values to properties that have it defined, +// 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 NewMapTrafficsData() *MapTrafficsData { + this := MapTrafficsData{} + return &this +} + +// NewMapTrafficsDataWithDefaults instantiates a new MapTrafficsData object +// This 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 NewMapTrafficsDataWithDefaults() *MapTrafficsData { + this := MapTrafficsData{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *MapTrafficsData) GetData() map[string]interface{} { + if o == nil || IsNil(o.Data) { + var ret map[string]interface{} + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MapTrafficsData) GetDataOk() (*map[string]interface{}, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *MapTrafficsData) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given map[string]interface{} and assigns it to the Data field. +func (o *MapTrafficsData) SetData(v map[string]interface{}) { + o.Data = &v +} + +// GetLists returns the Lists field value if set, zero value otherwise. +func (o *MapTrafficsData) GetLists() []CountryList { + if o == nil || IsNil(o.Lists) { + var ret []CountryList + return ret + } + return o.Lists +} + +// GetListsOk returns a tuple with the Lists field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MapTrafficsData) GetListsOk() ([]CountryList, bool) { + if o == nil || IsNil(o.Lists) { + return nil, false + } + return o.Lists, true +} + +// HasLists returns a boolean if a field has been set. +func (o *MapTrafficsData) HasLists() bool { + if o != nil && !IsNil(o.Lists) { + return true + } + + return false +} + +// SetLists gets a reference to the given []CountryList and assigns it to the Lists field. +func (o *MapTrafficsData) SetLists(v []CountryList) { + o.Lists = v +} + +func (o MapTrafficsData) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o MapTrafficsData) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + if !IsNil(o.Lists) { + toSerialize["lists"] = o.Lists + } + return toSerialize, nil +} + +type NullableMapTrafficsData struct { + value *MapTrafficsData + isSet bool +} + +func (v NullableMapTrafficsData) Get() *MapTrafficsData { + return v.value +} + +func (v *NullableMapTrafficsData) Set(val *MapTrafficsData) { + v.value = val + v.isSet = true +} + +func (v NullableMapTrafficsData) IsSet() bool { + return v.isSet +} + +func (v *NullableMapTrafficsData) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMapTrafficsData(val *MapTrafficsData) *NullableMapTrafficsData { + return &NullableMapTrafficsData{value: val, isSet: true} +} + +func (v NullableMapTrafficsData) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMapTrafficsData) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_message_response.go b/model_message_response.go new file mode 100644 index 0000000..ce2744c --- /dev/null +++ b/model_message_response.go @@ -0,0 +1,126 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the MessageResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &MessageResponse{} + +// MessageResponse struct for MessageResponse +type MessageResponse struct { + Message *string `json:"message,omitempty"` +} + +// NewMessageResponse instantiates a new MessageResponse object +// This constructor will assign default values to properties that have it defined, +// 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 NewMessageResponse() *MessageResponse { + this := MessageResponse{} + return &this +} + +// NewMessageResponseWithDefaults instantiates a new MessageResponse object +// This 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 NewMessageResponseWithDefaults() *MessageResponse { + this := MessageResponse{} + return &this +} + +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *MessageResponse) GetMessage() string { + if o == nil || IsNil(o.Message) { + var ret string + return ret + } + return *o.Message +} + +// GetMessageOk returns a tuple with the Message field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MessageResponse) GetMessageOk() (*string, bool) { + if o == nil || IsNil(o.Message) { + return nil, false + } + return o.Message, true +} + +// HasMessage returns a boolean if a field has been set. +func (o *MessageResponse) HasMessage() bool { + if o != nil && !IsNil(o.Message) { + return true + } + + return false +} + +// SetMessage gets a reference to the given string and assigns it to the Message field. +func (o *MessageResponse) SetMessage(v string) { + o.Message = &v +} + +func (o MessageResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o MessageResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Message) { + toSerialize["message"] = o.Message + } + return toSerialize, nil +} + +type NullableMessageResponse struct { + value *MessageResponse + isSet bool +} + +func (v NullableMessageResponse) Get() *MessageResponse { + return v.value +} + +func (v *NullableMessageResponse) Set(val *MessageResponse) { + v.value = val + v.isSet = true +} + +func (v NullableMessageResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableMessageResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMessageResponse(val *MessageResponse) *NullableMessageResponse { + return &NullableMessageResponse{value: val, isSet: true} +} + +func (v NullableMessageResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMessageResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_monitoring_status.go b/model_monitoring_status.go new file mode 100644 index 0000000..4deda12 --- /dev/null +++ b/model_monitoring_status.go @@ -0,0 +1,115 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" + "fmt" +) + +// MonitoringStatus the model 'MonitoringStatus' +type MonitoringStatus string + +// List of MonitoringStatus +const ( + OFF MonitoringStatus = "off" + NO_DATA MonitoringStatus = "no-data" + HEALTHY MonitoringStatus = "healthy" + UNHEALTHY MonitoringStatus = "unhealthy" +) + +// All allowed values of MonitoringStatus enum +var AllowedMonitoringStatusEnumValues = []MonitoringStatus{ + "off", + "no-data", + "healthy", + "unhealthy", +} + +func (v *MonitoringStatus) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := MonitoringStatus(value) + for _, existing := range AllowedMonitoringStatusEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid MonitoringStatus", value) +} + +// NewMonitoringStatusFromValue returns a pointer to a valid MonitoringStatus +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewMonitoringStatusFromValue(v string) (*MonitoringStatus, error) { + ev := MonitoringStatus(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for MonitoringStatus: valid values are %v", v, AllowedMonitoringStatusEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v MonitoringStatus) IsValid() bool { + for _, existing := range AllowedMonitoringStatusEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to MonitoringStatus value +func (v MonitoringStatus) Ptr() *MonitoringStatus { + return &v +} + +type NullableMonitoringStatus struct { + value *MonitoringStatus + isSet bool +} + +func (v NullableMonitoringStatus) Get() *MonitoringStatus { + return v.value +} + +func (v *NullableMonitoringStatus) Set(val *MonitoringStatus) { + v.value = val + v.isSet = true +} + +func (v NullableMonitoringStatus) IsSet() bool { + return v.isSet +} + +func (v *NullableMonitoringStatus) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMonitoringStatus(val *MonitoringStatus) *NullableMonitoringStatus { + return &NullableMonitoringStatus{value: val, isSet: true} +} + +func (v NullableMonitoringStatus) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMonitoringStatus) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + diff --git a/model_mx_record.go b/model_mx_record.go new file mode 100644 index 0000000..686a65a --- /dev/null +++ b/model_mx_record.go @@ -0,0 +1,520 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" + "time" +) + +// checks if the MXRecord type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &MXRecord{} + +// MXRecord struct for MXRecord +type MXRecord struct { + Value *MXRecordValue `json:"value,omitempty"` + Type *string `json:"type,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Ttl *int32 `json:"ttl,omitempty"` + Cloud *bool `json:"cloud,omitempty"` + UpstreamHttps *string `json:"upstream_https,omitempty"` + IpFilterMode *DnsRecordIpFilterMode `json:"ip_filter_mode,omitempty"` + // Protected records cannot be modified or deleted by user. + IsProtected *bool `json:"is_protected,omitempty"` + Usage []string `json:"usage,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty"` + UpdatedAt *time.Time `json:"updated_at,omitempty"` +} + +// NewMXRecord instantiates a new MXRecord object +// This constructor will assign default values to properties that have it defined, +// 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 NewMXRecord() *MXRecord { + this := MXRecord{} + var cloud bool = false + this.Cloud = &cloud + return &this +} + +// NewMXRecordWithDefaults instantiates a new MXRecord object +// This 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 NewMXRecordWithDefaults() *MXRecord { + this := MXRecord{} + var type_ string = "mx" + this.Type = &type_ + var cloud bool = false + this.Cloud = &cloud + return &this +} + +// GetValue returns the Value field value if set, zero value otherwise. +func (o *MXRecord) GetValue() MXRecordValue { + if o == nil || IsNil(o.Value) { + var ret MXRecordValue + return ret + } + return *o.Value +} + +// GetValueOk returns a tuple with the Value field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MXRecord) GetValueOk() (*MXRecordValue, bool) { + if o == nil || IsNil(o.Value) { + return nil, false + } + return o.Value, true +} + +// HasValue returns a boolean if a field has been set. +func (o *MXRecord) HasValue() bool { + if o != nil && !IsNil(o.Value) { + return true + } + + return false +} + +// SetValue gets a reference to the given MXRecordValue and assigns it to the Value field. +func (o *MXRecord) SetValue(v MXRecordValue) { + o.Value = &v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *MXRecord) 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 *MXRecord) 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 *MXRecord) 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 *MXRecord) SetType(v string) { + o.Type = &v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *MXRecord) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MXRecord) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *MXRecord) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *MXRecord) SetId(v string) { + o.Id = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *MXRecord) 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 *MXRecord) 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 *MXRecord) 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 *MXRecord) SetName(v string) { + o.Name = &v +} + +// GetTtl returns the Ttl field value if set, zero value otherwise. +func (o *MXRecord) GetTtl() int32 { + if o == nil || IsNil(o.Ttl) { + var ret int32 + return ret + } + return *o.Ttl +} + +// GetTtlOk returns a tuple with the Ttl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MXRecord) GetTtlOk() (*int32, bool) { + if o == nil || IsNil(o.Ttl) { + return nil, false + } + return o.Ttl, true +} + +// HasTtl returns a boolean if a field has been set. +func (o *MXRecord) HasTtl() bool { + if o != nil && !IsNil(o.Ttl) { + return true + } + + return false +} + +// SetTtl gets a reference to the given int32 and assigns it to the Ttl field. +func (o *MXRecord) SetTtl(v int32) { + o.Ttl = &v +} + +// GetCloud returns the Cloud field value if set, zero value otherwise. +func (o *MXRecord) GetCloud() bool { + if o == nil || IsNil(o.Cloud) { + var ret bool + return ret + } + return *o.Cloud +} + +// GetCloudOk returns a tuple with the Cloud field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MXRecord) GetCloudOk() (*bool, bool) { + if o == nil || IsNil(o.Cloud) { + return nil, false + } + return o.Cloud, true +} + +// HasCloud returns a boolean if a field has been set. +func (o *MXRecord) HasCloud() bool { + if o != nil && !IsNil(o.Cloud) { + return true + } + + return false +} + +// SetCloud gets a reference to the given bool and assigns it to the Cloud field. +func (o *MXRecord) SetCloud(v bool) { + o.Cloud = &v +} + +// GetUpstreamHttps returns the UpstreamHttps field value if set, zero value otherwise. +func (o *MXRecord) GetUpstreamHttps() string { + if o == nil || IsNil(o.UpstreamHttps) { + var ret string + return ret + } + return *o.UpstreamHttps +} + +// GetUpstreamHttpsOk returns a tuple with the UpstreamHttps field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MXRecord) GetUpstreamHttpsOk() (*string, bool) { + if o == nil || IsNil(o.UpstreamHttps) { + return nil, false + } + return o.UpstreamHttps, true +} + +// HasUpstreamHttps returns a boolean if a field has been set. +func (o *MXRecord) HasUpstreamHttps() bool { + if o != nil && !IsNil(o.UpstreamHttps) { + return true + } + + return false +} + +// SetUpstreamHttps gets a reference to the given string and assigns it to the UpstreamHttps field. +func (o *MXRecord) SetUpstreamHttps(v string) { + o.UpstreamHttps = &v +} + +// GetIpFilterMode returns the IpFilterMode field value if set, zero value otherwise. +func (o *MXRecord) GetIpFilterMode() DnsRecordIpFilterMode { + if o == nil || IsNil(o.IpFilterMode) { + var ret DnsRecordIpFilterMode + return ret + } + return *o.IpFilterMode +} + +// GetIpFilterModeOk returns a tuple with the IpFilterMode field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MXRecord) GetIpFilterModeOk() (*DnsRecordIpFilterMode, bool) { + if o == nil || IsNil(o.IpFilterMode) { + return nil, false + } + return o.IpFilterMode, true +} + +// HasIpFilterMode returns a boolean if a field has been set. +func (o *MXRecord) HasIpFilterMode() bool { + if o != nil && !IsNil(o.IpFilterMode) { + return true + } + + return false +} + +// SetIpFilterMode gets a reference to the given DnsRecordIpFilterMode and assigns it to the IpFilterMode field. +func (o *MXRecord) SetIpFilterMode(v DnsRecordIpFilterMode) { + o.IpFilterMode = &v +} + +// GetIsProtected returns the IsProtected field value if set, zero value otherwise. +func (o *MXRecord) GetIsProtected() bool { + if o == nil || IsNil(o.IsProtected) { + var ret bool + return ret + } + return *o.IsProtected +} + +// GetIsProtectedOk returns a tuple with the IsProtected field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MXRecord) GetIsProtectedOk() (*bool, bool) { + if o == nil || IsNil(o.IsProtected) { + return nil, false + } + return o.IsProtected, true +} + +// HasIsProtected returns a boolean if a field has been set. +func (o *MXRecord) HasIsProtected() bool { + if o != nil && !IsNil(o.IsProtected) { + return true + } + + return false +} + +// SetIsProtected gets a reference to the given bool and assigns it to the IsProtected field. +func (o *MXRecord) SetIsProtected(v bool) { + o.IsProtected = &v +} + +// GetUsage returns the Usage field value if set, zero value otherwise. +func (o *MXRecord) GetUsage() []string { + if o == nil || IsNil(o.Usage) { + var ret []string + return ret + } + return o.Usage +} + +// GetUsageOk returns a tuple with the Usage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MXRecord) GetUsageOk() ([]string, bool) { + if o == nil || IsNil(o.Usage) { + return nil, false + } + return o.Usage, true +} + +// HasUsage returns a boolean if a field has been set. +func (o *MXRecord) HasUsage() bool { + if o != nil && !IsNil(o.Usage) { + return true + } + + return false +} + +// SetUsage gets a reference to the given []string and assigns it to the Usage field. +func (o *MXRecord) SetUsage(v []string) { + o.Usage = v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *MXRecord) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MXRecord) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *MXRecord) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *MXRecord) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *MXRecord) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MXRecord) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *MXRecord) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *MXRecord) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +func (o MXRecord) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o MXRecord) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Value) { + toSerialize["value"] = o.Value + } + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + // skip: id is readOnly + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Ttl) { + toSerialize["ttl"] = o.Ttl + } + if !IsNil(o.Cloud) { + toSerialize["cloud"] = o.Cloud + } + if !IsNil(o.UpstreamHttps) { + toSerialize["upstream_https"] = o.UpstreamHttps + } + if !IsNil(o.IpFilterMode) { + toSerialize["ip_filter_mode"] = o.IpFilterMode + } + // skip: is_protected is readOnly + // skip: usage is readOnly + // skip: created_at is readOnly + // skip: updated_at is readOnly + return toSerialize, nil +} + +type NullableMXRecord struct { + value *MXRecord + isSet bool +} + +func (v NullableMXRecord) Get() *MXRecord { + return v.value +} + +func (v *NullableMXRecord) Set(val *MXRecord) { + v.value = val + v.isSet = true +} + +func (v NullableMXRecord) IsSet() bool { + return v.isSet +} + +func (v *NullableMXRecord) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMXRecord(val *MXRecord) *NullableMXRecord { + return &NullableMXRecord{value: val, isSet: true} +} + +func (v NullableMXRecord) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMXRecord) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_mx_record_value.go b/model_mx_record_value.go new file mode 100644 index 0000000..6c68922 --- /dev/null +++ b/model_mx_record_value.go @@ -0,0 +1,146 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the MXRecordValue type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &MXRecordValue{} + +// MXRecordValue struct for MXRecordValue +type MXRecordValue struct { + Host string `json:"host"` + Priority NullableInt32 `json:"priority"` +} + +// NewMXRecordValue instantiates a new MXRecordValue object +// This constructor will assign default values to properties that have it defined, +// 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 NewMXRecordValue(host string, priority NullableInt32) *MXRecordValue { + this := MXRecordValue{} + this.Host = host + this.Priority = priority + return &this +} + +// NewMXRecordValueWithDefaults instantiates a new MXRecordValue object +// This 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 NewMXRecordValueWithDefaults() *MXRecordValue { + this := MXRecordValue{} + return &this +} + +// GetHost returns the Host field value +func (o *MXRecordValue) GetHost() string { + if o == nil { + var ret string + return ret + } + + return o.Host +} + +// GetHostOk returns a tuple with the Host field value +// and a boolean to check if the value has been set. +func (o *MXRecordValue) GetHostOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Host, true +} + +// SetHost sets field value +func (o *MXRecordValue) SetHost(v string) { + o.Host = v +} + +// GetPriority returns the Priority field value +// If the value is explicit nil, the zero value for int32 will be returned +func (o *MXRecordValue) GetPriority() int32 { + if o == nil || o.Priority.Get() == nil { + var ret int32 + return ret + } + + return *o.Priority.Get() +} + +// GetPriorityOk returns a tuple with the Priority 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 *MXRecordValue) GetPriorityOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.Priority.Get(), o.Priority.IsSet() +} + +// SetPriority sets field value +func (o *MXRecordValue) SetPriority(v int32) { + o.Priority.Set(&v) +} + +func (o MXRecordValue) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o MXRecordValue) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["host"] = o.Host + toSerialize["priority"] = o.Priority.Get() + return toSerialize, nil +} + +type NullableMXRecordValue struct { + value *MXRecordValue + isSet bool +} + +func (v NullableMXRecordValue) Get() *MXRecordValue { + return v.value +} + +func (v *NullableMXRecordValue) Set(val *MXRecordValue) { + v.value = val + v.isSet = true +} + +func (v NullableMXRecordValue) IsSet() bool { + return v.isSet +} + +func (v *NullableMXRecordValue) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMXRecordValue(val *MXRecordValue) *NullableMXRecordValue { + return &NullableMXRecordValue{value: val, isSet: true} +} + +func (v NullableMXRecordValue) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMXRecordValue) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_ns_domain.go b/model_ns_domain.go new file mode 100644 index 0000000..d27056d --- /dev/null +++ b/model_ns_domain.go @@ -0,0 +1,164 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the NsDomain type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &NsDomain{} + +// NsDomain struct for NsDomain +type NsDomain struct { + // Current NS records of the domain + NsDomain []string `json:"ns_domain,omitempty"` + // Desired NS values for the domain + NsKeys []string `json:"ns_keys,omitempty"` +} + +// NewNsDomain instantiates a new NsDomain object +// This constructor will assign default values to properties that have it defined, +// 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 NewNsDomain() *NsDomain { + this := NsDomain{} + return &this +} + +// NewNsDomainWithDefaults instantiates a new NsDomain object +// This 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 NewNsDomainWithDefaults() *NsDomain { + this := NsDomain{} + return &this +} + +// GetNsDomain returns the NsDomain field value if set, zero value otherwise. +func (o *NsDomain) GetNsDomain() []string { + if o == nil || IsNil(o.NsDomain) { + var ret []string + return ret + } + return o.NsDomain +} + +// GetNsDomainOk returns a tuple with the NsDomain field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NsDomain) GetNsDomainOk() ([]string, bool) { + if o == nil || IsNil(o.NsDomain) { + return nil, false + } + return o.NsDomain, true +} + +// HasNsDomain returns a boolean if a field has been set. +func (o *NsDomain) HasNsDomain() bool { + if o != nil && !IsNil(o.NsDomain) { + return true + } + + return false +} + +// SetNsDomain gets a reference to the given []string and assigns it to the NsDomain field. +func (o *NsDomain) SetNsDomain(v []string) { + o.NsDomain = v +} + +// GetNsKeys returns the NsKeys field value if set, zero value otherwise. +func (o *NsDomain) GetNsKeys() []string { + if o == nil || IsNil(o.NsKeys) { + var ret []string + return ret + } + return o.NsKeys +} + +// GetNsKeysOk returns a tuple with the NsKeys field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NsDomain) GetNsKeysOk() ([]string, bool) { + if o == nil || IsNil(o.NsKeys) { + return nil, false + } + return o.NsKeys, true +} + +// HasNsKeys returns a boolean if a field has been set. +func (o *NsDomain) HasNsKeys() bool { + if o != nil && !IsNil(o.NsKeys) { + return true + } + + return false +} + +// SetNsKeys gets a reference to the given []string and assigns it to the NsKeys field. +func (o *NsDomain) SetNsKeys(v []string) { + o.NsKeys = v +} + +func (o NsDomain) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o NsDomain) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.NsDomain) { + toSerialize["ns_domain"] = o.NsDomain + } + if !IsNil(o.NsKeys) { + toSerialize["ns_keys"] = o.NsKeys + } + return toSerialize, nil +} + +type NullableNsDomain struct { + value *NsDomain + isSet bool +} + +func (v NullableNsDomain) Get() *NsDomain { + return v.value +} + +func (v *NullableNsDomain) Set(val *NsDomain) { + v.value = val + v.isSet = true +} + +func (v NullableNsDomain) IsSet() bool { + return v.isSet +} + +func (v *NullableNsDomain) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNsDomain(val *NsDomain) *NullableNsDomain { + return &NullableNsDomain{value: val, isSet: true} +} + +func (v NullableNsDomain) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableNsDomain) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_ns_keys.go b/model_ns_keys.go new file mode 100644 index 0000000..6bea31f --- /dev/null +++ b/model_ns_keys.go @@ -0,0 +1,127 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the NsKeys type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &NsKeys{} + +// NsKeys struct for NsKeys +type NsKeys struct { + // Desired NS values for the domain + NsKeys []string `json:"ns_keys,omitempty"` +} + +// NewNsKeys instantiates a new NsKeys object +// This constructor will assign default values to properties that have it defined, +// 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 NewNsKeys() *NsKeys { + this := NsKeys{} + return &this +} + +// NewNsKeysWithDefaults instantiates a new NsKeys object +// This 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 NewNsKeysWithDefaults() *NsKeys { + this := NsKeys{} + return &this +} + +// GetNsKeys returns the NsKeys field value if set, zero value otherwise. +func (o *NsKeys) GetNsKeys() []string { + if o == nil || IsNil(o.NsKeys) { + var ret []string + return ret + } + return o.NsKeys +} + +// GetNsKeysOk returns a tuple with the NsKeys field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NsKeys) GetNsKeysOk() ([]string, bool) { + if o == nil || IsNil(o.NsKeys) { + return nil, false + } + return o.NsKeys, true +} + +// HasNsKeys returns a boolean if a field has been set. +func (o *NsKeys) HasNsKeys() bool { + if o != nil && !IsNil(o.NsKeys) { + return true + } + + return false +} + +// SetNsKeys gets a reference to the given []string and assigns it to the NsKeys field. +func (o *NsKeys) SetNsKeys(v []string) { + o.NsKeys = v +} + +func (o NsKeys) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o NsKeys) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.NsKeys) { + toSerialize["ns_keys"] = o.NsKeys + } + return toSerialize, nil +} + +type NullableNsKeys struct { + value *NsKeys + isSet bool +} + +func (v NullableNsKeys) Get() *NsKeys { + return v.value +} + +func (v *NullableNsKeys) Set(val *NsKeys) { + v.value = val + v.isSet = true +} + +func (v NullableNsKeys) IsSet() bool { + return v.isSet +} + +func (v *NullableNsKeys) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNsKeys(val *NsKeys) *NullableNsKeys { + return &NullableNsKeys{value: val, isSet: true} +} + +func (v NullableNsKeys) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableNsKeys) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_ns_keys_response.go b/model_ns_keys_response.go new file mode 100644 index 0000000..cb96514 --- /dev/null +++ b/model_ns_keys_response.go @@ -0,0 +1,172 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the NsKeysResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &NsKeysResponse{} + +// NsKeysResponse struct for NsKeysResponse +type NsKeysResponse struct { + Data *map[string]interface{} `json:"data,omitempty"` + Message NullableString `json:"message,omitempty"` +} + +// NewNsKeysResponse instantiates a new NsKeysResponse object +// This constructor will assign default values to properties that have it defined, +// 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 NewNsKeysResponse() *NsKeysResponse { + this := NsKeysResponse{} + return &this +} + +// NewNsKeysResponseWithDefaults instantiates a new NsKeysResponse object +// This 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 NewNsKeysResponseWithDefaults() *NsKeysResponse { + this := NsKeysResponse{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *NsKeysResponse) GetData() map[string]interface{} { + if o == nil || IsNil(o.Data) { + var ret map[string]interface{} + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NsKeysResponse) GetDataOk() (*map[string]interface{}, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *NsKeysResponse) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given map[string]interface{} and assigns it to the Data field. +func (o *NsKeysResponse) SetData(v map[string]interface{}) { + o.Data = &v +} + +// GetMessage returns the Message field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *NsKeysResponse) GetMessage() string { + if o == nil || IsNil(o.Message.Get()) { + var ret string + return ret + } + return *o.Message.Get() +} + +// GetMessageOk returns a tuple with the Message 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 *NsKeysResponse) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Message.Get(), o.Message.IsSet() +} + +// HasMessage returns a boolean if a field has been set. +func (o *NsKeysResponse) HasMessage() bool { + if o != nil && o.Message.IsSet() { + return true + } + + return false +} + +// SetMessage gets a reference to the given NullableString and assigns it to the Message field. +func (o *NsKeysResponse) SetMessage(v string) { + o.Message.Set(&v) +} +// SetMessageNil sets the value for Message to be an explicit nil +func (o *NsKeysResponse) SetMessageNil() { + o.Message.Set(nil) +} + +// UnsetMessage ensures that no value is present for Message, not even an explicit nil +func (o *NsKeysResponse) UnsetMessage() { + o.Message.Unset() +} + +func (o NsKeysResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o NsKeysResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + if o.Message.IsSet() { + toSerialize["message"] = o.Message.Get() + } + return toSerialize, nil +} + +type NullableNsKeysResponse struct { + value *NsKeysResponse + isSet bool +} + +func (v NullableNsKeysResponse) Get() *NsKeysResponse { + return v.value +} + +func (v *NullableNsKeysResponse) Set(val *NsKeysResponse) { + v.value = val + v.isSet = true +} + +func (v NullableNsKeysResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableNsKeysResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNsKeysResponse(val *NsKeysResponse) *NullableNsKeysResponse { + return &NullableNsKeysResponse{value: val, isSet: true} +} + +func (v NullableNsKeysResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableNsKeysResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_ns_record.go b/model_ns_record.go new file mode 100644 index 0000000..53e9655 --- /dev/null +++ b/model_ns_record.go @@ -0,0 +1,520 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" + "time" +) + +// checks if the NSRecord type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &NSRecord{} + +// NSRecord struct for NSRecord +type NSRecord struct { + Value *NSRecordValue `json:"value,omitempty"` + Type *string `json:"type,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Ttl *int32 `json:"ttl,omitempty"` + Cloud *bool `json:"cloud,omitempty"` + UpstreamHttps *string `json:"upstream_https,omitempty"` + IpFilterMode *DnsRecordIpFilterMode `json:"ip_filter_mode,omitempty"` + // Protected records cannot be modified or deleted by user. + IsProtected *bool `json:"is_protected,omitempty"` + Usage []string `json:"usage,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty"` + UpdatedAt *time.Time `json:"updated_at,omitempty"` +} + +// NewNSRecord instantiates a new NSRecord object +// This constructor will assign default values to properties that have it defined, +// 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 NewNSRecord() *NSRecord { + this := NSRecord{} + var cloud bool = false + this.Cloud = &cloud + return &this +} + +// NewNSRecordWithDefaults instantiates a new NSRecord object +// This 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 NewNSRecordWithDefaults() *NSRecord { + this := NSRecord{} + var type_ string = "ns" + this.Type = &type_ + var cloud bool = false + this.Cloud = &cloud + return &this +} + +// GetValue returns the Value field value if set, zero value otherwise. +func (o *NSRecord) GetValue() NSRecordValue { + if o == nil || IsNil(o.Value) { + var ret NSRecordValue + return ret + } + return *o.Value +} + +// GetValueOk returns a tuple with the Value field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NSRecord) GetValueOk() (*NSRecordValue, bool) { + if o == nil || IsNil(o.Value) { + return nil, false + } + return o.Value, true +} + +// HasValue returns a boolean if a field has been set. +func (o *NSRecord) HasValue() bool { + if o != nil && !IsNil(o.Value) { + return true + } + + return false +} + +// SetValue gets a reference to the given NSRecordValue and assigns it to the Value field. +func (o *NSRecord) SetValue(v NSRecordValue) { + o.Value = &v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *NSRecord) 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 *NSRecord) 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 *NSRecord) 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 *NSRecord) SetType(v string) { + o.Type = &v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *NSRecord) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NSRecord) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *NSRecord) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *NSRecord) SetId(v string) { + o.Id = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *NSRecord) 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 *NSRecord) 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 *NSRecord) 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 *NSRecord) SetName(v string) { + o.Name = &v +} + +// GetTtl returns the Ttl field value if set, zero value otherwise. +func (o *NSRecord) GetTtl() int32 { + if o == nil || IsNil(o.Ttl) { + var ret int32 + return ret + } + return *o.Ttl +} + +// GetTtlOk returns a tuple with the Ttl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NSRecord) GetTtlOk() (*int32, bool) { + if o == nil || IsNil(o.Ttl) { + return nil, false + } + return o.Ttl, true +} + +// HasTtl returns a boolean if a field has been set. +func (o *NSRecord) HasTtl() bool { + if o != nil && !IsNil(o.Ttl) { + return true + } + + return false +} + +// SetTtl gets a reference to the given int32 and assigns it to the Ttl field. +func (o *NSRecord) SetTtl(v int32) { + o.Ttl = &v +} + +// GetCloud returns the Cloud field value if set, zero value otherwise. +func (o *NSRecord) GetCloud() bool { + if o == nil || IsNil(o.Cloud) { + var ret bool + return ret + } + return *o.Cloud +} + +// GetCloudOk returns a tuple with the Cloud field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NSRecord) GetCloudOk() (*bool, bool) { + if o == nil || IsNil(o.Cloud) { + return nil, false + } + return o.Cloud, true +} + +// HasCloud returns a boolean if a field has been set. +func (o *NSRecord) HasCloud() bool { + if o != nil && !IsNil(o.Cloud) { + return true + } + + return false +} + +// SetCloud gets a reference to the given bool and assigns it to the Cloud field. +func (o *NSRecord) SetCloud(v bool) { + o.Cloud = &v +} + +// GetUpstreamHttps returns the UpstreamHttps field value if set, zero value otherwise. +func (o *NSRecord) GetUpstreamHttps() string { + if o == nil || IsNil(o.UpstreamHttps) { + var ret string + return ret + } + return *o.UpstreamHttps +} + +// GetUpstreamHttpsOk returns a tuple with the UpstreamHttps field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NSRecord) GetUpstreamHttpsOk() (*string, bool) { + if o == nil || IsNil(o.UpstreamHttps) { + return nil, false + } + return o.UpstreamHttps, true +} + +// HasUpstreamHttps returns a boolean if a field has been set. +func (o *NSRecord) HasUpstreamHttps() bool { + if o != nil && !IsNil(o.UpstreamHttps) { + return true + } + + return false +} + +// SetUpstreamHttps gets a reference to the given string and assigns it to the UpstreamHttps field. +func (o *NSRecord) SetUpstreamHttps(v string) { + o.UpstreamHttps = &v +} + +// GetIpFilterMode returns the IpFilterMode field value if set, zero value otherwise. +func (o *NSRecord) GetIpFilterMode() DnsRecordIpFilterMode { + if o == nil || IsNil(o.IpFilterMode) { + var ret DnsRecordIpFilterMode + return ret + } + return *o.IpFilterMode +} + +// GetIpFilterModeOk returns a tuple with the IpFilterMode field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NSRecord) GetIpFilterModeOk() (*DnsRecordIpFilterMode, bool) { + if o == nil || IsNil(o.IpFilterMode) { + return nil, false + } + return o.IpFilterMode, true +} + +// HasIpFilterMode returns a boolean if a field has been set. +func (o *NSRecord) HasIpFilterMode() bool { + if o != nil && !IsNil(o.IpFilterMode) { + return true + } + + return false +} + +// SetIpFilterMode gets a reference to the given DnsRecordIpFilterMode and assigns it to the IpFilterMode field. +func (o *NSRecord) SetIpFilterMode(v DnsRecordIpFilterMode) { + o.IpFilterMode = &v +} + +// GetIsProtected returns the IsProtected field value if set, zero value otherwise. +func (o *NSRecord) GetIsProtected() bool { + if o == nil || IsNil(o.IsProtected) { + var ret bool + return ret + } + return *o.IsProtected +} + +// GetIsProtectedOk returns a tuple with the IsProtected field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NSRecord) GetIsProtectedOk() (*bool, bool) { + if o == nil || IsNil(o.IsProtected) { + return nil, false + } + return o.IsProtected, true +} + +// HasIsProtected returns a boolean if a field has been set. +func (o *NSRecord) HasIsProtected() bool { + if o != nil && !IsNil(o.IsProtected) { + return true + } + + return false +} + +// SetIsProtected gets a reference to the given bool and assigns it to the IsProtected field. +func (o *NSRecord) SetIsProtected(v bool) { + o.IsProtected = &v +} + +// GetUsage returns the Usage field value if set, zero value otherwise. +func (o *NSRecord) GetUsage() []string { + if o == nil || IsNil(o.Usage) { + var ret []string + return ret + } + return o.Usage +} + +// GetUsageOk returns a tuple with the Usage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NSRecord) GetUsageOk() ([]string, bool) { + if o == nil || IsNil(o.Usage) { + return nil, false + } + return o.Usage, true +} + +// HasUsage returns a boolean if a field has been set. +func (o *NSRecord) HasUsage() bool { + if o != nil && !IsNil(o.Usage) { + return true + } + + return false +} + +// SetUsage gets a reference to the given []string and assigns it to the Usage field. +func (o *NSRecord) SetUsage(v []string) { + o.Usage = v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *NSRecord) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NSRecord) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *NSRecord) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *NSRecord) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *NSRecord) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NSRecord) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *NSRecord) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *NSRecord) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +func (o NSRecord) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o NSRecord) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Value) { + toSerialize["value"] = o.Value + } + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + // skip: id is readOnly + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Ttl) { + toSerialize["ttl"] = o.Ttl + } + if !IsNil(o.Cloud) { + toSerialize["cloud"] = o.Cloud + } + if !IsNil(o.UpstreamHttps) { + toSerialize["upstream_https"] = o.UpstreamHttps + } + if !IsNil(o.IpFilterMode) { + toSerialize["ip_filter_mode"] = o.IpFilterMode + } + // skip: is_protected is readOnly + // skip: usage is readOnly + // skip: created_at is readOnly + // skip: updated_at is readOnly + return toSerialize, nil +} + +type NullableNSRecord struct { + value *NSRecord + isSet bool +} + +func (v NullableNSRecord) Get() *NSRecord { + return v.value +} + +func (v *NullableNSRecord) Set(val *NSRecord) { + v.value = val + v.isSet = true +} + +func (v NullableNSRecord) IsSet() bool { + return v.isSet +} + +func (v *NullableNSRecord) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNSRecord(val *NSRecord) *NullableNSRecord { + return &NullableNSRecord{value: val, isSet: true} +} + +func (v NullableNSRecord) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableNSRecord) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_ns_record_value.go b/model_ns_record_value.go new file mode 100644 index 0000000..b2d1d21 --- /dev/null +++ b/model_ns_record_value.go @@ -0,0 +1,117 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the NSRecordValue type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &NSRecordValue{} + +// NSRecordValue struct for NSRecordValue +type NSRecordValue struct { + Host string `json:"host"` +} + +// NewNSRecordValue instantiates a new NSRecordValue object +// This constructor will assign default values to properties that have it defined, +// 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 NewNSRecordValue(host string) *NSRecordValue { + this := NSRecordValue{} + this.Host = host + return &this +} + +// NewNSRecordValueWithDefaults instantiates a new NSRecordValue object +// This 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 NewNSRecordValueWithDefaults() *NSRecordValue { + this := NSRecordValue{} + return &this +} + +// GetHost returns the Host field value +func (o *NSRecordValue) GetHost() string { + if o == nil { + var ret string + return ret + } + + return o.Host +} + +// GetHostOk returns a tuple with the Host field value +// and a boolean to check if the value has been set. +func (o *NSRecordValue) GetHostOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Host, true +} + +// SetHost sets field value +func (o *NSRecordValue) SetHost(v string) { + o.Host = v +} + +func (o NSRecordValue) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o NSRecordValue) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["host"] = o.Host + return toSerialize, nil +} + +type NullableNSRecordValue struct { + value *NSRecordValue + isSet bool +} + +func (v NullableNSRecordValue) Get() *NSRecordValue { + return v.value +} + +func (v *NullableNSRecordValue) Set(val *NSRecordValue) { + v.value = val + v.isSet = true +} + +func (v NullableNSRecordValue) IsSet() bool { + return v.isSet +} + +func (v *NullableNSRecordValue) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNSRecordValue(val *NSRecordValue) *NullableNSRecordValue { + return &NullableNSRecordValue{value: val, isSet: true} +} + +func (v NullableNSRecordValue) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableNSRecordValue) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_page_rule.go b/model_page_rule.go new file mode 100644 index 0000000..9902595 --- /dev/null +++ b/model_page_rule.go @@ -0,0 +1,1632 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" + "time" +) + +// checks if the PageRule type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PageRule{} + +// PageRule struct for PageRule +type PageRule struct { + Cache200 *string `json:"cache_200,omitempty"` + CacheAny *string `json:"cache_any,omitempty"` + // Cookie variables to consider in cache (comma separaterd values) + CacheCookie *string `json:"cache_cookie,omitempty"` + CacheDeviceType *bool `json:"cache_device_type,omitempty"` + CacheArgs *bool `json:"cache_args,omitempty"` + // Query string arguments to consider in cache (& seperated values) + CacheArg *string `json:"cache_arg,omitempty"` + // Deprecated + CacheScheme *bool `json:"cache_scheme,omitempty"` + CacheBrowser *string `json:"cache_browser,omitempty"` + // Ignore default behavior in caching set-cookie header + CacheIgnoreSc *bool `json:"cache_ignore_sc,omitempty"` + // Ignore default behavior in caching vary header + CacheIgnoreVary *bool `json:"cache_ignore_vary,omitempty"` + CacheIgnoreCc *bool `json:"cache_ignore_cc,omitempty"` + CorsHeader *string `json:"cors_header,omitempty"` + RewriteUrl *string `json:"rewrite_url,omitempty"` + SlinkSecret *string `json:"slink_secret,omitempty"` + SlinkMd5 []string `json:"slink_md5,omitempty"` + // Name or ID of the load balancer + LoadBalancer NullableString `json:"load_balancer,omitempty"` + // Deprecated + ClusterStatus *bool `json:"cluster_status,omitempty"` + ImageResize *PageRuleImageResize `json:"image_resize,omitempty"` + // Deprecated + ClusterId NullableString `json:"cluster_id,omitempty"` + UpstreamTimeout *UpstreamTimeout `json:"upstream_timeout,omitempty"` + ReqCustomHeaders []map[string]interface{} `json:"req_custom_headers,omitempty"` + ResCustomHeaders []map[string]interface{} `json:"res_custom_headers,omitempty"` + ReqHideHeaders []string `json:"req_hide_headers,omitempty"` + ResHideHeaders []string `json:"res_hide_headers,omitempty"` + CustomHostHeader *string `json:"custom_host_header,omitempty"` + Redirect *PageRuleRedirect `json:"redirect,omitempty"` + Id *string `json:"id,omitempty"` + DomainId *string `json:"domain_id,omitempty"` + // Order of the page-rule + Seq *int32 `json:"seq,omitempty"` + // This flag is deprecated in favor of is_protected flag + // Deprecated + UrlType *string `json:"url_type,omitempty"` + // Protected records cannot be modified or deleted by user. + IsProtected *bool `json:"is_protected,omitempty"` + // URL pattern of target pages + Url *string `json:"url,omitempty"` + CacheLevel *string `json:"cache_level,omitempty"` + WafStatus *bool `json:"waf_status,omitempty"` + // Shows whether firewall is enabled or not + // Deprecated + FwStatus *bool `json:"fw_status,omitempty"` + Acceleration *Acceleration `json:"acceleration,omitempty"` + // Secure link is enabled or not + SlinkStatus *bool `json:"slink_status,omitempty"` + // Is the page-rule enabled? + Status *bool `json:"status,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty"` + UpdatedAt *time.Time `json:"updated_at,omitempty"` +} + +// NewPageRule instantiates a new PageRule object +// This constructor will assign default values to properties that have it defined, +// 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 NewPageRule() *PageRule { + this := PageRule{} + var urlType string = "default" + this.UrlType = &urlType + var cacheLevel string = "query_string" + this.CacheLevel = &cacheLevel + var wafStatus bool = true + this.WafStatus = &wafStatus + var fwStatus bool = true + this.FwStatus = &fwStatus + var slinkStatus bool = false + this.SlinkStatus = &slinkStatus + var status bool = true + this.Status = &status + return &this +} + +// NewPageRuleWithDefaults instantiates a new PageRule object +// This 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 NewPageRuleWithDefaults() *PageRule { + this := PageRule{} + var cache200 string = "30m" + this.Cache200 = &cache200 + var cacheAny string = "0s" + this.CacheAny = &cacheAny + var cacheCookie string = "" + this.CacheCookie = &cacheCookie + var cacheDeviceType bool = false + this.CacheDeviceType = &cacheDeviceType + var cacheArgs bool = true + this.CacheArgs = &cacheArgs + var cacheArg string = "" + this.CacheArg = &cacheArg + var cacheScheme bool = true + this.CacheScheme = &cacheScheme + var cacheBrowser string = "default" + this.CacheBrowser = &cacheBrowser + var cacheIgnoreSc bool = false + this.CacheIgnoreSc = &cacheIgnoreSc + var cacheIgnoreVary bool = true + this.CacheIgnoreVary = &cacheIgnoreVary + var cacheIgnoreCc bool = true + this.CacheIgnoreCc = &cacheIgnoreCc + var corsHeader string = "-" + this.CorsHeader = &corsHeader + var rewriteUrl string = "-" + this.RewriteUrl = &rewriteUrl + var slinkSecret string = "" + this.SlinkSecret = &slinkSecret + var clusterStatus bool = false + this.ClusterStatus = &clusterStatus + var customHostHeader string = "" + this.CustomHostHeader = &customHostHeader + var urlType string = "default" + this.UrlType = &urlType + var cacheLevel string = "query_string" + this.CacheLevel = &cacheLevel + var wafStatus bool = true + this.WafStatus = &wafStatus + var fwStatus bool = true + this.FwStatus = &fwStatus + var slinkStatus bool = false + this.SlinkStatus = &slinkStatus + var status bool = true + this.Status = &status + return &this +} + +// GetCache200 returns the Cache200 field value if set, zero value otherwise. +func (o *PageRule) GetCache200() string { + if o == nil || IsNil(o.Cache200) { + var ret string + return ret + } + return *o.Cache200 +} + +// GetCache200Ok returns a tuple with the Cache200 field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PageRule) GetCache200Ok() (*string, bool) { + if o == nil || IsNil(o.Cache200) { + return nil, false + } + return o.Cache200, true +} + +// HasCache200 returns a boolean if a field has been set. +func (o *PageRule) HasCache200() bool { + if o != nil && !IsNil(o.Cache200) { + return true + } + + return false +} + +// SetCache200 gets a reference to the given string and assigns it to the Cache200 field. +func (o *PageRule) SetCache200(v string) { + o.Cache200 = &v +} + +// GetCacheAny returns the CacheAny field value if set, zero value otherwise. +func (o *PageRule) GetCacheAny() string { + if o == nil || IsNil(o.CacheAny) { + var ret string + return ret + } + return *o.CacheAny +} + +// GetCacheAnyOk returns a tuple with the CacheAny field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PageRule) GetCacheAnyOk() (*string, bool) { + if o == nil || IsNil(o.CacheAny) { + return nil, false + } + return o.CacheAny, true +} + +// HasCacheAny returns a boolean if a field has been set. +func (o *PageRule) HasCacheAny() bool { + if o != nil && !IsNil(o.CacheAny) { + return true + } + + return false +} + +// SetCacheAny gets a reference to the given string and assigns it to the CacheAny field. +func (o *PageRule) SetCacheAny(v string) { + o.CacheAny = &v +} + +// GetCacheCookie returns the CacheCookie field value if set, zero value otherwise. +func (o *PageRule) GetCacheCookie() string { + if o == nil || IsNil(o.CacheCookie) { + var ret string + return ret + } + return *o.CacheCookie +} + +// GetCacheCookieOk returns a tuple with the CacheCookie field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PageRule) GetCacheCookieOk() (*string, bool) { + if o == nil || IsNil(o.CacheCookie) { + return nil, false + } + return o.CacheCookie, true +} + +// HasCacheCookie returns a boolean if a field has been set. +func (o *PageRule) HasCacheCookie() bool { + if o != nil && !IsNil(o.CacheCookie) { + return true + } + + return false +} + +// SetCacheCookie gets a reference to the given string and assigns it to the CacheCookie field. +func (o *PageRule) SetCacheCookie(v string) { + o.CacheCookie = &v +} + +// GetCacheDeviceType returns the CacheDeviceType field value if set, zero value otherwise. +func (o *PageRule) GetCacheDeviceType() bool { + if o == nil || IsNil(o.CacheDeviceType) { + var ret bool + return ret + } + return *o.CacheDeviceType +} + +// GetCacheDeviceTypeOk returns a tuple with the CacheDeviceType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PageRule) GetCacheDeviceTypeOk() (*bool, bool) { + if o == nil || IsNil(o.CacheDeviceType) { + return nil, false + } + return o.CacheDeviceType, true +} + +// HasCacheDeviceType returns a boolean if a field has been set. +func (o *PageRule) HasCacheDeviceType() bool { + if o != nil && !IsNil(o.CacheDeviceType) { + return true + } + + return false +} + +// SetCacheDeviceType gets a reference to the given bool and assigns it to the CacheDeviceType field. +func (o *PageRule) SetCacheDeviceType(v bool) { + o.CacheDeviceType = &v +} + +// GetCacheArgs returns the CacheArgs field value if set, zero value otherwise. +func (o *PageRule) GetCacheArgs() bool { + if o == nil || IsNil(o.CacheArgs) { + var ret bool + return ret + } + return *o.CacheArgs +} + +// GetCacheArgsOk returns a tuple with the CacheArgs field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PageRule) GetCacheArgsOk() (*bool, bool) { + if o == nil || IsNil(o.CacheArgs) { + return nil, false + } + return o.CacheArgs, true +} + +// HasCacheArgs returns a boolean if a field has been set. +func (o *PageRule) HasCacheArgs() bool { + if o != nil && !IsNil(o.CacheArgs) { + return true + } + + return false +} + +// SetCacheArgs gets a reference to the given bool and assigns it to the CacheArgs field. +func (o *PageRule) SetCacheArgs(v bool) { + o.CacheArgs = &v +} + +// GetCacheArg returns the CacheArg field value if set, zero value otherwise. +func (o *PageRule) GetCacheArg() string { + if o == nil || IsNil(o.CacheArg) { + var ret string + return ret + } + return *o.CacheArg +} + +// GetCacheArgOk returns a tuple with the CacheArg field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PageRule) GetCacheArgOk() (*string, bool) { + if o == nil || IsNil(o.CacheArg) { + return nil, false + } + return o.CacheArg, true +} + +// HasCacheArg returns a boolean if a field has been set. +func (o *PageRule) HasCacheArg() bool { + if o != nil && !IsNil(o.CacheArg) { + return true + } + + return false +} + +// SetCacheArg gets a reference to the given string and assigns it to the CacheArg field. +func (o *PageRule) SetCacheArg(v string) { + o.CacheArg = &v +} + +// GetCacheScheme returns the CacheScheme field value if set, zero value otherwise. +// Deprecated +func (o *PageRule) GetCacheScheme() bool { + if o == nil || IsNil(o.CacheScheme) { + var ret bool + return ret + } + return *o.CacheScheme +} + +// GetCacheSchemeOk returns a tuple with the CacheScheme field value if set, nil otherwise +// and a boolean to check if the value has been set. +// Deprecated +func (o *PageRule) GetCacheSchemeOk() (*bool, bool) { + if o == nil || IsNil(o.CacheScheme) { + return nil, false + } + return o.CacheScheme, true +} + +// HasCacheScheme returns a boolean if a field has been set. +func (o *PageRule) HasCacheScheme() bool { + if o != nil && !IsNil(o.CacheScheme) { + return true + } + + return false +} + +// SetCacheScheme gets a reference to the given bool and assigns it to the CacheScheme field. +// Deprecated +func (o *PageRule) SetCacheScheme(v bool) { + o.CacheScheme = &v +} + +// GetCacheBrowser returns the CacheBrowser field value if set, zero value otherwise. +func (o *PageRule) GetCacheBrowser() string { + if o == nil || IsNil(o.CacheBrowser) { + var ret string + return ret + } + return *o.CacheBrowser +} + +// GetCacheBrowserOk returns a tuple with the CacheBrowser field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PageRule) GetCacheBrowserOk() (*string, bool) { + if o == nil || IsNil(o.CacheBrowser) { + return nil, false + } + return o.CacheBrowser, true +} + +// HasCacheBrowser returns a boolean if a field has been set. +func (o *PageRule) HasCacheBrowser() bool { + if o != nil && !IsNil(o.CacheBrowser) { + return true + } + + return false +} + +// SetCacheBrowser gets a reference to the given string and assigns it to the CacheBrowser field. +func (o *PageRule) SetCacheBrowser(v string) { + o.CacheBrowser = &v +} + +// GetCacheIgnoreSc returns the CacheIgnoreSc field value if set, zero value otherwise. +func (o *PageRule) GetCacheIgnoreSc() bool { + if o == nil || IsNil(o.CacheIgnoreSc) { + var ret bool + return ret + } + return *o.CacheIgnoreSc +} + +// GetCacheIgnoreScOk returns a tuple with the CacheIgnoreSc field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PageRule) GetCacheIgnoreScOk() (*bool, bool) { + if o == nil || IsNil(o.CacheIgnoreSc) { + return nil, false + } + return o.CacheIgnoreSc, true +} + +// HasCacheIgnoreSc returns a boolean if a field has been set. +func (o *PageRule) HasCacheIgnoreSc() bool { + if o != nil && !IsNil(o.CacheIgnoreSc) { + return true + } + + return false +} + +// SetCacheIgnoreSc gets a reference to the given bool and assigns it to the CacheIgnoreSc field. +func (o *PageRule) SetCacheIgnoreSc(v bool) { + o.CacheIgnoreSc = &v +} + +// GetCacheIgnoreVary returns the CacheIgnoreVary field value if set, zero value otherwise. +func (o *PageRule) GetCacheIgnoreVary() bool { + if o == nil || IsNil(o.CacheIgnoreVary) { + var ret bool + return ret + } + return *o.CacheIgnoreVary +} + +// GetCacheIgnoreVaryOk returns a tuple with the CacheIgnoreVary field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PageRule) GetCacheIgnoreVaryOk() (*bool, bool) { + if o == nil || IsNil(o.CacheIgnoreVary) { + return nil, false + } + return o.CacheIgnoreVary, true +} + +// HasCacheIgnoreVary returns a boolean if a field has been set. +func (o *PageRule) HasCacheIgnoreVary() bool { + if o != nil && !IsNil(o.CacheIgnoreVary) { + return true + } + + return false +} + +// SetCacheIgnoreVary gets a reference to the given bool and assigns it to the CacheIgnoreVary field. +func (o *PageRule) SetCacheIgnoreVary(v bool) { + o.CacheIgnoreVary = &v +} + +// GetCacheIgnoreCc returns the CacheIgnoreCc field value if set, zero value otherwise. +func (o *PageRule) GetCacheIgnoreCc() bool { + if o == nil || IsNil(o.CacheIgnoreCc) { + var ret bool + return ret + } + return *o.CacheIgnoreCc +} + +// GetCacheIgnoreCcOk returns a tuple with the CacheIgnoreCc field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PageRule) GetCacheIgnoreCcOk() (*bool, bool) { + if o == nil || IsNil(o.CacheIgnoreCc) { + return nil, false + } + return o.CacheIgnoreCc, true +} + +// HasCacheIgnoreCc returns a boolean if a field has been set. +func (o *PageRule) HasCacheIgnoreCc() bool { + if o != nil && !IsNil(o.CacheIgnoreCc) { + return true + } + + return false +} + +// SetCacheIgnoreCc gets a reference to the given bool and assigns it to the CacheIgnoreCc field. +func (o *PageRule) SetCacheIgnoreCc(v bool) { + o.CacheIgnoreCc = &v +} + +// GetCorsHeader returns the CorsHeader field value if set, zero value otherwise. +func (o *PageRule) GetCorsHeader() string { + if o == nil || IsNil(o.CorsHeader) { + var ret string + return ret + } + return *o.CorsHeader +} + +// GetCorsHeaderOk returns a tuple with the CorsHeader field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PageRule) GetCorsHeaderOk() (*string, bool) { + if o == nil || IsNil(o.CorsHeader) { + return nil, false + } + return o.CorsHeader, true +} + +// HasCorsHeader returns a boolean if a field has been set. +func (o *PageRule) HasCorsHeader() bool { + if o != nil && !IsNil(o.CorsHeader) { + return true + } + + return false +} + +// SetCorsHeader gets a reference to the given string and assigns it to the CorsHeader field. +func (o *PageRule) SetCorsHeader(v string) { + o.CorsHeader = &v +} + +// GetRewriteUrl returns the RewriteUrl field value if set, zero value otherwise. +func (o *PageRule) GetRewriteUrl() string { + if o == nil || IsNil(o.RewriteUrl) { + var ret string + return ret + } + return *o.RewriteUrl +} + +// GetRewriteUrlOk returns a tuple with the RewriteUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PageRule) GetRewriteUrlOk() (*string, bool) { + if o == nil || IsNil(o.RewriteUrl) { + return nil, false + } + return o.RewriteUrl, true +} + +// HasRewriteUrl returns a boolean if a field has been set. +func (o *PageRule) HasRewriteUrl() bool { + if o != nil && !IsNil(o.RewriteUrl) { + return true + } + + return false +} + +// SetRewriteUrl gets a reference to the given string and assigns it to the RewriteUrl field. +func (o *PageRule) SetRewriteUrl(v string) { + o.RewriteUrl = &v +} + +// GetSlinkSecret returns the SlinkSecret field value if set, zero value otherwise. +func (o *PageRule) GetSlinkSecret() string { + if o == nil || IsNil(o.SlinkSecret) { + var ret string + return ret + } + return *o.SlinkSecret +} + +// GetSlinkSecretOk returns a tuple with the SlinkSecret field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PageRule) GetSlinkSecretOk() (*string, bool) { + if o == nil || IsNil(o.SlinkSecret) { + return nil, false + } + return o.SlinkSecret, true +} + +// HasSlinkSecret returns a boolean if a field has been set. +func (o *PageRule) HasSlinkSecret() bool { + if o != nil && !IsNil(o.SlinkSecret) { + return true + } + + return false +} + +// SetSlinkSecret gets a reference to the given string and assigns it to the SlinkSecret field. +func (o *PageRule) SetSlinkSecret(v string) { + o.SlinkSecret = &v +} + +// GetSlinkMd5 returns the SlinkMd5 field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PageRule) GetSlinkMd5() []string { + if o == nil { + var ret []string + return ret + } + return o.SlinkMd5 +} + +// GetSlinkMd5Ok returns a tuple with the SlinkMd5 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 *PageRule) GetSlinkMd5Ok() ([]string, bool) { + if o == nil || IsNil(o.SlinkMd5) { + return nil, false + } + return o.SlinkMd5, true +} + +// HasSlinkMd5 returns a boolean if a field has been set. +func (o *PageRule) HasSlinkMd5() bool { + if o != nil && IsNil(o.SlinkMd5) { + return true + } + + return false +} + +// SetSlinkMd5 gets a reference to the given []string and assigns it to the SlinkMd5 field. +func (o *PageRule) SetSlinkMd5(v []string) { + o.SlinkMd5 = v +} + +// GetLoadBalancer returns the LoadBalancer field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PageRule) GetLoadBalancer() string { + if o == nil || IsNil(o.LoadBalancer.Get()) { + var ret string + return ret + } + return *o.LoadBalancer.Get() +} + +// GetLoadBalancerOk returns a tuple with the LoadBalancer 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 *PageRule) GetLoadBalancerOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.LoadBalancer.Get(), o.LoadBalancer.IsSet() +} + +// HasLoadBalancer returns a boolean if a field has been set. +func (o *PageRule) HasLoadBalancer() bool { + if o != nil && o.LoadBalancer.IsSet() { + return true + } + + return false +} + +// SetLoadBalancer gets a reference to the given NullableString and assigns it to the LoadBalancer field. +func (o *PageRule) SetLoadBalancer(v string) { + o.LoadBalancer.Set(&v) +} +// SetLoadBalancerNil sets the value for LoadBalancer to be an explicit nil +func (o *PageRule) SetLoadBalancerNil() { + o.LoadBalancer.Set(nil) +} + +// UnsetLoadBalancer ensures that no value is present for LoadBalancer, not even an explicit nil +func (o *PageRule) UnsetLoadBalancer() { + o.LoadBalancer.Unset() +} + +// GetClusterStatus returns the ClusterStatus field value if set, zero value otherwise. +// Deprecated +func (o *PageRule) GetClusterStatus() bool { + if o == nil || IsNil(o.ClusterStatus) { + var ret bool + return ret + } + return *o.ClusterStatus +} + +// GetClusterStatusOk returns a tuple with the ClusterStatus field value if set, nil otherwise +// and a boolean to check if the value has been set. +// Deprecated +func (o *PageRule) GetClusterStatusOk() (*bool, bool) { + if o == nil || IsNil(o.ClusterStatus) { + return nil, false + } + return o.ClusterStatus, true +} + +// HasClusterStatus returns a boolean if a field has been set. +func (o *PageRule) HasClusterStatus() bool { + if o != nil && !IsNil(o.ClusterStatus) { + return true + } + + return false +} + +// SetClusterStatus gets a reference to the given bool and assigns it to the ClusterStatus field. +// Deprecated +func (o *PageRule) SetClusterStatus(v bool) { + o.ClusterStatus = &v +} + +// GetImageResize returns the ImageResize field value if set, zero value otherwise. +func (o *PageRule) GetImageResize() PageRuleImageResize { + if o == nil || IsNil(o.ImageResize) { + var ret PageRuleImageResize + return ret + } + return *o.ImageResize +} + +// GetImageResizeOk returns a tuple with the ImageResize field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PageRule) GetImageResizeOk() (*PageRuleImageResize, bool) { + if o == nil || IsNil(o.ImageResize) { + return nil, false + } + return o.ImageResize, true +} + +// HasImageResize returns a boolean if a field has been set. +func (o *PageRule) HasImageResize() bool { + if o != nil && !IsNil(o.ImageResize) { + return true + } + + return false +} + +// SetImageResize gets a reference to the given PageRuleImageResize and assigns it to the ImageResize field. +func (o *PageRule) SetImageResize(v PageRuleImageResize) { + o.ImageResize = &v +} + +// GetClusterId returns the ClusterId field value if set, zero value otherwise (both if not set or set to explicit null). +// Deprecated +func (o *PageRule) GetClusterId() string { + if o == nil || IsNil(o.ClusterId.Get()) { + var ret string + return ret + } + return *o.ClusterId.Get() +} + +// GetClusterIdOk returns a tuple with the ClusterId 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 +// Deprecated +func (o *PageRule) GetClusterIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ClusterId.Get(), o.ClusterId.IsSet() +} + +// HasClusterId returns a boolean if a field has been set. +func (o *PageRule) HasClusterId() bool { + if o != nil && o.ClusterId.IsSet() { + return true + } + + return false +} + +// SetClusterId gets a reference to the given NullableString and assigns it to the ClusterId field. +// Deprecated +func (o *PageRule) SetClusterId(v string) { + o.ClusterId.Set(&v) +} +// SetClusterIdNil sets the value for ClusterId to be an explicit nil +func (o *PageRule) SetClusterIdNil() { + o.ClusterId.Set(nil) +} + +// UnsetClusterId ensures that no value is present for ClusterId, not even an explicit nil +func (o *PageRule) UnsetClusterId() { + o.ClusterId.Unset() +} + +// GetUpstreamTimeout returns the UpstreamTimeout field value if set, zero value otherwise. +func (o *PageRule) GetUpstreamTimeout() UpstreamTimeout { + if o == nil || IsNil(o.UpstreamTimeout) { + var ret UpstreamTimeout + return ret + } + return *o.UpstreamTimeout +} + +// GetUpstreamTimeoutOk returns a tuple with the UpstreamTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PageRule) GetUpstreamTimeoutOk() (*UpstreamTimeout, bool) { + if o == nil || IsNil(o.UpstreamTimeout) { + return nil, false + } + return o.UpstreamTimeout, true +} + +// HasUpstreamTimeout returns a boolean if a field has been set. +func (o *PageRule) HasUpstreamTimeout() bool { + if o != nil && !IsNil(o.UpstreamTimeout) { + return true + } + + return false +} + +// SetUpstreamTimeout gets a reference to the given UpstreamTimeout and assigns it to the UpstreamTimeout field. +func (o *PageRule) SetUpstreamTimeout(v UpstreamTimeout) { + o.UpstreamTimeout = &v +} + +// GetReqCustomHeaders returns the ReqCustomHeaders field value if set, zero value otherwise. +func (o *PageRule) GetReqCustomHeaders() []map[string]interface{} { + if o == nil || IsNil(o.ReqCustomHeaders) { + var ret []map[string]interface{} + return ret + } + return o.ReqCustomHeaders +} + +// GetReqCustomHeadersOk returns a tuple with the ReqCustomHeaders field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PageRule) GetReqCustomHeadersOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.ReqCustomHeaders) { + return nil, false + } + return o.ReqCustomHeaders, true +} + +// HasReqCustomHeaders returns a boolean if a field has been set. +func (o *PageRule) HasReqCustomHeaders() bool { + if o != nil && !IsNil(o.ReqCustomHeaders) { + return true + } + + return false +} + +// SetReqCustomHeaders gets a reference to the given []map[string]interface{} and assigns it to the ReqCustomHeaders field. +func (o *PageRule) SetReqCustomHeaders(v []map[string]interface{}) { + o.ReqCustomHeaders = v +} + +// GetResCustomHeaders returns the ResCustomHeaders field value if set, zero value otherwise. +func (o *PageRule) GetResCustomHeaders() []map[string]interface{} { + if o == nil || IsNil(o.ResCustomHeaders) { + var ret []map[string]interface{} + return ret + } + return o.ResCustomHeaders +} + +// GetResCustomHeadersOk returns a tuple with the ResCustomHeaders field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PageRule) GetResCustomHeadersOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.ResCustomHeaders) { + return nil, false + } + return o.ResCustomHeaders, true +} + +// HasResCustomHeaders returns a boolean if a field has been set. +func (o *PageRule) HasResCustomHeaders() bool { + if o != nil && !IsNil(o.ResCustomHeaders) { + return true + } + + return false +} + +// SetResCustomHeaders gets a reference to the given []map[string]interface{} and assigns it to the ResCustomHeaders field. +func (o *PageRule) SetResCustomHeaders(v []map[string]interface{}) { + o.ResCustomHeaders = v +} + +// GetReqHideHeaders returns the ReqHideHeaders field value if set, zero value otherwise. +func (o *PageRule) GetReqHideHeaders() []string { + if o == nil || IsNil(o.ReqHideHeaders) { + var ret []string + return ret + } + return o.ReqHideHeaders +} + +// GetReqHideHeadersOk returns a tuple with the ReqHideHeaders field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PageRule) GetReqHideHeadersOk() ([]string, bool) { + if o == nil || IsNil(o.ReqHideHeaders) { + return nil, false + } + return o.ReqHideHeaders, true +} + +// HasReqHideHeaders returns a boolean if a field has been set. +func (o *PageRule) HasReqHideHeaders() bool { + if o != nil && !IsNil(o.ReqHideHeaders) { + return true + } + + return false +} + +// SetReqHideHeaders gets a reference to the given []string and assigns it to the ReqHideHeaders field. +func (o *PageRule) SetReqHideHeaders(v []string) { + o.ReqHideHeaders = v +} + +// GetResHideHeaders returns the ResHideHeaders field value if set, zero value otherwise. +func (o *PageRule) GetResHideHeaders() []string { + if o == nil || IsNil(o.ResHideHeaders) { + var ret []string + return ret + } + return o.ResHideHeaders +} + +// GetResHideHeadersOk returns a tuple with the ResHideHeaders field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PageRule) GetResHideHeadersOk() ([]string, bool) { + if o == nil || IsNil(o.ResHideHeaders) { + return nil, false + } + return o.ResHideHeaders, true +} + +// HasResHideHeaders returns a boolean if a field has been set. +func (o *PageRule) HasResHideHeaders() bool { + if o != nil && !IsNil(o.ResHideHeaders) { + return true + } + + return false +} + +// SetResHideHeaders gets a reference to the given []string and assigns it to the ResHideHeaders field. +func (o *PageRule) SetResHideHeaders(v []string) { + o.ResHideHeaders = v +} + +// GetCustomHostHeader returns the CustomHostHeader field value if set, zero value otherwise. +func (o *PageRule) GetCustomHostHeader() string { + if o == nil || IsNil(o.CustomHostHeader) { + var ret string + return ret + } + return *o.CustomHostHeader +} + +// GetCustomHostHeaderOk returns a tuple with the CustomHostHeader field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PageRule) GetCustomHostHeaderOk() (*string, bool) { + if o == nil || IsNil(o.CustomHostHeader) { + return nil, false + } + return o.CustomHostHeader, true +} + +// HasCustomHostHeader returns a boolean if a field has been set. +func (o *PageRule) HasCustomHostHeader() bool { + if o != nil && !IsNil(o.CustomHostHeader) { + return true + } + + return false +} + +// SetCustomHostHeader gets a reference to the given string and assigns it to the CustomHostHeader field. +func (o *PageRule) SetCustomHostHeader(v string) { + o.CustomHostHeader = &v +} + +// GetRedirect returns the Redirect field value if set, zero value otherwise. +func (o *PageRule) GetRedirect() PageRuleRedirect { + if o == nil || IsNil(o.Redirect) { + var ret PageRuleRedirect + return ret + } + return *o.Redirect +} + +// GetRedirectOk returns a tuple with the Redirect field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PageRule) GetRedirectOk() (*PageRuleRedirect, bool) { + if o == nil || IsNil(o.Redirect) { + return nil, false + } + return o.Redirect, true +} + +// HasRedirect returns a boolean if a field has been set. +func (o *PageRule) HasRedirect() bool { + if o != nil && !IsNil(o.Redirect) { + return true + } + + return false +} + +// SetRedirect gets a reference to the given PageRuleRedirect and assigns it to the Redirect field. +func (o *PageRule) SetRedirect(v PageRuleRedirect) { + o.Redirect = &v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *PageRule) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PageRule) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *PageRule) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *PageRule) SetId(v string) { + o.Id = &v +} + +// GetDomainId returns the DomainId field value if set, zero value otherwise. +func (o *PageRule) GetDomainId() string { + if o == nil || IsNil(o.DomainId) { + var ret string + return ret + } + return *o.DomainId +} + +// GetDomainIdOk returns a tuple with the DomainId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PageRule) GetDomainIdOk() (*string, bool) { + if o == nil || IsNil(o.DomainId) { + return nil, false + } + return o.DomainId, true +} + +// HasDomainId returns a boolean if a field has been set. +func (o *PageRule) HasDomainId() bool { + if o != nil && !IsNil(o.DomainId) { + return true + } + + return false +} + +// SetDomainId gets a reference to the given string and assigns it to the DomainId field. +func (o *PageRule) SetDomainId(v string) { + o.DomainId = &v +} + +// GetSeq returns the Seq field value if set, zero value otherwise. +func (o *PageRule) GetSeq() int32 { + if o == nil || IsNil(o.Seq) { + var ret int32 + return ret + } + return *o.Seq +} + +// GetSeqOk returns a tuple with the Seq field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PageRule) GetSeqOk() (*int32, bool) { + if o == nil || IsNil(o.Seq) { + return nil, false + } + return o.Seq, true +} + +// HasSeq returns a boolean if a field has been set. +func (o *PageRule) HasSeq() bool { + if o != nil && !IsNil(o.Seq) { + return true + } + + return false +} + +// SetSeq gets a reference to the given int32 and assigns it to the Seq field. +func (o *PageRule) SetSeq(v int32) { + o.Seq = &v +} + +// GetUrlType returns the UrlType field value if set, zero value otherwise. +// Deprecated +func (o *PageRule) GetUrlType() string { + if o == nil || IsNil(o.UrlType) { + var ret string + return ret + } + return *o.UrlType +} + +// GetUrlTypeOk returns a tuple with the UrlType field value if set, nil otherwise +// and a boolean to check if the value has been set. +// Deprecated +func (o *PageRule) GetUrlTypeOk() (*string, bool) { + if o == nil || IsNil(o.UrlType) { + return nil, false + } + return o.UrlType, true +} + +// HasUrlType returns a boolean if a field has been set. +func (o *PageRule) HasUrlType() bool { + if o != nil && !IsNil(o.UrlType) { + return true + } + + return false +} + +// SetUrlType gets a reference to the given string and assigns it to the UrlType field. +// Deprecated +func (o *PageRule) SetUrlType(v string) { + o.UrlType = &v +} + +// GetIsProtected returns the IsProtected field value if set, zero value otherwise. +func (o *PageRule) GetIsProtected() bool { + if o == nil || IsNil(o.IsProtected) { + var ret bool + return ret + } + return *o.IsProtected +} + +// GetIsProtectedOk returns a tuple with the IsProtected field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PageRule) GetIsProtectedOk() (*bool, bool) { + if o == nil || IsNil(o.IsProtected) { + return nil, false + } + return o.IsProtected, true +} + +// HasIsProtected returns a boolean if a field has been set. +func (o *PageRule) HasIsProtected() bool { + if o != nil && !IsNil(o.IsProtected) { + return true + } + + return false +} + +// SetIsProtected gets a reference to the given bool and assigns it to the IsProtected field. +func (o *PageRule) SetIsProtected(v bool) { + o.IsProtected = &v +} + +// GetUrl returns the Url field value if set, zero value otherwise. +func (o *PageRule) GetUrl() string { + if o == nil || IsNil(o.Url) { + var ret string + return ret + } + return *o.Url +} + +// GetUrlOk returns a tuple with the Url field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PageRule) GetUrlOk() (*string, bool) { + if o == nil || IsNil(o.Url) { + return nil, false + } + return o.Url, true +} + +// HasUrl returns a boolean if a field has been set. +func (o *PageRule) HasUrl() bool { + if o != nil && !IsNil(o.Url) { + return true + } + + return false +} + +// SetUrl gets a reference to the given string and assigns it to the Url field. +func (o *PageRule) SetUrl(v string) { + o.Url = &v +} + +// GetCacheLevel returns the CacheLevel field value if set, zero value otherwise. +func (o *PageRule) GetCacheLevel() string { + if o == nil || IsNil(o.CacheLevel) { + var ret string + return ret + } + return *o.CacheLevel +} + +// GetCacheLevelOk returns a tuple with the CacheLevel field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PageRule) GetCacheLevelOk() (*string, bool) { + if o == nil || IsNil(o.CacheLevel) { + return nil, false + } + return o.CacheLevel, true +} + +// HasCacheLevel returns a boolean if a field has been set. +func (o *PageRule) HasCacheLevel() bool { + if o != nil && !IsNil(o.CacheLevel) { + return true + } + + return false +} + +// SetCacheLevel gets a reference to the given string and assigns it to the CacheLevel field. +func (o *PageRule) SetCacheLevel(v string) { + o.CacheLevel = &v +} + +// GetWafStatus returns the WafStatus field value if set, zero value otherwise. +func (o *PageRule) GetWafStatus() bool { + if o == nil || IsNil(o.WafStatus) { + var ret bool + return ret + } + return *o.WafStatus +} + +// GetWafStatusOk returns a tuple with the WafStatus field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PageRule) GetWafStatusOk() (*bool, bool) { + if o == nil || IsNil(o.WafStatus) { + return nil, false + } + return o.WafStatus, true +} + +// HasWafStatus returns a boolean if a field has been set. +func (o *PageRule) HasWafStatus() bool { + if o != nil && !IsNil(o.WafStatus) { + return true + } + + return false +} + +// SetWafStatus gets a reference to the given bool and assigns it to the WafStatus field. +func (o *PageRule) SetWafStatus(v bool) { + o.WafStatus = &v +} + +// GetFwStatus returns the FwStatus field value if set, zero value otherwise. +// Deprecated +func (o *PageRule) GetFwStatus() bool { + if o == nil || IsNil(o.FwStatus) { + var ret bool + return ret + } + return *o.FwStatus +} + +// GetFwStatusOk returns a tuple with the FwStatus field value if set, nil otherwise +// and a boolean to check if the value has been set. +// Deprecated +func (o *PageRule) GetFwStatusOk() (*bool, bool) { + if o == nil || IsNil(o.FwStatus) { + return nil, false + } + return o.FwStatus, true +} + +// HasFwStatus returns a boolean if a field has been set. +func (o *PageRule) HasFwStatus() bool { + if o != nil && !IsNil(o.FwStatus) { + return true + } + + return false +} + +// SetFwStatus gets a reference to the given bool and assigns it to the FwStatus field. +// Deprecated +func (o *PageRule) SetFwStatus(v bool) { + o.FwStatus = &v +} + +// GetAcceleration returns the Acceleration field value if set, zero value otherwise. +func (o *PageRule) GetAcceleration() Acceleration { + if o == nil || IsNil(o.Acceleration) { + var ret Acceleration + return ret + } + return *o.Acceleration +} + +// GetAccelerationOk returns a tuple with the Acceleration field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PageRule) GetAccelerationOk() (*Acceleration, bool) { + if o == nil || IsNil(o.Acceleration) { + return nil, false + } + return o.Acceleration, true +} + +// HasAcceleration returns a boolean if a field has been set. +func (o *PageRule) HasAcceleration() bool { + if o != nil && !IsNil(o.Acceleration) { + return true + } + + return false +} + +// SetAcceleration gets a reference to the given Acceleration and assigns it to the Acceleration field. +func (o *PageRule) SetAcceleration(v Acceleration) { + o.Acceleration = &v +} + +// GetSlinkStatus returns the SlinkStatus field value if set, zero value otherwise. +func (o *PageRule) GetSlinkStatus() bool { + if o == nil || IsNil(o.SlinkStatus) { + var ret bool + return ret + } + return *o.SlinkStatus +} + +// GetSlinkStatusOk returns a tuple with the SlinkStatus field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PageRule) GetSlinkStatusOk() (*bool, bool) { + if o == nil || IsNil(o.SlinkStatus) { + return nil, false + } + return o.SlinkStatus, true +} + +// HasSlinkStatus returns a boolean if a field has been set. +func (o *PageRule) HasSlinkStatus() bool { + if o != nil && !IsNil(o.SlinkStatus) { + return true + } + + return false +} + +// SetSlinkStatus gets a reference to the given bool and assigns it to the SlinkStatus field. +func (o *PageRule) SetSlinkStatus(v bool) { + o.SlinkStatus = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *PageRule) GetStatus() bool { + if o == nil || IsNil(o.Status) { + var ret bool + 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 *PageRule) GetStatusOk() (*bool, 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 *PageRule) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given bool and assigns it to the Status field. +func (o *PageRule) SetStatus(v bool) { + o.Status = &v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *PageRule) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PageRule) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *PageRule) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *PageRule) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *PageRule) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PageRule) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *PageRule) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *PageRule) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +func (o PageRule) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PageRule) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Cache200) { + toSerialize["cache_200"] = o.Cache200 + } + if !IsNil(o.CacheAny) { + toSerialize["cache_any"] = o.CacheAny + } + if !IsNil(o.CacheCookie) { + toSerialize["cache_cookie"] = o.CacheCookie + } + if !IsNil(o.CacheDeviceType) { + toSerialize["cache_device_type"] = o.CacheDeviceType + } + if !IsNil(o.CacheArgs) { + toSerialize["cache_args"] = o.CacheArgs + } + if !IsNil(o.CacheArg) { + toSerialize["cache_arg"] = o.CacheArg + } + if !IsNil(o.CacheScheme) { + toSerialize["cache_scheme"] = o.CacheScheme + } + if !IsNil(o.CacheBrowser) { + toSerialize["cache_browser"] = o.CacheBrowser + } + if !IsNil(o.CacheIgnoreSc) { + toSerialize["cache_ignore_sc"] = o.CacheIgnoreSc + } + if !IsNil(o.CacheIgnoreVary) { + toSerialize["cache_ignore_vary"] = o.CacheIgnoreVary + } + if !IsNil(o.CacheIgnoreCc) { + toSerialize["cache_ignore_cc"] = o.CacheIgnoreCc + } + if !IsNil(o.CorsHeader) { + toSerialize["cors_header"] = o.CorsHeader + } + if !IsNil(o.RewriteUrl) { + toSerialize["rewrite_url"] = o.RewriteUrl + } + if !IsNil(o.SlinkSecret) { + toSerialize["slink_secret"] = o.SlinkSecret + } + if o.SlinkMd5 != nil { + toSerialize["slink_md5"] = o.SlinkMd5 + } + if o.LoadBalancer.IsSet() { + toSerialize["load_balancer"] = o.LoadBalancer.Get() + } + if !IsNil(o.ClusterStatus) { + toSerialize["cluster_status"] = o.ClusterStatus + } + if !IsNil(o.ImageResize) { + toSerialize["image_resize"] = o.ImageResize + } + if o.ClusterId.IsSet() { + toSerialize["cluster_id"] = o.ClusterId.Get() + } + if !IsNil(o.UpstreamTimeout) { + toSerialize["upstream_timeout"] = o.UpstreamTimeout + } + if !IsNil(o.ReqCustomHeaders) { + toSerialize["req_custom_headers"] = o.ReqCustomHeaders + } + if !IsNil(o.ResCustomHeaders) { + toSerialize["res_custom_headers"] = o.ResCustomHeaders + } + if !IsNil(o.ReqHideHeaders) { + toSerialize["req_hide_headers"] = o.ReqHideHeaders + } + if !IsNil(o.ResHideHeaders) { + toSerialize["res_hide_headers"] = o.ResHideHeaders + } + if !IsNil(o.CustomHostHeader) { + toSerialize["custom_host_header"] = o.CustomHostHeader + } + if !IsNil(o.Redirect) { + toSerialize["redirect"] = o.Redirect + } + // skip: id is readOnly + if !IsNil(o.DomainId) { + toSerialize["domain_id"] = o.DomainId + } + if !IsNil(o.Seq) { + toSerialize["seq"] = o.Seq + } + if !IsNil(o.UrlType) { + toSerialize["url_type"] = o.UrlType + } + // skip: is_protected is readOnly + if !IsNil(o.Url) { + toSerialize["url"] = o.Url + } + if !IsNil(o.CacheLevel) { + toSerialize["cache_level"] = o.CacheLevel + } + if !IsNil(o.WafStatus) { + toSerialize["waf_status"] = o.WafStatus + } + if !IsNil(o.FwStatus) { + toSerialize["fw_status"] = o.FwStatus + } + if !IsNil(o.Acceleration) { + toSerialize["acceleration"] = o.Acceleration + } + if !IsNil(o.SlinkStatus) { + toSerialize["slink_status"] = o.SlinkStatus + } + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + // skip: created_at is readOnly + // skip: updated_at is readOnly + return toSerialize, nil +} + +type NullablePageRule struct { + value *PageRule + isSet bool +} + +func (v NullablePageRule) Get() *PageRule { + return v.value +} + +func (v *NullablePageRule) Set(val *PageRule) { + v.value = val + v.isSet = true +} + +func (v NullablePageRule) IsSet() bool { + return v.isSet +} + +func (v *NullablePageRule) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePageRule(val *PageRule) *NullablePageRule { + return &NullablePageRule{value: val, isSet: true} +} + +func (v NullablePageRule) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePageRule) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_page_rule_data.go b/model_page_rule_data.go new file mode 100644 index 0000000..96c70a7 --- /dev/null +++ b/model_page_rule_data.go @@ -0,0 +1,126 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the PageRuleData type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PageRuleData{} + +// PageRuleData struct for PageRuleData +type PageRuleData struct { + Data *PageRule `json:"data,omitempty"` +} + +// NewPageRuleData instantiates a new PageRuleData object +// This constructor will assign default values to properties that have it defined, +// 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 NewPageRuleData() *PageRuleData { + this := PageRuleData{} + return &this +} + +// NewPageRuleDataWithDefaults instantiates a new PageRuleData object +// This 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 NewPageRuleDataWithDefaults() *PageRuleData { + this := PageRuleData{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *PageRuleData) GetData() PageRule { + if o == nil || IsNil(o.Data) { + var ret PageRule + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PageRuleData) GetDataOk() (*PageRule, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *PageRuleData) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given PageRule and assigns it to the Data field. +func (o *PageRuleData) SetData(v PageRule) { + o.Data = &v +} + +func (o PageRuleData) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PageRuleData) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + return toSerialize, nil +} + +type NullablePageRuleData struct { + value *PageRuleData + isSet bool +} + +func (v NullablePageRuleData) Get() *PageRuleData { + return v.value +} + +func (v *NullablePageRuleData) Set(val *PageRuleData) { + v.value = val + v.isSet = true +} + +func (v NullablePageRuleData) IsSet() bool { + return v.isSet +} + +func (v *NullablePageRuleData) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePageRuleData(val *PageRuleData) *NullablePageRuleData { + return &NullablePageRuleData{value: val, isSet: true} +} + +func (v NullablePageRuleData) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePageRuleData) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_page_rule_diff.go b/model_page_rule_diff.go new file mode 100644 index 0000000..2ccd18e --- /dev/null +++ b/model_page_rule_diff.go @@ -0,0 +1,1201 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the PageRuleDiff type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PageRuleDiff{} + +// PageRuleDiff struct for PageRuleDiff +type PageRuleDiff struct { + // URL pattern of target pages + Url *string `json:"url,omitempty"` + CacheLevel *string `json:"cache_level,omitempty"` + WafStatus *bool `json:"waf_status,omitempty"` + // Shows whether firewall is enabled or not + // Deprecated + FwStatus *bool `json:"fw_status,omitempty"` + Acceleration *Acceleration `json:"acceleration,omitempty"` + // Secure link is enabled or not + SlinkStatus *bool `json:"slink_status,omitempty"` + // Is the page-rule enabled? + Status *bool `json:"status,omitempty"` + Cache200 *string `json:"cache_200,omitempty"` + CacheAny *string `json:"cache_any,omitempty"` + // Cookie variables to consider in cache (comma separaterd values) + CacheCookie *string `json:"cache_cookie,omitempty"` + CacheArgs *bool `json:"cache_args,omitempty"` + // Query string arguments to consider in cache (& seperated values) + CacheArg *string `json:"cache_arg,omitempty"` + // Deprecated + CacheScheme *bool `json:"cache_scheme,omitempty"` + CacheBrowser *string `json:"cache_browser,omitempty"` + // Ignore default behavior in caching set-cookie header + CacheIgnoreSc *bool `json:"cache_ignore_sc,omitempty"` + // Ignore default behavior in caching vary header + CacheIgnoreVary *bool `json:"cache_ignore_vary,omitempty"` + CacheIgnoreCc *bool `json:"cache_ignore_cc,omitempty"` + CorsHeader *string `json:"cors_header,omitempty"` + RewriteUrl *string `json:"rewrite_url,omitempty"` + SlinkSecret *string `json:"slink_secret,omitempty"` + SlinkMd5 []string `json:"slink_md5,omitempty"` + ClusterStatus *bool `json:"cluster_status,omitempty"` + ClusterId NullableString `json:"cluster_id,omitempty"` + UpstreamTimeout *UpstreamTimeout `json:"upstream_timeout,omitempty"` + ReqCustomHeaders []PageRuleDiffReqCustomHeadersInner `json:"req_custom_headers,omitempty"` + ResCustomHeaders []PageRuleDiffReqCustomHeadersInner `json:"res_custom_headers,omitempty"` + ReqHideHeaders []string `json:"req_hide_headers,omitempty"` + ResHideHeaders []string `json:"res_hide_headers,omitempty"` + CustomHostHeader *string `json:"custom_host_header,omitempty"` + Redirect *PageRuleDiffRedirect `json:"redirect,omitempty"` +} + +// NewPageRuleDiff instantiates a new PageRuleDiff object +// This constructor will assign default values to properties that have it defined, +// 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 NewPageRuleDiff() *PageRuleDiff { + this := PageRuleDiff{} + var cacheArg string = "" + this.CacheArg = &cacheArg + return &this +} + +// NewPageRuleDiffWithDefaults instantiates a new PageRuleDiff object +// This 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 NewPageRuleDiffWithDefaults() *PageRuleDiff { + this := PageRuleDiff{} + var cacheArg string = "" + this.CacheArg = &cacheArg + return &this +} + +// GetUrl returns the Url field value if set, zero value otherwise. +func (o *PageRuleDiff) GetUrl() string { + if o == nil || IsNil(o.Url) { + var ret string + return ret + } + return *o.Url +} + +// GetUrlOk returns a tuple with the Url field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PageRuleDiff) GetUrlOk() (*string, bool) { + if o == nil || IsNil(o.Url) { + return nil, false + } + return o.Url, true +} + +// HasUrl returns a boolean if a field has been set. +func (o *PageRuleDiff) HasUrl() bool { + if o != nil && !IsNil(o.Url) { + return true + } + + return false +} + +// SetUrl gets a reference to the given string and assigns it to the Url field. +func (o *PageRuleDiff) SetUrl(v string) { + o.Url = &v +} + +// GetCacheLevel returns the CacheLevel field value if set, zero value otherwise. +func (o *PageRuleDiff) GetCacheLevel() string { + if o == nil || IsNil(o.CacheLevel) { + var ret string + return ret + } + return *o.CacheLevel +} + +// GetCacheLevelOk returns a tuple with the CacheLevel field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PageRuleDiff) GetCacheLevelOk() (*string, bool) { + if o == nil || IsNil(o.CacheLevel) { + return nil, false + } + return o.CacheLevel, true +} + +// HasCacheLevel returns a boolean if a field has been set. +func (o *PageRuleDiff) HasCacheLevel() bool { + if o != nil && !IsNil(o.CacheLevel) { + return true + } + + return false +} + +// SetCacheLevel gets a reference to the given string and assigns it to the CacheLevel field. +func (o *PageRuleDiff) SetCacheLevel(v string) { + o.CacheLevel = &v +} + +// GetWafStatus returns the WafStatus field value if set, zero value otherwise. +func (o *PageRuleDiff) GetWafStatus() bool { + if o == nil || IsNil(o.WafStatus) { + var ret bool + return ret + } + return *o.WafStatus +} + +// GetWafStatusOk returns a tuple with the WafStatus field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PageRuleDiff) GetWafStatusOk() (*bool, bool) { + if o == nil || IsNil(o.WafStatus) { + return nil, false + } + return o.WafStatus, true +} + +// HasWafStatus returns a boolean if a field has been set. +func (o *PageRuleDiff) HasWafStatus() bool { + if o != nil && !IsNil(o.WafStatus) { + return true + } + + return false +} + +// SetWafStatus gets a reference to the given bool and assigns it to the WafStatus field. +func (o *PageRuleDiff) SetWafStatus(v bool) { + o.WafStatus = &v +} + +// GetFwStatus returns the FwStatus field value if set, zero value otherwise. +// Deprecated +func (o *PageRuleDiff) GetFwStatus() bool { + if o == nil || IsNil(o.FwStatus) { + var ret bool + return ret + } + return *o.FwStatus +} + +// GetFwStatusOk returns a tuple with the FwStatus field value if set, nil otherwise +// and a boolean to check if the value has been set. +// Deprecated +func (o *PageRuleDiff) GetFwStatusOk() (*bool, bool) { + if o == nil || IsNil(o.FwStatus) { + return nil, false + } + return o.FwStatus, true +} + +// HasFwStatus returns a boolean if a field has been set. +func (o *PageRuleDiff) HasFwStatus() bool { + if o != nil && !IsNil(o.FwStatus) { + return true + } + + return false +} + +// SetFwStatus gets a reference to the given bool and assigns it to the FwStatus field. +// Deprecated +func (o *PageRuleDiff) SetFwStatus(v bool) { + o.FwStatus = &v +} + +// GetAcceleration returns the Acceleration field value if set, zero value otherwise. +func (o *PageRuleDiff) GetAcceleration() Acceleration { + if o == nil || IsNil(o.Acceleration) { + var ret Acceleration + return ret + } + return *o.Acceleration +} + +// GetAccelerationOk returns a tuple with the Acceleration field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PageRuleDiff) GetAccelerationOk() (*Acceleration, bool) { + if o == nil || IsNil(o.Acceleration) { + return nil, false + } + return o.Acceleration, true +} + +// HasAcceleration returns a boolean if a field has been set. +func (o *PageRuleDiff) HasAcceleration() bool { + if o != nil && !IsNil(o.Acceleration) { + return true + } + + return false +} + +// SetAcceleration gets a reference to the given Acceleration and assigns it to the Acceleration field. +func (o *PageRuleDiff) SetAcceleration(v Acceleration) { + o.Acceleration = &v +} + +// GetSlinkStatus returns the SlinkStatus field value if set, zero value otherwise. +func (o *PageRuleDiff) GetSlinkStatus() bool { + if o == nil || IsNil(o.SlinkStatus) { + var ret bool + return ret + } + return *o.SlinkStatus +} + +// GetSlinkStatusOk returns a tuple with the SlinkStatus field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PageRuleDiff) GetSlinkStatusOk() (*bool, bool) { + if o == nil || IsNil(o.SlinkStatus) { + return nil, false + } + return o.SlinkStatus, true +} + +// HasSlinkStatus returns a boolean if a field has been set. +func (o *PageRuleDiff) HasSlinkStatus() bool { + if o != nil && !IsNil(o.SlinkStatus) { + return true + } + + return false +} + +// SetSlinkStatus gets a reference to the given bool and assigns it to the SlinkStatus field. +func (o *PageRuleDiff) SetSlinkStatus(v bool) { + o.SlinkStatus = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *PageRuleDiff) GetStatus() bool { + if o == nil || IsNil(o.Status) { + var ret bool + 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 *PageRuleDiff) GetStatusOk() (*bool, 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 *PageRuleDiff) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given bool and assigns it to the Status field. +func (o *PageRuleDiff) SetStatus(v bool) { + o.Status = &v +} + +// GetCache200 returns the Cache200 field value if set, zero value otherwise. +func (o *PageRuleDiff) GetCache200() string { + if o == nil || IsNil(o.Cache200) { + var ret string + return ret + } + return *o.Cache200 +} + +// GetCache200Ok returns a tuple with the Cache200 field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PageRuleDiff) GetCache200Ok() (*string, bool) { + if o == nil || IsNil(o.Cache200) { + return nil, false + } + return o.Cache200, true +} + +// HasCache200 returns a boolean if a field has been set. +func (o *PageRuleDiff) HasCache200() bool { + if o != nil && !IsNil(o.Cache200) { + return true + } + + return false +} + +// SetCache200 gets a reference to the given string and assigns it to the Cache200 field. +func (o *PageRuleDiff) SetCache200(v string) { + o.Cache200 = &v +} + +// GetCacheAny returns the CacheAny field value if set, zero value otherwise. +func (o *PageRuleDiff) GetCacheAny() string { + if o == nil || IsNil(o.CacheAny) { + var ret string + return ret + } + return *o.CacheAny +} + +// GetCacheAnyOk returns a tuple with the CacheAny field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PageRuleDiff) GetCacheAnyOk() (*string, bool) { + if o == nil || IsNil(o.CacheAny) { + return nil, false + } + return o.CacheAny, true +} + +// HasCacheAny returns a boolean if a field has been set. +func (o *PageRuleDiff) HasCacheAny() bool { + if o != nil && !IsNil(o.CacheAny) { + return true + } + + return false +} + +// SetCacheAny gets a reference to the given string and assigns it to the CacheAny field. +func (o *PageRuleDiff) SetCacheAny(v string) { + o.CacheAny = &v +} + +// GetCacheCookie returns the CacheCookie field value if set, zero value otherwise. +func (o *PageRuleDiff) GetCacheCookie() string { + if o == nil || IsNil(o.CacheCookie) { + var ret string + return ret + } + return *o.CacheCookie +} + +// GetCacheCookieOk returns a tuple with the CacheCookie field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PageRuleDiff) GetCacheCookieOk() (*string, bool) { + if o == nil || IsNil(o.CacheCookie) { + return nil, false + } + return o.CacheCookie, true +} + +// HasCacheCookie returns a boolean if a field has been set. +func (o *PageRuleDiff) HasCacheCookie() bool { + if o != nil && !IsNil(o.CacheCookie) { + return true + } + + return false +} + +// SetCacheCookie gets a reference to the given string and assigns it to the CacheCookie field. +func (o *PageRuleDiff) SetCacheCookie(v string) { + o.CacheCookie = &v +} + +// GetCacheArgs returns the CacheArgs field value if set, zero value otherwise. +func (o *PageRuleDiff) GetCacheArgs() bool { + if o == nil || IsNil(o.CacheArgs) { + var ret bool + return ret + } + return *o.CacheArgs +} + +// GetCacheArgsOk returns a tuple with the CacheArgs field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PageRuleDiff) GetCacheArgsOk() (*bool, bool) { + if o == nil || IsNil(o.CacheArgs) { + return nil, false + } + return o.CacheArgs, true +} + +// HasCacheArgs returns a boolean if a field has been set. +func (o *PageRuleDiff) HasCacheArgs() bool { + if o != nil && !IsNil(o.CacheArgs) { + return true + } + + return false +} + +// SetCacheArgs gets a reference to the given bool and assigns it to the CacheArgs field. +func (o *PageRuleDiff) SetCacheArgs(v bool) { + o.CacheArgs = &v +} + +// GetCacheArg returns the CacheArg field value if set, zero value otherwise. +func (o *PageRuleDiff) GetCacheArg() string { + if o == nil || IsNil(o.CacheArg) { + var ret string + return ret + } + return *o.CacheArg +} + +// GetCacheArgOk returns a tuple with the CacheArg field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PageRuleDiff) GetCacheArgOk() (*string, bool) { + if o == nil || IsNil(o.CacheArg) { + return nil, false + } + return o.CacheArg, true +} + +// HasCacheArg returns a boolean if a field has been set. +func (o *PageRuleDiff) HasCacheArg() bool { + if o != nil && !IsNil(o.CacheArg) { + return true + } + + return false +} + +// SetCacheArg gets a reference to the given string and assigns it to the CacheArg field. +func (o *PageRuleDiff) SetCacheArg(v string) { + o.CacheArg = &v +} + +// GetCacheScheme returns the CacheScheme field value if set, zero value otherwise. +// Deprecated +func (o *PageRuleDiff) GetCacheScheme() bool { + if o == nil || IsNil(o.CacheScheme) { + var ret bool + return ret + } + return *o.CacheScheme +} + +// GetCacheSchemeOk returns a tuple with the CacheScheme field value if set, nil otherwise +// and a boolean to check if the value has been set. +// Deprecated +func (o *PageRuleDiff) GetCacheSchemeOk() (*bool, bool) { + if o == nil || IsNil(o.CacheScheme) { + return nil, false + } + return o.CacheScheme, true +} + +// HasCacheScheme returns a boolean if a field has been set. +func (o *PageRuleDiff) HasCacheScheme() bool { + if o != nil && !IsNil(o.CacheScheme) { + return true + } + + return false +} + +// SetCacheScheme gets a reference to the given bool and assigns it to the CacheScheme field. +// Deprecated +func (o *PageRuleDiff) SetCacheScheme(v bool) { + o.CacheScheme = &v +} + +// GetCacheBrowser returns the CacheBrowser field value if set, zero value otherwise. +func (o *PageRuleDiff) GetCacheBrowser() string { + if o == nil || IsNil(o.CacheBrowser) { + var ret string + return ret + } + return *o.CacheBrowser +} + +// GetCacheBrowserOk returns a tuple with the CacheBrowser field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PageRuleDiff) GetCacheBrowserOk() (*string, bool) { + if o == nil || IsNil(o.CacheBrowser) { + return nil, false + } + return o.CacheBrowser, true +} + +// HasCacheBrowser returns a boolean if a field has been set. +func (o *PageRuleDiff) HasCacheBrowser() bool { + if o != nil && !IsNil(o.CacheBrowser) { + return true + } + + return false +} + +// SetCacheBrowser gets a reference to the given string and assigns it to the CacheBrowser field. +func (o *PageRuleDiff) SetCacheBrowser(v string) { + o.CacheBrowser = &v +} + +// GetCacheIgnoreSc returns the CacheIgnoreSc field value if set, zero value otherwise. +func (o *PageRuleDiff) GetCacheIgnoreSc() bool { + if o == nil || IsNil(o.CacheIgnoreSc) { + var ret bool + return ret + } + return *o.CacheIgnoreSc +} + +// GetCacheIgnoreScOk returns a tuple with the CacheIgnoreSc field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PageRuleDiff) GetCacheIgnoreScOk() (*bool, bool) { + if o == nil || IsNil(o.CacheIgnoreSc) { + return nil, false + } + return o.CacheIgnoreSc, true +} + +// HasCacheIgnoreSc returns a boolean if a field has been set. +func (o *PageRuleDiff) HasCacheIgnoreSc() bool { + if o != nil && !IsNil(o.CacheIgnoreSc) { + return true + } + + return false +} + +// SetCacheIgnoreSc gets a reference to the given bool and assigns it to the CacheIgnoreSc field. +func (o *PageRuleDiff) SetCacheIgnoreSc(v bool) { + o.CacheIgnoreSc = &v +} + +// GetCacheIgnoreVary returns the CacheIgnoreVary field value if set, zero value otherwise. +func (o *PageRuleDiff) GetCacheIgnoreVary() bool { + if o == nil || IsNil(o.CacheIgnoreVary) { + var ret bool + return ret + } + return *o.CacheIgnoreVary +} + +// GetCacheIgnoreVaryOk returns a tuple with the CacheIgnoreVary field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PageRuleDiff) GetCacheIgnoreVaryOk() (*bool, bool) { + if o == nil || IsNil(o.CacheIgnoreVary) { + return nil, false + } + return o.CacheIgnoreVary, true +} + +// HasCacheIgnoreVary returns a boolean if a field has been set. +func (o *PageRuleDiff) HasCacheIgnoreVary() bool { + if o != nil && !IsNil(o.CacheIgnoreVary) { + return true + } + + return false +} + +// SetCacheIgnoreVary gets a reference to the given bool and assigns it to the CacheIgnoreVary field. +func (o *PageRuleDiff) SetCacheIgnoreVary(v bool) { + o.CacheIgnoreVary = &v +} + +// GetCacheIgnoreCc returns the CacheIgnoreCc field value if set, zero value otherwise. +func (o *PageRuleDiff) GetCacheIgnoreCc() bool { + if o == nil || IsNil(o.CacheIgnoreCc) { + var ret bool + return ret + } + return *o.CacheIgnoreCc +} + +// GetCacheIgnoreCcOk returns a tuple with the CacheIgnoreCc field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PageRuleDiff) GetCacheIgnoreCcOk() (*bool, bool) { + if o == nil || IsNil(o.CacheIgnoreCc) { + return nil, false + } + return o.CacheIgnoreCc, true +} + +// HasCacheIgnoreCc returns a boolean if a field has been set. +func (o *PageRuleDiff) HasCacheIgnoreCc() bool { + if o != nil && !IsNil(o.CacheIgnoreCc) { + return true + } + + return false +} + +// SetCacheIgnoreCc gets a reference to the given bool and assigns it to the CacheIgnoreCc field. +func (o *PageRuleDiff) SetCacheIgnoreCc(v bool) { + o.CacheIgnoreCc = &v +} + +// GetCorsHeader returns the CorsHeader field value if set, zero value otherwise. +func (o *PageRuleDiff) GetCorsHeader() string { + if o == nil || IsNil(o.CorsHeader) { + var ret string + return ret + } + return *o.CorsHeader +} + +// GetCorsHeaderOk returns a tuple with the CorsHeader field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PageRuleDiff) GetCorsHeaderOk() (*string, bool) { + if o == nil || IsNil(o.CorsHeader) { + return nil, false + } + return o.CorsHeader, true +} + +// HasCorsHeader returns a boolean if a field has been set. +func (o *PageRuleDiff) HasCorsHeader() bool { + if o != nil && !IsNil(o.CorsHeader) { + return true + } + + return false +} + +// SetCorsHeader gets a reference to the given string and assigns it to the CorsHeader field. +func (o *PageRuleDiff) SetCorsHeader(v string) { + o.CorsHeader = &v +} + +// GetRewriteUrl returns the RewriteUrl field value if set, zero value otherwise. +func (o *PageRuleDiff) GetRewriteUrl() string { + if o == nil || IsNil(o.RewriteUrl) { + var ret string + return ret + } + return *o.RewriteUrl +} + +// GetRewriteUrlOk returns a tuple with the RewriteUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PageRuleDiff) GetRewriteUrlOk() (*string, bool) { + if o == nil || IsNil(o.RewriteUrl) { + return nil, false + } + return o.RewriteUrl, true +} + +// HasRewriteUrl returns a boolean if a field has been set. +func (o *PageRuleDiff) HasRewriteUrl() bool { + if o != nil && !IsNil(o.RewriteUrl) { + return true + } + + return false +} + +// SetRewriteUrl gets a reference to the given string and assigns it to the RewriteUrl field. +func (o *PageRuleDiff) SetRewriteUrl(v string) { + o.RewriteUrl = &v +} + +// GetSlinkSecret returns the SlinkSecret field value if set, zero value otherwise. +func (o *PageRuleDiff) GetSlinkSecret() string { + if o == nil || IsNil(o.SlinkSecret) { + var ret string + return ret + } + return *o.SlinkSecret +} + +// GetSlinkSecretOk returns a tuple with the SlinkSecret field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PageRuleDiff) GetSlinkSecretOk() (*string, bool) { + if o == nil || IsNil(o.SlinkSecret) { + return nil, false + } + return o.SlinkSecret, true +} + +// HasSlinkSecret returns a boolean if a field has been set. +func (o *PageRuleDiff) HasSlinkSecret() bool { + if o != nil && !IsNil(o.SlinkSecret) { + return true + } + + return false +} + +// SetSlinkSecret gets a reference to the given string and assigns it to the SlinkSecret field. +func (o *PageRuleDiff) SetSlinkSecret(v string) { + o.SlinkSecret = &v +} + +// GetSlinkMd5 returns the SlinkMd5 field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PageRuleDiff) GetSlinkMd5() []string { + if o == nil { + var ret []string + return ret + } + return o.SlinkMd5 +} + +// GetSlinkMd5Ok returns a tuple with the SlinkMd5 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 *PageRuleDiff) GetSlinkMd5Ok() ([]string, bool) { + if o == nil || IsNil(o.SlinkMd5) { + return nil, false + } + return o.SlinkMd5, true +} + +// HasSlinkMd5 returns a boolean if a field has been set. +func (o *PageRuleDiff) HasSlinkMd5() bool { + if o != nil && IsNil(o.SlinkMd5) { + return true + } + + return false +} + +// SetSlinkMd5 gets a reference to the given []string and assigns it to the SlinkMd5 field. +func (o *PageRuleDiff) SetSlinkMd5(v []string) { + o.SlinkMd5 = v +} + +// GetClusterStatus returns the ClusterStatus field value if set, zero value otherwise. +func (o *PageRuleDiff) GetClusterStatus() bool { + if o == nil || IsNil(o.ClusterStatus) { + var ret bool + return ret + } + return *o.ClusterStatus +} + +// GetClusterStatusOk returns a tuple with the ClusterStatus field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PageRuleDiff) GetClusterStatusOk() (*bool, bool) { + if o == nil || IsNil(o.ClusterStatus) { + return nil, false + } + return o.ClusterStatus, true +} + +// HasClusterStatus returns a boolean if a field has been set. +func (o *PageRuleDiff) HasClusterStatus() bool { + if o != nil && !IsNil(o.ClusterStatus) { + return true + } + + return false +} + +// SetClusterStatus gets a reference to the given bool and assigns it to the ClusterStatus field. +func (o *PageRuleDiff) SetClusterStatus(v bool) { + o.ClusterStatus = &v +} + +// GetClusterId returns the ClusterId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PageRuleDiff) GetClusterId() string { + if o == nil || IsNil(o.ClusterId.Get()) { + var ret string + return ret + } + return *o.ClusterId.Get() +} + +// GetClusterIdOk returns a tuple with the ClusterId 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 *PageRuleDiff) GetClusterIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ClusterId.Get(), o.ClusterId.IsSet() +} + +// HasClusterId returns a boolean if a field has been set. +func (o *PageRuleDiff) HasClusterId() bool { + if o != nil && o.ClusterId.IsSet() { + return true + } + + return false +} + +// SetClusterId gets a reference to the given NullableString and assigns it to the ClusterId field. +func (o *PageRuleDiff) SetClusterId(v string) { + o.ClusterId.Set(&v) +} +// SetClusterIdNil sets the value for ClusterId to be an explicit nil +func (o *PageRuleDiff) SetClusterIdNil() { + o.ClusterId.Set(nil) +} + +// UnsetClusterId ensures that no value is present for ClusterId, not even an explicit nil +func (o *PageRuleDiff) UnsetClusterId() { + o.ClusterId.Unset() +} + +// GetUpstreamTimeout returns the UpstreamTimeout field value if set, zero value otherwise. +func (o *PageRuleDiff) GetUpstreamTimeout() UpstreamTimeout { + if o == nil || IsNil(o.UpstreamTimeout) { + var ret UpstreamTimeout + return ret + } + return *o.UpstreamTimeout +} + +// GetUpstreamTimeoutOk returns a tuple with the UpstreamTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PageRuleDiff) GetUpstreamTimeoutOk() (*UpstreamTimeout, bool) { + if o == nil || IsNil(o.UpstreamTimeout) { + return nil, false + } + return o.UpstreamTimeout, true +} + +// HasUpstreamTimeout returns a boolean if a field has been set. +func (o *PageRuleDiff) HasUpstreamTimeout() bool { + if o != nil && !IsNil(o.UpstreamTimeout) { + return true + } + + return false +} + +// SetUpstreamTimeout gets a reference to the given UpstreamTimeout and assigns it to the UpstreamTimeout field. +func (o *PageRuleDiff) SetUpstreamTimeout(v UpstreamTimeout) { + o.UpstreamTimeout = &v +} + +// GetReqCustomHeaders returns the ReqCustomHeaders field value if set, zero value otherwise. +func (o *PageRuleDiff) GetReqCustomHeaders() []PageRuleDiffReqCustomHeadersInner { + if o == nil || IsNil(o.ReqCustomHeaders) { + var ret []PageRuleDiffReqCustomHeadersInner + return ret + } + return o.ReqCustomHeaders +} + +// GetReqCustomHeadersOk returns a tuple with the ReqCustomHeaders field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PageRuleDiff) GetReqCustomHeadersOk() ([]PageRuleDiffReqCustomHeadersInner, bool) { + if o == nil || IsNil(o.ReqCustomHeaders) { + return nil, false + } + return o.ReqCustomHeaders, true +} + +// HasReqCustomHeaders returns a boolean if a field has been set. +func (o *PageRuleDiff) HasReqCustomHeaders() bool { + if o != nil && !IsNil(o.ReqCustomHeaders) { + return true + } + + return false +} + +// SetReqCustomHeaders gets a reference to the given []PageRuleDiffReqCustomHeadersInner and assigns it to the ReqCustomHeaders field. +func (o *PageRuleDiff) SetReqCustomHeaders(v []PageRuleDiffReqCustomHeadersInner) { + o.ReqCustomHeaders = v +} + +// GetResCustomHeaders returns the ResCustomHeaders field value if set, zero value otherwise. +func (o *PageRuleDiff) GetResCustomHeaders() []PageRuleDiffReqCustomHeadersInner { + if o == nil || IsNil(o.ResCustomHeaders) { + var ret []PageRuleDiffReqCustomHeadersInner + return ret + } + return o.ResCustomHeaders +} + +// GetResCustomHeadersOk returns a tuple with the ResCustomHeaders field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PageRuleDiff) GetResCustomHeadersOk() ([]PageRuleDiffReqCustomHeadersInner, bool) { + if o == nil || IsNil(o.ResCustomHeaders) { + return nil, false + } + return o.ResCustomHeaders, true +} + +// HasResCustomHeaders returns a boolean if a field has been set. +func (o *PageRuleDiff) HasResCustomHeaders() bool { + if o != nil && !IsNil(o.ResCustomHeaders) { + return true + } + + return false +} + +// SetResCustomHeaders gets a reference to the given []PageRuleDiffReqCustomHeadersInner and assigns it to the ResCustomHeaders field. +func (o *PageRuleDiff) SetResCustomHeaders(v []PageRuleDiffReqCustomHeadersInner) { + o.ResCustomHeaders = v +} + +// GetReqHideHeaders returns the ReqHideHeaders field value if set, zero value otherwise. +func (o *PageRuleDiff) GetReqHideHeaders() []string { + if o == nil || IsNil(o.ReqHideHeaders) { + var ret []string + return ret + } + return o.ReqHideHeaders +} + +// GetReqHideHeadersOk returns a tuple with the ReqHideHeaders field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PageRuleDiff) GetReqHideHeadersOk() ([]string, bool) { + if o == nil || IsNil(o.ReqHideHeaders) { + return nil, false + } + return o.ReqHideHeaders, true +} + +// HasReqHideHeaders returns a boolean if a field has been set. +func (o *PageRuleDiff) HasReqHideHeaders() bool { + if o != nil && !IsNil(o.ReqHideHeaders) { + return true + } + + return false +} + +// SetReqHideHeaders gets a reference to the given []string and assigns it to the ReqHideHeaders field. +func (o *PageRuleDiff) SetReqHideHeaders(v []string) { + o.ReqHideHeaders = v +} + +// GetResHideHeaders returns the ResHideHeaders field value if set, zero value otherwise. +func (o *PageRuleDiff) GetResHideHeaders() []string { + if o == nil || IsNil(o.ResHideHeaders) { + var ret []string + return ret + } + return o.ResHideHeaders +} + +// GetResHideHeadersOk returns a tuple with the ResHideHeaders field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PageRuleDiff) GetResHideHeadersOk() ([]string, bool) { + if o == nil || IsNil(o.ResHideHeaders) { + return nil, false + } + return o.ResHideHeaders, true +} + +// HasResHideHeaders returns a boolean if a field has been set. +func (o *PageRuleDiff) HasResHideHeaders() bool { + if o != nil && !IsNil(o.ResHideHeaders) { + return true + } + + return false +} + +// SetResHideHeaders gets a reference to the given []string and assigns it to the ResHideHeaders field. +func (o *PageRuleDiff) SetResHideHeaders(v []string) { + o.ResHideHeaders = v +} + +// GetCustomHostHeader returns the CustomHostHeader field value if set, zero value otherwise. +func (o *PageRuleDiff) GetCustomHostHeader() string { + if o == nil || IsNil(o.CustomHostHeader) { + var ret string + return ret + } + return *o.CustomHostHeader +} + +// GetCustomHostHeaderOk returns a tuple with the CustomHostHeader field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PageRuleDiff) GetCustomHostHeaderOk() (*string, bool) { + if o == nil || IsNil(o.CustomHostHeader) { + return nil, false + } + return o.CustomHostHeader, true +} + +// HasCustomHostHeader returns a boolean if a field has been set. +func (o *PageRuleDiff) HasCustomHostHeader() bool { + if o != nil && !IsNil(o.CustomHostHeader) { + return true + } + + return false +} + +// SetCustomHostHeader gets a reference to the given string and assigns it to the CustomHostHeader field. +func (o *PageRuleDiff) SetCustomHostHeader(v string) { + o.CustomHostHeader = &v +} + +// GetRedirect returns the Redirect field value if set, zero value otherwise. +func (o *PageRuleDiff) GetRedirect() PageRuleDiffRedirect { + if o == nil || IsNil(o.Redirect) { + var ret PageRuleDiffRedirect + return ret + } + return *o.Redirect +} + +// GetRedirectOk returns a tuple with the Redirect field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PageRuleDiff) GetRedirectOk() (*PageRuleDiffRedirect, bool) { + if o == nil || IsNil(o.Redirect) { + return nil, false + } + return o.Redirect, true +} + +// HasRedirect returns a boolean if a field has been set. +func (o *PageRuleDiff) HasRedirect() bool { + if o != nil && !IsNil(o.Redirect) { + return true + } + + return false +} + +// SetRedirect gets a reference to the given PageRuleDiffRedirect and assigns it to the Redirect field. +func (o *PageRuleDiff) SetRedirect(v PageRuleDiffRedirect) { + o.Redirect = &v +} + +func (o PageRuleDiff) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PageRuleDiff) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Url) { + toSerialize["url"] = o.Url + } + if !IsNil(o.CacheLevel) { + toSerialize["cache_level"] = o.CacheLevel + } + if !IsNil(o.WafStatus) { + toSerialize["waf_status"] = o.WafStatus + } + if !IsNil(o.FwStatus) { + toSerialize["fw_status"] = o.FwStatus + } + if !IsNil(o.Acceleration) { + toSerialize["acceleration"] = o.Acceleration + } + if !IsNil(o.SlinkStatus) { + toSerialize["slink_status"] = o.SlinkStatus + } + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + if !IsNil(o.Cache200) { + toSerialize["cache_200"] = o.Cache200 + } + if !IsNil(o.CacheAny) { + toSerialize["cache_any"] = o.CacheAny + } + if !IsNil(o.CacheCookie) { + toSerialize["cache_cookie"] = o.CacheCookie + } + if !IsNil(o.CacheArgs) { + toSerialize["cache_args"] = o.CacheArgs + } + if !IsNil(o.CacheArg) { + toSerialize["cache_arg"] = o.CacheArg + } + if !IsNil(o.CacheScheme) { + toSerialize["cache_scheme"] = o.CacheScheme + } + if !IsNil(o.CacheBrowser) { + toSerialize["cache_browser"] = o.CacheBrowser + } + if !IsNil(o.CacheIgnoreSc) { + toSerialize["cache_ignore_sc"] = o.CacheIgnoreSc + } + if !IsNil(o.CacheIgnoreVary) { + toSerialize["cache_ignore_vary"] = o.CacheIgnoreVary + } + if !IsNil(o.CacheIgnoreCc) { + toSerialize["cache_ignore_cc"] = o.CacheIgnoreCc + } + if !IsNil(o.CorsHeader) { + toSerialize["cors_header"] = o.CorsHeader + } + if !IsNil(o.RewriteUrl) { + toSerialize["rewrite_url"] = o.RewriteUrl + } + if !IsNil(o.SlinkSecret) { + toSerialize["slink_secret"] = o.SlinkSecret + } + if o.SlinkMd5 != nil { + toSerialize["slink_md5"] = o.SlinkMd5 + } + if !IsNil(o.ClusterStatus) { + toSerialize["cluster_status"] = o.ClusterStatus + } + if o.ClusterId.IsSet() { + toSerialize["cluster_id"] = o.ClusterId.Get() + } + if !IsNil(o.UpstreamTimeout) { + toSerialize["upstream_timeout"] = o.UpstreamTimeout + } + if !IsNil(o.ReqCustomHeaders) { + toSerialize["req_custom_headers"] = o.ReqCustomHeaders + } + if !IsNil(o.ResCustomHeaders) { + toSerialize["res_custom_headers"] = o.ResCustomHeaders + } + if !IsNil(o.ReqHideHeaders) { + toSerialize["req_hide_headers"] = o.ReqHideHeaders + } + if !IsNil(o.ResHideHeaders) { + toSerialize["res_hide_headers"] = o.ResHideHeaders + } + if !IsNil(o.CustomHostHeader) { + toSerialize["custom_host_header"] = o.CustomHostHeader + } + if !IsNil(o.Redirect) { + toSerialize["redirect"] = o.Redirect + } + return toSerialize, nil +} + +type NullablePageRuleDiff struct { + value *PageRuleDiff + isSet bool +} + +func (v NullablePageRuleDiff) Get() *PageRuleDiff { + return v.value +} + +func (v *NullablePageRuleDiff) Set(val *PageRuleDiff) { + v.value = val + v.isSet = true +} + +func (v NullablePageRuleDiff) IsSet() bool { + return v.isSet +} + +func (v *NullablePageRuleDiff) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePageRuleDiff(val *PageRuleDiff) *NullablePageRuleDiff { + return &NullablePageRuleDiff{value: val, isSet: true} +} + +func (v NullablePageRuleDiff) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePageRuleDiff) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_page_rule_diff_data.go b/model_page_rule_diff_data.go new file mode 100644 index 0000000..2a333f1 --- /dev/null +++ b/model_page_rule_diff_data.go @@ -0,0 +1,126 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the PageRuleDiffData type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PageRuleDiffData{} + +// PageRuleDiffData struct for PageRuleDiffData +type PageRuleDiffData struct { + Data *PageRuleDiff `json:"data,omitempty"` +} + +// NewPageRuleDiffData instantiates a new PageRuleDiffData object +// This constructor will assign default values to properties that have it defined, +// 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 NewPageRuleDiffData() *PageRuleDiffData { + this := PageRuleDiffData{} + return &this +} + +// NewPageRuleDiffDataWithDefaults instantiates a new PageRuleDiffData object +// This 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 NewPageRuleDiffDataWithDefaults() *PageRuleDiffData { + this := PageRuleDiffData{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *PageRuleDiffData) GetData() PageRuleDiff { + if o == nil || IsNil(o.Data) { + var ret PageRuleDiff + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PageRuleDiffData) GetDataOk() (*PageRuleDiff, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *PageRuleDiffData) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given PageRuleDiff and assigns it to the Data field. +func (o *PageRuleDiffData) SetData(v PageRuleDiff) { + o.Data = &v +} + +func (o PageRuleDiffData) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PageRuleDiffData) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + return toSerialize, nil +} + +type NullablePageRuleDiffData struct { + value *PageRuleDiffData + isSet bool +} + +func (v NullablePageRuleDiffData) Get() *PageRuleDiffData { + return v.value +} + +func (v *NullablePageRuleDiffData) Set(val *PageRuleDiffData) { + v.value = val + v.isSet = true +} + +func (v NullablePageRuleDiffData) IsSet() bool { + return v.isSet +} + +func (v *NullablePageRuleDiffData) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePageRuleDiffData(val *PageRuleDiffData) *NullablePageRuleDiffData { + return &NullablePageRuleDiffData{value: val, isSet: true} +} + +func (v NullablePageRuleDiffData) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePageRuleDiffData) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_page_rule_diff_redirect.go b/model_page_rule_diff_redirect.go new file mode 100644 index 0000000..f6d819f --- /dev/null +++ b/model_page_rule_diff_redirect.go @@ -0,0 +1,208 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the PageRuleDiffRedirect type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PageRuleDiffRedirect{} + +// PageRuleDiffRedirect struct for PageRuleDiffRedirect +type PageRuleDiffRedirect struct { + Enable *bool `json:"enable,omitempty"` + StatusCode *int32 `json:"status_code,omitempty"` + Url NullableString `json:"url,omitempty"` +} + +// NewPageRuleDiffRedirect instantiates a new PageRuleDiffRedirect object +// This constructor will assign default values to properties that have it defined, +// 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 NewPageRuleDiffRedirect() *PageRuleDiffRedirect { + this := PageRuleDiffRedirect{} + return &this +} + +// NewPageRuleDiffRedirectWithDefaults instantiates a new PageRuleDiffRedirect object +// This 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 NewPageRuleDiffRedirectWithDefaults() *PageRuleDiffRedirect { + this := PageRuleDiffRedirect{} + return &this +} + +// GetEnable returns the Enable field value if set, zero value otherwise. +func (o *PageRuleDiffRedirect) GetEnable() bool { + if o == nil || IsNil(o.Enable) { + var ret bool + return ret + } + return *o.Enable +} + +// GetEnableOk returns a tuple with the Enable field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PageRuleDiffRedirect) GetEnableOk() (*bool, bool) { + if o == nil || IsNil(o.Enable) { + return nil, false + } + return o.Enable, true +} + +// HasEnable returns a boolean if a field has been set. +func (o *PageRuleDiffRedirect) HasEnable() bool { + if o != nil && !IsNil(o.Enable) { + return true + } + + return false +} + +// SetEnable gets a reference to the given bool and assigns it to the Enable field. +func (o *PageRuleDiffRedirect) SetEnable(v bool) { + o.Enable = &v +} + +// GetStatusCode returns the StatusCode field value if set, zero value otherwise. +func (o *PageRuleDiffRedirect) GetStatusCode() int32 { + if o == nil || IsNil(o.StatusCode) { + var ret int32 + return ret + } + return *o.StatusCode +} + +// GetStatusCodeOk returns a tuple with the StatusCode field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PageRuleDiffRedirect) GetStatusCodeOk() (*int32, bool) { + if o == nil || IsNil(o.StatusCode) { + return nil, false + } + return o.StatusCode, true +} + +// HasStatusCode returns a boolean if a field has been set. +func (o *PageRuleDiffRedirect) HasStatusCode() bool { + if o != nil && !IsNil(o.StatusCode) { + return true + } + + return false +} + +// SetStatusCode gets a reference to the given int32 and assigns it to the StatusCode field. +func (o *PageRuleDiffRedirect) SetStatusCode(v int32) { + o.StatusCode = &v +} + +// GetUrl returns the Url field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PageRuleDiffRedirect) GetUrl() string { + if o == nil || IsNil(o.Url.Get()) { + var ret string + return ret + } + return *o.Url.Get() +} + +// GetUrlOk returns a tuple with the Url 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 *PageRuleDiffRedirect) GetUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Url.Get(), o.Url.IsSet() +} + +// HasUrl returns a boolean if a field has been set. +func (o *PageRuleDiffRedirect) HasUrl() bool { + if o != nil && o.Url.IsSet() { + return true + } + + return false +} + +// SetUrl gets a reference to the given NullableString and assigns it to the Url field. +func (o *PageRuleDiffRedirect) SetUrl(v string) { + o.Url.Set(&v) +} +// SetUrlNil sets the value for Url to be an explicit nil +func (o *PageRuleDiffRedirect) SetUrlNil() { + o.Url.Set(nil) +} + +// UnsetUrl ensures that no value is present for Url, not even an explicit nil +func (o *PageRuleDiffRedirect) UnsetUrl() { + o.Url.Unset() +} + +func (o PageRuleDiffRedirect) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PageRuleDiffRedirect) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Enable) { + toSerialize["enable"] = o.Enable + } + if !IsNil(o.StatusCode) { + toSerialize["status_code"] = o.StatusCode + } + if o.Url.IsSet() { + toSerialize["url"] = o.Url.Get() + } + return toSerialize, nil +} + +type NullablePageRuleDiffRedirect struct { + value *PageRuleDiffRedirect + isSet bool +} + +func (v NullablePageRuleDiffRedirect) Get() *PageRuleDiffRedirect { + return v.value +} + +func (v *NullablePageRuleDiffRedirect) Set(val *PageRuleDiffRedirect) { + v.value = val + v.isSet = true +} + +func (v NullablePageRuleDiffRedirect) IsSet() bool { + return v.isSet +} + +func (v *NullablePageRuleDiffRedirect) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePageRuleDiffRedirect(val *PageRuleDiffRedirect) *NullablePageRuleDiffRedirect { + return &NullablePageRuleDiffRedirect{value: val, isSet: true} +} + +func (v NullablePageRuleDiffRedirect) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePageRuleDiffRedirect) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_page_rule_diff_req_custom_headers_inner.go b/model_page_rule_diff_req_custom_headers_inner.go new file mode 100644 index 0000000..c7f9eda --- /dev/null +++ b/model_page_rule_diff_req_custom_headers_inner.go @@ -0,0 +1,198 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the PageRuleDiffReqCustomHeadersInner type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PageRuleDiffReqCustomHeadersInner{} + +// PageRuleDiffReqCustomHeadersInner struct for PageRuleDiffReqCustomHeadersInner +type PageRuleDiffReqCustomHeadersInner struct { + Name *string `json:"name,omitempty"` + Value *string `json:"value,omitempty"` + IsVar *bool `json:"is_var,omitempty"` +} + +// NewPageRuleDiffReqCustomHeadersInner instantiates a new PageRuleDiffReqCustomHeadersInner object +// This constructor will assign default values to properties that have it defined, +// 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 NewPageRuleDiffReqCustomHeadersInner() *PageRuleDiffReqCustomHeadersInner { + this := PageRuleDiffReqCustomHeadersInner{} + return &this +} + +// NewPageRuleDiffReqCustomHeadersInnerWithDefaults instantiates a new PageRuleDiffReqCustomHeadersInner object +// This 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 NewPageRuleDiffReqCustomHeadersInnerWithDefaults() *PageRuleDiffReqCustomHeadersInner { + this := PageRuleDiffReqCustomHeadersInner{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PageRuleDiffReqCustomHeadersInner) 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 *PageRuleDiffReqCustomHeadersInner) 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 *PageRuleDiffReqCustomHeadersInner) 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 *PageRuleDiffReqCustomHeadersInner) SetName(v string) { + o.Name = &v +} + +// GetValue returns the Value field value if set, zero value otherwise. +func (o *PageRuleDiffReqCustomHeadersInner) GetValue() string { + if o == nil || IsNil(o.Value) { + var ret string + return ret + } + return *o.Value +} + +// GetValueOk returns a tuple with the Value field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PageRuleDiffReqCustomHeadersInner) GetValueOk() (*string, bool) { + if o == nil || IsNil(o.Value) { + return nil, false + } + return o.Value, true +} + +// HasValue returns a boolean if a field has been set. +func (o *PageRuleDiffReqCustomHeadersInner) HasValue() bool { + if o != nil && !IsNil(o.Value) { + return true + } + + return false +} + +// SetValue gets a reference to the given string and assigns it to the Value field. +func (o *PageRuleDiffReqCustomHeadersInner) SetValue(v string) { + o.Value = &v +} + +// GetIsVar returns the IsVar field value if set, zero value otherwise. +func (o *PageRuleDiffReqCustomHeadersInner) GetIsVar() bool { + if o == nil || IsNil(o.IsVar) { + var ret bool + return ret + } + return *o.IsVar +} + +// GetIsVarOk returns a tuple with the IsVar field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PageRuleDiffReqCustomHeadersInner) GetIsVarOk() (*bool, bool) { + if o == nil || IsNil(o.IsVar) { + return nil, false + } + return o.IsVar, true +} + +// HasIsVar returns a boolean if a field has been set. +func (o *PageRuleDiffReqCustomHeadersInner) HasIsVar() bool { + if o != nil && !IsNil(o.IsVar) { + return true + } + + return false +} + +// SetIsVar gets a reference to the given bool and assigns it to the IsVar field. +func (o *PageRuleDiffReqCustomHeadersInner) SetIsVar(v bool) { + o.IsVar = &v +} + +func (o PageRuleDiffReqCustomHeadersInner) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PageRuleDiffReqCustomHeadersInner) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Value) { + toSerialize["value"] = o.Value + } + if !IsNil(o.IsVar) { + toSerialize["is_var"] = o.IsVar + } + return toSerialize, nil +} + +type NullablePageRuleDiffReqCustomHeadersInner struct { + value *PageRuleDiffReqCustomHeadersInner + isSet bool +} + +func (v NullablePageRuleDiffReqCustomHeadersInner) Get() *PageRuleDiffReqCustomHeadersInner { + return v.value +} + +func (v *NullablePageRuleDiffReqCustomHeadersInner) Set(val *PageRuleDiffReqCustomHeadersInner) { + v.value = val + v.isSet = true +} + +func (v NullablePageRuleDiffReqCustomHeadersInner) IsSet() bool { + return v.isSet +} + +func (v *NullablePageRuleDiffReqCustomHeadersInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePageRuleDiffReqCustomHeadersInner(val *PageRuleDiffReqCustomHeadersInner) *NullablePageRuleDiffReqCustomHeadersInner { + return &NullablePageRuleDiffReqCustomHeadersInner{value: val, isSet: true} +} + +func (v NullablePageRuleDiffReqCustomHeadersInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePageRuleDiffReqCustomHeadersInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_page_rule_image_resize.go b/model_page_rule_image_resize.go new file mode 100644 index 0000000..c178d30 --- /dev/null +++ b/model_page_rule_image_resize.go @@ -0,0 +1,208 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the PageRuleImageResize type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PageRuleImageResize{} + +// PageRuleImageResize struct for PageRuleImageResize +type PageRuleImageResize struct { + Status *string `json:"status,omitempty"` + HeightBy *string `json:"height_by,omitempty"` + WidthBy *string `json:"width_by,omitempty"` +} + +// NewPageRuleImageResize instantiates a new PageRuleImageResize object +// This constructor will assign default values to properties that have it defined, +// 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 NewPageRuleImageResize() *PageRuleImageResize { + this := PageRuleImageResize{} + var status string = "off" + this.Status = &status + var heightBy string = "height" + this.HeightBy = &heightBy + var widthBy string = "width" + this.WidthBy = &widthBy + return &this +} + +// NewPageRuleImageResizeWithDefaults instantiates a new PageRuleImageResize object +// This 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 NewPageRuleImageResizeWithDefaults() *PageRuleImageResize { + this := PageRuleImageResize{} + var heightBy string = "height" + this.HeightBy = &heightBy + var widthBy string = "width" + this.WidthBy = &widthBy + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *PageRuleImageResize) GetStatus() string { + if o == nil || IsNil(o.Status) { + var ret string + 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 *PageRuleImageResize) GetStatusOk() (*string, 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 *PageRuleImageResize) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *PageRuleImageResize) SetStatus(v string) { + o.Status = &v +} + +// GetHeightBy returns the HeightBy field value if set, zero value otherwise. +func (o *PageRuleImageResize) GetHeightBy() string { + if o == nil || IsNil(o.HeightBy) { + var ret string + return ret + } + return *o.HeightBy +} + +// GetHeightByOk returns a tuple with the HeightBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PageRuleImageResize) GetHeightByOk() (*string, bool) { + if o == nil || IsNil(o.HeightBy) { + return nil, false + } + return o.HeightBy, true +} + +// HasHeightBy returns a boolean if a field has been set. +func (o *PageRuleImageResize) HasHeightBy() bool { + if o != nil && !IsNil(o.HeightBy) { + return true + } + + return false +} + +// SetHeightBy gets a reference to the given string and assigns it to the HeightBy field. +func (o *PageRuleImageResize) SetHeightBy(v string) { + o.HeightBy = &v +} + +// GetWidthBy returns the WidthBy field value if set, zero value otherwise. +func (o *PageRuleImageResize) GetWidthBy() string { + if o == nil || IsNil(o.WidthBy) { + var ret string + return ret + } + return *o.WidthBy +} + +// GetWidthByOk returns a tuple with the WidthBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PageRuleImageResize) GetWidthByOk() (*string, bool) { + if o == nil || IsNil(o.WidthBy) { + return nil, false + } + return o.WidthBy, true +} + +// HasWidthBy returns a boolean if a field has been set. +func (o *PageRuleImageResize) HasWidthBy() bool { + if o != nil && !IsNil(o.WidthBy) { + return true + } + + return false +} + +// SetWidthBy gets a reference to the given string and assigns it to the WidthBy field. +func (o *PageRuleImageResize) SetWidthBy(v string) { + o.WidthBy = &v +} + +func (o PageRuleImageResize) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PageRuleImageResize) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + if !IsNil(o.HeightBy) { + toSerialize["height_by"] = o.HeightBy + } + if !IsNil(o.WidthBy) { + toSerialize["width_by"] = o.WidthBy + } + return toSerialize, nil +} + +type NullablePageRuleImageResize struct { + value *PageRuleImageResize + isSet bool +} + +func (v NullablePageRuleImageResize) Get() *PageRuleImageResize { + return v.value +} + +func (v *NullablePageRuleImageResize) Set(val *PageRuleImageResize) { + v.value = val + v.isSet = true +} + +func (v NullablePageRuleImageResize) IsSet() bool { + return v.isSet +} + +func (v *NullablePageRuleImageResize) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePageRuleImageResize(val *PageRuleImageResize) *NullablePageRuleImageResize { + return &NullablePageRuleImageResize{value: val, isSet: true} +} + +func (v NullablePageRuleImageResize) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePageRuleImageResize) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_page_rule_redirect.go b/model_page_rule_redirect.go new file mode 100644 index 0000000..50355d6 --- /dev/null +++ b/model_page_rule_redirect.go @@ -0,0 +1,216 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the PageRuleRedirect type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PageRuleRedirect{} + +// PageRuleRedirect struct for PageRuleRedirect +type PageRuleRedirect struct { + Enable *bool `json:"enable,omitempty"` + StatusCode *int32 `json:"status_code,omitempty"` + Url NullableString `json:"url,omitempty"` +} + +// NewPageRuleRedirect instantiates a new PageRuleRedirect object +// This constructor will assign default values to properties that have it defined, +// 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 NewPageRuleRedirect() *PageRuleRedirect { + this := PageRuleRedirect{} + var enable bool = false + this.Enable = &enable + var statusCode int32 = 301 + this.StatusCode = &statusCode + return &this +} + +// NewPageRuleRedirectWithDefaults instantiates a new PageRuleRedirect object +// This 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 NewPageRuleRedirectWithDefaults() *PageRuleRedirect { + this := PageRuleRedirect{} + var enable bool = false + this.Enable = &enable + var statusCode int32 = 301 + this.StatusCode = &statusCode + return &this +} + +// GetEnable returns the Enable field value if set, zero value otherwise. +func (o *PageRuleRedirect) GetEnable() bool { + if o == nil || IsNil(o.Enable) { + var ret bool + return ret + } + return *o.Enable +} + +// GetEnableOk returns a tuple with the Enable field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PageRuleRedirect) GetEnableOk() (*bool, bool) { + if o == nil || IsNil(o.Enable) { + return nil, false + } + return o.Enable, true +} + +// HasEnable returns a boolean if a field has been set. +func (o *PageRuleRedirect) HasEnable() bool { + if o != nil && !IsNil(o.Enable) { + return true + } + + return false +} + +// SetEnable gets a reference to the given bool and assigns it to the Enable field. +func (o *PageRuleRedirect) SetEnable(v bool) { + o.Enable = &v +} + +// GetStatusCode returns the StatusCode field value if set, zero value otherwise. +func (o *PageRuleRedirect) GetStatusCode() int32 { + if o == nil || IsNil(o.StatusCode) { + var ret int32 + return ret + } + return *o.StatusCode +} + +// GetStatusCodeOk returns a tuple with the StatusCode field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PageRuleRedirect) GetStatusCodeOk() (*int32, bool) { + if o == nil || IsNil(o.StatusCode) { + return nil, false + } + return o.StatusCode, true +} + +// HasStatusCode returns a boolean if a field has been set. +func (o *PageRuleRedirect) HasStatusCode() bool { + if o != nil && !IsNil(o.StatusCode) { + return true + } + + return false +} + +// SetStatusCode gets a reference to the given int32 and assigns it to the StatusCode field. +func (o *PageRuleRedirect) SetStatusCode(v int32) { + o.StatusCode = &v +} + +// GetUrl returns the Url field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PageRuleRedirect) GetUrl() string { + if o == nil || IsNil(o.Url.Get()) { + var ret string + return ret + } + return *o.Url.Get() +} + +// GetUrlOk returns a tuple with the Url 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 *PageRuleRedirect) GetUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Url.Get(), o.Url.IsSet() +} + +// HasUrl returns a boolean if a field has been set. +func (o *PageRuleRedirect) HasUrl() bool { + if o != nil && o.Url.IsSet() { + return true + } + + return false +} + +// SetUrl gets a reference to the given NullableString and assigns it to the Url field. +func (o *PageRuleRedirect) SetUrl(v string) { + o.Url.Set(&v) +} +// SetUrlNil sets the value for Url to be an explicit nil +func (o *PageRuleRedirect) SetUrlNil() { + o.Url.Set(nil) +} + +// UnsetUrl ensures that no value is present for Url, not even an explicit nil +func (o *PageRuleRedirect) UnsetUrl() { + o.Url.Unset() +} + +func (o PageRuleRedirect) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PageRuleRedirect) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Enable) { + toSerialize["enable"] = o.Enable + } + if !IsNil(o.StatusCode) { + toSerialize["status_code"] = o.StatusCode + } + if o.Url.IsSet() { + toSerialize["url"] = o.Url.Get() + } + return toSerialize, nil +} + +type NullablePageRuleRedirect struct { + value *PageRuleRedirect + isSet bool +} + +func (v NullablePageRuleRedirect) Get() *PageRuleRedirect { + return v.value +} + +func (v *NullablePageRuleRedirect) Set(val *PageRuleRedirect) { + v.value = val + v.isSet = true +} + +func (v NullablePageRuleRedirect) IsSet() bool { + return v.isSet +} + +func (v *NullablePageRuleRedirect) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePageRuleRedirect(val *PageRuleRedirect) *NullablePageRuleRedirect { + return &NullablePageRuleRedirect{value: val, isSet: true} +} + +func (v NullablePageRuleRedirect) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePageRuleRedirect) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_page_rule_response.go b/model_page_rule_response.go new file mode 100644 index 0000000..f80f8e0 --- /dev/null +++ b/model_page_rule_response.go @@ -0,0 +1,172 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the PageRuleResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PageRuleResponse{} + +// PageRuleResponse struct for PageRuleResponse +type PageRuleResponse struct { + Data *PageRule `json:"data,omitempty"` + Message NullableString `json:"message,omitempty"` +} + +// NewPageRuleResponse instantiates a new PageRuleResponse object +// This constructor will assign default values to properties that have it defined, +// 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 NewPageRuleResponse() *PageRuleResponse { + this := PageRuleResponse{} + return &this +} + +// NewPageRuleResponseWithDefaults instantiates a new PageRuleResponse object +// This 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 NewPageRuleResponseWithDefaults() *PageRuleResponse { + this := PageRuleResponse{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *PageRuleResponse) GetData() PageRule { + if o == nil || IsNil(o.Data) { + var ret PageRule + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PageRuleResponse) GetDataOk() (*PageRule, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *PageRuleResponse) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given PageRule and assigns it to the Data field. +func (o *PageRuleResponse) SetData(v PageRule) { + o.Data = &v +} + +// GetMessage returns the Message field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PageRuleResponse) GetMessage() string { + if o == nil || IsNil(o.Message.Get()) { + var ret string + return ret + } + return *o.Message.Get() +} + +// GetMessageOk returns a tuple with the Message 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 *PageRuleResponse) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Message.Get(), o.Message.IsSet() +} + +// HasMessage returns a boolean if a field has been set. +func (o *PageRuleResponse) HasMessage() bool { + if o != nil && o.Message.IsSet() { + return true + } + + return false +} + +// SetMessage gets a reference to the given NullableString and assigns it to the Message field. +func (o *PageRuleResponse) SetMessage(v string) { + o.Message.Set(&v) +} +// SetMessageNil sets the value for Message to be an explicit nil +func (o *PageRuleResponse) SetMessageNil() { + o.Message.Set(nil) +} + +// UnsetMessage ensures that no value is present for Message, not even an explicit nil +func (o *PageRuleResponse) UnsetMessage() { + o.Message.Unset() +} + +func (o PageRuleResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PageRuleResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + if o.Message.IsSet() { + toSerialize["message"] = o.Message.Get() + } + return toSerialize, nil +} + +type NullablePageRuleResponse struct { + value *PageRuleResponse + isSet bool +} + +func (v NullablePageRuleResponse) Get() *PageRuleResponse { + return v.value +} + +func (v *NullablePageRuleResponse) Set(val *PageRuleResponse) { + v.value = val + v.isSet = true +} + +func (v NullablePageRuleResponse) IsSet() bool { + return v.isSet +} + +func (v *NullablePageRuleResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePageRuleResponse(val *PageRuleResponse) *NullablePageRuleResponse { + return &NullablePageRuleResponse{value: val, isSet: true} +} + +func (v NullablePageRuleResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePageRuleResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_page_rule_summary.go b/model_page_rule_summary.go new file mode 100644 index 0000000..70c6e43 --- /dev/null +++ b/model_page_rule_summary.go @@ -0,0 +1,626 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" + "time" +) + +// checks if the PageRuleSummary type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PageRuleSummary{} + +// PageRuleSummary struct for PageRuleSummary +type PageRuleSummary struct { + Id *string `json:"id,omitempty"` + DomainId *string `json:"domain_id,omitempty"` + // Order of the page-rule + Seq *int32 `json:"seq,omitempty"` + // This flag is deprecated in favor of is_protected flag + // Deprecated + UrlType *string `json:"url_type,omitempty"` + // Protected records cannot be modified or deleted by user. + IsProtected *bool `json:"is_protected,omitempty"` + // URL pattern of target pages + Url *string `json:"url,omitempty"` + CacheLevel *string `json:"cache_level,omitempty"` + WafStatus *bool `json:"waf_status,omitempty"` + // Shows whether firewall is enabled or not + // Deprecated + FwStatus *bool `json:"fw_status,omitempty"` + Acceleration *Acceleration `json:"acceleration,omitempty"` + // Secure link is enabled or not + SlinkStatus *bool `json:"slink_status,omitempty"` + // Is the page-rule enabled? + Status *bool `json:"status,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty"` + UpdatedAt *time.Time `json:"updated_at,omitempty"` +} + +// NewPageRuleSummary instantiates a new PageRuleSummary object +// This constructor will assign default values to properties that have it defined, +// 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 NewPageRuleSummary() *PageRuleSummary { + this := PageRuleSummary{} + var urlType string = "default" + this.UrlType = &urlType + var cacheLevel string = "query_string" + this.CacheLevel = &cacheLevel + var wafStatus bool = true + this.WafStatus = &wafStatus + var fwStatus bool = true + this.FwStatus = &fwStatus + var slinkStatus bool = false + this.SlinkStatus = &slinkStatus + var status bool = true + this.Status = &status + return &this +} + +// NewPageRuleSummaryWithDefaults instantiates a new PageRuleSummary object +// This 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 NewPageRuleSummaryWithDefaults() *PageRuleSummary { + this := PageRuleSummary{} + var urlType string = "default" + this.UrlType = &urlType + var cacheLevel string = "query_string" + this.CacheLevel = &cacheLevel + var wafStatus bool = true + this.WafStatus = &wafStatus + var fwStatus bool = true + this.FwStatus = &fwStatus + var slinkStatus bool = false + this.SlinkStatus = &slinkStatus + var status bool = true + this.Status = &status + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *PageRuleSummary) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PageRuleSummary) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *PageRuleSummary) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *PageRuleSummary) SetId(v string) { + o.Id = &v +} + +// GetDomainId returns the DomainId field value if set, zero value otherwise. +func (o *PageRuleSummary) GetDomainId() string { + if o == nil || IsNil(o.DomainId) { + var ret string + return ret + } + return *o.DomainId +} + +// GetDomainIdOk returns a tuple with the DomainId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PageRuleSummary) GetDomainIdOk() (*string, bool) { + if o == nil || IsNil(o.DomainId) { + return nil, false + } + return o.DomainId, true +} + +// HasDomainId returns a boolean if a field has been set. +func (o *PageRuleSummary) HasDomainId() bool { + if o != nil && !IsNil(o.DomainId) { + return true + } + + return false +} + +// SetDomainId gets a reference to the given string and assigns it to the DomainId field. +func (o *PageRuleSummary) SetDomainId(v string) { + o.DomainId = &v +} + +// GetSeq returns the Seq field value if set, zero value otherwise. +func (o *PageRuleSummary) GetSeq() int32 { + if o == nil || IsNil(o.Seq) { + var ret int32 + return ret + } + return *o.Seq +} + +// GetSeqOk returns a tuple with the Seq field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PageRuleSummary) GetSeqOk() (*int32, bool) { + if o == nil || IsNil(o.Seq) { + return nil, false + } + return o.Seq, true +} + +// HasSeq returns a boolean if a field has been set. +func (o *PageRuleSummary) HasSeq() bool { + if o != nil && !IsNil(o.Seq) { + return true + } + + return false +} + +// SetSeq gets a reference to the given int32 and assigns it to the Seq field. +func (o *PageRuleSummary) SetSeq(v int32) { + o.Seq = &v +} + +// GetUrlType returns the UrlType field value if set, zero value otherwise. +// Deprecated +func (o *PageRuleSummary) GetUrlType() string { + if o == nil || IsNil(o.UrlType) { + var ret string + return ret + } + return *o.UrlType +} + +// GetUrlTypeOk returns a tuple with the UrlType field value if set, nil otherwise +// and a boolean to check if the value has been set. +// Deprecated +func (o *PageRuleSummary) GetUrlTypeOk() (*string, bool) { + if o == nil || IsNil(o.UrlType) { + return nil, false + } + return o.UrlType, true +} + +// HasUrlType returns a boolean if a field has been set. +func (o *PageRuleSummary) HasUrlType() bool { + if o != nil && !IsNil(o.UrlType) { + return true + } + + return false +} + +// SetUrlType gets a reference to the given string and assigns it to the UrlType field. +// Deprecated +func (o *PageRuleSummary) SetUrlType(v string) { + o.UrlType = &v +} + +// GetIsProtected returns the IsProtected field value if set, zero value otherwise. +func (o *PageRuleSummary) GetIsProtected() bool { + if o == nil || IsNil(o.IsProtected) { + var ret bool + return ret + } + return *o.IsProtected +} + +// GetIsProtectedOk returns a tuple with the IsProtected field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PageRuleSummary) GetIsProtectedOk() (*bool, bool) { + if o == nil || IsNil(o.IsProtected) { + return nil, false + } + return o.IsProtected, true +} + +// HasIsProtected returns a boolean if a field has been set. +func (o *PageRuleSummary) HasIsProtected() bool { + if o != nil && !IsNil(o.IsProtected) { + return true + } + + return false +} + +// SetIsProtected gets a reference to the given bool and assigns it to the IsProtected field. +func (o *PageRuleSummary) SetIsProtected(v bool) { + o.IsProtected = &v +} + +// GetUrl returns the Url field value if set, zero value otherwise. +func (o *PageRuleSummary) GetUrl() string { + if o == nil || IsNil(o.Url) { + var ret string + return ret + } + return *o.Url +} + +// GetUrlOk returns a tuple with the Url field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PageRuleSummary) GetUrlOk() (*string, bool) { + if o == nil || IsNil(o.Url) { + return nil, false + } + return o.Url, true +} + +// HasUrl returns a boolean if a field has been set. +func (o *PageRuleSummary) HasUrl() bool { + if o != nil && !IsNil(o.Url) { + return true + } + + return false +} + +// SetUrl gets a reference to the given string and assigns it to the Url field. +func (o *PageRuleSummary) SetUrl(v string) { + o.Url = &v +} + +// GetCacheLevel returns the CacheLevel field value if set, zero value otherwise. +func (o *PageRuleSummary) GetCacheLevel() string { + if o == nil || IsNil(o.CacheLevel) { + var ret string + return ret + } + return *o.CacheLevel +} + +// GetCacheLevelOk returns a tuple with the CacheLevel field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PageRuleSummary) GetCacheLevelOk() (*string, bool) { + if o == nil || IsNil(o.CacheLevel) { + return nil, false + } + return o.CacheLevel, true +} + +// HasCacheLevel returns a boolean if a field has been set. +func (o *PageRuleSummary) HasCacheLevel() bool { + if o != nil && !IsNil(o.CacheLevel) { + return true + } + + return false +} + +// SetCacheLevel gets a reference to the given string and assigns it to the CacheLevel field. +func (o *PageRuleSummary) SetCacheLevel(v string) { + o.CacheLevel = &v +} + +// GetWafStatus returns the WafStatus field value if set, zero value otherwise. +func (o *PageRuleSummary) GetWafStatus() bool { + if o == nil || IsNil(o.WafStatus) { + var ret bool + return ret + } + return *o.WafStatus +} + +// GetWafStatusOk returns a tuple with the WafStatus field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PageRuleSummary) GetWafStatusOk() (*bool, bool) { + if o == nil || IsNil(o.WafStatus) { + return nil, false + } + return o.WafStatus, true +} + +// HasWafStatus returns a boolean if a field has been set. +func (o *PageRuleSummary) HasWafStatus() bool { + if o != nil && !IsNil(o.WafStatus) { + return true + } + + return false +} + +// SetWafStatus gets a reference to the given bool and assigns it to the WafStatus field. +func (o *PageRuleSummary) SetWafStatus(v bool) { + o.WafStatus = &v +} + +// GetFwStatus returns the FwStatus field value if set, zero value otherwise. +// Deprecated +func (o *PageRuleSummary) GetFwStatus() bool { + if o == nil || IsNil(o.FwStatus) { + var ret bool + return ret + } + return *o.FwStatus +} + +// GetFwStatusOk returns a tuple with the FwStatus field value if set, nil otherwise +// and a boolean to check if the value has been set. +// Deprecated +func (o *PageRuleSummary) GetFwStatusOk() (*bool, bool) { + if o == nil || IsNil(o.FwStatus) { + return nil, false + } + return o.FwStatus, true +} + +// HasFwStatus returns a boolean if a field has been set. +func (o *PageRuleSummary) HasFwStatus() bool { + if o != nil && !IsNil(o.FwStatus) { + return true + } + + return false +} + +// SetFwStatus gets a reference to the given bool and assigns it to the FwStatus field. +// Deprecated +func (o *PageRuleSummary) SetFwStatus(v bool) { + o.FwStatus = &v +} + +// GetAcceleration returns the Acceleration field value if set, zero value otherwise. +func (o *PageRuleSummary) GetAcceleration() Acceleration { + if o == nil || IsNil(o.Acceleration) { + var ret Acceleration + return ret + } + return *o.Acceleration +} + +// GetAccelerationOk returns a tuple with the Acceleration field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PageRuleSummary) GetAccelerationOk() (*Acceleration, bool) { + if o == nil || IsNil(o.Acceleration) { + return nil, false + } + return o.Acceleration, true +} + +// HasAcceleration returns a boolean if a field has been set. +func (o *PageRuleSummary) HasAcceleration() bool { + if o != nil && !IsNil(o.Acceleration) { + return true + } + + return false +} + +// SetAcceleration gets a reference to the given Acceleration and assigns it to the Acceleration field. +func (o *PageRuleSummary) SetAcceleration(v Acceleration) { + o.Acceleration = &v +} + +// GetSlinkStatus returns the SlinkStatus field value if set, zero value otherwise. +func (o *PageRuleSummary) GetSlinkStatus() bool { + if o == nil || IsNil(o.SlinkStatus) { + var ret bool + return ret + } + return *o.SlinkStatus +} + +// GetSlinkStatusOk returns a tuple with the SlinkStatus field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PageRuleSummary) GetSlinkStatusOk() (*bool, bool) { + if o == nil || IsNil(o.SlinkStatus) { + return nil, false + } + return o.SlinkStatus, true +} + +// HasSlinkStatus returns a boolean if a field has been set. +func (o *PageRuleSummary) HasSlinkStatus() bool { + if o != nil && !IsNil(o.SlinkStatus) { + return true + } + + return false +} + +// SetSlinkStatus gets a reference to the given bool and assigns it to the SlinkStatus field. +func (o *PageRuleSummary) SetSlinkStatus(v bool) { + o.SlinkStatus = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *PageRuleSummary) GetStatus() bool { + if o == nil || IsNil(o.Status) { + var ret bool + 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 *PageRuleSummary) GetStatusOk() (*bool, 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 *PageRuleSummary) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given bool and assigns it to the Status field. +func (o *PageRuleSummary) SetStatus(v bool) { + o.Status = &v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *PageRuleSummary) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PageRuleSummary) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *PageRuleSummary) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *PageRuleSummary) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *PageRuleSummary) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PageRuleSummary) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *PageRuleSummary) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *PageRuleSummary) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +func (o PageRuleSummary) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PageRuleSummary) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: id is readOnly + if !IsNil(o.DomainId) { + toSerialize["domain_id"] = o.DomainId + } + if !IsNil(o.Seq) { + toSerialize["seq"] = o.Seq + } + if !IsNil(o.UrlType) { + toSerialize["url_type"] = o.UrlType + } + // skip: is_protected is readOnly + if !IsNil(o.Url) { + toSerialize["url"] = o.Url + } + if !IsNil(o.CacheLevel) { + toSerialize["cache_level"] = o.CacheLevel + } + if !IsNil(o.WafStatus) { + toSerialize["waf_status"] = o.WafStatus + } + if !IsNil(o.FwStatus) { + toSerialize["fw_status"] = o.FwStatus + } + if !IsNil(o.Acceleration) { + toSerialize["acceleration"] = o.Acceleration + } + if !IsNil(o.SlinkStatus) { + toSerialize["slink_status"] = o.SlinkStatus + } + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + // skip: created_at is readOnly + // skip: updated_at is readOnly + return toSerialize, nil +} + +type NullablePageRuleSummary struct { + value *PageRuleSummary + isSet bool +} + +func (v NullablePageRuleSummary) Get() *PageRuleSummary { + return v.value +} + +func (v *NullablePageRuleSummary) Set(val *PageRuleSummary) { + v.value = val + v.isSet = true +} + +func (v NullablePageRuleSummary) IsSet() bool { + return v.isSet +} + +func (v *NullablePageRuleSummary) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePageRuleSummary(val *PageRuleSummary) *NullablePageRuleSummary { + return &NullablePageRuleSummary{value: val, isSet: true} +} + +func (v NullablePageRuleSummary) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePageRuleSummary) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_page_rules_diff_update_200_response.go b/model_page_rules_diff_update_200_response.go new file mode 100644 index 0000000..6729e54 --- /dev/null +++ b/model_page_rules_diff_update_200_response.go @@ -0,0 +1,172 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the PageRulesDiffUpdate200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PageRulesDiffUpdate200Response{} + +// PageRulesDiffUpdate200Response struct for PageRulesDiffUpdate200Response +type PageRulesDiffUpdate200Response struct { + Data *PageRuleDiff `json:"data,omitempty"` + Message NullableString `json:"message,omitempty"` +} + +// NewPageRulesDiffUpdate200Response instantiates a new PageRulesDiffUpdate200Response object +// This constructor will assign default values to properties that have it defined, +// 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 NewPageRulesDiffUpdate200Response() *PageRulesDiffUpdate200Response { + this := PageRulesDiffUpdate200Response{} + return &this +} + +// NewPageRulesDiffUpdate200ResponseWithDefaults instantiates a new PageRulesDiffUpdate200Response object +// This 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 NewPageRulesDiffUpdate200ResponseWithDefaults() *PageRulesDiffUpdate200Response { + this := PageRulesDiffUpdate200Response{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *PageRulesDiffUpdate200Response) GetData() PageRuleDiff { + if o == nil || IsNil(o.Data) { + var ret PageRuleDiff + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PageRulesDiffUpdate200Response) GetDataOk() (*PageRuleDiff, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *PageRulesDiffUpdate200Response) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given PageRuleDiff and assigns it to the Data field. +func (o *PageRulesDiffUpdate200Response) SetData(v PageRuleDiff) { + o.Data = &v +} + +// GetMessage returns the Message field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PageRulesDiffUpdate200Response) GetMessage() string { + if o == nil || IsNil(o.Message.Get()) { + var ret string + return ret + } + return *o.Message.Get() +} + +// GetMessageOk returns a tuple with the Message 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 *PageRulesDiffUpdate200Response) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Message.Get(), o.Message.IsSet() +} + +// HasMessage returns a boolean if a field has been set. +func (o *PageRulesDiffUpdate200Response) HasMessage() bool { + if o != nil && o.Message.IsSet() { + return true + } + + return false +} + +// SetMessage gets a reference to the given NullableString and assigns it to the Message field. +func (o *PageRulesDiffUpdate200Response) SetMessage(v string) { + o.Message.Set(&v) +} +// SetMessageNil sets the value for Message to be an explicit nil +func (o *PageRulesDiffUpdate200Response) SetMessageNil() { + o.Message.Set(nil) +} + +// UnsetMessage ensures that no value is present for Message, not even an explicit nil +func (o *PageRulesDiffUpdate200Response) UnsetMessage() { + o.Message.Unset() +} + +func (o PageRulesDiffUpdate200Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PageRulesDiffUpdate200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + if o.Message.IsSet() { + toSerialize["message"] = o.Message.Get() + } + return toSerialize, nil +} + +type NullablePageRulesDiffUpdate200Response struct { + value *PageRulesDiffUpdate200Response + isSet bool +} + +func (v NullablePageRulesDiffUpdate200Response) Get() *PageRulesDiffUpdate200Response { + return v.value +} + +func (v *NullablePageRulesDiffUpdate200Response) Set(val *PageRulesDiffUpdate200Response) { + v.value = val + v.isSet = true +} + +func (v NullablePageRulesDiffUpdate200Response) IsSet() bool { + return v.isSet +} + +func (v *NullablePageRulesDiffUpdate200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePageRulesDiffUpdate200Response(val *PageRulesDiffUpdate200Response) *NullablePageRulesDiffUpdate200Response { + return &NullablePageRulesDiffUpdate200Response{value: val, isSet: true} +} + +func (v NullablePageRulesDiffUpdate200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePageRulesDiffUpdate200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_page_rules_index_200_response.go b/model_page_rules_index_200_response.go new file mode 100644 index 0000000..099cdac --- /dev/null +++ b/model_page_rules_index_200_response.go @@ -0,0 +1,198 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the PageRulesIndex200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PageRulesIndex200Response{} + +// PageRulesIndex200Response struct for PageRulesIndex200Response +type PageRulesIndex200Response struct { + Data []PageRuleSummary `json:"data,omitempty"` + Links *PaginatedResponseLinks `json:"links,omitempty"` + Meta *PaginatedResponseMeta `json:"meta,omitempty"` +} + +// NewPageRulesIndex200Response instantiates a new PageRulesIndex200Response object +// This constructor will assign default values to properties that have it defined, +// 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 NewPageRulesIndex200Response() *PageRulesIndex200Response { + this := PageRulesIndex200Response{} + return &this +} + +// NewPageRulesIndex200ResponseWithDefaults instantiates a new PageRulesIndex200Response object +// This 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 NewPageRulesIndex200ResponseWithDefaults() *PageRulesIndex200Response { + this := PageRulesIndex200Response{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *PageRulesIndex200Response) GetData() []PageRuleSummary { + if o == nil || IsNil(o.Data) { + var ret []PageRuleSummary + return ret + } + return o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PageRulesIndex200Response) GetDataOk() ([]PageRuleSummary, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *PageRulesIndex200Response) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given []PageRuleSummary and assigns it to the Data field. +func (o *PageRulesIndex200Response) SetData(v []PageRuleSummary) { + o.Data = v +} + +// GetLinks returns the Links field value if set, zero value otherwise. +func (o *PageRulesIndex200Response) GetLinks() PaginatedResponseLinks { + if o == nil || IsNil(o.Links) { + var ret PaginatedResponseLinks + return ret + } + return *o.Links +} + +// GetLinksOk returns a tuple with the Links field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PageRulesIndex200Response) GetLinksOk() (*PaginatedResponseLinks, bool) { + if o == nil || IsNil(o.Links) { + return nil, false + } + return o.Links, true +} + +// HasLinks returns a boolean if a field has been set. +func (o *PageRulesIndex200Response) HasLinks() bool { + if o != nil && !IsNil(o.Links) { + return true + } + + return false +} + +// SetLinks gets a reference to the given PaginatedResponseLinks and assigns it to the Links field. +func (o *PageRulesIndex200Response) SetLinks(v PaginatedResponseLinks) { + o.Links = &v +} + +// GetMeta returns the Meta field value if set, zero value otherwise. +func (o *PageRulesIndex200Response) GetMeta() PaginatedResponseMeta { + if o == nil || IsNil(o.Meta) { + var ret PaginatedResponseMeta + return ret + } + return *o.Meta +} + +// GetMetaOk returns a tuple with the Meta field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PageRulesIndex200Response) GetMetaOk() (*PaginatedResponseMeta, bool) { + if o == nil || IsNil(o.Meta) { + return nil, false + } + return o.Meta, true +} + +// HasMeta returns a boolean if a field has been set. +func (o *PageRulesIndex200Response) HasMeta() bool { + if o != nil && !IsNil(o.Meta) { + return true + } + + return false +} + +// SetMeta gets a reference to the given PaginatedResponseMeta and assigns it to the Meta field. +func (o *PageRulesIndex200Response) SetMeta(v PaginatedResponseMeta) { + o.Meta = &v +} + +func (o PageRulesIndex200Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PageRulesIndex200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + if !IsNil(o.Links) { + toSerialize["links"] = o.Links + } + if !IsNil(o.Meta) { + toSerialize["meta"] = o.Meta + } + return toSerialize, nil +} + +type NullablePageRulesIndex200Response struct { + value *PageRulesIndex200Response + isSet bool +} + +func (v NullablePageRulesIndex200Response) Get() *PageRulesIndex200Response { + return v.value +} + +func (v *NullablePageRulesIndex200Response) Set(val *PageRulesIndex200Response) { + v.value = val + v.isSet = true +} + +func (v NullablePageRulesIndex200Response) IsSet() bool { + return v.isSet +} + +func (v *NullablePageRulesIndex200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePageRulesIndex200Response(val *PageRulesIndex200Response) *NullablePageRulesIndex200Response { + return &NullablePageRulesIndex200Response{value: val, isSet: true} +} + +func (v NullablePageRulesIndex200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePageRulesIndex200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_paginated_response.go b/model_paginated_response.go new file mode 100644 index 0000000..307c137 --- /dev/null +++ b/model_paginated_response.go @@ -0,0 +1,198 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the PaginatedResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedResponse{} + +// PaginatedResponse struct for PaginatedResponse +type PaginatedResponse struct { + Data []map[string]interface{} `json:"data,omitempty"` + Links *PaginatedResponseLinks `json:"links,omitempty"` + Meta *PaginatedResponseMeta `json:"meta,omitempty"` +} + +// NewPaginatedResponse instantiates a new PaginatedResponse object +// This constructor will assign default values to properties that have it defined, +// 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 NewPaginatedResponse() *PaginatedResponse { + this := PaginatedResponse{} + return &this +} + +// NewPaginatedResponseWithDefaults instantiates a new PaginatedResponse object +// This 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 NewPaginatedResponseWithDefaults() *PaginatedResponse { + this := PaginatedResponse{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *PaginatedResponse) GetData() []map[string]interface{} { + if o == nil || IsNil(o.Data) { + var ret []map[string]interface{} + return ret + } + return o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedResponse) GetDataOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *PaginatedResponse) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given []map[string]interface{} and assigns it to the Data field. +func (o *PaginatedResponse) SetData(v []map[string]interface{}) { + o.Data = v +} + +// GetLinks returns the Links field value if set, zero value otherwise. +func (o *PaginatedResponse) GetLinks() PaginatedResponseLinks { + if o == nil || IsNil(o.Links) { + var ret PaginatedResponseLinks + return ret + } + return *o.Links +} + +// GetLinksOk returns a tuple with the Links field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedResponse) GetLinksOk() (*PaginatedResponseLinks, bool) { + if o == nil || IsNil(o.Links) { + return nil, false + } + return o.Links, true +} + +// HasLinks returns a boolean if a field has been set. +func (o *PaginatedResponse) HasLinks() bool { + if o != nil && !IsNil(o.Links) { + return true + } + + return false +} + +// SetLinks gets a reference to the given PaginatedResponseLinks and assigns it to the Links field. +func (o *PaginatedResponse) SetLinks(v PaginatedResponseLinks) { + o.Links = &v +} + +// GetMeta returns the Meta field value if set, zero value otherwise. +func (o *PaginatedResponse) GetMeta() PaginatedResponseMeta { + if o == nil || IsNil(o.Meta) { + var ret PaginatedResponseMeta + return ret + } + return *o.Meta +} + +// GetMetaOk returns a tuple with the Meta field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedResponse) GetMetaOk() (*PaginatedResponseMeta, bool) { + if o == nil || IsNil(o.Meta) { + return nil, false + } + return o.Meta, true +} + +// HasMeta returns a boolean if a field has been set. +func (o *PaginatedResponse) HasMeta() bool { + if o != nil && !IsNil(o.Meta) { + return true + } + + return false +} + +// SetMeta gets a reference to the given PaginatedResponseMeta and assigns it to the Meta field. +func (o *PaginatedResponse) SetMeta(v PaginatedResponseMeta) { + o.Meta = &v +} + +func (o PaginatedResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + if !IsNil(o.Links) { + toSerialize["links"] = o.Links + } + if !IsNil(o.Meta) { + toSerialize["meta"] = o.Meta + } + return toSerialize, nil +} + +type NullablePaginatedResponse struct { + value *PaginatedResponse + isSet bool +} + +func (v NullablePaginatedResponse) Get() *PaginatedResponse { + return v.value +} + +func (v *NullablePaginatedResponse) Set(val *PaginatedResponse) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedResponse) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedResponse(val *PaginatedResponse) *NullablePaginatedResponse { + return &NullablePaginatedResponse{value: val, isSet: true} +} + +func (v NullablePaginatedResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_paginated_response_links.go b/model_paginated_response_links.go new file mode 100644 index 0000000..3cb8297 --- /dev/null +++ b/model_paginated_response_links.go @@ -0,0 +1,221 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the PaginatedResponseLinks type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedResponseLinks{} + +// PaginatedResponseLinks struct for PaginatedResponseLinks +type PaginatedResponseLinks struct { + First string `json:"first"` + Last NullableString `json:"last,omitempty"` + Prev NullableString `json:"prev"` + Next NullableString `json:"next"` +} + +// NewPaginatedResponseLinks instantiates a new PaginatedResponseLinks object +// This constructor will assign default values to properties that have it defined, +// 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 NewPaginatedResponseLinks(first string, prev NullableString, next NullableString) *PaginatedResponseLinks { + this := PaginatedResponseLinks{} + this.First = first + this.Prev = prev + this.Next = next + return &this +} + +// NewPaginatedResponseLinksWithDefaults instantiates a new PaginatedResponseLinks object +// This 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 NewPaginatedResponseLinksWithDefaults() *PaginatedResponseLinks { + this := PaginatedResponseLinks{} + return &this +} + +// GetFirst returns the First field value +func (o *PaginatedResponseLinks) GetFirst() string { + if o == nil { + var ret string + return ret + } + + return o.First +} + +// GetFirstOk returns a tuple with the First field value +// and a boolean to check if the value has been set. +func (o *PaginatedResponseLinks) GetFirstOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.First, true +} + +// SetFirst sets field value +func (o *PaginatedResponseLinks) SetFirst(v string) { + o.First = v +} + +// GetLast returns the Last field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedResponseLinks) GetLast() string { + if o == nil || IsNil(o.Last.Get()) { + var ret string + return ret + } + return *o.Last.Get() +} + +// GetLastOk returns a tuple with the Last 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 *PaginatedResponseLinks) GetLastOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Last.Get(), o.Last.IsSet() +} + +// HasLast returns a boolean if a field has been set. +func (o *PaginatedResponseLinks) HasLast() bool { + if o != nil && o.Last.IsSet() { + return true + } + + return false +} + +// SetLast gets a reference to the given NullableString and assigns it to the Last field. +func (o *PaginatedResponseLinks) SetLast(v string) { + o.Last.Set(&v) +} +// SetLastNil sets the value for Last to be an explicit nil +func (o *PaginatedResponseLinks) SetLastNil() { + o.Last.Set(nil) +} + +// UnsetLast ensures that no value is present for Last, not even an explicit nil +func (o *PaginatedResponseLinks) UnsetLast() { + o.Last.Unset() +} + +// GetPrev returns the Prev field value +// If the value is explicit nil, the zero value for string will be returned +func (o *PaginatedResponseLinks) GetPrev() string { + if o == nil || o.Prev.Get() == nil { + var ret string + return ret + } + + return *o.Prev.Get() +} + +// GetPrevOk returns a tuple with the Prev 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 *PaginatedResponseLinks) GetPrevOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Prev.Get(), o.Prev.IsSet() +} + +// SetPrev sets field value +func (o *PaginatedResponseLinks) SetPrev(v string) { + o.Prev.Set(&v) +} + +// GetNext returns the Next field value +// If the value is explicit nil, the zero value for string will be returned +func (o *PaginatedResponseLinks) GetNext() string { + if o == nil || o.Next.Get() == nil { + var ret string + return ret + } + + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next 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 *PaginatedResponseLinks) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// SetNext sets field value +func (o *PaginatedResponseLinks) SetNext(v string) { + o.Next.Set(&v) +} + +func (o PaginatedResponseLinks) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedResponseLinks) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["first"] = o.First + if o.Last.IsSet() { + toSerialize["last"] = o.Last.Get() + } + toSerialize["prev"] = o.Prev.Get() + toSerialize["next"] = o.Next.Get() + return toSerialize, nil +} + +type NullablePaginatedResponseLinks struct { + value *PaginatedResponseLinks + isSet bool +} + +func (v NullablePaginatedResponseLinks) Get() *PaginatedResponseLinks { + return v.value +} + +func (v *NullablePaginatedResponseLinks) Set(val *PaginatedResponseLinks) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedResponseLinks) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedResponseLinks) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedResponseLinks(val *PaginatedResponseLinks) *NullablePaginatedResponseLinks { + return &NullablePaginatedResponseLinks{value: val, isSet: true} +} + +func (v NullablePaginatedResponseLinks) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedResponseLinks) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_paginated_response_meta.go b/model_paginated_response_meta.go new file mode 100644 index 0000000..ebddf32 --- /dev/null +++ b/model_paginated_response_meta.go @@ -0,0 +1,342 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the PaginatedResponseMeta type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedResponseMeta{} + +// PaginatedResponseMeta struct for PaginatedResponseMeta +type PaginatedResponseMeta struct { + CurrentPage *int32 `json:"current_page,omitempty"` + From *int32 `json:"from,omitempty"` + LastPage *int32 `json:"last_page,omitempty"` + Path *string `json:"path,omitempty"` + PerPage *int32 `json:"per_page,omitempty"` + To *int32 `json:"to,omitempty"` + Total *int32 `json:"total,omitempty"` +} + +// NewPaginatedResponseMeta instantiates a new PaginatedResponseMeta object +// This constructor will assign default values to properties that have it defined, +// 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 NewPaginatedResponseMeta() *PaginatedResponseMeta { + this := PaginatedResponseMeta{} + return &this +} + +// NewPaginatedResponseMetaWithDefaults instantiates a new PaginatedResponseMeta object +// This 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 NewPaginatedResponseMetaWithDefaults() *PaginatedResponseMeta { + this := PaginatedResponseMeta{} + return &this +} + +// GetCurrentPage returns the CurrentPage field value if set, zero value otherwise. +func (o *PaginatedResponseMeta) GetCurrentPage() int32 { + if o == nil || IsNil(o.CurrentPage) { + var ret int32 + return ret + } + return *o.CurrentPage +} + +// GetCurrentPageOk returns a tuple with the CurrentPage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedResponseMeta) GetCurrentPageOk() (*int32, bool) { + if o == nil || IsNil(o.CurrentPage) { + return nil, false + } + return o.CurrentPage, true +} + +// HasCurrentPage returns a boolean if a field has been set. +func (o *PaginatedResponseMeta) HasCurrentPage() bool { + if o != nil && !IsNil(o.CurrentPage) { + return true + } + + return false +} + +// SetCurrentPage gets a reference to the given int32 and assigns it to the CurrentPage field. +func (o *PaginatedResponseMeta) SetCurrentPage(v int32) { + o.CurrentPage = &v +} + +// GetFrom returns the From field value if set, zero value otherwise. +func (o *PaginatedResponseMeta) GetFrom() int32 { + if o == nil || IsNil(o.From) { + var ret int32 + return ret + } + return *o.From +} + +// GetFromOk returns a tuple with the From field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedResponseMeta) GetFromOk() (*int32, bool) { + if o == nil || IsNil(o.From) { + return nil, false + } + return o.From, true +} + +// HasFrom returns a boolean if a field has been set. +func (o *PaginatedResponseMeta) HasFrom() bool { + if o != nil && !IsNil(o.From) { + return true + } + + return false +} + +// SetFrom gets a reference to the given int32 and assigns it to the From field. +func (o *PaginatedResponseMeta) SetFrom(v int32) { + o.From = &v +} + +// GetLastPage returns the LastPage field value if set, zero value otherwise. +func (o *PaginatedResponseMeta) GetLastPage() int32 { + if o == nil || IsNil(o.LastPage) { + var ret int32 + return ret + } + return *o.LastPage +} + +// GetLastPageOk returns a tuple with the LastPage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedResponseMeta) GetLastPageOk() (*int32, bool) { + if o == nil || IsNil(o.LastPage) { + return nil, false + } + return o.LastPage, true +} + +// HasLastPage returns a boolean if a field has been set. +func (o *PaginatedResponseMeta) HasLastPage() bool { + if o != nil && !IsNil(o.LastPage) { + return true + } + + return false +} + +// SetLastPage gets a reference to the given int32 and assigns it to the LastPage field. +func (o *PaginatedResponseMeta) SetLastPage(v int32) { + o.LastPage = &v +} + +// GetPath returns the Path field value if set, zero value otherwise. +func (o *PaginatedResponseMeta) GetPath() string { + if o == nil || IsNil(o.Path) { + var ret string + return ret + } + return *o.Path +} + +// GetPathOk returns a tuple with the Path field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedResponseMeta) GetPathOk() (*string, bool) { + if o == nil || IsNil(o.Path) { + return nil, false + } + return o.Path, true +} + +// HasPath returns a boolean if a field has been set. +func (o *PaginatedResponseMeta) HasPath() bool { + if o != nil && !IsNil(o.Path) { + return true + } + + return false +} + +// SetPath gets a reference to the given string and assigns it to the Path field. +func (o *PaginatedResponseMeta) SetPath(v string) { + o.Path = &v +} + +// GetPerPage returns the PerPage field value if set, zero value otherwise. +func (o *PaginatedResponseMeta) GetPerPage() int32 { + if o == nil || IsNil(o.PerPage) { + var ret int32 + return ret + } + return *o.PerPage +} + +// GetPerPageOk returns a tuple with the PerPage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedResponseMeta) GetPerPageOk() (*int32, bool) { + if o == nil || IsNil(o.PerPage) { + return nil, false + } + return o.PerPage, true +} + +// HasPerPage returns a boolean if a field has been set. +func (o *PaginatedResponseMeta) HasPerPage() bool { + if o != nil && !IsNil(o.PerPage) { + return true + } + + return false +} + +// SetPerPage gets a reference to the given int32 and assigns it to the PerPage field. +func (o *PaginatedResponseMeta) SetPerPage(v int32) { + o.PerPage = &v +} + +// GetTo returns the To field value if set, zero value otherwise. +func (o *PaginatedResponseMeta) GetTo() int32 { + if o == nil || IsNil(o.To) { + var ret int32 + return ret + } + return *o.To +} + +// GetToOk returns a tuple with the To field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedResponseMeta) GetToOk() (*int32, bool) { + if o == nil || IsNil(o.To) { + return nil, false + } + return o.To, true +} + +// HasTo returns a boolean if a field has been set. +func (o *PaginatedResponseMeta) HasTo() bool { + if o != nil && !IsNil(o.To) { + return true + } + + return false +} + +// SetTo gets a reference to the given int32 and assigns it to the To field. +func (o *PaginatedResponseMeta) SetTo(v int32) { + o.To = &v +} + +// GetTotal returns the Total field value if set, zero value otherwise. +func (o *PaginatedResponseMeta) GetTotal() int32 { + if o == nil || IsNil(o.Total) { + var ret int32 + return ret + } + return *o.Total +} + +// GetTotalOk returns a tuple with the Total field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedResponseMeta) GetTotalOk() (*int32, bool) { + if o == nil || IsNil(o.Total) { + return nil, false + } + return o.Total, true +} + +// HasTotal returns a boolean if a field has been set. +func (o *PaginatedResponseMeta) HasTotal() bool { + if o != nil && !IsNil(o.Total) { + return true + } + + return false +} + +// SetTotal gets a reference to the given int32 and assigns it to the Total field. +func (o *PaginatedResponseMeta) SetTotal(v int32) { + o.Total = &v +} + +func (o PaginatedResponseMeta) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedResponseMeta) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.CurrentPage) { + toSerialize["current_page"] = o.CurrentPage + } + if !IsNil(o.From) { + toSerialize["from"] = o.From + } + if !IsNil(o.LastPage) { + toSerialize["last_page"] = o.LastPage + } + if !IsNil(o.Path) { + toSerialize["path"] = o.Path + } + if !IsNil(o.PerPage) { + toSerialize["per_page"] = o.PerPage + } + if !IsNil(o.To) { + toSerialize["to"] = o.To + } + if !IsNil(o.Total) { + toSerialize["total"] = o.Total + } + return toSerialize, nil +} + +type NullablePaginatedResponseMeta struct { + value *PaginatedResponseMeta + isSet bool +} + +func (v NullablePaginatedResponseMeta) Get() *PaginatedResponseMeta { + return v.value +} + +func (v *NullablePaginatedResponseMeta) Set(val *PaginatedResponseMeta) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedResponseMeta) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedResponseMeta) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedResponseMeta(val *PaginatedResponseMeta) *NullablePaginatedResponseMeta { + return &NullablePaginatedResponseMeta{value: val, isSet: true} +} + +func (v NullablePaginatedResponseMeta) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedResponseMeta) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_plan_info.go b/model_plan_info.go new file mode 100644 index 0000000..35642d6 --- /dev/null +++ b/model_plan_info.go @@ -0,0 +1,236 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the PlanInfo type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PlanInfo{} + +// PlanInfo struct for PlanInfo +type PlanInfo struct { + Name *string `json:"name,omitempty"` + MonthlyCost *float32 `json:"monthly_cost,omitempty"` + // between 0 to 100 is the percentage of the discount + Discount *float32 `json:"discount,omitempty"` + // How much balance the account needs for selected plan + NeededBalance *float32 `json:"needed_balance,omitempty"` +} + +// NewPlanInfo instantiates a new PlanInfo object +// This constructor will assign default values to properties that have it defined, +// 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 NewPlanInfo() *PlanInfo { + this := PlanInfo{} + return &this +} + +// NewPlanInfoWithDefaults instantiates a new PlanInfo object +// This 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 NewPlanInfoWithDefaults() *PlanInfo { + this := PlanInfo{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PlanInfo) 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 *PlanInfo) 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 *PlanInfo) 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 *PlanInfo) SetName(v string) { + o.Name = &v +} + +// GetMonthlyCost returns the MonthlyCost field value if set, zero value otherwise. +func (o *PlanInfo) GetMonthlyCost() float32 { + if o == nil || IsNil(o.MonthlyCost) { + var ret float32 + return ret + } + return *o.MonthlyCost +} + +// GetMonthlyCostOk returns a tuple with the MonthlyCost field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PlanInfo) GetMonthlyCostOk() (*float32, bool) { + if o == nil || IsNil(o.MonthlyCost) { + return nil, false + } + return o.MonthlyCost, true +} + +// HasMonthlyCost returns a boolean if a field has been set. +func (o *PlanInfo) HasMonthlyCost() bool { + if o != nil && !IsNil(o.MonthlyCost) { + return true + } + + return false +} + +// SetMonthlyCost gets a reference to the given float32 and assigns it to the MonthlyCost field. +func (o *PlanInfo) SetMonthlyCost(v float32) { + o.MonthlyCost = &v +} + +// GetDiscount returns the Discount field value if set, zero value otherwise. +func (o *PlanInfo) GetDiscount() float32 { + if o == nil || IsNil(o.Discount) { + var ret float32 + return ret + } + return *o.Discount +} + +// GetDiscountOk returns a tuple with the Discount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PlanInfo) GetDiscountOk() (*float32, bool) { + if o == nil || IsNil(o.Discount) { + return nil, false + } + return o.Discount, true +} + +// HasDiscount returns a boolean if a field has been set. +func (o *PlanInfo) HasDiscount() bool { + if o != nil && !IsNil(o.Discount) { + return true + } + + return false +} + +// SetDiscount gets a reference to the given float32 and assigns it to the Discount field. +func (o *PlanInfo) SetDiscount(v float32) { + o.Discount = &v +} + +// GetNeededBalance returns the NeededBalance field value if set, zero value otherwise. +func (o *PlanInfo) GetNeededBalance() float32 { + if o == nil || IsNil(o.NeededBalance) { + var ret float32 + return ret + } + return *o.NeededBalance +} + +// GetNeededBalanceOk returns a tuple with the NeededBalance field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PlanInfo) GetNeededBalanceOk() (*float32, bool) { + if o == nil || IsNil(o.NeededBalance) { + return nil, false + } + return o.NeededBalance, true +} + +// HasNeededBalance returns a boolean if a field has been set. +func (o *PlanInfo) HasNeededBalance() bool { + if o != nil && !IsNil(o.NeededBalance) { + return true + } + + return false +} + +// SetNeededBalance gets a reference to the given float32 and assigns it to the NeededBalance field. +func (o *PlanInfo) SetNeededBalance(v float32) { + o.NeededBalance = &v +} + +func (o PlanInfo) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PlanInfo) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.MonthlyCost) { + toSerialize["monthly_cost"] = o.MonthlyCost + } + if !IsNil(o.Discount) { + toSerialize["discount"] = o.Discount + } + if !IsNil(o.NeededBalance) { + toSerialize["needed_balance"] = o.NeededBalance + } + return toSerialize, nil +} + +type NullablePlanInfo struct { + value *PlanInfo + isSet bool +} + +func (v NullablePlanInfo) Get() *PlanInfo { + return v.value +} + +func (v *NullablePlanInfo) Set(val *PlanInfo) { + v.value = val + v.isSet = true +} + +func (v NullablePlanInfo) IsSet() bool { + return v.isSet +} + +func (v *NullablePlanInfo) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePlanInfo(val *PlanInfo) *NullablePlanInfo { + return &NullablePlanInfo{value: val, isSet: true} +} + +func (v NullablePlanInfo) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePlanInfo) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_plan_response.go b/model_plan_response.go new file mode 100644 index 0000000..16e8aa0 --- /dev/null +++ b/model_plan_response.go @@ -0,0 +1,172 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the PlanResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PlanResponse{} + +// PlanResponse struct for PlanResponse +type PlanResponse struct { + Data *FeatureSets `json:"data,omitempty"` + Message NullableString `json:"message,omitempty"` +} + +// NewPlanResponse instantiates a new PlanResponse object +// This constructor will assign default values to properties that have it defined, +// 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 NewPlanResponse() *PlanResponse { + this := PlanResponse{} + return &this +} + +// NewPlanResponseWithDefaults instantiates a new PlanResponse object +// This 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 NewPlanResponseWithDefaults() *PlanResponse { + this := PlanResponse{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *PlanResponse) GetData() FeatureSets { + if o == nil || IsNil(o.Data) { + var ret FeatureSets + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PlanResponse) GetDataOk() (*FeatureSets, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *PlanResponse) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given FeatureSets and assigns it to the Data field. +func (o *PlanResponse) SetData(v FeatureSets) { + o.Data = &v +} + +// GetMessage returns the Message field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PlanResponse) GetMessage() string { + if o == nil || IsNil(o.Message.Get()) { + var ret string + return ret + } + return *o.Message.Get() +} + +// GetMessageOk returns a tuple with the Message 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 *PlanResponse) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Message.Get(), o.Message.IsSet() +} + +// HasMessage returns a boolean if a field has been set. +func (o *PlanResponse) HasMessage() bool { + if o != nil && o.Message.IsSet() { + return true + } + + return false +} + +// SetMessage gets a reference to the given NullableString and assigns it to the Message field. +func (o *PlanResponse) SetMessage(v string) { + o.Message.Set(&v) +} +// SetMessageNil sets the value for Message to be an explicit nil +func (o *PlanResponse) SetMessageNil() { + o.Message.Set(nil) +} + +// UnsetMessage ensures that no value is present for Message, not even an explicit nil +func (o *PlanResponse) UnsetMessage() { + o.Message.Unset() +} + +func (o PlanResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PlanResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + if o.Message.IsSet() { + toSerialize["message"] = o.Message.Get() + } + return toSerialize, nil +} + +type NullablePlanResponse struct { + value *PlanResponse + isSet bool +} + +func (v NullablePlanResponse) Get() *PlanResponse { + return v.value +} + +func (v *NullablePlanResponse) Set(val *PlanResponse) { + v.value = val + v.isSet = true +} + +func (v NullablePlanResponse) IsSet() bool { + return v.isSet +} + +func (v *NullablePlanResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePlanResponse(val *PlanResponse) *NullablePlanResponse { + return &NullablePlanResponse{value: val, isSet: true} +} + +func (v NullablePlanResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePlanResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_plan_update.go b/model_plan_update.go new file mode 100644 index 0000000..02039d6 --- /dev/null +++ b/model_plan_update.go @@ -0,0 +1,118 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the PlanUpdate type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PlanUpdate{} + +// PlanUpdate struct for PlanUpdate +type PlanUpdate struct { + // - `0` - Traffic - `1` - Basic - `2` - Growth - `3` - Professional - `4` - Enterprise + PlanLevel int32 `json:"plan_level"` +} + +// NewPlanUpdate instantiates a new PlanUpdate object +// This constructor will assign default values to properties that have it defined, +// 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 NewPlanUpdate(planLevel int32) *PlanUpdate { + this := PlanUpdate{} + this.PlanLevel = planLevel + return &this +} + +// NewPlanUpdateWithDefaults instantiates a new PlanUpdate object +// This 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 NewPlanUpdateWithDefaults() *PlanUpdate { + this := PlanUpdate{} + return &this +} + +// GetPlanLevel returns the PlanLevel field value +func (o *PlanUpdate) GetPlanLevel() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.PlanLevel +} + +// GetPlanLevelOk returns a tuple with the PlanLevel field value +// and a boolean to check if the value has been set. +func (o *PlanUpdate) GetPlanLevelOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.PlanLevel, true +} + +// SetPlanLevel sets field value +func (o *PlanUpdate) SetPlanLevel(v int32) { + o.PlanLevel = v +} + +func (o PlanUpdate) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PlanUpdate) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["plan_level"] = o.PlanLevel + return toSerialize, nil +} + +type NullablePlanUpdate struct { + value *PlanUpdate + isSet bool +} + +func (v NullablePlanUpdate) Get() *PlanUpdate { + return v.value +} + +func (v *NullablePlanUpdate) Set(val *PlanUpdate) { + v.value = val + v.isSet = true +} + +func (v NullablePlanUpdate) IsSet() bool { + return v.isSet +} + +func (v *NullablePlanUpdate) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePlanUpdate(val *PlanUpdate) *NullablePlanUpdate { + return &NullablePlanUpdate{value: val, isSet: true} +} + +func (v NullablePlanUpdate) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePlanUpdate) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_plans_index_domain_parameter.go b/model_plans_index_domain_parameter.go new file mode 100644 index 0000000..bc13e67 --- /dev/null +++ b/model_plans_index_domain_parameter.go @@ -0,0 +1,87 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" + "fmt" +) + +// PlansIndexDomainParameter struct for PlansIndexDomainParameter +type PlansIndexDomainParameter struct { + string *string +} + +// Unmarshal JSON data into any of the pointers in the struct +func (dst *PlansIndexDomainParameter) UnmarshalJSON(data []byte) error { + var err error + // 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(PlansIndexDomainParameter)") +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src *PlansIndexDomainParameter) MarshalJSON() ([]byte, error) { + if src.string != nil { + return json.Marshal(&src.string) + } + + return nil, nil // no data in anyOf schemas +} + +type NullablePlansIndexDomainParameter struct { + value *PlansIndexDomainParameter + isSet bool +} + +func (v NullablePlansIndexDomainParameter) Get() *PlansIndexDomainParameter { + return v.value +} + +func (v *NullablePlansIndexDomainParameter) Set(val *PlansIndexDomainParameter) { + v.value = val + v.isSet = true +} + +func (v NullablePlansIndexDomainParameter) IsSet() bool { + return v.isSet +} + +func (v *NullablePlansIndexDomainParameter) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePlansIndexDomainParameter(val *PlansIndexDomainParameter) *NullablePlansIndexDomainParameter { + return &NullablePlansIndexDomainParameter{value: val, isSet: true} +} + +func (v NullablePlansIndexDomainParameter) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePlansIndexDomainParameter) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_prioritize_pool.go b/model_prioritize_pool.go new file mode 100644 index 0000000..3519260 --- /dev/null +++ b/model_prioritize_pool.go @@ -0,0 +1,105 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" + "fmt" +) + +// PrioritizePool struct for PrioritizePool +type PrioritizePool struct { + PrioritizePoolAfter *PrioritizePoolAfter + PrioritizePoolBefore *PrioritizePoolBefore +} + +// Unmarshal JSON data into any of the pointers in the struct +func (dst *PrioritizePool) UnmarshalJSON(data []byte) error { + var err error + // try to unmarshal JSON data into PrioritizePoolAfter + err = json.Unmarshal(data, &dst.PrioritizePoolAfter); + if err == nil { + jsonPrioritizePoolAfter, _ := json.Marshal(dst.PrioritizePoolAfter) + if string(jsonPrioritizePoolAfter) == "{}" { // empty struct + dst.PrioritizePoolAfter = nil + } else { + return nil // data stored in dst.PrioritizePoolAfter, return on the first match + } + } else { + dst.PrioritizePoolAfter = nil + } + + // try to unmarshal JSON data into PrioritizePoolBefore + err = json.Unmarshal(data, &dst.PrioritizePoolBefore); + if err == nil { + jsonPrioritizePoolBefore, _ := json.Marshal(dst.PrioritizePoolBefore) + if string(jsonPrioritizePoolBefore) == "{}" { // empty struct + dst.PrioritizePoolBefore = nil + } else { + return nil // data stored in dst.PrioritizePoolBefore, return on the first match + } + } else { + dst.PrioritizePoolBefore = nil + } + + return fmt.Errorf("data failed to match schemas in anyOf(PrioritizePool)") +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src *PrioritizePool) MarshalJSON() ([]byte, error) { + if src.PrioritizePoolAfter != nil { + return json.Marshal(&src.PrioritizePoolAfter) + } + + if src.PrioritizePoolBefore != nil { + return json.Marshal(&src.PrioritizePoolBefore) + } + + return nil, nil // no data in anyOf schemas +} + +type NullablePrioritizePool struct { + value *PrioritizePool + isSet bool +} + +func (v NullablePrioritizePool) Get() *PrioritizePool { + return v.value +} + +func (v *NullablePrioritizePool) Set(val *PrioritizePool) { + v.value = val + v.isSet = true +} + +func (v NullablePrioritizePool) IsSet() bool { + return v.isSet +} + +func (v *NullablePrioritizePool) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePrioritizePool(val *PrioritizePool) *NullablePrioritizePool { + return &NullablePrioritizePool{value: val, isSet: true} +} + +func (v NullablePrioritizePool) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePrioritizePool) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_prioritize_pool_after.go b/model_prioritize_pool_after.go new file mode 100644 index 0000000..9abd696 --- /dev/null +++ b/model_prioritize_pool_after.go @@ -0,0 +1,146 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the PrioritizePoolAfter type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PrioritizePoolAfter{} + +// PrioritizePoolAfter struct for PrioritizePoolAfter +type PrioritizePoolAfter struct { + // ID of the pool you want to move + PoolId string `json:"pool_id"` + // ID of the pool you want to be prior to the selected pool + AfterPoolId string `json:"after_pool_id"` +} + +// NewPrioritizePoolAfter instantiates a new PrioritizePoolAfter object +// This constructor will assign default values to properties that have it defined, +// 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 NewPrioritizePoolAfter(poolId string, afterPoolId string) *PrioritizePoolAfter { + this := PrioritizePoolAfter{} + this.PoolId = poolId + this.AfterPoolId = afterPoolId + return &this +} + +// NewPrioritizePoolAfterWithDefaults instantiates a new PrioritizePoolAfter object +// This 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 NewPrioritizePoolAfterWithDefaults() *PrioritizePoolAfter { + this := PrioritizePoolAfter{} + return &this +} + +// GetPoolId returns the PoolId field value +func (o *PrioritizePoolAfter) GetPoolId() string { + if o == nil { + var ret string + return ret + } + + return o.PoolId +} + +// GetPoolIdOk returns a tuple with the PoolId field value +// and a boolean to check if the value has been set. +func (o *PrioritizePoolAfter) GetPoolIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.PoolId, true +} + +// SetPoolId sets field value +func (o *PrioritizePoolAfter) SetPoolId(v string) { + o.PoolId = v +} + +// GetAfterPoolId returns the AfterPoolId field value +func (o *PrioritizePoolAfter) GetAfterPoolId() string { + if o == nil { + var ret string + return ret + } + + return o.AfterPoolId +} + +// GetAfterPoolIdOk returns a tuple with the AfterPoolId field value +// and a boolean to check if the value has been set. +func (o *PrioritizePoolAfter) GetAfterPoolIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.AfterPoolId, true +} + +// SetAfterPoolId sets field value +func (o *PrioritizePoolAfter) SetAfterPoolId(v string) { + o.AfterPoolId = v +} + +func (o PrioritizePoolAfter) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PrioritizePoolAfter) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["pool_id"] = o.PoolId + toSerialize["after_pool_id"] = o.AfterPoolId + return toSerialize, nil +} + +type NullablePrioritizePoolAfter struct { + value *PrioritizePoolAfter + isSet bool +} + +func (v NullablePrioritizePoolAfter) Get() *PrioritizePoolAfter { + return v.value +} + +func (v *NullablePrioritizePoolAfter) Set(val *PrioritizePoolAfter) { + v.value = val + v.isSet = true +} + +func (v NullablePrioritizePoolAfter) IsSet() bool { + return v.isSet +} + +func (v *NullablePrioritizePoolAfter) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePrioritizePoolAfter(val *PrioritizePoolAfter) *NullablePrioritizePoolAfter { + return &NullablePrioritizePoolAfter{value: val, isSet: true} +} + +func (v NullablePrioritizePoolAfter) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePrioritizePoolAfter) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_prioritize_pool_before.go b/model_prioritize_pool_before.go new file mode 100644 index 0000000..9e989dd --- /dev/null +++ b/model_prioritize_pool_before.go @@ -0,0 +1,146 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the PrioritizePoolBefore type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PrioritizePoolBefore{} + +// PrioritizePoolBefore struct for PrioritizePoolBefore +type PrioritizePoolBefore struct { + // ID of the pool you want to move + PoolId string `json:"pool_id"` + // ID of the pool you want to follow the selected pool + BeforePoolId string `json:"before_pool_id"` +} + +// NewPrioritizePoolBefore instantiates a new PrioritizePoolBefore object +// This constructor will assign default values to properties that have it defined, +// 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 NewPrioritizePoolBefore(poolId string, beforePoolId string) *PrioritizePoolBefore { + this := PrioritizePoolBefore{} + this.PoolId = poolId + this.BeforePoolId = beforePoolId + return &this +} + +// NewPrioritizePoolBeforeWithDefaults instantiates a new PrioritizePoolBefore object +// This 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 NewPrioritizePoolBeforeWithDefaults() *PrioritizePoolBefore { + this := PrioritizePoolBefore{} + return &this +} + +// GetPoolId returns the PoolId field value +func (o *PrioritizePoolBefore) GetPoolId() string { + if o == nil { + var ret string + return ret + } + + return o.PoolId +} + +// GetPoolIdOk returns a tuple with the PoolId field value +// and a boolean to check if the value has been set. +func (o *PrioritizePoolBefore) GetPoolIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.PoolId, true +} + +// SetPoolId sets field value +func (o *PrioritizePoolBefore) SetPoolId(v string) { + o.PoolId = v +} + +// GetBeforePoolId returns the BeforePoolId field value +func (o *PrioritizePoolBefore) GetBeforePoolId() string { + if o == nil { + var ret string + return ret + } + + return o.BeforePoolId +} + +// GetBeforePoolIdOk returns a tuple with the BeforePoolId field value +// and a boolean to check if the value has been set. +func (o *PrioritizePoolBefore) GetBeforePoolIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.BeforePoolId, true +} + +// SetBeforePoolId sets field value +func (o *PrioritizePoolBefore) SetBeforePoolId(v string) { + o.BeforePoolId = v +} + +func (o PrioritizePoolBefore) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PrioritizePoolBefore) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["pool_id"] = o.PoolId + toSerialize["before_pool_id"] = o.BeforePoolId + return toSerialize, nil +} + +type NullablePrioritizePoolBefore struct { + value *PrioritizePoolBefore + isSet bool +} + +func (v NullablePrioritizePoolBefore) Get() *PrioritizePoolBefore { + return v.value +} + +func (v *NullablePrioritizePoolBefore) Set(val *PrioritizePoolBefore) { + v.value = val + v.isSet = true +} + +func (v NullablePrioritizePoolBefore) IsSet() bool { + return v.isSet +} + +func (v *NullablePrioritizePoolBefore) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePrioritizePoolBefore(val *PrioritizePoolBefore) *NullablePrioritizePoolBefore { + return &NullablePrioritizePoolBefore{value: val, isSet: true} +} + +func (v NullablePrioritizePoolBefore) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePrioritizePoolBefore) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_ptr_record.go b/model_ptr_record.go new file mode 100644 index 0000000..093c22e --- /dev/null +++ b/model_ptr_record.go @@ -0,0 +1,520 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" + "time" +) + +// checks if the PTRRecord type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PTRRecord{} + +// PTRRecord struct for PTRRecord +type PTRRecord struct { + Value *PTRRecordValue `json:"value,omitempty"` + Type *string `json:"type,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Ttl *int32 `json:"ttl,omitempty"` + Cloud *bool `json:"cloud,omitempty"` + UpstreamHttps *string `json:"upstream_https,omitempty"` + IpFilterMode *DnsRecordIpFilterMode `json:"ip_filter_mode,omitempty"` + // Protected records cannot be modified or deleted by user. + IsProtected *bool `json:"is_protected,omitempty"` + Usage []string `json:"usage,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty"` + UpdatedAt *time.Time `json:"updated_at,omitempty"` +} + +// NewPTRRecord instantiates a new PTRRecord object +// This constructor will assign default values to properties that have it defined, +// 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 NewPTRRecord() *PTRRecord { + this := PTRRecord{} + var cloud bool = false + this.Cloud = &cloud + return &this +} + +// NewPTRRecordWithDefaults instantiates a new PTRRecord object +// This 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 NewPTRRecordWithDefaults() *PTRRecord { + this := PTRRecord{} + var type_ string = "ptr" + this.Type = &type_ + var cloud bool = false + this.Cloud = &cloud + return &this +} + +// GetValue returns the Value field value if set, zero value otherwise. +func (o *PTRRecord) GetValue() PTRRecordValue { + if o == nil || IsNil(o.Value) { + var ret PTRRecordValue + return ret + } + return *o.Value +} + +// GetValueOk returns a tuple with the Value field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PTRRecord) GetValueOk() (*PTRRecordValue, bool) { + if o == nil || IsNil(o.Value) { + return nil, false + } + return o.Value, true +} + +// HasValue returns a boolean if a field has been set. +func (o *PTRRecord) HasValue() bool { + if o != nil && !IsNil(o.Value) { + return true + } + + return false +} + +// SetValue gets a reference to the given PTRRecordValue and assigns it to the Value field. +func (o *PTRRecord) SetValue(v PTRRecordValue) { + o.Value = &v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *PTRRecord) 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 *PTRRecord) 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 *PTRRecord) 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 *PTRRecord) SetType(v string) { + o.Type = &v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *PTRRecord) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PTRRecord) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *PTRRecord) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *PTRRecord) SetId(v string) { + o.Id = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PTRRecord) 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 *PTRRecord) 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 *PTRRecord) 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 *PTRRecord) SetName(v string) { + o.Name = &v +} + +// GetTtl returns the Ttl field value if set, zero value otherwise. +func (o *PTRRecord) GetTtl() int32 { + if o == nil || IsNil(o.Ttl) { + var ret int32 + return ret + } + return *o.Ttl +} + +// GetTtlOk returns a tuple with the Ttl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PTRRecord) GetTtlOk() (*int32, bool) { + if o == nil || IsNil(o.Ttl) { + return nil, false + } + return o.Ttl, true +} + +// HasTtl returns a boolean if a field has been set. +func (o *PTRRecord) HasTtl() bool { + if o != nil && !IsNil(o.Ttl) { + return true + } + + return false +} + +// SetTtl gets a reference to the given int32 and assigns it to the Ttl field. +func (o *PTRRecord) SetTtl(v int32) { + o.Ttl = &v +} + +// GetCloud returns the Cloud field value if set, zero value otherwise. +func (o *PTRRecord) GetCloud() bool { + if o == nil || IsNil(o.Cloud) { + var ret bool + return ret + } + return *o.Cloud +} + +// GetCloudOk returns a tuple with the Cloud field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PTRRecord) GetCloudOk() (*bool, bool) { + if o == nil || IsNil(o.Cloud) { + return nil, false + } + return o.Cloud, true +} + +// HasCloud returns a boolean if a field has been set. +func (o *PTRRecord) HasCloud() bool { + if o != nil && !IsNil(o.Cloud) { + return true + } + + return false +} + +// SetCloud gets a reference to the given bool and assigns it to the Cloud field. +func (o *PTRRecord) SetCloud(v bool) { + o.Cloud = &v +} + +// GetUpstreamHttps returns the UpstreamHttps field value if set, zero value otherwise. +func (o *PTRRecord) GetUpstreamHttps() string { + if o == nil || IsNil(o.UpstreamHttps) { + var ret string + return ret + } + return *o.UpstreamHttps +} + +// GetUpstreamHttpsOk returns a tuple with the UpstreamHttps field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PTRRecord) GetUpstreamHttpsOk() (*string, bool) { + if o == nil || IsNil(o.UpstreamHttps) { + return nil, false + } + return o.UpstreamHttps, true +} + +// HasUpstreamHttps returns a boolean if a field has been set. +func (o *PTRRecord) HasUpstreamHttps() bool { + if o != nil && !IsNil(o.UpstreamHttps) { + return true + } + + return false +} + +// SetUpstreamHttps gets a reference to the given string and assigns it to the UpstreamHttps field. +func (o *PTRRecord) SetUpstreamHttps(v string) { + o.UpstreamHttps = &v +} + +// GetIpFilterMode returns the IpFilterMode field value if set, zero value otherwise. +func (o *PTRRecord) GetIpFilterMode() DnsRecordIpFilterMode { + if o == nil || IsNil(o.IpFilterMode) { + var ret DnsRecordIpFilterMode + return ret + } + return *o.IpFilterMode +} + +// GetIpFilterModeOk returns a tuple with the IpFilterMode field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PTRRecord) GetIpFilterModeOk() (*DnsRecordIpFilterMode, bool) { + if o == nil || IsNil(o.IpFilterMode) { + return nil, false + } + return o.IpFilterMode, true +} + +// HasIpFilterMode returns a boolean if a field has been set. +func (o *PTRRecord) HasIpFilterMode() bool { + if o != nil && !IsNil(o.IpFilterMode) { + return true + } + + return false +} + +// SetIpFilterMode gets a reference to the given DnsRecordIpFilterMode and assigns it to the IpFilterMode field. +func (o *PTRRecord) SetIpFilterMode(v DnsRecordIpFilterMode) { + o.IpFilterMode = &v +} + +// GetIsProtected returns the IsProtected field value if set, zero value otherwise. +func (o *PTRRecord) GetIsProtected() bool { + if o == nil || IsNil(o.IsProtected) { + var ret bool + return ret + } + return *o.IsProtected +} + +// GetIsProtectedOk returns a tuple with the IsProtected field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PTRRecord) GetIsProtectedOk() (*bool, bool) { + if o == nil || IsNil(o.IsProtected) { + return nil, false + } + return o.IsProtected, true +} + +// HasIsProtected returns a boolean if a field has been set. +func (o *PTRRecord) HasIsProtected() bool { + if o != nil && !IsNil(o.IsProtected) { + return true + } + + return false +} + +// SetIsProtected gets a reference to the given bool and assigns it to the IsProtected field. +func (o *PTRRecord) SetIsProtected(v bool) { + o.IsProtected = &v +} + +// GetUsage returns the Usage field value if set, zero value otherwise. +func (o *PTRRecord) GetUsage() []string { + if o == nil || IsNil(o.Usage) { + var ret []string + return ret + } + return o.Usage +} + +// GetUsageOk returns a tuple with the Usage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PTRRecord) GetUsageOk() ([]string, bool) { + if o == nil || IsNil(o.Usage) { + return nil, false + } + return o.Usage, true +} + +// HasUsage returns a boolean if a field has been set. +func (o *PTRRecord) HasUsage() bool { + if o != nil && !IsNil(o.Usage) { + return true + } + + return false +} + +// SetUsage gets a reference to the given []string and assigns it to the Usage field. +func (o *PTRRecord) SetUsage(v []string) { + o.Usage = v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *PTRRecord) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PTRRecord) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *PTRRecord) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *PTRRecord) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *PTRRecord) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PTRRecord) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *PTRRecord) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *PTRRecord) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +func (o PTRRecord) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PTRRecord) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Value) { + toSerialize["value"] = o.Value + } + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + // skip: id is readOnly + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Ttl) { + toSerialize["ttl"] = o.Ttl + } + if !IsNil(o.Cloud) { + toSerialize["cloud"] = o.Cloud + } + if !IsNil(o.UpstreamHttps) { + toSerialize["upstream_https"] = o.UpstreamHttps + } + if !IsNil(o.IpFilterMode) { + toSerialize["ip_filter_mode"] = o.IpFilterMode + } + // skip: is_protected is readOnly + // skip: usage is readOnly + // skip: created_at is readOnly + // skip: updated_at is readOnly + return toSerialize, nil +} + +type NullablePTRRecord struct { + value *PTRRecord + isSet bool +} + +func (v NullablePTRRecord) Get() *PTRRecord { + return v.value +} + +func (v *NullablePTRRecord) Set(val *PTRRecord) { + v.value = val + v.isSet = true +} + +func (v NullablePTRRecord) IsSet() bool { + return v.isSet +} + +func (v *NullablePTRRecord) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePTRRecord(val *PTRRecord) *NullablePTRRecord { + return &NullablePTRRecord{value: val, isSet: true} +} + +func (v NullablePTRRecord) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePTRRecord) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_ptr_record_value.go b/model_ptr_record_value.go new file mode 100644 index 0000000..9b167ff --- /dev/null +++ b/model_ptr_record_value.go @@ -0,0 +1,126 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the PTRRecordValue type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PTRRecordValue{} + +// PTRRecordValue struct for PTRRecordValue +type PTRRecordValue struct { + Domain *string `json:"domain,omitempty"` +} + +// NewPTRRecordValue instantiates a new PTRRecordValue object +// This constructor will assign default values to properties that have it defined, +// 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 NewPTRRecordValue() *PTRRecordValue { + this := PTRRecordValue{} + return &this +} + +// NewPTRRecordValueWithDefaults instantiates a new PTRRecordValue object +// This 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 NewPTRRecordValueWithDefaults() *PTRRecordValue { + this := PTRRecordValue{} + return &this +} + +// GetDomain returns the Domain field value if set, zero value otherwise. +func (o *PTRRecordValue) GetDomain() string { + if o == nil || IsNil(o.Domain) { + var ret string + return ret + } + return *o.Domain +} + +// GetDomainOk returns a tuple with the Domain field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PTRRecordValue) GetDomainOk() (*string, bool) { + if o == nil || IsNil(o.Domain) { + return nil, false + } + return o.Domain, true +} + +// HasDomain returns a boolean if a field has been set. +func (o *PTRRecordValue) HasDomain() bool { + if o != nil && !IsNil(o.Domain) { + return true + } + + return false +} + +// SetDomain gets a reference to the given string and assigns it to the Domain field. +func (o *PTRRecordValue) SetDomain(v string) { + o.Domain = &v +} + +func (o PTRRecordValue) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PTRRecordValue) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Domain) { + toSerialize["domain"] = o.Domain + } + return toSerialize, nil +} + +type NullablePTRRecordValue struct { + value *PTRRecordValue + isSet bool +} + +func (v NullablePTRRecordValue) Get() *PTRRecordValue { + return v.value +} + +func (v *NullablePTRRecordValue) Set(val *PTRRecordValue) { + v.value = val + v.isSet = true +} + +func (v NullablePTRRecordValue) IsSet() bool { + return v.isSet +} + +func (v *NullablePTRRecordValue) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePTRRecordValue(val *PTRRecordValue) *NullablePTRRecordValue { + return &NullablePTRRecordValue{value: val, isSet: true} +} + +func (v NullablePTRRecordValue) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePTRRecordValue) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_purge_tags_index_200_response.go b/model_purge_tags_index_200_response.go new file mode 100644 index 0000000..ae02b9b --- /dev/null +++ b/model_purge_tags_index_200_response.go @@ -0,0 +1,126 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the PurgeTagsIndex200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PurgeTagsIndex200Response{} + +// PurgeTagsIndex200Response struct for PurgeTagsIndex200Response +type PurgeTagsIndex200Response struct { + Data *DomainPurgeTags `json:"data,omitempty"` +} + +// NewPurgeTagsIndex200Response instantiates a new PurgeTagsIndex200Response object +// This constructor will assign default values to properties that have it defined, +// 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 NewPurgeTagsIndex200Response() *PurgeTagsIndex200Response { + this := PurgeTagsIndex200Response{} + return &this +} + +// NewPurgeTagsIndex200ResponseWithDefaults instantiates a new PurgeTagsIndex200Response object +// This 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 NewPurgeTagsIndex200ResponseWithDefaults() *PurgeTagsIndex200Response { + this := PurgeTagsIndex200Response{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *PurgeTagsIndex200Response) GetData() DomainPurgeTags { + if o == nil || IsNil(o.Data) { + var ret DomainPurgeTags + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PurgeTagsIndex200Response) GetDataOk() (*DomainPurgeTags, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *PurgeTagsIndex200Response) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given DomainPurgeTags and assigns it to the Data field. +func (o *PurgeTagsIndex200Response) SetData(v DomainPurgeTags) { + o.Data = &v +} + +func (o PurgeTagsIndex200Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PurgeTagsIndex200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + return toSerialize, nil +} + +type NullablePurgeTagsIndex200Response struct { + value *PurgeTagsIndex200Response + isSet bool +} + +func (v NullablePurgeTagsIndex200Response) Get() *PurgeTagsIndex200Response { + return v.value +} + +func (v *NullablePurgeTagsIndex200Response) Set(val *PurgeTagsIndex200Response) { + v.value = val + v.isSet = true +} + +func (v NullablePurgeTagsIndex200Response) IsSet() bool { + return v.isSet +} + +func (v *NullablePurgeTagsIndex200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePurgeTagsIndex200Response(val *PurgeTagsIndex200Response) *NullablePurgeTagsIndex200Response { + return &NullablePurgeTagsIndex200Response{value: val, isSet: true} +} + +func (v NullablePurgeTagsIndex200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePurgeTagsIndex200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_rate_limit.go b/model_rate_limit.go new file mode 100644 index 0000000..148fa23 --- /dev/null +++ b/model_rate_limit.go @@ -0,0 +1,196 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the RateLimit type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RateLimit{} + +// RateLimit struct for RateLimit +type RateLimit struct { + DdosDetection *bool `json:"ddos_detection,omitempty"` + ExcludeSources []string `json:"exclude_sources,omitempty"` + Rules []RateLimitRuleView `json:"rules,omitempty"` +} + +// NewRateLimit instantiates a new RateLimit object +// This constructor will assign default values to properties that have it defined, +// 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 NewRateLimit() *RateLimit { + this := RateLimit{} + return &this +} + +// NewRateLimitWithDefaults instantiates a new RateLimit object +// This 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 NewRateLimitWithDefaults() *RateLimit { + this := RateLimit{} + return &this +} + +// GetDdosDetection returns the DdosDetection field value if set, zero value otherwise. +func (o *RateLimit) GetDdosDetection() bool { + if o == nil || IsNil(o.DdosDetection) { + var ret bool + return ret + } + return *o.DdosDetection +} + +// GetDdosDetectionOk returns a tuple with the DdosDetection field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RateLimit) GetDdosDetectionOk() (*bool, bool) { + if o == nil || IsNil(o.DdosDetection) { + return nil, false + } + return o.DdosDetection, true +} + +// HasDdosDetection returns a boolean if a field has been set. +func (o *RateLimit) HasDdosDetection() bool { + if o != nil && !IsNil(o.DdosDetection) { + return true + } + + return false +} + +// SetDdosDetection gets a reference to the given bool and assigns it to the DdosDetection field. +func (o *RateLimit) SetDdosDetection(v bool) { + o.DdosDetection = &v +} + +// GetExcludeSources returns the ExcludeSources field value if set, zero value otherwise. +func (o *RateLimit) GetExcludeSources() []string { + if o == nil || IsNil(o.ExcludeSources) { + var ret []string + return ret + } + return o.ExcludeSources +} + +// GetExcludeSourcesOk returns a tuple with the ExcludeSources field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RateLimit) GetExcludeSourcesOk() ([]string, bool) { + if o == nil || IsNil(o.ExcludeSources) { + return nil, false + } + return o.ExcludeSources, true +} + +// HasExcludeSources returns a boolean if a field has been set. +func (o *RateLimit) HasExcludeSources() bool { + if o != nil && !IsNil(o.ExcludeSources) { + return true + } + + return false +} + +// SetExcludeSources gets a reference to the given []string and assigns it to the ExcludeSources field. +func (o *RateLimit) SetExcludeSources(v []string) { + o.ExcludeSources = v +} + +// GetRules returns the Rules field value if set, zero value otherwise. +func (o *RateLimit) GetRules() []RateLimitRuleView { + if o == nil || IsNil(o.Rules) { + var ret []RateLimitRuleView + return ret + } + return o.Rules +} + +// GetRulesOk returns a tuple with the Rules field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RateLimit) GetRulesOk() ([]RateLimitRuleView, bool) { + if o == nil || IsNil(o.Rules) { + return nil, false + } + return o.Rules, true +} + +// HasRules returns a boolean if a field has been set. +func (o *RateLimit) HasRules() bool { + if o != nil && !IsNil(o.Rules) { + return true + } + + return false +} + +// SetRules gets a reference to the given []RateLimitRuleView and assigns it to the Rules field. +func (o *RateLimit) SetRules(v []RateLimitRuleView) { + o.Rules = v +} + +func (o RateLimit) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RateLimit) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.DdosDetection) { + toSerialize["ddos_detection"] = o.DdosDetection + } + if !IsNil(o.ExcludeSources) { + toSerialize["exclude_sources"] = o.ExcludeSources + } + // skip: rules is readOnly + return toSerialize, nil +} + +type NullableRateLimit struct { + value *RateLimit + isSet bool +} + +func (v NullableRateLimit) Get() *RateLimit { + return v.value +} + +func (v *NullableRateLimit) Set(val *RateLimit) { + v.value = val + v.isSet = true +} + +func (v NullableRateLimit) IsSet() bool { + return v.isSet +} + +func (v *NullableRateLimit) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRateLimit(val *RateLimit) *NullableRateLimit { + return &NullableRateLimit{value: val, isSet: true} +} + +func (v NullableRateLimit) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRateLimit) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_rate_limit_data.go b/model_rate_limit_data.go new file mode 100644 index 0000000..7e9c0d9 --- /dev/null +++ b/model_rate_limit_data.go @@ -0,0 +1,126 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the RateLimitData type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RateLimitData{} + +// RateLimitData struct for RateLimitData +type RateLimitData struct { + Data *RateLimit `json:"data,omitempty"` +} + +// NewRateLimitData instantiates a new RateLimitData object +// This constructor will assign default values to properties that have it defined, +// 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 NewRateLimitData() *RateLimitData { + this := RateLimitData{} + return &this +} + +// NewRateLimitDataWithDefaults instantiates a new RateLimitData object +// This 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 NewRateLimitDataWithDefaults() *RateLimitData { + this := RateLimitData{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *RateLimitData) GetData() RateLimit { + if o == nil || IsNil(o.Data) { + var ret RateLimit + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RateLimitData) GetDataOk() (*RateLimit, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *RateLimitData) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given RateLimit and assigns it to the Data field. +func (o *RateLimitData) SetData(v RateLimit) { + o.Data = &v +} + +func (o RateLimitData) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RateLimitData) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + return toSerialize, nil +} + +type NullableRateLimitData struct { + value *RateLimitData + isSet bool +} + +func (v NullableRateLimitData) Get() *RateLimitData { + return v.value +} + +func (v *NullableRateLimitData) Set(val *RateLimitData) { + v.value = val + v.isSet = true +} + +func (v NullableRateLimitData) IsSet() bool { + return v.isSet +} + +func (v *NullableRateLimitData) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRateLimitData(val *RateLimitData) *NullableRateLimitData { + return &NullableRateLimitData{value: val, isSet: true} +} + +func (v NullableRateLimitData) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRateLimitData) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_rate_limit_rule.go b/model_rate_limit_rule.go new file mode 100644 index 0000000..c2a035e --- /dev/null +++ b/model_rate_limit_rule.go @@ -0,0 +1,508 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the RateLimitRule type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RateLimitRule{} + +// RateLimitRule struct for RateLimitRule +type RateLimitRule struct { + ActionDetails *ChallengeAction `json:"action_details,omitempty"` + Id *string `json:"id,omitempty"` + Action *string `json:"action,omitempty"` + IsEnabled *bool `json:"is_enabled,omitempty"` + // - `?` matches any single character. - `*` matches any (possibly empty) sequence of characters. - `**` matches the current directory and arbitrary subdirectories. This sequence must form a single path component, so both `**a` and `b**` are invalid and will result in an error. A sequence of more than two consecutive `*` characters is also invalid. - `[...]` matches any character inside the brackets. Character sequences can also specify ranges of characters, as ordered by Unicode, so e.g. `[0-9]` specifies any character between 0 and 9 inclusive. An unclosed bracket is invalid. - `[!...]` is the negation of `[...]`, i.e. it matches any characters not in the brackets. - The metacharacters `?`, `*`, `[`, `] `can be matched by using brackets (e.g. `[?]`). When a `]` occurs immediately following `[` or `[!` then it is interpreted as being part of, rather then ending, the character set, so `]` and NOT `]` can be matched by `[]]` and `[!]]` respectively. The - character can be specified inside a character sequence pattern by placing it at the start or the end, e.g. `[abc-]`. + UrlPattern string `json:"url_pattern"` + Description NullableString `json:"description,omitempty"` + ExcludeSources []string `json:"exclude_sources,omitempty"` + Rate int32 `json:"rate"` + Burst *int32 `json:"burst,omitempty"` + BlockDuration *int32 `json:"block_duration,omitempty"` + TimeDuration int32 `json:"time_duration"` + AllowedMethods []string `json:"allowed_methods,omitempty"` +} + +// NewRateLimitRule instantiates a new RateLimitRule object +// This constructor will assign default values to properties that have it defined, +// 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 NewRateLimitRule(urlPattern string, rate int32, timeDuration int32) *RateLimitRule { + this := RateLimitRule{} + var action string = "block" + this.Action = &action + this.UrlPattern = urlPattern + this.Rate = rate + this.TimeDuration = timeDuration + return &this +} + +// NewRateLimitRuleWithDefaults instantiates a new RateLimitRule object +// This 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 NewRateLimitRuleWithDefaults() *RateLimitRule { + this := RateLimitRule{} + var action string = "block" + this.Action = &action + return &this +} + +// GetActionDetails returns the ActionDetails field value if set, zero value otherwise. +func (o *RateLimitRule) GetActionDetails() ChallengeAction { + if o == nil || IsNil(o.ActionDetails) { + var ret ChallengeAction + return ret + } + return *o.ActionDetails +} + +// GetActionDetailsOk returns a tuple with the ActionDetails field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RateLimitRule) GetActionDetailsOk() (*ChallengeAction, bool) { + if o == nil || IsNil(o.ActionDetails) { + return nil, false + } + return o.ActionDetails, true +} + +// HasActionDetails returns a boolean if a field has been set. +func (o *RateLimitRule) HasActionDetails() bool { + if o != nil && !IsNil(o.ActionDetails) { + return true + } + + return false +} + +// SetActionDetails gets a reference to the given ChallengeAction and assigns it to the ActionDetails field. +func (o *RateLimitRule) SetActionDetails(v ChallengeAction) { + o.ActionDetails = &v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *RateLimitRule) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RateLimitRule) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *RateLimitRule) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *RateLimitRule) SetId(v string) { + o.Id = &v +} + +// GetAction returns the Action field value if set, zero value otherwise. +func (o *RateLimitRule) GetAction() string { + if o == nil || IsNil(o.Action) { + var ret string + return ret + } + return *o.Action +} + +// GetActionOk returns a tuple with the Action field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RateLimitRule) GetActionOk() (*string, bool) { + if o == nil || IsNil(o.Action) { + return nil, false + } + return o.Action, true +} + +// HasAction returns a boolean if a field has been set. +func (o *RateLimitRule) HasAction() bool { + if o != nil && !IsNil(o.Action) { + return true + } + + return false +} + +// SetAction gets a reference to the given string and assigns it to the Action field. +func (o *RateLimitRule) SetAction(v string) { + o.Action = &v +} + +// GetIsEnabled returns the IsEnabled field value if set, zero value otherwise. +func (o *RateLimitRule) GetIsEnabled() bool { + if o == nil || IsNil(o.IsEnabled) { + var ret bool + return ret + } + return *o.IsEnabled +} + +// GetIsEnabledOk returns a tuple with the IsEnabled field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RateLimitRule) GetIsEnabledOk() (*bool, bool) { + if o == nil || IsNil(o.IsEnabled) { + return nil, false + } + return o.IsEnabled, true +} + +// HasIsEnabled returns a boolean if a field has been set. +func (o *RateLimitRule) HasIsEnabled() bool { + if o != nil && !IsNil(o.IsEnabled) { + return true + } + + return false +} + +// SetIsEnabled gets a reference to the given bool and assigns it to the IsEnabled field. +func (o *RateLimitRule) SetIsEnabled(v bool) { + o.IsEnabled = &v +} + +// GetUrlPattern returns the UrlPattern field value +func (o *RateLimitRule) GetUrlPattern() string { + if o == nil { + var ret string + return ret + } + + return o.UrlPattern +} + +// GetUrlPatternOk returns a tuple with the UrlPattern field value +// and a boolean to check if the value has been set. +func (o *RateLimitRule) GetUrlPatternOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.UrlPattern, true +} + +// SetUrlPattern sets field value +func (o *RateLimitRule) SetUrlPattern(v string) { + o.UrlPattern = v +} + +// GetDescription returns the Description field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RateLimitRule) 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 *RateLimitRule) 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 *RateLimitRule) 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 *RateLimitRule) SetDescription(v string) { + o.Description.Set(&v) +} +// SetDescriptionNil sets the value for Description to be an explicit nil +func (o *RateLimitRule) SetDescriptionNil() { + o.Description.Set(nil) +} + +// UnsetDescription ensures that no value is present for Description, not even an explicit nil +func (o *RateLimitRule) UnsetDescription() { + o.Description.Unset() +} + +// GetExcludeSources returns the ExcludeSources field value if set, zero value otherwise. +func (o *RateLimitRule) GetExcludeSources() []string { + if o == nil || IsNil(o.ExcludeSources) { + var ret []string + return ret + } + return o.ExcludeSources +} + +// GetExcludeSourcesOk returns a tuple with the ExcludeSources field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RateLimitRule) GetExcludeSourcesOk() ([]string, bool) { + if o == nil || IsNil(o.ExcludeSources) { + return nil, false + } + return o.ExcludeSources, true +} + +// HasExcludeSources returns a boolean if a field has been set. +func (o *RateLimitRule) HasExcludeSources() bool { + if o != nil && !IsNil(o.ExcludeSources) { + return true + } + + return false +} + +// SetExcludeSources gets a reference to the given []string and assigns it to the ExcludeSources field. +func (o *RateLimitRule) SetExcludeSources(v []string) { + o.ExcludeSources = v +} + +// GetRate returns the Rate field value +func (o *RateLimitRule) GetRate() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Rate +} + +// GetRateOk returns a tuple with the Rate field value +// and a boolean to check if the value has been set. +func (o *RateLimitRule) GetRateOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Rate, true +} + +// SetRate sets field value +func (o *RateLimitRule) SetRate(v int32) { + o.Rate = v +} + +// GetBurst returns the Burst field value if set, zero value otherwise. +func (o *RateLimitRule) GetBurst() int32 { + if o == nil || IsNil(o.Burst) { + var ret int32 + return ret + } + return *o.Burst +} + +// GetBurstOk returns a tuple with the Burst field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RateLimitRule) GetBurstOk() (*int32, bool) { + if o == nil || IsNil(o.Burst) { + return nil, false + } + return o.Burst, true +} + +// HasBurst returns a boolean if a field has been set. +func (o *RateLimitRule) HasBurst() bool { + if o != nil && !IsNil(o.Burst) { + return true + } + + return false +} + +// SetBurst gets a reference to the given int32 and assigns it to the Burst field. +func (o *RateLimitRule) SetBurst(v int32) { + o.Burst = &v +} + +// GetBlockDuration returns the BlockDuration field value if set, zero value otherwise. +func (o *RateLimitRule) GetBlockDuration() int32 { + if o == nil || IsNil(o.BlockDuration) { + var ret int32 + return ret + } + return *o.BlockDuration +} + +// GetBlockDurationOk returns a tuple with the BlockDuration field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RateLimitRule) GetBlockDurationOk() (*int32, bool) { + if o == nil || IsNil(o.BlockDuration) { + return nil, false + } + return o.BlockDuration, true +} + +// HasBlockDuration returns a boolean if a field has been set. +func (o *RateLimitRule) HasBlockDuration() bool { + if o != nil && !IsNil(o.BlockDuration) { + return true + } + + return false +} + +// SetBlockDuration gets a reference to the given int32 and assigns it to the BlockDuration field. +func (o *RateLimitRule) SetBlockDuration(v int32) { + o.BlockDuration = &v +} + +// GetTimeDuration returns the TimeDuration field value +func (o *RateLimitRule) GetTimeDuration() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.TimeDuration +} + +// GetTimeDurationOk returns a tuple with the TimeDuration field value +// and a boolean to check if the value has been set. +func (o *RateLimitRule) GetTimeDurationOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.TimeDuration, true +} + +// SetTimeDuration sets field value +func (o *RateLimitRule) SetTimeDuration(v int32) { + o.TimeDuration = v +} + +// GetAllowedMethods returns the AllowedMethods field value if set, zero value otherwise. +func (o *RateLimitRule) GetAllowedMethods() []string { + if o == nil || IsNil(o.AllowedMethods) { + var ret []string + return ret + } + return o.AllowedMethods +} + +// GetAllowedMethodsOk returns a tuple with the AllowedMethods field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RateLimitRule) GetAllowedMethodsOk() ([]string, bool) { + if o == nil || IsNil(o.AllowedMethods) { + return nil, false + } + return o.AllowedMethods, true +} + +// HasAllowedMethods returns a boolean if a field has been set. +func (o *RateLimitRule) HasAllowedMethods() bool { + if o != nil && !IsNil(o.AllowedMethods) { + return true + } + + return false +} + +// SetAllowedMethods gets a reference to the given []string and assigns it to the AllowedMethods field. +func (o *RateLimitRule) SetAllowedMethods(v []string) { + o.AllowedMethods = v +} + +func (o RateLimitRule) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RateLimitRule) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.ActionDetails) { + toSerialize["action_details"] = o.ActionDetails + } + // skip: id is readOnly + if !IsNil(o.Action) { + toSerialize["action"] = o.Action + } + if !IsNil(o.IsEnabled) { + toSerialize["is_enabled"] = o.IsEnabled + } + toSerialize["url_pattern"] = o.UrlPattern + if o.Description.IsSet() { + toSerialize["description"] = o.Description.Get() + } + if !IsNil(o.ExcludeSources) { + toSerialize["exclude_sources"] = o.ExcludeSources + } + toSerialize["rate"] = o.Rate + if !IsNil(o.Burst) { + toSerialize["burst"] = o.Burst + } + if !IsNil(o.BlockDuration) { + toSerialize["block_duration"] = o.BlockDuration + } + toSerialize["time_duration"] = o.TimeDuration + if !IsNil(o.AllowedMethods) { + toSerialize["allowed_methods"] = o.AllowedMethods + } + return toSerialize, nil +} + +type NullableRateLimitRule struct { + value *RateLimitRule + isSet bool +} + +func (v NullableRateLimitRule) Get() *RateLimitRule { + return v.value +} + +func (v *NullableRateLimitRule) Set(val *RateLimitRule) { + v.value = val + v.isSet = true +} + +func (v NullableRateLimitRule) IsSet() bool { + return v.isSet +} + +func (v *NullableRateLimitRule) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRateLimitRule(val *RateLimitRule) *NullableRateLimitRule { + return &NullableRateLimitRule{value: val, isSet: true} +} + +func (v NullableRateLimitRule) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRateLimitRule) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_rate_limit_rule_data.go b/model_rate_limit_rule_data.go new file mode 100644 index 0000000..9547668 --- /dev/null +++ b/model_rate_limit_rule_data.go @@ -0,0 +1,126 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the RateLimitRuleData type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RateLimitRuleData{} + +// RateLimitRuleData struct for RateLimitRuleData +type RateLimitRuleData struct { + Data *RateLimitRuleView `json:"data,omitempty"` +} + +// NewRateLimitRuleData instantiates a new RateLimitRuleData object +// This constructor will assign default values to properties that have it defined, +// 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 NewRateLimitRuleData() *RateLimitRuleData { + this := RateLimitRuleData{} + return &this +} + +// NewRateLimitRuleDataWithDefaults instantiates a new RateLimitRuleData object +// This 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 NewRateLimitRuleDataWithDefaults() *RateLimitRuleData { + this := RateLimitRuleData{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *RateLimitRuleData) GetData() RateLimitRuleView { + if o == nil || IsNil(o.Data) { + var ret RateLimitRuleView + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RateLimitRuleData) GetDataOk() (*RateLimitRuleView, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *RateLimitRuleData) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given RateLimitRuleView and assigns it to the Data field. +func (o *RateLimitRuleData) SetData(v RateLimitRuleView) { + o.Data = &v +} + +func (o RateLimitRuleData) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RateLimitRuleData) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + return toSerialize, nil +} + +type NullableRateLimitRuleData struct { + value *RateLimitRuleData + isSet bool +} + +func (v NullableRateLimitRuleData) Get() *RateLimitRuleData { + return v.value +} + +func (v *NullableRateLimitRuleData) Set(val *RateLimitRuleData) { + v.value = val + v.isSet = true +} + +func (v NullableRateLimitRuleData) IsSet() bool { + return v.isSet +} + +func (v *NullableRateLimitRuleData) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRateLimitRuleData(val *RateLimitRuleData) *NullableRateLimitRuleData { + return &NullableRateLimitRuleData{value: val, isSet: true} +} + +func (v NullableRateLimitRuleData) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRateLimitRuleData) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_rate_limit_rule_view.go b/model_rate_limit_rule_view.go new file mode 100644 index 0000000..ea60197 --- /dev/null +++ b/model_rate_limit_rule_view.go @@ -0,0 +1,508 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the RateLimitRuleView type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RateLimitRuleView{} + +// RateLimitRuleView struct for RateLimitRuleView +type RateLimitRuleView struct { + ActionDetails map[string]interface{} `json:"action_details,omitempty"` + Id *string `json:"id,omitempty"` + Action *string `json:"action,omitempty"` + IsEnabled *bool `json:"is_enabled,omitempty"` + // - `?` matches any single character. - `*` matches any (possibly empty) sequence of characters. - `**` matches the current directory and arbitrary subdirectories. This sequence must form a single path component, so both `**a` and `b**` are invalid and will result in an error. A sequence of more than two consecutive `*` characters is also invalid. - `[...]` matches any character inside the brackets. Character sequences can also specify ranges of characters, as ordered by Unicode, so e.g. `[0-9]` specifies any character between 0 and 9 inclusive. An unclosed bracket is invalid. - `[!...]` is the negation of `[...]`, i.e. it matches any characters not in the brackets. - The metacharacters `?`, `*`, `[`, `] `can be matched by using brackets (e.g. `[?]`). When a `]` occurs immediately following `[` or `[!` then it is interpreted as being part of, rather then ending, the character set, so `]` and NOT `]` can be matched by `[]]` and `[!]]` respectively. The - character can be specified inside a character sequence pattern by placing it at the start or the end, e.g. `[abc-]`. + UrlPattern string `json:"url_pattern"` + Description NullableString `json:"description,omitempty"` + ExcludeSources []string `json:"exclude_sources,omitempty"` + Rate int32 `json:"rate"` + Burst *int32 `json:"burst,omitempty"` + BlockDuration *int32 `json:"block_duration,omitempty"` + TimeDuration int32 `json:"time_duration"` + AllowedMethods []string `json:"allowed_methods,omitempty"` +} + +// NewRateLimitRuleView instantiates a new RateLimitRuleView object +// This constructor will assign default values to properties that have it defined, +// 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 NewRateLimitRuleView(urlPattern string, rate int32, timeDuration int32) *RateLimitRuleView { + this := RateLimitRuleView{} + var action string = "block" + this.Action = &action + this.UrlPattern = urlPattern + this.Rate = rate + this.TimeDuration = timeDuration + return &this +} + +// NewRateLimitRuleViewWithDefaults instantiates a new RateLimitRuleView object +// This 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 NewRateLimitRuleViewWithDefaults() *RateLimitRuleView { + this := RateLimitRuleView{} + var action string = "block" + this.Action = &action + return &this +} + +// GetActionDetails returns the ActionDetails field value if set, zero value otherwise. +func (o *RateLimitRuleView) GetActionDetails() map[string]interface{} { + if o == nil || IsNil(o.ActionDetails) { + var ret map[string]interface{} + return ret + } + return o.ActionDetails +} + +// GetActionDetailsOk returns a tuple with the ActionDetails field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RateLimitRuleView) GetActionDetailsOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.ActionDetails) { + return map[string]interface{}{}, false + } + return o.ActionDetails, true +} + +// HasActionDetails returns a boolean if a field has been set. +func (o *RateLimitRuleView) HasActionDetails() bool { + if o != nil && !IsNil(o.ActionDetails) { + return true + } + + return false +} + +// SetActionDetails gets a reference to the given map[string]interface{} and assigns it to the ActionDetails field. +func (o *RateLimitRuleView) SetActionDetails(v map[string]interface{}) { + o.ActionDetails = v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *RateLimitRuleView) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RateLimitRuleView) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *RateLimitRuleView) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *RateLimitRuleView) SetId(v string) { + o.Id = &v +} + +// GetAction returns the Action field value if set, zero value otherwise. +func (o *RateLimitRuleView) GetAction() string { + if o == nil || IsNil(o.Action) { + var ret string + return ret + } + return *o.Action +} + +// GetActionOk returns a tuple with the Action field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RateLimitRuleView) GetActionOk() (*string, bool) { + if o == nil || IsNil(o.Action) { + return nil, false + } + return o.Action, true +} + +// HasAction returns a boolean if a field has been set. +func (o *RateLimitRuleView) HasAction() bool { + if o != nil && !IsNil(o.Action) { + return true + } + + return false +} + +// SetAction gets a reference to the given string and assigns it to the Action field. +func (o *RateLimitRuleView) SetAction(v string) { + o.Action = &v +} + +// GetIsEnabled returns the IsEnabled field value if set, zero value otherwise. +func (o *RateLimitRuleView) GetIsEnabled() bool { + if o == nil || IsNil(o.IsEnabled) { + var ret bool + return ret + } + return *o.IsEnabled +} + +// GetIsEnabledOk returns a tuple with the IsEnabled field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RateLimitRuleView) GetIsEnabledOk() (*bool, bool) { + if o == nil || IsNil(o.IsEnabled) { + return nil, false + } + return o.IsEnabled, true +} + +// HasIsEnabled returns a boolean if a field has been set. +func (o *RateLimitRuleView) HasIsEnabled() bool { + if o != nil && !IsNil(o.IsEnabled) { + return true + } + + return false +} + +// SetIsEnabled gets a reference to the given bool and assigns it to the IsEnabled field. +func (o *RateLimitRuleView) SetIsEnabled(v bool) { + o.IsEnabled = &v +} + +// GetUrlPattern returns the UrlPattern field value +func (o *RateLimitRuleView) GetUrlPattern() string { + if o == nil { + var ret string + return ret + } + + return o.UrlPattern +} + +// GetUrlPatternOk returns a tuple with the UrlPattern field value +// and a boolean to check if the value has been set. +func (o *RateLimitRuleView) GetUrlPatternOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.UrlPattern, true +} + +// SetUrlPattern sets field value +func (o *RateLimitRuleView) SetUrlPattern(v string) { + o.UrlPattern = v +} + +// GetDescription returns the Description field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RateLimitRuleView) 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 *RateLimitRuleView) 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 *RateLimitRuleView) 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 *RateLimitRuleView) SetDescription(v string) { + o.Description.Set(&v) +} +// SetDescriptionNil sets the value for Description to be an explicit nil +func (o *RateLimitRuleView) SetDescriptionNil() { + o.Description.Set(nil) +} + +// UnsetDescription ensures that no value is present for Description, not even an explicit nil +func (o *RateLimitRuleView) UnsetDescription() { + o.Description.Unset() +} + +// GetExcludeSources returns the ExcludeSources field value if set, zero value otherwise. +func (o *RateLimitRuleView) GetExcludeSources() []string { + if o == nil || IsNil(o.ExcludeSources) { + var ret []string + return ret + } + return o.ExcludeSources +} + +// GetExcludeSourcesOk returns a tuple with the ExcludeSources field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RateLimitRuleView) GetExcludeSourcesOk() ([]string, bool) { + if o == nil || IsNil(o.ExcludeSources) { + return nil, false + } + return o.ExcludeSources, true +} + +// HasExcludeSources returns a boolean if a field has been set. +func (o *RateLimitRuleView) HasExcludeSources() bool { + if o != nil && !IsNil(o.ExcludeSources) { + return true + } + + return false +} + +// SetExcludeSources gets a reference to the given []string and assigns it to the ExcludeSources field. +func (o *RateLimitRuleView) SetExcludeSources(v []string) { + o.ExcludeSources = v +} + +// GetRate returns the Rate field value +func (o *RateLimitRuleView) GetRate() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Rate +} + +// GetRateOk returns a tuple with the Rate field value +// and a boolean to check if the value has been set. +func (o *RateLimitRuleView) GetRateOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Rate, true +} + +// SetRate sets field value +func (o *RateLimitRuleView) SetRate(v int32) { + o.Rate = v +} + +// GetBurst returns the Burst field value if set, zero value otherwise. +func (o *RateLimitRuleView) GetBurst() int32 { + if o == nil || IsNil(o.Burst) { + var ret int32 + return ret + } + return *o.Burst +} + +// GetBurstOk returns a tuple with the Burst field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RateLimitRuleView) GetBurstOk() (*int32, bool) { + if o == nil || IsNil(o.Burst) { + return nil, false + } + return o.Burst, true +} + +// HasBurst returns a boolean if a field has been set. +func (o *RateLimitRuleView) HasBurst() bool { + if o != nil && !IsNil(o.Burst) { + return true + } + + return false +} + +// SetBurst gets a reference to the given int32 and assigns it to the Burst field. +func (o *RateLimitRuleView) SetBurst(v int32) { + o.Burst = &v +} + +// GetBlockDuration returns the BlockDuration field value if set, zero value otherwise. +func (o *RateLimitRuleView) GetBlockDuration() int32 { + if o == nil || IsNil(o.BlockDuration) { + var ret int32 + return ret + } + return *o.BlockDuration +} + +// GetBlockDurationOk returns a tuple with the BlockDuration field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RateLimitRuleView) GetBlockDurationOk() (*int32, bool) { + if o == nil || IsNil(o.BlockDuration) { + return nil, false + } + return o.BlockDuration, true +} + +// HasBlockDuration returns a boolean if a field has been set. +func (o *RateLimitRuleView) HasBlockDuration() bool { + if o != nil && !IsNil(o.BlockDuration) { + return true + } + + return false +} + +// SetBlockDuration gets a reference to the given int32 and assigns it to the BlockDuration field. +func (o *RateLimitRuleView) SetBlockDuration(v int32) { + o.BlockDuration = &v +} + +// GetTimeDuration returns the TimeDuration field value +func (o *RateLimitRuleView) GetTimeDuration() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.TimeDuration +} + +// GetTimeDurationOk returns a tuple with the TimeDuration field value +// and a boolean to check if the value has been set. +func (o *RateLimitRuleView) GetTimeDurationOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.TimeDuration, true +} + +// SetTimeDuration sets field value +func (o *RateLimitRuleView) SetTimeDuration(v int32) { + o.TimeDuration = v +} + +// GetAllowedMethods returns the AllowedMethods field value if set, zero value otherwise. +func (o *RateLimitRuleView) GetAllowedMethods() []string { + if o == nil || IsNil(o.AllowedMethods) { + var ret []string + return ret + } + return o.AllowedMethods +} + +// GetAllowedMethodsOk returns a tuple with the AllowedMethods field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RateLimitRuleView) GetAllowedMethodsOk() ([]string, bool) { + if o == nil || IsNil(o.AllowedMethods) { + return nil, false + } + return o.AllowedMethods, true +} + +// HasAllowedMethods returns a boolean if a field has been set. +func (o *RateLimitRuleView) HasAllowedMethods() bool { + if o != nil && !IsNil(o.AllowedMethods) { + return true + } + + return false +} + +// SetAllowedMethods gets a reference to the given []string and assigns it to the AllowedMethods field. +func (o *RateLimitRuleView) SetAllowedMethods(v []string) { + o.AllowedMethods = v +} + +func (o RateLimitRuleView) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RateLimitRuleView) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.ActionDetails) { + toSerialize["action_details"] = o.ActionDetails + } + // skip: id is readOnly + if !IsNil(o.Action) { + toSerialize["action"] = o.Action + } + if !IsNil(o.IsEnabled) { + toSerialize["is_enabled"] = o.IsEnabled + } + toSerialize["url_pattern"] = o.UrlPattern + if o.Description.IsSet() { + toSerialize["description"] = o.Description.Get() + } + if !IsNil(o.ExcludeSources) { + toSerialize["exclude_sources"] = o.ExcludeSources + } + toSerialize["rate"] = o.Rate + if !IsNil(o.Burst) { + toSerialize["burst"] = o.Burst + } + if !IsNil(o.BlockDuration) { + toSerialize["block_duration"] = o.BlockDuration + } + toSerialize["time_duration"] = o.TimeDuration + if !IsNil(o.AllowedMethods) { + toSerialize["allowed_methods"] = o.AllowedMethods + } + return toSerialize, nil +} + +type NullableRateLimitRuleView struct { + value *RateLimitRuleView + isSet bool +} + +func (v NullableRateLimitRuleView) Get() *RateLimitRuleView { + return v.value +} + +func (v *NullableRateLimitRuleView) Set(val *RateLimitRuleView) { + v.value = val + v.isSet = true +} + +func (v NullableRateLimitRuleView) IsSet() bool { + return v.isSet +} + +func (v *NullableRateLimitRuleView) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRateLimitRuleView(val *RateLimitRuleView) *NullableRateLimitRuleView { + return &NullableRateLimitRuleView{value: val, isSet: true} +} + +func (v NullableRateLimitRuleView) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRateLimitRuleView) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_rate_limit_settings.go b/model_rate_limit_settings.go new file mode 100644 index 0000000..a6a06d0 --- /dev/null +++ b/model_rate_limit_settings.go @@ -0,0 +1,162 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the RateLimitSettings type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RateLimitSettings{} + +// RateLimitSettings struct for RateLimitSettings +type RateLimitSettings struct { + DdosDetection *bool `json:"ddos_detection,omitempty"` + ExcludeSources []string `json:"exclude_sources,omitempty"` +} + +// NewRateLimitSettings instantiates a new RateLimitSettings object +// This constructor will assign default values to properties that have it defined, +// 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 NewRateLimitSettings() *RateLimitSettings { + this := RateLimitSettings{} + return &this +} + +// NewRateLimitSettingsWithDefaults instantiates a new RateLimitSettings object +// This 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 NewRateLimitSettingsWithDefaults() *RateLimitSettings { + this := RateLimitSettings{} + return &this +} + +// GetDdosDetection returns the DdosDetection field value if set, zero value otherwise. +func (o *RateLimitSettings) GetDdosDetection() bool { + if o == nil || IsNil(o.DdosDetection) { + var ret bool + return ret + } + return *o.DdosDetection +} + +// GetDdosDetectionOk returns a tuple with the DdosDetection field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RateLimitSettings) GetDdosDetectionOk() (*bool, bool) { + if o == nil || IsNil(o.DdosDetection) { + return nil, false + } + return o.DdosDetection, true +} + +// HasDdosDetection returns a boolean if a field has been set. +func (o *RateLimitSettings) HasDdosDetection() bool { + if o != nil && !IsNil(o.DdosDetection) { + return true + } + + return false +} + +// SetDdosDetection gets a reference to the given bool and assigns it to the DdosDetection field. +func (o *RateLimitSettings) SetDdosDetection(v bool) { + o.DdosDetection = &v +} + +// GetExcludeSources returns the ExcludeSources field value if set, zero value otherwise. +func (o *RateLimitSettings) GetExcludeSources() []string { + if o == nil || IsNil(o.ExcludeSources) { + var ret []string + return ret + } + return o.ExcludeSources +} + +// GetExcludeSourcesOk returns a tuple with the ExcludeSources field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RateLimitSettings) GetExcludeSourcesOk() ([]string, bool) { + if o == nil || IsNil(o.ExcludeSources) { + return nil, false + } + return o.ExcludeSources, true +} + +// HasExcludeSources returns a boolean if a field has been set. +func (o *RateLimitSettings) HasExcludeSources() bool { + if o != nil && !IsNil(o.ExcludeSources) { + return true + } + + return false +} + +// SetExcludeSources gets a reference to the given []string and assigns it to the ExcludeSources field. +func (o *RateLimitSettings) SetExcludeSources(v []string) { + o.ExcludeSources = v +} + +func (o RateLimitSettings) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RateLimitSettings) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.DdosDetection) { + toSerialize["ddos_detection"] = o.DdosDetection + } + if !IsNil(o.ExcludeSources) { + toSerialize["exclude_sources"] = o.ExcludeSources + } + return toSerialize, nil +} + +type NullableRateLimitSettings struct { + value *RateLimitSettings + isSet bool +} + +func (v NullableRateLimitSettings) Get() *RateLimitSettings { + return v.value +} + +func (v *NullableRateLimitSettings) Set(val *RateLimitSettings) { + v.value = val + v.isSet = true +} + +func (v NullableRateLimitSettings) IsSet() bool { + return v.isSet +} + +func (v *NullableRateLimitSettings) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRateLimitSettings(val *RateLimitSettings) *NullableRateLimitSettings { + return &NullableRateLimitSettings{value: val, isSet: true} +} + +func (v NullableRateLimitSettings) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRateLimitSettings) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_rate_limit_settings_data.go b/model_rate_limit_settings_data.go new file mode 100644 index 0000000..de87751 --- /dev/null +++ b/model_rate_limit_settings_data.go @@ -0,0 +1,126 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the RateLimitSettingsData type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RateLimitSettingsData{} + +// RateLimitSettingsData struct for RateLimitSettingsData +type RateLimitSettingsData struct { + Data *RateLimitSettings `json:"data,omitempty"` +} + +// NewRateLimitSettingsData instantiates a new RateLimitSettingsData object +// This constructor will assign default values to properties that have it defined, +// 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 NewRateLimitSettingsData() *RateLimitSettingsData { + this := RateLimitSettingsData{} + return &this +} + +// NewRateLimitSettingsDataWithDefaults instantiates a new RateLimitSettingsData object +// This 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 NewRateLimitSettingsDataWithDefaults() *RateLimitSettingsData { + this := RateLimitSettingsData{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *RateLimitSettingsData) GetData() RateLimitSettings { + if o == nil || IsNil(o.Data) { + var ret RateLimitSettings + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RateLimitSettingsData) GetDataOk() (*RateLimitSettings, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *RateLimitSettingsData) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given RateLimitSettings and assigns it to the Data field. +func (o *RateLimitSettingsData) SetData(v RateLimitSettings) { + o.Data = &v +} + +func (o RateLimitSettingsData) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RateLimitSettingsData) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + return toSerialize, nil +} + +type NullableRateLimitSettingsData struct { + value *RateLimitSettingsData + isSet bool +} + +func (v NullableRateLimitSettingsData) Get() *RateLimitSettingsData { + return v.value +} + +func (v *NullableRateLimitSettingsData) Set(val *RateLimitSettingsData) { + v.value = val + v.isSet = true +} + +func (v NullableRateLimitSettingsData) IsSet() bool { + return v.isSet +} + +func (v *NullableRateLimitSettingsData) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRateLimitSettingsData(val *RateLimitSettingsData) *NullableRateLimitSettingsData { + return &NullableRateLimitSettingsData{value: val, isSet: true} +} + +func (v NullableRateLimitSettingsData) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRateLimitSettingsData) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_rate_limiting_rules_index_200_response.go b/model_rate_limiting_rules_index_200_response.go new file mode 100644 index 0000000..bb4ea39 --- /dev/null +++ b/model_rate_limiting_rules_index_200_response.go @@ -0,0 +1,198 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the RateLimitingRulesIndex200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RateLimitingRulesIndex200Response{} + +// RateLimitingRulesIndex200Response struct for RateLimitingRulesIndex200Response +type RateLimitingRulesIndex200Response struct { + Data []RateLimitRuleView `json:"data,omitempty"` + Links *PaginatedResponseLinks `json:"links,omitempty"` + Meta *PaginatedResponseMeta `json:"meta,omitempty"` +} + +// NewRateLimitingRulesIndex200Response instantiates a new RateLimitingRulesIndex200Response object +// This constructor will assign default values to properties that have it defined, +// 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 NewRateLimitingRulesIndex200Response() *RateLimitingRulesIndex200Response { + this := RateLimitingRulesIndex200Response{} + return &this +} + +// NewRateLimitingRulesIndex200ResponseWithDefaults instantiates a new RateLimitingRulesIndex200Response object +// This 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 NewRateLimitingRulesIndex200ResponseWithDefaults() *RateLimitingRulesIndex200Response { + this := RateLimitingRulesIndex200Response{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *RateLimitingRulesIndex200Response) GetData() []RateLimitRuleView { + if o == nil || IsNil(o.Data) { + var ret []RateLimitRuleView + return ret + } + return o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RateLimitingRulesIndex200Response) GetDataOk() ([]RateLimitRuleView, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *RateLimitingRulesIndex200Response) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given []RateLimitRuleView and assigns it to the Data field. +func (o *RateLimitingRulesIndex200Response) SetData(v []RateLimitRuleView) { + o.Data = v +} + +// GetLinks returns the Links field value if set, zero value otherwise. +func (o *RateLimitingRulesIndex200Response) GetLinks() PaginatedResponseLinks { + if o == nil || IsNil(o.Links) { + var ret PaginatedResponseLinks + return ret + } + return *o.Links +} + +// GetLinksOk returns a tuple with the Links field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RateLimitingRulesIndex200Response) GetLinksOk() (*PaginatedResponseLinks, bool) { + if o == nil || IsNil(o.Links) { + return nil, false + } + return o.Links, true +} + +// HasLinks returns a boolean if a field has been set. +func (o *RateLimitingRulesIndex200Response) HasLinks() bool { + if o != nil && !IsNil(o.Links) { + return true + } + + return false +} + +// SetLinks gets a reference to the given PaginatedResponseLinks and assigns it to the Links field. +func (o *RateLimitingRulesIndex200Response) SetLinks(v PaginatedResponseLinks) { + o.Links = &v +} + +// GetMeta returns the Meta field value if set, zero value otherwise. +func (o *RateLimitingRulesIndex200Response) GetMeta() PaginatedResponseMeta { + if o == nil || IsNil(o.Meta) { + var ret PaginatedResponseMeta + return ret + } + return *o.Meta +} + +// GetMetaOk returns a tuple with the Meta field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RateLimitingRulesIndex200Response) GetMetaOk() (*PaginatedResponseMeta, bool) { + if o == nil || IsNil(o.Meta) { + return nil, false + } + return o.Meta, true +} + +// HasMeta returns a boolean if a field has been set. +func (o *RateLimitingRulesIndex200Response) HasMeta() bool { + if o != nil && !IsNil(o.Meta) { + return true + } + + return false +} + +// SetMeta gets a reference to the given PaginatedResponseMeta and assigns it to the Meta field. +func (o *RateLimitingRulesIndex200Response) SetMeta(v PaginatedResponseMeta) { + o.Meta = &v +} + +func (o RateLimitingRulesIndex200Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RateLimitingRulesIndex200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + if !IsNil(o.Links) { + toSerialize["links"] = o.Links + } + if !IsNil(o.Meta) { + toSerialize["meta"] = o.Meta + } + return toSerialize, nil +} + +type NullableRateLimitingRulesIndex200Response struct { + value *RateLimitingRulesIndex200Response + isSet bool +} + +func (v NullableRateLimitingRulesIndex200Response) Get() *RateLimitingRulesIndex200Response { + return v.value +} + +func (v *NullableRateLimitingRulesIndex200Response) Set(val *RateLimitingRulesIndex200Response) { + v.value = val + v.isSet = true +} + +func (v NullableRateLimitingRulesIndex200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableRateLimitingRulesIndex200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRateLimitingRulesIndex200Response(val *RateLimitingRulesIndex200Response) *NullableRateLimitingRulesIndex200Response { + return &NullableRateLimitingRulesIndex200Response{value: val, isSet: true} +} + +func (v NullableRateLimitingRulesIndex200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRateLimitingRulesIndex200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_rate_limiting_rules_update_200_response.go b/model_rate_limiting_rules_update_200_response.go new file mode 100644 index 0000000..69b1a17 --- /dev/null +++ b/model_rate_limiting_rules_update_200_response.go @@ -0,0 +1,172 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the RateLimitingRulesUpdate200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RateLimitingRulesUpdate200Response{} + +// RateLimitingRulesUpdate200Response struct for RateLimitingRulesUpdate200Response +type RateLimitingRulesUpdate200Response struct { + Data *RateLimitRuleView `json:"data,omitempty"` + Message NullableString `json:"message,omitempty"` +} + +// NewRateLimitingRulesUpdate200Response instantiates a new RateLimitingRulesUpdate200Response object +// This constructor will assign default values to properties that have it defined, +// 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 NewRateLimitingRulesUpdate200Response() *RateLimitingRulesUpdate200Response { + this := RateLimitingRulesUpdate200Response{} + return &this +} + +// NewRateLimitingRulesUpdate200ResponseWithDefaults instantiates a new RateLimitingRulesUpdate200Response object +// This 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 NewRateLimitingRulesUpdate200ResponseWithDefaults() *RateLimitingRulesUpdate200Response { + this := RateLimitingRulesUpdate200Response{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *RateLimitingRulesUpdate200Response) GetData() RateLimitRuleView { + if o == nil || IsNil(o.Data) { + var ret RateLimitRuleView + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RateLimitingRulesUpdate200Response) GetDataOk() (*RateLimitRuleView, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *RateLimitingRulesUpdate200Response) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given RateLimitRuleView and assigns it to the Data field. +func (o *RateLimitingRulesUpdate200Response) SetData(v RateLimitRuleView) { + o.Data = &v +} + +// GetMessage returns the Message field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RateLimitingRulesUpdate200Response) GetMessage() string { + if o == nil || IsNil(o.Message.Get()) { + var ret string + return ret + } + return *o.Message.Get() +} + +// GetMessageOk returns a tuple with the Message 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 *RateLimitingRulesUpdate200Response) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Message.Get(), o.Message.IsSet() +} + +// HasMessage returns a boolean if a field has been set. +func (o *RateLimitingRulesUpdate200Response) HasMessage() bool { + if o != nil && o.Message.IsSet() { + return true + } + + return false +} + +// SetMessage gets a reference to the given NullableString and assigns it to the Message field. +func (o *RateLimitingRulesUpdate200Response) SetMessage(v string) { + o.Message.Set(&v) +} +// SetMessageNil sets the value for Message to be an explicit nil +func (o *RateLimitingRulesUpdate200Response) SetMessageNil() { + o.Message.Set(nil) +} + +// UnsetMessage ensures that no value is present for Message, not even an explicit nil +func (o *RateLimitingRulesUpdate200Response) UnsetMessage() { + o.Message.Unset() +} + +func (o RateLimitingRulesUpdate200Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RateLimitingRulesUpdate200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + if o.Message.IsSet() { + toSerialize["message"] = o.Message.Get() + } + return toSerialize, nil +} + +type NullableRateLimitingRulesUpdate200Response struct { + value *RateLimitingRulesUpdate200Response + isSet bool +} + +func (v NullableRateLimitingRulesUpdate200Response) Get() *RateLimitingRulesUpdate200Response { + return v.value +} + +func (v *NullableRateLimitingRulesUpdate200Response) Set(val *RateLimitingRulesUpdate200Response) { + v.value = val + v.isSet = true +} + +func (v NullableRateLimitingRulesUpdate200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableRateLimitingRulesUpdate200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRateLimitingRulesUpdate200Response(val *RateLimitingRulesUpdate200Response) *NullableRateLimitingRulesUpdate200Response { + return &NullableRateLimitingRulesUpdate200Response{value: val, isSet: true} +} + +func (v NullableRateLimitingRulesUpdate200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRateLimitingRulesUpdate200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_rate_limiting_settings_update_200_response.go b/model_rate_limiting_settings_update_200_response.go new file mode 100644 index 0000000..6ff2c3c --- /dev/null +++ b/model_rate_limiting_settings_update_200_response.go @@ -0,0 +1,172 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the RateLimitingSettingsUpdate200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RateLimitingSettingsUpdate200Response{} + +// RateLimitingSettingsUpdate200Response struct for RateLimitingSettingsUpdate200Response +type RateLimitingSettingsUpdate200Response struct { + Data *RateLimitSettings `json:"data,omitempty"` + Message NullableString `json:"message,omitempty"` +} + +// NewRateLimitingSettingsUpdate200Response instantiates a new RateLimitingSettingsUpdate200Response object +// This constructor will assign default values to properties that have it defined, +// 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 NewRateLimitingSettingsUpdate200Response() *RateLimitingSettingsUpdate200Response { + this := RateLimitingSettingsUpdate200Response{} + return &this +} + +// NewRateLimitingSettingsUpdate200ResponseWithDefaults instantiates a new RateLimitingSettingsUpdate200Response object +// This 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 NewRateLimitingSettingsUpdate200ResponseWithDefaults() *RateLimitingSettingsUpdate200Response { + this := RateLimitingSettingsUpdate200Response{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *RateLimitingSettingsUpdate200Response) GetData() RateLimitSettings { + if o == nil || IsNil(o.Data) { + var ret RateLimitSettings + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RateLimitingSettingsUpdate200Response) GetDataOk() (*RateLimitSettings, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *RateLimitingSettingsUpdate200Response) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given RateLimitSettings and assigns it to the Data field. +func (o *RateLimitingSettingsUpdate200Response) SetData(v RateLimitSettings) { + o.Data = &v +} + +// GetMessage returns the Message field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RateLimitingSettingsUpdate200Response) GetMessage() string { + if o == nil || IsNil(o.Message.Get()) { + var ret string + return ret + } + return *o.Message.Get() +} + +// GetMessageOk returns a tuple with the Message 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 *RateLimitingSettingsUpdate200Response) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Message.Get(), o.Message.IsSet() +} + +// HasMessage returns a boolean if a field has been set. +func (o *RateLimitingSettingsUpdate200Response) HasMessage() bool { + if o != nil && o.Message.IsSet() { + return true + } + + return false +} + +// SetMessage gets a reference to the given NullableString and assigns it to the Message field. +func (o *RateLimitingSettingsUpdate200Response) SetMessage(v string) { + o.Message.Set(&v) +} +// SetMessageNil sets the value for Message to be an explicit nil +func (o *RateLimitingSettingsUpdate200Response) SetMessageNil() { + o.Message.Set(nil) +} + +// UnsetMessage ensures that no value is present for Message, not even an explicit nil +func (o *RateLimitingSettingsUpdate200Response) UnsetMessage() { + o.Message.Unset() +} + +func (o RateLimitingSettingsUpdate200Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RateLimitingSettingsUpdate200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + if o.Message.IsSet() { + toSerialize["message"] = o.Message.Get() + } + return toSerialize, nil +} + +type NullableRateLimitingSettingsUpdate200Response struct { + value *RateLimitingSettingsUpdate200Response + isSet bool +} + +func (v NullableRateLimitingSettingsUpdate200Response) Get() *RateLimitingSettingsUpdate200Response { + return v.value +} + +func (v *NullableRateLimitingSettingsUpdate200Response) Set(val *RateLimitingSettingsUpdate200Response) { + v.value = val + v.isSet = true +} + +func (v NullableRateLimitingSettingsUpdate200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableRateLimitingSettingsUpdate200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRateLimitingSettingsUpdate200Response(val *RateLimitingSettingsUpdate200Response) *NullableRateLimitingSettingsUpdate200Response { + return &NullableRateLimitingSettingsUpdate200Response{value: val, isSet: true} +} + +func (v NullableRateLimitingSettingsUpdate200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRateLimitingSettingsUpdate200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_rate_limiting_update_200_response.go b/model_rate_limiting_update_200_response.go new file mode 100644 index 0000000..4515b26 --- /dev/null +++ b/model_rate_limiting_update_200_response.go @@ -0,0 +1,172 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the RateLimitingUpdate200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RateLimitingUpdate200Response{} + +// RateLimitingUpdate200Response struct for RateLimitingUpdate200Response +type RateLimitingUpdate200Response struct { + Data *RateLimit `json:"data,omitempty"` + Message NullableString `json:"message,omitempty"` +} + +// NewRateLimitingUpdate200Response instantiates a new RateLimitingUpdate200Response object +// This constructor will assign default values to properties that have it defined, +// 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 NewRateLimitingUpdate200Response() *RateLimitingUpdate200Response { + this := RateLimitingUpdate200Response{} + return &this +} + +// NewRateLimitingUpdate200ResponseWithDefaults instantiates a new RateLimitingUpdate200Response object +// This 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 NewRateLimitingUpdate200ResponseWithDefaults() *RateLimitingUpdate200Response { + this := RateLimitingUpdate200Response{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *RateLimitingUpdate200Response) GetData() RateLimit { + if o == nil || IsNil(o.Data) { + var ret RateLimit + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RateLimitingUpdate200Response) GetDataOk() (*RateLimit, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *RateLimitingUpdate200Response) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given RateLimit and assigns it to the Data field. +func (o *RateLimitingUpdate200Response) SetData(v RateLimit) { + o.Data = &v +} + +// GetMessage returns the Message field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RateLimitingUpdate200Response) GetMessage() string { + if o == nil || IsNil(o.Message.Get()) { + var ret string + return ret + } + return *o.Message.Get() +} + +// GetMessageOk returns a tuple with the Message 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 *RateLimitingUpdate200Response) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Message.Get(), o.Message.IsSet() +} + +// HasMessage returns a boolean if a field has been set. +func (o *RateLimitingUpdate200Response) HasMessage() bool { + if o != nil && o.Message.IsSet() { + return true + } + + return false +} + +// SetMessage gets a reference to the given NullableString and assigns it to the Message field. +func (o *RateLimitingUpdate200Response) SetMessage(v string) { + o.Message.Set(&v) +} +// SetMessageNil sets the value for Message to be an explicit nil +func (o *RateLimitingUpdate200Response) SetMessageNil() { + o.Message.Set(nil) +} + +// UnsetMessage ensures that no value is present for Message, not even an explicit nil +func (o *RateLimitingUpdate200Response) UnsetMessage() { + o.Message.Unset() +} + +func (o RateLimitingUpdate200Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RateLimitingUpdate200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + if o.Message.IsSet() { + toSerialize["message"] = o.Message.Get() + } + return toSerialize, nil +} + +type NullableRateLimitingUpdate200Response struct { + value *RateLimitingUpdate200Response + isSet bool +} + +func (v NullableRateLimitingUpdate200Response) Get() *RateLimitingUpdate200Response { + return v.value +} + +func (v *NullableRateLimitingUpdate200Response) Set(val *RateLimitingUpdate200Response) { + v.value = val + v.isSet = true +} + +func (v NullableRateLimitingUpdate200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableRateLimitingUpdate200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRateLimitingUpdate200Response(val *RateLimitingUpdate200Response) *NullableRateLimitingUpdate200Response { + return &NullableRateLimitingUpdate200Response{value: val, isSet: true} +} + +func (v NullableRateLimitingUpdate200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRateLimitingUpdate200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_redirect.go b/model_redirect.go new file mode 100644 index 0000000..ad11943 --- /dev/null +++ b/model_redirect.go @@ -0,0 +1,126 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the Redirect type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Redirect{} + +// Redirect struct for Redirect +type Redirect struct { + FRedirectToWww *string `json:"f_redirect_to_www,omitempty"` +} + +// NewRedirect instantiates a new Redirect object +// This constructor will assign default values to properties that have it defined, +// 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 NewRedirect() *Redirect { + this := Redirect{} + return &this +} + +// NewRedirectWithDefaults instantiates a new Redirect object +// This 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 NewRedirectWithDefaults() *Redirect { + this := Redirect{} + return &this +} + +// GetFRedirectToWww returns the FRedirectToWww field value if set, zero value otherwise. +func (o *Redirect) GetFRedirectToWww() string { + if o == nil || IsNil(o.FRedirectToWww) { + var ret string + return ret + } + return *o.FRedirectToWww +} + +// GetFRedirectToWwwOk returns a tuple with the FRedirectToWww field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Redirect) GetFRedirectToWwwOk() (*string, bool) { + if o == nil || IsNil(o.FRedirectToWww) { + return nil, false + } + return o.FRedirectToWww, true +} + +// HasFRedirectToWww returns a boolean if a field has been set. +func (o *Redirect) HasFRedirectToWww() bool { + if o != nil && !IsNil(o.FRedirectToWww) { + return true + } + + return false +} + +// SetFRedirectToWww gets a reference to the given string and assigns it to the FRedirectToWww field. +func (o *Redirect) SetFRedirectToWww(v string) { + o.FRedirectToWww = &v +} + +func (o Redirect) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Redirect) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.FRedirectToWww) { + toSerialize["f_redirect_to_www"] = o.FRedirectToWww + } + return toSerialize, nil +} + +type NullableRedirect struct { + value *Redirect + isSet bool +} + +func (v NullableRedirect) Get() *Redirect { + return v.value +} + +func (v *NullableRedirect) Set(val *Redirect) { + v.value = val + v.isSet = true +} + +func (v NullableRedirect) IsSet() bool { + return v.isSet +} + +func (v *NullableRedirect) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRedirect(val *Redirect) *NullableRedirect { + return &NullableRedirect{value: val, isSet: true} +} + +func (v NullableRedirect) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRedirect) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_redirect_data.go b/model_redirect_data.go new file mode 100644 index 0000000..2aacd11 --- /dev/null +++ b/model_redirect_data.go @@ -0,0 +1,126 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the RedirectData type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RedirectData{} + +// RedirectData struct for RedirectData +type RedirectData struct { + Data *Redirect `json:"data,omitempty"` +} + +// NewRedirectData instantiates a new RedirectData object +// This constructor will assign default values to properties that have it defined, +// 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 NewRedirectData() *RedirectData { + this := RedirectData{} + return &this +} + +// NewRedirectDataWithDefaults instantiates a new RedirectData object +// This 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 NewRedirectDataWithDefaults() *RedirectData { + this := RedirectData{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *RedirectData) GetData() Redirect { + if o == nil || IsNil(o.Data) { + var ret Redirect + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RedirectData) GetDataOk() (*Redirect, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *RedirectData) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given Redirect and assigns it to the Data field. +func (o *RedirectData) SetData(v Redirect) { + o.Data = &v +} + +func (o RedirectData) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RedirectData) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + return toSerialize, nil +} + +type NullableRedirectData struct { + value *RedirectData + isSet bool +} + +func (v NullableRedirectData) Get() *RedirectData { + return v.value +} + +func (v *NullableRedirectData) Set(val *RedirectData) { + v.value = val + v.isSet = true +} + +func (v NullableRedirectData) IsSet() bool { + return v.isSet +} + +func (v *NullableRedirectData) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRedirectData(val *RedirectData) *NullableRedirectData { + return &NullableRedirectData{value: val, isSet: true} +} + +func (v NullableRedirectData) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRedirectData) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_reports_attacks_attackers_200_response.go b/model_reports_attacks_attackers_200_response.go new file mode 100644 index 0000000..bb13c3d --- /dev/null +++ b/model_reports_attacks_attackers_200_response.go @@ -0,0 +1,126 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the ReportsAttacksAttackers200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ReportsAttacksAttackers200Response{} + +// ReportsAttacksAttackers200Response struct for ReportsAttacksAttackers200Response +type ReportsAttacksAttackers200Response struct { + Data []ReportsAttacksAttackers200ResponseDataInner `json:"data,omitempty"` +} + +// NewReportsAttacksAttackers200Response instantiates a new ReportsAttacksAttackers200Response object +// This constructor will assign default values to properties that have it defined, +// 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 NewReportsAttacksAttackers200Response() *ReportsAttacksAttackers200Response { + this := ReportsAttacksAttackers200Response{} + return &this +} + +// NewReportsAttacksAttackers200ResponseWithDefaults instantiates a new ReportsAttacksAttackers200Response object +// This 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 NewReportsAttacksAttackers200ResponseWithDefaults() *ReportsAttacksAttackers200Response { + this := ReportsAttacksAttackers200Response{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *ReportsAttacksAttackers200Response) GetData() []ReportsAttacksAttackers200ResponseDataInner { + if o == nil || IsNil(o.Data) { + var ret []ReportsAttacksAttackers200ResponseDataInner + return ret + } + return o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ReportsAttacksAttackers200Response) GetDataOk() ([]ReportsAttacksAttackers200ResponseDataInner, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *ReportsAttacksAttackers200Response) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given []ReportsAttacksAttackers200ResponseDataInner and assigns it to the Data field. +func (o *ReportsAttacksAttackers200Response) SetData(v []ReportsAttacksAttackers200ResponseDataInner) { + o.Data = v +} + +func (o ReportsAttacksAttackers200Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ReportsAttacksAttackers200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + return toSerialize, nil +} + +type NullableReportsAttacksAttackers200Response struct { + value *ReportsAttacksAttackers200Response + isSet bool +} + +func (v NullableReportsAttacksAttackers200Response) Get() *ReportsAttacksAttackers200Response { + return v.value +} + +func (v *NullableReportsAttacksAttackers200Response) Set(val *ReportsAttacksAttackers200Response) { + v.value = val + v.isSet = true +} + +func (v NullableReportsAttacksAttackers200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableReportsAttacksAttackers200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableReportsAttacksAttackers200Response(val *ReportsAttacksAttackers200Response) *NullableReportsAttacksAttackers200Response { + return &NullableReportsAttacksAttackers200Response{value: val, isSet: true} +} + +func (v NullableReportsAttacksAttackers200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableReportsAttacksAttackers200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_reports_attacks_attackers_200_response_data_inner.go b/model_reports_attacks_attackers_200_response_data_inner.go new file mode 100644 index 0000000..087da26 --- /dev/null +++ b/model_reports_attacks_attackers_200_response_data_inner.go @@ -0,0 +1,162 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the ReportsAttacksAttackers200ResponseDataInner type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ReportsAttacksAttackers200ResponseDataInner{} + +// ReportsAttacksAttackers200ResponseDataInner struct for ReportsAttacksAttackers200ResponseDataInner +type ReportsAttacksAttackers200ResponseDataInner struct { + Ip *string `json:"ip,omitempty"` + Count *int32 `json:"count,omitempty"` +} + +// NewReportsAttacksAttackers200ResponseDataInner instantiates a new ReportsAttacksAttackers200ResponseDataInner object +// This constructor will assign default values to properties that have it defined, +// 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 NewReportsAttacksAttackers200ResponseDataInner() *ReportsAttacksAttackers200ResponseDataInner { + this := ReportsAttacksAttackers200ResponseDataInner{} + return &this +} + +// NewReportsAttacksAttackers200ResponseDataInnerWithDefaults instantiates a new ReportsAttacksAttackers200ResponseDataInner object +// This 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 NewReportsAttacksAttackers200ResponseDataInnerWithDefaults() *ReportsAttacksAttackers200ResponseDataInner { + this := ReportsAttacksAttackers200ResponseDataInner{} + return &this +} + +// GetIp returns the Ip field value if set, zero value otherwise. +func (o *ReportsAttacksAttackers200ResponseDataInner) GetIp() string { + if o == nil || IsNil(o.Ip) { + var ret string + return ret + } + return *o.Ip +} + +// GetIpOk returns a tuple with the Ip field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ReportsAttacksAttackers200ResponseDataInner) GetIpOk() (*string, bool) { + if o == nil || IsNil(o.Ip) { + return nil, false + } + return o.Ip, true +} + +// HasIp returns a boolean if a field has been set. +func (o *ReportsAttacksAttackers200ResponseDataInner) HasIp() bool { + if o != nil && !IsNil(o.Ip) { + return true + } + + return false +} + +// SetIp gets a reference to the given string and assigns it to the Ip field. +func (o *ReportsAttacksAttackers200ResponseDataInner) SetIp(v string) { + o.Ip = &v +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *ReportsAttacksAttackers200ResponseDataInner) 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 *ReportsAttacksAttackers200ResponseDataInner) 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 *ReportsAttacksAttackers200ResponseDataInner) 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 *ReportsAttacksAttackers200ResponseDataInner) SetCount(v int32) { + o.Count = &v +} + +func (o ReportsAttacksAttackers200ResponseDataInner) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ReportsAttacksAttackers200ResponseDataInner) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Ip) { + toSerialize["ip"] = o.Ip + } + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + return toSerialize, nil +} + +type NullableReportsAttacksAttackers200ResponseDataInner struct { + value *ReportsAttacksAttackers200ResponseDataInner + isSet bool +} + +func (v NullableReportsAttacksAttackers200ResponseDataInner) Get() *ReportsAttacksAttackers200ResponseDataInner { + return v.value +} + +func (v *NullableReportsAttacksAttackers200ResponseDataInner) Set(val *ReportsAttacksAttackers200ResponseDataInner) { + v.value = val + v.isSet = true +} + +func (v NullableReportsAttacksAttackers200ResponseDataInner) IsSet() bool { + return v.isSet +} + +func (v *NullableReportsAttacksAttackers200ResponseDataInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableReportsAttacksAttackers200ResponseDataInner(val *ReportsAttacksAttackers200ResponseDataInner) *NullableReportsAttacksAttackers200ResponseDataInner { + return &NullableReportsAttacksAttackers200ResponseDataInner{value: val, isSet: true} +} + +func (v NullableReportsAttacksAttackers200ResponseDataInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableReportsAttacksAttackers200ResponseDataInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_reports_attacks_index_200_response.go b/model_reports_attacks_index_200_response.go new file mode 100644 index 0000000..88e2f3a --- /dev/null +++ b/model_reports_attacks_index_200_response.go @@ -0,0 +1,198 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the ReportsAttacksIndex200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ReportsAttacksIndex200Response{} + +// ReportsAttacksIndex200Response struct for ReportsAttacksIndex200Response +type ReportsAttacksIndex200Response struct { + Data []AttackReportItem `json:"data,omitempty"` + Links *PaginatedResponseLinks `json:"links,omitempty"` + Meta *PaginatedResponseMeta `json:"meta,omitempty"` +} + +// NewReportsAttacksIndex200Response instantiates a new ReportsAttacksIndex200Response object +// This constructor will assign default values to properties that have it defined, +// 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 NewReportsAttacksIndex200Response() *ReportsAttacksIndex200Response { + this := ReportsAttacksIndex200Response{} + return &this +} + +// NewReportsAttacksIndex200ResponseWithDefaults instantiates a new ReportsAttacksIndex200Response object +// This 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 NewReportsAttacksIndex200ResponseWithDefaults() *ReportsAttacksIndex200Response { + this := ReportsAttacksIndex200Response{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *ReportsAttacksIndex200Response) GetData() []AttackReportItem { + if o == nil || IsNil(o.Data) { + var ret []AttackReportItem + return ret + } + return o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ReportsAttacksIndex200Response) GetDataOk() ([]AttackReportItem, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *ReportsAttacksIndex200Response) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given []AttackReportItem and assigns it to the Data field. +func (o *ReportsAttacksIndex200Response) SetData(v []AttackReportItem) { + o.Data = v +} + +// GetLinks returns the Links field value if set, zero value otherwise. +func (o *ReportsAttacksIndex200Response) GetLinks() PaginatedResponseLinks { + if o == nil || IsNil(o.Links) { + var ret PaginatedResponseLinks + return ret + } + return *o.Links +} + +// GetLinksOk returns a tuple with the Links field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ReportsAttacksIndex200Response) GetLinksOk() (*PaginatedResponseLinks, bool) { + if o == nil || IsNil(o.Links) { + return nil, false + } + return o.Links, true +} + +// HasLinks returns a boolean if a field has been set. +func (o *ReportsAttacksIndex200Response) HasLinks() bool { + if o != nil && !IsNil(o.Links) { + return true + } + + return false +} + +// SetLinks gets a reference to the given PaginatedResponseLinks and assigns it to the Links field. +func (o *ReportsAttacksIndex200Response) SetLinks(v PaginatedResponseLinks) { + o.Links = &v +} + +// GetMeta returns the Meta field value if set, zero value otherwise. +func (o *ReportsAttacksIndex200Response) GetMeta() PaginatedResponseMeta { + if o == nil || IsNil(o.Meta) { + var ret PaginatedResponseMeta + return ret + } + return *o.Meta +} + +// GetMetaOk returns a tuple with the Meta field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ReportsAttacksIndex200Response) GetMetaOk() (*PaginatedResponseMeta, bool) { + if o == nil || IsNil(o.Meta) { + return nil, false + } + return o.Meta, true +} + +// HasMeta returns a boolean if a field has been set. +func (o *ReportsAttacksIndex200Response) HasMeta() bool { + if o != nil && !IsNil(o.Meta) { + return true + } + + return false +} + +// SetMeta gets a reference to the given PaginatedResponseMeta and assigns it to the Meta field. +func (o *ReportsAttacksIndex200Response) SetMeta(v PaginatedResponseMeta) { + o.Meta = &v +} + +func (o ReportsAttacksIndex200Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ReportsAttacksIndex200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + if !IsNil(o.Links) { + toSerialize["links"] = o.Links + } + if !IsNil(o.Meta) { + toSerialize["meta"] = o.Meta + } + return toSerialize, nil +} + +type NullableReportsAttacksIndex200Response struct { + value *ReportsAttacksIndex200Response + isSet bool +} + +func (v NullableReportsAttacksIndex200Response) Get() *ReportsAttacksIndex200Response { + return v.value +} + +func (v *NullableReportsAttacksIndex200Response) Set(val *ReportsAttacksIndex200Response) { + v.value = val + v.isSet = true +} + +func (v NullableReportsAttacksIndex200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableReportsAttacksIndex200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableReportsAttacksIndex200Response(val *ReportsAttacksIndex200Response) *NullableReportsAttacksIndex200Response { + return &NullableReportsAttacksIndex200Response{value: val, isSet: true} +} + +func (v NullableReportsAttacksIndex200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableReportsAttacksIndex200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_reports_attacks_show_200_response.go b/model_reports_attacks_show_200_response.go new file mode 100644 index 0000000..bcd64c9 --- /dev/null +++ b/model_reports_attacks_show_200_response.go @@ -0,0 +1,126 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the ReportsAttacksShow200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ReportsAttacksShow200Response{} + +// ReportsAttacksShow200Response struct for ReportsAttacksShow200Response +type ReportsAttacksShow200Response struct { + Data *AttackReport `json:"data,omitempty"` +} + +// NewReportsAttacksShow200Response instantiates a new ReportsAttacksShow200Response object +// This constructor will assign default values to properties that have it defined, +// 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 NewReportsAttacksShow200Response() *ReportsAttacksShow200Response { + this := ReportsAttacksShow200Response{} + return &this +} + +// NewReportsAttacksShow200ResponseWithDefaults instantiates a new ReportsAttacksShow200Response object +// This 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 NewReportsAttacksShow200ResponseWithDefaults() *ReportsAttacksShow200Response { + this := ReportsAttacksShow200Response{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *ReportsAttacksShow200Response) GetData() AttackReport { + if o == nil || IsNil(o.Data) { + var ret AttackReport + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ReportsAttacksShow200Response) GetDataOk() (*AttackReport, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *ReportsAttacksShow200Response) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given AttackReport and assigns it to the Data field. +func (o *ReportsAttacksShow200Response) SetData(v AttackReport) { + o.Data = &v +} + +func (o ReportsAttacksShow200Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ReportsAttacksShow200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + return toSerialize, nil +} + +type NullableReportsAttacksShow200Response struct { + value *ReportsAttacksShow200Response + isSet bool +} + +func (v NullableReportsAttacksShow200Response) Get() *ReportsAttacksShow200Response { + return v.value +} + +func (v *NullableReportsAttacksShow200Response) Set(val *ReportsAttacksShow200Response) { + v.value = val + v.isSet = true +} + +func (v NullableReportsAttacksShow200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableReportsAttacksShow200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableReportsAttacksShow200Response(val *ReportsAttacksShow200Response) *NullableReportsAttacksShow200Response { + return &NullableReportsAttacksShow200Response{value: val, isSet: true} +} + +func (v NullableReportsAttacksShow200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableReportsAttacksShow200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_reports_error_log_details_200_response.go b/model_reports_error_log_details_200_response.go new file mode 100644 index 0000000..8b0f7be --- /dev/null +++ b/model_reports_error_log_details_200_response.go @@ -0,0 +1,126 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the ReportsErrorLogDetails200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ReportsErrorLogDetails200Response{} + +// ReportsErrorLogDetails200Response struct for ReportsErrorLogDetails200Response +type ReportsErrorLogDetails200Response struct { + Data map[string]interface{} `json:"data,omitempty"` +} + +// NewReportsErrorLogDetails200Response instantiates a new ReportsErrorLogDetails200Response object +// This constructor will assign default values to properties that have it defined, +// 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 NewReportsErrorLogDetails200Response() *ReportsErrorLogDetails200Response { + this := ReportsErrorLogDetails200Response{} + return &this +} + +// NewReportsErrorLogDetails200ResponseWithDefaults instantiates a new ReportsErrorLogDetails200Response object +// This 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 NewReportsErrorLogDetails200ResponseWithDefaults() *ReportsErrorLogDetails200Response { + this := ReportsErrorLogDetails200Response{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *ReportsErrorLogDetails200Response) GetData() map[string]interface{} { + if o == nil || IsNil(o.Data) { + var ret map[string]interface{} + return ret + } + return o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ReportsErrorLogDetails200Response) GetDataOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Data) { + return map[string]interface{}{}, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *ReportsErrorLogDetails200Response) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given map[string]interface{} and assigns it to the Data field. +func (o *ReportsErrorLogDetails200Response) SetData(v map[string]interface{}) { + o.Data = v +} + +func (o ReportsErrorLogDetails200Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ReportsErrorLogDetails200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + return toSerialize, nil +} + +type NullableReportsErrorLogDetails200Response struct { + value *ReportsErrorLogDetails200Response + isSet bool +} + +func (v NullableReportsErrorLogDetails200Response) Get() *ReportsErrorLogDetails200Response { + return v.value +} + +func (v *NullableReportsErrorLogDetails200Response) Set(val *ReportsErrorLogDetails200Response) { + v.value = val + v.isSet = true +} + +func (v NullableReportsErrorLogDetails200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableReportsErrorLogDetails200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableReportsErrorLogDetails200Response(val *ReportsErrorLogDetails200Response) *NullableReportsErrorLogDetails200Response { + return &NullableReportsErrorLogDetails200Response{value: val, isSet: true} +} + +func (v NullableReportsErrorLogDetails200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableReportsErrorLogDetails200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_reports_visitors_high_request_ips_200_response.go b/model_reports_visitors_high_request_ips_200_response.go new file mode 100644 index 0000000..43bcbc3 --- /dev/null +++ b/model_reports_visitors_high_request_ips_200_response.go @@ -0,0 +1,198 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the ReportsVisitorsHighRequestIps200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ReportsVisitorsHighRequestIps200Response{} + +// ReportsVisitorsHighRequestIps200Response struct for ReportsVisitorsHighRequestIps200Response +type ReportsVisitorsHighRequestIps200Response struct { + Data []HighRequestedIp `json:"data,omitempty"` + Links *PaginatedResponseLinks `json:"links,omitempty"` + Meta *PaginatedResponseMeta `json:"meta,omitempty"` +} + +// NewReportsVisitorsHighRequestIps200Response instantiates a new ReportsVisitorsHighRequestIps200Response object +// This constructor will assign default values to properties that have it defined, +// 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 NewReportsVisitorsHighRequestIps200Response() *ReportsVisitorsHighRequestIps200Response { + this := ReportsVisitorsHighRequestIps200Response{} + return &this +} + +// NewReportsVisitorsHighRequestIps200ResponseWithDefaults instantiates a new ReportsVisitorsHighRequestIps200Response object +// This 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 NewReportsVisitorsHighRequestIps200ResponseWithDefaults() *ReportsVisitorsHighRequestIps200Response { + this := ReportsVisitorsHighRequestIps200Response{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *ReportsVisitorsHighRequestIps200Response) GetData() []HighRequestedIp { + if o == nil || IsNil(o.Data) { + var ret []HighRequestedIp + return ret + } + return o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ReportsVisitorsHighRequestIps200Response) GetDataOk() ([]HighRequestedIp, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *ReportsVisitorsHighRequestIps200Response) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given []HighRequestedIp and assigns it to the Data field. +func (o *ReportsVisitorsHighRequestIps200Response) SetData(v []HighRequestedIp) { + o.Data = v +} + +// GetLinks returns the Links field value if set, zero value otherwise. +func (o *ReportsVisitorsHighRequestIps200Response) GetLinks() PaginatedResponseLinks { + if o == nil || IsNil(o.Links) { + var ret PaginatedResponseLinks + return ret + } + return *o.Links +} + +// GetLinksOk returns a tuple with the Links field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ReportsVisitorsHighRequestIps200Response) GetLinksOk() (*PaginatedResponseLinks, bool) { + if o == nil || IsNil(o.Links) { + return nil, false + } + return o.Links, true +} + +// HasLinks returns a boolean if a field has been set. +func (o *ReportsVisitorsHighRequestIps200Response) HasLinks() bool { + if o != nil && !IsNil(o.Links) { + return true + } + + return false +} + +// SetLinks gets a reference to the given PaginatedResponseLinks and assigns it to the Links field. +func (o *ReportsVisitorsHighRequestIps200Response) SetLinks(v PaginatedResponseLinks) { + o.Links = &v +} + +// GetMeta returns the Meta field value if set, zero value otherwise. +func (o *ReportsVisitorsHighRequestIps200Response) GetMeta() PaginatedResponseMeta { + if o == nil || IsNil(o.Meta) { + var ret PaginatedResponseMeta + return ret + } + return *o.Meta +} + +// GetMetaOk returns a tuple with the Meta field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ReportsVisitorsHighRequestIps200Response) GetMetaOk() (*PaginatedResponseMeta, bool) { + if o == nil || IsNil(o.Meta) { + return nil, false + } + return o.Meta, true +} + +// HasMeta returns a boolean if a field has been set. +func (o *ReportsVisitorsHighRequestIps200Response) HasMeta() bool { + if o != nil && !IsNil(o.Meta) { + return true + } + + return false +} + +// SetMeta gets a reference to the given PaginatedResponseMeta and assigns it to the Meta field. +func (o *ReportsVisitorsHighRequestIps200Response) SetMeta(v PaginatedResponseMeta) { + o.Meta = &v +} + +func (o ReportsVisitorsHighRequestIps200Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ReportsVisitorsHighRequestIps200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + if !IsNil(o.Links) { + toSerialize["links"] = o.Links + } + if !IsNil(o.Meta) { + toSerialize["meta"] = o.Meta + } + return toSerialize, nil +} + +type NullableReportsVisitorsHighRequestIps200Response struct { + value *ReportsVisitorsHighRequestIps200Response + isSet bool +} + +func (v NullableReportsVisitorsHighRequestIps200Response) Get() *ReportsVisitorsHighRequestIps200Response { + return v.value +} + +func (v *NullableReportsVisitorsHighRequestIps200Response) Set(val *ReportsVisitorsHighRequestIps200Response) { + v.value = val + v.isSet = true +} + +func (v NullableReportsVisitorsHighRequestIps200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableReportsVisitorsHighRequestIps200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableReportsVisitorsHighRequestIps200Response(val *ReportsVisitorsHighRequestIps200Response) *NullableReportsVisitorsHighRequestIps200Response { + return &NullableReportsVisitorsHighRequestIps200Response{value: val, isSet: true} +} + +func (v NullableReportsVisitorsHighRequestIps200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableReportsVisitorsHighRequestIps200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_reprioritize_rule_request.go b/model_reprioritize_rule_request.go new file mode 100644 index 0000000..01e8c3d --- /dev/null +++ b/model_reprioritize_rule_request.go @@ -0,0 +1,192 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the ReprioritizeRuleRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ReprioritizeRuleRequest{} + +// ReprioritizeRuleRequest struct for ReprioritizeRuleRequest +type ReprioritizeRuleRequest struct { + // ID of the rule you want to move + RuleId string `json:"rule_id"` + // ID of the rule you want to be prior to the selected rule + AfterRuleId *string `json:"after_rule_id,omitempty"` + // ID of the rule you want to follow the selected rule + BeforeRuleId *string `json:"before_rule_id,omitempty"` +} + +// NewReprioritizeRuleRequest instantiates a new ReprioritizeRuleRequest object +// This constructor will assign default values to properties that have it defined, +// 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 NewReprioritizeRuleRequest(ruleId string) *ReprioritizeRuleRequest { + this := ReprioritizeRuleRequest{} + this.RuleId = ruleId + return &this +} + +// NewReprioritizeRuleRequestWithDefaults instantiates a new ReprioritizeRuleRequest object +// This 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 NewReprioritizeRuleRequestWithDefaults() *ReprioritizeRuleRequest { + this := ReprioritizeRuleRequest{} + return &this +} + +// GetRuleId returns the RuleId field value +func (o *ReprioritizeRuleRequest) GetRuleId() string { + if o == nil { + var ret string + return ret + } + + return o.RuleId +} + +// GetRuleIdOk returns a tuple with the RuleId field value +// and a boolean to check if the value has been set. +func (o *ReprioritizeRuleRequest) GetRuleIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RuleId, true +} + +// SetRuleId sets field value +func (o *ReprioritizeRuleRequest) SetRuleId(v string) { + o.RuleId = v +} + +// GetAfterRuleId returns the AfterRuleId field value if set, zero value otherwise. +func (o *ReprioritizeRuleRequest) GetAfterRuleId() string { + if o == nil || IsNil(o.AfterRuleId) { + var ret string + return ret + } + return *o.AfterRuleId +} + +// GetAfterRuleIdOk returns a tuple with the AfterRuleId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ReprioritizeRuleRequest) GetAfterRuleIdOk() (*string, bool) { + if o == nil || IsNil(o.AfterRuleId) { + return nil, false + } + return o.AfterRuleId, true +} + +// HasAfterRuleId returns a boolean if a field has been set. +func (o *ReprioritizeRuleRequest) HasAfterRuleId() bool { + if o != nil && !IsNil(o.AfterRuleId) { + return true + } + + return false +} + +// SetAfterRuleId gets a reference to the given string and assigns it to the AfterRuleId field. +func (o *ReprioritizeRuleRequest) SetAfterRuleId(v string) { + o.AfterRuleId = &v +} + +// GetBeforeRuleId returns the BeforeRuleId field value if set, zero value otherwise. +func (o *ReprioritizeRuleRequest) GetBeforeRuleId() string { + if o == nil || IsNil(o.BeforeRuleId) { + var ret string + return ret + } + return *o.BeforeRuleId +} + +// GetBeforeRuleIdOk returns a tuple with the BeforeRuleId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ReprioritizeRuleRequest) GetBeforeRuleIdOk() (*string, bool) { + if o == nil || IsNil(o.BeforeRuleId) { + return nil, false + } + return o.BeforeRuleId, true +} + +// HasBeforeRuleId returns a boolean if a field has been set. +func (o *ReprioritizeRuleRequest) HasBeforeRuleId() bool { + if o != nil && !IsNil(o.BeforeRuleId) { + return true + } + + return false +} + +// SetBeforeRuleId gets a reference to the given string and assigns it to the BeforeRuleId field. +func (o *ReprioritizeRuleRequest) SetBeforeRuleId(v string) { + o.BeforeRuleId = &v +} + +func (o ReprioritizeRuleRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ReprioritizeRuleRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["rule_id"] = o.RuleId + if !IsNil(o.AfterRuleId) { + toSerialize["after_rule_id"] = o.AfterRuleId + } + if !IsNil(o.BeforeRuleId) { + toSerialize["before_rule_id"] = o.BeforeRuleId + } + return toSerialize, nil +} + +type NullableReprioritizeRuleRequest struct { + value *ReprioritizeRuleRequest + isSet bool +} + +func (v NullableReprioritizeRuleRequest) Get() *ReprioritizeRuleRequest { + return v.value +} + +func (v *NullableReprioritizeRuleRequest) Set(val *ReprioritizeRuleRequest) { + v.value = val + v.isSet = true +} + +func (v NullableReprioritizeRuleRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableReprioritizeRuleRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableReprioritizeRuleRequest(val *ReprioritizeRuleRequest) *NullableReprioritizeRuleRequest { + return &NullableReprioritizeRuleRequest{value: val, isSet: true} +} + +func (v NullableReprioritizeRuleRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableReprioritizeRuleRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_response_time.go b/model_response_time.go new file mode 100644 index 0000000..c123dff --- /dev/null +++ b/model_response_time.go @@ -0,0 +1,162 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the ResponseTime type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseTime{} + +// ResponseTime struct for ResponseTime +type ResponseTime struct { + Statistics *ResponseTimeStatistics `json:"statistics,omitempty"` + Charts *ResponseTimeCharts `json:"charts,omitempty"` +} + +// NewResponseTime instantiates a new ResponseTime object +// This constructor will assign default values to properties that have it defined, +// 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 NewResponseTime() *ResponseTime { + this := ResponseTime{} + return &this +} + +// NewResponseTimeWithDefaults instantiates a new ResponseTime object +// This 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 NewResponseTimeWithDefaults() *ResponseTime { + this := ResponseTime{} + return &this +} + +// GetStatistics returns the Statistics field value if set, zero value otherwise. +func (o *ResponseTime) GetStatistics() ResponseTimeStatistics { + if o == nil || IsNil(o.Statistics) { + var ret ResponseTimeStatistics + return ret + } + return *o.Statistics +} + +// GetStatisticsOk returns a tuple with the Statistics field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponseTime) GetStatisticsOk() (*ResponseTimeStatistics, bool) { + if o == nil || IsNil(o.Statistics) { + return nil, false + } + return o.Statistics, true +} + +// HasStatistics returns a boolean if a field has been set. +func (o *ResponseTime) HasStatistics() bool { + if o != nil && !IsNil(o.Statistics) { + return true + } + + return false +} + +// SetStatistics gets a reference to the given ResponseTimeStatistics and assigns it to the Statistics field. +func (o *ResponseTime) SetStatistics(v ResponseTimeStatistics) { + o.Statistics = &v +} + +// GetCharts returns the Charts field value if set, zero value otherwise. +func (o *ResponseTime) GetCharts() ResponseTimeCharts { + if o == nil || IsNil(o.Charts) { + var ret ResponseTimeCharts + return ret + } + return *o.Charts +} + +// GetChartsOk returns a tuple with the Charts field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponseTime) GetChartsOk() (*ResponseTimeCharts, bool) { + if o == nil || IsNil(o.Charts) { + return nil, false + } + return o.Charts, true +} + +// HasCharts returns a boolean if a field has been set. +func (o *ResponseTime) HasCharts() bool { + if o != nil && !IsNil(o.Charts) { + return true + } + + return false +} + +// SetCharts gets a reference to the given ResponseTimeCharts and assigns it to the Charts field. +func (o *ResponseTime) SetCharts(v ResponseTimeCharts) { + o.Charts = &v +} + +func (o ResponseTime) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseTime) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Statistics) { + toSerialize["statistics"] = o.Statistics + } + if !IsNil(o.Charts) { + toSerialize["charts"] = o.Charts + } + return toSerialize, nil +} + +type NullableResponseTime struct { + value *ResponseTime + isSet bool +} + +func (v NullableResponseTime) Get() *ResponseTime { + return v.value +} + +func (v *NullableResponseTime) Set(val *ResponseTime) { + v.value = val + v.isSet = true +} + +func (v NullableResponseTime) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseTime) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseTime(val *ResponseTime) *NullableResponseTime { + return &NullableResponseTime{value: val, isSet: true} +} + +func (v NullableResponseTime) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseTime) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_response_time_charts.go b/model_response_time_charts.go new file mode 100644 index 0000000..2b49e51 --- /dev/null +++ b/model_response_time_charts.go @@ -0,0 +1,126 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the ResponseTimeCharts type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseTimeCharts{} + +// ResponseTimeCharts struct for ResponseTimeCharts +type ResponseTimeCharts struct { + Ir *ResponseTimeChartsIr `json:"ir,omitempty"` +} + +// NewResponseTimeCharts instantiates a new ResponseTimeCharts object +// This constructor will assign default values to properties that have it defined, +// 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 NewResponseTimeCharts() *ResponseTimeCharts { + this := ResponseTimeCharts{} + return &this +} + +// NewResponseTimeChartsWithDefaults instantiates a new ResponseTimeCharts object +// This 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 NewResponseTimeChartsWithDefaults() *ResponseTimeCharts { + this := ResponseTimeCharts{} + return &this +} + +// GetIr returns the Ir field value if set, zero value otherwise. +func (o *ResponseTimeCharts) GetIr() ResponseTimeChartsIr { + if o == nil || IsNil(o.Ir) { + var ret ResponseTimeChartsIr + return ret + } + return *o.Ir +} + +// GetIrOk returns a tuple with the Ir field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponseTimeCharts) GetIrOk() (*ResponseTimeChartsIr, bool) { + if o == nil || IsNil(o.Ir) { + return nil, false + } + return o.Ir, true +} + +// HasIr returns a boolean if a field has been set. +func (o *ResponseTimeCharts) HasIr() bool { + if o != nil && !IsNil(o.Ir) { + return true + } + + return false +} + +// SetIr gets a reference to the given ResponseTimeChartsIr and assigns it to the Ir field. +func (o *ResponseTimeCharts) SetIr(v ResponseTimeChartsIr) { + o.Ir = &v +} + +func (o ResponseTimeCharts) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseTimeCharts) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Ir) { + toSerialize["ir"] = o.Ir + } + return toSerialize, nil +} + +type NullableResponseTimeCharts struct { + value *ResponseTimeCharts + isSet bool +} + +func (v NullableResponseTimeCharts) Get() *ResponseTimeCharts { + return v.value +} + +func (v *NullableResponseTimeCharts) Set(val *ResponseTimeCharts) { + v.value = val + v.isSet = true +} + +func (v NullableResponseTimeCharts) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseTimeCharts) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseTimeCharts(val *ResponseTimeCharts) *NullableResponseTimeCharts { + return &NullableResponseTimeCharts{value: val, isSet: true} +} + +func (v NullableResponseTimeCharts) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseTimeCharts) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_response_time_charts_ir.go b/model_response_time_charts_ir.go new file mode 100644 index 0000000..a724dc8 --- /dev/null +++ b/model_response_time_charts_ir.go @@ -0,0 +1,199 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" + "time" +) + +// checks if the ResponseTimeChartsIr type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseTimeChartsIr{} + +// ResponseTimeChartsIr struct for ResponseTimeChartsIr +type ResponseTimeChartsIr struct { + Title *string `json:"title,omitempty"` + Categories []time.Time `json:"categories,omitempty"` + Series []ResponseTimeChartsIrSeriesInner `json:"series,omitempty"` +} + +// NewResponseTimeChartsIr instantiates a new ResponseTimeChartsIr object +// This constructor will assign default values to properties that have it defined, +// 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 NewResponseTimeChartsIr() *ResponseTimeChartsIr { + this := ResponseTimeChartsIr{} + return &this +} + +// NewResponseTimeChartsIrWithDefaults instantiates a new ResponseTimeChartsIr object +// This 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 NewResponseTimeChartsIrWithDefaults() *ResponseTimeChartsIr { + this := ResponseTimeChartsIr{} + return &this +} + +// GetTitle returns the Title field value if set, zero value otherwise. +func (o *ResponseTimeChartsIr) 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 *ResponseTimeChartsIr) 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 *ResponseTimeChartsIr) 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 *ResponseTimeChartsIr) SetTitle(v string) { + o.Title = &v +} + +// GetCategories returns the Categories field value if set, zero value otherwise. +func (o *ResponseTimeChartsIr) GetCategories() []time.Time { + if o == nil || IsNil(o.Categories) { + var ret []time.Time + return ret + } + return o.Categories +} + +// GetCategoriesOk returns a tuple with the Categories field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponseTimeChartsIr) GetCategoriesOk() ([]time.Time, bool) { + if o == nil || IsNil(o.Categories) { + return nil, false + } + return o.Categories, true +} + +// HasCategories returns a boolean if a field has been set. +func (o *ResponseTimeChartsIr) HasCategories() bool { + if o != nil && !IsNil(o.Categories) { + return true + } + + return false +} + +// SetCategories gets a reference to the given []time.Time and assigns it to the Categories field. +func (o *ResponseTimeChartsIr) SetCategories(v []time.Time) { + o.Categories = v +} + +// GetSeries returns the Series field value if set, zero value otherwise. +func (o *ResponseTimeChartsIr) GetSeries() []ResponseTimeChartsIrSeriesInner { + if o == nil || IsNil(o.Series) { + var ret []ResponseTimeChartsIrSeriesInner + return ret + } + return o.Series +} + +// GetSeriesOk returns a tuple with the Series field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponseTimeChartsIr) GetSeriesOk() ([]ResponseTimeChartsIrSeriesInner, bool) { + if o == nil || IsNil(o.Series) { + return nil, false + } + return o.Series, true +} + +// HasSeries returns a boolean if a field has been set. +func (o *ResponseTimeChartsIr) HasSeries() bool { + if o != nil && !IsNil(o.Series) { + return true + } + + return false +} + +// SetSeries gets a reference to the given []ResponseTimeChartsIrSeriesInner and assigns it to the Series field. +func (o *ResponseTimeChartsIr) SetSeries(v []ResponseTimeChartsIrSeriesInner) { + o.Series = v +} + +func (o ResponseTimeChartsIr) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseTimeChartsIr) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Title) { + toSerialize["title"] = o.Title + } + if !IsNil(o.Categories) { + toSerialize["categories"] = o.Categories + } + if !IsNil(o.Series) { + toSerialize["series"] = o.Series + } + return toSerialize, nil +} + +type NullableResponseTimeChartsIr struct { + value *ResponseTimeChartsIr + isSet bool +} + +func (v NullableResponseTimeChartsIr) Get() *ResponseTimeChartsIr { + return v.value +} + +func (v *NullableResponseTimeChartsIr) Set(val *ResponseTimeChartsIr) { + v.value = val + v.isSet = true +} + +func (v NullableResponseTimeChartsIr) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseTimeChartsIr) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseTimeChartsIr(val *ResponseTimeChartsIr) *NullableResponseTimeChartsIr { + return &NullableResponseTimeChartsIr{value: val, isSet: true} +} + +func (v NullableResponseTimeChartsIr) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseTimeChartsIr) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_response_time_charts_ir_series_inner.go b/model_response_time_charts_ir_series_inner.go new file mode 100644 index 0000000..eba8815 --- /dev/null +++ b/model_response_time_charts_ir_series_inner.go @@ -0,0 +1,162 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the ResponseTimeChartsIrSeriesInner type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseTimeChartsIrSeriesInner{} + +// ResponseTimeChartsIrSeriesInner struct for ResponseTimeChartsIrSeriesInner +type ResponseTimeChartsIrSeriesInner struct { + Name *string `json:"name,omitempty"` + Data []int32 `json:"data,omitempty"` +} + +// NewResponseTimeChartsIrSeriesInner instantiates a new ResponseTimeChartsIrSeriesInner object +// This constructor will assign default values to properties that have it defined, +// 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 NewResponseTimeChartsIrSeriesInner() *ResponseTimeChartsIrSeriesInner { + this := ResponseTimeChartsIrSeriesInner{} + return &this +} + +// NewResponseTimeChartsIrSeriesInnerWithDefaults instantiates a new ResponseTimeChartsIrSeriesInner object +// This 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 NewResponseTimeChartsIrSeriesInnerWithDefaults() *ResponseTimeChartsIrSeriesInner { + this := ResponseTimeChartsIrSeriesInner{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *ResponseTimeChartsIrSeriesInner) 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 *ResponseTimeChartsIrSeriesInner) 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 *ResponseTimeChartsIrSeriesInner) 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 *ResponseTimeChartsIrSeriesInner) SetName(v string) { + o.Name = &v +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *ResponseTimeChartsIrSeriesInner) GetData() []int32 { + if o == nil || IsNil(o.Data) { + var ret []int32 + return ret + } + return o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponseTimeChartsIrSeriesInner) GetDataOk() ([]int32, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *ResponseTimeChartsIrSeriesInner) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given []int32 and assigns it to the Data field. +func (o *ResponseTimeChartsIrSeriesInner) SetData(v []int32) { + o.Data = v +} + +func (o ResponseTimeChartsIrSeriesInner) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseTimeChartsIrSeriesInner) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + return toSerialize, nil +} + +type NullableResponseTimeChartsIrSeriesInner struct { + value *ResponseTimeChartsIrSeriesInner + isSet bool +} + +func (v NullableResponseTimeChartsIrSeriesInner) Get() *ResponseTimeChartsIrSeriesInner { + return v.value +} + +func (v *NullableResponseTimeChartsIrSeriesInner) Set(val *ResponseTimeChartsIrSeriesInner) { + v.value = val + v.isSet = true +} + +func (v NullableResponseTimeChartsIrSeriesInner) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseTimeChartsIrSeriesInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseTimeChartsIrSeriesInner(val *ResponseTimeChartsIrSeriesInner) *NullableResponseTimeChartsIrSeriesInner { + return &NullableResponseTimeChartsIrSeriesInner{value: val, isSet: true} +} + +func (v NullableResponseTimeChartsIrSeriesInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseTimeChartsIrSeriesInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_response_time_data.go b/model_response_time_data.go new file mode 100644 index 0000000..c98cf9f --- /dev/null +++ b/model_response_time_data.go @@ -0,0 +1,126 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the ResponseTimeData type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseTimeData{} + +// ResponseTimeData struct for ResponseTimeData +type ResponseTimeData struct { + Data *ResponseTime `json:"data,omitempty"` +} + +// NewResponseTimeData instantiates a new ResponseTimeData object +// This constructor will assign default values to properties that have it defined, +// 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 NewResponseTimeData() *ResponseTimeData { + this := ResponseTimeData{} + return &this +} + +// NewResponseTimeDataWithDefaults instantiates a new ResponseTimeData object +// This 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 NewResponseTimeDataWithDefaults() *ResponseTimeData { + this := ResponseTimeData{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *ResponseTimeData) GetData() ResponseTime { + if o == nil || IsNil(o.Data) { + var ret ResponseTime + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponseTimeData) GetDataOk() (*ResponseTime, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *ResponseTimeData) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given ResponseTime and assigns it to the Data field. +func (o *ResponseTimeData) SetData(v ResponseTime) { + o.Data = &v +} + +func (o ResponseTimeData) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseTimeData) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + return toSerialize, nil +} + +type NullableResponseTimeData struct { + value *ResponseTimeData + isSet bool +} + +func (v NullableResponseTimeData) Get() *ResponseTimeData { + return v.value +} + +func (v *NullableResponseTimeData) Set(val *ResponseTimeData) { + v.value = val + v.isSet = true +} + +func (v NullableResponseTimeData) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseTimeData) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseTimeData(val *ResponseTimeData) *NullableResponseTimeData { + return &NullableResponseTimeData{value: val, isSet: true} +} + +func (v NullableResponseTimeData) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseTimeData) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_response_time_statistics.go b/model_response_time_statistics.go new file mode 100644 index 0000000..546874b --- /dev/null +++ b/model_response_time_statistics.go @@ -0,0 +1,127 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the ResponseTimeStatistics type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseTimeStatistics{} + +// ResponseTimeStatistics struct for ResponseTimeStatistics +type ResponseTimeStatistics struct { + ResponseTime interface{} `json:"response_time,omitempty"` +} + +// NewResponseTimeStatistics instantiates a new ResponseTimeStatistics object +// This constructor will assign default values to properties that have it defined, +// 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 NewResponseTimeStatistics() *ResponseTimeStatistics { + this := ResponseTimeStatistics{} + return &this +} + +// NewResponseTimeStatisticsWithDefaults instantiates a new ResponseTimeStatistics object +// This 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 NewResponseTimeStatisticsWithDefaults() *ResponseTimeStatistics { + this := ResponseTimeStatistics{} + return &this +} + +// GetResponseTime returns the ResponseTime field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ResponseTimeStatistics) GetResponseTime() interface{} { + if o == nil { + var ret interface{} + return ret + } + return o.ResponseTime +} + +// GetResponseTimeOk returns a tuple with the ResponseTime 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 *ResponseTimeStatistics) GetResponseTimeOk() (*interface{}, bool) { + if o == nil || IsNil(o.ResponseTime) { + return nil, false + } + return &o.ResponseTime, true +} + +// HasResponseTime returns a boolean if a field has been set. +func (o *ResponseTimeStatistics) HasResponseTime() bool { + if o != nil && IsNil(o.ResponseTime) { + return true + } + + return false +} + +// SetResponseTime gets a reference to the given interface{} and assigns it to the ResponseTime field. +func (o *ResponseTimeStatistics) SetResponseTime(v interface{}) { + o.ResponseTime = v +} + +func (o ResponseTimeStatistics) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseTimeStatistics) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.ResponseTime != nil { + toSerialize["response_time"] = o.ResponseTime + } + return toSerialize, nil +} + +type NullableResponseTimeStatistics struct { + value *ResponseTimeStatistics + isSet bool +} + +func (v NullableResponseTimeStatistics) Get() *ResponseTimeStatistics { + return v.value +} + +func (v *NullableResponseTimeStatistics) Set(val *ResponseTimeStatistics) { + v.value = val + v.isSet = true +} + +func (v NullableResponseTimeStatistics) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseTimeStatistics) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseTimeStatistics(val *ResponseTimeStatistics) *NullableResponseTimeStatistics { + return &NullableResponseTimeStatistics{value: val, isSet: true} +} + +func (v NullableResponseTimeStatistics) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseTimeStatistics) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_saved_traffics_charts.go b/model_saved_traffics_charts.go new file mode 100644 index 0000000..5b54f40 --- /dev/null +++ b/model_saved_traffics_charts.go @@ -0,0 +1,162 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the SavedTrafficsCharts type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SavedTrafficsCharts{} + +// SavedTrafficsCharts struct for SavedTrafficsCharts +type SavedTrafficsCharts struct { + Request []SavedTrafficsChartsRequestInner `json:"request,omitempty"` + Traffic []SavedTrafficsChartsTrafficInner `json:"traffic,omitempty"` +} + +// NewSavedTrafficsCharts instantiates a new SavedTrafficsCharts object +// This constructor will assign default values to properties that have it defined, +// 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 NewSavedTrafficsCharts() *SavedTrafficsCharts { + this := SavedTrafficsCharts{} + return &this +} + +// NewSavedTrafficsChartsWithDefaults instantiates a new SavedTrafficsCharts object +// This 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 NewSavedTrafficsChartsWithDefaults() *SavedTrafficsCharts { + this := SavedTrafficsCharts{} + return &this +} + +// GetRequest returns the Request field value if set, zero value otherwise. +func (o *SavedTrafficsCharts) GetRequest() []SavedTrafficsChartsRequestInner { + if o == nil || IsNil(o.Request) { + var ret []SavedTrafficsChartsRequestInner + return ret + } + return o.Request +} + +// GetRequestOk returns a tuple with the Request field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SavedTrafficsCharts) GetRequestOk() ([]SavedTrafficsChartsRequestInner, bool) { + if o == nil || IsNil(o.Request) { + return nil, false + } + return o.Request, true +} + +// HasRequest returns a boolean if a field has been set. +func (o *SavedTrafficsCharts) HasRequest() bool { + if o != nil && !IsNil(o.Request) { + return true + } + + return false +} + +// SetRequest gets a reference to the given []SavedTrafficsChartsRequestInner and assigns it to the Request field. +func (o *SavedTrafficsCharts) SetRequest(v []SavedTrafficsChartsRequestInner) { + o.Request = v +} + +// GetTraffic returns the Traffic field value if set, zero value otherwise. +func (o *SavedTrafficsCharts) GetTraffic() []SavedTrafficsChartsTrafficInner { + if o == nil || IsNil(o.Traffic) { + var ret []SavedTrafficsChartsTrafficInner + return ret + } + return o.Traffic +} + +// GetTrafficOk returns a tuple with the Traffic field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SavedTrafficsCharts) GetTrafficOk() ([]SavedTrafficsChartsTrafficInner, bool) { + if o == nil || IsNil(o.Traffic) { + return nil, false + } + return o.Traffic, true +} + +// HasTraffic returns a boolean if a field has been set. +func (o *SavedTrafficsCharts) HasTraffic() bool { + if o != nil && !IsNil(o.Traffic) { + return true + } + + return false +} + +// SetTraffic gets a reference to the given []SavedTrafficsChartsTrafficInner and assigns it to the Traffic field. +func (o *SavedTrafficsCharts) SetTraffic(v []SavedTrafficsChartsTrafficInner) { + o.Traffic = v +} + +func (o SavedTrafficsCharts) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SavedTrafficsCharts) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Request) { + toSerialize["request"] = o.Request + } + if !IsNil(o.Traffic) { + toSerialize["traffic"] = o.Traffic + } + return toSerialize, nil +} + +type NullableSavedTrafficsCharts struct { + value *SavedTrafficsCharts + isSet bool +} + +func (v NullableSavedTrafficsCharts) Get() *SavedTrafficsCharts { + return v.value +} + +func (v *NullableSavedTrafficsCharts) Set(val *SavedTrafficsCharts) { + v.value = val + v.isSet = true +} + +func (v NullableSavedTrafficsCharts) IsSet() bool { + return v.isSet +} + +func (v *NullableSavedTrafficsCharts) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSavedTrafficsCharts(val *SavedTrafficsCharts) *NullableSavedTrafficsCharts { + return &NullableSavedTrafficsCharts{value: val, isSet: true} +} + +func (v NullableSavedTrafficsCharts) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSavedTrafficsCharts) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_saved_traffics_charts_request_inner.go b/model_saved_traffics_charts_request_inner.go new file mode 100644 index 0000000..de550e6 --- /dev/null +++ b/model_saved_traffics_charts_request_inner.go @@ -0,0 +1,162 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the SavedTrafficsChartsRequestInner type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SavedTrafficsChartsRequestInner{} + +// SavedTrafficsChartsRequestInner struct for SavedTrafficsChartsRequestInner +type SavedTrafficsChartsRequestInner struct { + Name *string `json:"name,omitempty"` + Y *int32 `json:"y,omitempty"` +} + +// NewSavedTrafficsChartsRequestInner instantiates a new SavedTrafficsChartsRequestInner object +// This constructor will assign default values to properties that have it defined, +// 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 NewSavedTrafficsChartsRequestInner() *SavedTrafficsChartsRequestInner { + this := SavedTrafficsChartsRequestInner{} + return &this +} + +// NewSavedTrafficsChartsRequestInnerWithDefaults instantiates a new SavedTrafficsChartsRequestInner object +// This 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 NewSavedTrafficsChartsRequestInnerWithDefaults() *SavedTrafficsChartsRequestInner { + this := SavedTrafficsChartsRequestInner{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *SavedTrafficsChartsRequestInner) 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 *SavedTrafficsChartsRequestInner) 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 *SavedTrafficsChartsRequestInner) 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 *SavedTrafficsChartsRequestInner) SetName(v string) { + o.Name = &v +} + +// GetY returns the Y field value if set, zero value otherwise. +func (o *SavedTrafficsChartsRequestInner) GetY() int32 { + if o == nil || IsNil(o.Y) { + var ret int32 + return ret + } + return *o.Y +} + +// GetYOk returns a tuple with the Y field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SavedTrafficsChartsRequestInner) GetYOk() (*int32, bool) { + if o == nil || IsNil(o.Y) { + return nil, false + } + return o.Y, true +} + +// HasY returns a boolean if a field has been set. +func (o *SavedTrafficsChartsRequestInner) HasY() bool { + if o != nil && !IsNil(o.Y) { + return true + } + + return false +} + +// SetY gets a reference to the given int32 and assigns it to the Y field. +func (o *SavedTrafficsChartsRequestInner) SetY(v int32) { + o.Y = &v +} + +func (o SavedTrafficsChartsRequestInner) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SavedTrafficsChartsRequestInner) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Y) { + toSerialize["y"] = o.Y + } + return toSerialize, nil +} + +type NullableSavedTrafficsChartsRequestInner struct { + value *SavedTrafficsChartsRequestInner + isSet bool +} + +func (v NullableSavedTrafficsChartsRequestInner) Get() *SavedTrafficsChartsRequestInner { + return v.value +} + +func (v *NullableSavedTrafficsChartsRequestInner) Set(val *SavedTrafficsChartsRequestInner) { + v.value = val + v.isSet = true +} + +func (v NullableSavedTrafficsChartsRequestInner) IsSet() bool { + return v.isSet +} + +func (v *NullableSavedTrafficsChartsRequestInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSavedTrafficsChartsRequestInner(val *SavedTrafficsChartsRequestInner) *NullableSavedTrafficsChartsRequestInner { + return &NullableSavedTrafficsChartsRequestInner{value: val, isSet: true} +} + +func (v NullableSavedTrafficsChartsRequestInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSavedTrafficsChartsRequestInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_saved_traffics_charts_traffic_inner.go b/model_saved_traffics_charts_traffic_inner.go new file mode 100644 index 0000000..7dba920 --- /dev/null +++ b/model_saved_traffics_charts_traffic_inner.go @@ -0,0 +1,162 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the SavedTrafficsChartsTrafficInner type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SavedTrafficsChartsTrafficInner{} + +// SavedTrafficsChartsTrafficInner struct for SavedTrafficsChartsTrafficInner +type SavedTrafficsChartsTrafficInner struct { + Name *string `json:"name,omitempty"` + Y *int32 `json:"y,omitempty"` +} + +// NewSavedTrafficsChartsTrafficInner instantiates a new SavedTrafficsChartsTrafficInner object +// This constructor will assign default values to properties that have it defined, +// 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 NewSavedTrafficsChartsTrafficInner() *SavedTrafficsChartsTrafficInner { + this := SavedTrafficsChartsTrafficInner{} + return &this +} + +// NewSavedTrafficsChartsTrafficInnerWithDefaults instantiates a new SavedTrafficsChartsTrafficInner object +// This 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 NewSavedTrafficsChartsTrafficInnerWithDefaults() *SavedTrafficsChartsTrafficInner { + this := SavedTrafficsChartsTrafficInner{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *SavedTrafficsChartsTrafficInner) 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 *SavedTrafficsChartsTrafficInner) 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 *SavedTrafficsChartsTrafficInner) 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 *SavedTrafficsChartsTrafficInner) SetName(v string) { + o.Name = &v +} + +// GetY returns the Y field value if set, zero value otherwise. +func (o *SavedTrafficsChartsTrafficInner) GetY() int32 { + if o == nil || IsNil(o.Y) { + var ret int32 + return ret + } + return *o.Y +} + +// GetYOk returns a tuple with the Y field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SavedTrafficsChartsTrafficInner) GetYOk() (*int32, bool) { + if o == nil || IsNil(o.Y) { + return nil, false + } + return o.Y, true +} + +// HasY returns a boolean if a field has been set. +func (o *SavedTrafficsChartsTrafficInner) HasY() bool { + if o != nil && !IsNil(o.Y) { + return true + } + + return false +} + +// SetY gets a reference to the given int32 and assigns it to the Y field. +func (o *SavedTrafficsChartsTrafficInner) SetY(v int32) { + o.Y = &v +} + +func (o SavedTrafficsChartsTrafficInner) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SavedTrafficsChartsTrafficInner) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Y) { + toSerialize["y"] = o.Y + } + return toSerialize, nil +} + +type NullableSavedTrafficsChartsTrafficInner struct { + value *SavedTrafficsChartsTrafficInner + isSet bool +} + +func (v NullableSavedTrafficsChartsTrafficInner) Get() *SavedTrafficsChartsTrafficInner { + return v.value +} + +func (v *NullableSavedTrafficsChartsTrafficInner) Set(val *SavedTrafficsChartsTrafficInner) { + v.value = val + v.isSet = true +} + +func (v NullableSavedTrafficsChartsTrafficInner) IsSet() bool { + return v.isSet +} + +func (v *NullableSavedTrafficsChartsTrafficInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSavedTrafficsChartsTrafficInner(val *SavedTrafficsChartsTrafficInner) *NullableSavedTrafficsChartsTrafficInner { + return &NullableSavedTrafficsChartsTrafficInner{value: val, isSet: true} +} + +func (v NullableSavedTrafficsChartsTrafficInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSavedTrafficsChartsTrafficInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_saved_traffics_data.go b/model_saved_traffics_data.go new file mode 100644 index 0000000..08c55bb --- /dev/null +++ b/model_saved_traffics_data.go @@ -0,0 +1,126 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the SavedTrafficsData type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SavedTrafficsData{} + +// SavedTrafficsData struct for SavedTrafficsData +type SavedTrafficsData struct { + Data *map[string]interface{} `json:"data,omitempty"` +} + +// NewSavedTrafficsData instantiates a new SavedTrafficsData object +// This constructor will assign default values to properties that have it defined, +// 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 NewSavedTrafficsData() *SavedTrafficsData { + this := SavedTrafficsData{} + return &this +} + +// NewSavedTrafficsDataWithDefaults instantiates a new SavedTrafficsData object +// This 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 NewSavedTrafficsDataWithDefaults() *SavedTrafficsData { + this := SavedTrafficsData{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *SavedTrafficsData) GetData() map[string]interface{} { + if o == nil || IsNil(o.Data) { + var ret map[string]interface{} + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SavedTrafficsData) GetDataOk() (*map[string]interface{}, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *SavedTrafficsData) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given map[string]interface{} and assigns it to the Data field. +func (o *SavedTrafficsData) SetData(v map[string]interface{}) { + o.Data = &v +} + +func (o SavedTrafficsData) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SavedTrafficsData) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + return toSerialize, nil +} + +type NullableSavedTrafficsData struct { + value *SavedTrafficsData + isSet bool +} + +func (v NullableSavedTrafficsData) Get() *SavedTrafficsData { + return v.value +} + +func (v *NullableSavedTrafficsData) Set(val *SavedTrafficsData) { + v.value = val + v.isSet = true +} + +func (v NullableSavedTrafficsData) IsSet() bool { + return v.isSet +} + +func (v *NullableSavedTrafficsData) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSavedTrafficsData(val *SavedTrafficsData) *NullableSavedTrafficsData { + return &NullableSavedTrafficsData{value: val, isSet: true} +} + +func (v NullableSavedTrafficsData) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSavedTrafficsData) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_saved_traffics_statistics.go b/model_saved_traffics_statistics.go new file mode 100644 index 0000000..f33b27d --- /dev/null +++ b/model_saved_traffics_statistics.go @@ -0,0 +1,162 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the SavedTrafficsStatistics type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SavedTrafficsStatistics{} + +// SavedTrafficsStatistics struct for SavedTrafficsStatistics +type SavedTrafficsStatistics struct { + Traffic *SavedTrafficsStatisticsTraffic `json:"traffic,omitempty"` + Request *SavedTrafficsStatisticsTraffic `json:"request,omitempty"` +} + +// NewSavedTrafficsStatistics instantiates a new SavedTrafficsStatistics object +// This constructor will assign default values to properties that have it defined, +// 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 NewSavedTrafficsStatistics() *SavedTrafficsStatistics { + this := SavedTrafficsStatistics{} + return &this +} + +// NewSavedTrafficsStatisticsWithDefaults instantiates a new SavedTrafficsStatistics object +// This 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 NewSavedTrafficsStatisticsWithDefaults() *SavedTrafficsStatistics { + this := SavedTrafficsStatistics{} + return &this +} + +// GetTraffic returns the Traffic field value if set, zero value otherwise. +func (o *SavedTrafficsStatistics) GetTraffic() SavedTrafficsStatisticsTraffic { + if o == nil || IsNil(o.Traffic) { + var ret SavedTrafficsStatisticsTraffic + return ret + } + return *o.Traffic +} + +// GetTrafficOk returns a tuple with the Traffic field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SavedTrafficsStatistics) GetTrafficOk() (*SavedTrafficsStatisticsTraffic, bool) { + if o == nil || IsNil(o.Traffic) { + return nil, false + } + return o.Traffic, true +} + +// HasTraffic returns a boolean if a field has been set. +func (o *SavedTrafficsStatistics) HasTraffic() bool { + if o != nil && !IsNil(o.Traffic) { + return true + } + + return false +} + +// SetTraffic gets a reference to the given SavedTrafficsStatisticsTraffic and assigns it to the Traffic field. +func (o *SavedTrafficsStatistics) SetTraffic(v SavedTrafficsStatisticsTraffic) { + o.Traffic = &v +} + +// GetRequest returns the Request field value if set, zero value otherwise. +func (o *SavedTrafficsStatistics) GetRequest() SavedTrafficsStatisticsTraffic { + if o == nil || IsNil(o.Request) { + var ret SavedTrafficsStatisticsTraffic + return ret + } + return *o.Request +} + +// GetRequestOk returns a tuple with the Request field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SavedTrafficsStatistics) GetRequestOk() (*SavedTrafficsStatisticsTraffic, bool) { + if o == nil || IsNil(o.Request) { + return nil, false + } + return o.Request, true +} + +// HasRequest returns a boolean if a field has been set. +func (o *SavedTrafficsStatistics) HasRequest() bool { + if o != nil && !IsNil(o.Request) { + return true + } + + return false +} + +// SetRequest gets a reference to the given SavedTrafficsStatisticsTraffic and assigns it to the Request field. +func (o *SavedTrafficsStatistics) SetRequest(v SavedTrafficsStatisticsTraffic) { + o.Request = &v +} + +func (o SavedTrafficsStatistics) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SavedTrafficsStatistics) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Traffic) { + toSerialize["traffic"] = o.Traffic + } + if !IsNil(o.Request) { + toSerialize["request"] = o.Request + } + return toSerialize, nil +} + +type NullableSavedTrafficsStatistics struct { + value *SavedTrafficsStatistics + isSet bool +} + +func (v NullableSavedTrafficsStatistics) Get() *SavedTrafficsStatistics { + return v.value +} + +func (v *NullableSavedTrafficsStatistics) Set(val *SavedTrafficsStatistics) { + v.value = val + v.isSet = true +} + +func (v NullableSavedTrafficsStatistics) IsSet() bool { + return v.isSet +} + +func (v *NullableSavedTrafficsStatistics) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSavedTrafficsStatistics(val *SavedTrafficsStatistics) *NullableSavedTrafficsStatistics { + return &NullableSavedTrafficsStatistics{value: val, isSet: true} +} + +func (v NullableSavedTrafficsStatistics) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSavedTrafficsStatistics) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_saved_traffics_statistics_traffic.go b/model_saved_traffics_statistics_traffic.go new file mode 100644 index 0000000..9193827 --- /dev/null +++ b/model_saved_traffics_statistics_traffic.go @@ -0,0 +1,162 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the SavedTrafficsStatisticsTraffic type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SavedTrafficsStatisticsTraffic{} + +// SavedTrafficsStatisticsTraffic struct for SavedTrafficsStatisticsTraffic +type SavedTrafficsStatisticsTraffic struct { + Saved *int32 `json:"saved,omitempty"` + Total *int32 `json:"total,omitempty"` +} + +// NewSavedTrafficsStatisticsTraffic instantiates a new SavedTrafficsStatisticsTraffic object +// This constructor will assign default values to properties that have it defined, +// 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 NewSavedTrafficsStatisticsTraffic() *SavedTrafficsStatisticsTraffic { + this := SavedTrafficsStatisticsTraffic{} + return &this +} + +// NewSavedTrafficsStatisticsTrafficWithDefaults instantiates a new SavedTrafficsStatisticsTraffic object +// This 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 NewSavedTrafficsStatisticsTrafficWithDefaults() *SavedTrafficsStatisticsTraffic { + this := SavedTrafficsStatisticsTraffic{} + return &this +} + +// GetSaved returns the Saved field value if set, zero value otherwise. +func (o *SavedTrafficsStatisticsTraffic) GetSaved() int32 { + if o == nil || IsNil(o.Saved) { + var ret int32 + return ret + } + return *o.Saved +} + +// GetSavedOk returns a tuple with the Saved field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SavedTrafficsStatisticsTraffic) GetSavedOk() (*int32, bool) { + if o == nil || IsNil(o.Saved) { + return nil, false + } + return o.Saved, true +} + +// HasSaved returns a boolean if a field has been set. +func (o *SavedTrafficsStatisticsTraffic) HasSaved() bool { + if o != nil && !IsNil(o.Saved) { + return true + } + + return false +} + +// SetSaved gets a reference to the given int32 and assigns it to the Saved field. +func (o *SavedTrafficsStatisticsTraffic) SetSaved(v int32) { + o.Saved = &v +} + +// GetTotal returns the Total field value if set, zero value otherwise. +func (o *SavedTrafficsStatisticsTraffic) GetTotal() int32 { + if o == nil || IsNil(o.Total) { + var ret int32 + return ret + } + return *o.Total +} + +// GetTotalOk returns a tuple with the Total field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SavedTrafficsStatisticsTraffic) GetTotalOk() (*int32, bool) { + if o == nil || IsNil(o.Total) { + return nil, false + } + return o.Total, true +} + +// HasTotal returns a boolean if a field has been set. +func (o *SavedTrafficsStatisticsTraffic) HasTotal() bool { + if o != nil && !IsNil(o.Total) { + return true + } + + return false +} + +// SetTotal gets a reference to the given int32 and assigns it to the Total field. +func (o *SavedTrafficsStatisticsTraffic) SetTotal(v int32) { + o.Total = &v +} + +func (o SavedTrafficsStatisticsTraffic) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SavedTrafficsStatisticsTraffic) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Saved) { + toSerialize["saved"] = o.Saved + } + if !IsNil(o.Total) { + toSerialize["total"] = o.Total + } + return toSerialize, nil +} + +type NullableSavedTrafficsStatisticsTraffic struct { + value *SavedTrafficsStatisticsTraffic + isSet bool +} + +func (v NullableSavedTrafficsStatisticsTraffic) Get() *SavedTrafficsStatisticsTraffic { + return v.value +} + +func (v *NullableSavedTrafficsStatisticsTraffic) Set(val *SavedTrafficsStatisticsTraffic) { + v.value = val + v.isSet = true +} + +func (v NullableSavedTrafficsStatisticsTraffic) IsSet() bool { + return v.isSet +} + +func (v *NullableSavedTrafficsStatisticsTraffic) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSavedTrafficsStatisticsTraffic(val *SavedTrafficsStatisticsTraffic) *NullableSavedTrafficsStatisticsTraffic { + return &NullableSavedTrafficsStatisticsTraffic{value: val, isSet: true} +} + +func (v NullableSavedTrafficsStatisticsTraffic) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSavedTrafficsStatisticsTraffic) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_spf_record.go b/model_spf_record.go new file mode 100644 index 0000000..70ee434 --- /dev/null +++ b/model_spf_record.go @@ -0,0 +1,520 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" + "time" +) + +// checks if the SPFRecord type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SPFRecord{} + +// SPFRecord struct for SPFRecord +type SPFRecord struct { + Value *TXTRecordValue `json:"value,omitempty"` + Type *string `json:"type,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Ttl *int32 `json:"ttl,omitempty"` + Cloud *bool `json:"cloud,omitempty"` + UpstreamHttps *string `json:"upstream_https,omitempty"` + IpFilterMode *DnsRecordIpFilterMode `json:"ip_filter_mode,omitempty"` + // Protected records cannot be modified or deleted by user. + IsProtected *bool `json:"is_protected,omitempty"` + Usage []string `json:"usage,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty"` + UpdatedAt *time.Time `json:"updated_at,omitempty"` +} + +// NewSPFRecord instantiates a new SPFRecord object +// This constructor will assign default values to properties that have it defined, +// 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 NewSPFRecord() *SPFRecord { + this := SPFRecord{} + var cloud bool = false + this.Cloud = &cloud + return &this +} + +// NewSPFRecordWithDefaults instantiates a new SPFRecord object +// This 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 NewSPFRecordWithDefaults() *SPFRecord { + this := SPFRecord{} + var type_ string = "spf" + this.Type = &type_ + var cloud bool = false + this.Cloud = &cloud + return &this +} + +// GetValue returns the Value field value if set, zero value otherwise. +func (o *SPFRecord) GetValue() TXTRecordValue { + if o == nil || IsNil(o.Value) { + var ret TXTRecordValue + return ret + } + return *o.Value +} + +// GetValueOk returns a tuple with the Value field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SPFRecord) GetValueOk() (*TXTRecordValue, bool) { + if o == nil || IsNil(o.Value) { + return nil, false + } + return o.Value, true +} + +// HasValue returns a boolean if a field has been set. +func (o *SPFRecord) HasValue() bool { + if o != nil && !IsNil(o.Value) { + return true + } + + return false +} + +// SetValue gets a reference to the given TXTRecordValue and assigns it to the Value field. +func (o *SPFRecord) SetValue(v TXTRecordValue) { + o.Value = &v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *SPFRecord) 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 *SPFRecord) 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 *SPFRecord) 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 *SPFRecord) SetType(v string) { + o.Type = &v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *SPFRecord) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SPFRecord) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *SPFRecord) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *SPFRecord) SetId(v string) { + o.Id = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *SPFRecord) 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 *SPFRecord) 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 *SPFRecord) 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 *SPFRecord) SetName(v string) { + o.Name = &v +} + +// GetTtl returns the Ttl field value if set, zero value otherwise. +func (o *SPFRecord) GetTtl() int32 { + if o == nil || IsNil(o.Ttl) { + var ret int32 + return ret + } + return *o.Ttl +} + +// GetTtlOk returns a tuple with the Ttl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SPFRecord) GetTtlOk() (*int32, bool) { + if o == nil || IsNil(o.Ttl) { + return nil, false + } + return o.Ttl, true +} + +// HasTtl returns a boolean if a field has been set. +func (o *SPFRecord) HasTtl() bool { + if o != nil && !IsNil(o.Ttl) { + return true + } + + return false +} + +// SetTtl gets a reference to the given int32 and assigns it to the Ttl field. +func (o *SPFRecord) SetTtl(v int32) { + o.Ttl = &v +} + +// GetCloud returns the Cloud field value if set, zero value otherwise. +func (o *SPFRecord) GetCloud() bool { + if o == nil || IsNil(o.Cloud) { + var ret bool + return ret + } + return *o.Cloud +} + +// GetCloudOk returns a tuple with the Cloud field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SPFRecord) GetCloudOk() (*bool, bool) { + if o == nil || IsNil(o.Cloud) { + return nil, false + } + return o.Cloud, true +} + +// HasCloud returns a boolean if a field has been set. +func (o *SPFRecord) HasCloud() bool { + if o != nil && !IsNil(o.Cloud) { + return true + } + + return false +} + +// SetCloud gets a reference to the given bool and assigns it to the Cloud field. +func (o *SPFRecord) SetCloud(v bool) { + o.Cloud = &v +} + +// GetUpstreamHttps returns the UpstreamHttps field value if set, zero value otherwise. +func (o *SPFRecord) GetUpstreamHttps() string { + if o == nil || IsNil(o.UpstreamHttps) { + var ret string + return ret + } + return *o.UpstreamHttps +} + +// GetUpstreamHttpsOk returns a tuple with the UpstreamHttps field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SPFRecord) GetUpstreamHttpsOk() (*string, bool) { + if o == nil || IsNil(o.UpstreamHttps) { + return nil, false + } + return o.UpstreamHttps, true +} + +// HasUpstreamHttps returns a boolean if a field has been set. +func (o *SPFRecord) HasUpstreamHttps() bool { + if o != nil && !IsNil(o.UpstreamHttps) { + return true + } + + return false +} + +// SetUpstreamHttps gets a reference to the given string and assigns it to the UpstreamHttps field. +func (o *SPFRecord) SetUpstreamHttps(v string) { + o.UpstreamHttps = &v +} + +// GetIpFilterMode returns the IpFilterMode field value if set, zero value otherwise. +func (o *SPFRecord) GetIpFilterMode() DnsRecordIpFilterMode { + if o == nil || IsNil(o.IpFilterMode) { + var ret DnsRecordIpFilterMode + return ret + } + return *o.IpFilterMode +} + +// GetIpFilterModeOk returns a tuple with the IpFilterMode field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SPFRecord) GetIpFilterModeOk() (*DnsRecordIpFilterMode, bool) { + if o == nil || IsNil(o.IpFilterMode) { + return nil, false + } + return o.IpFilterMode, true +} + +// HasIpFilterMode returns a boolean if a field has been set. +func (o *SPFRecord) HasIpFilterMode() bool { + if o != nil && !IsNil(o.IpFilterMode) { + return true + } + + return false +} + +// SetIpFilterMode gets a reference to the given DnsRecordIpFilterMode and assigns it to the IpFilterMode field. +func (o *SPFRecord) SetIpFilterMode(v DnsRecordIpFilterMode) { + o.IpFilterMode = &v +} + +// GetIsProtected returns the IsProtected field value if set, zero value otherwise. +func (o *SPFRecord) GetIsProtected() bool { + if o == nil || IsNil(o.IsProtected) { + var ret bool + return ret + } + return *o.IsProtected +} + +// GetIsProtectedOk returns a tuple with the IsProtected field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SPFRecord) GetIsProtectedOk() (*bool, bool) { + if o == nil || IsNil(o.IsProtected) { + return nil, false + } + return o.IsProtected, true +} + +// HasIsProtected returns a boolean if a field has been set. +func (o *SPFRecord) HasIsProtected() bool { + if o != nil && !IsNil(o.IsProtected) { + return true + } + + return false +} + +// SetIsProtected gets a reference to the given bool and assigns it to the IsProtected field. +func (o *SPFRecord) SetIsProtected(v bool) { + o.IsProtected = &v +} + +// GetUsage returns the Usage field value if set, zero value otherwise. +func (o *SPFRecord) GetUsage() []string { + if o == nil || IsNil(o.Usage) { + var ret []string + return ret + } + return o.Usage +} + +// GetUsageOk returns a tuple with the Usage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SPFRecord) GetUsageOk() ([]string, bool) { + if o == nil || IsNil(o.Usage) { + return nil, false + } + return o.Usage, true +} + +// HasUsage returns a boolean if a field has been set. +func (o *SPFRecord) HasUsage() bool { + if o != nil && !IsNil(o.Usage) { + return true + } + + return false +} + +// SetUsage gets a reference to the given []string and assigns it to the Usage field. +func (o *SPFRecord) SetUsage(v []string) { + o.Usage = v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *SPFRecord) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SPFRecord) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *SPFRecord) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *SPFRecord) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *SPFRecord) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SPFRecord) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *SPFRecord) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *SPFRecord) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +func (o SPFRecord) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SPFRecord) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Value) { + toSerialize["value"] = o.Value + } + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + // skip: id is readOnly + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Ttl) { + toSerialize["ttl"] = o.Ttl + } + if !IsNil(o.Cloud) { + toSerialize["cloud"] = o.Cloud + } + if !IsNil(o.UpstreamHttps) { + toSerialize["upstream_https"] = o.UpstreamHttps + } + if !IsNil(o.IpFilterMode) { + toSerialize["ip_filter_mode"] = o.IpFilterMode + } + // skip: is_protected is readOnly + // skip: usage is readOnly + // skip: created_at is readOnly + // skip: updated_at is readOnly + return toSerialize, nil +} + +type NullableSPFRecord struct { + value *SPFRecord + isSet bool +} + +func (v NullableSPFRecord) Get() *SPFRecord { + return v.value +} + +func (v *NullableSPFRecord) Set(val *SPFRecord) { + v.value = val + v.isSet = true +} + +func (v NullableSPFRecord) IsSet() bool { + return v.isSet +} + +func (v *NullableSPFRecord) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSPFRecord(val *SPFRecord) *NullableSPFRecord { + return &NullableSPFRecord{value: val, isSet: true} +} + +func (v NullableSPFRecord) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSPFRecord) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_srv_record.go b/model_srv_record.go new file mode 100644 index 0000000..09a8afe --- /dev/null +++ b/model_srv_record.go @@ -0,0 +1,520 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" + "time" +) + +// checks if the SRVRecord type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SRVRecord{} + +// SRVRecord struct for SRVRecord +type SRVRecord struct { + Value *SRVRecordValue `json:"value,omitempty"` + Type *string `json:"type,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Ttl *int32 `json:"ttl,omitempty"` + Cloud *bool `json:"cloud,omitempty"` + UpstreamHttps *string `json:"upstream_https,omitempty"` + IpFilterMode *DnsRecordIpFilterMode `json:"ip_filter_mode,omitempty"` + // Protected records cannot be modified or deleted by user. + IsProtected *bool `json:"is_protected,omitempty"` + Usage []string `json:"usage,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty"` + UpdatedAt *time.Time `json:"updated_at,omitempty"` +} + +// NewSRVRecord instantiates a new SRVRecord object +// This constructor will assign default values to properties that have it defined, +// 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 NewSRVRecord() *SRVRecord { + this := SRVRecord{} + var cloud bool = false + this.Cloud = &cloud + return &this +} + +// NewSRVRecordWithDefaults instantiates a new SRVRecord object +// This 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 NewSRVRecordWithDefaults() *SRVRecord { + this := SRVRecord{} + var type_ string = "srv" + this.Type = &type_ + var cloud bool = false + this.Cloud = &cloud + return &this +} + +// GetValue returns the Value field value if set, zero value otherwise. +func (o *SRVRecord) GetValue() SRVRecordValue { + if o == nil || IsNil(o.Value) { + var ret SRVRecordValue + return ret + } + return *o.Value +} + +// GetValueOk returns a tuple with the Value field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SRVRecord) GetValueOk() (*SRVRecordValue, bool) { + if o == nil || IsNil(o.Value) { + return nil, false + } + return o.Value, true +} + +// HasValue returns a boolean if a field has been set. +func (o *SRVRecord) HasValue() bool { + if o != nil && !IsNil(o.Value) { + return true + } + + return false +} + +// SetValue gets a reference to the given SRVRecordValue and assigns it to the Value field. +func (o *SRVRecord) SetValue(v SRVRecordValue) { + o.Value = &v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *SRVRecord) 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 *SRVRecord) 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 *SRVRecord) 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 *SRVRecord) SetType(v string) { + o.Type = &v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *SRVRecord) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SRVRecord) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *SRVRecord) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *SRVRecord) SetId(v string) { + o.Id = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *SRVRecord) 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 *SRVRecord) 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 *SRVRecord) 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 *SRVRecord) SetName(v string) { + o.Name = &v +} + +// GetTtl returns the Ttl field value if set, zero value otherwise. +func (o *SRVRecord) GetTtl() int32 { + if o == nil || IsNil(o.Ttl) { + var ret int32 + return ret + } + return *o.Ttl +} + +// GetTtlOk returns a tuple with the Ttl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SRVRecord) GetTtlOk() (*int32, bool) { + if o == nil || IsNil(o.Ttl) { + return nil, false + } + return o.Ttl, true +} + +// HasTtl returns a boolean if a field has been set. +func (o *SRVRecord) HasTtl() bool { + if o != nil && !IsNil(o.Ttl) { + return true + } + + return false +} + +// SetTtl gets a reference to the given int32 and assigns it to the Ttl field. +func (o *SRVRecord) SetTtl(v int32) { + o.Ttl = &v +} + +// GetCloud returns the Cloud field value if set, zero value otherwise. +func (o *SRVRecord) GetCloud() bool { + if o == nil || IsNil(o.Cloud) { + var ret bool + return ret + } + return *o.Cloud +} + +// GetCloudOk returns a tuple with the Cloud field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SRVRecord) GetCloudOk() (*bool, bool) { + if o == nil || IsNil(o.Cloud) { + return nil, false + } + return o.Cloud, true +} + +// HasCloud returns a boolean if a field has been set. +func (o *SRVRecord) HasCloud() bool { + if o != nil && !IsNil(o.Cloud) { + return true + } + + return false +} + +// SetCloud gets a reference to the given bool and assigns it to the Cloud field. +func (o *SRVRecord) SetCloud(v bool) { + o.Cloud = &v +} + +// GetUpstreamHttps returns the UpstreamHttps field value if set, zero value otherwise. +func (o *SRVRecord) GetUpstreamHttps() string { + if o == nil || IsNil(o.UpstreamHttps) { + var ret string + return ret + } + return *o.UpstreamHttps +} + +// GetUpstreamHttpsOk returns a tuple with the UpstreamHttps field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SRVRecord) GetUpstreamHttpsOk() (*string, bool) { + if o == nil || IsNil(o.UpstreamHttps) { + return nil, false + } + return o.UpstreamHttps, true +} + +// HasUpstreamHttps returns a boolean if a field has been set. +func (o *SRVRecord) HasUpstreamHttps() bool { + if o != nil && !IsNil(o.UpstreamHttps) { + return true + } + + return false +} + +// SetUpstreamHttps gets a reference to the given string and assigns it to the UpstreamHttps field. +func (o *SRVRecord) SetUpstreamHttps(v string) { + o.UpstreamHttps = &v +} + +// GetIpFilterMode returns the IpFilterMode field value if set, zero value otherwise. +func (o *SRVRecord) GetIpFilterMode() DnsRecordIpFilterMode { + if o == nil || IsNil(o.IpFilterMode) { + var ret DnsRecordIpFilterMode + return ret + } + return *o.IpFilterMode +} + +// GetIpFilterModeOk returns a tuple with the IpFilterMode field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SRVRecord) GetIpFilterModeOk() (*DnsRecordIpFilterMode, bool) { + if o == nil || IsNil(o.IpFilterMode) { + return nil, false + } + return o.IpFilterMode, true +} + +// HasIpFilterMode returns a boolean if a field has been set. +func (o *SRVRecord) HasIpFilterMode() bool { + if o != nil && !IsNil(o.IpFilterMode) { + return true + } + + return false +} + +// SetIpFilterMode gets a reference to the given DnsRecordIpFilterMode and assigns it to the IpFilterMode field. +func (o *SRVRecord) SetIpFilterMode(v DnsRecordIpFilterMode) { + o.IpFilterMode = &v +} + +// GetIsProtected returns the IsProtected field value if set, zero value otherwise. +func (o *SRVRecord) GetIsProtected() bool { + if o == nil || IsNil(o.IsProtected) { + var ret bool + return ret + } + return *o.IsProtected +} + +// GetIsProtectedOk returns a tuple with the IsProtected field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SRVRecord) GetIsProtectedOk() (*bool, bool) { + if o == nil || IsNil(o.IsProtected) { + return nil, false + } + return o.IsProtected, true +} + +// HasIsProtected returns a boolean if a field has been set. +func (o *SRVRecord) HasIsProtected() bool { + if o != nil && !IsNil(o.IsProtected) { + return true + } + + return false +} + +// SetIsProtected gets a reference to the given bool and assigns it to the IsProtected field. +func (o *SRVRecord) SetIsProtected(v bool) { + o.IsProtected = &v +} + +// GetUsage returns the Usage field value if set, zero value otherwise. +func (o *SRVRecord) GetUsage() []string { + if o == nil || IsNil(o.Usage) { + var ret []string + return ret + } + return o.Usage +} + +// GetUsageOk returns a tuple with the Usage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SRVRecord) GetUsageOk() ([]string, bool) { + if o == nil || IsNil(o.Usage) { + return nil, false + } + return o.Usage, true +} + +// HasUsage returns a boolean if a field has been set. +func (o *SRVRecord) HasUsage() bool { + if o != nil && !IsNil(o.Usage) { + return true + } + + return false +} + +// SetUsage gets a reference to the given []string and assigns it to the Usage field. +func (o *SRVRecord) SetUsage(v []string) { + o.Usage = v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *SRVRecord) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SRVRecord) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *SRVRecord) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *SRVRecord) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *SRVRecord) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SRVRecord) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *SRVRecord) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *SRVRecord) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +func (o SRVRecord) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SRVRecord) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Value) { + toSerialize["value"] = o.Value + } + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + // skip: id is readOnly + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Ttl) { + toSerialize["ttl"] = o.Ttl + } + if !IsNil(o.Cloud) { + toSerialize["cloud"] = o.Cloud + } + if !IsNil(o.UpstreamHttps) { + toSerialize["upstream_https"] = o.UpstreamHttps + } + if !IsNil(o.IpFilterMode) { + toSerialize["ip_filter_mode"] = o.IpFilterMode + } + // skip: is_protected is readOnly + // skip: usage is readOnly + // skip: created_at is readOnly + // skip: updated_at is readOnly + return toSerialize, nil +} + +type NullableSRVRecord struct { + value *SRVRecord + isSet bool +} + +func (v NullableSRVRecord) Get() *SRVRecord { + return v.value +} + +func (v *NullableSRVRecord) Set(val *SRVRecord) { + v.value = val + v.isSet = true +} + +func (v NullableSRVRecord) IsSet() bool { + return v.isSet +} + +func (v *NullableSRVRecord) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSRVRecord(val *SRVRecord) *NullableSRVRecord { + return &NullableSRVRecord{value: val, isSet: true} +} + +func (v NullableSRVRecord) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSRVRecord) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_srv_record_value.go b/model_srv_record_value.go new file mode 100644 index 0000000..612a59e --- /dev/null +++ b/model_srv_record_value.go @@ -0,0 +1,238 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the SRVRecordValue type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SRVRecordValue{} + +// SRVRecordValue struct for SRVRecordValue +type SRVRecordValue struct { + Target string `json:"target"` + Port NullableInt32 `json:"port"` + Weight NullableInt32 `json:"weight,omitempty"` + Priority NullableInt32 `json:"priority,omitempty"` +} + +// NewSRVRecordValue instantiates a new SRVRecordValue object +// This constructor will assign default values to properties that have it defined, +// 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 NewSRVRecordValue(target string, port NullableInt32) *SRVRecordValue { + this := SRVRecordValue{} + this.Target = target + this.Port = port + return &this +} + +// NewSRVRecordValueWithDefaults instantiates a new SRVRecordValue object +// This 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 NewSRVRecordValueWithDefaults() *SRVRecordValue { + this := SRVRecordValue{} + return &this +} + +// GetTarget returns the Target field value +func (o *SRVRecordValue) 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 *SRVRecordValue) GetTargetOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Target, true +} + +// SetTarget sets field value +func (o *SRVRecordValue) SetTarget(v string) { + o.Target = v +} + +// GetPort returns the Port field value +// If the value is explicit nil, the zero value for int32 will be returned +func (o *SRVRecordValue) GetPort() int32 { + if o == nil || o.Port.Get() == nil { + var ret int32 + return ret + } + + return *o.Port.Get() +} + +// GetPortOk returns a tuple with the Port 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 *SRVRecordValue) GetPortOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.Port.Get(), o.Port.IsSet() +} + +// SetPort sets field value +func (o *SRVRecordValue) SetPort(v int32) { + o.Port.Set(&v) +} + +// GetWeight returns the Weight field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SRVRecordValue) GetWeight() int32 { + if o == nil || IsNil(o.Weight.Get()) { + var ret int32 + return ret + } + return *o.Weight.Get() +} + +// GetWeightOk returns a tuple with the Weight 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 *SRVRecordValue) GetWeightOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.Weight.Get(), o.Weight.IsSet() +} + +// HasWeight returns a boolean if a field has been set. +func (o *SRVRecordValue) HasWeight() bool { + if o != nil && o.Weight.IsSet() { + return true + } + + return false +} + +// SetWeight gets a reference to the given NullableInt32 and assigns it to the Weight field. +func (o *SRVRecordValue) SetWeight(v int32) { + o.Weight.Set(&v) +} +// SetWeightNil sets the value for Weight to be an explicit nil +func (o *SRVRecordValue) SetWeightNil() { + o.Weight.Set(nil) +} + +// UnsetWeight ensures that no value is present for Weight, not even an explicit nil +func (o *SRVRecordValue) UnsetWeight() { + o.Weight.Unset() +} + +// GetPriority returns the Priority field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SRVRecordValue) GetPriority() int32 { + if o == nil || IsNil(o.Priority.Get()) { + var ret int32 + return ret + } + return *o.Priority.Get() +} + +// GetPriorityOk returns a tuple with the Priority 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 *SRVRecordValue) GetPriorityOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.Priority.Get(), o.Priority.IsSet() +} + +// HasPriority returns a boolean if a field has been set. +func (o *SRVRecordValue) HasPriority() bool { + if o != nil && o.Priority.IsSet() { + return true + } + + return false +} + +// SetPriority gets a reference to the given NullableInt32 and assigns it to the Priority field. +func (o *SRVRecordValue) SetPriority(v int32) { + o.Priority.Set(&v) +} +// SetPriorityNil sets the value for Priority to be an explicit nil +func (o *SRVRecordValue) SetPriorityNil() { + o.Priority.Set(nil) +} + +// UnsetPriority ensures that no value is present for Priority, not even an explicit nil +func (o *SRVRecordValue) UnsetPriority() { + o.Priority.Unset() +} + +func (o SRVRecordValue) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SRVRecordValue) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["target"] = o.Target + toSerialize["port"] = o.Port.Get() + if o.Weight.IsSet() { + toSerialize["weight"] = o.Weight.Get() + } + if o.Priority.IsSet() { + toSerialize["priority"] = o.Priority.Get() + } + return toSerialize, nil +} + +type NullableSRVRecordValue struct { + value *SRVRecordValue + isSet bool +} + +func (v NullableSRVRecordValue) Get() *SRVRecordValue { + return v.value +} + +func (v *NullableSRVRecordValue) Set(val *SRVRecordValue) { + v.value = val + v.isSet = true +} + +func (v NullableSRVRecordValue) IsSet() bool { + return v.isSet +} + +func (v *NullableSRVRecordValue) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSRVRecordValue(val *SRVRecordValue) *NullableSRVRecordValue { + return &NullableSRVRecordValue{value: val, isSet: true} +} + +func (v NullableSRVRecordValue) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSRVRecordValue) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_ssl.go b/model_ssl.go new file mode 100644 index 0000000..f66154a --- /dev/null +++ b/model_ssl.go @@ -0,0 +1,490 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the Ssl type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Ssl{} + +// Ssl struct for Ssl +type Ssl struct { + // Whether Domain is using ssl module or not + SslStatus *bool `json:"ssl_status,omitempty"` + // Indicates certificate is managed by arvan, or its up to the user + CertificateMode *string `json:"certificate_mode,omitempty"` + // Minimum version of TLS. Empty ('') means default. + TlsVersion *string `json:"tls_version,omitempty"` + // Whether HSTS is enabled + HstsStatus *bool `json:"hsts_status,omitempty"` + // HSTS max age directive + HstsMaxAge *string `json:"hsts_max_age,omitempty"` + HstsSubdomain *bool `json:"hsts_subdomain,omitempty"` + HstsPreload *bool `json:"hsts_preload,omitempty"` + HttpsRedirect *bool `json:"https_redirect,omitempty"` + // Replace HTTP with HTTPs in HTML and JS sources + ReplaceHttp *bool `json:"replace_http,omitempty"` + Certificates []Certificate `json:"certificates,omitempty"` + // returns all \"certificate orders\" since the last invalid or canceled order + Orders []CertificateOrder `json:"orders,omitempty"` +} + +// NewSsl instantiates a new Ssl object +// This constructor will assign default values to properties that have it defined, +// 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 NewSsl() *Ssl { + this := Ssl{} + return &this +} + +// NewSslWithDefaults instantiates a new Ssl object +// This 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 NewSslWithDefaults() *Ssl { + this := Ssl{} + return &this +} + +// GetSslStatus returns the SslStatus field value if set, zero value otherwise. +func (o *Ssl) GetSslStatus() bool { + if o == nil || IsNil(o.SslStatus) { + var ret bool + return ret + } + return *o.SslStatus +} + +// GetSslStatusOk returns a tuple with the SslStatus field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Ssl) GetSslStatusOk() (*bool, bool) { + if o == nil || IsNil(o.SslStatus) { + return nil, false + } + return o.SslStatus, true +} + +// HasSslStatus returns a boolean if a field has been set. +func (o *Ssl) HasSslStatus() bool { + if o != nil && !IsNil(o.SslStatus) { + return true + } + + return false +} + +// SetSslStatus gets a reference to the given bool and assigns it to the SslStatus field. +func (o *Ssl) SetSslStatus(v bool) { + o.SslStatus = &v +} + +// GetCertificateMode returns the CertificateMode field value if set, zero value otherwise. +func (o *Ssl) GetCertificateMode() string { + if o == nil || IsNil(o.CertificateMode) { + var ret string + return ret + } + return *o.CertificateMode +} + +// GetCertificateModeOk returns a tuple with the CertificateMode field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Ssl) GetCertificateModeOk() (*string, bool) { + if o == nil || IsNil(o.CertificateMode) { + return nil, false + } + return o.CertificateMode, true +} + +// HasCertificateMode returns a boolean if a field has been set. +func (o *Ssl) HasCertificateMode() bool { + if o != nil && !IsNil(o.CertificateMode) { + return true + } + + return false +} + +// SetCertificateMode gets a reference to the given string and assigns it to the CertificateMode field. +func (o *Ssl) SetCertificateMode(v string) { + o.CertificateMode = &v +} + +// GetTlsVersion returns the TlsVersion field value if set, zero value otherwise. +func (o *Ssl) GetTlsVersion() string { + if o == nil || IsNil(o.TlsVersion) { + var ret string + return ret + } + return *o.TlsVersion +} + +// GetTlsVersionOk returns a tuple with the TlsVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Ssl) GetTlsVersionOk() (*string, bool) { + if o == nil || IsNil(o.TlsVersion) { + return nil, false + } + return o.TlsVersion, true +} + +// HasTlsVersion returns a boolean if a field has been set. +func (o *Ssl) HasTlsVersion() bool { + if o != nil && !IsNil(o.TlsVersion) { + return true + } + + return false +} + +// SetTlsVersion gets a reference to the given string and assigns it to the TlsVersion field. +func (o *Ssl) SetTlsVersion(v string) { + o.TlsVersion = &v +} + +// GetHstsStatus returns the HstsStatus field value if set, zero value otherwise. +func (o *Ssl) GetHstsStatus() bool { + if o == nil || IsNil(o.HstsStatus) { + var ret bool + return ret + } + return *o.HstsStatus +} + +// GetHstsStatusOk returns a tuple with the HstsStatus field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Ssl) GetHstsStatusOk() (*bool, bool) { + if o == nil || IsNil(o.HstsStatus) { + return nil, false + } + return o.HstsStatus, true +} + +// HasHstsStatus returns a boolean if a field has been set. +func (o *Ssl) HasHstsStatus() bool { + if o != nil && !IsNil(o.HstsStatus) { + return true + } + + return false +} + +// SetHstsStatus gets a reference to the given bool and assigns it to the HstsStatus field. +func (o *Ssl) SetHstsStatus(v bool) { + o.HstsStatus = &v +} + +// GetHstsMaxAge returns the HstsMaxAge field value if set, zero value otherwise. +func (o *Ssl) GetHstsMaxAge() string { + if o == nil || IsNil(o.HstsMaxAge) { + var ret string + return ret + } + return *o.HstsMaxAge +} + +// GetHstsMaxAgeOk returns a tuple with the HstsMaxAge field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Ssl) GetHstsMaxAgeOk() (*string, bool) { + if o == nil || IsNil(o.HstsMaxAge) { + return nil, false + } + return o.HstsMaxAge, true +} + +// HasHstsMaxAge returns a boolean if a field has been set. +func (o *Ssl) HasHstsMaxAge() bool { + if o != nil && !IsNil(o.HstsMaxAge) { + return true + } + + return false +} + +// SetHstsMaxAge gets a reference to the given string and assigns it to the HstsMaxAge field. +func (o *Ssl) SetHstsMaxAge(v string) { + o.HstsMaxAge = &v +} + +// GetHstsSubdomain returns the HstsSubdomain field value if set, zero value otherwise. +func (o *Ssl) GetHstsSubdomain() bool { + if o == nil || IsNil(o.HstsSubdomain) { + var ret bool + return ret + } + return *o.HstsSubdomain +} + +// GetHstsSubdomainOk returns a tuple with the HstsSubdomain field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Ssl) GetHstsSubdomainOk() (*bool, bool) { + if o == nil || IsNil(o.HstsSubdomain) { + return nil, false + } + return o.HstsSubdomain, true +} + +// HasHstsSubdomain returns a boolean if a field has been set. +func (o *Ssl) HasHstsSubdomain() bool { + if o != nil && !IsNil(o.HstsSubdomain) { + return true + } + + return false +} + +// SetHstsSubdomain gets a reference to the given bool and assigns it to the HstsSubdomain field. +func (o *Ssl) SetHstsSubdomain(v bool) { + o.HstsSubdomain = &v +} + +// GetHstsPreload returns the HstsPreload field value if set, zero value otherwise. +func (o *Ssl) GetHstsPreload() bool { + if o == nil || IsNil(o.HstsPreload) { + var ret bool + return ret + } + return *o.HstsPreload +} + +// GetHstsPreloadOk returns a tuple with the HstsPreload field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Ssl) GetHstsPreloadOk() (*bool, bool) { + if o == nil || IsNil(o.HstsPreload) { + return nil, false + } + return o.HstsPreload, true +} + +// HasHstsPreload returns a boolean if a field has been set. +func (o *Ssl) HasHstsPreload() bool { + if o != nil && !IsNil(o.HstsPreload) { + return true + } + + return false +} + +// SetHstsPreload gets a reference to the given bool and assigns it to the HstsPreload field. +func (o *Ssl) SetHstsPreload(v bool) { + o.HstsPreload = &v +} + +// GetHttpsRedirect returns the HttpsRedirect field value if set, zero value otherwise. +func (o *Ssl) GetHttpsRedirect() bool { + if o == nil || IsNil(o.HttpsRedirect) { + var ret bool + return ret + } + return *o.HttpsRedirect +} + +// GetHttpsRedirectOk returns a tuple with the HttpsRedirect field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Ssl) GetHttpsRedirectOk() (*bool, bool) { + if o == nil || IsNil(o.HttpsRedirect) { + return nil, false + } + return o.HttpsRedirect, true +} + +// HasHttpsRedirect returns a boolean if a field has been set. +func (o *Ssl) HasHttpsRedirect() bool { + if o != nil && !IsNil(o.HttpsRedirect) { + return true + } + + return false +} + +// SetHttpsRedirect gets a reference to the given bool and assigns it to the HttpsRedirect field. +func (o *Ssl) SetHttpsRedirect(v bool) { + o.HttpsRedirect = &v +} + +// GetReplaceHttp returns the ReplaceHttp field value if set, zero value otherwise. +func (o *Ssl) GetReplaceHttp() bool { + if o == nil || IsNil(o.ReplaceHttp) { + var ret bool + return ret + } + return *o.ReplaceHttp +} + +// GetReplaceHttpOk returns a tuple with the ReplaceHttp field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Ssl) GetReplaceHttpOk() (*bool, bool) { + if o == nil || IsNil(o.ReplaceHttp) { + return nil, false + } + return o.ReplaceHttp, true +} + +// HasReplaceHttp returns a boolean if a field has been set. +func (o *Ssl) HasReplaceHttp() bool { + if o != nil && !IsNil(o.ReplaceHttp) { + return true + } + + return false +} + +// SetReplaceHttp gets a reference to the given bool and assigns it to the ReplaceHttp field. +func (o *Ssl) SetReplaceHttp(v bool) { + o.ReplaceHttp = &v +} + +// GetCertificates returns the Certificates field value if set, zero value otherwise. +func (o *Ssl) GetCertificates() []Certificate { + if o == nil || IsNil(o.Certificates) { + var ret []Certificate + return ret + } + return o.Certificates +} + +// GetCertificatesOk returns a tuple with the Certificates field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Ssl) GetCertificatesOk() ([]Certificate, bool) { + if o == nil || IsNil(o.Certificates) { + return nil, false + } + return o.Certificates, true +} + +// HasCertificates returns a boolean if a field has been set. +func (o *Ssl) HasCertificates() bool { + if o != nil && !IsNil(o.Certificates) { + return true + } + + return false +} + +// SetCertificates gets a reference to the given []Certificate and assigns it to the Certificates field. +func (o *Ssl) SetCertificates(v []Certificate) { + o.Certificates = v +} + +// GetOrders returns the Orders field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Ssl) GetOrders() []CertificateOrder { + if o == nil { + var ret []CertificateOrder + return ret + } + return o.Orders +} + +// GetOrdersOk returns a tuple with the Orders 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 *Ssl) GetOrdersOk() ([]CertificateOrder, bool) { + if o == nil || IsNil(o.Orders) { + return nil, false + } + return o.Orders, true +} + +// HasOrders returns a boolean if a field has been set. +func (o *Ssl) HasOrders() bool { + if o != nil && IsNil(o.Orders) { + return true + } + + return false +} + +// SetOrders gets a reference to the given []CertificateOrder and assigns it to the Orders field. +func (o *Ssl) SetOrders(v []CertificateOrder) { + o.Orders = v +} + +func (o Ssl) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Ssl) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.SslStatus) { + toSerialize["ssl_status"] = o.SslStatus + } + // skip: certificate_mode is readOnly + if !IsNil(o.TlsVersion) { + toSerialize["tls_version"] = o.TlsVersion + } + if !IsNil(o.HstsStatus) { + toSerialize["hsts_status"] = o.HstsStatus + } + if !IsNil(o.HstsMaxAge) { + toSerialize["hsts_max_age"] = o.HstsMaxAge + } + if !IsNil(o.HstsSubdomain) { + toSerialize["hsts_subdomain"] = o.HstsSubdomain + } + if !IsNil(o.HstsPreload) { + toSerialize["hsts_preload"] = o.HstsPreload + } + if !IsNil(o.HttpsRedirect) { + toSerialize["https_redirect"] = o.HttpsRedirect + } + if !IsNil(o.ReplaceHttp) { + toSerialize["replace_http"] = o.ReplaceHttp + } + // skip: certificates is readOnly + if o.Orders != nil { + toSerialize["orders"] = o.Orders + } + return toSerialize, nil +} + +type NullableSsl struct { + value *Ssl + isSet bool +} + +func (v NullableSsl) Get() *Ssl { + return v.value +} + +func (v *NullableSsl) Set(val *Ssl) { + v.value = val + v.isSet = true +} + +func (v NullableSsl) IsSet() bool { + return v.isSet +} + +func (v *NullableSsl) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSsl(val *Ssl) *NullableSsl { + return &NullableSsl{value: val, isSet: true} +} + +func (v NullableSsl) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSsl) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_ssl_cert_order_index_200_response.go b/model_ssl_cert_order_index_200_response.go new file mode 100644 index 0000000..a131b85 --- /dev/null +++ b/model_ssl_cert_order_index_200_response.go @@ -0,0 +1,172 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the SslCertOrderIndex200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SslCertOrderIndex200Response{} + +// SslCertOrderIndex200Response struct for SslCertOrderIndex200Response +type SslCertOrderIndex200Response struct { + Data []CertificateOrder `json:"data,omitempty"` + Message NullableString `json:"message,omitempty"` +} + +// NewSslCertOrderIndex200Response instantiates a new SslCertOrderIndex200Response object +// This constructor will assign default values to properties that have it defined, +// 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 NewSslCertOrderIndex200Response() *SslCertOrderIndex200Response { + this := SslCertOrderIndex200Response{} + return &this +} + +// NewSslCertOrderIndex200ResponseWithDefaults instantiates a new SslCertOrderIndex200Response object +// This 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 NewSslCertOrderIndex200ResponseWithDefaults() *SslCertOrderIndex200Response { + this := SslCertOrderIndex200Response{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *SslCertOrderIndex200Response) GetData() []CertificateOrder { + if o == nil || IsNil(o.Data) { + var ret []CertificateOrder + return ret + } + return o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SslCertOrderIndex200Response) GetDataOk() ([]CertificateOrder, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *SslCertOrderIndex200Response) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given []CertificateOrder and assigns it to the Data field. +func (o *SslCertOrderIndex200Response) SetData(v []CertificateOrder) { + o.Data = v +} + +// GetMessage returns the Message field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SslCertOrderIndex200Response) GetMessage() string { + if o == nil || IsNil(o.Message.Get()) { + var ret string + return ret + } + return *o.Message.Get() +} + +// GetMessageOk returns a tuple with the Message 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 *SslCertOrderIndex200Response) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Message.Get(), o.Message.IsSet() +} + +// HasMessage returns a boolean if a field has been set. +func (o *SslCertOrderIndex200Response) HasMessage() bool { + if o != nil && o.Message.IsSet() { + return true + } + + return false +} + +// SetMessage gets a reference to the given NullableString and assigns it to the Message field. +func (o *SslCertOrderIndex200Response) SetMessage(v string) { + o.Message.Set(&v) +} +// SetMessageNil sets the value for Message to be an explicit nil +func (o *SslCertOrderIndex200Response) SetMessageNil() { + o.Message.Set(nil) +} + +// UnsetMessage ensures that no value is present for Message, not even an explicit nil +func (o *SslCertOrderIndex200Response) UnsetMessage() { + o.Message.Unset() +} + +func (o SslCertOrderIndex200Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SslCertOrderIndex200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + if o.Message.IsSet() { + toSerialize["message"] = o.Message.Get() + } + return toSerialize, nil +} + +type NullableSslCertOrderIndex200Response struct { + value *SslCertOrderIndex200Response + isSet bool +} + +func (v NullableSslCertOrderIndex200Response) Get() *SslCertOrderIndex200Response { + return v.value +} + +func (v *NullableSslCertOrderIndex200Response) Set(val *SslCertOrderIndex200Response) { + v.value = val + v.isSet = true +} + +func (v NullableSslCertOrderIndex200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableSslCertOrderIndex200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSslCertOrderIndex200Response(val *SslCertOrderIndex200Response) *NullableSslCertOrderIndex200Response { + return &NullableSslCertOrderIndex200Response{value: val, isSet: true} +} + +func (v NullableSslCertOrderIndex200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSslCertOrderIndex200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_ssl_response.go b/model_ssl_response.go new file mode 100644 index 0000000..1fee86e --- /dev/null +++ b/model_ssl_response.go @@ -0,0 +1,172 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the SslResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SslResponse{} + +// SslResponse struct for SslResponse +type SslResponse struct { + Data *Ssl `json:"data,omitempty"` + Message NullableString `json:"message,omitempty"` +} + +// NewSslResponse instantiates a new SslResponse object +// This constructor will assign default values to properties that have it defined, +// 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 NewSslResponse() *SslResponse { + this := SslResponse{} + return &this +} + +// NewSslResponseWithDefaults instantiates a new SslResponse object +// This 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 NewSslResponseWithDefaults() *SslResponse { + this := SslResponse{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *SslResponse) GetData() Ssl { + if o == nil || IsNil(o.Data) { + var ret Ssl + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SslResponse) GetDataOk() (*Ssl, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *SslResponse) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given Ssl and assigns it to the Data field. +func (o *SslResponse) SetData(v Ssl) { + o.Data = &v +} + +// GetMessage returns the Message field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SslResponse) GetMessage() string { + if o == nil || IsNil(o.Message.Get()) { + var ret string + return ret + } + return *o.Message.Get() +} + +// GetMessageOk returns a tuple with the Message 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 *SslResponse) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Message.Get(), o.Message.IsSet() +} + +// HasMessage returns a boolean if a field has been set. +func (o *SslResponse) HasMessage() bool { + if o != nil && o.Message.IsSet() { + return true + } + + return false +} + +// SetMessage gets a reference to the given NullableString and assigns it to the Message field. +func (o *SslResponse) SetMessage(v string) { + o.Message.Set(&v) +} +// SetMessageNil sets the value for Message to be an explicit nil +func (o *SslResponse) SetMessageNil() { + o.Message.Set(nil) +} + +// UnsetMessage ensures that no value is present for Message, not even an explicit nil +func (o *SslResponse) UnsetMessage() { + o.Message.Unset() +} + +func (o SslResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SslResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + if o.Message.IsSet() { + toSerialize["message"] = o.Message.Get() + } + return toSerialize, nil +} + +type NullableSslResponse struct { + value *SslResponse + isSet bool +} + +func (v NullableSslResponse) Get() *SslResponse { + return v.value +} + +func (v *NullableSslResponse) Set(val *SslResponse) { + v.value = val + v.isSet = true +} + +func (v NullableSslResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableSslResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSslResponse(val *SslResponse) *NullableSslResponse { + return &NullableSslResponse{value: val, isSet: true} +} + +func (v NullableSslResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSslResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_ssl_update.go b/model_ssl_update.go new file mode 100644 index 0000000..1890d9d --- /dev/null +++ b/model_ssl_update.go @@ -0,0 +1,563 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the SslUpdate type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SslUpdate{} + +// SslUpdate struct for SslUpdate +type SslUpdate struct { + // a user uploaded certificate's uuid or `managed` + Certificate *string `json:"certificate,omitempty"` + CertificateKeyType *string `json:"certificate_key_type,omitempty"` + // Whether Domain is using ssl module or not + SslStatus *bool `json:"ssl_status,omitempty"` + // Indicates certificate is managed by arvan, or its up to the user + CertificateMode *string `json:"certificate_mode,omitempty"` + // Minimum version of TLS. Empty ('') means default. + TlsVersion *string `json:"tls_version,omitempty"` + // Whether HSTS is enabled + HstsStatus *bool `json:"hsts_status,omitempty"` + // HSTS max age directive + HstsMaxAge *string `json:"hsts_max_age,omitempty"` + HstsSubdomain *bool `json:"hsts_subdomain,omitempty"` + HstsPreload *bool `json:"hsts_preload,omitempty"` + HttpsRedirect *bool `json:"https_redirect,omitempty"` + // Replace HTTP with HTTPs in HTML and JS sources + ReplaceHttp *bool `json:"replace_http,omitempty"` + Certificates []Certificate `json:"certificates,omitempty"` + // returns all \"certificate orders\" since the last invalid or canceled order + Orders []CertificateOrder `json:"orders,omitempty"` +} + +// NewSslUpdate instantiates a new SslUpdate object +// This constructor will assign default values to properties that have it defined, +// 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 NewSslUpdate() *SslUpdate { + this := SslUpdate{} + return &this +} + +// NewSslUpdateWithDefaults instantiates a new SslUpdate object +// This 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 NewSslUpdateWithDefaults() *SslUpdate { + this := SslUpdate{} + return &this +} + +// GetCertificate returns the Certificate field value if set, zero value otherwise. +func (o *SslUpdate) GetCertificate() string { + if o == nil || IsNil(o.Certificate) { + var ret string + return ret + } + return *o.Certificate +} + +// GetCertificateOk returns a tuple with the Certificate field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SslUpdate) GetCertificateOk() (*string, bool) { + if o == nil || IsNil(o.Certificate) { + return nil, false + } + return o.Certificate, true +} + +// HasCertificate returns a boolean if a field has been set. +func (o *SslUpdate) HasCertificate() bool { + if o != nil && !IsNil(o.Certificate) { + return true + } + + return false +} + +// SetCertificate gets a reference to the given string and assigns it to the Certificate field. +func (o *SslUpdate) SetCertificate(v string) { + o.Certificate = &v +} + +// GetCertificateKeyType returns the CertificateKeyType field value if set, zero value otherwise. +func (o *SslUpdate) GetCertificateKeyType() string { + if o == nil || IsNil(o.CertificateKeyType) { + var ret string + return ret + } + return *o.CertificateKeyType +} + +// GetCertificateKeyTypeOk returns a tuple with the CertificateKeyType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SslUpdate) GetCertificateKeyTypeOk() (*string, bool) { + if o == nil || IsNil(o.CertificateKeyType) { + return nil, false + } + return o.CertificateKeyType, true +} + +// HasCertificateKeyType returns a boolean if a field has been set. +func (o *SslUpdate) HasCertificateKeyType() bool { + if o != nil && !IsNil(o.CertificateKeyType) { + return true + } + + return false +} + +// SetCertificateKeyType gets a reference to the given string and assigns it to the CertificateKeyType field. +func (o *SslUpdate) SetCertificateKeyType(v string) { + o.CertificateKeyType = &v +} + +// GetSslStatus returns the SslStatus field value if set, zero value otherwise. +func (o *SslUpdate) GetSslStatus() bool { + if o == nil || IsNil(o.SslStatus) { + var ret bool + return ret + } + return *o.SslStatus +} + +// GetSslStatusOk returns a tuple with the SslStatus field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SslUpdate) GetSslStatusOk() (*bool, bool) { + if o == nil || IsNil(o.SslStatus) { + return nil, false + } + return o.SslStatus, true +} + +// HasSslStatus returns a boolean if a field has been set. +func (o *SslUpdate) HasSslStatus() bool { + if o != nil && !IsNil(o.SslStatus) { + return true + } + + return false +} + +// SetSslStatus gets a reference to the given bool and assigns it to the SslStatus field. +func (o *SslUpdate) SetSslStatus(v bool) { + o.SslStatus = &v +} + +// GetCertificateMode returns the CertificateMode field value if set, zero value otherwise. +func (o *SslUpdate) GetCertificateMode() string { + if o == nil || IsNil(o.CertificateMode) { + var ret string + return ret + } + return *o.CertificateMode +} + +// GetCertificateModeOk returns a tuple with the CertificateMode field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SslUpdate) GetCertificateModeOk() (*string, bool) { + if o == nil || IsNil(o.CertificateMode) { + return nil, false + } + return o.CertificateMode, true +} + +// HasCertificateMode returns a boolean if a field has been set. +func (o *SslUpdate) HasCertificateMode() bool { + if o != nil && !IsNil(o.CertificateMode) { + return true + } + + return false +} + +// SetCertificateMode gets a reference to the given string and assigns it to the CertificateMode field. +func (o *SslUpdate) SetCertificateMode(v string) { + o.CertificateMode = &v +} + +// GetTlsVersion returns the TlsVersion field value if set, zero value otherwise. +func (o *SslUpdate) GetTlsVersion() string { + if o == nil || IsNil(o.TlsVersion) { + var ret string + return ret + } + return *o.TlsVersion +} + +// GetTlsVersionOk returns a tuple with the TlsVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SslUpdate) GetTlsVersionOk() (*string, bool) { + if o == nil || IsNil(o.TlsVersion) { + return nil, false + } + return o.TlsVersion, true +} + +// HasTlsVersion returns a boolean if a field has been set. +func (o *SslUpdate) HasTlsVersion() bool { + if o != nil && !IsNil(o.TlsVersion) { + return true + } + + return false +} + +// SetTlsVersion gets a reference to the given string and assigns it to the TlsVersion field. +func (o *SslUpdate) SetTlsVersion(v string) { + o.TlsVersion = &v +} + +// GetHstsStatus returns the HstsStatus field value if set, zero value otherwise. +func (o *SslUpdate) GetHstsStatus() bool { + if o == nil || IsNil(o.HstsStatus) { + var ret bool + return ret + } + return *o.HstsStatus +} + +// GetHstsStatusOk returns a tuple with the HstsStatus field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SslUpdate) GetHstsStatusOk() (*bool, bool) { + if o == nil || IsNil(o.HstsStatus) { + return nil, false + } + return o.HstsStatus, true +} + +// HasHstsStatus returns a boolean if a field has been set. +func (o *SslUpdate) HasHstsStatus() bool { + if o != nil && !IsNil(o.HstsStatus) { + return true + } + + return false +} + +// SetHstsStatus gets a reference to the given bool and assigns it to the HstsStatus field. +func (o *SslUpdate) SetHstsStatus(v bool) { + o.HstsStatus = &v +} + +// GetHstsMaxAge returns the HstsMaxAge field value if set, zero value otherwise. +func (o *SslUpdate) GetHstsMaxAge() string { + if o == nil || IsNil(o.HstsMaxAge) { + var ret string + return ret + } + return *o.HstsMaxAge +} + +// GetHstsMaxAgeOk returns a tuple with the HstsMaxAge field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SslUpdate) GetHstsMaxAgeOk() (*string, bool) { + if o == nil || IsNil(o.HstsMaxAge) { + return nil, false + } + return o.HstsMaxAge, true +} + +// HasHstsMaxAge returns a boolean if a field has been set. +func (o *SslUpdate) HasHstsMaxAge() bool { + if o != nil && !IsNil(o.HstsMaxAge) { + return true + } + + return false +} + +// SetHstsMaxAge gets a reference to the given string and assigns it to the HstsMaxAge field. +func (o *SslUpdate) SetHstsMaxAge(v string) { + o.HstsMaxAge = &v +} + +// GetHstsSubdomain returns the HstsSubdomain field value if set, zero value otherwise. +func (o *SslUpdate) GetHstsSubdomain() bool { + if o == nil || IsNil(o.HstsSubdomain) { + var ret bool + return ret + } + return *o.HstsSubdomain +} + +// GetHstsSubdomainOk returns a tuple with the HstsSubdomain field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SslUpdate) GetHstsSubdomainOk() (*bool, bool) { + if o == nil || IsNil(o.HstsSubdomain) { + return nil, false + } + return o.HstsSubdomain, true +} + +// HasHstsSubdomain returns a boolean if a field has been set. +func (o *SslUpdate) HasHstsSubdomain() bool { + if o != nil && !IsNil(o.HstsSubdomain) { + return true + } + + return false +} + +// SetHstsSubdomain gets a reference to the given bool and assigns it to the HstsSubdomain field. +func (o *SslUpdate) SetHstsSubdomain(v bool) { + o.HstsSubdomain = &v +} + +// GetHstsPreload returns the HstsPreload field value if set, zero value otherwise. +func (o *SslUpdate) GetHstsPreload() bool { + if o == nil || IsNil(o.HstsPreload) { + var ret bool + return ret + } + return *o.HstsPreload +} + +// GetHstsPreloadOk returns a tuple with the HstsPreload field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SslUpdate) GetHstsPreloadOk() (*bool, bool) { + if o == nil || IsNil(o.HstsPreload) { + return nil, false + } + return o.HstsPreload, true +} + +// HasHstsPreload returns a boolean if a field has been set. +func (o *SslUpdate) HasHstsPreload() bool { + if o != nil && !IsNil(o.HstsPreload) { + return true + } + + return false +} + +// SetHstsPreload gets a reference to the given bool and assigns it to the HstsPreload field. +func (o *SslUpdate) SetHstsPreload(v bool) { + o.HstsPreload = &v +} + +// GetHttpsRedirect returns the HttpsRedirect field value if set, zero value otherwise. +func (o *SslUpdate) GetHttpsRedirect() bool { + if o == nil || IsNil(o.HttpsRedirect) { + var ret bool + return ret + } + return *o.HttpsRedirect +} + +// GetHttpsRedirectOk returns a tuple with the HttpsRedirect field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SslUpdate) GetHttpsRedirectOk() (*bool, bool) { + if o == nil || IsNil(o.HttpsRedirect) { + return nil, false + } + return o.HttpsRedirect, true +} + +// HasHttpsRedirect returns a boolean if a field has been set. +func (o *SslUpdate) HasHttpsRedirect() bool { + if o != nil && !IsNil(o.HttpsRedirect) { + return true + } + + return false +} + +// SetHttpsRedirect gets a reference to the given bool and assigns it to the HttpsRedirect field. +func (o *SslUpdate) SetHttpsRedirect(v bool) { + o.HttpsRedirect = &v +} + +// GetReplaceHttp returns the ReplaceHttp field value if set, zero value otherwise. +func (o *SslUpdate) GetReplaceHttp() bool { + if o == nil || IsNil(o.ReplaceHttp) { + var ret bool + return ret + } + return *o.ReplaceHttp +} + +// GetReplaceHttpOk returns a tuple with the ReplaceHttp field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SslUpdate) GetReplaceHttpOk() (*bool, bool) { + if o == nil || IsNil(o.ReplaceHttp) { + return nil, false + } + return o.ReplaceHttp, true +} + +// HasReplaceHttp returns a boolean if a field has been set. +func (o *SslUpdate) HasReplaceHttp() bool { + if o != nil && !IsNil(o.ReplaceHttp) { + return true + } + + return false +} + +// SetReplaceHttp gets a reference to the given bool and assigns it to the ReplaceHttp field. +func (o *SslUpdate) SetReplaceHttp(v bool) { + o.ReplaceHttp = &v +} + +// GetCertificates returns the Certificates field value if set, zero value otherwise. +func (o *SslUpdate) GetCertificates() []Certificate { + if o == nil || IsNil(o.Certificates) { + var ret []Certificate + return ret + } + return o.Certificates +} + +// GetCertificatesOk returns a tuple with the Certificates field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SslUpdate) GetCertificatesOk() ([]Certificate, bool) { + if o == nil || IsNil(o.Certificates) { + return nil, false + } + return o.Certificates, true +} + +// HasCertificates returns a boolean if a field has been set. +func (o *SslUpdate) HasCertificates() bool { + if o != nil && !IsNil(o.Certificates) { + return true + } + + return false +} + +// SetCertificates gets a reference to the given []Certificate and assigns it to the Certificates field. +func (o *SslUpdate) SetCertificates(v []Certificate) { + o.Certificates = v +} + +// GetOrders returns the Orders field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SslUpdate) GetOrders() []CertificateOrder { + if o == nil { + var ret []CertificateOrder + return ret + } + return o.Orders +} + +// GetOrdersOk returns a tuple with the Orders 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 *SslUpdate) GetOrdersOk() ([]CertificateOrder, bool) { + if o == nil || IsNil(o.Orders) { + return nil, false + } + return o.Orders, true +} + +// HasOrders returns a boolean if a field has been set. +func (o *SslUpdate) HasOrders() bool { + if o != nil && IsNil(o.Orders) { + return true + } + + return false +} + +// SetOrders gets a reference to the given []CertificateOrder and assigns it to the Orders field. +func (o *SslUpdate) SetOrders(v []CertificateOrder) { + o.Orders = v +} + +func (o SslUpdate) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SslUpdate) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Certificate) { + toSerialize["certificate"] = o.Certificate + } + if !IsNil(o.CertificateKeyType) { + toSerialize["certificate_key_type"] = o.CertificateKeyType + } + if !IsNil(o.SslStatus) { + toSerialize["ssl_status"] = o.SslStatus + } + // skip: certificate_mode is readOnly + if !IsNil(o.TlsVersion) { + toSerialize["tls_version"] = o.TlsVersion + } + if !IsNil(o.HstsStatus) { + toSerialize["hsts_status"] = o.HstsStatus + } + if !IsNil(o.HstsMaxAge) { + toSerialize["hsts_max_age"] = o.HstsMaxAge + } + if !IsNil(o.HstsSubdomain) { + toSerialize["hsts_subdomain"] = o.HstsSubdomain + } + if !IsNil(o.HstsPreload) { + toSerialize["hsts_preload"] = o.HstsPreload + } + if !IsNil(o.HttpsRedirect) { + toSerialize["https_redirect"] = o.HttpsRedirect + } + if !IsNil(o.ReplaceHttp) { + toSerialize["replace_http"] = o.ReplaceHttp + } + // skip: certificates is readOnly + if o.Orders != nil { + toSerialize["orders"] = o.Orders + } + return toSerialize, nil +} + +type NullableSslUpdate struct { + value *SslUpdate + isSet bool +} + +func (v NullableSslUpdate) Get() *SslUpdate { + return v.value +} + +func (v *NullableSslUpdate) Set(val *SslUpdate) { + v.value = val + v.isSet = true +} + +func (v NullableSslUpdate) IsSet() bool { + return v.isSet +} + +func (v *NullableSslUpdate) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSslUpdate(val *SslUpdate) *NullableSslUpdate { + return &NullableSslUpdate{value: val, isSet: true} +} + +func (v NullableSslUpdate) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSslUpdate) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_status_code_report.go b/model_status_code_report.go new file mode 100644 index 0000000..7522397 --- /dev/null +++ b/model_status_code_report.go @@ -0,0 +1,162 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the StatusCodeReport type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &StatusCodeReport{} + +// StatusCodeReport struct for StatusCodeReport +type StatusCodeReport struct { + Statistics *StatusCodeReportStatistics `json:"statistics,omitempty"` + Charts *StatusCodeReportCharts `json:"charts,omitempty"` +} + +// NewStatusCodeReport instantiates a new StatusCodeReport object +// This constructor will assign default values to properties that have it defined, +// 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 NewStatusCodeReport() *StatusCodeReport { + this := StatusCodeReport{} + return &this +} + +// NewStatusCodeReportWithDefaults instantiates a new StatusCodeReport object +// This 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 NewStatusCodeReportWithDefaults() *StatusCodeReport { + this := StatusCodeReport{} + return &this +} + +// GetStatistics returns the Statistics field value if set, zero value otherwise. +func (o *StatusCodeReport) GetStatistics() StatusCodeReportStatistics { + if o == nil || IsNil(o.Statistics) { + var ret StatusCodeReportStatistics + return ret + } + return *o.Statistics +} + +// GetStatisticsOk returns a tuple with the Statistics field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *StatusCodeReport) GetStatisticsOk() (*StatusCodeReportStatistics, bool) { + if o == nil || IsNil(o.Statistics) { + return nil, false + } + return o.Statistics, true +} + +// HasStatistics returns a boolean if a field has been set. +func (o *StatusCodeReport) HasStatistics() bool { + if o != nil && !IsNil(o.Statistics) { + return true + } + + return false +} + +// SetStatistics gets a reference to the given StatusCodeReportStatistics and assigns it to the Statistics field. +func (o *StatusCodeReport) SetStatistics(v StatusCodeReportStatistics) { + o.Statistics = &v +} + +// GetCharts returns the Charts field value if set, zero value otherwise. +func (o *StatusCodeReport) GetCharts() StatusCodeReportCharts { + if o == nil || IsNil(o.Charts) { + var ret StatusCodeReportCharts + return ret + } + return *o.Charts +} + +// GetChartsOk returns a tuple with the Charts field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *StatusCodeReport) GetChartsOk() (*StatusCodeReportCharts, bool) { + if o == nil || IsNil(o.Charts) { + return nil, false + } + return o.Charts, true +} + +// HasCharts returns a boolean if a field has been set. +func (o *StatusCodeReport) HasCharts() bool { + if o != nil && !IsNil(o.Charts) { + return true + } + + return false +} + +// SetCharts gets a reference to the given StatusCodeReportCharts and assigns it to the Charts field. +func (o *StatusCodeReport) SetCharts(v StatusCodeReportCharts) { + o.Charts = &v +} + +func (o StatusCodeReport) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o StatusCodeReport) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Statistics) { + toSerialize["statistics"] = o.Statistics + } + if !IsNil(o.Charts) { + toSerialize["charts"] = o.Charts + } + return toSerialize, nil +} + +type NullableStatusCodeReport struct { + value *StatusCodeReport + isSet bool +} + +func (v NullableStatusCodeReport) Get() *StatusCodeReport { + return v.value +} + +func (v *NullableStatusCodeReport) Set(val *StatusCodeReport) { + v.value = val + v.isSet = true +} + +func (v NullableStatusCodeReport) IsSet() bool { + return v.isSet +} + +func (v *NullableStatusCodeReport) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableStatusCodeReport(val *StatusCodeReport) *NullableStatusCodeReport { + return &NullableStatusCodeReport{value: val, isSet: true} +} + +func (v NullableStatusCodeReport) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableStatusCodeReport) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_status_code_report_charts.go b/model_status_code_report_charts.go new file mode 100644 index 0000000..f15642a --- /dev/null +++ b/model_status_code_report_charts.go @@ -0,0 +1,126 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the StatusCodeReportCharts type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &StatusCodeReportCharts{} + +// StatusCodeReportCharts struct for StatusCodeReportCharts +type StatusCodeReportCharts struct { + StatusCode *StatusCodeReportChartsStatusCode `json:"status_code,omitempty"` +} + +// NewStatusCodeReportCharts instantiates a new StatusCodeReportCharts object +// This constructor will assign default values to properties that have it defined, +// 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 NewStatusCodeReportCharts() *StatusCodeReportCharts { + this := StatusCodeReportCharts{} + return &this +} + +// NewStatusCodeReportChartsWithDefaults instantiates a new StatusCodeReportCharts object +// This 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 NewStatusCodeReportChartsWithDefaults() *StatusCodeReportCharts { + this := StatusCodeReportCharts{} + return &this +} + +// GetStatusCode returns the StatusCode field value if set, zero value otherwise. +func (o *StatusCodeReportCharts) GetStatusCode() StatusCodeReportChartsStatusCode { + if o == nil || IsNil(o.StatusCode) { + var ret StatusCodeReportChartsStatusCode + return ret + } + return *o.StatusCode +} + +// GetStatusCodeOk returns a tuple with the StatusCode field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *StatusCodeReportCharts) GetStatusCodeOk() (*StatusCodeReportChartsStatusCode, bool) { + if o == nil || IsNil(o.StatusCode) { + return nil, false + } + return o.StatusCode, true +} + +// HasStatusCode returns a boolean if a field has been set. +func (o *StatusCodeReportCharts) HasStatusCode() bool { + if o != nil && !IsNil(o.StatusCode) { + return true + } + + return false +} + +// SetStatusCode gets a reference to the given StatusCodeReportChartsStatusCode and assigns it to the StatusCode field. +func (o *StatusCodeReportCharts) SetStatusCode(v StatusCodeReportChartsStatusCode) { + o.StatusCode = &v +} + +func (o StatusCodeReportCharts) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o StatusCodeReportCharts) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.StatusCode) { + toSerialize["status_code"] = o.StatusCode + } + return toSerialize, nil +} + +type NullableStatusCodeReportCharts struct { + value *StatusCodeReportCharts + isSet bool +} + +func (v NullableStatusCodeReportCharts) Get() *StatusCodeReportCharts { + return v.value +} + +func (v *NullableStatusCodeReportCharts) Set(val *StatusCodeReportCharts) { + v.value = val + v.isSet = true +} + +func (v NullableStatusCodeReportCharts) IsSet() bool { + return v.isSet +} + +func (v *NullableStatusCodeReportCharts) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableStatusCodeReportCharts(val *StatusCodeReportCharts) *NullableStatusCodeReportCharts { + return &NullableStatusCodeReportCharts{value: val, isSet: true} +} + +func (v NullableStatusCodeReportCharts) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableStatusCodeReportCharts) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_status_code_report_charts_status_code.go b/model_status_code_report_charts_status_code.go new file mode 100644 index 0000000..4f8123f --- /dev/null +++ b/model_status_code_report_charts_status_code.go @@ -0,0 +1,199 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" + "time" +) + +// checks if the StatusCodeReportChartsStatusCode type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &StatusCodeReportChartsStatusCode{} + +// StatusCodeReportChartsStatusCode struct for StatusCodeReportChartsStatusCode +type StatusCodeReportChartsStatusCode struct { + Name *string `json:"name,omitempty"` + Categories []time.Time `json:"categories,omitempty"` + Series []StatusCodeReportChartsStatusCodeSeriesInner `json:"series,omitempty"` +} + +// NewStatusCodeReportChartsStatusCode instantiates a new StatusCodeReportChartsStatusCode object +// This constructor will assign default values to properties that have it defined, +// 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 NewStatusCodeReportChartsStatusCode() *StatusCodeReportChartsStatusCode { + this := StatusCodeReportChartsStatusCode{} + return &this +} + +// NewStatusCodeReportChartsStatusCodeWithDefaults instantiates a new StatusCodeReportChartsStatusCode object +// This 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 NewStatusCodeReportChartsStatusCodeWithDefaults() *StatusCodeReportChartsStatusCode { + this := StatusCodeReportChartsStatusCode{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *StatusCodeReportChartsStatusCode) 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 *StatusCodeReportChartsStatusCode) 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 *StatusCodeReportChartsStatusCode) 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 *StatusCodeReportChartsStatusCode) SetName(v string) { + o.Name = &v +} + +// GetCategories returns the Categories field value if set, zero value otherwise. +func (o *StatusCodeReportChartsStatusCode) GetCategories() []time.Time { + if o == nil || IsNil(o.Categories) { + var ret []time.Time + return ret + } + return o.Categories +} + +// GetCategoriesOk returns a tuple with the Categories field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *StatusCodeReportChartsStatusCode) GetCategoriesOk() ([]time.Time, bool) { + if o == nil || IsNil(o.Categories) { + return nil, false + } + return o.Categories, true +} + +// HasCategories returns a boolean if a field has been set. +func (o *StatusCodeReportChartsStatusCode) HasCategories() bool { + if o != nil && !IsNil(o.Categories) { + return true + } + + return false +} + +// SetCategories gets a reference to the given []time.Time and assigns it to the Categories field. +func (o *StatusCodeReportChartsStatusCode) SetCategories(v []time.Time) { + o.Categories = v +} + +// GetSeries returns the Series field value if set, zero value otherwise. +func (o *StatusCodeReportChartsStatusCode) GetSeries() []StatusCodeReportChartsStatusCodeSeriesInner { + if o == nil || IsNil(o.Series) { + var ret []StatusCodeReportChartsStatusCodeSeriesInner + return ret + } + return o.Series +} + +// GetSeriesOk returns a tuple with the Series field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *StatusCodeReportChartsStatusCode) GetSeriesOk() ([]StatusCodeReportChartsStatusCodeSeriesInner, bool) { + if o == nil || IsNil(o.Series) { + return nil, false + } + return o.Series, true +} + +// HasSeries returns a boolean if a field has been set. +func (o *StatusCodeReportChartsStatusCode) HasSeries() bool { + if o != nil && !IsNil(o.Series) { + return true + } + + return false +} + +// SetSeries gets a reference to the given []StatusCodeReportChartsStatusCodeSeriesInner and assigns it to the Series field. +func (o *StatusCodeReportChartsStatusCode) SetSeries(v []StatusCodeReportChartsStatusCodeSeriesInner) { + o.Series = v +} + +func (o StatusCodeReportChartsStatusCode) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o StatusCodeReportChartsStatusCode) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Categories) { + toSerialize["categories"] = o.Categories + } + if !IsNil(o.Series) { + toSerialize["series"] = o.Series + } + return toSerialize, nil +} + +type NullableStatusCodeReportChartsStatusCode struct { + value *StatusCodeReportChartsStatusCode + isSet bool +} + +func (v NullableStatusCodeReportChartsStatusCode) Get() *StatusCodeReportChartsStatusCode { + return v.value +} + +func (v *NullableStatusCodeReportChartsStatusCode) Set(val *StatusCodeReportChartsStatusCode) { + v.value = val + v.isSet = true +} + +func (v NullableStatusCodeReportChartsStatusCode) IsSet() bool { + return v.isSet +} + +func (v *NullableStatusCodeReportChartsStatusCode) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableStatusCodeReportChartsStatusCode(val *StatusCodeReportChartsStatusCode) *NullableStatusCodeReportChartsStatusCode { + return &NullableStatusCodeReportChartsStatusCode{value: val, isSet: true} +} + +func (v NullableStatusCodeReportChartsStatusCode) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableStatusCodeReportChartsStatusCode) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_status_code_report_charts_status_code_series_inner.go b/model_status_code_report_charts_status_code_series_inner.go new file mode 100644 index 0000000..33c6035 --- /dev/null +++ b/model_status_code_report_charts_status_code_series_inner.go @@ -0,0 +1,162 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the StatusCodeReportChartsStatusCodeSeriesInner type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &StatusCodeReportChartsStatusCodeSeriesInner{} + +// StatusCodeReportChartsStatusCodeSeriesInner struct for StatusCodeReportChartsStatusCodeSeriesInner +type StatusCodeReportChartsStatusCodeSeriesInner struct { + Name *string `json:"name,omitempty"` + Data []float64 `json:"data,omitempty"` +} + +// NewStatusCodeReportChartsStatusCodeSeriesInner instantiates a new StatusCodeReportChartsStatusCodeSeriesInner object +// This constructor will assign default values to properties that have it defined, +// 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 NewStatusCodeReportChartsStatusCodeSeriesInner() *StatusCodeReportChartsStatusCodeSeriesInner { + this := StatusCodeReportChartsStatusCodeSeriesInner{} + return &this +} + +// NewStatusCodeReportChartsStatusCodeSeriesInnerWithDefaults instantiates a new StatusCodeReportChartsStatusCodeSeriesInner object +// This 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 NewStatusCodeReportChartsStatusCodeSeriesInnerWithDefaults() *StatusCodeReportChartsStatusCodeSeriesInner { + this := StatusCodeReportChartsStatusCodeSeriesInner{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *StatusCodeReportChartsStatusCodeSeriesInner) 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 *StatusCodeReportChartsStatusCodeSeriesInner) 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 *StatusCodeReportChartsStatusCodeSeriesInner) 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 *StatusCodeReportChartsStatusCodeSeriesInner) SetName(v string) { + o.Name = &v +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *StatusCodeReportChartsStatusCodeSeriesInner) GetData() []float64 { + if o == nil || IsNil(o.Data) { + var ret []float64 + return ret + } + return o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *StatusCodeReportChartsStatusCodeSeriesInner) GetDataOk() ([]float64, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *StatusCodeReportChartsStatusCodeSeriesInner) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given []float64 and assigns it to the Data field. +func (o *StatusCodeReportChartsStatusCodeSeriesInner) SetData(v []float64) { + o.Data = v +} + +func (o StatusCodeReportChartsStatusCodeSeriesInner) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o StatusCodeReportChartsStatusCodeSeriesInner) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + return toSerialize, nil +} + +type NullableStatusCodeReportChartsStatusCodeSeriesInner struct { + value *StatusCodeReportChartsStatusCodeSeriesInner + isSet bool +} + +func (v NullableStatusCodeReportChartsStatusCodeSeriesInner) Get() *StatusCodeReportChartsStatusCodeSeriesInner { + return v.value +} + +func (v *NullableStatusCodeReportChartsStatusCodeSeriesInner) Set(val *StatusCodeReportChartsStatusCodeSeriesInner) { + v.value = val + v.isSet = true +} + +func (v NullableStatusCodeReportChartsStatusCodeSeriesInner) IsSet() bool { + return v.isSet +} + +func (v *NullableStatusCodeReportChartsStatusCodeSeriesInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableStatusCodeReportChartsStatusCodeSeriesInner(val *StatusCodeReportChartsStatusCodeSeriesInner) *NullableStatusCodeReportChartsStatusCodeSeriesInner { + return &NullableStatusCodeReportChartsStatusCodeSeriesInner{value: val, isSet: true} +} + +func (v NullableStatusCodeReportChartsStatusCodeSeriesInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableStatusCodeReportChartsStatusCodeSeriesInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_status_code_report_data.go b/model_status_code_report_data.go new file mode 100644 index 0000000..de20f34 --- /dev/null +++ b/model_status_code_report_data.go @@ -0,0 +1,126 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the StatusCodeReportData type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &StatusCodeReportData{} + +// StatusCodeReportData struct for StatusCodeReportData +type StatusCodeReportData struct { + Data *StatusCodeReport `json:"data,omitempty"` +} + +// NewStatusCodeReportData instantiates a new StatusCodeReportData object +// This constructor will assign default values to properties that have it defined, +// 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 NewStatusCodeReportData() *StatusCodeReportData { + this := StatusCodeReportData{} + return &this +} + +// NewStatusCodeReportDataWithDefaults instantiates a new StatusCodeReportData object +// This 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 NewStatusCodeReportDataWithDefaults() *StatusCodeReportData { + this := StatusCodeReportData{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *StatusCodeReportData) GetData() StatusCodeReport { + if o == nil || IsNil(o.Data) { + var ret StatusCodeReport + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *StatusCodeReportData) GetDataOk() (*StatusCodeReport, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *StatusCodeReportData) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given StatusCodeReport and assigns it to the Data field. +func (o *StatusCodeReportData) SetData(v StatusCodeReport) { + o.Data = &v +} + +func (o StatusCodeReportData) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o StatusCodeReportData) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + return toSerialize, nil +} + +type NullableStatusCodeReportData struct { + value *StatusCodeReportData + isSet bool +} + +func (v NullableStatusCodeReportData) Get() *StatusCodeReportData { + return v.value +} + +func (v *NullableStatusCodeReportData) Set(val *StatusCodeReportData) { + v.value = val + v.isSet = true +} + +func (v NullableStatusCodeReportData) IsSet() bool { + return v.isSet +} + +func (v *NullableStatusCodeReportData) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableStatusCodeReportData(val *StatusCodeReportData) *NullableStatusCodeReportData { + return &NullableStatusCodeReportData{value: val, isSet: true} +} + +func (v NullableStatusCodeReportData) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableStatusCodeReportData) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_status_code_report_statistics.go b/model_status_code_report_statistics.go new file mode 100644 index 0000000..eb890b6 --- /dev/null +++ b/model_status_code_report_statistics.go @@ -0,0 +1,126 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the StatusCodeReportStatistics type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &StatusCodeReportStatistics{} + +// StatusCodeReportStatistics struct for StatusCodeReportStatistics +type StatusCodeReportStatistics struct { + StatusCodes *StatusCodeReportStatisticsStatusCodes `json:"status_codes,omitempty"` +} + +// NewStatusCodeReportStatistics instantiates a new StatusCodeReportStatistics object +// This constructor will assign default values to properties that have it defined, +// 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 NewStatusCodeReportStatistics() *StatusCodeReportStatistics { + this := StatusCodeReportStatistics{} + return &this +} + +// NewStatusCodeReportStatisticsWithDefaults instantiates a new StatusCodeReportStatistics object +// This 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 NewStatusCodeReportStatisticsWithDefaults() *StatusCodeReportStatistics { + this := StatusCodeReportStatistics{} + return &this +} + +// GetStatusCodes returns the StatusCodes field value if set, zero value otherwise. +func (o *StatusCodeReportStatistics) GetStatusCodes() StatusCodeReportStatisticsStatusCodes { + if o == nil || IsNil(o.StatusCodes) { + var ret StatusCodeReportStatisticsStatusCodes + return ret + } + return *o.StatusCodes +} + +// GetStatusCodesOk returns a tuple with the StatusCodes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *StatusCodeReportStatistics) GetStatusCodesOk() (*StatusCodeReportStatisticsStatusCodes, bool) { + if o == nil || IsNil(o.StatusCodes) { + return nil, false + } + return o.StatusCodes, true +} + +// HasStatusCodes returns a boolean if a field has been set. +func (o *StatusCodeReportStatistics) HasStatusCodes() bool { + if o != nil && !IsNil(o.StatusCodes) { + return true + } + + return false +} + +// SetStatusCodes gets a reference to the given StatusCodeReportStatisticsStatusCodes and assigns it to the StatusCodes field. +func (o *StatusCodeReportStatistics) SetStatusCodes(v StatusCodeReportStatisticsStatusCodes) { + o.StatusCodes = &v +} + +func (o StatusCodeReportStatistics) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o StatusCodeReportStatistics) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.StatusCodes) { + toSerialize["status_codes"] = o.StatusCodes + } + return toSerialize, nil +} + +type NullableStatusCodeReportStatistics struct { + value *StatusCodeReportStatistics + isSet bool +} + +func (v NullableStatusCodeReportStatistics) Get() *StatusCodeReportStatistics { + return v.value +} + +func (v *NullableStatusCodeReportStatistics) Set(val *StatusCodeReportStatistics) { + v.value = val + v.isSet = true +} + +func (v NullableStatusCodeReportStatistics) IsSet() bool { + return v.isSet +} + +func (v *NullableStatusCodeReportStatistics) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableStatusCodeReportStatistics(val *StatusCodeReportStatistics) *NullableStatusCodeReportStatistics { + return &NullableStatusCodeReportStatistics{value: val, isSet: true} +} + +func (v NullableStatusCodeReportStatistics) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableStatusCodeReportStatistics) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_status_code_report_statistics_status_codes.go b/model_status_code_report_statistics_status_codes.go new file mode 100644 index 0000000..e535c8c --- /dev/null +++ b/model_status_code_report_statistics_status_codes.go @@ -0,0 +1,234 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the StatusCodeReportStatisticsStatusCodes type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &StatusCodeReportStatisticsStatusCodes{} + +// StatusCodeReportStatisticsStatusCodes struct for StatusCodeReportStatisticsStatusCodes +type StatusCodeReportStatisticsStatusCodes struct { + Var2xxSum *int32 `json:"2xx_sum,omitempty"` + Var3xxSum *int32 `json:"3xx_sum,omitempty"` + Var4xxSum *int32 `json:"4xx_sum,omitempty"` + Var5xxSum *int32 `json:"5xx_sum,omitempty"` +} + +// NewStatusCodeReportStatisticsStatusCodes instantiates a new StatusCodeReportStatisticsStatusCodes object +// This constructor will assign default values to properties that have it defined, +// 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 NewStatusCodeReportStatisticsStatusCodes() *StatusCodeReportStatisticsStatusCodes { + this := StatusCodeReportStatisticsStatusCodes{} + return &this +} + +// NewStatusCodeReportStatisticsStatusCodesWithDefaults instantiates a new StatusCodeReportStatisticsStatusCodes object +// This 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 NewStatusCodeReportStatisticsStatusCodesWithDefaults() *StatusCodeReportStatisticsStatusCodes { + this := StatusCodeReportStatisticsStatusCodes{} + return &this +} + +// GetVar2xxSum returns the Var2xxSum field value if set, zero value otherwise. +func (o *StatusCodeReportStatisticsStatusCodes) GetVar2xxSum() int32 { + if o == nil || IsNil(o.Var2xxSum) { + var ret int32 + return ret + } + return *o.Var2xxSum +} + +// GetVar2xxSumOk returns a tuple with the Var2xxSum field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *StatusCodeReportStatisticsStatusCodes) GetVar2xxSumOk() (*int32, bool) { + if o == nil || IsNil(o.Var2xxSum) { + return nil, false + } + return o.Var2xxSum, true +} + +// HasVar2xxSum returns a boolean if a field has been set. +func (o *StatusCodeReportStatisticsStatusCodes) HasVar2xxSum() bool { + if o != nil && !IsNil(o.Var2xxSum) { + return true + } + + return false +} + +// SetVar2xxSum gets a reference to the given int32 and assigns it to the Var2xxSum field. +func (o *StatusCodeReportStatisticsStatusCodes) SetVar2xxSum(v int32) { + o.Var2xxSum = &v +} + +// GetVar3xxSum returns the Var3xxSum field value if set, zero value otherwise. +func (o *StatusCodeReportStatisticsStatusCodes) GetVar3xxSum() int32 { + if o == nil || IsNil(o.Var3xxSum) { + var ret int32 + return ret + } + return *o.Var3xxSum +} + +// GetVar3xxSumOk returns a tuple with the Var3xxSum field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *StatusCodeReportStatisticsStatusCodes) GetVar3xxSumOk() (*int32, bool) { + if o == nil || IsNil(o.Var3xxSum) { + return nil, false + } + return o.Var3xxSum, true +} + +// HasVar3xxSum returns a boolean if a field has been set. +func (o *StatusCodeReportStatisticsStatusCodes) HasVar3xxSum() bool { + if o != nil && !IsNil(o.Var3xxSum) { + return true + } + + return false +} + +// SetVar3xxSum gets a reference to the given int32 and assigns it to the Var3xxSum field. +func (o *StatusCodeReportStatisticsStatusCodes) SetVar3xxSum(v int32) { + o.Var3xxSum = &v +} + +// GetVar4xxSum returns the Var4xxSum field value if set, zero value otherwise. +func (o *StatusCodeReportStatisticsStatusCodes) GetVar4xxSum() int32 { + if o == nil || IsNil(o.Var4xxSum) { + var ret int32 + return ret + } + return *o.Var4xxSum +} + +// GetVar4xxSumOk returns a tuple with the Var4xxSum field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *StatusCodeReportStatisticsStatusCodes) GetVar4xxSumOk() (*int32, bool) { + if o == nil || IsNil(o.Var4xxSum) { + return nil, false + } + return o.Var4xxSum, true +} + +// HasVar4xxSum returns a boolean if a field has been set. +func (o *StatusCodeReportStatisticsStatusCodes) HasVar4xxSum() bool { + if o != nil && !IsNil(o.Var4xxSum) { + return true + } + + return false +} + +// SetVar4xxSum gets a reference to the given int32 and assigns it to the Var4xxSum field. +func (o *StatusCodeReportStatisticsStatusCodes) SetVar4xxSum(v int32) { + o.Var4xxSum = &v +} + +// GetVar5xxSum returns the Var5xxSum field value if set, zero value otherwise. +func (o *StatusCodeReportStatisticsStatusCodes) GetVar5xxSum() int32 { + if o == nil || IsNil(o.Var5xxSum) { + var ret int32 + return ret + } + return *o.Var5xxSum +} + +// GetVar5xxSumOk returns a tuple with the Var5xxSum field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *StatusCodeReportStatisticsStatusCodes) GetVar5xxSumOk() (*int32, bool) { + if o == nil || IsNil(o.Var5xxSum) { + return nil, false + } + return o.Var5xxSum, true +} + +// HasVar5xxSum returns a boolean if a field has been set. +func (o *StatusCodeReportStatisticsStatusCodes) HasVar5xxSum() bool { + if o != nil && !IsNil(o.Var5xxSum) { + return true + } + + return false +} + +// SetVar5xxSum gets a reference to the given int32 and assigns it to the Var5xxSum field. +func (o *StatusCodeReportStatisticsStatusCodes) SetVar5xxSum(v int32) { + o.Var5xxSum = &v +} + +func (o StatusCodeReportStatisticsStatusCodes) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o StatusCodeReportStatisticsStatusCodes) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Var2xxSum) { + toSerialize["2xx_sum"] = o.Var2xxSum + } + if !IsNil(o.Var3xxSum) { + toSerialize["3xx_sum"] = o.Var3xxSum + } + if !IsNil(o.Var4xxSum) { + toSerialize["4xx_sum"] = o.Var4xxSum + } + if !IsNil(o.Var5xxSum) { + toSerialize["5xx_sum"] = o.Var5xxSum + } + return toSerialize, nil +} + +type NullableStatusCodeReportStatisticsStatusCodes struct { + value *StatusCodeReportStatisticsStatusCodes + isSet bool +} + +func (v NullableStatusCodeReportStatisticsStatusCodes) Get() *StatusCodeReportStatisticsStatusCodes { + return v.value +} + +func (v *NullableStatusCodeReportStatisticsStatusCodes) Set(val *StatusCodeReportStatisticsStatusCodes) { + v.value = val + v.isSet = true +} + +func (v NullableStatusCodeReportStatisticsStatusCodes) IsSet() bool { + return v.isSet +} + +func (v *NullableStatusCodeReportStatisticsStatusCodes) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableStatusCodeReportStatisticsStatusCodes(val *StatusCodeReportStatisticsStatusCodes) *NullableStatusCodeReportStatisticsStatusCodes { + return &NullableStatusCodeReportStatisticsStatusCodes{value: val, isSet: true} +} + +func (v NullableStatusCodeReportStatisticsStatusCodes) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableStatusCodeReportStatisticsStatusCodes) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_status_code_summary.go b/model_status_code_summary.go new file mode 100644 index 0000000..49186c2 --- /dev/null +++ b/model_status_code_summary.go @@ -0,0 +1,166 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the StatusCodeSummary type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &StatusCodeSummary{} + +// StatusCodeSummary struct for StatusCodeSummary +type StatusCodeSummary struct { + // Deprecated + Statistics map[string]interface{} `json:"statistics,omitempty"` + Charts *StatusCodeSummaryCharts `json:"charts,omitempty"` +} + +// NewStatusCodeSummary instantiates a new StatusCodeSummary object +// This constructor will assign default values to properties that have it defined, +// 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 NewStatusCodeSummary() *StatusCodeSummary { + this := StatusCodeSummary{} + return &this +} + +// NewStatusCodeSummaryWithDefaults instantiates a new StatusCodeSummary object +// This 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 NewStatusCodeSummaryWithDefaults() *StatusCodeSummary { + this := StatusCodeSummary{} + return &this +} + +// GetStatistics returns the Statistics field value if set, zero value otherwise. +// Deprecated +func (o *StatusCodeSummary) GetStatistics() map[string]interface{} { + if o == nil || IsNil(o.Statistics) { + var ret map[string]interface{} + return ret + } + return o.Statistics +} + +// GetStatisticsOk returns a tuple with the Statistics field value if set, nil otherwise +// and a boolean to check if the value has been set. +// Deprecated +func (o *StatusCodeSummary) GetStatisticsOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Statistics) { + return map[string]interface{}{}, false + } + return o.Statistics, true +} + +// HasStatistics returns a boolean if a field has been set. +func (o *StatusCodeSummary) HasStatistics() bool { + if o != nil && !IsNil(o.Statistics) { + return true + } + + return false +} + +// SetStatistics gets a reference to the given map[string]interface{} and assigns it to the Statistics field. +// Deprecated +func (o *StatusCodeSummary) SetStatistics(v map[string]interface{}) { + o.Statistics = v +} + +// GetCharts returns the Charts field value if set, zero value otherwise. +func (o *StatusCodeSummary) GetCharts() StatusCodeSummaryCharts { + if o == nil || IsNil(o.Charts) { + var ret StatusCodeSummaryCharts + return ret + } + return *o.Charts +} + +// GetChartsOk returns a tuple with the Charts field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *StatusCodeSummary) GetChartsOk() (*StatusCodeSummaryCharts, bool) { + if o == nil || IsNil(o.Charts) { + return nil, false + } + return o.Charts, true +} + +// HasCharts returns a boolean if a field has been set. +func (o *StatusCodeSummary) HasCharts() bool { + if o != nil && !IsNil(o.Charts) { + return true + } + + return false +} + +// SetCharts gets a reference to the given StatusCodeSummaryCharts and assigns it to the Charts field. +func (o *StatusCodeSummary) SetCharts(v StatusCodeSummaryCharts) { + o.Charts = &v +} + +func (o StatusCodeSummary) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o StatusCodeSummary) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Statistics) { + toSerialize["statistics"] = o.Statistics + } + if !IsNil(o.Charts) { + toSerialize["charts"] = o.Charts + } + return toSerialize, nil +} + +type NullableStatusCodeSummary struct { + value *StatusCodeSummary + isSet bool +} + +func (v NullableStatusCodeSummary) Get() *StatusCodeSummary { + return v.value +} + +func (v *NullableStatusCodeSummary) Set(val *StatusCodeSummary) { + v.value = val + v.isSet = true +} + +func (v NullableStatusCodeSummary) IsSet() bool { + return v.isSet +} + +func (v *NullableStatusCodeSummary) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableStatusCodeSummary(val *StatusCodeSummary) *NullableStatusCodeSummary { + return &NullableStatusCodeSummary{value: val, isSet: true} +} + +func (v NullableStatusCodeSummary) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableStatusCodeSummary) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_status_code_summary_charts.go b/model_status_code_summary_charts.go new file mode 100644 index 0000000..d3e29fb --- /dev/null +++ b/model_status_code_summary_charts.go @@ -0,0 +1,126 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the StatusCodeSummaryCharts type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &StatusCodeSummaryCharts{} + +// StatusCodeSummaryCharts struct for StatusCodeSummaryCharts +type StatusCodeSummaryCharts struct { + StatusCode []StatusCodeSummaryChartsStatusCodeInner `json:"status_code,omitempty"` +} + +// NewStatusCodeSummaryCharts instantiates a new StatusCodeSummaryCharts object +// This constructor will assign default values to properties that have it defined, +// 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 NewStatusCodeSummaryCharts() *StatusCodeSummaryCharts { + this := StatusCodeSummaryCharts{} + return &this +} + +// NewStatusCodeSummaryChartsWithDefaults instantiates a new StatusCodeSummaryCharts object +// This 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 NewStatusCodeSummaryChartsWithDefaults() *StatusCodeSummaryCharts { + this := StatusCodeSummaryCharts{} + return &this +} + +// GetStatusCode returns the StatusCode field value if set, zero value otherwise. +func (o *StatusCodeSummaryCharts) GetStatusCode() []StatusCodeSummaryChartsStatusCodeInner { + if o == nil || IsNil(o.StatusCode) { + var ret []StatusCodeSummaryChartsStatusCodeInner + return ret + } + return o.StatusCode +} + +// GetStatusCodeOk returns a tuple with the StatusCode field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *StatusCodeSummaryCharts) GetStatusCodeOk() ([]StatusCodeSummaryChartsStatusCodeInner, bool) { + if o == nil || IsNil(o.StatusCode) { + return nil, false + } + return o.StatusCode, true +} + +// HasStatusCode returns a boolean if a field has been set. +func (o *StatusCodeSummaryCharts) HasStatusCode() bool { + if o != nil && !IsNil(o.StatusCode) { + return true + } + + return false +} + +// SetStatusCode gets a reference to the given []StatusCodeSummaryChartsStatusCodeInner and assigns it to the StatusCode field. +func (o *StatusCodeSummaryCharts) SetStatusCode(v []StatusCodeSummaryChartsStatusCodeInner) { + o.StatusCode = v +} + +func (o StatusCodeSummaryCharts) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o StatusCodeSummaryCharts) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.StatusCode) { + toSerialize["status_code"] = o.StatusCode + } + return toSerialize, nil +} + +type NullableStatusCodeSummaryCharts struct { + value *StatusCodeSummaryCharts + isSet bool +} + +func (v NullableStatusCodeSummaryCharts) Get() *StatusCodeSummaryCharts { + return v.value +} + +func (v *NullableStatusCodeSummaryCharts) Set(val *StatusCodeSummaryCharts) { + v.value = val + v.isSet = true +} + +func (v NullableStatusCodeSummaryCharts) IsSet() bool { + return v.isSet +} + +func (v *NullableStatusCodeSummaryCharts) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableStatusCodeSummaryCharts(val *StatusCodeSummaryCharts) *NullableStatusCodeSummaryCharts { + return &NullableStatusCodeSummaryCharts{value: val, isSet: true} +} + +func (v NullableStatusCodeSummaryCharts) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableStatusCodeSummaryCharts) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_status_code_summary_charts_status_code_inner.go b/model_status_code_summary_charts_status_code_inner.go new file mode 100644 index 0000000..84f36b3 --- /dev/null +++ b/model_status_code_summary_charts_status_code_inner.go @@ -0,0 +1,162 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the StatusCodeSummaryChartsStatusCodeInner type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &StatusCodeSummaryChartsStatusCodeInner{} + +// StatusCodeSummaryChartsStatusCodeInner struct for StatusCodeSummaryChartsStatusCodeInner +type StatusCodeSummaryChartsStatusCodeInner struct { + Name *string `json:"name,omitempty"` + Y *int32 `json:"y,omitempty"` +} + +// NewStatusCodeSummaryChartsStatusCodeInner instantiates a new StatusCodeSummaryChartsStatusCodeInner object +// This constructor will assign default values to properties that have it defined, +// 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 NewStatusCodeSummaryChartsStatusCodeInner() *StatusCodeSummaryChartsStatusCodeInner { + this := StatusCodeSummaryChartsStatusCodeInner{} + return &this +} + +// NewStatusCodeSummaryChartsStatusCodeInnerWithDefaults instantiates a new StatusCodeSummaryChartsStatusCodeInner object +// This 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 NewStatusCodeSummaryChartsStatusCodeInnerWithDefaults() *StatusCodeSummaryChartsStatusCodeInner { + this := StatusCodeSummaryChartsStatusCodeInner{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *StatusCodeSummaryChartsStatusCodeInner) 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 *StatusCodeSummaryChartsStatusCodeInner) 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 *StatusCodeSummaryChartsStatusCodeInner) 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 *StatusCodeSummaryChartsStatusCodeInner) SetName(v string) { + o.Name = &v +} + +// GetY returns the Y field value if set, zero value otherwise. +func (o *StatusCodeSummaryChartsStatusCodeInner) GetY() int32 { + if o == nil || IsNil(o.Y) { + var ret int32 + return ret + } + return *o.Y +} + +// GetYOk returns a tuple with the Y field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *StatusCodeSummaryChartsStatusCodeInner) GetYOk() (*int32, bool) { + if o == nil || IsNil(o.Y) { + return nil, false + } + return o.Y, true +} + +// HasY returns a boolean if a field has been set. +func (o *StatusCodeSummaryChartsStatusCodeInner) HasY() bool { + if o != nil && !IsNil(o.Y) { + return true + } + + return false +} + +// SetY gets a reference to the given int32 and assigns it to the Y field. +func (o *StatusCodeSummaryChartsStatusCodeInner) SetY(v int32) { + o.Y = &v +} + +func (o StatusCodeSummaryChartsStatusCodeInner) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o StatusCodeSummaryChartsStatusCodeInner) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Y) { + toSerialize["y"] = o.Y + } + return toSerialize, nil +} + +type NullableStatusCodeSummaryChartsStatusCodeInner struct { + value *StatusCodeSummaryChartsStatusCodeInner + isSet bool +} + +func (v NullableStatusCodeSummaryChartsStatusCodeInner) Get() *StatusCodeSummaryChartsStatusCodeInner { + return v.value +} + +func (v *NullableStatusCodeSummaryChartsStatusCodeInner) Set(val *StatusCodeSummaryChartsStatusCodeInner) { + v.value = val + v.isSet = true +} + +func (v NullableStatusCodeSummaryChartsStatusCodeInner) IsSet() bool { + return v.isSet +} + +func (v *NullableStatusCodeSummaryChartsStatusCodeInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableStatusCodeSummaryChartsStatusCodeInner(val *StatusCodeSummaryChartsStatusCodeInner) *NullableStatusCodeSummaryChartsStatusCodeInner { + return &NullableStatusCodeSummaryChartsStatusCodeInner{value: val, isSet: true} +} + +func (v NullableStatusCodeSummaryChartsStatusCodeInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableStatusCodeSummaryChartsStatusCodeInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_status_code_summary_data.go b/model_status_code_summary_data.go new file mode 100644 index 0000000..af71c7e --- /dev/null +++ b/model_status_code_summary_data.go @@ -0,0 +1,126 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the StatusCodeSummaryData type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &StatusCodeSummaryData{} + +// StatusCodeSummaryData struct for StatusCodeSummaryData +type StatusCodeSummaryData struct { + Data *StatusCodeSummary `json:"data,omitempty"` +} + +// NewStatusCodeSummaryData instantiates a new StatusCodeSummaryData object +// This constructor will assign default values to properties that have it defined, +// 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 NewStatusCodeSummaryData() *StatusCodeSummaryData { + this := StatusCodeSummaryData{} + return &this +} + +// NewStatusCodeSummaryDataWithDefaults instantiates a new StatusCodeSummaryData object +// This 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 NewStatusCodeSummaryDataWithDefaults() *StatusCodeSummaryData { + this := StatusCodeSummaryData{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *StatusCodeSummaryData) GetData() StatusCodeSummary { + if o == nil || IsNil(o.Data) { + var ret StatusCodeSummary + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *StatusCodeSummaryData) GetDataOk() (*StatusCodeSummary, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *StatusCodeSummaryData) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given StatusCodeSummary and assigns it to the Data field. +func (o *StatusCodeSummaryData) SetData(v StatusCodeSummary) { + o.Data = &v +} + +func (o StatusCodeSummaryData) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o StatusCodeSummaryData) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + return toSerialize, nil +} + +type NullableStatusCodeSummaryData struct { + value *StatusCodeSummaryData + isSet bool +} + +func (v NullableStatusCodeSummaryData) Get() *StatusCodeSummaryData { + return v.value +} + +func (v *NullableStatusCodeSummaryData) Set(val *StatusCodeSummaryData) { + v.value = val + v.isSet = true +} + +func (v NullableStatusCodeSummaryData) IsSet() bool { + return v.isSet +} + +func (v *NullableStatusCodeSummaryData) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableStatusCodeSummaryData(val *StatusCodeSummaryData) *NullableStatusCodeSummaryData { + return &NullableStatusCodeSummaryData{value: val, isSet: true} +} + +func (v NullableStatusCodeSummaryData) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableStatusCodeSummaryData) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_tcp_config.go b/model_tcp_config.go new file mode 100644 index 0000000..8b2f3ee --- /dev/null +++ b/model_tcp_config.go @@ -0,0 +1,145 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the TcpConfig type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TcpConfig{} + +// TcpConfig struct for TcpConfig +type TcpConfig struct { + Port int32 `json:"port"` + // In milliseconds + Timeout int32 `json:"timeout"` +} + +// NewTcpConfig instantiates a new TcpConfig object +// This constructor will assign default values to properties that have it defined, +// 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 NewTcpConfig(port int32, timeout int32) *TcpConfig { + this := TcpConfig{} + this.Port = port + this.Timeout = timeout + return &this +} + +// NewTcpConfigWithDefaults instantiates a new TcpConfig object +// This 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 NewTcpConfigWithDefaults() *TcpConfig { + this := TcpConfig{} + return &this +} + +// GetPort returns the Port field value +func (o *TcpConfig) GetPort() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Port +} + +// GetPortOk returns a tuple with the Port field value +// and a boolean to check if the value has been set. +func (o *TcpConfig) GetPortOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Port, true +} + +// SetPort sets field value +func (o *TcpConfig) SetPort(v int32) { + o.Port = v +} + +// GetTimeout returns the Timeout field value +func (o *TcpConfig) GetTimeout() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Timeout +} + +// GetTimeoutOk returns a tuple with the Timeout field value +// and a boolean to check if the value has been set. +func (o *TcpConfig) GetTimeoutOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Timeout, true +} + +// SetTimeout sets field value +func (o *TcpConfig) SetTimeout(v int32) { + o.Timeout = v +} + +func (o TcpConfig) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TcpConfig) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["port"] = o.Port + toSerialize["timeout"] = o.Timeout + return toSerialize, nil +} + +type NullableTcpConfig struct { + value *TcpConfig + isSet bool +} + +func (v NullableTcpConfig) Get() *TcpConfig { + return v.value +} + +func (v *NullableTcpConfig) Set(val *TcpConfig) { + v.value = val + v.isSet = true +} + +func (v NullableTcpConfig) IsSet() bool { + return v.isSet +} + +func (v *NullableTcpConfig) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTcpConfig(val *TcpConfig) *NullableTcpConfig { + return &NullableTcpConfig{value: val, isSet: true} +} + +func (v NullableTcpConfig) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTcpConfig) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_tlsa_record.go b/model_tlsa_record.go new file mode 100644 index 0000000..361893d --- /dev/null +++ b/model_tlsa_record.go @@ -0,0 +1,520 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" + "time" +) + +// checks if the TLSARecord type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TLSARecord{} + +// TLSARecord struct for TLSARecord +type TLSARecord struct { + Value *TLSARecordValue `json:"value,omitempty"` + Type *string `json:"type,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Ttl *int32 `json:"ttl,omitempty"` + Cloud *bool `json:"cloud,omitempty"` + UpstreamHttps *string `json:"upstream_https,omitempty"` + IpFilterMode *DnsRecordIpFilterMode `json:"ip_filter_mode,omitempty"` + // Protected records cannot be modified or deleted by user. + IsProtected *bool `json:"is_protected,omitempty"` + Usage []string `json:"usage,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty"` + UpdatedAt *time.Time `json:"updated_at,omitempty"` +} + +// NewTLSARecord instantiates a new TLSARecord object +// This constructor will assign default values to properties that have it defined, +// 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 NewTLSARecord() *TLSARecord { + this := TLSARecord{} + var cloud bool = false + this.Cloud = &cloud + return &this +} + +// NewTLSARecordWithDefaults instantiates a new TLSARecord object +// This 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 NewTLSARecordWithDefaults() *TLSARecord { + this := TLSARecord{} + var type_ string = "tlsa" + this.Type = &type_ + var cloud bool = false + this.Cloud = &cloud + return &this +} + +// GetValue returns the Value field value if set, zero value otherwise. +func (o *TLSARecord) GetValue() TLSARecordValue { + if o == nil || IsNil(o.Value) { + var ret TLSARecordValue + return ret + } + return *o.Value +} + +// GetValueOk returns a tuple with the Value field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TLSARecord) GetValueOk() (*TLSARecordValue, bool) { + if o == nil || IsNil(o.Value) { + return nil, false + } + return o.Value, true +} + +// HasValue returns a boolean if a field has been set. +func (o *TLSARecord) HasValue() bool { + if o != nil && !IsNil(o.Value) { + return true + } + + return false +} + +// SetValue gets a reference to the given TLSARecordValue and assigns it to the Value field. +func (o *TLSARecord) SetValue(v TLSARecordValue) { + o.Value = &v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *TLSARecord) 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 *TLSARecord) 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 *TLSARecord) 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 *TLSARecord) SetType(v string) { + o.Type = &v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *TLSARecord) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TLSARecord) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *TLSARecord) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *TLSARecord) SetId(v string) { + o.Id = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *TLSARecord) 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 *TLSARecord) 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 *TLSARecord) 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 *TLSARecord) SetName(v string) { + o.Name = &v +} + +// GetTtl returns the Ttl field value if set, zero value otherwise. +func (o *TLSARecord) GetTtl() int32 { + if o == nil || IsNil(o.Ttl) { + var ret int32 + return ret + } + return *o.Ttl +} + +// GetTtlOk returns a tuple with the Ttl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TLSARecord) GetTtlOk() (*int32, bool) { + if o == nil || IsNil(o.Ttl) { + return nil, false + } + return o.Ttl, true +} + +// HasTtl returns a boolean if a field has been set. +func (o *TLSARecord) HasTtl() bool { + if o != nil && !IsNil(o.Ttl) { + return true + } + + return false +} + +// SetTtl gets a reference to the given int32 and assigns it to the Ttl field. +func (o *TLSARecord) SetTtl(v int32) { + o.Ttl = &v +} + +// GetCloud returns the Cloud field value if set, zero value otherwise. +func (o *TLSARecord) GetCloud() bool { + if o == nil || IsNil(o.Cloud) { + var ret bool + return ret + } + return *o.Cloud +} + +// GetCloudOk returns a tuple with the Cloud field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TLSARecord) GetCloudOk() (*bool, bool) { + if o == nil || IsNil(o.Cloud) { + return nil, false + } + return o.Cloud, true +} + +// HasCloud returns a boolean if a field has been set. +func (o *TLSARecord) HasCloud() bool { + if o != nil && !IsNil(o.Cloud) { + return true + } + + return false +} + +// SetCloud gets a reference to the given bool and assigns it to the Cloud field. +func (o *TLSARecord) SetCloud(v bool) { + o.Cloud = &v +} + +// GetUpstreamHttps returns the UpstreamHttps field value if set, zero value otherwise. +func (o *TLSARecord) GetUpstreamHttps() string { + if o == nil || IsNil(o.UpstreamHttps) { + var ret string + return ret + } + return *o.UpstreamHttps +} + +// GetUpstreamHttpsOk returns a tuple with the UpstreamHttps field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TLSARecord) GetUpstreamHttpsOk() (*string, bool) { + if o == nil || IsNil(o.UpstreamHttps) { + return nil, false + } + return o.UpstreamHttps, true +} + +// HasUpstreamHttps returns a boolean if a field has been set. +func (o *TLSARecord) HasUpstreamHttps() bool { + if o != nil && !IsNil(o.UpstreamHttps) { + return true + } + + return false +} + +// SetUpstreamHttps gets a reference to the given string and assigns it to the UpstreamHttps field. +func (o *TLSARecord) SetUpstreamHttps(v string) { + o.UpstreamHttps = &v +} + +// GetIpFilterMode returns the IpFilterMode field value if set, zero value otherwise. +func (o *TLSARecord) GetIpFilterMode() DnsRecordIpFilterMode { + if o == nil || IsNil(o.IpFilterMode) { + var ret DnsRecordIpFilterMode + return ret + } + return *o.IpFilterMode +} + +// GetIpFilterModeOk returns a tuple with the IpFilterMode field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TLSARecord) GetIpFilterModeOk() (*DnsRecordIpFilterMode, bool) { + if o == nil || IsNil(o.IpFilterMode) { + return nil, false + } + return o.IpFilterMode, true +} + +// HasIpFilterMode returns a boolean if a field has been set. +func (o *TLSARecord) HasIpFilterMode() bool { + if o != nil && !IsNil(o.IpFilterMode) { + return true + } + + return false +} + +// SetIpFilterMode gets a reference to the given DnsRecordIpFilterMode and assigns it to the IpFilterMode field. +func (o *TLSARecord) SetIpFilterMode(v DnsRecordIpFilterMode) { + o.IpFilterMode = &v +} + +// GetIsProtected returns the IsProtected field value if set, zero value otherwise. +func (o *TLSARecord) GetIsProtected() bool { + if o == nil || IsNil(o.IsProtected) { + var ret bool + return ret + } + return *o.IsProtected +} + +// GetIsProtectedOk returns a tuple with the IsProtected field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TLSARecord) GetIsProtectedOk() (*bool, bool) { + if o == nil || IsNil(o.IsProtected) { + return nil, false + } + return o.IsProtected, true +} + +// HasIsProtected returns a boolean if a field has been set. +func (o *TLSARecord) HasIsProtected() bool { + if o != nil && !IsNil(o.IsProtected) { + return true + } + + return false +} + +// SetIsProtected gets a reference to the given bool and assigns it to the IsProtected field. +func (o *TLSARecord) SetIsProtected(v bool) { + o.IsProtected = &v +} + +// GetUsage returns the Usage field value if set, zero value otherwise. +func (o *TLSARecord) GetUsage() []string { + if o == nil || IsNil(o.Usage) { + var ret []string + return ret + } + return o.Usage +} + +// GetUsageOk returns a tuple with the Usage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TLSARecord) GetUsageOk() ([]string, bool) { + if o == nil || IsNil(o.Usage) { + return nil, false + } + return o.Usage, true +} + +// HasUsage returns a boolean if a field has been set. +func (o *TLSARecord) HasUsage() bool { + if o != nil && !IsNil(o.Usage) { + return true + } + + return false +} + +// SetUsage gets a reference to the given []string and assigns it to the Usage field. +func (o *TLSARecord) SetUsage(v []string) { + o.Usage = v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *TLSARecord) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TLSARecord) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *TLSARecord) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *TLSARecord) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *TLSARecord) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TLSARecord) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *TLSARecord) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *TLSARecord) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +func (o TLSARecord) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TLSARecord) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Value) { + toSerialize["value"] = o.Value + } + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + // skip: id is readOnly + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Ttl) { + toSerialize["ttl"] = o.Ttl + } + if !IsNil(o.Cloud) { + toSerialize["cloud"] = o.Cloud + } + if !IsNil(o.UpstreamHttps) { + toSerialize["upstream_https"] = o.UpstreamHttps + } + if !IsNil(o.IpFilterMode) { + toSerialize["ip_filter_mode"] = o.IpFilterMode + } + // skip: is_protected is readOnly + // skip: usage is readOnly + // skip: created_at is readOnly + // skip: updated_at is readOnly + return toSerialize, nil +} + +type NullableTLSARecord struct { + value *TLSARecord + isSet bool +} + +func (v NullableTLSARecord) Get() *TLSARecord { + return v.value +} + +func (v *NullableTLSARecord) Set(val *TLSARecord) { + v.value = val + v.isSet = true +} + +func (v NullableTLSARecord) IsSet() bool { + return v.isSet +} + +func (v *NullableTLSARecord) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTLSARecord(val *TLSARecord) *NullableTLSARecord { + return &NullableTLSARecord{value: val, isSet: true} +} + +func (v NullableTLSARecord) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTLSARecord) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_tlsa_record_value.go b/model_tlsa_record_value.go new file mode 100644 index 0000000..9fa449b --- /dev/null +++ b/model_tlsa_record_value.go @@ -0,0 +1,198 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the TLSARecordValue type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TLSARecordValue{} + +// TLSARecordValue struct for TLSARecordValue +type TLSARecordValue struct { + Usage string `json:"usage"` + Selector string `json:"selector"` + MatchingType string `json:"matching_type"` + Certificate string `json:"certificate"` +} + +// NewTLSARecordValue instantiates a new TLSARecordValue object +// This constructor will assign default values to properties that have it defined, +// 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 NewTLSARecordValue(usage string, selector string, matchingType string, certificate string) *TLSARecordValue { + this := TLSARecordValue{} + this.Usage = usage + this.Selector = selector + this.MatchingType = matchingType + this.Certificate = certificate + return &this +} + +// NewTLSARecordValueWithDefaults instantiates a new TLSARecordValue object +// This 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 NewTLSARecordValueWithDefaults() *TLSARecordValue { + this := TLSARecordValue{} + return &this +} + +// GetUsage returns the Usage field value +func (o *TLSARecordValue) GetUsage() string { + if o == nil { + var ret string + return ret + } + + return o.Usage +} + +// GetUsageOk returns a tuple with the Usage field value +// and a boolean to check if the value has been set. +func (o *TLSARecordValue) GetUsageOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Usage, true +} + +// SetUsage sets field value +func (o *TLSARecordValue) SetUsage(v string) { + o.Usage = v +} + +// GetSelector returns the Selector field value +func (o *TLSARecordValue) GetSelector() string { + if o == nil { + var ret string + return ret + } + + return o.Selector +} + +// GetSelectorOk returns a tuple with the Selector field value +// and a boolean to check if the value has been set. +func (o *TLSARecordValue) GetSelectorOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Selector, true +} + +// SetSelector sets field value +func (o *TLSARecordValue) SetSelector(v string) { + o.Selector = v +} + +// GetMatchingType returns the MatchingType field value +func (o *TLSARecordValue) GetMatchingType() string { + if o == nil { + var ret string + return ret + } + + return o.MatchingType +} + +// GetMatchingTypeOk returns a tuple with the MatchingType field value +// and a boolean to check if the value has been set. +func (o *TLSARecordValue) GetMatchingTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.MatchingType, true +} + +// SetMatchingType sets field value +func (o *TLSARecordValue) SetMatchingType(v string) { + o.MatchingType = v +} + +// GetCertificate returns the Certificate field value +func (o *TLSARecordValue) GetCertificate() string { + if o == nil { + var ret string + return ret + } + + return o.Certificate +} + +// GetCertificateOk returns a tuple with the Certificate field value +// and a boolean to check if the value has been set. +func (o *TLSARecordValue) GetCertificateOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Certificate, true +} + +// SetCertificate sets field value +func (o *TLSARecordValue) SetCertificate(v string) { + o.Certificate = v +} + +func (o TLSARecordValue) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TLSARecordValue) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["usage"] = o.Usage + toSerialize["selector"] = o.Selector + toSerialize["matching_type"] = o.MatchingType + toSerialize["certificate"] = o.Certificate + return toSerialize, nil +} + +type NullableTLSARecordValue struct { + value *TLSARecordValue + isSet bool +} + +func (v NullableTLSARecordValue) Get() *TLSARecordValue { + return v.value +} + +func (v *NullableTLSARecordValue) Set(val *TLSARecordValue) { + v.value = val + v.isSet = true +} + +func (v NullableTLSARecordValue) IsSet() bool { + return v.isSet +} + +func (v *NullableTLSARecordValue) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTLSARecordValue(val *TLSARecordValue) *NullableTLSARecordValue { + return &NullableTLSARecordValue{value: val, isSet: true} +} + +func (v NullableTLSARecordValue) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTLSARecordValue) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_traffic_charts.go b/model_traffic_charts.go new file mode 100644 index 0000000..bb85417 --- /dev/null +++ b/model_traffic_charts.go @@ -0,0 +1,162 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the TrafficCharts type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TrafficCharts{} + +// TrafficCharts struct for TrafficCharts +type TrafficCharts struct { + Requests *TrafficChartsRequests `json:"requests,omitempty"` + Traffics *TrafficChartsTraffics `json:"traffics,omitempty"` +} + +// NewTrafficCharts instantiates a new TrafficCharts object +// This constructor will assign default values to properties that have it defined, +// 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 NewTrafficCharts() *TrafficCharts { + this := TrafficCharts{} + return &this +} + +// NewTrafficChartsWithDefaults instantiates a new TrafficCharts object +// This 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 NewTrafficChartsWithDefaults() *TrafficCharts { + this := TrafficCharts{} + return &this +} + +// GetRequests returns the Requests field value if set, zero value otherwise. +func (o *TrafficCharts) GetRequests() TrafficChartsRequests { + if o == nil || IsNil(o.Requests) { + var ret TrafficChartsRequests + return ret + } + return *o.Requests +} + +// GetRequestsOk returns a tuple with the Requests field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TrafficCharts) GetRequestsOk() (*TrafficChartsRequests, bool) { + if o == nil || IsNil(o.Requests) { + return nil, false + } + return o.Requests, true +} + +// HasRequests returns a boolean if a field has been set. +func (o *TrafficCharts) HasRequests() bool { + if o != nil && !IsNil(o.Requests) { + return true + } + + return false +} + +// SetRequests gets a reference to the given TrafficChartsRequests and assigns it to the Requests field. +func (o *TrafficCharts) SetRequests(v TrafficChartsRequests) { + o.Requests = &v +} + +// GetTraffics returns the Traffics field value if set, zero value otherwise. +func (o *TrafficCharts) GetTraffics() TrafficChartsTraffics { + if o == nil || IsNil(o.Traffics) { + var ret TrafficChartsTraffics + return ret + } + return *o.Traffics +} + +// GetTrafficsOk returns a tuple with the Traffics field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TrafficCharts) GetTrafficsOk() (*TrafficChartsTraffics, bool) { + if o == nil || IsNil(o.Traffics) { + return nil, false + } + return o.Traffics, true +} + +// HasTraffics returns a boolean if a field has been set. +func (o *TrafficCharts) HasTraffics() bool { + if o != nil && !IsNil(o.Traffics) { + return true + } + + return false +} + +// SetTraffics gets a reference to the given TrafficChartsTraffics and assigns it to the Traffics field. +func (o *TrafficCharts) SetTraffics(v TrafficChartsTraffics) { + o.Traffics = &v +} + +func (o TrafficCharts) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TrafficCharts) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Requests) { + toSerialize["requests"] = o.Requests + } + if !IsNil(o.Traffics) { + toSerialize["traffics"] = o.Traffics + } + return toSerialize, nil +} + +type NullableTrafficCharts struct { + value *TrafficCharts + isSet bool +} + +func (v NullableTrafficCharts) Get() *TrafficCharts { + return v.value +} + +func (v *NullableTrafficCharts) Set(val *TrafficCharts) { + v.value = val + v.isSet = true +} + +func (v NullableTrafficCharts) IsSet() bool { + return v.isSet +} + +func (v *NullableTrafficCharts) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTrafficCharts(val *TrafficCharts) *NullableTrafficCharts { + return &NullableTrafficCharts{value: val, isSet: true} +} + +func (v NullableTrafficCharts) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTrafficCharts) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_traffic_charts_requests.go b/model_traffic_charts_requests.go new file mode 100644 index 0000000..138690e --- /dev/null +++ b/model_traffic_charts_requests.go @@ -0,0 +1,199 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" + "time" +) + +// checks if the TrafficChartsRequests type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TrafficChartsRequests{} + +// TrafficChartsRequests struct for TrafficChartsRequests +type TrafficChartsRequests struct { + Title *string `json:"title,omitempty"` + Categories []time.Time `json:"categories,omitempty"` + Series []TrafficChartsRequestsSeriesInner `json:"series,omitempty"` +} + +// NewTrafficChartsRequests instantiates a new TrafficChartsRequests object +// This constructor will assign default values to properties that have it defined, +// 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 NewTrafficChartsRequests() *TrafficChartsRequests { + this := TrafficChartsRequests{} + return &this +} + +// NewTrafficChartsRequestsWithDefaults instantiates a new TrafficChartsRequests object +// This 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 NewTrafficChartsRequestsWithDefaults() *TrafficChartsRequests { + this := TrafficChartsRequests{} + return &this +} + +// GetTitle returns the Title field value if set, zero value otherwise. +func (o *TrafficChartsRequests) 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 *TrafficChartsRequests) 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 *TrafficChartsRequests) 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 *TrafficChartsRequests) SetTitle(v string) { + o.Title = &v +} + +// GetCategories returns the Categories field value if set, zero value otherwise. +func (o *TrafficChartsRequests) GetCategories() []time.Time { + if o == nil || IsNil(o.Categories) { + var ret []time.Time + return ret + } + return o.Categories +} + +// GetCategoriesOk returns a tuple with the Categories field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TrafficChartsRequests) GetCategoriesOk() ([]time.Time, bool) { + if o == nil || IsNil(o.Categories) { + return nil, false + } + return o.Categories, true +} + +// HasCategories returns a boolean if a field has been set. +func (o *TrafficChartsRequests) HasCategories() bool { + if o != nil && !IsNil(o.Categories) { + return true + } + + return false +} + +// SetCategories gets a reference to the given []time.Time and assigns it to the Categories field. +func (o *TrafficChartsRequests) SetCategories(v []time.Time) { + o.Categories = v +} + +// GetSeries returns the Series field value if set, zero value otherwise. +func (o *TrafficChartsRequests) GetSeries() []TrafficChartsRequestsSeriesInner { + if o == nil || IsNil(o.Series) { + var ret []TrafficChartsRequestsSeriesInner + return ret + } + return o.Series +} + +// GetSeriesOk returns a tuple with the Series field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TrafficChartsRequests) GetSeriesOk() ([]TrafficChartsRequestsSeriesInner, bool) { + if o == nil || IsNil(o.Series) { + return nil, false + } + return o.Series, true +} + +// HasSeries returns a boolean if a field has been set. +func (o *TrafficChartsRequests) HasSeries() bool { + if o != nil && !IsNil(o.Series) { + return true + } + + return false +} + +// SetSeries gets a reference to the given []TrafficChartsRequestsSeriesInner and assigns it to the Series field. +func (o *TrafficChartsRequests) SetSeries(v []TrafficChartsRequestsSeriesInner) { + o.Series = v +} + +func (o TrafficChartsRequests) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TrafficChartsRequests) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Title) { + toSerialize["title"] = o.Title + } + if !IsNil(o.Categories) { + toSerialize["categories"] = o.Categories + } + if !IsNil(o.Series) { + toSerialize["series"] = o.Series + } + return toSerialize, nil +} + +type NullableTrafficChartsRequests struct { + value *TrafficChartsRequests + isSet bool +} + +func (v NullableTrafficChartsRequests) Get() *TrafficChartsRequests { + return v.value +} + +func (v *NullableTrafficChartsRequests) Set(val *TrafficChartsRequests) { + v.value = val + v.isSet = true +} + +func (v NullableTrafficChartsRequests) IsSet() bool { + return v.isSet +} + +func (v *NullableTrafficChartsRequests) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTrafficChartsRequests(val *TrafficChartsRequests) *NullableTrafficChartsRequests { + return &NullableTrafficChartsRequests{value: val, isSet: true} +} + +func (v NullableTrafficChartsRequests) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTrafficChartsRequests) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_traffic_charts_requests_series_inner.go b/model_traffic_charts_requests_series_inner.go new file mode 100644 index 0000000..ef9e1fd --- /dev/null +++ b/model_traffic_charts_requests_series_inner.go @@ -0,0 +1,162 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the TrafficChartsRequestsSeriesInner type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TrafficChartsRequestsSeriesInner{} + +// TrafficChartsRequestsSeriesInner struct for TrafficChartsRequestsSeriesInner +type TrafficChartsRequestsSeriesInner struct { + Name *string `json:"name,omitempty"` + Data []int32 `json:"data,omitempty"` +} + +// NewTrafficChartsRequestsSeriesInner instantiates a new TrafficChartsRequestsSeriesInner object +// This constructor will assign default values to properties that have it defined, +// 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 NewTrafficChartsRequestsSeriesInner() *TrafficChartsRequestsSeriesInner { + this := TrafficChartsRequestsSeriesInner{} + return &this +} + +// NewTrafficChartsRequestsSeriesInnerWithDefaults instantiates a new TrafficChartsRequestsSeriesInner object +// This 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 NewTrafficChartsRequestsSeriesInnerWithDefaults() *TrafficChartsRequestsSeriesInner { + this := TrafficChartsRequestsSeriesInner{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *TrafficChartsRequestsSeriesInner) 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 *TrafficChartsRequestsSeriesInner) 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 *TrafficChartsRequestsSeriesInner) 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 *TrafficChartsRequestsSeriesInner) SetName(v string) { + o.Name = &v +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *TrafficChartsRequestsSeriesInner) GetData() []int32 { + if o == nil || IsNil(o.Data) { + var ret []int32 + return ret + } + return o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TrafficChartsRequestsSeriesInner) GetDataOk() ([]int32, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *TrafficChartsRequestsSeriesInner) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given []int32 and assigns it to the Data field. +func (o *TrafficChartsRequestsSeriesInner) SetData(v []int32) { + o.Data = v +} + +func (o TrafficChartsRequestsSeriesInner) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TrafficChartsRequestsSeriesInner) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + return toSerialize, nil +} + +type NullableTrafficChartsRequestsSeriesInner struct { + value *TrafficChartsRequestsSeriesInner + isSet bool +} + +func (v NullableTrafficChartsRequestsSeriesInner) Get() *TrafficChartsRequestsSeriesInner { + return v.value +} + +func (v *NullableTrafficChartsRequestsSeriesInner) Set(val *TrafficChartsRequestsSeriesInner) { + v.value = val + v.isSet = true +} + +func (v NullableTrafficChartsRequestsSeriesInner) IsSet() bool { + return v.isSet +} + +func (v *NullableTrafficChartsRequestsSeriesInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTrafficChartsRequestsSeriesInner(val *TrafficChartsRequestsSeriesInner) *NullableTrafficChartsRequestsSeriesInner { + return &NullableTrafficChartsRequestsSeriesInner{value: val, isSet: true} +} + +func (v NullableTrafficChartsRequestsSeriesInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTrafficChartsRequestsSeriesInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_traffic_charts_traffics.go b/model_traffic_charts_traffics.go new file mode 100644 index 0000000..eef14d2 --- /dev/null +++ b/model_traffic_charts_traffics.go @@ -0,0 +1,199 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" + "time" +) + +// checks if the TrafficChartsTraffics type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TrafficChartsTraffics{} + +// TrafficChartsTraffics struct for TrafficChartsTraffics +type TrafficChartsTraffics struct { + Title *string `json:"title,omitempty"` + Categories []time.Time `json:"categories,omitempty"` + Series []TrafficChartsTrafficsSeriesInner `json:"series,omitempty"` +} + +// NewTrafficChartsTraffics instantiates a new TrafficChartsTraffics object +// This constructor will assign default values to properties that have it defined, +// 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 NewTrafficChartsTraffics() *TrafficChartsTraffics { + this := TrafficChartsTraffics{} + return &this +} + +// NewTrafficChartsTrafficsWithDefaults instantiates a new TrafficChartsTraffics object +// This 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 NewTrafficChartsTrafficsWithDefaults() *TrafficChartsTraffics { + this := TrafficChartsTraffics{} + return &this +} + +// GetTitle returns the Title field value if set, zero value otherwise. +func (o *TrafficChartsTraffics) 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 *TrafficChartsTraffics) 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 *TrafficChartsTraffics) 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 *TrafficChartsTraffics) SetTitle(v string) { + o.Title = &v +} + +// GetCategories returns the Categories field value if set, zero value otherwise. +func (o *TrafficChartsTraffics) GetCategories() []time.Time { + if o == nil || IsNil(o.Categories) { + var ret []time.Time + return ret + } + return o.Categories +} + +// GetCategoriesOk returns a tuple with the Categories field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TrafficChartsTraffics) GetCategoriesOk() ([]time.Time, bool) { + if o == nil || IsNil(o.Categories) { + return nil, false + } + return o.Categories, true +} + +// HasCategories returns a boolean if a field has been set. +func (o *TrafficChartsTraffics) HasCategories() bool { + if o != nil && !IsNil(o.Categories) { + return true + } + + return false +} + +// SetCategories gets a reference to the given []time.Time and assigns it to the Categories field. +func (o *TrafficChartsTraffics) SetCategories(v []time.Time) { + o.Categories = v +} + +// GetSeries returns the Series field value if set, zero value otherwise. +func (o *TrafficChartsTraffics) GetSeries() []TrafficChartsTrafficsSeriesInner { + if o == nil || IsNil(o.Series) { + var ret []TrafficChartsTrafficsSeriesInner + return ret + } + return o.Series +} + +// GetSeriesOk returns a tuple with the Series field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TrafficChartsTraffics) GetSeriesOk() ([]TrafficChartsTrafficsSeriesInner, bool) { + if o == nil || IsNil(o.Series) { + return nil, false + } + return o.Series, true +} + +// HasSeries returns a boolean if a field has been set. +func (o *TrafficChartsTraffics) HasSeries() bool { + if o != nil && !IsNil(o.Series) { + return true + } + + return false +} + +// SetSeries gets a reference to the given []TrafficChartsTrafficsSeriesInner and assigns it to the Series field. +func (o *TrafficChartsTraffics) SetSeries(v []TrafficChartsTrafficsSeriesInner) { + o.Series = v +} + +func (o TrafficChartsTraffics) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TrafficChartsTraffics) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Title) { + toSerialize["title"] = o.Title + } + if !IsNil(o.Categories) { + toSerialize["categories"] = o.Categories + } + if !IsNil(o.Series) { + toSerialize["series"] = o.Series + } + return toSerialize, nil +} + +type NullableTrafficChartsTraffics struct { + value *TrafficChartsTraffics + isSet bool +} + +func (v NullableTrafficChartsTraffics) Get() *TrafficChartsTraffics { + return v.value +} + +func (v *NullableTrafficChartsTraffics) Set(val *TrafficChartsTraffics) { + v.value = val + v.isSet = true +} + +func (v NullableTrafficChartsTraffics) IsSet() bool { + return v.isSet +} + +func (v *NullableTrafficChartsTraffics) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTrafficChartsTraffics(val *TrafficChartsTraffics) *NullableTrafficChartsTraffics { + return &NullableTrafficChartsTraffics{value: val, isSet: true} +} + +func (v NullableTrafficChartsTraffics) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTrafficChartsTraffics) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_traffic_charts_traffics_series_inner.go b/model_traffic_charts_traffics_series_inner.go new file mode 100644 index 0000000..992da8f --- /dev/null +++ b/model_traffic_charts_traffics_series_inner.go @@ -0,0 +1,162 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the TrafficChartsTrafficsSeriesInner type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TrafficChartsTrafficsSeriesInner{} + +// TrafficChartsTrafficsSeriesInner struct for TrafficChartsTrafficsSeriesInner +type TrafficChartsTrafficsSeriesInner struct { + Name *string `json:"name,omitempty"` + Data []int32 `json:"data,omitempty"` +} + +// NewTrafficChartsTrafficsSeriesInner instantiates a new TrafficChartsTrafficsSeriesInner object +// This constructor will assign default values to properties that have it defined, +// 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 NewTrafficChartsTrafficsSeriesInner() *TrafficChartsTrafficsSeriesInner { + this := TrafficChartsTrafficsSeriesInner{} + return &this +} + +// NewTrafficChartsTrafficsSeriesInnerWithDefaults instantiates a new TrafficChartsTrafficsSeriesInner object +// This 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 NewTrafficChartsTrafficsSeriesInnerWithDefaults() *TrafficChartsTrafficsSeriesInner { + this := TrafficChartsTrafficsSeriesInner{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *TrafficChartsTrafficsSeriesInner) 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 *TrafficChartsTrafficsSeriesInner) 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 *TrafficChartsTrafficsSeriesInner) 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 *TrafficChartsTrafficsSeriesInner) SetName(v string) { + o.Name = &v +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *TrafficChartsTrafficsSeriesInner) GetData() []int32 { + if o == nil || IsNil(o.Data) { + var ret []int32 + return ret + } + return o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TrafficChartsTrafficsSeriesInner) GetDataOk() ([]int32, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *TrafficChartsTrafficsSeriesInner) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given []int32 and assigns it to the Data field. +func (o *TrafficChartsTrafficsSeriesInner) SetData(v []int32) { + o.Data = v +} + +func (o TrafficChartsTrafficsSeriesInner) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TrafficChartsTrafficsSeriesInner) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + return toSerialize, nil +} + +type NullableTrafficChartsTrafficsSeriesInner struct { + value *TrafficChartsTrafficsSeriesInner + isSet bool +} + +func (v NullableTrafficChartsTrafficsSeriesInner) Get() *TrafficChartsTrafficsSeriesInner { + return v.value +} + +func (v *NullableTrafficChartsTrafficsSeriesInner) Set(val *TrafficChartsTrafficsSeriesInner) { + v.value = val + v.isSet = true +} + +func (v NullableTrafficChartsTrafficsSeriesInner) IsSet() bool { + return v.isSet +} + +func (v *NullableTrafficChartsTrafficsSeriesInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTrafficChartsTrafficsSeriesInner(val *TrafficChartsTrafficsSeriesInner) *NullableTrafficChartsTrafficsSeriesInner { + return &NullableTrafficChartsTrafficsSeriesInner{value: val, isSet: true} +} + +func (v NullableTrafficChartsTrafficsSeriesInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTrafficChartsTrafficsSeriesInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_traffic_statistics.go b/model_traffic_statistics.go new file mode 100644 index 0000000..9360d47 --- /dev/null +++ b/model_traffic_statistics.go @@ -0,0 +1,162 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the TrafficStatistics type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TrafficStatistics{} + +// TrafficStatistics struct for TrafficStatistics +type TrafficStatistics struct { + Traffics *TrafficStatisticsTraffics `json:"traffics,omitempty"` + Requests *TrafficStatisticsTraffics `json:"requests,omitempty"` +} + +// NewTrafficStatistics instantiates a new TrafficStatistics object +// This constructor will assign default values to properties that have it defined, +// 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 NewTrafficStatistics() *TrafficStatistics { + this := TrafficStatistics{} + return &this +} + +// NewTrafficStatisticsWithDefaults instantiates a new TrafficStatistics object +// This 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 NewTrafficStatisticsWithDefaults() *TrafficStatistics { + this := TrafficStatistics{} + return &this +} + +// GetTraffics returns the Traffics field value if set, zero value otherwise. +func (o *TrafficStatistics) GetTraffics() TrafficStatisticsTraffics { + if o == nil || IsNil(o.Traffics) { + var ret TrafficStatisticsTraffics + return ret + } + return *o.Traffics +} + +// GetTrafficsOk returns a tuple with the Traffics field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TrafficStatistics) GetTrafficsOk() (*TrafficStatisticsTraffics, bool) { + if o == nil || IsNil(o.Traffics) { + return nil, false + } + return o.Traffics, true +} + +// HasTraffics returns a boolean if a field has been set. +func (o *TrafficStatistics) HasTraffics() bool { + if o != nil && !IsNil(o.Traffics) { + return true + } + + return false +} + +// SetTraffics gets a reference to the given TrafficStatisticsTraffics and assigns it to the Traffics field. +func (o *TrafficStatistics) SetTraffics(v TrafficStatisticsTraffics) { + o.Traffics = &v +} + +// GetRequests returns the Requests field value if set, zero value otherwise. +func (o *TrafficStatistics) GetRequests() TrafficStatisticsTraffics { + if o == nil || IsNil(o.Requests) { + var ret TrafficStatisticsTraffics + return ret + } + return *o.Requests +} + +// GetRequestsOk returns a tuple with the Requests field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TrafficStatistics) GetRequestsOk() (*TrafficStatisticsTraffics, bool) { + if o == nil || IsNil(o.Requests) { + return nil, false + } + return o.Requests, true +} + +// HasRequests returns a boolean if a field has been set. +func (o *TrafficStatistics) HasRequests() bool { + if o != nil && !IsNil(o.Requests) { + return true + } + + return false +} + +// SetRequests gets a reference to the given TrafficStatisticsTraffics and assigns it to the Requests field. +func (o *TrafficStatistics) SetRequests(v TrafficStatisticsTraffics) { + o.Requests = &v +} + +func (o TrafficStatistics) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TrafficStatistics) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Traffics) { + toSerialize["traffics"] = o.Traffics + } + if !IsNil(o.Requests) { + toSerialize["requests"] = o.Requests + } + return toSerialize, nil +} + +type NullableTrafficStatistics struct { + value *TrafficStatistics + isSet bool +} + +func (v NullableTrafficStatistics) Get() *TrafficStatistics { + return v.value +} + +func (v *NullableTrafficStatistics) Set(val *TrafficStatistics) { + v.value = val + v.isSet = true +} + +func (v NullableTrafficStatistics) IsSet() bool { + return v.isSet +} + +func (v *NullableTrafficStatistics) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTrafficStatistics(val *TrafficStatistics) *NullableTrafficStatistics { + return &NullableTrafficStatistics{value: val, isSet: true} +} + +func (v NullableTrafficStatistics) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTrafficStatistics) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_traffic_statistics_traffics.go b/model_traffic_statistics_traffics.go new file mode 100644 index 0000000..9345b4c --- /dev/null +++ b/model_traffic_statistics_traffics.go @@ -0,0 +1,172 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" + "time" +) + +// checks if the TrafficStatisticsTraffics type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TrafficStatisticsTraffics{} + +// TrafficStatisticsTraffics struct for TrafficStatisticsTraffics +type TrafficStatisticsTraffics struct { + Saved int32 `json:"saved"` + Top time.Time `json:"top"` + Total int32 `json:"total"` +} + +// NewTrafficStatisticsTraffics instantiates a new TrafficStatisticsTraffics object +// This constructor will assign default values to properties that have it defined, +// 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 NewTrafficStatisticsTraffics(saved int32, top time.Time, total int32) *TrafficStatisticsTraffics { + this := TrafficStatisticsTraffics{} + this.Saved = saved + this.Top = top + this.Total = total + return &this +} + +// NewTrafficStatisticsTrafficsWithDefaults instantiates a new TrafficStatisticsTraffics object +// This 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 NewTrafficStatisticsTrafficsWithDefaults() *TrafficStatisticsTraffics { + this := TrafficStatisticsTraffics{} + return &this +} + +// GetSaved returns the Saved field value +func (o *TrafficStatisticsTraffics) GetSaved() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Saved +} + +// GetSavedOk returns a tuple with the Saved field value +// and a boolean to check if the value has been set. +func (o *TrafficStatisticsTraffics) GetSavedOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Saved, true +} + +// SetSaved sets field value +func (o *TrafficStatisticsTraffics) SetSaved(v int32) { + o.Saved = v +} + +// GetTop returns the Top field value +func (o *TrafficStatisticsTraffics) GetTop() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.Top +} + +// GetTopOk returns a tuple with the Top field value +// and a boolean to check if the value has been set. +func (o *TrafficStatisticsTraffics) GetTopOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.Top, true +} + +// SetTop sets field value +func (o *TrafficStatisticsTraffics) SetTop(v time.Time) { + o.Top = v +} + +// GetTotal returns the Total field value +func (o *TrafficStatisticsTraffics) 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 *TrafficStatisticsTraffics) GetTotalOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Total, true +} + +// SetTotal sets field value +func (o *TrafficStatisticsTraffics) SetTotal(v int32) { + o.Total = v +} + +func (o TrafficStatisticsTraffics) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TrafficStatisticsTraffics) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["saved"] = o.Saved + toSerialize["top"] = o.Top + toSerialize["total"] = o.Total + return toSerialize, nil +} + +type NullableTrafficStatisticsTraffics struct { + value *TrafficStatisticsTraffics + isSet bool +} + +func (v NullableTrafficStatisticsTraffics) Get() *TrafficStatisticsTraffics { + return v.value +} + +func (v *NullableTrafficStatisticsTraffics) Set(val *TrafficStatisticsTraffics) { + v.value = val + v.isSet = true +} + +func (v NullableTrafficStatisticsTraffics) IsSet() bool { + return v.isSet +} + +func (v *NullableTrafficStatisticsTraffics) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTrafficStatisticsTraffics(val *TrafficStatisticsTraffics) *NullableTrafficStatisticsTraffics { + return &NullableTrafficStatisticsTraffics{value: val, isSet: true} +} + +func (v NullableTrafficStatisticsTraffics) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTrafficStatisticsTraffics) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_traffics_data.go b/model_traffics_data.go new file mode 100644 index 0000000..728e78f --- /dev/null +++ b/model_traffics_data.go @@ -0,0 +1,126 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the TrafficsData type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TrafficsData{} + +// TrafficsData struct for TrafficsData +type TrafficsData struct { + Data *map[string]interface{} `json:"data,omitempty"` +} + +// NewTrafficsData instantiates a new TrafficsData object +// This constructor will assign default values to properties that have it defined, +// 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 NewTrafficsData() *TrafficsData { + this := TrafficsData{} + return &this +} + +// NewTrafficsDataWithDefaults instantiates a new TrafficsData object +// This 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 NewTrafficsDataWithDefaults() *TrafficsData { + this := TrafficsData{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *TrafficsData) GetData() map[string]interface{} { + if o == nil || IsNil(o.Data) { + var ret map[string]interface{} + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TrafficsData) GetDataOk() (*map[string]interface{}, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *TrafficsData) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given map[string]interface{} and assigns it to the Data field. +func (o *TrafficsData) SetData(v map[string]interface{}) { + o.Data = &v +} + +func (o TrafficsData) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TrafficsData) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + return toSerialize, nil +} + +type NullableTrafficsData struct { + value *TrafficsData + isSet bool +} + +func (v NullableTrafficsData) Get() *TrafficsData { + return v.value +} + +func (v *NullableTrafficsData) Set(val *TrafficsData) { + v.value = val + v.isSet = true +} + +func (v NullableTrafficsData) IsSet() bool { + return v.isSet +} + +func (v *NullableTrafficsData) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTrafficsData(val *TrafficsData) *NullableTrafficsData { + return &NullableTrafficsData{value: val, isSet: true} +} + +func (v NullableTrafficsData) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTrafficsData) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_transfer_domain.go b/model_transfer_domain.go new file mode 100644 index 0000000..8705787 --- /dev/null +++ b/model_transfer_domain.go @@ -0,0 +1,117 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the TransferDomain type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TransferDomain{} + +// TransferDomain struct for TransferDomain +type TransferDomain struct { + AccountId string `json:"account_id"` +} + +// NewTransferDomain instantiates a new TransferDomain object +// This constructor will assign default values to properties that have it defined, +// 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 NewTransferDomain(accountId string) *TransferDomain { + this := TransferDomain{} + this.AccountId = accountId + return &this +} + +// NewTransferDomainWithDefaults instantiates a new TransferDomain object +// This 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 NewTransferDomainWithDefaults() *TransferDomain { + this := TransferDomain{} + return &this +} + +// GetAccountId returns the AccountId field value +func (o *TransferDomain) GetAccountId() string { + if o == nil { + var ret string + return ret + } + + return o.AccountId +} + +// GetAccountIdOk returns a tuple with the AccountId field value +// and a boolean to check if the value has been set. +func (o *TransferDomain) GetAccountIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.AccountId, true +} + +// SetAccountId sets field value +func (o *TransferDomain) SetAccountId(v string) { + o.AccountId = v +} + +func (o TransferDomain) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TransferDomain) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["account_id"] = o.AccountId + return toSerialize, nil +} + +type NullableTransferDomain struct { + value *TransferDomain + isSet bool +} + +func (v NullableTransferDomain) Get() *TransferDomain { + return v.value +} + +func (v *NullableTransferDomain) Set(val *TransferDomain) { + v.value = val + v.isSet = true +} + +func (v NullableTransferDomain) IsSet() bool { + return v.isSet +} + +func (v *NullableTransferDomain) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTransferDomain(val *TransferDomain) *NullableTransferDomain { + return &NullableTransferDomain{value: val, isSet: true} +} + +func (v NullableTransferDomain) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTransferDomain) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_transfer_domain_change_status.go b/model_transfer_domain_change_status.go new file mode 100644 index 0000000..e95e0e7 --- /dev/null +++ b/model_transfer_domain_change_status.go @@ -0,0 +1,184 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the TransferDomainChangeStatus type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TransferDomainChangeStatus{} + +// TransferDomainChangeStatus struct for TransferDomainChangeStatus +type TransferDomainChangeStatus struct { + Domain string `json:"domain"` + Status string `json:"status"` + PreserveState *bool `json:"preserve_state,omitempty"` +} + +// NewTransferDomainChangeStatus instantiates a new TransferDomainChangeStatus object +// This constructor will assign default values to properties that have it defined, +// 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 NewTransferDomainChangeStatus(domain string, status string) *TransferDomainChangeStatus { + this := TransferDomainChangeStatus{} + this.Domain = domain + this.Status = status + var preserveState bool = false + this.PreserveState = &preserveState + return &this +} + +// NewTransferDomainChangeStatusWithDefaults instantiates a new TransferDomainChangeStatus object +// This 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 NewTransferDomainChangeStatusWithDefaults() *TransferDomainChangeStatus { + this := TransferDomainChangeStatus{} + var preserveState bool = false + this.PreserveState = &preserveState + return &this +} + +// GetDomain returns the Domain field value +func (o *TransferDomainChangeStatus) GetDomain() string { + if o == nil { + var ret string + return ret + } + + return o.Domain +} + +// GetDomainOk returns a tuple with the Domain field value +// and a boolean to check if the value has been set. +func (o *TransferDomainChangeStatus) GetDomainOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Domain, true +} + +// SetDomain sets field value +func (o *TransferDomainChangeStatus) SetDomain(v string) { + o.Domain = v +} + +// GetStatus returns the Status field value +func (o *TransferDomainChangeStatus) GetStatus() string { + if o == nil { + var ret string + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *TransferDomainChangeStatus) GetStatusOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *TransferDomainChangeStatus) SetStatus(v string) { + o.Status = v +} + +// GetPreserveState returns the PreserveState field value if set, zero value otherwise. +func (o *TransferDomainChangeStatus) GetPreserveState() bool { + if o == nil || IsNil(o.PreserveState) { + var ret bool + return ret + } + return *o.PreserveState +} + +// GetPreserveStateOk returns a tuple with the PreserveState field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TransferDomainChangeStatus) GetPreserveStateOk() (*bool, bool) { + if o == nil || IsNil(o.PreserveState) { + return nil, false + } + return o.PreserveState, true +} + +// HasPreserveState returns a boolean if a field has been set. +func (o *TransferDomainChangeStatus) HasPreserveState() bool { + if o != nil && !IsNil(o.PreserveState) { + return true + } + + return false +} + +// SetPreserveState gets a reference to the given bool and assigns it to the PreserveState field. +func (o *TransferDomainChangeStatus) SetPreserveState(v bool) { + o.PreserveState = &v +} + +func (o TransferDomainChangeStatus) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TransferDomainChangeStatus) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["domain"] = o.Domain + toSerialize["status"] = o.Status + if !IsNil(o.PreserveState) { + toSerialize["preserve_state"] = o.PreserveState + } + return toSerialize, nil +} + +type NullableTransferDomainChangeStatus struct { + value *TransferDomainChangeStatus + isSet bool +} + +func (v NullableTransferDomainChangeStatus) Get() *TransferDomainChangeStatus { + return v.value +} + +func (v *NullableTransferDomainChangeStatus) Set(val *TransferDomainChangeStatus) { + v.value = val + v.isSet = true +} + +func (v NullableTransferDomainChangeStatus) IsSet() bool { + return v.isSet +} + +func (v *NullableTransferDomainChangeStatus) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTransferDomainChangeStatus(val *TransferDomainChangeStatus) *NullableTransferDomainChangeStatus { + return &NullableTransferDomainChangeStatus{value: val, isSet: true} +} + +func (v NullableTransferDomainChangeStatus) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTransferDomainChangeStatus) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_transport_layer_proxies_index_200_response.go b/model_transport_layer_proxies_index_200_response.go new file mode 100644 index 0000000..2a98be8 --- /dev/null +++ b/model_transport_layer_proxies_index_200_response.go @@ -0,0 +1,198 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the TransportLayerProxiesIndex200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TransportLayerProxiesIndex200Response{} + +// TransportLayerProxiesIndex200Response struct for TransportLayerProxiesIndex200Response +type TransportLayerProxiesIndex200Response struct { + Data []TransportLayerProxy `json:"data,omitempty"` + Links *PaginatedResponseLinks `json:"links,omitempty"` + Meta *PaginatedResponseMeta `json:"meta,omitempty"` +} + +// NewTransportLayerProxiesIndex200Response instantiates a new TransportLayerProxiesIndex200Response object +// This constructor will assign default values to properties that have it defined, +// 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 NewTransportLayerProxiesIndex200Response() *TransportLayerProxiesIndex200Response { + this := TransportLayerProxiesIndex200Response{} + return &this +} + +// NewTransportLayerProxiesIndex200ResponseWithDefaults instantiates a new TransportLayerProxiesIndex200Response object +// This 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 NewTransportLayerProxiesIndex200ResponseWithDefaults() *TransportLayerProxiesIndex200Response { + this := TransportLayerProxiesIndex200Response{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *TransportLayerProxiesIndex200Response) GetData() []TransportLayerProxy { + if o == nil || IsNil(o.Data) { + var ret []TransportLayerProxy + return ret + } + return o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TransportLayerProxiesIndex200Response) GetDataOk() ([]TransportLayerProxy, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *TransportLayerProxiesIndex200Response) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given []TransportLayerProxy and assigns it to the Data field. +func (o *TransportLayerProxiesIndex200Response) SetData(v []TransportLayerProxy) { + o.Data = v +} + +// GetLinks returns the Links field value if set, zero value otherwise. +func (o *TransportLayerProxiesIndex200Response) GetLinks() PaginatedResponseLinks { + if o == nil || IsNil(o.Links) { + var ret PaginatedResponseLinks + return ret + } + return *o.Links +} + +// GetLinksOk returns a tuple with the Links field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TransportLayerProxiesIndex200Response) GetLinksOk() (*PaginatedResponseLinks, bool) { + if o == nil || IsNil(o.Links) { + return nil, false + } + return o.Links, true +} + +// HasLinks returns a boolean if a field has been set. +func (o *TransportLayerProxiesIndex200Response) HasLinks() bool { + if o != nil && !IsNil(o.Links) { + return true + } + + return false +} + +// SetLinks gets a reference to the given PaginatedResponseLinks and assigns it to the Links field. +func (o *TransportLayerProxiesIndex200Response) SetLinks(v PaginatedResponseLinks) { + o.Links = &v +} + +// GetMeta returns the Meta field value if set, zero value otherwise. +func (o *TransportLayerProxiesIndex200Response) GetMeta() PaginatedResponseMeta { + if o == nil || IsNil(o.Meta) { + var ret PaginatedResponseMeta + return ret + } + return *o.Meta +} + +// GetMetaOk returns a tuple with the Meta field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TransportLayerProxiesIndex200Response) GetMetaOk() (*PaginatedResponseMeta, bool) { + if o == nil || IsNil(o.Meta) { + return nil, false + } + return o.Meta, true +} + +// HasMeta returns a boolean if a field has been set. +func (o *TransportLayerProxiesIndex200Response) HasMeta() bool { + if o != nil && !IsNil(o.Meta) { + return true + } + + return false +} + +// SetMeta gets a reference to the given PaginatedResponseMeta and assigns it to the Meta field. +func (o *TransportLayerProxiesIndex200Response) SetMeta(v PaginatedResponseMeta) { + o.Meta = &v +} + +func (o TransportLayerProxiesIndex200Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TransportLayerProxiesIndex200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + if !IsNil(o.Links) { + toSerialize["links"] = o.Links + } + if !IsNil(o.Meta) { + toSerialize["meta"] = o.Meta + } + return toSerialize, nil +} + +type NullableTransportLayerProxiesIndex200Response struct { + value *TransportLayerProxiesIndex200Response + isSet bool +} + +func (v NullableTransportLayerProxiesIndex200Response) Get() *TransportLayerProxiesIndex200Response { + return v.value +} + +func (v *NullableTransportLayerProxiesIndex200Response) Set(val *TransportLayerProxiesIndex200Response) { + v.value = val + v.isSet = true +} + +func (v NullableTransportLayerProxiesIndex200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableTransportLayerProxiesIndex200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTransportLayerProxiesIndex200Response(val *TransportLayerProxiesIndex200Response) *NullableTransportLayerProxiesIndex200Response { + return &NullableTransportLayerProxiesIndex200Response{value: val, isSet: true} +} + +func (v NullableTransportLayerProxiesIndex200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTransportLayerProxiesIndex200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_transport_layer_proxy.go b/model_transport_layer_proxy.go new file mode 100644 index 0000000..1e7362b --- /dev/null +++ b/model_transport_layer_proxy.go @@ -0,0 +1,563 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" + "time" +) + +// checks if the TransportLayerProxy type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TransportLayerProxy{} + +// TransportLayerProxy struct for TransportLayerProxy +type TransportLayerProxy struct { + Id *string `json:"id,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty"` + Status *string `json:"status,omitempty"` + AppName *string `json:"app_name,omitempty"` + Description *string `json:"description,omitempty"` + Domain *string `json:"domain,omitempty"` + Port *int32 `json:"port,omitempty"` + Ip NullableString `json:"ip,omitempty"` + ProxyProtocol *string `json:"proxy_protocol,omitempty"` + BalanceAlgorithm *string `json:"balance_algorithm,omitempty"` + Servers []TransportLayerProxyServersInner `json:"servers,omitempty"` + FirewallDefaultAction *string `json:"firewall_default_action,omitempty"` + Firewalls []TransportLayerProxyFirewallsInner `json:"firewalls,omitempty"` +} + +// NewTransportLayerProxy instantiates a new TransportLayerProxy object +// This constructor will assign default values to properties that have it defined, +// 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 NewTransportLayerProxy() *TransportLayerProxy { + this := TransportLayerProxy{} + return &this +} + +// NewTransportLayerProxyWithDefaults instantiates a new TransportLayerProxy object +// This 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 NewTransportLayerProxyWithDefaults() *TransportLayerProxy { + this := TransportLayerProxy{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *TransportLayerProxy) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TransportLayerProxy) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *TransportLayerProxy) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *TransportLayerProxy) SetId(v string) { + o.Id = &v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *TransportLayerProxy) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TransportLayerProxy) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *TransportLayerProxy) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *TransportLayerProxy) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *TransportLayerProxy) GetStatus() string { + if o == nil || IsNil(o.Status) { + var ret string + 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 *TransportLayerProxy) GetStatusOk() (*string, 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 *TransportLayerProxy) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *TransportLayerProxy) SetStatus(v string) { + o.Status = &v +} + +// GetAppName returns the AppName field value if set, zero value otherwise. +func (o *TransportLayerProxy) GetAppName() string { + if o == nil || IsNil(o.AppName) { + var ret string + return ret + } + return *o.AppName +} + +// GetAppNameOk returns a tuple with the AppName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TransportLayerProxy) GetAppNameOk() (*string, bool) { + if o == nil || IsNil(o.AppName) { + return nil, false + } + return o.AppName, true +} + +// HasAppName returns a boolean if a field has been set. +func (o *TransportLayerProxy) HasAppName() bool { + if o != nil && !IsNil(o.AppName) { + return true + } + + return false +} + +// SetAppName gets a reference to the given string and assigns it to the AppName field. +func (o *TransportLayerProxy) SetAppName(v string) { + o.AppName = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *TransportLayerProxy) 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 *TransportLayerProxy) 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 *TransportLayerProxy) 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 *TransportLayerProxy) SetDescription(v string) { + o.Description = &v +} + +// GetDomain returns the Domain field value if set, zero value otherwise. +func (o *TransportLayerProxy) GetDomain() string { + if o == nil || IsNil(o.Domain) { + var ret string + return ret + } + return *o.Domain +} + +// GetDomainOk returns a tuple with the Domain field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TransportLayerProxy) GetDomainOk() (*string, bool) { + if o == nil || IsNil(o.Domain) { + return nil, false + } + return o.Domain, true +} + +// HasDomain returns a boolean if a field has been set. +func (o *TransportLayerProxy) HasDomain() bool { + if o != nil && !IsNil(o.Domain) { + return true + } + + return false +} + +// SetDomain gets a reference to the given string and assigns it to the Domain field. +func (o *TransportLayerProxy) SetDomain(v string) { + o.Domain = &v +} + +// GetPort returns the Port field value if set, zero value otherwise. +func (o *TransportLayerProxy) GetPort() int32 { + if o == nil || IsNil(o.Port) { + var ret int32 + return ret + } + return *o.Port +} + +// GetPortOk returns a tuple with the Port field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TransportLayerProxy) GetPortOk() (*int32, bool) { + if o == nil || IsNil(o.Port) { + return nil, false + } + return o.Port, true +} + +// HasPort returns a boolean if a field has been set. +func (o *TransportLayerProxy) HasPort() bool { + if o != nil && !IsNil(o.Port) { + return true + } + + return false +} + +// SetPort gets a reference to the given int32 and assigns it to the Port field. +func (o *TransportLayerProxy) SetPort(v int32) { + o.Port = &v +} + +// GetIp returns the Ip field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *TransportLayerProxy) GetIp() string { + if o == nil || IsNil(o.Ip.Get()) { + var ret string + return ret + } + return *o.Ip.Get() +} + +// GetIpOk returns a tuple with the Ip 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 *TransportLayerProxy) GetIpOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Ip.Get(), o.Ip.IsSet() +} + +// HasIp returns a boolean if a field has been set. +func (o *TransportLayerProxy) HasIp() bool { + if o != nil && o.Ip.IsSet() { + return true + } + + return false +} + +// SetIp gets a reference to the given NullableString and assigns it to the Ip field. +func (o *TransportLayerProxy) SetIp(v string) { + o.Ip.Set(&v) +} +// SetIpNil sets the value for Ip to be an explicit nil +func (o *TransportLayerProxy) SetIpNil() { + o.Ip.Set(nil) +} + +// UnsetIp ensures that no value is present for Ip, not even an explicit nil +func (o *TransportLayerProxy) UnsetIp() { + o.Ip.Unset() +} + +// GetProxyProtocol returns the ProxyProtocol field value if set, zero value otherwise. +func (o *TransportLayerProxy) GetProxyProtocol() string { + if o == nil || IsNil(o.ProxyProtocol) { + var ret string + return ret + } + return *o.ProxyProtocol +} + +// GetProxyProtocolOk returns a tuple with the ProxyProtocol field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TransportLayerProxy) GetProxyProtocolOk() (*string, bool) { + if o == nil || IsNil(o.ProxyProtocol) { + return nil, false + } + return o.ProxyProtocol, true +} + +// HasProxyProtocol returns a boolean if a field has been set. +func (o *TransportLayerProxy) HasProxyProtocol() bool { + if o != nil && !IsNil(o.ProxyProtocol) { + return true + } + + return false +} + +// SetProxyProtocol gets a reference to the given string and assigns it to the ProxyProtocol field. +func (o *TransportLayerProxy) SetProxyProtocol(v string) { + o.ProxyProtocol = &v +} + +// GetBalanceAlgorithm returns the BalanceAlgorithm field value if set, zero value otherwise. +func (o *TransportLayerProxy) GetBalanceAlgorithm() string { + if o == nil || IsNil(o.BalanceAlgorithm) { + var ret string + return ret + } + return *o.BalanceAlgorithm +} + +// GetBalanceAlgorithmOk returns a tuple with the BalanceAlgorithm field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TransportLayerProxy) GetBalanceAlgorithmOk() (*string, bool) { + if o == nil || IsNil(o.BalanceAlgorithm) { + return nil, false + } + return o.BalanceAlgorithm, true +} + +// HasBalanceAlgorithm returns a boolean if a field has been set. +func (o *TransportLayerProxy) HasBalanceAlgorithm() bool { + if o != nil && !IsNil(o.BalanceAlgorithm) { + return true + } + + return false +} + +// SetBalanceAlgorithm gets a reference to the given string and assigns it to the BalanceAlgorithm field. +func (o *TransportLayerProxy) SetBalanceAlgorithm(v string) { + o.BalanceAlgorithm = &v +} + +// GetServers returns the Servers field value if set, zero value otherwise. +func (o *TransportLayerProxy) GetServers() []TransportLayerProxyServersInner { + if o == nil || IsNil(o.Servers) { + var ret []TransportLayerProxyServersInner + return ret + } + return o.Servers +} + +// GetServersOk returns a tuple with the Servers field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TransportLayerProxy) GetServersOk() ([]TransportLayerProxyServersInner, bool) { + if o == nil || IsNil(o.Servers) { + return nil, false + } + return o.Servers, true +} + +// HasServers returns a boolean if a field has been set. +func (o *TransportLayerProxy) HasServers() bool { + if o != nil && !IsNil(o.Servers) { + return true + } + + return false +} + +// SetServers gets a reference to the given []TransportLayerProxyServersInner and assigns it to the Servers field. +func (o *TransportLayerProxy) SetServers(v []TransportLayerProxyServersInner) { + o.Servers = v +} + +// GetFirewallDefaultAction returns the FirewallDefaultAction field value if set, zero value otherwise. +func (o *TransportLayerProxy) GetFirewallDefaultAction() string { + if o == nil || IsNil(o.FirewallDefaultAction) { + var ret string + return ret + } + return *o.FirewallDefaultAction +} + +// GetFirewallDefaultActionOk returns a tuple with the FirewallDefaultAction field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TransportLayerProxy) GetFirewallDefaultActionOk() (*string, bool) { + if o == nil || IsNil(o.FirewallDefaultAction) { + return nil, false + } + return o.FirewallDefaultAction, true +} + +// HasFirewallDefaultAction returns a boolean if a field has been set. +func (o *TransportLayerProxy) HasFirewallDefaultAction() bool { + if o != nil && !IsNil(o.FirewallDefaultAction) { + return true + } + + return false +} + +// SetFirewallDefaultAction gets a reference to the given string and assigns it to the FirewallDefaultAction field. +func (o *TransportLayerProxy) SetFirewallDefaultAction(v string) { + o.FirewallDefaultAction = &v +} + +// GetFirewalls returns the Firewalls field value if set, zero value otherwise. +func (o *TransportLayerProxy) GetFirewalls() []TransportLayerProxyFirewallsInner { + if o == nil || IsNil(o.Firewalls) { + var ret []TransportLayerProxyFirewallsInner + return ret + } + return o.Firewalls +} + +// GetFirewallsOk returns a tuple with the Firewalls field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TransportLayerProxy) GetFirewallsOk() ([]TransportLayerProxyFirewallsInner, bool) { + if o == nil || IsNil(o.Firewalls) { + return nil, false + } + return o.Firewalls, true +} + +// HasFirewalls returns a boolean if a field has been set. +func (o *TransportLayerProxy) HasFirewalls() bool { + if o != nil && !IsNil(o.Firewalls) { + return true + } + + return false +} + +// SetFirewalls gets a reference to the given []TransportLayerProxyFirewallsInner and assigns it to the Firewalls field. +func (o *TransportLayerProxy) SetFirewalls(v []TransportLayerProxyFirewallsInner) { + o.Firewalls = v +} + +func (o TransportLayerProxy) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TransportLayerProxy) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: id is readOnly + // skip: created_at is readOnly + // skip: status is readOnly + if !IsNil(o.AppName) { + toSerialize["app_name"] = o.AppName + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.Domain) { + toSerialize["domain"] = o.Domain + } + if !IsNil(o.Port) { + toSerialize["port"] = o.Port + } + if o.Ip.IsSet() { + toSerialize["ip"] = o.Ip.Get() + } + if !IsNil(o.ProxyProtocol) { + toSerialize["proxy_protocol"] = o.ProxyProtocol + } + if !IsNil(o.BalanceAlgorithm) { + toSerialize["balance_algorithm"] = o.BalanceAlgorithm + } + if !IsNil(o.Servers) { + toSerialize["servers"] = o.Servers + } + if !IsNil(o.FirewallDefaultAction) { + toSerialize["firewall_default_action"] = o.FirewallDefaultAction + } + if !IsNil(o.Firewalls) { + toSerialize["firewalls"] = o.Firewalls + } + return toSerialize, nil +} + +type NullableTransportLayerProxy struct { + value *TransportLayerProxy + isSet bool +} + +func (v NullableTransportLayerProxy) Get() *TransportLayerProxy { + return v.value +} + +func (v *NullableTransportLayerProxy) Set(val *TransportLayerProxy) { + v.value = val + v.isSet = true +} + +func (v NullableTransportLayerProxy) IsSet() bool { + return v.isSet +} + +func (v *NullableTransportLayerProxy) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTransportLayerProxy(val *TransportLayerProxy) *NullableTransportLayerProxy { + return &NullableTransportLayerProxy{value: val, isSet: true} +} + +func (v NullableTransportLayerProxy) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTransportLayerProxy) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_transport_layer_proxy_firewall.go b/model_transport_layer_proxy_firewall.go new file mode 100644 index 0000000..d64d4b8 --- /dev/null +++ b/model_transport_layer_proxy_firewall.go @@ -0,0 +1,306 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the TransportLayerProxyFirewall type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TransportLayerProxyFirewall{} + +// TransportLayerProxyFirewall struct for TransportLayerProxyFirewall +type TransportLayerProxyFirewall struct { + Access *string `json:"access,omitempty"` + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + Type *string `json:"type,omitempty"` + Match *TransportLayerProxyMatch `json:"match,omitempty"` + Active *bool `json:"active,omitempty"` +} + +// NewTransportLayerProxyFirewall instantiates a new TransportLayerProxyFirewall object +// This constructor will assign default values to properties that have it defined, +// 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 NewTransportLayerProxyFirewall() *TransportLayerProxyFirewall { + this := TransportLayerProxyFirewall{} + return &this +} + +// NewTransportLayerProxyFirewallWithDefaults instantiates a new TransportLayerProxyFirewall object +// This 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 NewTransportLayerProxyFirewallWithDefaults() *TransportLayerProxyFirewall { + this := TransportLayerProxyFirewall{} + return &this +} + +// GetAccess returns the Access field value if set, zero value otherwise. +func (o *TransportLayerProxyFirewall) GetAccess() string { + if o == nil || IsNil(o.Access) { + var ret string + return ret + } + return *o.Access +} + +// GetAccessOk returns a tuple with the Access field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TransportLayerProxyFirewall) GetAccessOk() (*string, bool) { + if o == nil || IsNil(o.Access) { + return nil, false + } + return o.Access, true +} + +// HasAccess returns a boolean if a field has been set. +func (o *TransportLayerProxyFirewall) HasAccess() bool { + if o != nil && !IsNil(o.Access) { + return true + } + + return false +} + +// SetAccess gets a reference to the given string and assigns it to the Access field. +func (o *TransportLayerProxyFirewall) SetAccess(v string) { + o.Access = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *TransportLayerProxyFirewall) 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 *TransportLayerProxyFirewall) 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 *TransportLayerProxyFirewall) 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 *TransportLayerProxyFirewall) SetName(v string) { + o.Name = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *TransportLayerProxyFirewall) 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 *TransportLayerProxyFirewall) 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 *TransportLayerProxyFirewall) 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 *TransportLayerProxyFirewall) SetDescription(v string) { + o.Description = &v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *TransportLayerProxyFirewall) 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 *TransportLayerProxyFirewall) 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 *TransportLayerProxyFirewall) 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 *TransportLayerProxyFirewall) SetType(v string) { + o.Type = &v +} + +// GetMatch returns the Match field value if set, zero value otherwise. +func (o *TransportLayerProxyFirewall) GetMatch() TransportLayerProxyMatch { + if o == nil || IsNil(o.Match) { + var ret TransportLayerProxyMatch + return ret + } + return *o.Match +} + +// GetMatchOk returns a tuple with the Match field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TransportLayerProxyFirewall) GetMatchOk() (*TransportLayerProxyMatch, bool) { + if o == nil || IsNil(o.Match) { + return nil, false + } + return o.Match, true +} + +// HasMatch returns a boolean if a field has been set. +func (o *TransportLayerProxyFirewall) HasMatch() bool { + if o != nil && !IsNil(o.Match) { + return true + } + + return false +} + +// SetMatch gets a reference to the given TransportLayerProxyMatch and assigns it to the Match field. +func (o *TransportLayerProxyFirewall) SetMatch(v TransportLayerProxyMatch) { + o.Match = &v +} + +// GetActive returns the Active field value if set, zero value otherwise. +func (o *TransportLayerProxyFirewall) GetActive() bool { + if o == nil || IsNil(o.Active) { + var ret bool + return ret + } + return *o.Active +} + +// GetActiveOk returns a tuple with the Active field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TransportLayerProxyFirewall) GetActiveOk() (*bool, bool) { + if o == nil || IsNil(o.Active) { + return nil, false + } + return o.Active, true +} + +// HasActive returns a boolean if a field has been set. +func (o *TransportLayerProxyFirewall) HasActive() bool { + if o != nil && !IsNil(o.Active) { + return true + } + + return false +} + +// SetActive gets a reference to the given bool and assigns it to the Active field. +func (o *TransportLayerProxyFirewall) SetActive(v bool) { + o.Active = &v +} + +func (o TransportLayerProxyFirewall) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TransportLayerProxyFirewall) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Access) { + toSerialize["access"] = o.Access + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Match) { + toSerialize["match"] = o.Match + } + if !IsNil(o.Active) { + toSerialize["active"] = o.Active + } + return toSerialize, nil +} + +type NullableTransportLayerProxyFirewall struct { + value *TransportLayerProxyFirewall + isSet bool +} + +func (v NullableTransportLayerProxyFirewall) Get() *TransportLayerProxyFirewall { + return v.value +} + +func (v *NullableTransportLayerProxyFirewall) Set(val *TransportLayerProxyFirewall) { + v.value = val + v.isSet = true +} + +func (v NullableTransportLayerProxyFirewall) IsSet() bool { + return v.isSet +} + +func (v *NullableTransportLayerProxyFirewall) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTransportLayerProxyFirewall(val *TransportLayerProxyFirewall) *NullableTransportLayerProxyFirewall { + return &NullableTransportLayerProxyFirewall{value: val, isSet: true} +} + +func (v NullableTransportLayerProxyFirewall) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTransportLayerProxyFirewall) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_transport_layer_proxy_firewalls_inner.go b/model_transport_layer_proxy_firewalls_inner.go new file mode 100644 index 0000000..9e41bf6 --- /dev/null +++ b/model_transport_layer_proxy_firewalls_inner.go @@ -0,0 +1,306 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the TransportLayerProxyFirewallsInner type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TransportLayerProxyFirewallsInner{} + +// TransportLayerProxyFirewallsInner struct for TransportLayerProxyFirewallsInner +type TransportLayerProxyFirewallsInner struct { + Access *string `json:"access,omitempty"` + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + Type *string `json:"type,omitempty"` + Match *TransportLayerProxyMatch `json:"match,omitempty"` + Active *bool `json:"active,omitempty"` +} + +// NewTransportLayerProxyFirewallsInner instantiates a new TransportLayerProxyFirewallsInner object +// This constructor will assign default values to properties that have it defined, +// 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 NewTransportLayerProxyFirewallsInner() *TransportLayerProxyFirewallsInner { + this := TransportLayerProxyFirewallsInner{} + return &this +} + +// NewTransportLayerProxyFirewallsInnerWithDefaults instantiates a new TransportLayerProxyFirewallsInner object +// This 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 NewTransportLayerProxyFirewallsInnerWithDefaults() *TransportLayerProxyFirewallsInner { + this := TransportLayerProxyFirewallsInner{} + return &this +} + +// GetAccess returns the Access field value if set, zero value otherwise. +func (o *TransportLayerProxyFirewallsInner) GetAccess() string { + if o == nil || IsNil(o.Access) { + var ret string + return ret + } + return *o.Access +} + +// GetAccessOk returns a tuple with the Access field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TransportLayerProxyFirewallsInner) GetAccessOk() (*string, bool) { + if o == nil || IsNil(o.Access) { + return nil, false + } + return o.Access, true +} + +// HasAccess returns a boolean if a field has been set. +func (o *TransportLayerProxyFirewallsInner) HasAccess() bool { + if o != nil && !IsNil(o.Access) { + return true + } + + return false +} + +// SetAccess gets a reference to the given string and assigns it to the Access field. +func (o *TransportLayerProxyFirewallsInner) SetAccess(v string) { + o.Access = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *TransportLayerProxyFirewallsInner) 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 *TransportLayerProxyFirewallsInner) 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 *TransportLayerProxyFirewallsInner) 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 *TransportLayerProxyFirewallsInner) SetName(v string) { + o.Name = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *TransportLayerProxyFirewallsInner) 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 *TransportLayerProxyFirewallsInner) 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 *TransportLayerProxyFirewallsInner) 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 *TransportLayerProxyFirewallsInner) SetDescription(v string) { + o.Description = &v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *TransportLayerProxyFirewallsInner) 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 *TransportLayerProxyFirewallsInner) 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 *TransportLayerProxyFirewallsInner) 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 *TransportLayerProxyFirewallsInner) SetType(v string) { + o.Type = &v +} + +// GetMatch returns the Match field value if set, zero value otherwise. +func (o *TransportLayerProxyFirewallsInner) GetMatch() TransportLayerProxyMatch { + if o == nil || IsNil(o.Match) { + var ret TransportLayerProxyMatch + return ret + } + return *o.Match +} + +// GetMatchOk returns a tuple with the Match field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TransportLayerProxyFirewallsInner) GetMatchOk() (*TransportLayerProxyMatch, bool) { + if o == nil || IsNil(o.Match) { + return nil, false + } + return o.Match, true +} + +// HasMatch returns a boolean if a field has been set. +func (o *TransportLayerProxyFirewallsInner) HasMatch() bool { + if o != nil && !IsNil(o.Match) { + return true + } + + return false +} + +// SetMatch gets a reference to the given TransportLayerProxyMatch and assigns it to the Match field. +func (o *TransportLayerProxyFirewallsInner) SetMatch(v TransportLayerProxyMatch) { + o.Match = &v +} + +// GetActive returns the Active field value if set, zero value otherwise. +func (o *TransportLayerProxyFirewallsInner) GetActive() bool { + if o == nil || IsNil(o.Active) { + var ret bool + return ret + } + return *o.Active +} + +// GetActiveOk returns a tuple with the Active field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TransportLayerProxyFirewallsInner) GetActiveOk() (*bool, bool) { + if o == nil || IsNil(o.Active) { + return nil, false + } + return o.Active, true +} + +// HasActive returns a boolean if a field has been set. +func (o *TransportLayerProxyFirewallsInner) HasActive() bool { + if o != nil && !IsNil(o.Active) { + return true + } + + return false +} + +// SetActive gets a reference to the given bool and assigns it to the Active field. +func (o *TransportLayerProxyFirewallsInner) SetActive(v bool) { + o.Active = &v +} + +func (o TransportLayerProxyFirewallsInner) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TransportLayerProxyFirewallsInner) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Access) { + toSerialize["access"] = o.Access + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Match) { + toSerialize["match"] = o.Match + } + if !IsNil(o.Active) { + toSerialize["active"] = o.Active + } + return toSerialize, nil +} + +type NullableTransportLayerProxyFirewallsInner struct { + value *TransportLayerProxyFirewallsInner + isSet bool +} + +func (v NullableTransportLayerProxyFirewallsInner) Get() *TransportLayerProxyFirewallsInner { + return v.value +} + +func (v *NullableTransportLayerProxyFirewallsInner) Set(val *TransportLayerProxyFirewallsInner) { + v.value = val + v.isSet = true +} + +func (v NullableTransportLayerProxyFirewallsInner) IsSet() bool { + return v.isSet +} + +func (v *NullableTransportLayerProxyFirewallsInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTransportLayerProxyFirewallsInner(val *TransportLayerProxyFirewallsInner) *NullableTransportLayerProxyFirewallsInner { + return &NullableTransportLayerProxyFirewallsInner{value: val, isSet: true} +} + +func (v NullableTransportLayerProxyFirewallsInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTransportLayerProxyFirewallsInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_transport_layer_proxy_match.go b/model_transport_layer_proxy_match.go new file mode 100644 index 0000000..da9b7c1 --- /dev/null +++ b/model_transport_layer_proxy_match.go @@ -0,0 +1,148 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" + "fmt" +) + +// TransportLayerProxyMatch - struct for TransportLayerProxyMatch +type TransportLayerProxyMatch struct { + ArrayOfString *[]string + String *string +} + +// []stringAsTransportLayerProxyMatch is a convenience function that returns []string wrapped in TransportLayerProxyMatch +func ArrayOfStringAsTransportLayerProxyMatch(v *[]string) TransportLayerProxyMatch { + return TransportLayerProxyMatch{ + ArrayOfString: v, + } +} + +// stringAsTransportLayerProxyMatch is a convenience function that returns string wrapped in TransportLayerProxyMatch +func StringAsTransportLayerProxyMatch(v *string) TransportLayerProxyMatch { + return TransportLayerProxyMatch{ + String: v, + } +} + + +// Unmarshal JSON data into one of the pointers in the struct +func (dst *TransportLayerProxyMatch) UnmarshalJSON(data []byte) error { + var err error + match := 0 + // try to unmarshal data into ArrayOfString + err = newStrictDecoder(data).Decode(&dst.ArrayOfString) + if err == nil { + jsonArrayOfString, _ := json.Marshal(dst.ArrayOfString) + if string(jsonArrayOfString) == "{}" { // empty struct + dst.ArrayOfString = nil + } else { + match++ + } + } else { + dst.ArrayOfString = nil + } + + // try to unmarshal data into String + err = newStrictDecoder(data).Decode(&dst.String) + if err == nil { + jsonString, _ := json.Marshal(dst.String) + if string(jsonString) == "{}" { // empty struct + dst.String = nil + } else { + match++ + } + } else { + dst.String = nil + } + + if match > 1 { // more than 1 match + // reset to nil + dst.ArrayOfString = nil + dst.String = nil + + return fmt.Errorf("data matches more than one schema in oneOf(TransportLayerProxyMatch)") + } else if match == 1 { + return nil // exactly one match + } else { // no match + return fmt.Errorf("data failed to match schemas in oneOf(TransportLayerProxyMatch)") + } +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src TransportLayerProxyMatch) MarshalJSON() ([]byte, error) { + if src.ArrayOfString != nil { + return json.Marshal(&src.ArrayOfString) + } + + if src.String != nil { + return json.Marshal(&src.String) + } + + return nil, nil // no data in oneOf schemas +} + +// Get the actual instance +func (obj *TransportLayerProxyMatch) GetActualInstance() (interface{}) { + if obj == nil { + return nil + } + if obj.ArrayOfString != nil { + return obj.ArrayOfString + } + + if obj.String != nil { + return obj.String + } + + // all schemas are nil + return nil +} + +type NullableTransportLayerProxyMatch struct { + value *TransportLayerProxyMatch + isSet bool +} + +func (v NullableTransportLayerProxyMatch) Get() *TransportLayerProxyMatch { + return v.value +} + +func (v *NullableTransportLayerProxyMatch) Set(val *TransportLayerProxyMatch) { + v.value = val + v.isSet = true +} + +func (v NullableTransportLayerProxyMatch) IsSet() bool { + return v.isSet +} + +func (v *NullableTransportLayerProxyMatch) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTransportLayerProxyMatch(val *TransportLayerProxyMatch) *NullableTransportLayerProxyMatch { + return &NullableTransportLayerProxyMatch{value: val, isSet: true} +} + +func (v NullableTransportLayerProxyMatch) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTransportLayerProxyMatch) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_transport_layer_proxy_response.go b/model_transport_layer_proxy_response.go new file mode 100644 index 0000000..95326bb --- /dev/null +++ b/model_transport_layer_proxy_response.go @@ -0,0 +1,172 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the TransportLayerProxyResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TransportLayerProxyResponse{} + +// TransportLayerProxyResponse struct for TransportLayerProxyResponse +type TransportLayerProxyResponse struct { + Data *TransportLayerProxy `json:"data,omitempty"` + Message NullableString `json:"message,omitempty"` +} + +// NewTransportLayerProxyResponse instantiates a new TransportLayerProxyResponse object +// This constructor will assign default values to properties that have it defined, +// 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 NewTransportLayerProxyResponse() *TransportLayerProxyResponse { + this := TransportLayerProxyResponse{} + return &this +} + +// NewTransportLayerProxyResponseWithDefaults instantiates a new TransportLayerProxyResponse object +// This 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 NewTransportLayerProxyResponseWithDefaults() *TransportLayerProxyResponse { + this := TransportLayerProxyResponse{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *TransportLayerProxyResponse) GetData() TransportLayerProxy { + if o == nil || IsNil(o.Data) { + var ret TransportLayerProxy + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TransportLayerProxyResponse) GetDataOk() (*TransportLayerProxy, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *TransportLayerProxyResponse) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given TransportLayerProxy and assigns it to the Data field. +func (o *TransportLayerProxyResponse) SetData(v TransportLayerProxy) { + o.Data = &v +} + +// GetMessage returns the Message field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *TransportLayerProxyResponse) GetMessage() string { + if o == nil || IsNil(o.Message.Get()) { + var ret string + return ret + } + return *o.Message.Get() +} + +// GetMessageOk returns a tuple with the Message 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 *TransportLayerProxyResponse) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Message.Get(), o.Message.IsSet() +} + +// HasMessage returns a boolean if a field has been set. +func (o *TransportLayerProxyResponse) HasMessage() bool { + if o != nil && o.Message.IsSet() { + return true + } + + return false +} + +// SetMessage gets a reference to the given NullableString and assigns it to the Message field. +func (o *TransportLayerProxyResponse) SetMessage(v string) { + o.Message.Set(&v) +} +// SetMessageNil sets the value for Message to be an explicit nil +func (o *TransportLayerProxyResponse) SetMessageNil() { + o.Message.Set(nil) +} + +// UnsetMessage ensures that no value is present for Message, not even an explicit nil +func (o *TransportLayerProxyResponse) UnsetMessage() { + o.Message.Unset() +} + +func (o TransportLayerProxyResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TransportLayerProxyResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + if o.Message.IsSet() { + toSerialize["message"] = o.Message.Get() + } + return toSerialize, nil +} + +type NullableTransportLayerProxyResponse struct { + value *TransportLayerProxyResponse + isSet bool +} + +func (v NullableTransportLayerProxyResponse) Get() *TransportLayerProxyResponse { + return v.value +} + +func (v *NullableTransportLayerProxyResponse) Set(val *TransportLayerProxyResponse) { + v.value = val + v.isSet = true +} + +func (v NullableTransportLayerProxyResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableTransportLayerProxyResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTransportLayerProxyResponse(val *TransportLayerProxyResponse) *NullableTransportLayerProxyResponse { + return &NullableTransportLayerProxyResponse{value: val, isSet: true} +} + +func (v NullableTransportLayerProxyResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTransportLayerProxyResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_transport_layer_proxy_server.go b/model_transport_layer_proxy_server.go new file mode 100644 index 0000000..046c51f --- /dev/null +++ b/model_transport_layer_proxy_server.go @@ -0,0 +1,306 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the TransportLayerProxyServer type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TransportLayerProxyServer{} + +// TransportLayerProxyServer struct for TransportLayerProxyServer +type TransportLayerProxyServer struct { + Address string `json:"address"` + Port int32 `json:"port"` + Weight int32 `json:"weight"` + Check string `json:"check"` + Fall *int32 `json:"fall,omitempty"` + Inter *int32 `json:"inter,omitempty"` + Rise *int32 `json:"rise,omitempty"` +} + +// NewTransportLayerProxyServer instantiates a new TransportLayerProxyServer object +// This constructor will assign default values to properties that have it defined, +// 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 NewTransportLayerProxyServer(address string, port int32, weight int32, check string) *TransportLayerProxyServer { + this := TransportLayerProxyServer{} + this.Address = address + this.Port = port + this.Weight = weight + this.Check = check + return &this +} + +// NewTransportLayerProxyServerWithDefaults instantiates a new TransportLayerProxyServer object +// This 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 NewTransportLayerProxyServerWithDefaults() *TransportLayerProxyServer { + this := TransportLayerProxyServer{} + return &this +} + +// GetAddress returns the Address field value +func (o *TransportLayerProxyServer) GetAddress() string { + if o == nil { + var ret string + return ret + } + + return o.Address +} + +// GetAddressOk returns a tuple with the Address field value +// and a boolean to check if the value has been set. +func (o *TransportLayerProxyServer) GetAddressOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Address, true +} + +// SetAddress sets field value +func (o *TransportLayerProxyServer) SetAddress(v string) { + o.Address = v +} + +// GetPort returns the Port field value +func (o *TransportLayerProxyServer) GetPort() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Port +} + +// GetPortOk returns a tuple with the Port field value +// and a boolean to check if the value has been set. +func (o *TransportLayerProxyServer) GetPortOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Port, true +} + +// SetPort sets field value +func (o *TransportLayerProxyServer) SetPort(v int32) { + o.Port = v +} + +// GetWeight returns the Weight field value +func (o *TransportLayerProxyServer) GetWeight() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Weight +} + +// GetWeightOk returns a tuple with the Weight field value +// and a boolean to check if the value has been set. +func (o *TransportLayerProxyServer) GetWeightOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Weight, true +} + +// SetWeight sets field value +func (o *TransportLayerProxyServer) SetWeight(v int32) { + o.Weight = v +} + +// GetCheck returns the Check field value +func (o *TransportLayerProxyServer) GetCheck() string { + if o == nil { + var ret string + return ret + } + + return o.Check +} + +// GetCheckOk returns a tuple with the Check field value +// and a boolean to check if the value has been set. +func (o *TransportLayerProxyServer) GetCheckOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Check, true +} + +// SetCheck sets field value +func (o *TransportLayerProxyServer) SetCheck(v string) { + o.Check = v +} + +// GetFall returns the Fall field value if set, zero value otherwise. +func (o *TransportLayerProxyServer) GetFall() int32 { + if o == nil || IsNil(o.Fall) { + var ret int32 + return ret + } + return *o.Fall +} + +// GetFallOk returns a tuple with the Fall field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TransportLayerProxyServer) GetFallOk() (*int32, bool) { + if o == nil || IsNil(o.Fall) { + return nil, false + } + return o.Fall, true +} + +// HasFall returns a boolean if a field has been set. +func (o *TransportLayerProxyServer) HasFall() bool { + if o != nil && !IsNil(o.Fall) { + return true + } + + return false +} + +// SetFall gets a reference to the given int32 and assigns it to the Fall field. +func (o *TransportLayerProxyServer) SetFall(v int32) { + o.Fall = &v +} + +// GetInter returns the Inter field value if set, zero value otherwise. +func (o *TransportLayerProxyServer) GetInter() int32 { + if o == nil || IsNil(o.Inter) { + var ret int32 + return ret + } + return *o.Inter +} + +// GetInterOk returns a tuple with the Inter field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TransportLayerProxyServer) GetInterOk() (*int32, bool) { + if o == nil || IsNil(o.Inter) { + return nil, false + } + return o.Inter, true +} + +// HasInter returns a boolean if a field has been set. +func (o *TransportLayerProxyServer) HasInter() bool { + if o != nil && !IsNil(o.Inter) { + return true + } + + return false +} + +// SetInter gets a reference to the given int32 and assigns it to the Inter field. +func (o *TransportLayerProxyServer) SetInter(v int32) { + o.Inter = &v +} + +// GetRise returns the Rise field value if set, zero value otherwise. +func (o *TransportLayerProxyServer) GetRise() int32 { + if o == nil || IsNil(o.Rise) { + var ret int32 + return ret + } + return *o.Rise +} + +// GetRiseOk returns a tuple with the Rise field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TransportLayerProxyServer) GetRiseOk() (*int32, bool) { + if o == nil || IsNil(o.Rise) { + return nil, false + } + return o.Rise, true +} + +// HasRise returns a boolean if a field has been set. +func (o *TransportLayerProxyServer) HasRise() bool { + if o != nil && !IsNil(o.Rise) { + return true + } + + return false +} + +// SetRise gets a reference to the given int32 and assigns it to the Rise field. +func (o *TransportLayerProxyServer) SetRise(v int32) { + o.Rise = &v +} + +func (o TransportLayerProxyServer) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TransportLayerProxyServer) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["address"] = o.Address + toSerialize["port"] = o.Port + toSerialize["weight"] = o.Weight + toSerialize["check"] = o.Check + if !IsNil(o.Fall) { + toSerialize["fall"] = o.Fall + } + if !IsNil(o.Inter) { + toSerialize["inter"] = o.Inter + } + if !IsNil(o.Rise) { + toSerialize["rise"] = o.Rise + } + return toSerialize, nil +} + +type NullableTransportLayerProxyServer struct { + value *TransportLayerProxyServer + isSet bool +} + +func (v NullableTransportLayerProxyServer) Get() *TransportLayerProxyServer { + return v.value +} + +func (v *NullableTransportLayerProxyServer) Set(val *TransportLayerProxyServer) { + v.value = val + v.isSet = true +} + +func (v NullableTransportLayerProxyServer) IsSet() bool { + return v.isSet +} + +func (v *NullableTransportLayerProxyServer) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTransportLayerProxyServer(val *TransportLayerProxyServer) *NullableTransportLayerProxyServer { + return &NullableTransportLayerProxyServer{value: val, isSet: true} +} + +func (v NullableTransportLayerProxyServer) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTransportLayerProxyServer) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_transport_layer_proxy_servers_inner.go b/model_transport_layer_proxy_servers_inner.go new file mode 100644 index 0000000..0671392 --- /dev/null +++ b/model_transport_layer_proxy_servers_inner.go @@ -0,0 +1,342 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the TransportLayerProxyServersInner type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TransportLayerProxyServersInner{} + +// TransportLayerProxyServersInner struct for TransportLayerProxyServersInner +type TransportLayerProxyServersInner struct { + Address *string `json:"address,omitempty"` + Port *int32 `json:"port,omitempty"` + Weight *int32 `json:"weight,omitempty"` + Check *string `json:"check,omitempty"` + Fall *int32 `json:"fall,omitempty"` + Inter *int32 `json:"inter,omitempty"` + Rise *int32 `json:"rise,omitempty"` +} + +// NewTransportLayerProxyServersInner instantiates a new TransportLayerProxyServersInner object +// This constructor will assign default values to properties that have it defined, +// 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 NewTransportLayerProxyServersInner() *TransportLayerProxyServersInner { + this := TransportLayerProxyServersInner{} + return &this +} + +// NewTransportLayerProxyServersInnerWithDefaults instantiates a new TransportLayerProxyServersInner object +// This 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 NewTransportLayerProxyServersInnerWithDefaults() *TransportLayerProxyServersInner { + this := TransportLayerProxyServersInner{} + return &this +} + +// GetAddress returns the Address field value if set, zero value otherwise. +func (o *TransportLayerProxyServersInner) GetAddress() string { + if o == nil || IsNil(o.Address) { + var ret string + return ret + } + return *o.Address +} + +// GetAddressOk returns a tuple with the Address field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TransportLayerProxyServersInner) GetAddressOk() (*string, bool) { + if o == nil || IsNil(o.Address) { + return nil, false + } + return o.Address, true +} + +// HasAddress returns a boolean if a field has been set. +func (o *TransportLayerProxyServersInner) HasAddress() bool { + if o != nil && !IsNil(o.Address) { + return true + } + + return false +} + +// SetAddress gets a reference to the given string and assigns it to the Address field. +func (o *TransportLayerProxyServersInner) SetAddress(v string) { + o.Address = &v +} + +// GetPort returns the Port field value if set, zero value otherwise. +func (o *TransportLayerProxyServersInner) GetPort() int32 { + if o == nil || IsNil(o.Port) { + var ret int32 + return ret + } + return *o.Port +} + +// GetPortOk returns a tuple with the Port field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TransportLayerProxyServersInner) GetPortOk() (*int32, bool) { + if o == nil || IsNil(o.Port) { + return nil, false + } + return o.Port, true +} + +// HasPort returns a boolean if a field has been set. +func (o *TransportLayerProxyServersInner) HasPort() bool { + if o != nil && !IsNil(o.Port) { + return true + } + + return false +} + +// SetPort gets a reference to the given int32 and assigns it to the Port field. +func (o *TransportLayerProxyServersInner) SetPort(v int32) { + o.Port = &v +} + +// GetWeight returns the Weight field value if set, zero value otherwise. +func (o *TransportLayerProxyServersInner) GetWeight() int32 { + if o == nil || IsNil(o.Weight) { + var ret int32 + return ret + } + return *o.Weight +} + +// GetWeightOk returns a tuple with the Weight field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TransportLayerProxyServersInner) GetWeightOk() (*int32, bool) { + if o == nil || IsNil(o.Weight) { + return nil, false + } + return o.Weight, true +} + +// HasWeight returns a boolean if a field has been set. +func (o *TransportLayerProxyServersInner) HasWeight() bool { + if o != nil && !IsNil(o.Weight) { + return true + } + + return false +} + +// SetWeight gets a reference to the given int32 and assigns it to the Weight field. +func (o *TransportLayerProxyServersInner) SetWeight(v int32) { + o.Weight = &v +} + +// GetCheck returns the Check field value if set, zero value otherwise. +func (o *TransportLayerProxyServersInner) GetCheck() string { + if o == nil || IsNil(o.Check) { + var ret string + return ret + } + return *o.Check +} + +// GetCheckOk returns a tuple with the Check field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TransportLayerProxyServersInner) GetCheckOk() (*string, bool) { + if o == nil || IsNil(o.Check) { + return nil, false + } + return o.Check, true +} + +// HasCheck returns a boolean if a field has been set. +func (o *TransportLayerProxyServersInner) HasCheck() bool { + if o != nil && !IsNil(o.Check) { + return true + } + + return false +} + +// SetCheck gets a reference to the given string and assigns it to the Check field. +func (o *TransportLayerProxyServersInner) SetCheck(v string) { + o.Check = &v +} + +// GetFall returns the Fall field value if set, zero value otherwise. +func (o *TransportLayerProxyServersInner) GetFall() int32 { + if o == nil || IsNil(o.Fall) { + var ret int32 + return ret + } + return *o.Fall +} + +// GetFallOk returns a tuple with the Fall field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TransportLayerProxyServersInner) GetFallOk() (*int32, bool) { + if o == nil || IsNil(o.Fall) { + return nil, false + } + return o.Fall, true +} + +// HasFall returns a boolean if a field has been set. +func (o *TransportLayerProxyServersInner) HasFall() bool { + if o != nil && !IsNil(o.Fall) { + return true + } + + return false +} + +// SetFall gets a reference to the given int32 and assigns it to the Fall field. +func (o *TransportLayerProxyServersInner) SetFall(v int32) { + o.Fall = &v +} + +// GetInter returns the Inter field value if set, zero value otherwise. +func (o *TransportLayerProxyServersInner) GetInter() int32 { + if o == nil || IsNil(o.Inter) { + var ret int32 + return ret + } + return *o.Inter +} + +// GetInterOk returns a tuple with the Inter field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TransportLayerProxyServersInner) GetInterOk() (*int32, bool) { + if o == nil || IsNil(o.Inter) { + return nil, false + } + return o.Inter, true +} + +// HasInter returns a boolean if a field has been set. +func (o *TransportLayerProxyServersInner) HasInter() bool { + if o != nil && !IsNil(o.Inter) { + return true + } + + return false +} + +// SetInter gets a reference to the given int32 and assigns it to the Inter field. +func (o *TransportLayerProxyServersInner) SetInter(v int32) { + o.Inter = &v +} + +// GetRise returns the Rise field value if set, zero value otherwise. +func (o *TransportLayerProxyServersInner) GetRise() int32 { + if o == nil || IsNil(o.Rise) { + var ret int32 + return ret + } + return *o.Rise +} + +// GetRiseOk returns a tuple with the Rise field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TransportLayerProxyServersInner) GetRiseOk() (*int32, bool) { + if o == nil || IsNil(o.Rise) { + return nil, false + } + return o.Rise, true +} + +// HasRise returns a boolean if a field has been set. +func (o *TransportLayerProxyServersInner) HasRise() bool { + if o != nil && !IsNil(o.Rise) { + return true + } + + return false +} + +// SetRise gets a reference to the given int32 and assigns it to the Rise field. +func (o *TransportLayerProxyServersInner) SetRise(v int32) { + o.Rise = &v +} + +func (o TransportLayerProxyServersInner) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TransportLayerProxyServersInner) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Address) { + toSerialize["address"] = o.Address + } + if !IsNil(o.Port) { + toSerialize["port"] = o.Port + } + if !IsNil(o.Weight) { + toSerialize["weight"] = o.Weight + } + if !IsNil(o.Check) { + toSerialize["check"] = o.Check + } + if !IsNil(o.Fall) { + toSerialize["fall"] = o.Fall + } + if !IsNil(o.Inter) { + toSerialize["inter"] = o.Inter + } + if !IsNil(o.Rise) { + toSerialize["rise"] = o.Rise + } + return toSerialize, nil +} + +type NullableTransportLayerProxyServersInner struct { + value *TransportLayerProxyServersInner + isSet bool +} + +func (v NullableTransportLayerProxyServersInner) Get() *TransportLayerProxyServersInner { + return v.value +} + +func (v *NullableTransportLayerProxyServersInner) Set(val *TransportLayerProxyServersInner) { + v.value = val + v.isSet = true +} + +func (v NullableTransportLayerProxyServersInner) IsSet() bool { + return v.isSet +} + +func (v *NullableTransportLayerProxyServersInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTransportLayerProxyServersInner(val *TransportLayerProxyServersInner) *NullableTransportLayerProxyServersInner { + return &NullableTransportLayerProxyServersInner{value: val, isSet: true} +} + +func (v NullableTransportLayerProxyServersInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTransportLayerProxyServersInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_transport_layer_proxy_store.go b/model_transport_layer_proxy_store.go new file mode 100644 index 0000000..993dab3 --- /dev/null +++ b/model_transport_layer_proxy_store.go @@ -0,0 +1,360 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the TransportLayerProxyStore type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TransportLayerProxyStore{} + +// TransportLayerProxyStore struct for TransportLayerProxyStore +type TransportLayerProxyStore struct { + AppName string `json:"app_name"` + Description *string `json:"description,omitempty"` + Domain string `json:"domain"` + Port int32 `json:"port"` + ProxyProtocol string `json:"proxy_protocol"` + BalanceAlgorithm string `json:"balance_algorithm"` + Servers []TransportLayerProxyServer `json:"servers,omitempty"` + FirewallDefaultAction string `json:"firewall_default_action"` + Firewalls []TransportLayerProxyFirewall `json:"firewalls,omitempty"` +} + +// NewTransportLayerProxyStore instantiates a new TransportLayerProxyStore object +// This constructor will assign default values to properties that have it defined, +// 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 NewTransportLayerProxyStore(appName string, domain string, port int32, proxyProtocol string, balanceAlgorithm string, firewallDefaultAction string) *TransportLayerProxyStore { + this := TransportLayerProxyStore{} + this.AppName = appName + this.Domain = domain + this.Port = port + this.ProxyProtocol = proxyProtocol + this.BalanceAlgorithm = balanceAlgorithm + this.FirewallDefaultAction = firewallDefaultAction + return &this +} + +// NewTransportLayerProxyStoreWithDefaults instantiates a new TransportLayerProxyStore object +// This 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 NewTransportLayerProxyStoreWithDefaults() *TransportLayerProxyStore { + this := TransportLayerProxyStore{} + return &this +} + +// GetAppName returns the AppName field value +func (o *TransportLayerProxyStore) GetAppName() string { + if o == nil { + var ret string + return ret + } + + return o.AppName +} + +// GetAppNameOk returns a tuple with the AppName field value +// and a boolean to check if the value has been set. +func (o *TransportLayerProxyStore) GetAppNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.AppName, true +} + +// SetAppName sets field value +func (o *TransportLayerProxyStore) SetAppName(v string) { + o.AppName = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *TransportLayerProxyStore) 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 *TransportLayerProxyStore) 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 *TransportLayerProxyStore) 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 *TransportLayerProxyStore) SetDescription(v string) { + o.Description = &v +} + +// GetDomain returns the Domain field value +func (o *TransportLayerProxyStore) GetDomain() string { + if o == nil { + var ret string + return ret + } + + return o.Domain +} + +// GetDomainOk returns a tuple with the Domain field value +// and a boolean to check if the value has been set. +func (o *TransportLayerProxyStore) GetDomainOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Domain, true +} + +// SetDomain sets field value +func (o *TransportLayerProxyStore) SetDomain(v string) { + o.Domain = v +} + +// GetPort returns the Port field value +func (o *TransportLayerProxyStore) GetPort() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Port +} + +// GetPortOk returns a tuple with the Port field value +// and a boolean to check if the value has been set. +func (o *TransportLayerProxyStore) GetPortOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Port, true +} + +// SetPort sets field value +func (o *TransportLayerProxyStore) SetPort(v int32) { + o.Port = v +} + +// GetProxyProtocol returns the ProxyProtocol field value +func (o *TransportLayerProxyStore) GetProxyProtocol() string { + if o == nil { + var ret string + return ret + } + + return o.ProxyProtocol +} + +// GetProxyProtocolOk returns a tuple with the ProxyProtocol field value +// and a boolean to check if the value has been set. +func (o *TransportLayerProxyStore) GetProxyProtocolOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ProxyProtocol, true +} + +// SetProxyProtocol sets field value +func (o *TransportLayerProxyStore) SetProxyProtocol(v string) { + o.ProxyProtocol = v +} + +// GetBalanceAlgorithm returns the BalanceAlgorithm field value +func (o *TransportLayerProxyStore) GetBalanceAlgorithm() string { + if o == nil { + var ret string + return ret + } + + return o.BalanceAlgorithm +} + +// GetBalanceAlgorithmOk returns a tuple with the BalanceAlgorithm field value +// and a boolean to check if the value has been set. +func (o *TransportLayerProxyStore) GetBalanceAlgorithmOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.BalanceAlgorithm, true +} + +// SetBalanceAlgorithm sets field value +func (o *TransportLayerProxyStore) SetBalanceAlgorithm(v string) { + o.BalanceAlgorithm = v +} + +// GetServers returns the Servers field value if set, zero value otherwise. +func (o *TransportLayerProxyStore) GetServers() []TransportLayerProxyServer { + if o == nil || IsNil(o.Servers) { + var ret []TransportLayerProxyServer + return ret + } + return o.Servers +} + +// GetServersOk returns a tuple with the Servers field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TransportLayerProxyStore) GetServersOk() ([]TransportLayerProxyServer, bool) { + if o == nil || IsNil(o.Servers) { + return nil, false + } + return o.Servers, true +} + +// HasServers returns a boolean if a field has been set. +func (o *TransportLayerProxyStore) HasServers() bool { + if o != nil && !IsNil(o.Servers) { + return true + } + + return false +} + +// SetServers gets a reference to the given []TransportLayerProxyServer and assigns it to the Servers field. +func (o *TransportLayerProxyStore) SetServers(v []TransportLayerProxyServer) { + o.Servers = v +} + +// GetFirewallDefaultAction returns the FirewallDefaultAction field value +func (o *TransportLayerProxyStore) GetFirewallDefaultAction() string { + if o == nil { + var ret string + return ret + } + + return o.FirewallDefaultAction +} + +// GetFirewallDefaultActionOk returns a tuple with the FirewallDefaultAction field value +// and a boolean to check if the value has been set. +func (o *TransportLayerProxyStore) GetFirewallDefaultActionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.FirewallDefaultAction, true +} + +// SetFirewallDefaultAction sets field value +func (o *TransportLayerProxyStore) SetFirewallDefaultAction(v string) { + o.FirewallDefaultAction = v +} + +// GetFirewalls returns the Firewalls field value if set, zero value otherwise. +func (o *TransportLayerProxyStore) GetFirewalls() []TransportLayerProxyFirewall { + if o == nil || IsNil(o.Firewalls) { + var ret []TransportLayerProxyFirewall + return ret + } + return o.Firewalls +} + +// GetFirewallsOk returns a tuple with the Firewalls field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TransportLayerProxyStore) GetFirewallsOk() ([]TransportLayerProxyFirewall, bool) { + if o == nil || IsNil(o.Firewalls) { + return nil, false + } + return o.Firewalls, true +} + +// HasFirewalls returns a boolean if a field has been set. +func (o *TransportLayerProxyStore) HasFirewalls() bool { + if o != nil && !IsNil(o.Firewalls) { + return true + } + + return false +} + +// SetFirewalls gets a reference to the given []TransportLayerProxyFirewall and assigns it to the Firewalls field. +func (o *TransportLayerProxyStore) SetFirewalls(v []TransportLayerProxyFirewall) { + o.Firewalls = v +} + +func (o TransportLayerProxyStore) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TransportLayerProxyStore) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["app_name"] = o.AppName + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + toSerialize["domain"] = o.Domain + toSerialize["port"] = o.Port + toSerialize["proxy_protocol"] = o.ProxyProtocol + toSerialize["balance_algorithm"] = o.BalanceAlgorithm + if !IsNil(o.Servers) { + toSerialize["servers"] = o.Servers + } + toSerialize["firewall_default_action"] = o.FirewallDefaultAction + if !IsNil(o.Firewalls) { + toSerialize["firewalls"] = o.Firewalls + } + return toSerialize, nil +} + +type NullableTransportLayerProxyStore struct { + value *TransportLayerProxyStore + isSet bool +} + +func (v NullableTransportLayerProxyStore) Get() *TransportLayerProxyStore { + return v.value +} + +func (v *NullableTransportLayerProxyStore) Set(val *TransportLayerProxyStore) { + v.value = val + v.isSet = true +} + +func (v NullableTransportLayerProxyStore) IsSet() bool { + return v.isSet +} + +func (v *NullableTransportLayerProxyStore) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTransportLayerProxyStore(val *TransportLayerProxyStore) *NullableTransportLayerProxyStore { + return &NullableTransportLayerProxyStore{value: val, isSet: true} +} + +func (v NullableTransportLayerProxyStore) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTransportLayerProxyStore) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_transport_layer_proxy_update.go b/model_transport_layer_proxy_update.go new file mode 100644 index 0000000..ffca540 --- /dev/null +++ b/model_transport_layer_proxy_update.go @@ -0,0 +1,387 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the TransportLayerProxyUpdate type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TransportLayerProxyUpdate{} + +// TransportLayerProxyUpdate struct for TransportLayerProxyUpdate +type TransportLayerProxyUpdate struct { + AppName string `json:"app_name"` + Description *string `json:"description,omitempty"` + Domain *string `json:"domain,omitempty"` + Port *int32 `json:"port,omitempty"` + ProxyProtocol string `json:"proxy_protocol"` + BalanceAlgorithm string `json:"balance_algorithm"` + Servers []TransportLayerProxyServer `json:"servers,omitempty"` + FirewallDefaultAction *string `json:"firewall_default_action,omitempty"` + Firewalls []TransportLayerProxyFirewall `json:"firewalls,omitempty"` +} + +// NewTransportLayerProxyUpdate instantiates a new TransportLayerProxyUpdate object +// This constructor will assign default values to properties that have it defined, +// 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 NewTransportLayerProxyUpdate(appName string, proxyProtocol string, balanceAlgorithm string) *TransportLayerProxyUpdate { + this := TransportLayerProxyUpdate{} + this.AppName = appName + this.ProxyProtocol = proxyProtocol + this.BalanceAlgorithm = balanceAlgorithm + return &this +} + +// NewTransportLayerProxyUpdateWithDefaults instantiates a new TransportLayerProxyUpdate object +// This 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 NewTransportLayerProxyUpdateWithDefaults() *TransportLayerProxyUpdate { + this := TransportLayerProxyUpdate{} + return &this +} + +// GetAppName returns the AppName field value +func (o *TransportLayerProxyUpdate) GetAppName() string { + if o == nil { + var ret string + return ret + } + + return o.AppName +} + +// GetAppNameOk returns a tuple with the AppName field value +// and a boolean to check if the value has been set. +func (o *TransportLayerProxyUpdate) GetAppNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.AppName, true +} + +// SetAppName sets field value +func (o *TransportLayerProxyUpdate) SetAppName(v string) { + o.AppName = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *TransportLayerProxyUpdate) 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 *TransportLayerProxyUpdate) 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 *TransportLayerProxyUpdate) 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 *TransportLayerProxyUpdate) SetDescription(v string) { + o.Description = &v +} + +// GetDomain returns the Domain field value if set, zero value otherwise. +func (o *TransportLayerProxyUpdate) GetDomain() string { + if o == nil || IsNil(o.Domain) { + var ret string + return ret + } + return *o.Domain +} + +// GetDomainOk returns a tuple with the Domain field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TransportLayerProxyUpdate) GetDomainOk() (*string, bool) { + if o == nil || IsNil(o.Domain) { + return nil, false + } + return o.Domain, true +} + +// HasDomain returns a boolean if a field has been set. +func (o *TransportLayerProxyUpdate) HasDomain() bool { + if o != nil && !IsNil(o.Domain) { + return true + } + + return false +} + +// SetDomain gets a reference to the given string and assigns it to the Domain field. +func (o *TransportLayerProxyUpdate) SetDomain(v string) { + o.Domain = &v +} + +// GetPort returns the Port field value if set, zero value otherwise. +func (o *TransportLayerProxyUpdate) GetPort() int32 { + if o == nil || IsNil(o.Port) { + var ret int32 + return ret + } + return *o.Port +} + +// GetPortOk returns a tuple with the Port field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TransportLayerProxyUpdate) GetPortOk() (*int32, bool) { + if o == nil || IsNil(o.Port) { + return nil, false + } + return o.Port, true +} + +// HasPort returns a boolean if a field has been set. +func (o *TransportLayerProxyUpdate) HasPort() bool { + if o != nil && !IsNil(o.Port) { + return true + } + + return false +} + +// SetPort gets a reference to the given int32 and assigns it to the Port field. +func (o *TransportLayerProxyUpdate) SetPort(v int32) { + o.Port = &v +} + +// GetProxyProtocol returns the ProxyProtocol field value +func (o *TransportLayerProxyUpdate) GetProxyProtocol() string { + if o == nil { + var ret string + return ret + } + + return o.ProxyProtocol +} + +// GetProxyProtocolOk returns a tuple with the ProxyProtocol field value +// and a boolean to check if the value has been set. +func (o *TransportLayerProxyUpdate) GetProxyProtocolOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ProxyProtocol, true +} + +// SetProxyProtocol sets field value +func (o *TransportLayerProxyUpdate) SetProxyProtocol(v string) { + o.ProxyProtocol = v +} + +// GetBalanceAlgorithm returns the BalanceAlgorithm field value +func (o *TransportLayerProxyUpdate) GetBalanceAlgorithm() string { + if o == nil { + var ret string + return ret + } + + return o.BalanceAlgorithm +} + +// GetBalanceAlgorithmOk returns a tuple with the BalanceAlgorithm field value +// and a boolean to check if the value has been set. +func (o *TransportLayerProxyUpdate) GetBalanceAlgorithmOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.BalanceAlgorithm, true +} + +// SetBalanceAlgorithm sets field value +func (o *TransportLayerProxyUpdate) SetBalanceAlgorithm(v string) { + o.BalanceAlgorithm = v +} + +// GetServers returns the Servers field value if set, zero value otherwise. +func (o *TransportLayerProxyUpdate) GetServers() []TransportLayerProxyServer { + if o == nil || IsNil(o.Servers) { + var ret []TransportLayerProxyServer + return ret + } + return o.Servers +} + +// GetServersOk returns a tuple with the Servers field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TransportLayerProxyUpdate) GetServersOk() ([]TransportLayerProxyServer, bool) { + if o == nil || IsNil(o.Servers) { + return nil, false + } + return o.Servers, true +} + +// HasServers returns a boolean if a field has been set. +func (o *TransportLayerProxyUpdate) HasServers() bool { + if o != nil && !IsNil(o.Servers) { + return true + } + + return false +} + +// SetServers gets a reference to the given []TransportLayerProxyServer and assigns it to the Servers field. +func (o *TransportLayerProxyUpdate) SetServers(v []TransportLayerProxyServer) { + o.Servers = v +} + +// GetFirewallDefaultAction returns the FirewallDefaultAction field value if set, zero value otherwise. +func (o *TransportLayerProxyUpdate) GetFirewallDefaultAction() string { + if o == nil || IsNil(o.FirewallDefaultAction) { + var ret string + return ret + } + return *o.FirewallDefaultAction +} + +// GetFirewallDefaultActionOk returns a tuple with the FirewallDefaultAction field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TransportLayerProxyUpdate) GetFirewallDefaultActionOk() (*string, bool) { + if o == nil || IsNil(o.FirewallDefaultAction) { + return nil, false + } + return o.FirewallDefaultAction, true +} + +// HasFirewallDefaultAction returns a boolean if a field has been set. +func (o *TransportLayerProxyUpdate) HasFirewallDefaultAction() bool { + if o != nil && !IsNil(o.FirewallDefaultAction) { + return true + } + + return false +} + +// SetFirewallDefaultAction gets a reference to the given string and assigns it to the FirewallDefaultAction field. +func (o *TransportLayerProxyUpdate) SetFirewallDefaultAction(v string) { + o.FirewallDefaultAction = &v +} + +// GetFirewalls returns the Firewalls field value if set, zero value otherwise. +func (o *TransportLayerProxyUpdate) GetFirewalls() []TransportLayerProxyFirewall { + if o == nil || IsNil(o.Firewalls) { + var ret []TransportLayerProxyFirewall + return ret + } + return o.Firewalls +} + +// GetFirewallsOk returns a tuple with the Firewalls field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TransportLayerProxyUpdate) GetFirewallsOk() ([]TransportLayerProxyFirewall, bool) { + if o == nil || IsNil(o.Firewalls) { + return nil, false + } + return o.Firewalls, true +} + +// HasFirewalls returns a boolean if a field has been set. +func (o *TransportLayerProxyUpdate) HasFirewalls() bool { + if o != nil && !IsNil(o.Firewalls) { + return true + } + + return false +} + +// SetFirewalls gets a reference to the given []TransportLayerProxyFirewall and assigns it to the Firewalls field. +func (o *TransportLayerProxyUpdate) SetFirewalls(v []TransportLayerProxyFirewall) { + o.Firewalls = v +} + +func (o TransportLayerProxyUpdate) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TransportLayerProxyUpdate) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["app_name"] = o.AppName + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.Domain) { + toSerialize["domain"] = o.Domain + } + if !IsNil(o.Port) { + toSerialize["port"] = o.Port + } + toSerialize["proxy_protocol"] = o.ProxyProtocol + toSerialize["balance_algorithm"] = o.BalanceAlgorithm + if !IsNil(o.Servers) { + toSerialize["servers"] = o.Servers + } + if !IsNil(o.FirewallDefaultAction) { + toSerialize["firewall_default_action"] = o.FirewallDefaultAction + } + if !IsNil(o.Firewalls) { + toSerialize["firewalls"] = o.Firewalls + } + return toSerialize, nil +} + +type NullableTransportLayerProxyUpdate struct { + value *TransportLayerProxyUpdate + isSet bool +} + +func (v NullableTransportLayerProxyUpdate) Get() *TransportLayerProxyUpdate { + return v.value +} + +func (v *NullableTransportLayerProxyUpdate) Set(val *TransportLayerProxyUpdate) { + v.value = val + v.isSet = true +} + +func (v NullableTransportLayerProxyUpdate) IsSet() bool { + return v.isSet +} + +func (v *NullableTransportLayerProxyUpdate) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTransportLayerProxyUpdate(val *TransportLayerProxyUpdate) *NullableTransportLayerProxyUpdate { + return &NullableTransportLayerProxyUpdate{value: val, isSet: true} +} + +func (v NullableTransportLayerProxyUpdate) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTransportLayerProxyUpdate) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_troubleshoot.go b/model_troubleshoot.go new file mode 100644 index 0000000..75478c2 --- /dev/null +++ b/model_troubleshoot.go @@ -0,0 +1,198 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the Troubleshoot type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Troubleshoot{} + +// Troubleshoot struct for Troubleshoot +type Troubleshoot struct { + Id *string `json:"id,omitempty"` + Details []TroubleshootDetailsInner `json:"details,omitempty"` + CreatedAt *string `json:"created_at,omitempty"` +} + +// NewTroubleshoot instantiates a new Troubleshoot object +// This constructor will assign default values to properties that have it defined, +// 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 NewTroubleshoot() *Troubleshoot { + this := Troubleshoot{} + return &this +} + +// NewTroubleshootWithDefaults instantiates a new Troubleshoot object +// This 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 NewTroubleshootWithDefaults() *Troubleshoot { + this := Troubleshoot{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *Troubleshoot) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Troubleshoot) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *Troubleshoot) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *Troubleshoot) SetId(v string) { + o.Id = &v +} + +// GetDetails returns the Details field value if set, zero value otherwise. +func (o *Troubleshoot) GetDetails() []TroubleshootDetailsInner { + if o == nil || IsNil(o.Details) { + var ret []TroubleshootDetailsInner + return ret + } + return o.Details +} + +// GetDetailsOk returns a tuple with the Details field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Troubleshoot) GetDetailsOk() ([]TroubleshootDetailsInner, bool) { + if o == nil || IsNil(o.Details) { + return nil, false + } + return o.Details, true +} + +// HasDetails returns a boolean if a field has been set. +func (o *Troubleshoot) HasDetails() bool { + if o != nil && !IsNil(o.Details) { + return true + } + + return false +} + +// SetDetails gets a reference to the given []TroubleshootDetailsInner and assigns it to the Details field. +func (o *Troubleshoot) SetDetails(v []TroubleshootDetailsInner) { + o.Details = v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *Troubleshoot) GetCreatedAt() string { + if o == nil || IsNil(o.CreatedAt) { + var ret string + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Troubleshoot) GetCreatedAtOk() (*string, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *Troubleshoot) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given string and assigns it to the CreatedAt field. +func (o *Troubleshoot) SetCreatedAt(v string) { + o.CreatedAt = &v +} + +func (o Troubleshoot) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Troubleshoot) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Details) { + toSerialize["details"] = o.Details + } + if !IsNil(o.CreatedAt) { + toSerialize["created_at"] = o.CreatedAt + } + return toSerialize, nil +} + +type NullableTroubleshoot struct { + value *Troubleshoot + isSet bool +} + +func (v NullableTroubleshoot) Get() *Troubleshoot { + return v.value +} + +func (v *NullableTroubleshoot) Set(val *Troubleshoot) { + v.value = val + v.isSet = true +} + +func (v NullableTroubleshoot) IsSet() bool { + return v.isSet +} + +func (v *NullableTroubleshoot) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTroubleshoot(val *Troubleshoot) *NullableTroubleshoot { + return &NullableTroubleshoot{value: val, isSet: true} +} + +func (v NullableTroubleshoot) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTroubleshoot) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_troubleshoot_details_inner.go b/model_troubleshoot_details_inner.go new file mode 100644 index 0000000..87b5967 --- /dev/null +++ b/model_troubleshoot_details_inner.go @@ -0,0 +1,198 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the TroubleshootDetailsInner type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TroubleshootDetailsInner{} + +// TroubleshootDetailsInner struct for TroubleshootDetailsInner +type TroubleshootDetailsInner struct { + Id *string `json:"id,omitempty"` + Status *string `json:"status,omitempty"` + Details *string `json:"details,omitempty"` +} + +// NewTroubleshootDetailsInner instantiates a new TroubleshootDetailsInner object +// This constructor will assign default values to properties that have it defined, +// 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 NewTroubleshootDetailsInner() *TroubleshootDetailsInner { + this := TroubleshootDetailsInner{} + return &this +} + +// NewTroubleshootDetailsInnerWithDefaults instantiates a new TroubleshootDetailsInner object +// This 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 NewTroubleshootDetailsInnerWithDefaults() *TroubleshootDetailsInner { + this := TroubleshootDetailsInner{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *TroubleshootDetailsInner) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TroubleshootDetailsInner) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *TroubleshootDetailsInner) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *TroubleshootDetailsInner) SetId(v string) { + o.Id = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *TroubleshootDetailsInner) GetStatus() string { + if o == nil || IsNil(o.Status) { + var ret string + 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 *TroubleshootDetailsInner) GetStatusOk() (*string, 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 *TroubleshootDetailsInner) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *TroubleshootDetailsInner) SetStatus(v string) { + o.Status = &v +} + +// GetDetails returns the Details field value if set, zero value otherwise. +func (o *TroubleshootDetailsInner) GetDetails() string { + if o == nil || IsNil(o.Details) { + var ret string + return ret + } + return *o.Details +} + +// GetDetailsOk returns a tuple with the Details field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TroubleshootDetailsInner) GetDetailsOk() (*string, bool) { + if o == nil || IsNil(o.Details) { + return nil, false + } + return o.Details, true +} + +// HasDetails returns a boolean if a field has been set. +func (o *TroubleshootDetailsInner) HasDetails() bool { + if o != nil && !IsNil(o.Details) { + return true + } + + return false +} + +// SetDetails gets a reference to the given string and assigns it to the Details field. +func (o *TroubleshootDetailsInner) SetDetails(v string) { + o.Details = &v +} + +func (o TroubleshootDetailsInner) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TroubleshootDetailsInner) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + if !IsNil(o.Details) { + toSerialize["details"] = o.Details + } + return toSerialize, nil +} + +type NullableTroubleshootDetailsInner struct { + value *TroubleshootDetailsInner + isSet bool +} + +func (v NullableTroubleshootDetailsInner) Get() *TroubleshootDetailsInner { + return v.value +} + +func (v *NullableTroubleshootDetailsInner) Set(val *TroubleshootDetailsInner) { + v.value = val + v.isSet = true +} + +func (v NullableTroubleshootDetailsInner) IsSet() bool { + return v.isSet +} + +func (v *NullableTroubleshootDetailsInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTroubleshootDetailsInner(val *TroubleshootDetailsInner) *NullableTroubleshootDetailsInner { + return &NullableTroubleshootDetailsInner{value: val, isSet: true} +} + +func (v NullableTroubleshootDetailsInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTroubleshootDetailsInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_troubleshoots_index_200_response.go b/model_troubleshoots_index_200_response.go new file mode 100644 index 0000000..3451d09 --- /dev/null +++ b/model_troubleshoots_index_200_response.go @@ -0,0 +1,126 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the TroubleshootsIndex200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TroubleshootsIndex200Response{} + +// TroubleshootsIndex200Response struct for TroubleshootsIndex200Response +type TroubleshootsIndex200Response struct { + Data []Troubleshoot `json:"data,omitempty"` +} + +// NewTroubleshootsIndex200Response instantiates a new TroubleshootsIndex200Response object +// This constructor will assign default values to properties that have it defined, +// 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 NewTroubleshootsIndex200Response() *TroubleshootsIndex200Response { + this := TroubleshootsIndex200Response{} + return &this +} + +// NewTroubleshootsIndex200ResponseWithDefaults instantiates a new TroubleshootsIndex200Response object +// This 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 NewTroubleshootsIndex200ResponseWithDefaults() *TroubleshootsIndex200Response { + this := TroubleshootsIndex200Response{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *TroubleshootsIndex200Response) GetData() []Troubleshoot { + if o == nil || IsNil(o.Data) { + var ret []Troubleshoot + return ret + } + return o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TroubleshootsIndex200Response) GetDataOk() ([]Troubleshoot, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *TroubleshootsIndex200Response) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given []Troubleshoot and assigns it to the Data field. +func (o *TroubleshootsIndex200Response) SetData(v []Troubleshoot) { + o.Data = v +} + +func (o TroubleshootsIndex200Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TroubleshootsIndex200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + return toSerialize, nil +} + +type NullableTroubleshootsIndex200Response struct { + value *TroubleshootsIndex200Response + isSet bool +} + +func (v NullableTroubleshootsIndex200Response) Get() *TroubleshootsIndex200Response { + return v.value +} + +func (v *NullableTroubleshootsIndex200Response) Set(val *TroubleshootsIndex200Response) { + v.value = val + v.isSet = true +} + +func (v NullableTroubleshootsIndex200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableTroubleshootsIndex200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTroubleshootsIndex200Response(val *TroubleshootsIndex200Response) *NullableTroubleshootsIndex200Response { + return &NullableTroubleshootsIndex200Response{value: val, isSet: true} +} + +func (v NullableTroubleshootsIndex200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTroubleshootsIndex200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_troubleshoots_store_201_response.go b/model_troubleshoots_store_201_response.go new file mode 100644 index 0000000..3ba942d --- /dev/null +++ b/model_troubleshoots_store_201_response.go @@ -0,0 +1,126 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the TroubleshootsStore201Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TroubleshootsStore201Response{} + +// TroubleshootsStore201Response struct for TroubleshootsStore201Response +type TroubleshootsStore201Response struct { + Data *Troubleshoot `json:"data,omitempty"` +} + +// NewTroubleshootsStore201Response instantiates a new TroubleshootsStore201Response object +// This constructor will assign default values to properties that have it defined, +// 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 NewTroubleshootsStore201Response() *TroubleshootsStore201Response { + this := TroubleshootsStore201Response{} + return &this +} + +// NewTroubleshootsStore201ResponseWithDefaults instantiates a new TroubleshootsStore201Response object +// This 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 NewTroubleshootsStore201ResponseWithDefaults() *TroubleshootsStore201Response { + this := TroubleshootsStore201Response{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *TroubleshootsStore201Response) GetData() Troubleshoot { + if o == nil || IsNil(o.Data) { + var ret Troubleshoot + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TroubleshootsStore201Response) GetDataOk() (*Troubleshoot, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *TroubleshootsStore201Response) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given Troubleshoot and assigns it to the Data field. +func (o *TroubleshootsStore201Response) SetData(v Troubleshoot) { + o.Data = &v +} + +func (o TroubleshootsStore201Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TroubleshootsStore201Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + return toSerialize, nil +} + +type NullableTroubleshootsStore201Response struct { + value *TroubleshootsStore201Response + isSet bool +} + +func (v NullableTroubleshootsStore201Response) Get() *TroubleshootsStore201Response { + return v.value +} + +func (v *NullableTroubleshootsStore201Response) Set(val *TroubleshootsStore201Response) { + v.value = val + v.isSet = true +} + +func (v NullableTroubleshootsStore201Response) IsSet() bool { + return v.isSet +} + +func (v *NullableTroubleshootsStore201Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTroubleshootsStore201Response(val *TroubleshootsStore201Response) *NullableTroubleshootsStore201Response { + return &NullableTroubleshootsStore201Response{value: val, isSet: true} +} + +func (v NullableTroubleshootsStore201Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTroubleshootsStore201Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_txt_record.go b/model_txt_record.go new file mode 100644 index 0000000..14baaae --- /dev/null +++ b/model_txt_record.go @@ -0,0 +1,520 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" + "time" +) + +// checks if the TXTRecord type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TXTRecord{} + +// TXTRecord struct for TXTRecord +type TXTRecord struct { + Value *TXTRecordValue `json:"value,omitempty"` + Type *string `json:"type,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Ttl *int32 `json:"ttl,omitempty"` + Cloud *bool `json:"cloud,omitempty"` + UpstreamHttps *string `json:"upstream_https,omitempty"` + IpFilterMode *DnsRecordIpFilterMode `json:"ip_filter_mode,omitempty"` + // Protected records cannot be modified or deleted by user. + IsProtected *bool `json:"is_protected,omitempty"` + Usage []string `json:"usage,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty"` + UpdatedAt *time.Time `json:"updated_at,omitempty"` +} + +// NewTXTRecord instantiates a new TXTRecord object +// This constructor will assign default values to properties that have it defined, +// 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 NewTXTRecord() *TXTRecord { + this := TXTRecord{} + var cloud bool = false + this.Cloud = &cloud + return &this +} + +// NewTXTRecordWithDefaults instantiates a new TXTRecord object +// This 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 NewTXTRecordWithDefaults() *TXTRecord { + this := TXTRecord{} + var type_ string = "txt" + this.Type = &type_ + var cloud bool = false + this.Cloud = &cloud + return &this +} + +// GetValue returns the Value field value if set, zero value otherwise. +func (o *TXTRecord) GetValue() TXTRecordValue { + if o == nil || IsNil(o.Value) { + var ret TXTRecordValue + return ret + } + return *o.Value +} + +// GetValueOk returns a tuple with the Value field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TXTRecord) GetValueOk() (*TXTRecordValue, bool) { + if o == nil || IsNil(o.Value) { + return nil, false + } + return o.Value, true +} + +// HasValue returns a boolean if a field has been set. +func (o *TXTRecord) HasValue() bool { + if o != nil && !IsNil(o.Value) { + return true + } + + return false +} + +// SetValue gets a reference to the given TXTRecordValue and assigns it to the Value field. +func (o *TXTRecord) SetValue(v TXTRecordValue) { + o.Value = &v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *TXTRecord) 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 *TXTRecord) 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 *TXTRecord) 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 *TXTRecord) SetType(v string) { + o.Type = &v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *TXTRecord) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TXTRecord) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *TXTRecord) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *TXTRecord) SetId(v string) { + o.Id = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *TXTRecord) 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 *TXTRecord) 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 *TXTRecord) 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 *TXTRecord) SetName(v string) { + o.Name = &v +} + +// GetTtl returns the Ttl field value if set, zero value otherwise. +func (o *TXTRecord) GetTtl() int32 { + if o == nil || IsNil(o.Ttl) { + var ret int32 + return ret + } + return *o.Ttl +} + +// GetTtlOk returns a tuple with the Ttl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TXTRecord) GetTtlOk() (*int32, bool) { + if o == nil || IsNil(o.Ttl) { + return nil, false + } + return o.Ttl, true +} + +// HasTtl returns a boolean if a field has been set. +func (o *TXTRecord) HasTtl() bool { + if o != nil && !IsNil(o.Ttl) { + return true + } + + return false +} + +// SetTtl gets a reference to the given int32 and assigns it to the Ttl field. +func (o *TXTRecord) SetTtl(v int32) { + o.Ttl = &v +} + +// GetCloud returns the Cloud field value if set, zero value otherwise. +func (o *TXTRecord) GetCloud() bool { + if o == nil || IsNil(o.Cloud) { + var ret bool + return ret + } + return *o.Cloud +} + +// GetCloudOk returns a tuple with the Cloud field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TXTRecord) GetCloudOk() (*bool, bool) { + if o == nil || IsNil(o.Cloud) { + return nil, false + } + return o.Cloud, true +} + +// HasCloud returns a boolean if a field has been set. +func (o *TXTRecord) HasCloud() bool { + if o != nil && !IsNil(o.Cloud) { + return true + } + + return false +} + +// SetCloud gets a reference to the given bool and assigns it to the Cloud field. +func (o *TXTRecord) SetCloud(v bool) { + o.Cloud = &v +} + +// GetUpstreamHttps returns the UpstreamHttps field value if set, zero value otherwise. +func (o *TXTRecord) GetUpstreamHttps() string { + if o == nil || IsNil(o.UpstreamHttps) { + var ret string + return ret + } + return *o.UpstreamHttps +} + +// GetUpstreamHttpsOk returns a tuple with the UpstreamHttps field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TXTRecord) GetUpstreamHttpsOk() (*string, bool) { + if o == nil || IsNil(o.UpstreamHttps) { + return nil, false + } + return o.UpstreamHttps, true +} + +// HasUpstreamHttps returns a boolean if a field has been set. +func (o *TXTRecord) HasUpstreamHttps() bool { + if o != nil && !IsNil(o.UpstreamHttps) { + return true + } + + return false +} + +// SetUpstreamHttps gets a reference to the given string and assigns it to the UpstreamHttps field. +func (o *TXTRecord) SetUpstreamHttps(v string) { + o.UpstreamHttps = &v +} + +// GetIpFilterMode returns the IpFilterMode field value if set, zero value otherwise. +func (o *TXTRecord) GetIpFilterMode() DnsRecordIpFilterMode { + if o == nil || IsNil(o.IpFilterMode) { + var ret DnsRecordIpFilterMode + return ret + } + return *o.IpFilterMode +} + +// GetIpFilterModeOk returns a tuple with the IpFilterMode field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TXTRecord) GetIpFilterModeOk() (*DnsRecordIpFilterMode, bool) { + if o == nil || IsNil(o.IpFilterMode) { + return nil, false + } + return o.IpFilterMode, true +} + +// HasIpFilterMode returns a boolean if a field has been set. +func (o *TXTRecord) HasIpFilterMode() bool { + if o != nil && !IsNil(o.IpFilterMode) { + return true + } + + return false +} + +// SetIpFilterMode gets a reference to the given DnsRecordIpFilterMode and assigns it to the IpFilterMode field. +func (o *TXTRecord) SetIpFilterMode(v DnsRecordIpFilterMode) { + o.IpFilterMode = &v +} + +// GetIsProtected returns the IsProtected field value if set, zero value otherwise. +func (o *TXTRecord) GetIsProtected() bool { + if o == nil || IsNil(o.IsProtected) { + var ret bool + return ret + } + return *o.IsProtected +} + +// GetIsProtectedOk returns a tuple with the IsProtected field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TXTRecord) GetIsProtectedOk() (*bool, bool) { + if o == nil || IsNil(o.IsProtected) { + return nil, false + } + return o.IsProtected, true +} + +// HasIsProtected returns a boolean if a field has been set. +func (o *TXTRecord) HasIsProtected() bool { + if o != nil && !IsNil(o.IsProtected) { + return true + } + + return false +} + +// SetIsProtected gets a reference to the given bool and assigns it to the IsProtected field. +func (o *TXTRecord) SetIsProtected(v bool) { + o.IsProtected = &v +} + +// GetUsage returns the Usage field value if set, zero value otherwise. +func (o *TXTRecord) GetUsage() []string { + if o == nil || IsNil(o.Usage) { + var ret []string + return ret + } + return o.Usage +} + +// GetUsageOk returns a tuple with the Usage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TXTRecord) GetUsageOk() ([]string, bool) { + if o == nil || IsNil(o.Usage) { + return nil, false + } + return o.Usage, true +} + +// HasUsage returns a boolean if a field has been set. +func (o *TXTRecord) HasUsage() bool { + if o != nil && !IsNil(o.Usage) { + return true + } + + return false +} + +// SetUsage gets a reference to the given []string and assigns it to the Usage field. +func (o *TXTRecord) SetUsage(v []string) { + o.Usage = v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *TXTRecord) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TXTRecord) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *TXTRecord) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *TXTRecord) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *TXTRecord) GetUpdatedAt() time.Time { + if o == nil || IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TXTRecord) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *TXTRecord) HasUpdatedAt() bool { + if o != nil && !IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *TXTRecord) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +func (o TXTRecord) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TXTRecord) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Value) { + toSerialize["value"] = o.Value + } + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + // skip: id is readOnly + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Ttl) { + toSerialize["ttl"] = o.Ttl + } + if !IsNil(o.Cloud) { + toSerialize["cloud"] = o.Cloud + } + if !IsNil(o.UpstreamHttps) { + toSerialize["upstream_https"] = o.UpstreamHttps + } + if !IsNil(o.IpFilterMode) { + toSerialize["ip_filter_mode"] = o.IpFilterMode + } + // skip: is_protected is readOnly + // skip: usage is readOnly + // skip: created_at is readOnly + // skip: updated_at is readOnly + return toSerialize, nil +} + +type NullableTXTRecord struct { + value *TXTRecord + isSet bool +} + +func (v NullableTXTRecord) Get() *TXTRecord { + return v.value +} + +func (v *NullableTXTRecord) Set(val *TXTRecord) { + v.value = val + v.isSet = true +} + +func (v NullableTXTRecord) IsSet() bool { + return v.isSet +} + +func (v *NullableTXTRecord) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTXTRecord(val *TXTRecord) *NullableTXTRecord { + return &NullableTXTRecord{value: val, isSet: true} +} + +func (v NullableTXTRecord) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTXTRecord) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_txt_record_value.go b/model_txt_record_value.go new file mode 100644 index 0000000..6b83ed8 --- /dev/null +++ b/model_txt_record_value.go @@ -0,0 +1,117 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the TXTRecordValue type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TXTRecordValue{} + +// TXTRecordValue struct for TXTRecordValue +type TXTRecordValue struct { + Text string `json:"text"` +} + +// NewTXTRecordValue instantiates a new TXTRecordValue object +// This constructor will assign default values to properties that have it defined, +// 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 NewTXTRecordValue(text string) *TXTRecordValue { + this := TXTRecordValue{} + this.Text = text + return &this +} + +// NewTXTRecordValueWithDefaults instantiates a new TXTRecordValue object +// This 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 NewTXTRecordValueWithDefaults() *TXTRecordValue { + this := TXTRecordValue{} + return &this +} + +// GetText returns the Text field value +func (o *TXTRecordValue) 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 *TXTRecordValue) GetTextOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Text, true +} + +// SetText sets field value +func (o *TXTRecordValue) SetText(v string) { + o.Text = v +} + +func (o TXTRecordValue) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TXTRecordValue) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["text"] = o.Text + return toSerialize, nil +} + +type NullableTXTRecordValue struct { + value *TXTRecordValue + isSet bool +} + +func (v NullableTXTRecordValue) Get() *TXTRecordValue { + return v.value +} + +func (v *NullableTXTRecordValue) Set(val *TXTRecordValue) { + v.value = val + v.isSet = true +} + +func (v NullableTXTRecordValue) IsSet() bool { + return v.isSet +} + +func (v *NullableTXTRecordValue) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTXTRecordValue(val *TXTRecordValue) *NullableTXTRecordValue { + return &NullableTXTRecordValue{value: val, isSet: true} +} + +func (v NullableTXTRecordValue) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTXTRecordValue) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_update_boolean_status.go b/model_update_boolean_status.go new file mode 100644 index 0000000..0356e9c --- /dev/null +++ b/model_update_boolean_status.go @@ -0,0 +1,126 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the UpdateBooleanStatus type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateBooleanStatus{} + +// UpdateBooleanStatus struct for UpdateBooleanStatus +type UpdateBooleanStatus struct { + Status *bool `json:"status,omitempty"` +} + +// NewUpdateBooleanStatus instantiates a new UpdateBooleanStatus object +// This constructor will assign default values to properties that have it defined, +// 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 NewUpdateBooleanStatus() *UpdateBooleanStatus { + this := UpdateBooleanStatus{} + return &this +} + +// NewUpdateBooleanStatusWithDefaults instantiates a new UpdateBooleanStatus object +// This 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 NewUpdateBooleanStatusWithDefaults() *UpdateBooleanStatus { + this := UpdateBooleanStatus{} + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *UpdateBooleanStatus) GetStatus() bool { + if o == nil || IsNil(o.Status) { + var ret bool + 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 *UpdateBooleanStatus) GetStatusOk() (*bool, 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 *UpdateBooleanStatus) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given bool and assigns it to the Status field. +func (o *UpdateBooleanStatus) SetStatus(v bool) { + o.Status = &v +} + +func (o UpdateBooleanStatus) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdateBooleanStatus) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + return toSerialize, nil +} + +type NullableUpdateBooleanStatus struct { + value *UpdateBooleanStatus + isSet bool +} + +func (v NullableUpdateBooleanStatus) Get() *UpdateBooleanStatus { + return v.value +} + +func (v *NullableUpdateBooleanStatus) Set(val *UpdateBooleanStatus) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateBooleanStatus) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateBooleanStatus) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateBooleanStatus(val *UpdateBooleanStatus) *NullableUpdateBooleanStatus { + return &NullableUpdateBooleanStatus{value: val, isSet: true} +} + +func (v NullableUpdateBooleanStatus) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateBooleanStatus) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_upstream_timeout.go b/model_upstream_timeout.go new file mode 100644 index 0000000..11c4b90 --- /dev/null +++ b/model_upstream_timeout.go @@ -0,0 +1,213 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the UpstreamTimeout type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpstreamTimeout{} + +// UpstreamTimeout struct for UpstreamTimeout +type UpstreamTimeout struct { + // Seconds to timeout + ConnectTimeout *int32 `json:"connect_timeout,omitempty"` + // Seconds to timeout + ReadTimeout *int32 `json:"read_timeout,omitempty"` + // Seconds to timeout + SendTimeout *int32 `json:"send_timeout,omitempty"` +} + +// NewUpstreamTimeout instantiates a new UpstreamTimeout object +// This constructor will assign default values to properties that have it defined, +// 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 NewUpstreamTimeout() *UpstreamTimeout { + this := UpstreamTimeout{} + var connectTimeout int32 = 30 + this.ConnectTimeout = &connectTimeout + var readTimeout int32 = 100 + this.ReadTimeout = &readTimeout + var sendTimeout int32 = 300 + this.SendTimeout = &sendTimeout + return &this +} + +// NewUpstreamTimeoutWithDefaults instantiates a new UpstreamTimeout object +// This 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 NewUpstreamTimeoutWithDefaults() *UpstreamTimeout { + this := UpstreamTimeout{} + var connectTimeout int32 = 30 + this.ConnectTimeout = &connectTimeout + var readTimeout int32 = 100 + this.ReadTimeout = &readTimeout + var sendTimeout int32 = 300 + this.SendTimeout = &sendTimeout + return &this +} + +// GetConnectTimeout returns the ConnectTimeout field value if set, zero value otherwise. +func (o *UpstreamTimeout) GetConnectTimeout() int32 { + if o == nil || IsNil(o.ConnectTimeout) { + var ret int32 + return ret + } + return *o.ConnectTimeout +} + +// GetConnectTimeoutOk returns a tuple with the ConnectTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpstreamTimeout) GetConnectTimeoutOk() (*int32, bool) { + if o == nil || IsNil(o.ConnectTimeout) { + return nil, false + } + return o.ConnectTimeout, true +} + +// HasConnectTimeout returns a boolean if a field has been set. +func (o *UpstreamTimeout) HasConnectTimeout() bool { + if o != nil && !IsNil(o.ConnectTimeout) { + return true + } + + return false +} + +// SetConnectTimeout gets a reference to the given int32 and assigns it to the ConnectTimeout field. +func (o *UpstreamTimeout) SetConnectTimeout(v int32) { + o.ConnectTimeout = &v +} + +// GetReadTimeout returns the ReadTimeout field value if set, zero value otherwise. +func (o *UpstreamTimeout) GetReadTimeout() int32 { + if o == nil || IsNil(o.ReadTimeout) { + var ret int32 + return ret + } + return *o.ReadTimeout +} + +// GetReadTimeoutOk returns a tuple with the ReadTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpstreamTimeout) GetReadTimeoutOk() (*int32, bool) { + if o == nil || IsNil(o.ReadTimeout) { + return nil, false + } + return o.ReadTimeout, true +} + +// HasReadTimeout returns a boolean if a field has been set. +func (o *UpstreamTimeout) HasReadTimeout() bool { + if o != nil && !IsNil(o.ReadTimeout) { + return true + } + + return false +} + +// SetReadTimeout gets a reference to the given int32 and assigns it to the ReadTimeout field. +func (o *UpstreamTimeout) SetReadTimeout(v int32) { + o.ReadTimeout = &v +} + +// GetSendTimeout returns the SendTimeout field value if set, zero value otherwise. +func (o *UpstreamTimeout) GetSendTimeout() int32 { + if o == nil || IsNil(o.SendTimeout) { + var ret int32 + return ret + } + return *o.SendTimeout +} + +// GetSendTimeoutOk returns a tuple with the SendTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpstreamTimeout) GetSendTimeoutOk() (*int32, bool) { + if o == nil || IsNil(o.SendTimeout) { + return nil, false + } + return o.SendTimeout, true +} + +// HasSendTimeout returns a boolean if a field has been set. +func (o *UpstreamTimeout) HasSendTimeout() bool { + if o != nil && !IsNil(o.SendTimeout) { + return true + } + + return false +} + +// SetSendTimeout gets a reference to the given int32 and assigns it to the SendTimeout field. +func (o *UpstreamTimeout) SetSendTimeout(v int32) { + o.SendTimeout = &v +} + +func (o UpstreamTimeout) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpstreamTimeout) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.ConnectTimeout) { + toSerialize["connect_timeout"] = o.ConnectTimeout + } + if !IsNil(o.ReadTimeout) { + toSerialize["read_timeout"] = o.ReadTimeout + } + if !IsNil(o.SendTimeout) { + toSerialize["send_timeout"] = o.SendTimeout + } + return toSerialize, nil +} + +type NullableUpstreamTimeout struct { + value *UpstreamTimeout + isSet bool +} + +func (v NullableUpstreamTimeout) Get() *UpstreamTimeout { + return v.value +} + +func (v *NullableUpstreamTimeout) Set(val *UpstreamTimeout) { + v.value = val + v.isSet = true +} + +func (v NullableUpstreamTimeout) IsSet() bool { + return v.isSet +} + +func (v *NullableUpstreamTimeout) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpstreamTimeout(val *UpstreamTimeout) *NullableUpstreamTimeout { + return &NullableUpstreamTimeout{value: val, isSet: true} +} + +func (v NullableUpstreamTimeout) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpstreamTimeout) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_usage_limit.go b/model_usage_limit.go new file mode 100644 index 0000000..021af55 --- /dev/null +++ b/model_usage_limit.go @@ -0,0 +1,162 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the UsageLimit type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UsageLimit{} + +// UsageLimit struct for UsageLimit +type UsageLimit struct { + Min *int32 `json:"min,omitempty"` + Max *int32 `json:"max,omitempty"` +} + +// NewUsageLimit instantiates a new UsageLimit object +// This constructor will assign default values to properties that have it defined, +// 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 NewUsageLimit() *UsageLimit { + this := UsageLimit{} + return &this +} + +// NewUsageLimitWithDefaults instantiates a new UsageLimit object +// This 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 NewUsageLimitWithDefaults() *UsageLimit { + this := UsageLimit{} + return &this +} + +// GetMin returns the Min field value if set, zero value otherwise. +func (o *UsageLimit) GetMin() int32 { + if o == nil || IsNil(o.Min) { + var ret int32 + return ret + } + return *o.Min +} + +// GetMinOk returns a tuple with the Min field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UsageLimit) GetMinOk() (*int32, bool) { + if o == nil || IsNil(o.Min) { + return nil, false + } + return o.Min, true +} + +// HasMin returns a boolean if a field has been set. +func (o *UsageLimit) HasMin() bool { + if o != nil && !IsNil(o.Min) { + return true + } + + return false +} + +// SetMin gets a reference to the given int32 and assigns it to the Min field. +func (o *UsageLimit) SetMin(v int32) { + o.Min = &v +} + +// GetMax returns the Max field value if set, zero value otherwise. +func (o *UsageLimit) GetMax() int32 { + if o == nil || IsNil(o.Max) { + var ret int32 + return ret + } + return *o.Max +} + +// GetMaxOk returns a tuple with the Max field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UsageLimit) GetMaxOk() (*int32, bool) { + if o == nil || IsNil(o.Max) { + return nil, false + } + return o.Max, true +} + +// HasMax returns a boolean if a field has been set. +func (o *UsageLimit) HasMax() bool { + if o != nil && !IsNil(o.Max) { + return true + } + + return false +} + +// SetMax gets a reference to the given int32 and assigns it to the Max field. +func (o *UsageLimit) SetMax(v int32) { + o.Max = &v +} + +func (o UsageLimit) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UsageLimit) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Min) { + toSerialize["min"] = o.Min + } + if !IsNil(o.Max) { + toSerialize["max"] = o.Max + } + return toSerialize, nil +} + +type NullableUsageLimit struct { + value *UsageLimit + isSet bool +} + +func (v NullableUsageLimit) Get() *UsageLimit { + return v.value +} + +func (v *NullableUsageLimit) Set(val *UsageLimit) { + v.value = val + v.isSet = true +} + +func (v NullableUsageLimit) IsSet() bool { + return v.isSet +} + +func (v *NullableUsageLimit) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUsageLimit(val *UsageLimit) *NullableUsageLimit { + return &NullableUsageLimit{value: val, isSet: true} +} + +func (v NullableUsageLimit) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUsageLimit) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_usages.go b/model_usages.go new file mode 100644 index 0000000..a155cf4 --- /dev/null +++ b/model_usages.go @@ -0,0 +1,162 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the Usages type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Usages{} + +// Usages struct for Usages +type Usages struct { + FeatureUsages []FeatureUsage `json:"feature_usages,omitempty"` + EstimatedCost *EstimatedCost `json:"estimated_cost,omitempty"` +} + +// NewUsages instantiates a new Usages object +// This constructor will assign default values to properties that have it defined, +// 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 NewUsages() *Usages { + this := Usages{} + return &this +} + +// NewUsagesWithDefaults instantiates a new Usages object +// This 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 NewUsagesWithDefaults() *Usages { + this := Usages{} + return &this +} + +// GetFeatureUsages returns the FeatureUsages field value if set, zero value otherwise. +func (o *Usages) GetFeatureUsages() []FeatureUsage { + if o == nil || IsNil(o.FeatureUsages) { + var ret []FeatureUsage + return ret + } + return o.FeatureUsages +} + +// GetFeatureUsagesOk returns a tuple with the FeatureUsages field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Usages) GetFeatureUsagesOk() ([]FeatureUsage, bool) { + if o == nil || IsNil(o.FeatureUsages) { + return nil, false + } + return o.FeatureUsages, true +} + +// HasFeatureUsages returns a boolean if a field has been set. +func (o *Usages) HasFeatureUsages() bool { + if o != nil && !IsNil(o.FeatureUsages) { + return true + } + + return false +} + +// SetFeatureUsages gets a reference to the given []FeatureUsage and assigns it to the FeatureUsages field. +func (o *Usages) SetFeatureUsages(v []FeatureUsage) { + o.FeatureUsages = v +} + +// GetEstimatedCost returns the EstimatedCost field value if set, zero value otherwise. +func (o *Usages) GetEstimatedCost() EstimatedCost { + if o == nil || IsNil(o.EstimatedCost) { + var ret EstimatedCost + return ret + } + return *o.EstimatedCost +} + +// GetEstimatedCostOk returns a tuple with the EstimatedCost field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Usages) GetEstimatedCostOk() (*EstimatedCost, bool) { + if o == nil || IsNil(o.EstimatedCost) { + return nil, false + } + return o.EstimatedCost, true +} + +// HasEstimatedCost returns a boolean if a field has been set. +func (o *Usages) HasEstimatedCost() bool { + if o != nil && !IsNil(o.EstimatedCost) { + return true + } + + return false +} + +// SetEstimatedCost gets a reference to the given EstimatedCost and assigns it to the EstimatedCost field. +func (o *Usages) SetEstimatedCost(v EstimatedCost) { + o.EstimatedCost = &v +} + +func (o Usages) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Usages) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.FeatureUsages) { + toSerialize["feature_usages"] = o.FeatureUsages + } + if !IsNil(o.EstimatedCost) { + toSerialize["estimated_cost"] = o.EstimatedCost + } + return toSerialize, nil +} + +type NullableUsages struct { + value *Usages + isSet bool +} + +func (v NullableUsages) Get() *Usages { + return v.value +} + +func (v *NullableUsages) Set(val *Usages) { + v.value = val + v.isSet = true +} + +func (v NullableUsages) IsSet() bool { + return v.isSet +} + +func (v *NullableUsages) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUsages(val *Usages) *NullableUsages { + return &NullableUsages{value: val, isSet: true} +} + +func (v NullableUsages) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUsages) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_violations.go b/model_violations.go new file mode 100644 index 0000000..e9380b3 --- /dev/null +++ b/model_violations.go @@ -0,0 +1,126 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the Violations type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Violations{} + +// Violations struct for Violations +type Violations struct { + Violations *ViolationsViolations `json:"violations,omitempty"` +} + +// NewViolations instantiates a new Violations object +// This constructor will assign default values to properties that have it defined, +// 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 NewViolations() *Violations { + this := Violations{} + return &this +} + +// NewViolationsWithDefaults instantiates a new Violations object +// This 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 NewViolationsWithDefaults() *Violations { + this := Violations{} + return &this +} + +// GetViolations returns the Violations field value if set, zero value otherwise. +func (o *Violations) GetViolations() ViolationsViolations { + if o == nil || IsNil(o.Violations) { + var ret ViolationsViolations + return ret + } + return *o.Violations +} + +// GetViolationsOk returns a tuple with the Violations field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Violations) GetViolationsOk() (*ViolationsViolations, bool) { + if o == nil || IsNil(o.Violations) { + return nil, false + } + return o.Violations, true +} + +// HasViolations returns a boolean if a field has been set. +func (o *Violations) HasViolations() bool { + if o != nil && !IsNil(o.Violations) { + return true + } + + return false +} + +// SetViolations gets a reference to the given ViolationsViolations and assigns it to the Violations field. +func (o *Violations) SetViolations(v ViolationsViolations) { + o.Violations = &v +} + +func (o Violations) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Violations) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Violations) { + toSerialize["violations"] = o.Violations + } + return toSerialize, nil +} + +type NullableViolations struct { + value *Violations + isSet bool +} + +func (v NullableViolations) Get() *Violations { + return v.value +} + +func (v *NullableViolations) Set(val *Violations) { + v.value = val + v.isSet = true +} + +func (v NullableViolations) IsSet() bool { + return v.isSet +} + +func (v *NullableViolations) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableViolations(val *Violations) *NullableViolations { + return &NullableViolations{value: val, isSet: true} +} + +func (v NullableViolations) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableViolations) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_violations_violations.go b/model_violations_violations.go new file mode 100644 index 0000000..50aaf98 --- /dev/null +++ b/model_violations_violations.go @@ -0,0 +1,270 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the ViolationsViolations type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ViolationsViolations{} + +// ViolationsViolations struct for ViolationsViolations +type ViolationsViolations struct { + Paygo []string `json:"paygo,omitempty"` + Basic []string `json:"basic,omitempty"` + Growth []string `json:"growth,omitempty"` + Professional []string `json:"professional,omitempty"` + Enterprise []string `json:"enterprise,omitempty"` +} + +// NewViolationsViolations instantiates a new ViolationsViolations object +// This constructor will assign default values to properties that have it defined, +// 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 NewViolationsViolations() *ViolationsViolations { + this := ViolationsViolations{} + return &this +} + +// NewViolationsViolationsWithDefaults instantiates a new ViolationsViolations object +// This 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 NewViolationsViolationsWithDefaults() *ViolationsViolations { + this := ViolationsViolations{} + return &this +} + +// GetPaygo returns the Paygo field value if set, zero value otherwise. +func (o *ViolationsViolations) GetPaygo() []string { + if o == nil || IsNil(o.Paygo) { + var ret []string + return ret + } + return o.Paygo +} + +// GetPaygoOk returns a tuple with the Paygo field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ViolationsViolations) GetPaygoOk() ([]string, bool) { + if o == nil || IsNil(o.Paygo) { + return nil, false + } + return o.Paygo, true +} + +// HasPaygo returns a boolean if a field has been set. +func (o *ViolationsViolations) HasPaygo() bool { + if o != nil && !IsNil(o.Paygo) { + return true + } + + return false +} + +// SetPaygo gets a reference to the given []string and assigns it to the Paygo field. +func (o *ViolationsViolations) SetPaygo(v []string) { + o.Paygo = v +} + +// GetBasic returns the Basic field value if set, zero value otherwise. +func (o *ViolationsViolations) GetBasic() []string { + if o == nil || IsNil(o.Basic) { + var ret []string + return ret + } + return o.Basic +} + +// GetBasicOk returns a tuple with the Basic field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ViolationsViolations) GetBasicOk() ([]string, bool) { + if o == nil || IsNil(o.Basic) { + return nil, false + } + return o.Basic, true +} + +// HasBasic returns a boolean if a field has been set. +func (o *ViolationsViolations) HasBasic() bool { + if o != nil && !IsNil(o.Basic) { + return true + } + + return false +} + +// SetBasic gets a reference to the given []string and assigns it to the Basic field. +func (o *ViolationsViolations) SetBasic(v []string) { + o.Basic = v +} + +// GetGrowth returns the Growth field value if set, zero value otherwise. +func (o *ViolationsViolations) GetGrowth() []string { + if o == nil || IsNil(o.Growth) { + var ret []string + return ret + } + return o.Growth +} + +// GetGrowthOk returns a tuple with the Growth field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ViolationsViolations) GetGrowthOk() ([]string, bool) { + if o == nil || IsNil(o.Growth) { + return nil, false + } + return o.Growth, true +} + +// HasGrowth returns a boolean if a field has been set. +func (o *ViolationsViolations) HasGrowth() bool { + if o != nil && !IsNil(o.Growth) { + return true + } + + return false +} + +// SetGrowth gets a reference to the given []string and assigns it to the Growth field. +func (o *ViolationsViolations) SetGrowth(v []string) { + o.Growth = v +} + +// GetProfessional returns the Professional field value if set, zero value otherwise. +func (o *ViolationsViolations) GetProfessional() []string { + if o == nil || IsNil(o.Professional) { + var ret []string + return ret + } + return o.Professional +} + +// GetProfessionalOk returns a tuple with the Professional field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ViolationsViolations) GetProfessionalOk() ([]string, bool) { + if o == nil || IsNil(o.Professional) { + return nil, false + } + return o.Professional, true +} + +// HasProfessional returns a boolean if a field has been set. +func (o *ViolationsViolations) HasProfessional() bool { + if o != nil && !IsNil(o.Professional) { + return true + } + + return false +} + +// SetProfessional gets a reference to the given []string and assigns it to the Professional field. +func (o *ViolationsViolations) SetProfessional(v []string) { + o.Professional = v +} + +// GetEnterprise returns the Enterprise field value if set, zero value otherwise. +func (o *ViolationsViolations) GetEnterprise() []string { + if o == nil || IsNil(o.Enterprise) { + var ret []string + return ret + } + return o.Enterprise +} + +// GetEnterpriseOk returns a tuple with the Enterprise field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ViolationsViolations) GetEnterpriseOk() ([]string, bool) { + if o == nil || IsNil(o.Enterprise) { + return nil, false + } + return o.Enterprise, true +} + +// HasEnterprise returns a boolean if a field has been set. +func (o *ViolationsViolations) HasEnterprise() bool { + if o != nil && !IsNil(o.Enterprise) { + return true + } + + return false +} + +// SetEnterprise gets a reference to the given []string and assigns it to the Enterprise field. +func (o *ViolationsViolations) SetEnterprise(v []string) { + o.Enterprise = v +} + +func (o ViolationsViolations) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ViolationsViolations) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Paygo) { + toSerialize["paygo"] = o.Paygo + } + if !IsNil(o.Basic) { + toSerialize["basic"] = o.Basic + } + if !IsNil(o.Growth) { + toSerialize["growth"] = o.Growth + } + if !IsNil(o.Professional) { + toSerialize["professional"] = o.Professional + } + if !IsNil(o.Enterprise) { + toSerialize["enterprise"] = o.Enterprise + } + return toSerialize, nil +} + +type NullableViolationsViolations struct { + value *ViolationsViolations + isSet bool +} + +func (v NullableViolationsViolations) Get() *ViolationsViolations { + return v.value +} + +func (v *NullableViolationsViolations) Set(val *ViolationsViolations) { + v.value = val + v.isSet = true +} + +func (v NullableViolationsViolations) IsSet() bool { + return v.isSet +} + +func (v *NullableViolationsViolations) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableViolationsViolations(val *ViolationsViolations) *NullableViolationsViolations { + return &NullableViolationsViolations{value: val, isSet: true} +} + +func (v NullableViolationsViolations) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableViolationsViolations) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_visitors.go b/model_visitors.go new file mode 100644 index 0000000..56840b2 --- /dev/null +++ b/model_visitors.go @@ -0,0 +1,162 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the Visitors type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Visitors{} + +// Visitors struct for Visitors +type Visitors struct { + Statistics *VisitorsStatistics `json:"statistics,omitempty"` + Charts *VisitorsCharts `json:"charts,omitempty"` +} + +// NewVisitors instantiates a new Visitors object +// This constructor will assign default values to properties that have it defined, +// 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 NewVisitors() *Visitors { + this := Visitors{} + return &this +} + +// NewVisitorsWithDefaults instantiates a new Visitors object +// This 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 NewVisitorsWithDefaults() *Visitors { + this := Visitors{} + return &this +} + +// GetStatistics returns the Statistics field value if set, zero value otherwise. +func (o *Visitors) GetStatistics() VisitorsStatistics { + if o == nil || IsNil(o.Statistics) { + var ret VisitorsStatistics + return ret + } + return *o.Statistics +} + +// GetStatisticsOk returns a tuple with the Statistics field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Visitors) GetStatisticsOk() (*VisitorsStatistics, bool) { + if o == nil || IsNil(o.Statistics) { + return nil, false + } + return o.Statistics, true +} + +// HasStatistics returns a boolean if a field has been set. +func (o *Visitors) HasStatistics() bool { + if o != nil && !IsNil(o.Statistics) { + return true + } + + return false +} + +// SetStatistics gets a reference to the given VisitorsStatistics and assigns it to the Statistics field. +func (o *Visitors) SetStatistics(v VisitorsStatistics) { + o.Statistics = &v +} + +// GetCharts returns the Charts field value if set, zero value otherwise. +func (o *Visitors) GetCharts() VisitorsCharts { + if o == nil || IsNil(o.Charts) { + var ret VisitorsCharts + return ret + } + return *o.Charts +} + +// GetChartsOk returns a tuple with the Charts field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Visitors) GetChartsOk() (*VisitorsCharts, bool) { + if o == nil || IsNil(o.Charts) { + return nil, false + } + return o.Charts, true +} + +// HasCharts returns a boolean if a field has been set. +func (o *Visitors) HasCharts() bool { + if o != nil && !IsNil(o.Charts) { + return true + } + + return false +} + +// SetCharts gets a reference to the given VisitorsCharts and assigns it to the Charts field. +func (o *Visitors) SetCharts(v VisitorsCharts) { + o.Charts = &v +} + +func (o Visitors) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Visitors) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Statistics) { + toSerialize["statistics"] = o.Statistics + } + if !IsNil(o.Charts) { + toSerialize["charts"] = o.Charts + } + return toSerialize, nil +} + +type NullableVisitors struct { + value *Visitors + isSet bool +} + +func (v NullableVisitors) Get() *Visitors { + return v.value +} + +func (v *NullableVisitors) Set(val *Visitors) { + v.value = val + v.isSet = true +} + +func (v NullableVisitors) IsSet() bool { + return v.isSet +} + +func (v *NullableVisitors) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableVisitors(val *Visitors) *NullableVisitors { + return &NullableVisitors{value: val, isSet: true} +} + +func (v NullableVisitors) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableVisitors) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_visitors_charts.go b/model_visitors_charts.go new file mode 100644 index 0000000..01ac9ae --- /dev/null +++ b/model_visitors_charts.go @@ -0,0 +1,126 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the VisitorsCharts type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &VisitorsCharts{} + +// VisitorsCharts struct for VisitorsCharts +type VisitorsCharts struct { + Visitors *VisitorsChartsVisitors `json:"visitors,omitempty"` +} + +// NewVisitorsCharts instantiates a new VisitorsCharts object +// This constructor will assign default values to properties that have it defined, +// 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 NewVisitorsCharts() *VisitorsCharts { + this := VisitorsCharts{} + return &this +} + +// NewVisitorsChartsWithDefaults instantiates a new VisitorsCharts object +// This 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 NewVisitorsChartsWithDefaults() *VisitorsCharts { + this := VisitorsCharts{} + return &this +} + +// GetVisitors returns the Visitors field value if set, zero value otherwise. +func (o *VisitorsCharts) GetVisitors() VisitorsChartsVisitors { + if o == nil || IsNil(o.Visitors) { + var ret VisitorsChartsVisitors + return ret + } + return *o.Visitors +} + +// GetVisitorsOk returns a tuple with the Visitors field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VisitorsCharts) GetVisitorsOk() (*VisitorsChartsVisitors, bool) { + if o == nil || IsNil(o.Visitors) { + return nil, false + } + return o.Visitors, true +} + +// HasVisitors returns a boolean if a field has been set. +func (o *VisitorsCharts) HasVisitors() bool { + if o != nil && !IsNil(o.Visitors) { + return true + } + + return false +} + +// SetVisitors gets a reference to the given VisitorsChartsVisitors and assigns it to the Visitors field. +func (o *VisitorsCharts) SetVisitors(v VisitorsChartsVisitors) { + o.Visitors = &v +} + +func (o VisitorsCharts) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o VisitorsCharts) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Visitors) { + toSerialize["visitors"] = o.Visitors + } + return toSerialize, nil +} + +type NullableVisitorsCharts struct { + value *VisitorsCharts + isSet bool +} + +func (v NullableVisitorsCharts) Get() *VisitorsCharts { + return v.value +} + +func (v *NullableVisitorsCharts) Set(val *VisitorsCharts) { + v.value = val + v.isSet = true +} + +func (v NullableVisitorsCharts) IsSet() bool { + return v.isSet +} + +func (v *NullableVisitorsCharts) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableVisitorsCharts(val *VisitorsCharts) *NullableVisitorsCharts { + return &NullableVisitorsCharts{value: val, isSet: true} +} + +func (v NullableVisitorsCharts) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableVisitorsCharts) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_visitors_charts_visitors.go b/model_visitors_charts_visitors.go new file mode 100644 index 0000000..43b8fe9 --- /dev/null +++ b/model_visitors_charts_visitors.go @@ -0,0 +1,199 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" + "time" +) + +// checks if the VisitorsChartsVisitors type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &VisitorsChartsVisitors{} + +// VisitorsChartsVisitors struct for VisitorsChartsVisitors +type VisitorsChartsVisitors struct { + Title *string `json:"title,omitempty"` + Categories []time.Time `json:"categories,omitempty"` + Series []VisitorsChartsVisitorsSeriesInner `json:"series,omitempty"` +} + +// NewVisitorsChartsVisitors instantiates a new VisitorsChartsVisitors object +// This constructor will assign default values to properties that have it defined, +// 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 NewVisitorsChartsVisitors() *VisitorsChartsVisitors { + this := VisitorsChartsVisitors{} + return &this +} + +// NewVisitorsChartsVisitorsWithDefaults instantiates a new VisitorsChartsVisitors object +// This 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 NewVisitorsChartsVisitorsWithDefaults() *VisitorsChartsVisitors { + this := VisitorsChartsVisitors{} + return &this +} + +// GetTitle returns the Title field value if set, zero value otherwise. +func (o *VisitorsChartsVisitors) 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 *VisitorsChartsVisitors) 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 *VisitorsChartsVisitors) 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 *VisitorsChartsVisitors) SetTitle(v string) { + o.Title = &v +} + +// GetCategories returns the Categories field value if set, zero value otherwise. +func (o *VisitorsChartsVisitors) GetCategories() []time.Time { + if o == nil || IsNil(o.Categories) { + var ret []time.Time + return ret + } + return o.Categories +} + +// GetCategoriesOk returns a tuple with the Categories field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VisitorsChartsVisitors) GetCategoriesOk() ([]time.Time, bool) { + if o == nil || IsNil(o.Categories) { + return nil, false + } + return o.Categories, true +} + +// HasCategories returns a boolean if a field has been set. +func (o *VisitorsChartsVisitors) HasCategories() bool { + if o != nil && !IsNil(o.Categories) { + return true + } + + return false +} + +// SetCategories gets a reference to the given []time.Time and assigns it to the Categories field. +func (o *VisitorsChartsVisitors) SetCategories(v []time.Time) { + o.Categories = v +} + +// GetSeries returns the Series field value if set, zero value otherwise. +func (o *VisitorsChartsVisitors) GetSeries() []VisitorsChartsVisitorsSeriesInner { + if o == nil || IsNil(o.Series) { + var ret []VisitorsChartsVisitorsSeriesInner + return ret + } + return o.Series +} + +// GetSeriesOk returns a tuple with the Series field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VisitorsChartsVisitors) GetSeriesOk() ([]VisitorsChartsVisitorsSeriesInner, bool) { + if o == nil || IsNil(o.Series) { + return nil, false + } + return o.Series, true +} + +// HasSeries returns a boolean if a field has been set. +func (o *VisitorsChartsVisitors) HasSeries() bool { + if o != nil && !IsNil(o.Series) { + return true + } + + return false +} + +// SetSeries gets a reference to the given []VisitorsChartsVisitorsSeriesInner and assigns it to the Series field. +func (o *VisitorsChartsVisitors) SetSeries(v []VisitorsChartsVisitorsSeriesInner) { + o.Series = v +} + +func (o VisitorsChartsVisitors) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o VisitorsChartsVisitors) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Title) { + toSerialize["title"] = o.Title + } + if !IsNil(o.Categories) { + toSerialize["categories"] = o.Categories + } + if !IsNil(o.Series) { + toSerialize["series"] = o.Series + } + return toSerialize, nil +} + +type NullableVisitorsChartsVisitors struct { + value *VisitorsChartsVisitors + isSet bool +} + +func (v NullableVisitorsChartsVisitors) Get() *VisitorsChartsVisitors { + return v.value +} + +func (v *NullableVisitorsChartsVisitors) Set(val *VisitorsChartsVisitors) { + v.value = val + v.isSet = true +} + +func (v NullableVisitorsChartsVisitors) IsSet() bool { + return v.isSet +} + +func (v *NullableVisitorsChartsVisitors) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableVisitorsChartsVisitors(val *VisitorsChartsVisitors) *NullableVisitorsChartsVisitors { + return &NullableVisitorsChartsVisitors{value: val, isSet: true} +} + +func (v NullableVisitorsChartsVisitors) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableVisitorsChartsVisitors) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_visitors_charts_visitors_series_inner.go b/model_visitors_charts_visitors_series_inner.go new file mode 100644 index 0000000..51b7737 --- /dev/null +++ b/model_visitors_charts_visitors_series_inner.go @@ -0,0 +1,162 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the VisitorsChartsVisitorsSeriesInner type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &VisitorsChartsVisitorsSeriesInner{} + +// VisitorsChartsVisitorsSeriesInner struct for VisitorsChartsVisitorsSeriesInner +type VisitorsChartsVisitorsSeriesInner struct { + Name *string `json:"name,omitempty"` + Data []int32 `json:"data,omitempty"` +} + +// NewVisitorsChartsVisitorsSeriesInner instantiates a new VisitorsChartsVisitorsSeriesInner object +// This constructor will assign default values to properties that have it defined, +// 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 NewVisitorsChartsVisitorsSeriesInner() *VisitorsChartsVisitorsSeriesInner { + this := VisitorsChartsVisitorsSeriesInner{} + return &this +} + +// NewVisitorsChartsVisitorsSeriesInnerWithDefaults instantiates a new VisitorsChartsVisitorsSeriesInner object +// This 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 NewVisitorsChartsVisitorsSeriesInnerWithDefaults() *VisitorsChartsVisitorsSeriesInner { + this := VisitorsChartsVisitorsSeriesInner{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *VisitorsChartsVisitorsSeriesInner) 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 *VisitorsChartsVisitorsSeriesInner) 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 *VisitorsChartsVisitorsSeriesInner) 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 *VisitorsChartsVisitorsSeriesInner) SetName(v string) { + o.Name = &v +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *VisitorsChartsVisitorsSeriesInner) GetData() []int32 { + if o == nil || IsNil(o.Data) { + var ret []int32 + return ret + } + return o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VisitorsChartsVisitorsSeriesInner) GetDataOk() ([]int32, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *VisitorsChartsVisitorsSeriesInner) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given []int32 and assigns it to the Data field. +func (o *VisitorsChartsVisitorsSeriesInner) SetData(v []int32) { + o.Data = v +} + +func (o VisitorsChartsVisitorsSeriesInner) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o VisitorsChartsVisitorsSeriesInner) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + return toSerialize, nil +} + +type NullableVisitorsChartsVisitorsSeriesInner struct { + value *VisitorsChartsVisitorsSeriesInner + isSet bool +} + +func (v NullableVisitorsChartsVisitorsSeriesInner) Get() *VisitorsChartsVisitorsSeriesInner { + return v.value +} + +func (v *NullableVisitorsChartsVisitorsSeriesInner) Set(val *VisitorsChartsVisitorsSeriesInner) { + v.value = val + v.isSet = true +} + +func (v NullableVisitorsChartsVisitorsSeriesInner) IsSet() bool { + return v.isSet +} + +func (v *NullableVisitorsChartsVisitorsSeriesInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableVisitorsChartsVisitorsSeriesInner(val *VisitorsChartsVisitorsSeriesInner) *NullableVisitorsChartsVisitorsSeriesInner { + return &NullableVisitorsChartsVisitorsSeriesInner{value: val, isSet: true} +} + +func (v NullableVisitorsChartsVisitorsSeriesInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableVisitorsChartsVisitorsSeriesInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_visitors_data.go b/model_visitors_data.go new file mode 100644 index 0000000..610123b --- /dev/null +++ b/model_visitors_data.go @@ -0,0 +1,126 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the VisitorsData type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &VisitorsData{} + +// VisitorsData struct for VisitorsData +type VisitorsData struct { + Data *Visitors `json:"data,omitempty"` +} + +// NewVisitorsData instantiates a new VisitorsData object +// This constructor will assign default values to properties that have it defined, +// 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 NewVisitorsData() *VisitorsData { + this := VisitorsData{} + return &this +} + +// NewVisitorsDataWithDefaults instantiates a new VisitorsData object +// This 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 NewVisitorsDataWithDefaults() *VisitorsData { + this := VisitorsData{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *VisitorsData) GetData() Visitors { + if o == nil || IsNil(o.Data) { + var ret Visitors + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VisitorsData) GetDataOk() (*Visitors, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *VisitorsData) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given Visitors and assigns it to the Data field. +func (o *VisitorsData) SetData(v Visitors) { + o.Data = &v +} + +func (o VisitorsData) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o VisitorsData) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + return toSerialize, nil +} + +type NullableVisitorsData struct { + value *VisitorsData + isSet bool +} + +func (v NullableVisitorsData) Get() *VisitorsData { + return v.value +} + +func (v *NullableVisitorsData) Set(val *VisitorsData) { + v.value = val + v.isSet = true +} + +func (v NullableVisitorsData) IsSet() bool { + return v.isSet +} + +func (v *NullableVisitorsData) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableVisitorsData(val *VisitorsData) *NullableVisitorsData { + return &NullableVisitorsData{value: val, isSet: true} +} + +func (v NullableVisitorsData) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableVisitorsData) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_visitors_statistics.go b/model_visitors_statistics.go new file mode 100644 index 0000000..5c0de56 --- /dev/null +++ b/model_visitors_statistics.go @@ -0,0 +1,126 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the VisitorsStatistics type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &VisitorsStatistics{} + +// VisitorsStatistics struct for VisitorsStatistics +type VisitorsStatistics struct { + Visitors *VisitorsStatisticsVisitors `json:"visitors,omitempty"` +} + +// NewVisitorsStatistics instantiates a new VisitorsStatistics object +// This constructor will assign default values to properties that have it defined, +// 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 NewVisitorsStatistics() *VisitorsStatistics { + this := VisitorsStatistics{} + return &this +} + +// NewVisitorsStatisticsWithDefaults instantiates a new VisitorsStatistics object +// This 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 NewVisitorsStatisticsWithDefaults() *VisitorsStatistics { + this := VisitorsStatistics{} + return &this +} + +// GetVisitors returns the Visitors field value if set, zero value otherwise. +func (o *VisitorsStatistics) GetVisitors() VisitorsStatisticsVisitors { + if o == nil || IsNil(o.Visitors) { + var ret VisitorsStatisticsVisitors + return ret + } + return *o.Visitors +} + +// GetVisitorsOk returns a tuple with the Visitors field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VisitorsStatistics) GetVisitorsOk() (*VisitorsStatisticsVisitors, bool) { + if o == nil || IsNil(o.Visitors) { + return nil, false + } + return o.Visitors, true +} + +// HasVisitors returns a boolean if a field has been set. +func (o *VisitorsStatistics) HasVisitors() bool { + if o != nil && !IsNil(o.Visitors) { + return true + } + + return false +} + +// SetVisitors gets a reference to the given VisitorsStatisticsVisitors and assigns it to the Visitors field. +func (o *VisitorsStatistics) SetVisitors(v VisitorsStatisticsVisitors) { + o.Visitors = &v +} + +func (o VisitorsStatistics) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o VisitorsStatistics) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Visitors) { + toSerialize["visitors"] = o.Visitors + } + return toSerialize, nil +} + +type NullableVisitorsStatistics struct { + value *VisitorsStatistics + isSet bool +} + +func (v NullableVisitorsStatistics) Get() *VisitorsStatistics { + return v.value +} + +func (v *NullableVisitorsStatistics) Set(val *VisitorsStatistics) { + v.value = val + v.isSet = true +} + +func (v NullableVisitorsStatistics) IsSet() bool { + return v.isSet +} + +func (v *NullableVisitorsStatistics) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableVisitorsStatistics(val *VisitorsStatistics) *NullableVisitorsStatistics { + return &NullableVisitorsStatistics{value: val, isSet: true} +} + +func (v NullableVisitorsStatistics) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableVisitorsStatistics) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_visitors_statistics_visitors.go b/model_visitors_statistics_visitors.go new file mode 100644 index 0000000..0c5a122 --- /dev/null +++ b/model_visitors_statistics_visitors.go @@ -0,0 +1,145 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" + "time" +) + +// checks if the VisitorsStatisticsVisitors type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &VisitorsStatisticsVisitors{} + +// VisitorsStatisticsVisitors struct for VisitorsStatisticsVisitors +type VisitorsStatisticsVisitors struct { + TopVisitors time.Time `json:"top_visitors"` + TotalVisitors int32 `json:"total_visitors"` +} + +// NewVisitorsStatisticsVisitors instantiates a new VisitorsStatisticsVisitors object +// This constructor will assign default values to properties that have it defined, +// 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 NewVisitorsStatisticsVisitors(topVisitors time.Time, totalVisitors int32) *VisitorsStatisticsVisitors { + this := VisitorsStatisticsVisitors{} + this.TopVisitors = topVisitors + this.TotalVisitors = totalVisitors + return &this +} + +// NewVisitorsStatisticsVisitorsWithDefaults instantiates a new VisitorsStatisticsVisitors object +// This 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 NewVisitorsStatisticsVisitorsWithDefaults() *VisitorsStatisticsVisitors { + this := VisitorsStatisticsVisitors{} + return &this +} + +// GetTopVisitors returns the TopVisitors field value +func (o *VisitorsStatisticsVisitors) GetTopVisitors() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.TopVisitors +} + +// GetTopVisitorsOk returns a tuple with the TopVisitors field value +// and a boolean to check if the value has been set. +func (o *VisitorsStatisticsVisitors) GetTopVisitorsOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.TopVisitors, true +} + +// SetTopVisitors sets field value +func (o *VisitorsStatisticsVisitors) SetTopVisitors(v time.Time) { + o.TopVisitors = v +} + +// GetTotalVisitors returns the TotalVisitors field value +func (o *VisitorsStatisticsVisitors) GetTotalVisitors() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.TotalVisitors +} + +// GetTotalVisitorsOk returns a tuple with the TotalVisitors field value +// and a boolean to check if the value has been set. +func (o *VisitorsStatisticsVisitors) GetTotalVisitorsOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.TotalVisitors, true +} + +// SetTotalVisitors sets field value +func (o *VisitorsStatisticsVisitors) SetTotalVisitors(v int32) { + o.TotalVisitors = v +} + +func (o VisitorsStatisticsVisitors) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o VisitorsStatisticsVisitors) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["top_visitors"] = o.TopVisitors + toSerialize["total_visitors"] = o.TotalVisitors + return toSerialize, nil +} + +type NullableVisitorsStatisticsVisitors struct { + value *VisitorsStatisticsVisitors + isSet bool +} + +func (v NullableVisitorsStatisticsVisitors) Get() *VisitorsStatisticsVisitors { + return v.value +} + +func (v *NullableVisitorsStatisticsVisitors) Set(val *VisitorsStatisticsVisitors) { + v.value = val + v.isSet = true +} + +func (v NullableVisitorsStatisticsVisitors) IsSet() bool { + return v.isSet +} + +func (v *NullableVisitorsStatisticsVisitors) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableVisitorsStatisticsVisitors(val *VisitorsStatisticsVisitors) *NullableVisitorsStatisticsVisitors { + return &NullableVisitorsStatisticsVisitors{value: val, isSet: true} +} + +func (v NullableVisitorsStatisticsVisitors) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableVisitorsStatisticsVisitors) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_waf.go b/model_waf.go new file mode 100644 index 0000000..c675649 --- /dev/null +++ b/model_waf.go @@ -0,0 +1,229 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the Waf type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Waf{} + +// Waf struct for Waf +type Waf struct { + IsEnabled *bool `json:"is_enabled,omitempty"` + Mode *string `json:"mode,omitempty"` + // Pacakges and their configurations that are used to configure WAF. + Packages []DomainWafPackage `json:"packages,omitempty"` + Rules []WafRule `json:"rules,omitempty"` +} + +// NewWaf instantiates a new Waf object +// This constructor will assign default values to properties that have it defined, +// 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 NewWaf() *Waf { + this := Waf{} + return &this +} + +// NewWafWithDefaults instantiates a new Waf object +// This 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 NewWafWithDefaults() *Waf { + this := Waf{} + return &this +} + +// GetIsEnabled returns the IsEnabled field value if set, zero value otherwise. +func (o *Waf) GetIsEnabled() bool { + if o == nil || IsNil(o.IsEnabled) { + var ret bool + return ret + } + return *o.IsEnabled +} + +// GetIsEnabledOk returns a tuple with the IsEnabled field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Waf) GetIsEnabledOk() (*bool, bool) { + if o == nil || IsNil(o.IsEnabled) { + return nil, false + } + return o.IsEnabled, true +} + +// HasIsEnabled returns a boolean if a field has been set. +func (o *Waf) HasIsEnabled() bool { + if o != nil && !IsNil(o.IsEnabled) { + return true + } + + return false +} + +// SetIsEnabled gets a reference to the given bool and assigns it to the IsEnabled field. +func (o *Waf) SetIsEnabled(v bool) { + o.IsEnabled = &v +} + +// GetMode returns the Mode field value if set, zero value otherwise. +func (o *Waf) GetMode() string { + if o == nil || IsNil(o.Mode) { + var ret string + return ret + } + return *o.Mode +} + +// GetModeOk returns a tuple with the Mode field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Waf) GetModeOk() (*string, bool) { + if o == nil || IsNil(o.Mode) { + return nil, false + } + return o.Mode, true +} + +// HasMode returns a boolean if a field has been set. +func (o *Waf) HasMode() bool { + if o != nil && !IsNil(o.Mode) { + return true + } + + return false +} + +// SetMode gets a reference to the given string and assigns it to the Mode field. +func (o *Waf) SetMode(v string) { + o.Mode = &v +} + +// GetPackages returns the Packages field value if set, zero value otherwise. +func (o *Waf) GetPackages() []DomainWafPackage { + if o == nil || IsNil(o.Packages) { + var ret []DomainWafPackage + return ret + } + return o.Packages +} + +// GetPackagesOk returns a tuple with the Packages field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Waf) GetPackagesOk() ([]DomainWafPackage, bool) { + if o == nil || IsNil(o.Packages) { + return nil, false + } + return o.Packages, true +} + +// HasPackages returns a boolean if a field has been set. +func (o *Waf) HasPackages() bool { + if o != nil && !IsNil(o.Packages) { + return true + } + + return false +} + +// SetPackages gets a reference to the given []DomainWafPackage and assigns it to the Packages field. +func (o *Waf) SetPackages(v []DomainWafPackage) { + o.Packages = v +} + +// GetRules returns the Rules field value if set, zero value otherwise. +func (o *Waf) GetRules() []WafRule { + if o == nil || IsNil(o.Rules) { + var ret []WafRule + return ret + } + return o.Rules +} + +// GetRulesOk returns a tuple with the Rules field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Waf) GetRulesOk() ([]WafRule, bool) { + if o == nil || IsNil(o.Rules) { + return nil, false + } + return o.Rules, true +} + +// HasRules returns a boolean if a field has been set. +func (o *Waf) HasRules() bool { + if o != nil && !IsNil(o.Rules) { + return true + } + + return false +} + +// SetRules gets a reference to the given []WafRule and assigns it to the Rules field. +func (o *Waf) SetRules(v []WafRule) { + o.Rules = v +} + +func (o Waf) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Waf) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: is_enabled is readOnly + if !IsNil(o.Mode) { + toSerialize["mode"] = o.Mode + } + // skip: packages is readOnly + // skip: rules is readOnly + return toSerialize, nil +} + +type NullableWaf struct { + value *Waf + isSet bool +} + +func (v NullableWaf) Get() *Waf { + return v.value +} + +func (v *NullableWaf) Set(val *Waf) { + v.value = val + v.isSet = true +} + +func (v NullableWaf) IsSet() bool { + return v.isSet +} + +func (v *NullableWaf) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWaf(val *Waf) *NullableWaf { + return &NullableWaf{value: val, isSet: true} +} + +func (v NullableWaf) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWaf) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_waf_package.go b/model_waf_package.go new file mode 100644 index 0000000..f52bd4f --- /dev/null +++ b/model_waf_package.go @@ -0,0 +1,305 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the WafPackage type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &WafPackage{} + +// WafPackage struct for WafPackage +type WafPackage struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Provider *WafPackageProvider `json:"provider,omitempty"` + // JSON-schema of parameters of the package + ParamsSchema map[string]interface{} `json:"params_schema,omitempty"` + // It will be filled by default disabled rules when it's not provided + DisabledRules []string `json:"disabled_rules,omitempty"` + // It will be filled by default disabled rulesets when it's not provided + DisabledRulesets []string `json:"disabled_rulesets,omitempty"` +} + +// NewWafPackage instantiates a new WafPackage object +// This constructor will assign default values to properties that have it defined, +// 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 NewWafPackage() *WafPackage { + this := WafPackage{} + return &this +} + +// NewWafPackageWithDefaults instantiates a new WafPackage object +// This 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 NewWafPackageWithDefaults() *WafPackage { + this := WafPackage{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *WafPackage) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WafPackage) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *WafPackage) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *WafPackage) SetId(v string) { + o.Id = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *WafPackage) 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 *WafPackage) 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 *WafPackage) 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 *WafPackage) SetName(v string) { + o.Name = &v +} + +// GetProvider returns the Provider field value if set, zero value otherwise. +func (o *WafPackage) GetProvider() WafPackageProvider { + if o == nil || IsNil(o.Provider) { + var ret WafPackageProvider + return ret + } + return *o.Provider +} + +// GetProviderOk returns a tuple with the Provider field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WafPackage) GetProviderOk() (*WafPackageProvider, bool) { + if o == nil || IsNil(o.Provider) { + return nil, false + } + return o.Provider, true +} + +// HasProvider returns a boolean if a field has been set. +func (o *WafPackage) HasProvider() bool { + if o != nil && !IsNil(o.Provider) { + return true + } + + return false +} + +// SetProvider gets a reference to the given WafPackageProvider and assigns it to the Provider field. +func (o *WafPackage) SetProvider(v WafPackageProvider) { + o.Provider = &v +} + +// GetParamsSchema returns the ParamsSchema field value if set, zero value otherwise. +func (o *WafPackage) GetParamsSchema() map[string]interface{} { + if o == nil || IsNil(o.ParamsSchema) { + var ret map[string]interface{} + return ret + } + return o.ParamsSchema +} + +// GetParamsSchemaOk returns a tuple with the ParamsSchema field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WafPackage) GetParamsSchemaOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.ParamsSchema) { + return map[string]interface{}{}, false + } + return o.ParamsSchema, true +} + +// HasParamsSchema returns a boolean if a field has been set. +func (o *WafPackage) HasParamsSchema() bool { + if o != nil && !IsNil(o.ParamsSchema) { + return true + } + + return false +} + +// SetParamsSchema gets a reference to the given map[string]interface{} and assigns it to the ParamsSchema field. +func (o *WafPackage) SetParamsSchema(v map[string]interface{}) { + o.ParamsSchema = v +} + +// GetDisabledRules returns the DisabledRules field value if set, zero value otherwise. +func (o *WafPackage) GetDisabledRules() []string { + if o == nil || IsNil(o.DisabledRules) { + var ret []string + return ret + } + return o.DisabledRules +} + +// GetDisabledRulesOk returns a tuple with the DisabledRules field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WafPackage) GetDisabledRulesOk() ([]string, bool) { + if o == nil || IsNil(o.DisabledRules) { + return nil, false + } + return o.DisabledRules, true +} + +// HasDisabledRules returns a boolean if a field has been set. +func (o *WafPackage) HasDisabledRules() bool { + if o != nil && !IsNil(o.DisabledRules) { + return true + } + + return false +} + +// SetDisabledRules gets a reference to the given []string and assigns it to the DisabledRules field. +func (o *WafPackage) SetDisabledRules(v []string) { + o.DisabledRules = v +} + +// GetDisabledRulesets returns the DisabledRulesets field value if set, zero value otherwise. +func (o *WafPackage) GetDisabledRulesets() []string { + if o == nil || IsNil(o.DisabledRulesets) { + var ret []string + return ret + } + return o.DisabledRulesets +} + +// GetDisabledRulesetsOk returns a tuple with the DisabledRulesets field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WafPackage) GetDisabledRulesetsOk() ([]string, bool) { + if o == nil || IsNil(o.DisabledRulesets) { + return nil, false + } + return o.DisabledRulesets, true +} + +// HasDisabledRulesets returns a boolean if a field has been set. +func (o *WafPackage) HasDisabledRulesets() bool { + if o != nil && !IsNil(o.DisabledRulesets) { + return true + } + + return false +} + +// SetDisabledRulesets gets a reference to the given []string and assigns it to the DisabledRulesets field. +func (o *WafPackage) SetDisabledRulesets(v []string) { + o.DisabledRulesets = v +} + +func (o WafPackage) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o WafPackage) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: id is readOnly + // skip: name is readOnly + if !IsNil(o.Provider) { + toSerialize["provider"] = o.Provider + } + if !IsNil(o.ParamsSchema) { + toSerialize["params_schema"] = o.ParamsSchema + } + if !IsNil(o.DisabledRules) { + toSerialize["disabled_rules"] = o.DisabledRules + } + if !IsNil(o.DisabledRulesets) { + toSerialize["disabled_rulesets"] = o.DisabledRulesets + } + return toSerialize, nil +} + +type NullableWafPackage struct { + value *WafPackage + isSet bool +} + +func (v NullableWafPackage) Get() *WafPackage { + return v.value +} + +func (v *NullableWafPackage) Set(val *WafPackage) { + v.value = val + v.isSet = true +} + +func (v NullableWafPackage) IsSet() bool { + return v.isSet +} + +func (v *NullableWafPackage) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWafPackage(val *WafPackage) *NullableWafPackage { + return &NullableWafPackage{value: val, isSet: true} +} + +func (v NullableWafPackage) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWafPackage) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_waf_package_details.go b/model_waf_package_details.go new file mode 100644 index 0000000..de75dce --- /dev/null +++ b/model_waf_package_details.go @@ -0,0 +1,341 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the WafPackageDetails type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &WafPackageDetails{} + +// WafPackageDetails struct for WafPackageDetails +type WafPackageDetails struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Provider *WafPackageProvider `json:"provider,omitempty"` + // JSON-schema of parameters of the package + ParamsSchema map[string]interface{} `json:"params_schema,omitempty"` + // It will be filled by default disabled rules when it's not provided + DisabledRules []string `json:"disabled_rules,omitempty"` + // It will be filled by default disabled rulesets when it's not provided + DisabledRulesets []string `json:"disabled_rulesets,omitempty"` + Rulesets []WafRuleset `json:"rulesets,omitempty"` +} + +// NewWafPackageDetails instantiates a new WafPackageDetails object +// This constructor will assign default values to properties that have it defined, +// 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 NewWafPackageDetails() *WafPackageDetails { + this := WafPackageDetails{} + return &this +} + +// NewWafPackageDetailsWithDefaults instantiates a new WafPackageDetails object +// This 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 NewWafPackageDetailsWithDefaults() *WafPackageDetails { + this := WafPackageDetails{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *WafPackageDetails) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WafPackageDetails) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *WafPackageDetails) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *WafPackageDetails) SetId(v string) { + o.Id = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *WafPackageDetails) 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 *WafPackageDetails) 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 *WafPackageDetails) 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 *WafPackageDetails) SetName(v string) { + o.Name = &v +} + +// GetProvider returns the Provider field value if set, zero value otherwise. +func (o *WafPackageDetails) GetProvider() WafPackageProvider { + if o == nil || IsNil(o.Provider) { + var ret WafPackageProvider + return ret + } + return *o.Provider +} + +// GetProviderOk returns a tuple with the Provider field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WafPackageDetails) GetProviderOk() (*WafPackageProvider, bool) { + if o == nil || IsNil(o.Provider) { + return nil, false + } + return o.Provider, true +} + +// HasProvider returns a boolean if a field has been set. +func (o *WafPackageDetails) HasProvider() bool { + if o != nil && !IsNil(o.Provider) { + return true + } + + return false +} + +// SetProvider gets a reference to the given WafPackageProvider and assigns it to the Provider field. +func (o *WafPackageDetails) SetProvider(v WafPackageProvider) { + o.Provider = &v +} + +// GetParamsSchema returns the ParamsSchema field value if set, zero value otherwise. +func (o *WafPackageDetails) GetParamsSchema() map[string]interface{} { + if o == nil || IsNil(o.ParamsSchema) { + var ret map[string]interface{} + return ret + } + return o.ParamsSchema +} + +// GetParamsSchemaOk returns a tuple with the ParamsSchema field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WafPackageDetails) GetParamsSchemaOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.ParamsSchema) { + return map[string]interface{}{}, false + } + return o.ParamsSchema, true +} + +// HasParamsSchema returns a boolean if a field has been set. +func (o *WafPackageDetails) HasParamsSchema() bool { + if o != nil && !IsNil(o.ParamsSchema) { + return true + } + + return false +} + +// SetParamsSchema gets a reference to the given map[string]interface{} and assigns it to the ParamsSchema field. +func (o *WafPackageDetails) SetParamsSchema(v map[string]interface{}) { + o.ParamsSchema = v +} + +// GetDisabledRules returns the DisabledRules field value if set, zero value otherwise. +func (o *WafPackageDetails) GetDisabledRules() []string { + if o == nil || IsNil(o.DisabledRules) { + var ret []string + return ret + } + return o.DisabledRules +} + +// GetDisabledRulesOk returns a tuple with the DisabledRules field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WafPackageDetails) GetDisabledRulesOk() ([]string, bool) { + if o == nil || IsNil(o.DisabledRules) { + return nil, false + } + return o.DisabledRules, true +} + +// HasDisabledRules returns a boolean if a field has been set. +func (o *WafPackageDetails) HasDisabledRules() bool { + if o != nil && !IsNil(o.DisabledRules) { + return true + } + + return false +} + +// SetDisabledRules gets a reference to the given []string and assigns it to the DisabledRules field. +func (o *WafPackageDetails) SetDisabledRules(v []string) { + o.DisabledRules = v +} + +// GetDisabledRulesets returns the DisabledRulesets field value if set, zero value otherwise. +func (o *WafPackageDetails) GetDisabledRulesets() []string { + if o == nil || IsNil(o.DisabledRulesets) { + var ret []string + return ret + } + return o.DisabledRulesets +} + +// GetDisabledRulesetsOk returns a tuple with the DisabledRulesets field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WafPackageDetails) GetDisabledRulesetsOk() ([]string, bool) { + if o == nil || IsNil(o.DisabledRulesets) { + return nil, false + } + return o.DisabledRulesets, true +} + +// HasDisabledRulesets returns a boolean if a field has been set. +func (o *WafPackageDetails) HasDisabledRulesets() bool { + if o != nil && !IsNil(o.DisabledRulesets) { + return true + } + + return false +} + +// SetDisabledRulesets gets a reference to the given []string and assigns it to the DisabledRulesets field. +func (o *WafPackageDetails) SetDisabledRulesets(v []string) { + o.DisabledRulesets = v +} + +// GetRulesets returns the Rulesets field value if set, zero value otherwise. +func (o *WafPackageDetails) GetRulesets() []WafRuleset { + if o == nil || IsNil(o.Rulesets) { + var ret []WafRuleset + return ret + } + return o.Rulesets +} + +// GetRulesetsOk returns a tuple with the Rulesets field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WafPackageDetails) GetRulesetsOk() ([]WafRuleset, bool) { + if o == nil || IsNil(o.Rulesets) { + return nil, false + } + return o.Rulesets, true +} + +// HasRulesets returns a boolean if a field has been set. +func (o *WafPackageDetails) HasRulesets() bool { + if o != nil && !IsNil(o.Rulesets) { + return true + } + + return false +} + +// SetRulesets gets a reference to the given []WafRuleset and assigns it to the Rulesets field. +func (o *WafPackageDetails) SetRulesets(v []WafRuleset) { + o.Rulesets = v +} + +func (o WafPackageDetails) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o WafPackageDetails) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: id is readOnly + // skip: name is readOnly + if !IsNil(o.Provider) { + toSerialize["provider"] = o.Provider + } + if !IsNil(o.ParamsSchema) { + toSerialize["params_schema"] = o.ParamsSchema + } + if !IsNil(o.DisabledRules) { + toSerialize["disabled_rules"] = o.DisabledRules + } + if !IsNil(o.DisabledRulesets) { + toSerialize["disabled_rulesets"] = o.DisabledRulesets + } + if !IsNil(o.Rulesets) { + toSerialize["rulesets"] = o.Rulesets + } + return toSerialize, nil +} + +type NullableWafPackageDetails struct { + value *WafPackageDetails + isSet bool +} + +func (v NullableWafPackageDetails) Get() *WafPackageDetails { + return v.value +} + +func (v *NullableWafPackageDetails) Set(val *WafPackageDetails) { + v.value = val + v.isSet = true +} + +func (v NullableWafPackageDetails) IsSet() bool { + return v.isSet +} + +func (v *NullableWafPackageDetails) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWafPackageDetails(val *WafPackageDetails) *NullableWafPackageDetails { + return &NullableWafPackageDetails{value: val, isSet: true} +} + +func (v NullableWafPackageDetails) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWafPackageDetails) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_waf_package_details_data.go b/model_waf_package_details_data.go new file mode 100644 index 0000000..c2484dd --- /dev/null +++ b/model_waf_package_details_data.go @@ -0,0 +1,126 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the WafPackageDetailsData type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &WafPackageDetailsData{} + +// WafPackageDetailsData struct for WafPackageDetailsData +type WafPackageDetailsData struct { + Data *WafPackageDetails `json:"data,omitempty"` +} + +// NewWafPackageDetailsData instantiates a new WafPackageDetailsData object +// This constructor will assign default values to properties that have it defined, +// 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 NewWafPackageDetailsData() *WafPackageDetailsData { + this := WafPackageDetailsData{} + return &this +} + +// NewWafPackageDetailsDataWithDefaults instantiates a new WafPackageDetailsData object +// This 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 NewWafPackageDetailsDataWithDefaults() *WafPackageDetailsData { + this := WafPackageDetailsData{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *WafPackageDetailsData) GetData() WafPackageDetails { + if o == nil || IsNil(o.Data) { + var ret WafPackageDetails + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WafPackageDetailsData) GetDataOk() (*WafPackageDetails, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *WafPackageDetailsData) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given WafPackageDetails and assigns it to the Data field. +func (o *WafPackageDetailsData) SetData(v WafPackageDetails) { + o.Data = &v +} + +func (o WafPackageDetailsData) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o WafPackageDetailsData) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + return toSerialize, nil +} + +type NullableWafPackageDetailsData struct { + value *WafPackageDetailsData + isSet bool +} + +func (v NullableWafPackageDetailsData) Get() *WafPackageDetailsData { + return v.value +} + +func (v *NullableWafPackageDetailsData) Set(val *WafPackageDetailsData) { + v.value = val + v.isSet = true +} + +func (v NullableWafPackageDetailsData) IsSet() bool { + return v.isSet +} + +func (v *NullableWafPackageDetailsData) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWafPackageDetailsData(val *WafPackageDetailsData) *NullableWafPackageDetailsData { + return &NullableWafPackageDetailsData{value: val, isSet: true} +} + +func (v NullableWafPackageDetailsData) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWafPackageDetailsData) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_waf_package_provider.go b/model_waf_package_provider.go new file mode 100644 index 0000000..e89c408 --- /dev/null +++ b/model_waf_package_provider.go @@ -0,0 +1,162 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the WafPackageProvider type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &WafPackageProvider{} + +// WafPackageProvider struct for WafPackageProvider +type WafPackageProvider struct { + Name *string `json:"name,omitempty"` + Logo *string `json:"logo,omitempty"` +} + +// NewWafPackageProvider instantiates a new WafPackageProvider object +// This constructor will assign default values to properties that have it defined, +// 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 NewWafPackageProvider() *WafPackageProvider { + this := WafPackageProvider{} + return &this +} + +// NewWafPackageProviderWithDefaults instantiates a new WafPackageProvider object +// This 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 NewWafPackageProviderWithDefaults() *WafPackageProvider { + this := WafPackageProvider{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *WafPackageProvider) 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 *WafPackageProvider) 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 *WafPackageProvider) 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 *WafPackageProvider) SetName(v string) { + o.Name = &v +} + +// GetLogo returns the Logo field value if set, zero value otherwise. +func (o *WafPackageProvider) GetLogo() string { + if o == nil || IsNil(o.Logo) { + var ret string + return ret + } + return *o.Logo +} + +// GetLogoOk returns a tuple with the Logo field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WafPackageProvider) GetLogoOk() (*string, bool) { + if o == nil || IsNil(o.Logo) { + return nil, false + } + return o.Logo, true +} + +// HasLogo returns a boolean if a field has been set. +func (o *WafPackageProvider) HasLogo() bool { + if o != nil && !IsNil(o.Logo) { + return true + } + + return false +} + +// SetLogo gets a reference to the given string and assigns it to the Logo field. +func (o *WafPackageProvider) SetLogo(v string) { + o.Logo = &v +} + +func (o WafPackageProvider) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o WafPackageProvider) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Logo) { + toSerialize["logo"] = o.Logo + } + return toSerialize, nil +} + +type NullableWafPackageProvider struct { + value *WafPackageProvider + isSet bool +} + +func (v NullableWafPackageProvider) Get() *WafPackageProvider { + return v.value +} + +func (v *NullableWafPackageProvider) Set(val *WafPackageProvider) { + v.value = val + v.isSet = true +} + +func (v NullableWafPackageProvider) IsSet() bool { + return v.isSet +} + +func (v *NullableWafPackageProvider) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWafPackageProvider(val *WafPackageProvider) *NullableWafPackageProvider { + return &NullableWafPackageProvider{value: val, isSet: true} +} + +func (v NullableWafPackageProvider) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWafPackageProvider) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_waf_packages_store_200_response.go b/model_waf_packages_store_200_response.go new file mode 100644 index 0000000..de26247 --- /dev/null +++ b/model_waf_packages_store_200_response.go @@ -0,0 +1,172 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the WafPackagesStore200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &WafPackagesStore200Response{} + +// WafPackagesStore200Response struct for WafPackagesStore200Response +type WafPackagesStore200Response struct { + Data *DomainWafPackage `json:"data,omitempty"` + Message NullableString `json:"message,omitempty"` +} + +// NewWafPackagesStore200Response instantiates a new WafPackagesStore200Response object +// This constructor will assign default values to properties that have it defined, +// 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 NewWafPackagesStore200Response() *WafPackagesStore200Response { + this := WafPackagesStore200Response{} + return &this +} + +// NewWafPackagesStore200ResponseWithDefaults instantiates a new WafPackagesStore200Response object +// This 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 NewWafPackagesStore200ResponseWithDefaults() *WafPackagesStore200Response { + this := WafPackagesStore200Response{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *WafPackagesStore200Response) GetData() DomainWafPackage { + if o == nil || IsNil(o.Data) { + var ret DomainWafPackage + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WafPackagesStore200Response) GetDataOk() (*DomainWafPackage, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *WafPackagesStore200Response) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given DomainWafPackage and assigns it to the Data field. +func (o *WafPackagesStore200Response) SetData(v DomainWafPackage) { + o.Data = &v +} + +// GetMessage returns the Message field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *WafPackagesStore200Response) GetMessage() string { + if o == nil || IsNil(o.Message.Get()) { + var ret string + return ret + } + return *o.Message.Get() +} + +// GetMessageOk returns a tuple with the Message 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 *WafPackagesStore200Response) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Message.Get(), o.Message.IsSet() +} + +// HasMessage returns a boolean if a field has been set. +func (o *WafPackagesStore200Response) HasMessage() bool { + if o != nil && o.Message.IsSet() { + return true + } + + return false +} + +// SetMessage gets a reference to the given NullableString and assigns it to the Message field. +func (o *WafPackagesStore200Response) SetMessage(v string) { + o.Message.Set(&v) +} +// SetMessageNil sets the value for Message to be an explicit nil +func (o *WafPackagesStore200Response) SetMessageNil() { + o.Message.Set(nil) +} + +// UnsetMessage ensures that no value is present for Message, not even an explicit nil +func (o *WafPackagesStore200Response) UnsetMessage() { + o.Message.Unset() +} + +func (o WafPackagesStore200Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o WafPackagesStore200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + if o.Message.IsSet() { + toSerialize["message"] = o.Message.Get() + } + return toSerialize, nil +} + +type NullableWafPackagesStore200Response struct { + value *WafPackagesStore200Response + isSet bool +} + +func (v NullableWafPackagesStore200Response) Get() *WafPackagesStore200Response { + return v.value +} + +func (v *NullableWafPackagesStore200Response) Set(val *WafPackagesStore200Response) { + v.value = val + v.isSet = true +} + +func (v NullableWafPackagesStore200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableWafPackagesStore200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWafPackagesStore200Response(val *WafPackagesStore200Response) *NullableWafPackagesStore200Response { + return &NullableWafPackagesStore200Response{value: val, isSet: true} +} + +func (v NullableWafPackagesStore200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWafPackagesStore200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_waf_packages_update_200_response.go b/model_waf_packages_update_200_response.go new file mode 100644 index 0000000..a6e49bd --- /dev/null +++ b/model_waf_packages_update_200_response.go @@ -0,0 +1,172 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the WafPackagesUpdate200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &WafPackagesUpdate200Response{} + +// WafPackagesUpdate200Response struct for WafPackagesUpdate200Response +type WafPackagesUpdate200Response struct { + Data *DomainWafPackageDetails `json:"data,omitempty"` + Message NullableString `json:"message,omitempty"` +} + +// NewWafPackagesUpdate200Response instantiates a new WafPackagesUpdate200Response object +// This constructor will assign default values to properties that have it defined, +// 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 NewWafPackagesUpdate200Response() *WafPackagesUpdate200Response { + this := WafPackagesUpdate200Response{} + return &this +} + +// NewWafPackagesUpdate200ResponseWithDefaults instantiates a new WafPackagesUpdate200Response object +// This 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 NewWafPackagesUpdate200ResponseWithDefaults() *WafPackagesUpdate200Response { + this := WafPackagesUpdate200Response{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *WafPackagesUpdate200Response) GetData() DomainWafPackageDetails { + if o == nil || IsNil(o.Data) { + var ret DomainWafPackageDetails + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WafPackagesUpdate200Response) GetDataOk() (*DomainWafPackageDetails, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *WafPackagesUpdate200Response) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given DomainWafPackageDetails and assigns it to the Data field. +func (o *WafPackagesUpdate200Response) SetData(v DomainWafPackageDetails) { + o.Data = &v +} + +// GetMessage returns the Message field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *WafPackagesUpdate200Response) GetMessage() string { + if o == nil || IsNil(o.Message.Get()) { + var ret string + return ret + } + return *o.Message.Get() +} + +// GetMessageOk returns a tuple with the Message 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 *WafPackagesUpdate200Response) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Message.Get(), o.Message.IsSet() +} + +// HasMessage returns a boolean if a field has been set. +func (o *WafPackagesUpdate200Response) HasMessage() bool { + if o != nil && o.Message.IsSet() { + return true + } + + return false +} + +// SetMessage gets a reference to the given NullableString and assigns it to the Message field. +func (o *WafPackagesUpdate200Response) SetMessage(v string) { + o.Message.Set(&v) +} +// SetMessageNil sets the value for Message to be an explicit nil +func (o *WafPackagesUpdate200Response) SetMessageNil() { + o.Message.Set(nil) +} + +// UnsetMessage ensures that no value is present for Message, not even an explicit nil +func (o *WafPackagesUpdate200Response) UnsetMessage() { + o.Message.Unset() +} + +func (o WafPackagesUpdate200Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o WafPackagesUpdate200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + if o.Message.IsSet() { + toSerialize["message"] = o.Message.Get() + } + return toSerialize, nil +} + +type NullableWafPackagesUpdate200Response struct { + value *WafPackagesUpdate200Response + isSet bool +} + +func (v NullableWafPackagesUpdate200Response) Get() *WafPackagesUpdate200Response { + return v.value +} + +func (v *NullableWafPackagesUpdate200Response) Set(val *WafPackagesUpdate200Response) { + v.value = val + v.isSet = true +} + +func (v NullableWafPackagesUpdate200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableWafPackagesUpdate200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWafPackagesUpdate200Response(val *WafPackagesUpdate200Response) *NullableWafPackagesUpdate200Response { + return &NullableWafPackagesUpdate200Response{value: val, isSet: true} +} + +func (v NullableWafPackagesUpdate200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWafPackagesUpdate200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_waf_preset.go b/model_waf_preset.go new file mode 100644 index 0000000..bf733ab --- /dev/null +++ b/model_waf_preset.go @@ -0,0 +1,234 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the WafPreset type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &WafPreset{} + +// WafPreset struct for WafPreset +type WafPreset struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + Packages []WafPresetPackagesInner `json:"packages,omitempty"` +} + +// NewWafPreset instantiates a new WafPreset object +// This constructor will assign default values to properties that have it defined, +// 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 NewWafPreset() *WafPreset { + this := WafPreset{} + return &this +} + +// NewWafPresetWithDefaults instantiates a new WafPreset object +// This 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 NewWafPresetWithDefaults() *WafPreset { + this := WafPreset{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *WafPreset) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WafPreset) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *WafPreset) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *WafPreset) SetId(v string) { + o.Id = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *WafPreset) 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 *WafPreset) 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 *WafPreset) 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 *WafPreset) SetName(v string) { + o.Name = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *WafPreset) 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 *WafPreset) 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 *WafPreset) 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 *WafPreset) SetDescription(v string) { + o.Description = &v +} + +// GetPackages returns the Packages field value if set, zero value otherwise. +func (o *WafPreset) GetPackages() []WafPresetPackagesInner { + if o == nil || IsNil(o.Packages) { + var ret []WafPresetPackagesInner + return ret + } + return o.Packages +} + +// GetPackagesOk returns a tuple with the Packages field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WafPreset) GetPackagesOk() ([]WafPresetPackagesInner, bool) { + if o == nil || IsNil(o.Packages) { + return nil, false + } + return o.Packages, true +} + +// HasPackages returns a boolean if a field has been set. +func (o *WafPreset) HasPackages() bool { + if o != nil && !IsNil(o.Packages) { + return true + } + + return false +} + +// SetPackages gets a reference to the given []WafPresetPackagesInner and assigns it to the Packages field. +func (o *WafPreset) SetPackages(v []WafPresetPackagesInner) { + o.Packages = v +} + +func (o WafPreset) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o WafPreset) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.Packages) { + toSerialize["packages"] = o.Packages + } + return toSerialize, nil +} + +type NullableWafPreset struct { + value *WafPreset + isSet bool +} + +func (v NullableWafPreset) Get() *WafPreset { + return v.value +} + +func (v *NullableWafPreset) Set(val *WafPreset) { + v.value = val + v.isSet = true +} + +func (v NullableWafPreset) IsSet() bool { + return v.isSet +} + +func (v *NullableWafPreset) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWafPreset(val *WafPreset) *NullableWafPreset { + return &NullableWafPreset{value: val, isSet: true} +} + +func (v NullableWafPreset) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWafPreset) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_waf_preset_packages_inner.go b/model_waf_preset_packages_inner.go new file mode 100644 index 0000000..0f6f2e3 --- /dev/null +++ b/model_waf_preset_packages_inner.go @@ -0,0 +1,162 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the WafPresetPackagesInner type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &WafPresetPackagesInner{} + +// WafPresetPackagesInner struct for WafPresetPackagesInner +type WafPresetPackagesInner struct { + Name *string `json:"name,omitempty"` + Provider *WafPresetPackagesInnerProvider `json:"provider,omitempty"` +} + +// NewWafPresetPackagesInner instantiates a new WafPresetPackagesInner object +// This constructor will assign default values to properties that have it defined, +// 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 NewWafPresetPackagesInner() *WafPresetPackagesInner { + this := WafPresetPackagesInner{} + return &this +} + +// NewWafPresetPackagesInnerWithDefaults instantiates a new WafPresetPackagesInner object +// This 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 NewWafPresetPackagesInnerWithDefaults() *WafPresetPackagesInner { + this := WafPresetPackagesInner{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *WafPresetPackagesInner) 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 *WafPresetPackagesInner) 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 *WafPresetPackagesInner) 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 *WafPresetPackagesInner) SetName(v string) { + o.Name = &v +} + +// GetProvider returns the Provider field value if set, zero value otherwise. +func (o *WafPresetPackagesInner) GetProvider() WafPresetPackagesInnerProvider { + if o == nil || IsNil(o.Provider) { + var ret WafPresetPackagesInnerProvider + return ret + } + return *o.Provider +} + +// GetProviderOk returns a tuple with the Provider field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WafPresetPackagesInner) GetProviderOk() (*WafPresetPackagesInnerProvider, bool) { + if o == nil || IsNil(o.Provider) { + return nil, false + } + return o.Provider, true +} + +// HasProvider returns a boolean if a field has been set. +func (o *WafPresetPackagesInner) HasProvider() bool { + if o != nil && !IsNil(o.Provider) { + return true + } + + return false +} + +// SetProvider gets a reference to the given WafPresetPackagesInnerProvider and assigns it to the Provider field. +func (o *WafPresetPackagesInner) SetProvider(v WafPresetPackagesInnerProvider) { + o.Provider = &v +} + +func (o WafPresetPackagesInner) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o WafPresetPackagesInner) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Provider) { + toSerialize["provider"] = o.Provider + } + return toSerialize, nil +} + +type NullableWafPresetPackagesInner struct { + value *WafPresetPackagesInner + isSet bool +} + +func (v NullableWafPresetPackagesInner) Get() *WafPresetPackagesInner { + return v.value +} + +func (v *NullableWafPresetPackagesInner) Set(val *WafPresetPackagesInner) { + v.value = val + v.isSet = true +} + +func (v NullableWafPresetPackagesInner) IsSet() bool { + return v.isSet +} + +func (v *NullableWafPresetPackagesInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWafPresetPackagesInner(val *WafPresetPackagesInner) *NullableWafPresetPackagesInner { + return &NullableWafPresetPackagesInner{value: val, isSet: true} +} + +func (v NullableWafPresetPackagesInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWafPresetPackagesInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_waf_preset_packages_inner_provider.go b/model_waf_preset_packages_inner_provider.go new file mode 100644 index 0000000..b2c9728 --- /dev/null +++ b/model_waf_preset_packages_inner_provider.go @@ -0,0 +1,162 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the WafPresetPackagesInnerProvider type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &WafPresetPackagesInnerProvider{} + +// WafPresetPackagesInnerProvider struct for WafPresetPackagesInnerProvider +type WafPresetPackagesInnerProvider struct { + Name *string `json:"name,omitempty"` + Logo *string `json:"logo,omitempty"` +} + +// NewWafPresetPackagesInnerProvider instantiates a new WafPresetPackagesInnerProvider object +// This constructor will assign default values to properties that have it defined, +// 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 NewWafPresetPackagesInnerProvider() *WafPresetPackagesInnerProvider { + this := WafPresetPackagesInnerProvider{} + return &this +} + +// NewWafPresetPackagesInnerProviderWithDefaults instantiates a new WafPresetPackagesInnerProvider object +// This 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 NewWafPresetPackagesInnerProviderWithDefaults() *WafPresetPackagesInnerProvider { + this := WafPresetPackagesInnerProvider{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *WafPresetPackagesInnerProvider) 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 *WafPresetPackagesInnerProvider) 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 *WafPresetPackagesInnerProvider) 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 *WafPresetPackagesInnerProvider) SetName(v string) { + o.Name = &v +} + +// GetLogo returns the Logo field value if set, zero value otherwise. +func (o *WafPresetPackagesInnerProvider) GetLogo() string { + if o == nil || IsNil(o.Logo) { + var ret string + return ret + } + return *o.Logo +} + +// GetLogoOk returns a tuple with the Logo field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WafPresetPackagesInnerProvider) GetLogoOk() (*string, bool) { + if o == nil || IsNil(o.Logo) { + return nil, false + } + return o.Logo, true +} + +// HasLogo returns a boolean if a field has been set. +func (o *WafPresetPackagesInnerProvider) HasLogo() bool { + if o != nil && !IsNil(o.Logo) { + return true + } + + return false +} + +// SetLogo gets a reference to the given string and assigns it to the Logo field. +func (o *WafPresetPackagesInnerProvider) SetLogo(v string) { + o.Logo = &v +} + +func (o WafPresetPackagesInnerProvider) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o WafPresetPackagesInnerProvider) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Logo) { + toSerialize["logo"] = o.Logo + } + return toSerialize, nil +} + +type NullableWafPresetPackagesInnerProvider struct { + value *WafPresetPackagesInnerProvider + isSet bool +} + +func (v NullableWafPresetPackagesInnerProvider) Get() *WafPresetPackagesInnerProvider { + return v.value +} + +func (v *NullableWafPresetPackagesInnerProvider) Set(val *WafPresetPackagesInnerProvider) { + v.value = val + v.isSet = true +} + +func (v NullableWafPresetPackagesInnerProvider) IsSet() bool { + return v.isSet +} + +func (v *NullableWafPresetPackagesInnerProvider) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWafPresetPackagesInnerProvider(val *WafPresetPackagesInnerProvider) *NullableWafPresetPackagesInnerProvider { + return &NullableWafPresetPackagesInnerProvider{value: val, isSet: true} +} + +func (v NullableWafPresetPackagesInnerProvider) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWafPresetPackagesInnerProvider) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_waf_presets.go b/model_waf_presets.go new file mode 100644 index 0000000..749ca4f --- /dev/null +++ b/model_waf_presets.go @@ -0,0 +1,162 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the WafPresets type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &WafPresets{} + +// WafPresets struct for WafPresets +type WafPresets struct { + Presets []WafPreset `json:"presets,omitempty"` + Packages []WafPackage `json:"packages,omitempty"` +} + +// NewWafPresets instantiates a new WafPresets object +// This constructor will assign default values to properties that have it defined, +// 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 NewWafPresets() *WafPresets { + this := WafPresets{} + return &this +} + +// NewWafPresetsWithDefaults instantiates a new WafPresets object +// This 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 NewWafPresetsWithDefaults() *WafPresets { + this := WafPresets{} + return &this +} + +// GetPresets returns the Presets field value if set, zero value otherwise. +func (o *WafPresets) GetPresets() []WafPreset { + if o == nil || IsNil(o.Presets) { + var ret []WafPreset + return ret + } + return o.Presets +} + +// GetPresetsOk returns a tuple with the Presets field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WafPresets) GetPresetsOk() ([]WafPreset, bool) { + if o == nil || IsNil(o.Presets) { + return nil, false + } + return o.Presets, true +} + +// HasPresets returns a boolean if a field has been set. +func (o *WafPresets) HasPresets() bool { + if o != nil && !IsNil(o.Presets) { + return true + } + + return false +} + +// SetPresets gets a reference to the given []WafPreset and assigns it to the Presets field. +func (o *WafPresets) SetPresets(v []WafPreset) { + o.Presets = v +} + +// GetPackages returns the Packages field value if set, zero value otherwise. +func (o *WafPresets) GetPackages() []WafPackage { + if o == nil || IsNil(o.Packages) { + var ret []WafPackage + return ret + } + return o.Packages +} + +// GetPackagesOk returns a tuple with the Packages field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WafPresets) GetPackagesOk() ([]WafPackage, bool) { + if o == nil || IsNil(o.Packages) { + return nil, false + } + return o.Packages, true +} + +// HasPackages returns a boolean if a field has been set. +func (o *WafPresets) HasPackages() bool { + if o != nil && !IsNil(o.Packages) { + return true + } + + return false +} + +// SetPackages gets a reference to the given []WafPackage and assigns it to the Packages field. +func (o *WafPresets) SetPackages(v []WafPackage) { + o.Packages = v +} + +func (o WafPresets) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o WafPresets) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Presets) { + toSerialize["presets"] = o.Presets + } + if !IsNil(o.Packages) { + toSerialize["packages"] = o.Packages + } + return toSerialize, nil +} + +type NullableWafPresets struct { + value *WafPresets + isSet bool +} + +func (v NullableWafPresets) Get() *WafPresets { + return v.value +} + +func (v *NullableWafPresets) Set(val *WafPresets) { + v.value = val + v.isSet = true +} + +func (v NullableWafPresets) IsSet() bool { + return v.isSet +} + +func (v *NullableWafPresets) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWafPresets(val *WafPresets) *NullableWafPresets { + return &NullableWafPresets{value: val, isSet: true} +} + +func (v NullableWafPresets) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWafPresets) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_waf_presets_data.go b/model_waf_presets_data.go new file mode 100644 index 0000000..eba03f5 --- /dev/null +++ b/model_waf_presets_data.go @@ -0,0 +1,126 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the WafPresetsData type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &WafPresetsData{} + +// WafPresetsData struct for WafPresetsData +type WafPresetsData struct { + Data *WafPresets `json:"data,omitempty"` +} + +// NewWafPresetsData instantiates a new WafPresetsData object +// This constructor will assign default values to properties that have it defined, +// 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 NewWafPresetsData() *WafPresetsData { + this := WafPresetsData{} + return &this +} + +// NewWafPresetsDataWithDefaults instantiates a new WafPresetsData object +// This 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 NewWafPresetsDataWithDefaults() *WafPresetsData { + this := WafPresetsData{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *WafPresetsData) GetData() WafPresets { + if o == nil || IsNil(o.Data) { + var ret WafPresets + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WafPresetsData) GetDataOk() (*WafPresets, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *WafPresetsData) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given WafPresets and assigns it to the Data field. +func (o *WafPresetsData) SetData(v WafPresets) { + o.Data = &v +} + +func (o WafPresetsData) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o WafPresetsData) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + return toSerialize, nil +} + +type NullableWafPresetsData struct { + value *WafPresetsData + isSet bool +} + +func (v NullableWafPresetsData) Get() *WafPresetsData { + return v.value +} + +func (v *NullableWafPresetsData) Set(val *WafPresetsData) { + v.value = val + v.isSet = true +} + +func (v NullableWafPresetsData) IsSet() bool { + return v.isSet +} + +func (v *NullableWafPresetsData) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWafPresetsData(val *WafPresetsData) *NullableWafPresetsData { + return &NullableWafPresetsData{value: val, isSet: true} +} + +func (v NullableWafPresetsData) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWafPresetsData) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_waf_reconfigure.go b/model_waf_reconfigure.go new file mode 100644 index 0000000..c564c0f --- /dev/null +++ b/model_waf_reconfigure.go @@ -0,0 +1,126 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the WafReconfigure type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &WafReconfigure{} + +// WafReconfigure struct for WafReconfigure +type WafReconfigure struct { + PresetId *string `json:"preset_id,omitempty"` +} + +// NewWafReconfigure instantiates a new WafReconfigure object +// This constructor will assign default values to properties that have it defined, +// 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 NewWafReconfigure() *WafReconfigure { + this := WafReconfigure{} + return &this +} + +// NewWafReconfigureWithDefaults instantiates a new WafReconfigure object +// This 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 NewWafReconfigureWithDefaults() *WafReconfigure { + this := WafReconfigure{} + return &this +} + +// GetPresetId returns the PresetId field value if set, zero value otherwise. +func (o *WafReconfigure) GetPresetId() string { + if o == nil || IsNil(o.PresetId) { + var ret string + return ret + } + return *o.PresetId +} + +// GetPresetIdOk returns a tuple with the PresetId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WafReconfigure) GetPresetIdOk() (*string, bool) { + if o == nil || IsNil(o.PresetId) { + return nil, false + } + return o.PresetId, true +} + +// HasPresetId returns a boolean if a field has been set. +func (o *WafReconfigure) HasPresetId() bool { + if o != nil && !IsNil(o.PresetId) { + return true + } + + return false +} + +// SetPresetId gets a reference to the given string and assigns it to the PresetId field. +func (o *WafReconfigure) SetPresetId(v string) { + o.PresetId = &v +} + +func (o WafReconfigure) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o WafReconfigure) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PresetId) { + toSerialize["preset_id"] = o.PresetId + } + return toSerialize, nil +} + +type NullableWafReconfigure struct { + value *WafReconfigure + isSet bool +} + +func (v NullableWafReconfigure) Get() *WafReconfigure { + return v.value +} + +func (v *NullableWafReconfigure) Set(val *WafReconfigure) { + v.value = val + v.isSet = true +} + +func (v NullableWafReconfigure) IsSet() bool { + return v.isSet +} + +func (v *NullableWafReconfigure) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWafReconfigure(val *WafReconfigure) *NullableWafReconfigure { + return &NullableWafReconfigure{value: val, isSet: true} +} + +func (v NullableWafReconfigure) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWafReconfigure) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_waf_reprioritize.go b/model_waf_reprioritize.go new file mode 100644 index 0000000..6c00e2b --- /dev/null +++ b/model_waf_reprioritize.go @@ -0,0 +1,192 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the WafReprioritize type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &WafReprioritize{} + +// WafReprioritize struct for WafReprioritize +type WafReprioritize struct { + // ID of the package you want to move + PackageId string `json:"package_id"` + // ID of the package you want to be prior to the selected package + AfterPackageId *string `json:"after_package_id,omitempty"` + // ID of the package you want to follow the selected package + BeforePackageId *string `json:"before_package_id,omitempty"` +} + +// NewWafReprioritize instantiates a new WafReprioritize object +// This constructor will assign default values to properties that have it defined, +// 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 NewWafReprioritize(packageId string) *WafReprioritize { + this := WafReprioritize{} + this.PackageId = packageId + return &this +} + +// NewWafReprioritizeWithDefaults instantiates a new WafReprioritize object +// This 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 NewWafReprioritizeWithDefaults() *WafReprioritize { + this := WafReprioritize{} + return &this +} + +// GetPackageId returns the PackageId field value +func (o *WafReprioritize) GetPackageId() string { + if o == nil { + var ret string + return ret + } + + return o.PackageId +} + +// GetPackageIdOk returns a tuple with the PackageId field value +// and a boolean to check if the value has been set. +func (o *WafReprioritize) GetPackageIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.PackageId, true +} + +// SetPackageId sets field value +func (o *WafReprioritize) SetPackageId(v string) { + o.PackageId = v +} + +// GetAfterPackageId returns the AfterPackageId field value if set, zero value otherwise. +func (o *WafReprioritize) GetAfterPackageId() string { + if o == nil || IsNil(o.AfterPackageId) { + var ret string + return ret + } + return *o.AfterPackageId +} + +// GetAfterPackageIdOk returns a tuple with the AfterPackageId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WafReprioritize) GetAfterPackageIdOk() (*string, bool) { + if o == nil || IsNil(o.AfterPackageId) { + return nil, false + } + return o.AfterPackageId, true +} + +// HasAfterPackageId returns a boolean if a field has been set. +func (o *WafReprioritize) HasAfterPackageId() bool { + if o != nil && !IsNil(o.AfterPackageId) { + return true + } + + return false +} + +// SetAfterPackageId gets a reference to the given string and assigns it to the AfterPackageId field. +func (o *WafReprioritize) SetAfterPackageId(v string) { + o.AfterPackageId = &v +} + +// GetBeforePackageId returns the BeforePackageId field value if set, zero value otherwise. +func (o *WafReprioritize) GetBeforePackageId() string { + if o == nil || IsNil(o.BeforePackageId) { + var ret string + return ret + } + return *o.BeforePackageId +} + +// GetBeforePackageIdOk returns a tuple with the BeforePackageId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WafReprioritize) GetBeforePackageIdOk() (*string, bool) { + if o == nil || IsNil(o.BeforePackageId) { + return nil, false + } + return o.BeforePackageId, true +} + +// HasBeforePackageId returns a boolean if a field has been set. +func (o *WafReprioritize) HasBeforePackageId() bool { + if o != nil && !IsNil(o.BeforePackageId) { + return true + } + + return false +} + +// SetBeforePackageId gets a reference to the given string and assigns it to the BeforePackageId field. +func (o *WafReprioritize) SetBeforePackageId(v string) { + o.BeforePackageId = &v +} + +func (o WafReprioritize) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o WafReprioritize) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["package_id"] = o.PackageId + if !IsNil(o.AfterPackageId) { + toSerialize["after_package_id"] = o.AfterPackageId + } + if !IsNil(o.BeforePackageId) { + toSerialize["before_package_id"] = o.BeforePackageId + } + return toSerialize, nil +} + +type NullableWafReprioritize struct { + value *WafReprioritize + isSet bool +} + +func (v NullableWafReprioritize) Get() *WafReprioritize { + return v.value +} + +func (v *NullableWafReprioritize) Set(val *WafReprioritize) { + v.value = val + v.isSet = true +} + +func (v NullableWafReprioritize) IsSet() bool { + return v.isSet +} + +func (v *NullableWafReprioritize) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWafReprioritize(val *WafReprioritize) *NullableWafReprioritize { + return &NullableWafReprioritize{value: val, isSet: true} +} + +func (v NullableWafReprioritize) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWafReprioritize) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_waf_rule.go b/model_waf_rule.go new file mode 100644 index 0000000..4ac513b --- /dev/null +++ b/model_waf_rule.go @@ -0,0 +1,305 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the WafRule type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &WafRule{} + +// WafRule struct for WafRule +type WafRule struct { + Id *string `json:"id,omitempty"` + // - `?` matches any single character. - `*` matches any (possibly empty) sequence of characters. - `**` matches the current directory and arbitrary subdirectories. This sequence must form a single path component, so both `**a` and `b**` are invalid and will result in an error. A sequence of more than two consecutive `*` characters is also invalid. - `[...]` matches any character inside the brackets. Character sequences can also specify ranges of characters, as ordered by Unicode, so e.g. `[0-9]` specifies any character between 0 and 9 inclusive. An unclosed bracket is invalid. - `[!...]` is the negation of `[...]`, i.e. it matches any characters not in the brackets. - The metacharacters `?`, `*`, `[`, `] `can be matched by using brackets (e.g. `[?]`). When a `]` occurs immediately following `[` or `[!` then it is interpreted as being part of, rather then ending, the character set, so `]` and NOT `]` can be matched by `[]]` and `[!]]` respectively. The - character can be specified inside a character sequence pattern by placing it at the start or the end, e.g. `[abc-]`. + UrlPattern *string `json:"url_pattern,omitempty"` + Sources []string `json:"sources,omitempty"` + Action *string `json:"action,omitempty"` + Description *string `json:"description,omitempty"` + IsEnabled *bool `json:"is_enabled,omitempty"` +} + +// NewWafRule instantiates a new WafRule object +// This constructor will assign default values to properties that have it defined, +// 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 NewWafRule() *WafRule { + this := WafRule{} + return &this +} + +// NewWafRuleWithDefaults instantiates a new WafRule object +// This 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 NewWafRuleWithDefaults() *WafRule { + this := WafRule{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *WafRule) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WafRule) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *WafRule) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *WafRule) SetId(v string) { + o.Id = &v +} + +// GetUrlPattern returns the UrlPattern field value if set, zero value otherwise. +func (o *WafRule) GetUrlPattern() string { + if o == nil || IsNil(o.UrlPattern) { + var ret string + return ret + } + return *o.UrlPattern +} + +// GetUrlPatternOk returns a tuple with the UrlPattern field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WafRule) GetUrlPatternOk() (*string, bool) { + if o == nil || IsNil(o.UrlPattern) { + return nil, false + } + return o.UrlPattern, true +} + +// HasUrlPattern returns a boolean if a field has been set. +func (o *WafRule) HasUrlPattern() bool { + if o != nil && !IsNil(o.UrlPattern) { + return true + } + + return false +} + +// SetUrlPattern gets a reference to the given string and assigns it to the UrlPattern field. +func (o *WafRule) SetUrlPattern(v string) { + o.UrlPattern = &v +} + +// GetSources returns the Sources field value if set, zero value otherwise. +func (o *WafRule) GetSources() []string { + if o == nil || IsNil(o.Sources) { + var ret []string + 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 *WafRule) GetSourcesOk() ([]string, 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 *WafRule) HasSources() bool { + if o != nil && !IsNil(o.Sources) { + return true + } + + return false +} + +// SetSources gets a reference to the given []string and assigns it to the Sources field. +func (o *WafRule) SetSources(v []string) { + o.Sources = v +} + +// GetAction returns the Action field value if set, zero value otherwise. +func (o *WafRule) GetAction() string { + if o == nil || IsNil(o.Action) { + var ret string + return ret + } + return *o.Action +} + +// GetActionOk returns a tuple with the Action field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WafRule) GetActionOk() (*string, bool) { + if o == nil || IsNil(o.Action) { + return nil, false + } + return o.Action, true +} + +// HasAction returns a boolean if a field has been set. +func (o *WafRule) HasAction() bool { + if o != nil && !IsNil(o.Action) { + return true + } + + return false +} + +// SetAction gets a reference to the given string and assigns it to the Action field. +func (o *WafRule) SetAction(v string) { + o.Action = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *WafRule) 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 *WafRule) 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 *WafRule) 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 *WafRule) SetDescription(v string) { + o.Description = &v +} + +// GetIsEnabled returns the IsEnabled field value if set, zero value otherwise. +func (o *WafRule) GetIsEnabled() bool { + if o == nil || IsNil(o.IsEnabled) { + var ret bool + return ret + } + return *o.IsEnabled +} + +// GetIsEnabledOk returns a tuple with the IsEnabled field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WafRule) GetIsEnabledOk() (*bool, bool) { + if o == nil || IsNil(o.IsEnabled) { + return nil, false + } + return o.IsEnabled, true +} + +// HasIsEnabled returns a boolean if a field has been set. +func (o *WafRule) HasIsEnabled() bool { + if o != nil && !IsNil(o.IsEnabled) { + return true + } + + return false +} + +// SetIsEnabled gets a reference to the given bool and assigns it to the IsEnabled field. +func (o *WafRule) SetIsEnabled(v bool) { + o.IsEnabled = &v +} + +func (o WafRule) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o WafRule) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: id is readOnly + if !IsNil(o.UrlPattern) { + toSerialize["url_pattern"] = o.UrlPattern + } + if !IsNil(o.Sources) { + toSerialize["sources"] = o.Sources + } + if !IsNil(o.Action) { + toSerialize["action"] = o.Action + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.IsEnabled) { + toSerialize["is_enabled"] = o.IsEnabled + } + return toSerialize, nil +} + +type NullableWafRule struct { + value *WafRule + isSet bool +} + +func (v NullableWafRule) Get() *WafRule { + return v.value +} + +func (v *NullableWafRule) Set(val *WafRule) { + v.value = val + v.isSet = true +} + +func (v NullableWafRule) IsSet() bool { + return v.isSet +} + +func (v *NullableWafRule) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWafRule(val *WafRule) *NullableWafRule { + return &NullableWafRule{value: val, isSet: true} +} + +func (v NullableWafRule) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWafRule) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_waf_rule_response.go b/model_waf_rule_response.go new file mode 100644 index 0000000..655db09 --- /dev/null +++ b/model_waf_rule_response.go @@ -0,0 +1,172 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the WafRuleResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &WafRuleResponse{} + +// WafRuleResponse struct for WafRuleResponse +type WafRuleResponse struct { + Data *WafRule `json:"data,omitempty"` + Message NullableString `json:"message,omitempty"` +} + +// NewWafRuleResponse instantiates a new WafRuleResponse object +// This constructor will assign default values to properties that have it defined, +// 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 NewWafRuleResponse() *WafRuleResponse { + this := WafRuleResponse{} + return &this +} + +// NewWafRuleResponseWithDefaults instantiates a new WafRuleResponse object +// This 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 NewWafRuleResponseWithDefaults() *WafRuleResponse { + this := WafRuleResponse{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *WafRuleResponse) GetData() WafRule { + if o == nil || IsNil(o.Data) { + var ret WafRule + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WafRuleResponse) GetDataOk() (*WafRule, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *WafRuleResponse) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given WafRule and assigns it to the Data field. +func (o *WafRuleResponse) SetData(v WafRule) { + o.Data = &v +} + +// GetMessage returns the Message field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *WafRuleResponse) GetMessage() string { + if o == nil || IsNil(o.Message.Get()) { + var ret string + return ret + } + return *o.Message.Get() +} + +// GetMessageOk returns a tuple with the Message 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 *WafRuleResponse) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Message.Get(), o.Message.IsSet() +} + +// HasMessage returns a boolean if a field has been set. +func (o *WafRuleResponse) HasMessage() bool { + if o != nil && o.Message.IsSet() { + return true + } + + return false +} + +// SetMessage gets a reference to the given NullableString and assigns it to the Message field. +func (o *WafRuleResponse) SetMessage(v string) { + o.Message.Set(&v) +} +// SetMessageNil sets the value for Message to be an explicit nil +func (o *WafRuleResponse) SetMessageNil() { + o.Message.Set(nil) +} + +// UnsetMessage ensures that no value is present for Message, not even an explicit nil +func (o *WafRuleResponse) UnsetMessage() { + o.Message.Unset() +} + +func (o WafRuleResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o WafRuleResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + if o.Message.IsSet() { + toSerialize["message"] = o.Message.Get() + } + return toSerialize, nil +} + +type NullableWafRuleResponse struct { + value *WafRuleResponse + isSet bool +} + +func (v NullableWafRuleResponse) Get() *WafRuleResponse { + return v.value +} + +func (v *NullableWafRuleResponse) Set(val *WafRuleResponse) { + v.value = val + v.isSet = true +} + +func (v NullableWafRuleResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableWafRuleResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWafRuleResponse(val *WafRuleResponse) *NullableWafRuleResponse { + return &NullableWafRuleResponse{value: val, isSet: true} +} + +func (v NullableWafRuleResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWafRuleResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_waf_rules_index_200_response.go b/model_waf_rules_index_200_response.go new file mode 100644 index 0000000..c5941ad --- /dev/null +++ b/model_waf_rules_index_200_response.go @@ -0,0 +1,198 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the WafRulesIndex200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &WafRulesIndex200Response{} + +// WafRulesIndex200Response struct for WafRulesIndex200Response +type WafRulesIndex200Response struct { + Data []WafRule `json:"data,omitempty"` + Links *PaginatedResponseLinks `json:"links,omitempty"` + Meta *PaginatedResponseMeta `json:"meta,omitempty"` +} + +// NewWafRulesIndex200Response instantiates a new WafRulesIndex200Response object +// This constructor will assign default values to properties that have it defined, +// 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 NewWafRulesIndex200Response() *WafRulesIndex200Response { + this := WafRulesIndex200Response{} + return &this +} + +// NewWafRulesIndex200ResponseWithDefaults instantiates a new WafRulesIndex200Response object +// This 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 NewWafRulesIndex200ResponseWithDefaults() *WafRulesIndex200Response { + this := WafRulesIndex200Response{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *WafRulesIndex200Response) GetData() []WafRule { + if o == nil || IsNil(o.Data) { + var ret []WafRule + return ret + } + return o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WafRulesIndex200Response) GetDataOk() ([]WafRule, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *WafRulesIndex200Response) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given []WafRule and assigns it to the Data field. +func (o *WafRulesIndex200Response) SetData(v []WafRule) { + o.Data = v +} + +// GetLinks returns the Links field value if set, zero value otherwise. +func (o *WafRulesIndex200Response) GetLinks() PaginatedResponseLinks { + if o == nil || IsNil(o.Links) { + var ret PaginatedResponseLinks + return ret + } + return *o.Links +} + +// GetLinksOk returns a tuple with the Links field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WafRulesIndex200Response) GetLinksOk() (*PaginatedResponseLinks, bool) { + if o == nil || IsNil(o.Links) { + return nil, false + } + return o.Links, true +} + +// HasLinks returns a boolean if a field has been set. +func (o *WafRulesIndex200Response) HasLinks() bool { + if o != nil && !IsNil(o.Links) { + return true + } + + return false +} + +// SetLinks gets a reference to the given PaginatedResponseLinks and assigns it to the Links field. +func (o *WafRulesIndex200Response) SetLinks(v PaginatedResponseLinks) { + o.Links = &v +} + +// GetMeta returns the Meta field value if set, zero value otherwise. +func (o *WafRulesIndex200Response) GetMeta() PaginatedResponseMeta { + if o == nil || IsNil(o.Meta) { + var ret PaginatedResponseMeta + return ret + } + return *o.Meta +} + +// GetMetaOk returns a tuple with the Meta field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WafRulesIndex200Response) GetMetaOk() (*PaginatedResponseMeta, bool) { + if o == nil || IsNil(o.Meta) { + return nil, false + } + return o.Meta, true +} + +// HasMeta returns a boolean if a field has been set. +func (o *WafRulesIndex200Response) HasMeta() bool { + if o != nil && !IsNil(o.Meta) { + return true + } + + return false +} + +// SetMeta gets a reference to the given PaginatedResponseMeta and assigns it to the Meta field. +func (o *WafRulesIndex200Response) SetMeta(v PaginatedResponseMeta) { + o.Meta = &v +} + +func (o WafRulesIndex200Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o WafRulesIndex200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + if !IsNil(o.Links) { + toSerialize["links"] = o.Links + } + if !IsNil(o.Meta) { + toSerialize["meta"] = o.Meta + } + return toSerialize, nil +} + +type NullableWafRulesIndex200Response struct { + value *WafRulesIndex200Response + isSet bool +} + +func (v NullableWafRulesIndex200Response) Get() *WafRulesIndex200Response { + return v.value +} + +func (v *NullableWafRulesIndex200Response) Set(val *WafRulesIndex200Response) { + v.value = val + v.isSet = true +} + +func (v NullableWafRulesIndex200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableWafRulesIndex200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWafRulesIndex200Response(val *WafRulesIndex200Response) *NullableWafRulesIndex200Response { + return &NullableWafRulesIndex200Response{value: val, isSet: true} +} + +func (v NullableWafRulesIndex200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWafRulesIndex200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_waf_ruleset.go b/model_waf_ruleset.go new file mode 100644 index 0000000..95bb61d --- /dev/null +++ b/model_waf_ruleset.go @@ -0,0 +1,198 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the WafRuleset type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &WafRuleset{} + +// WafRuleset struct for WafRuleset +type WafRuleset struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Rules []WafRulesetRulesInner `json:"rules,omitempty"` +} + +// NewWafRuleset instantiates a new WafRuleset object +// This constructor will assign default values to properties that have it defined, +// 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 NewWafRuleset() *WafRuleset { + this := WafRuleset{} + return &this +} + +// NewWafRulesetWithDefaults instantiates a new WafRuleset object +// This 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 NewWafRulesetWithDefaults() *WafRuleset { + this := WafRuleset{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *WafRuleset) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WafRuleset) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *WafRuleset) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *WafRuleset) SetId(v string) { + o.Id = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *WafRuleset) 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 *WafRuleset) 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 *WafRuleset) 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 *WafRuleset) SetName(v string) { + o.Name = &v +} + +// GetRules returns the Rules field value if set, zero value otherwise. +func (o *WafRuleset) GetRules() []WafRulesetRulesInner { + if o == nil || IsNil(o.Rules) { + var ret []WafRulesetRulesInner + return ret + } + return o.Rules +} + +// GetRulesOk returns a tuple with the Rules field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WafRuleset) GetRulesOk() ([]WafRulesetRulesInner, bool) { + if o == nil || IsNil(o.Rules) { + return nil, false + } + return o.Rules, true +} + +// HasRules returns a boolean if a field has been set. +func (o *WafRuleset) HasRules() bool { + if o != nil && !IsNil(o.Rules) { + return true + } + + return false +} + +// SetRules gets a reference to the given []WafRulesetRulesInner and assigns it to the Rules field. +func (o *WafRuleset) SetRules(v []WafRulesetRulesInner) { + o.Rules = v +} + +func (o WafRuleset) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o WafRuleset) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Rules) { + toSerialize["rules"] = o.Rules + } + return toSerialize, nil +} + +type NullableWafRuleset struct { + value *WafRuleset + isSet bool +} + +func (v NullableWafRuleset) Get() *WafRuleset { + return v.value +} + +func (v *NullableWafRuleset) Set(val *WafRuleset) { + v.value = val + v.isSet = true +} + +func (v NullableWafRuleset) IsSet() bool { + return v.isSet +} + +func (v *NullableWafRuleset) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWafRuleset(val *WafRuleset) *NullableWafRuleset { + return &NullableWafRuleset{value: val, isSet: true} +} + +func (v NullableWafRuleset) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWafRuleset) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_waf_ruleset_rules_inner.go b/model_waf_ruleset_rules_inner.go new file mode 100644 index 0000000..879f6d1 --- /dev/null +++ b/model_waf_ruleset_rules_inner.go @@ -0,0 +1,198 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the WafRulesetRulesInner type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &WafRulesetRulesInner{} + +// WafRulesetRulesInner struct for WafRulesetRulesInner +type WafRulesetRulesInner struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Params map[string]interface{} `json:"params,omitempty"` +} + +// NewWafRulesetRulesInner instantiates a new WafRulesetRulesInner object +// This constructor will assign default values to properties that have it defined, +// 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 NewWafRulesetRulesInner() *WafRulesetRulesInner { + this := WafRulesetRulesInner{} + return &this +} + +// NewWafRulesetRulesInnerWithDefaults instantiates a new WafRulesetRulesInner object +// This 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 NewWafRulesetRulesInnerWithDefaults() *WafRulesetRulesInner { + this := WafRulesetRulesInner{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *WafRulesetRulesInner) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WafRulesetRulesInner) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *WafRulesetRulesInner) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *WafRulesetRulesInner) SetId(v string) { + o.Id = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *WafRulesetRulesInner) 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 *WafRulesetRulesInner) 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 *WafRulesetRulesInner) 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 *WafRulesetRulesInner) SetName(v string) { + o.Name = &v +} + +// GetParams returns the Params field value if set, zero value otherwise. +func (o *WafRulesetRulesInner) 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 *WafRulesetRulesInner) 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 *WafRulesetRulesInner) 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 *WafRulesetRulesInner) SetParams(v map[string]interface{}) { + o.Params = v +} + +func (o WafRulesetRulesInner) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o WafRulesetRulesInner) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Params) { + toSerialize["params"] = o.Params + } + return toSerialize, nil +} + +type NullableWafRulesetRulesInner struct { + value *WafRulesetRulesInner + isSet bool +} + +func (v NullableWafRulesetRulesInner) Get() *WafRulesetRulesInner { + return v.value +} + +func (v *NullableWafRulesetRulesInner) Set(val *WafRulesetRulesInner) { + v.value = val + v.isSet = true +} + +func (v NullableWafRulesetRulesInner) IsSet() bool { + return v.isSet +} + +func (v *NullableWafRulesetRulesInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWafRulesetRulesInner(val *WafRulesetRulesInner) *NullableWafRulesetRulesInner { + return &NullableWafRulesetRulesInner{value: val, isSet: true} +} + +func (v NullableWafRulesetRulesInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWafRulesetRulesInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_waf_rulesets.go b/model_waf_rulesets.go new file mode 100644 index 0000000..0352145 --- /dev/null +++ b/model_waf_rulesets.go @@ -0,0 +1,126 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the WafRulesets type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &WafRulesets{} + +// WafRulesets struct for WafRulesets +type WafRulesets struct { + Rulesets []WafRuleset `json:"rulesets,omitempty"` +} + +// NewWafRulesets instantiates a new WafRulesets object +// This constructor will assign default values to properties that have it defined, +// 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 NewWafRulesets() *WafRulesets { + this := WafRulesets{} + return &this +} + +// NewWafRulesetsWithDefaults instantiates a new WafRulesets object +// This 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 NewWafRulesetsWithDefaults() *WafRulesets { + this := WafRulesets{} + return &this +} + +// GetRulesets returns the Rulesets field value if set, zero value otherwise. +func (o *WafRulesets) GetRulesets() []WafRuleset { + if o == nil || IsNil(o.Rulesets) { + var ret []WafRuleset + return ret + } + return o.Rulesets +} + +// GetRulesetsOk returns a tuple with the Rulesets field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WafRulesets) GetRulesetsOk() ([]WafRuleset, bool) { + if o == nil || IsNil(o.Rulesets) { + return nil, false + } + return o.Rulesets, true +} + +// HasRulesets returns a boolean if a field has been set. +func (o *WafRulesets) HasRulesets() bool { + if o != nil && !IsNil(o.Rulesets) { + return true + } + + return false +} + +// SetRulesets gets a reference to the given []WafRuleset and assigns it to the Rulesets field. +func (o *WafRulesets) SetRulesets(v []WafRuleset) { + o.Rulesets = v +} + +func (o WafRulesets) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o WafRulesets) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Rulesets) { + toSerialize["rulesets"] = o.Rulesets + } + return toSerialize, nil +} + +type NullableWafRulesets struct { + value *WafRulesets + isSet bool +} + +func (v NullableWafRulesets) Get() *WafRulesets { + return v.value +} + +func (v *NullableWafRulesets) Set(val *WafRulesets) { + v.value = val + v.isSet = true +} + +func (v NullableWafRulesets) IsSet() bool { + return v.isSet +} + +func (v *NullableWafRulesets) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWafRulesets(val *WafRulesets) *NullableWafRulesets { + return &NullableWafRulesets{value: val, isSet: true} +} + +func (v NullableWafRulesets) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWafRulesets) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_waf_settings.go b/model_waf_settings.go new file mode 100644 index 0000000..d21dc8e --- /dev/null +++ b/model_waf_settings.go @@ -0,0 +1,195 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the WafSettings type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &WafSettings{} + +// WafSettings struct for WafSettings +type WafSettings struct { + IsEnabled *bool `json:"is_enabled,omitempty"` + Mode *string `json:"mode,omitempty"` + // Pacakges and their configurations that are used to configure WAF. + Packages []DomainWafPackage `json:"packages,omitempty"` +} + +// NewWafSettings instantiates a new WafSettings object +// This constructor will assign default values to properties that have it defined, +// 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 NewWafSettings() *WafSettings { + this := WafSettings{} + return &this +} + +// NewWafSettingsWithDefaults instantiates a new WafSettings object +// This 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 NewWafSettingsWithDefaults() *WafSettings { + this := WafSettings{} + return &this +} + +// GetIsEnabled returns the IsEnabled field value if set, zero value otherwise. +func (o *WafSettings) GetIsEnabled() bool { + if o == nil || IsNil(o.IsEnabled) { + var ret bool + return ret + } + return *o.IsEnabled +} + +// GetIsEnabledOk returns a tuple with the IsEnabled field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WafSettings) GetIsEnabledOk() (*bool, bool) { + if o == nil || IsNil(o.IsEnabled) { + return nil, false + } + return o.IsEnabled, true +} + +// HasIsEnabled returns a boolean if a field has been set. +func (o *WafSettings) HasIsEnabled() bool { + if o != nil && !IsNil(o.IsEnabled) { + return true + } + + return false +} + +// SetIsEnabled gets a reference to the given bool and assigns it to the IsEnabled field. +func (o *WafSettings) SetIsEnabled(v bool) { + o.IsEnabled = &v +} + +// GetMode returns the Mode field value if set, zero value otherwise. +func (o *WafSettings) GetMode() string { + if o == nil || IsNil(o.Mode) { + var ret string + return ret + } + return *o.Mode +} + +// GetModeOk returns a tuple with the Mode field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WafSettings) GetModeOk() (*string, bool) { + if o == nil || IsNil(o.Mode) { + return nil, false + } + return o.Mode, true +} + +// HasMode returns a boolean if a field has been set. +func (o *WafSettings) HasMode() bool { + if o != nil && !IsNil(o.Mode) { + return true + } + + return false +} + +// SetMode gets a reference to the given string and assigns it to the Mode field. +func (o *WafSettings) SetMode(v string) { + o.Mode = &v +} + +// GetPackages returns the Packages field value if set, zero value otherwise. +func (o *WafSettings) GetPackages() []DomainWafPackage { + if o == nil || IsNil(o.Packages) { + var ret []DomainWafPackage + return ret + } + return o.Packages +} + +// GetPackagesOk returns a tuple with the Packages field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WafSettings) GetPackagesOk() ([]DomainWafPackage, bool) { + if o == nil || IsNil(o.Packages) { + return nil, false + } + return o.Packages, true +} + +// HasPackages returns a boolean if a field has been set. +func (o *WafSettings) HasPackages() bool { + if o != nil && !IsNil(o.Packages) { + return true + } + + return false +} + +// SetPackages gets a reference to the given []DomainWafPackage and assigns it to the Packages field. +func (o *WafSettings) SetPackages(v []DomainWafPackage) { + o.Packages = v +} + +func (o WafSettings) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o WafSettings) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: is_enabled is readOnly + if !IsNil(o.Mode) { + toSerialize["mode"] = o.Mode + } + // skip: packages is readOnly + return toSerialize, nil +} + +type NullableWafSettings struct { + value *WafSettings + isSet bool +} + +func (v NullableWafSettings) Get() *WafSettings { + return v.value +} + +func (v *NullableWafSettings) Set(val *WafSettings) { + v.value = val + v.isSet = true +} + +func (v NullableWafSettings) IsSet() bool { + return v.isSet +} + +func (v *NullableWafSettings) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWafSettings(val *WafSettings) *NullableWafSettings { + return &NullableWafSettings{value: val, isSet: true} +} + +func (v NullableWafSettings) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWafSettings) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_waf_settings_data.go b/model_waf_settings_data.go new file mode 100644 index 0000000..34af9d3 --- /dev/null +++ b/model_waf_settings_data.go @@ -0,0 +1,126 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" +) + +// checks if the WafSettingsData type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &WafSettingsData{} + +// WafSettingsData struct for WafSettingsData +type WafSettingsData struct { + Data *WafSettings `json:"data,omitempty"` +} + +// NewWafSettingsData instantiates a new WafSettingsData object +// This constructor will assign default values to properties that have it defined, +// 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 NewWafSettingsData() *WafSettingsData { + this := WafSettingsData{} + return &this +} + +// NewWafSettingsDataWithDefaults instantiates a new WafSettingsData object +// This 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 NewWafSettingsDataWithDefaults() *WafSettingsData { + this := WafSettingsData{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *WafSettingsData) GetData() WafSettings { + if o == nil || IsNil(o.Data) { + var ret WafSettings + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WafSettingsData) GetDataOk() (*WafSettings, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *WafSettingsData) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given WafSettings and assigns it to the Data field. +func (o *WafSettingsData) SetData(v WafSettings) { + o.Data = &v +} + +func (o WafSettingsData) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o WafSettingsData) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + return toSerialize, nil +} + +type NullableWafSettingsData struct { + value *WafSettingsData + isSet bool +} + +func (v NullableWafSettingsData) Get() *WafSettingsData { + return v.value +} + +func (v *NullableWafSettingsData) Set(val *WafSettingsData) { + v.value = val + v.isSet = true +} + +func (v NullableWafSettingsData) IsSet() bool { + return v.isSet +} + +func (v *NullableWafSettingsData) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWafSettingsData(val *WafSettingsData) *NullableWafSettingsData { + return &NullableWafSettingsData{value: val, isSet: true} +} + +func (v NullableWafSettingsData) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWafSettingsData) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/response.go b/response.go new file mode 100644 index 0000000..2cdf4b3 --- /dev/null +++ b/response.go @@ -0,0 +1,47 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +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/test/api_acceleration_test.go b/test/api_acceleration_test.go new file mode 100644 index 0000000..5c463f0 --- /dev/null +++ b/test/api_acceleration_test.go @@ -0,0 +1,81 @@ +/* +ArvanCloud CDN Services + +Testing AccelerationApiService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package r1cdn + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/arvancloud/cdn-go" +) + +func Test_r1cdn_AccelerationApiService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test AccelerationApiService AccelerationIndex", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.AccelerationApi.AccelerationIndex(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AccelerationApiService AccelerationUpdate", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.AccelerationApi.AccelerationUpdate(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AccelerationApiService ImageResizeGet", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.AccelerationApi.ImageResizeGet(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AccelerationApiService ImageResizeUpdate", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.AccelerationApi.ImageResizeUpdate(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/test/api_active_health_check_test.go b/test/api_active_health_check_test.go new file mode 100644 index 0000000..ed6ddce --- /dev/null +++ b/test/api_active_health_check_test.go @@ -0,0 +1,138 @@ +/* +ArvanCloud CDN Services + +Testing ActiveHealthCheckApiService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package r1cdn + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/arvancloud/cdn-go" +) + +func Test_r1cdn_ActiveHealthCheckApiService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test ActiveHealthCheckApiService ActiveHealthCheckDestroy", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + var healthcheck string + + resp, httpRes, err := apiClient.ActiveHealthCheckApi.ActiveHealthCheckDestroy(context.Background(), domain, healthcheck).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ActiveHealthCheckApiService ActiveHealthCheckIndex", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.ActiveHealthCheckApi.ActiveHealthCheckIndex(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ActiveHealthCheckApiService ActiveHealthCheckReportsDetails", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.ActiveHealthCheckApi.ActiveHealthCheckReportsDetails(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ActiveHealthCheckApiService ActiveHealthCheckReportsSummary", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.ActiveHealthCheckApi.ActiveHealthCheckReportsSummary(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ActiveHealthCheckApiService ActiveHealthCheckShow", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + var healthcheck string + + resp, httpRes, err := apiClient.ActiveHealthCheckApi.ActiveHealthCheckShow(context.Background(), domain, healthcheck).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ActiveHealthCheckApiService ActiveHealthCheckStore", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.ActiveHealthCheckApi.ActiveHealthCheckStore(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ActiveHealthCheckApiService ActiveHealthCheckUpdate", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + var healthcheck string + + resp, httpRes, err := apiClient.ActiveHealthCheckApi.ActiveHealthCheckUpdate(context.Background(), domain, healthcheck).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ActiveHealthCheckApiService HealthChecksZonesIndex", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.ActiveHealthCheckApi.HealthChecksZonesIndex(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/test/api_caching_test.go b/test/api_caching_test.go new file mode 100644 index 0000000..4b9b1ee --- /dev/null +++ b/test/api_caching_test.go @@ -0,0 +1,109 @@ +/* +ArvanCloud CDN Services + +Testing CachingApiService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package r1cdn + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/arvancloud/cdn-go" +) + +func Test_r1cdn_CachingApiService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test CachingApiService CachingDeprecatedPurge", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.CachingApi.CachingDeprecatedPurge(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test CachingApiService CachingIndex", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.CachingApi.CachingIndex(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test CachingApiService CachingPurge", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.CachingApi.CachingPurge(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test CachingApiService CachingUpdate", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.CachingApi.CachingUpdate(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test CachingApiService PurgeTagsDestroy", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.CachingApi.PurgeTagsDestroy(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test CachingApiService PurgeTagsIndex", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.CachingApi.PurgeTagsIndex(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/test/api_cdn_apps_test.go b/test/api_cdn_apps_test.go new file mode 100644 index 0000000..40e88e8 --- /dev/null +++ b/test/api_cdn_apps_test.go @@ -0,0 +1,165 @@ +/* +ArvanCloud CDN Services + +Testing CDNAppsApiService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package r1cdn + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/arvancloud/cdn-go" +) + +func Test_r1cdn_CDNAppsApiService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test CDNAppsApiService AppsCategoryIndex", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.CDNAppsApi.AppsCategoryIndex(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test CDNAppsApiService AppsCategoryShow", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var applicationCategory string + + resp, httpRes, err := apiClient.CDNAppsApi.AppsCategoryShow(context.Background(), applicationCategory).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test CDNAppsApiService AppsIndex", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.CDNAppsApi.AppsIndex(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test CDNAppsApiService AppsLike", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var id string + + resp, httpRes, err := apiClient.CDNAppsApi.AppsLike(context.Background(), id).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test CDNAppsApiService AppsShow", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var id string + + resp, httpRes, err := apiClient.CDNAppsApi.AppsShow(context.Background(), id).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test CDNAppsApiService DomainsAppsDestroy", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + var id string + + resp, httpRes, err := apiClient.CDNAppsApi.DomainsAppsDestroy(context.Background(), domain, id).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test CDNAppsApiService DomainsAppsIndex", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.CDNAppsApi.DomainsAppsIndex(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test CDNAppsApiService DomainsAppsInstalled", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + var id string + + resp, httpRes, err := apiClient.CDNAppsApi.DomainsAppsInstalled(context.Background(), domain, id).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test CDNAppsApiService DomainsAppsStore", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + var id string + + resp, httpRes, err := apiClient.CDNAppsApi.DomainsAppsStore(context.Background(), domain, id).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test CDNAppsApiService DomainsAppsTriggerWebhook", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + var id string + + resp, httpRes, err := apiClient.CDNAppsApi.DomainsAppsTriggerWebhook(context.Background(), domain, id).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/test/api_custom_pages_test.go b/test/api_custom_pages_test.go new file mode 100644 index 0000000..0b64a47 --- /dev/null +++ b/test/api_custom_pages_test.go @@ -0,0 +1,53 @@ +/* +ArvanCloud CDN Services + +Testing CustomPagesApiService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package r1cdn + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/arvancloud/cdn-go" +) + +func Test_r1cdn_CustomPagesApiService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test CustomPagesApiService CustomPagesGet", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.CustomPagesApi.CustomPagesGet(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test CustomPagesApiService CustomPagesUpdate", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.CustomPagesApi.CustomPagesUpdate(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/test/api_ddo_s_test.go b/test/api_ddo_s_test.go new file mode 100644 index 0000000..4bc36b6 --- /dev/null +++ b/test/api_ddo_s_test.go @@ -0,0 +1,168 @@ +/* +ArvanCloud CDN Services + +Testing DDoSApiService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package r1cdn + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/arvancloud/cdn-go" +) + +func Test_r1cdn_DDoSApiService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test DDoSApiService DdosIndex", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.DDoSApi.DdosIndex(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test DDoSApiService DdosReprioritize", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.DDoSApi.DdosReprioritize(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test DDoSApiService DdosRulesDestroy", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + var id string + + resp, httpRes, err := apiClient.DDoSApi.DdosRulesDestroy(context.Background(), domain, id).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test DDoSApiService DdosRulesIndex", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.DDoSApi.DdosRulesIndex(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test DDoSApiService DdosRulesShow", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + var id string + + resp, httpRes, err := apiClient.DDoSApi.DdosRulesShow(context.Background(), domain, id).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test DDoSApiService DdosRulesStore", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.DDoSApi.DdosRulesStore(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test DDoSApiService DdosRulesUpdate", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + var id string + + resp, httpRes, err := apiClient.DDoSApi.DdosRulesUpdate(context.Background(), domain, id).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test DDoSApiService DdosSettingsIndex", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.DDoSApi.DdosSettingsIndex(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test DDoSApiService DdosSettingsUpdate", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.DDoSApi.DdosSettingsUpdate(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test DDoSApiService DdosUpdate", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.DDoSApi.DdosUpdate(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/test/api_dns_management_test.go b/test/api_dns_management_test.go new file mode 100644 index 0000000..7743c17 --- /dev/null +++ b/test/api_dns_management_test.go @@ -0,0 +1,155 @@ +/* +ArvanCloud CDN Services + +Testing DNSManagementApiService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package r1cdn + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/arvancloud/cdn-go" +) + +func Test_r1cdn_DNSManagementApiService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test DNSManagementApiService DnsRecordsCloud", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + var id string + + resp, httpRes, err := apiClient.DNSManagementApi.DnsRecordsCloud(context.Background(), domain, id).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test DNSManagementApiService DnsRecordsDestroy", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + var id string + + resp, httpRes, err := apiClient.DNSManagementApi.DnsRecordsDestroy(context.Background(), domain, id).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test DNSManagementApiService DnsRecordsDnsSecShow", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.DNSManagementApi.DnsRecordsDnsSecShow(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test DNSManagementApiService DnsRecordsDnsSecUpdate", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.DNSManagementApi.DnsRecordsDnsSecUpdate(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test DNSManagementApiService DnsRecordsImport", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.DNSManagementApi.DnsRecordsImport(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test DNSManagementApiService DnsRecordsIndex", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.DNSManagementApi.DnsRecordsIndex(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test DNSManagementApiService DnsRecordsShow", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + var id string + + resp, httpRes, err := apiClient.DNSManagementApi.DnsRecordsShow(context.Background(), domain, id).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test DNSManagementApiService DnsRecordsStore", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.DNSManagementApi.DnsRecordsStore(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test DNSManagementApiService DnsRecordsUpdate", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + var id string + + resp, httpRes, err := apiClient.DNSManagementApi.DnsRecordsUpdate(context.Background(), domain, id).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/test/api_domain_test.go b/test/api_domain_test.go new file mode 100644 index 0000000..8975210 --- /dev/null +++ b/test/api_domain_test.go @@ -0,0 +1,231 @@ +/* +ArvanCloud CDN Services + +Testing DomainApiService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package r1cdn + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/arvancloud/cdn-go" +) + +func Test_r1cdn_DomainApiService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test DomainApiService DomainsClone", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.DomainApi.DomainsClone(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test DomainApiService DomainsCnameSetupCheck", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.DomainApi.DomainsCnameSetupCheck(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test DomainApiService DomainsCnameSetupConvert", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.DomainApi.DomainsCnameSetupConvert(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test DomainApiService DomainsCnameSetupReset", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.DomainApi.DomainsCnameSetupReset(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test DomainApiService DomainsCnameSetupSet", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.DomainApi.DomainsCnameSetupSet(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test DomainApiService DomainsDestroy", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.DomainApi.DomainsDestroy(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test DomainApiService DomainsIndex", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.DomainApi.DomainsIndex(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test DomainApiService DomainsNameserversCheck", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.DomainApi.DomainsNameserversCheck(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test DomainApiService DomainsNameserversDeprecatedCheck", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.DomainApi.DomainsNameserversDeprecatedCheck(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test DomainApiService DomainsNameserversOptional", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.DomainApi.DomainsNameserversOptional(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test DomainApiService DomainsNameserversReset", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.DomainApi.DomainsNameserversReset(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test DomainApiService DomainsNameserversSet", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.DomainApi.DomainsNameserversSet(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test DomainApiService DomainsRegenerate", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.DomainApi.DomainsRegenerate(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test DomainApiService DomainsShow", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.DomainApi.DomainsShow(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test DomainApiService DomainsStore", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.DomainApi.DomainsStore(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/test/api_domain_transfer_test.go b/test/api_domain_transfer_test.go new file mode 100644 index 0000000..14678db --- /dev/null +++ b/test/api_domain_transfer_test.go @@ -0,0 +1,63 @@ +/* +ArvanCloud CDN Services + +Testing DomainTransferApiService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package r1cdn + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/arvancloud/cdn-go" +) + +func Test_r1cdn_DomainTransferApiService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test DomainTransferApiService DomainsTransferIndex", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.DomainTransferApi.DomainsTransferIndex(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test DomainTransferApiService DomainsTransferStore", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.DomainTransferApi.DomainsTransferStore(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test DomainTransferApiService DomainsTransferUpdate", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.DomainTransferApi.DomainsTransferUpdate(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/test/api_email_forwarding_test.go b/test/api_email_forwarding_test.go new file mode 100644 index 0000000..8e3b1c7 --- /dev/null +++ b/test/api_email_forwarding_test.go @@ -0,0 +1,267 @@ +/* +ArvanCloud CDN Services + +Testing EmailForwardingApiService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package r1cdn + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/arvancloud/cdn-go" +) + +func Test_r1cdn_EmailForwardingApiService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test EmailForwardingApiService EmailForwardingsActivate", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.EmailForwardingApi.EmailForwardingsActivate(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test EmailForwardingApiService EmailForwardingsAliasesDestroy", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + var emailForwardingId string + var emailForwardingAliasId string + + resp, httpRes, err := apiClient.EmailForwardingApi.EmailForwardingsAliasesDestroy(context.Background(), domain, emailForwardingId, emailForwardingAliasId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test EmailForwardingApiService EmailForwardingsAliasesIndex", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + var emailForwardingId string + + resp, httpRes, err := apiClient.EmailForwardingApi.EmailForwardingsAliasesIndex(context.Background(), domain, emailForwardingId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test EmailForwardingApiService EmailForwardingsAliasesStore", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + var emailForwardingId string + + resp, httpRes, err := apiClient.EmailForwardingApi.EmailForwardingsAliasesStore(context.Background(), domain, emailForwardingId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test EmailForwardingApiService EmailForwardingsAliasesToggleActivation", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + var emailForwardingId string + var emailForwardingAliasId string + + resp, httpRes, err := apiClient.EmailForwardingApi.EmailForwardingsAliasesToggleActivation(context.Background(), domain, emailForwardingId, emailForwardingAliasId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test EmailForwardingApiService EmailForwardingsAliasesUpdateRecipients", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + var emailForwardingId string + var emailForwardingAliasId string + + resp, httpRes, err := apiClient.EmailForwardingApi.EmailForwardingsAliasesUpdateRecipients(context.Background(), domain, emailForwardingId, emailForwardingAliasId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test EmailForwardingApiService EmailForwardingsCatchAllActivate", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.EmailForwardingApi.EmailForwardingsCatchAllActivate(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test EmailForwardingApiService EmailForwardingsCatchAllDeactivate", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.EmailForwardingApi.EmailForwardingsCatchAllDeactivate(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test EmailForwardingApiService EmailForwardingsDeactivate", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.EmailForwardingApi.EmailForwardingsDeactivate(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test EmailForwardingApiService EmailForwardingsRecipientsDestroy", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + var emailForwardingId string + var emailForwardingRecipientId string + + resp, httpRes, err := apiClient.EmailForwardingApi.EmailForwardingsRecipientsDestroy(context.Background(), domain, emailForwardingId, emailForwardingRecipientId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test EmailForwardingApiService EmailForwardingsRecipientsIndex", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + var emailForwardingId string + + resp, httpRes, err := apiClient.EmailForwardingApi.EmailForwardingsRecipientsIndex(context.Background(), domain, emailForwardingId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test EmailForwardingApiService EmailForwardingsRecipientsResendVerification", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + var emailForwardingId string + var emailForwardingRecipientId string + + resp, httpRes, err := apiClient.EmailForwardingApi.EmailForwardingsRecipientsResendVerification(context.Background(), domain, emailForwardingId, emailForwardingRecipientId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test EmailForwardingApiService EmailForwardingsRecipientsSetDefault", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + var emailForwardingId string + var emailForwardingRecipientId string + + resp, httpRes, err := apiClient.EmailForwardingApi.EmailForwardingsRecipientsSetDefault(context.Background(), domain, emailForwardingId, emailForwardingRecipientId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test EmailForwardingApiService EmailForwardingsRecipientsStore", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + var emailForwardingId string + + resp, httpRes, err := apiClient.EmailForwardingApi.EmailForwardingsRecipientsStore(context.Background(), domain, emailForwardingId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test EmailForwardingApiService EmailForwardingsRecipientsVerify", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + var emailForwardingId string + var emailForwardingRecipientId string + + resp, httpRes, err := apiClient.EmailForwardingApi.EmailForwardingsRecipientsVerify(context.Background(), domain, emailForwardingId, emailForwardingRecipientId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test EmailForwardingApiService EmailForwardingsStats", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.EmailForwardingApi.EmailForwardingsStats(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/test/api_firewall_test.go b/test/api_firewall_test.go new file mode 100644 index 0000000..1e37504 --- /dev/null +++ b/test/api_firewall_test.go @@ -0,0 +1,168 @@ +/* +ArvanCloud CDN Services + +Testing FirewallApiService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package r1cdn + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/arvancloud/cdn-go" +) + +func Test_r1cdn_FirewallApiService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test FirewallApiService FirewallIndex", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.FirewallApi.FirewallIndex(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test FirewallApiService FirewallReprioritize", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.FirewallApi.FirewallReprioritize(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test FirewallApiService FirewallRulesDestroy", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + var id string + + resp, httpRes, err := apiClient.FirewallApi.FirewallRulesDestroy(context.Background(), domain, id).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test FirewallApiService FirewallRulesIndex", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.FirewallApi.FirewallRulesIndex(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test FirewallApiService FirewallRulesShow", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + var id string + + resp, httpRes, err := apiClient.FirewallApi.FirewallRulesShow(context.Background(), domain, id).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test FirewallApiService FirewallRulesStore", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.FirewallApi.FirewallRulesStore(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test FirewallApiService FirewallRulesUpdate", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + var id string + + resp, httpRes, err := apiClient.FirewallApi.FirewallRulesUpdate(context.Background(), domain, id).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test FirewallApiService FirewallSettingsIndex", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.FirewallApi.FirewallSettingsIndex(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test FirewallApiService FirewallSettingsUpdate", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.FirewallApi.FirewallSettingsUpdate(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test FirewallApiService FirewallUpdate", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.FirewallApi.FirewallUpdate(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/test/api_list_test.go b/test/api_list_test.go new file mode 100644 index 0000000..b229528 --- /dev/null +++ b/test/api_list_test.go @@ -0,0 +1,91 @@ +/* +ArvanCloud CDN Services + +Testing ListApiService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package r1cdn + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/arvancloud/cdn-go" +) + +func Test_r1cdn_ListApiService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test ListApiService ListsDestroy", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var id string + + resp, httpRes, err := apiClient.ListApi.ListsDestroy(context.Background(), id).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ListApiService ListsIndex", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.ListApi.ListsIndex(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ListApiService ListsShow", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var id string + + resp, httpRes, err := apiClient.ListApi.ListsShow(context.Background(), id).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ListApiService ListsStore", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.ListApi.ListsStore(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ListApiService ListsUpdate", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var id string + + resp, httpRes, err := apiClient.ListApi.ListsUpdate(context.Background(), id).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/test/api_load_balancing_test.go b/test/api_load_balancing_test.go new file mode 100644 index 0000000..6594585 --- /dev/null +++ b/test/api_load_balancing_test.go @@ -0,0 +1,330 @@ +/* +ArvanCloud CDN Services + +Testing LoadBalancingApiService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package r1cdn + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/arvancloud/cdn-go" +) + +func Test_r1cdn_LoadBalancingApiService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test LoadBalancingApiService LoadBalancersDestroy", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + var loadBalancerId string + + resp, httpRes, err := apiClient.LoadBalancingApi.LoadBalancersDestroy(context.Background(), domain, loadBalancerId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test LoadBalancingApiService LoadBalancersIndex", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.LoadBalancingApi.LoadBalancersIndex(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test LoadBalancingApiService LoadBalancersPoolsDestroy", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + var loadBalancerId string + var loadBalancerPoolId string + + resp, httpRes, err := apiClient.LoadBalancingApi.LoadBalancersPoolsDestroy(context.Background(), domain, loadBalancerId, loadBalancerPoolId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test LoadBalancingApiService LoadBalancersPoolsIndex", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + var loadBalancerId string + + resp, httpRes, err := apiClient.LoadBalancingApi.LoadBalancersPoolsIndex(context.Background(), domain, loadBalancerId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test LoadBalancingApiService LoadBalancersPoolsOriginsDestroy", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + var loadBalancerId string + var loadBalancerPoolId string + var loadBalancerPoolOriginId string + + resp, httpRes, err := apiClient.LoadBalancingApi.LoadBalancersPoolsOriginsDestroy(context.Background(), domain, loadBalancerId, loadBalancerPoolId, loadBalancerPoolOriginId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test LoadBalancingApiService LoadBalancersPoolsOriginsIndex", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + var loadBalancerId string + var loadBalancerPoolId string + + resp, httpRes, err := apiClient.LoadBalancingApi.LoadBalancersPoolsOriginsIndex(context.Background(), domain, loadBalancerId, loadBalancerPoolId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test LoadBalancingApiService LoadBalancersPoolsOriginsShow", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + var loadBalancerId string + var loadBalancerPoolId string + var loadBalancerPoolOriginId string + + resp, httpRes, err := apiClient.LoadBalancingApi.LoadBalancersPoolsOriginsShow(context.Background(), domain, loadBalancerId, loadBalancerPoolId, loadBalancerPoolOriginId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test LoadBalancingApiService LoadBalancersPoolsOriginsStore", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + var loadBalancerId string + var loadBalancerPoolId string + + resp, httpRes, err := apiClient.LoadBalancingApi.LoadBalancersPoolsOriginsStore(context.Background(), domain, loadBalancerId, loadBalancerPoolId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test LoadBalancingApiService LoadBalancersPoolsOriginsUpdate", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + var loadBalancerId string + var loadBalancerPoolId string + var loadBalancerPoolOriginId string + + resp, httpRes, err := apiClient.LoadBalancingApi.LoadBalancersPoolsOriginsUpdate(context.Background(), domain, loadBalancerId, loadBalancerPoolId, loadBalancerPoolOriginId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test LoadBalancingApiService LoadBalancersPoolsShow", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + var loadBalancerId string + var loadBalancerPoolId string + + resp, httpRes, err := apiClient.LoadBalancingApi.LoadBalancersPoolsShow(context.Background(), domain, loadBalancerId, loadBalancerPoolId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test LoadBalancingApiService LoadBalancersPoolsStore", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + var loadBalancerId string + + resp, httpRes, err := apiClient.LoadBalancingApi.LoadBalancersPoolsStore(context.Background(), domain, loadBalancerId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test LoadBalancingApiService LoadBalancersPoolsUpdate", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + var loadBalancerId string + var loadBalancerPoolId string + + resp, httpRes, err := apiClient.LoadBalancingApi.LoadBalancersPoolsUpdate(context.Background(), domain, loadBalancerId, loadBalancerPoolId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test LoadBalancingApiService LoadBalancersPoolsUpdatePool", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + var loadBalancerId string + var loadBalancerPoolId string + + resp, httpRes, err := apiClient.LoadBalancingApi.LoadBalancersPoolsUpdatePool(context.Background(), domain, loadBalancerId, loadBalancerPoolId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test LoadBalancingApiService LoadBalancersPrioritizePool", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + var loadBalancerId string + + resp, httpRes, err := apiClient.LoadBalancingApi.LoadBalancersPrioritizePool(context.Background(), domain, loadBalancerId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test LoadBalancingApiService LoadBalancersRegionsIndex", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.LoadBalancingApi.LoadBalancersRegionsIndex(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test LoadBalancingApiService LoadBalancersSettingsShow", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.LoadBalancingApi.LoadBalancersSettingsShow(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test LoadBalancingApiService LoadBalancersSettingsUpdate", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.LoadBalancingApi.LoadBalancersSettingsUpdate(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test LoadBalancingApiService LoadBalancersShow", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + var loadBalancerId string + + resp, httpRes, err := apiClient.LoadBalancingApi.LoadBalancersShow(context.Background(), domain, loadBalancerId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test LoadBalancingApiService LoadBalancersStore", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.LoadBalancingApi.LoadBalancersStore(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test LoadBalancingApiService LoadBalancersUpdate", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + var loadBalancerId string + + resp, httpRes, err := apiClient.LoadBalancingApi.LoadBalancersUpdate(context.Background(), domain, loadBalancerId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/test/api_log_forwarders_test.go b/test/api_log_forwarders_test.go new file mode 100644 index 0000000..978e97a --- /dev/null +++ b/test/api_log_forwarders_test.go @@ -0,0 +1,113 @@ +/* +ArvanCloud CDN Services + +Testing LogForwardersApiService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package r1cdn + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/arvancloud/cdn-go" +) + +func Test_r1cdn_LogForwardersApiService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test LogForwardersApiService LogForwardersDestroy", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + var logForwarderId string + + resp, httpRes, err := apiClient.LogForwardersApi.LogForwardersDestroy(context.Background(), domain, logForwarderId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test LogForwardersApiService LogForwardersIndex", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.LogForwardersApi.LogForwardersIndex(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test LogForwardersApiService LogForwardersShow", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + var logForwarderId string + + resp, httpRes, err := apiClient.LogForwardersApi.LogForwardersShow(context.Background(), domain, logForwarderId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test LogForwardersApiService LogForwardersStore", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.LogForwardersApi.LogForwardersStore(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test LogForwardersApiService LogForwardersUpdate", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + var logForwarderId string + + resp, httpRes, err := apiClient.LogForwardersApi.LogForwardersUpdate(context.Background(), domain, logForwarderId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test LogForwardersApiService LogForwardersUpdateStatus", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + var logForwarderId string + + resp, httpRes, err := apiClient.LogForwardersApi.LogForwardersUpdateStatus(context.Background(), domain, logForwarderId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/test/api_page_rule_test.go b/test/api_page_rule_test.go new file mode 100644 index 0000000..f87a9c5 --- /dev/null +++ b/test/api_page_rule_test.go @@ -0,0 +1,158 @@ +/* +ArvanCloud CDN Services + +Testing PageRuleApiService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package r1cdn + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/arvancloud/cdn-go" +) + +func Test_r1cdn_PageRuleApiService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test PageRuleApiService PageRulesDestroy", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + var id string + + resp, httpRes, err := apiClient.PageRuleApi.PageRulesDestroy(context.Background(), domain, id).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test PageRuleApiService PageRulesDiffShow", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + var id string + + resp, httpRes, err := apiClient.PageRuleApi.PageRulesDiffShow(context.Background(), domain, id).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test PageRuleApiService PageRulesDiffUpdate", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + var id string + + resp, httpRes, err := apiClient.PageRuleApi.PageRulesDiffUpdate(context.Background(), domain, id).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test PageRuleApiService PageRulesIndex", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.PageRuleApi.PageRulesIndex(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test PageRuleApiService PageRulesPurge", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + var id string + + resp, httpRes, err := apiClient.PageRuleApi.PageRulesPurge(context.Background(), domain, id).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test PageRuleApiService PageRulesShow", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + var id string + + resp, httpRes, err := apiClient.PageRuleApi.PageRulesShow(context.Background(), domain, id).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test PageRuleApiService PageRulesStatusUpdate", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + var id string + + resp, httpRes, err := apiClient.PageRuleApi.PageRulesStatusUpdate(context.Background(), domain, id).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test PageRuleApiService PageRulesStore", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.PageRuleApi.PageRulesStore(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test PageRuleApiService PageRulesUpdate", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + var id string + + resp, httpRes, err := apiClient.PageRuleApi.PageRulesUpdate(context.Background(), domain, id).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/test/api_plan_test.go b/test/api_plan_test.go new file mode 100644 index 0000000..42b030a --- /dev/null +++ b/test/api_plan_test.go @@ -0,0 +1,93 @@ +/* +ArvanCloud CDN Services + +Testing PlanApiService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package r1cdn + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/arvancloud/cdn-go" +) + +func Test_r1cdn_PlanApiService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test PlanApiService DomainsPlans", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.PlanApi.DomainsPlans(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test PlanApiService DomainsPlansUpdate", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.PlanApi.DomainsPlansUpdate(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test PlanApiService DomainsPlansUsages", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.PlanApi.DomainsPlansUsages(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test PlanApiService DomainsPlansViolations", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.PlanApi.DomainsPlansViolations(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test PlanApiService PlansIndex", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.PlanApi.PlansIndex(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/test/api_rate_limiting_test.go b/test/api_rate_limiting_test.go new file mode 100644 index 0000000..63c13b6 --- /dev/null +++ b/test/api_rate_limiting_test.go @@ -0,0 +1,168 @@ +/* +ArvanCloud CDN Services + +Testing RateLimitingApiService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package r1cdn + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/arvancloud/cdn-go" +) + +func Test_r1cdn_RateLimitingApiService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test RateLimitingApiService RateLimitingIndex", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.RateLimitingApi.RateLimitingIndex(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test RateLimitingApiService RateLimitingReprioritize", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.RateLimitingApi.RateLimitingReprioritize(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test RateLimitingApiService RateLimitingRulesDestroy", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + var id string + + resp, httpRes, err := apiClient.RateLimitingApi.RateLimitingRulesDestroy(context.Background(), domain, id).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test RateLimitingApiService RateLimitingRulesIndex", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.RateLimitingApi.RateLimitingRulesIndex(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test RateLimitingApiService RateLimitingRulesShow", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + var id string + + resp, httpRes, err := apiClient.RateLimitingApi.RateLimitingRulesShow(context.Background(), domain, id).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test RateLimitingApiService RateLimitingRulesStore", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.RateLimitingApi.RateLimitingRulesStore(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test RateLimitingApiService RateLimitingRulesUpdate", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + var id string + + resp, httpRes, err := apiClient.RateLimitingApi.RateLimitingRulesUpdate(context.Background(), domain, id).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test RateLimitingApiService RateLimitingSettingsIndex", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.RateLimitingApi.RateLimitingSettingsIndex(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test RateLimitingApiService RateLimitingSettingsUpdate", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.RateLimitingApi.RateLimitingSettingsUpdate(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test RateLimitingApiService RateLimitingUpdate", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.RateLimitingApi.RateLimitingUpdate(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/test/api_redirect_test.go b/test/api_redirect_test.go new file mode 100644 index 0000000..a78d878 --- /dev/null +++ b/test/api_redirect_test.go @@ -0,0 +1,53 @@ +/* +ArvanCloud CDN Services + +Testing RedirectApiService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package r1cdn + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/arvancloud/cdn-go" +) + +func Test_r1cdn_RedirectApiService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test RedirectApiService RedirectShow", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.RedirectApi.RedirectShow(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test RedirectApiService RedirectUpdate", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.RedirectApi.RedirectUpdate(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/test/api_reports_test.go b/test/api_reports_test.go new file mode 100644 index 0000000..d00e8dc --- /dev/null +++ b/test/api_reports_test.go @@ -0,0 +1,301 @@ +/* +ArvanCloud CDN Services + +Testing ReportsApiService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package r1cdn + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/arvancloud/cdn-go" +) + +func Test_r1cdn_ReportsApiService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test ReportsApiService BulkReportsTrafficsTotal", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.ReportsApi.BulkReportsTrafficsTotal(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ReportsApiService BulkReportsVisitorsTotal", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.ReportsApi.BulkReportsVisitorsTotal(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ReportsApiService ReportsAttacksAttackers", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.ReportsApi.ReportsAttacksAttackers(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ReportsApiService ReportsAttacksIndex", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.ReportsApi.ReportsAttacksIndex(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ReportsApiService ReportsAttacksMap", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.ReportsApi.ReportsAttacksMap(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ReportsApiService ReportsAttacksShow", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.ReportsApi.ReportsAttacksShow(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ReportsApiService ReportsAttacksUri", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.ReportsApi.ReportsAttacksUri(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ReportsApiService ReportsDnsGeo", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.ReportsApi.ReportsDnsGeo(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ReportsApiService ReportsDnsRequests", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.ReportsApi.ReportsDnsRequests(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ReportsApiService ReportsErrorLogDetails", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.ReportsApi.ReportsErrorLogDetails(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ReportsApiService ReportsErrorLogs", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.ReportsApi.ReportsErrorLogs(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ReportsApiService ReportsErrorLogsChart", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.ReportsApi.ReportsErrorLogsChart(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ReportsApiService ReportsResponseTimeIndex", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.ReportsApi.ReportsResponseTimeIndex(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ReportsApiService ReportsStatusIndex", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.ReportsApi.ReportsStatusIndex(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ReportsApiService ReportsStatusSummary", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.ReportsApi.ReportsStatusSummary(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ReportsApiService ReportsTrafficsMap", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.ReportsApi.ReportsTrafficsMap(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ReportsApiService ReportsTrafficsSaved", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.ReportsApi.ReportsTrafficsSaved(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ReportsApiService ReportsTrafficsTotal", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.ReportsApi.ReportsTrafficsTotal(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ReportsApiService ReportsVisitorsHighRequestIps", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.ReportsApi.ReportsVisitorsHighRequestIps(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ReportsApiService ReportsVisitorsIndex", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.ReportsApi.ReportsVisitorsIndex(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/test/api_ssltls_test.go b/test/api_ssltls_test.go new file mode 100644 index 0000000..8fddb4b --- /dev/null +++ b/test/api_ssltls_test.go @@ -0,0 +1,110 @@ +/* +ArvanCloud CDN Services + +Testing SSLTLSApiService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package r1cdn + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/arvancloud/cdn-go" +) + +func Test_r1cdn_SSLTLSApiService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test SSLTLSApiService SslCertDestroy", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + var id string + + resp, httpRes, err := apiClient.SSLTLSApi.SslCertDestroy(context.Background(), domain, id).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test SSLTLSApiService SslCertOrderIndex", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.SSLTLSApi.SslCertOrderIndex(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test SSLTLSApiService SslCertOrderRetry", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.SSLTLSApi.SslCertOrderRetry(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test SSLTLSApiService SslCertStore", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.SSLTLSApi.SslCertStore(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test SSLTLSApiService SslIndex", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.SSLTLSApi.SslIndex(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test SSLTLSApiService SslUpdate", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.SSLTLSApi.SslUpdate(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/test/api_transport_layer_proxy_test.go b/test/api_transport_layer_proxy_test.go new file mode 100644 index 0000000..85b4637 --- /dev/null +++ b/test/api_transport_layer_proxy_test.go @@ -0,0 +1,98 @@ +/* +ArvanCloud CDN Services + +Testing TransportLayerProxyApiService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package r1cdn + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/arvancloud/cdn-go" +) + +func Test_r1cdn_TransportLayerProxyApiService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test TransportLayerProxyApiService TransportLayerProxiesDestroy", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + var transportLayerProxyId string + + resp, httpRes, err := apiClient.TransportLayerProxyApi.TransportLayerProxiesDestroy(context.Background(), domain, transportLayerProxyId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test TransportLayerProxyApiService TransportLayerProxiesIndex", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.TransportLayerProxyApi.TransportLayerProxiesIndex(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test TransportLayerProxyApiService TransportLayerProxiesShow", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + var transportLayerProxyId string + + resp, httpRes, err := apiClient.TransportLayerProxyApi.TransportLayerProxiesShow(context.Background(), domain, transportLayerProxyId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test TransportLayerProxyApiService TransportLayerProxiesStore", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.TransportLayerProxyApi.TransportLayerProxiesStore(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test TransportLayerProxyApiService TransportLayerProxiesUpdate", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + var transportLayerProxyId string + + resp, httpRes, err := apiClient.TransportLayerProxyApi.TransportLayerProxiesUpdate(context.Background(), domain, transportLayerProxyId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/test/api_troubleshoot_test.go b/test/api_troubleshoot_test.go new file mode 100644 index 0000000..a4cc1d2 --- /dev/null +++ b/test/api_troubleshoot_test.go @@ -0,0 +1,67 @@ +/* +ArvanCloud CDN Services + +Testing TroubleshootApiService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package r1cdn + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/arvancloud/cdn-go" +) + +func Test_r1cdn_TroubleshootApiService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test TroubleshootApiService TroubleshootsIndex", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.TroubleshootApi.TroubleshootsIndex(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test TroubleshootApiService TroubleshootsLatest", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.TroubleshootApi.TroubleshootsLatest(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test TroubleshootApiService TroubleshootsStore", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.TroubleshootApi.TroubleshootsStore(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/test/api_waf_test.go b/test/api_waf_test.go new file mode 100644 index 0000000..7d45a0c --- /dev/null +++ b/test/api_waf_test.go @@ -0,0 +1,295 @@ +/* +ArvanCloud CDN Services + +Testing WAFApiService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package r1cdn + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/arvancloud/cdn-go" +) + +func Test_r1cdn_WAFApiService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test WAFApiService GlobalWafIndex", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.WAFApi.GlobalWafIndex(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test WAFApiService GlobalWafShowPackage", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var packageId string + + resp, httpRes, err := apiClient.WAFApi.GlobalWafShowPackage(context.Background(), packageId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test WAFApiService WafIndex", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.WAFApi.WafIndex(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test WAFApiService WafPackageReprioritize", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.WAFApi.WafPackageReprioritize(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test WAFApiService WafPackagesDestroy", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + var id string + + resp, httpRes, err := apiClient.WAFApi.WafPackagesDestroy(context.Background(), domain, id).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test WAFApiService WafPackagesIndex", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.WAFApi.WafPackagesIndex(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test WAFApiService WafPackagesShow", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + var id string + + resp, httpRes, err := apiClient.WAFApi.WafPackagesShow(context.Background(), domain, id).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test WAFApiService WafPackagesStore", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.WAFApi.WafPackagesStore(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test WAFApiService WafPackagesUpdate", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + var id string + + resp, httpRes, err := apiClient.WAFApi.WafPackagesUpdate(context.Background(), domain, id).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test WAFApiService WafReconfigure", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.WAFApi.WafReconfigure(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test WAFApiService WafReprioritize", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.WAFApi.WafReprioritize(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test WAFApiService WafRulesDestroy", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + var id string + + resp, httpRes, err := apiClient.WAFApi.WafRulesDestroy(context.Background(), domain, id).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test WAFApiService WafRulesIndex", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.WAFApi.WafRulesIndex(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test WAFApiService WafRulesShow", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + var id string + + resp, httpRes, err := apiClient.WAFApi.WafRulesShow(context.Background(), domain, id).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test WAFApiService WafRulesStore", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.WAFApi.WafRulesStore(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test WAFApiService WafRulesUpdate", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + var id string + + resp, httpRes, err := apiClient.WAFApi.WafRulesUpdate(context.Background(), domain, id).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test WAFApiService WafSettingsIndex", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.WAFApi.WafSettingsIndex(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test WAFApiService WafSettingsUpdate", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.WAFApi.WafSettingsUpdate(context.Background(), domain).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test WAFApiService WafUpdate", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var domain string + + resp, httpRes, err := apiClient.WAFApi.WafUpdate(context.Background(), domain).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..753f225 --- /dev/null +++ b/utils.go @@ -0,0 +1,347 @@ +/* +ArvanCloud CDN Services + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 4.99.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package r1cdn + +import ( + "encoding/json" + "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 v.value.MarshalJSON() +} + +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) +}