diff --git a/CHANGELOG.md b/CHANGELOG.md index 813014b..8166b5c 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,16 @@ # Changelog +## [v1.0.0-beta.22](https://github.com/fastly/fastly-go/releases/tag/v1.0.0-beta.22) (2023-10-24) + +**Enhancements:** + +- feat(stats): add historical DDoS metrics. +- feat(stats): add bot challenges. + +**Bug fixes:** + +- fix(snippets): ensure POST response's dynamic field is numerical. + ## [v1.0.0-beta.21](https://github.com/fastly/fastly-go/releases/tag/v1.0.0-beta.21) (2023-09-01) **Enhancements:** diff --git a/README.md b/README.md index ecdeaa1..f1f960f 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ Add the following to your project's `go.mod`: ```go.mod require ( - github.com/fastly/fastly-go v1.0.0-beta.21 + github.com/fastly/fastly-go v1.0.0-beta.22 ) ``` @@ -226,10 +226,10 @@ Class | Method | HTTP request | Description *InvitationsAPI* | [**CreateInvitation**](docs/InvitationsAPI.md#createinvitation) | **POST** `/invitations` | Create an invitation *InvitationsAPI* | [**DeleteInvitation**](docs/InvitationsAPI.md#deleteinvitation) | **DELETE** `/invitations/{invitation_id}` | Delete an invitation *InvitationsAPI* | [**ListInvitations**](docs/InvitationsAPI.md#listinvitations) | **GET** `/invitations` | List invitations -*KvStoreAPI* | [**CreateStore**](docs/KvStoreAPI.md#createstore) | **POST** `/resources/stores/kv` | Create an kv store. -*KvStoreAPI* | [**DeleteStore**](docs/KvStoreAPI.md#deletestore) | **DELETE** `/resources/stores/kv/{store_id}` | Delete an kv store. -*KvStoreAPI* | [**GetStore**](docs/KvStoreAPI.md#getstore) | **GET** `/resources/stores/kv/{store_id}` | Describe an kv store. -*KvStoreAPI* | [**GetStores**](docs/KvStoreAPI.md#getstores) | **GET** `/resources/stores/kv` | List kv stores. +*KvStoreAPI* | [**CreateStore**](docs/KvStoreAPI.md#createstore) | **POST** `/resources/stores/kv` | Create a KV store. +*KvStoreAPI* | [**DeleteStore**](docs/KvStoreAPI.md#deletestore) | **DELETE** `/resources/stores/kv/{store_id}` | Delete a KV store. +*KvStoreAPI* | [**GetStore**](docs/KvStoreAPI.md#getstore) | **GET** `/resources/stores/kv/{store_id}` | Describe a KV store. +*KvStoreAPI* | [**GetStores**](docs/KvStoreAPI.md#getstores) | **GET** `/resources/stores/kv` | List KV stores. *KvStoreItemAPI* | [**DeleteKeyFromStore**](docs/KvStoreItemAPI.md#deletekeyfromstore) | **DELETE** `/resources/stores/kv/{store_id}/keys/{key_name}` | Delete kv store item. *KvStoreItemAPI* | [**GetKeys**](docs/KvStoreItemAPI.md#getkeys) | **GET** `/resources/stores/kv/{store_id}/keys` | List kv store keys. *KvStoreItemAPI* | [**GetValueForKey**](docs/KvStoreItemAPI.md#getvalueforkey) | **GET** `/resources/stores/kv/{store_id}/keys/{key_name}` | Get the value of an kv store item @@ -587,6 +587,7 @@ Class | Method | HTTP request | Description *WafRulesAPI* | [**GetWafRule**](docs/WafRulesAPI.md#getwafrule) | **GET** `/waf/rules/{waf_rule_id}` | Get a rule *WafRulesAPI* | [**ListWafRules**](docs/WafRulesAPI.md#listwafrules) | **GET** `/waf/rules` | List available WAF rules *WafTagsAPI* | [**ListWafTags**](docs/WafTagsAPI.md#listwaftags) | **GET** `/waf/tags` | List tags +*WholePlatformDdosHistoricalAPI* | [**GetPlatformDdosHistorical**](docs/WholePlatformDdosHistoricalAPI.md#getplatformddoshistorical) | **GET** `/metrics/platform/ddos` | Get historical DDoS metrics for the entire Fastly platform ## Documentation for Utility Methods diff --git a/docs/HistoricalDdos.md b/docs/HistoricalDdos.md new file mode 100644 index 0000000..8452c02 --- /dev/null +++ b/docs/HistoricalDdos.md @@ -0,0 +1,142 @@ +# HistoricalDdos + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Status** | Pointer to **string** | Whether or not we were able to successfully execute the query. | [optional] +**Meta** | Pointer to [**HistoricalDdosMeta**](HistoricalDdosMeta.md) | | [optional] +**Msg** | Pointer to **NullableString** | If the query was not successful, this will provide a string that explains why. | [optional] +**Data** | Pointer to [**[]PlatformDdosDataItems**](PlatformDdosDataItems.md) | A list of [entries](#entry-data-model). | [optional] + +## Methods + +### NewHistoricalDdos + +`func NewHistoricalDdos() *HistoricalDdos` + +NewHistoricalDdos instantiates a new HistoricalDdos object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewHistoricalDdosWithDefaults + +`func NewHistoricalDdosWithDefaults() *HistoricalDdos` + +NewHistoricalDdosWithDefaults instantiates a new HistoricalDdos object +This 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 *HistoricalDdos) GetStatus() string` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *HistoricalDdos) 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 *HistoricalDdos) SetStatus(v string)` + +SetStatus sets Status field to given value. + +### HasStatus + +`func (o *HistoricalDdos) HasStatus() bool` + +HasStatus returns a boolean if a field has been set. + +### GetMeta + +`func (o *HistoricalDdos) GetMeta() HistoricalDdosMeta` + +GetMeta returns the Meta field if non-nil, zero value otherwise. + +### GetMetaOk + +`func (o *HistoricalDdos) GetMetaOk() (*HistoricalDdosMeta, 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 *HistoricalDdos) SetMeta(v HistoricalDdosMeta)` + +SetMeta sets Meta field to given value. + +### HasMeta + +`func (o *HistoricalDdos) HasMeta() bool` + +HasMeta returns a boolean if a field has been set. + +### GetMsg + +`func (o *HistoricalDdos) GetMsg() string` + +GetMsg returns the Msg field if non-nil, zero value otherwise. + +### GetMsgOk + +`func (o *HistoricalDdos) GetMsgOk() (*string, bool)` + +GetMsgOk returns a tuple with the Msg field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMsg + +`func (o *HistoricalDdos) SetMsg(v string)` + +SetMsg sets Msg field to given value. + +### HasMsg + +`func (o *HistoricalDdos) HasMsg() bool` + +HasMsg returns a boolean if a field has been set. + +### SetMsgNil + +`func (o *HistoricalDdos) SetMsgNil(b bool)` + + SetMsgNil sets the value for Msg to be an explicit nil + +### UnsetMsg +`func (o *HistoricalDdos) UnsetMsg()` + +UnsetMsg ensures that no value is present for Msg, not even an explicit nil +### GetData + +`func (o *HistoricalDdos) GetData() []PlatformDdosDataItems` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *HistoricalDdos) GetDataOk() (*[]PlatformDdosDataItems, 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 *HistoricalDdos) SetData(v []PlatformDdosDataItems)` + +SetData sets Data field to given value. + +### HasData + +`func (o *HistoricalDdos) HasData() bool` + +HasData returns a boolean if a field has been set. + + +[Back to API list](../README.md#documentation-for-api-endpoints) | [Back to README](../README.md) diff --git a/docs/HistoricalDdosMeta.md b/docs/HistoricalDdosMeta.md new file mode 100644 index 0000000..d378b51 --- /dev/null +++ b/docs/HistoricalDdosMeta.md @@ -0,0 +1,132 @@ +# HistoricalDdosMeta + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Start** | Pointer to **string** | Start time that was used to perform the query as an ISO-8601-formatted date and time. | [optional] +**End** | Pointer to **string** | End time that was used to perform the query as an ISO-8601-formatted date and time. | [optional] +**Downsample** | Pointer to **string** | Downsample that was used to perform the query. One of `hour` or `day`. | [optional] +**Metric** | Pointer to **string** | A comma-separated list of the metrics that were requested. | [optional] + +## Methods + +### NewHistoricalDdosMeta + +`func NewHistoricalDdosMeta() *HistoricalDdosMeta` + +NewHistoricalDdosMeta instantiates a new HistoricalDdosMeta object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewHistoricalDdosMetaWithDefaults + +`func NewHistoricalDdosMetaWithDefaults() *HistoricalDdosMeta` + +NewHistoricalDdosMetaWithDefaults instantiates a new HistoricalDdosMeta object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetStart + +`func (o *HistoricalDdosMeta) GetStart() string` + +GetStart returns the Start field if non-nil, zero value otherwise. + +### GetStartOk + +`func (o *HistoricalDdosMeta) GetStartOk() (*string, bool)` + +GetStartOk returns a tuple with the Start field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStart + +`func (o *HistoricalDdosMeta) SetStart(v string)` + +SetStart sets Start field to given value. + +### HasStart + +`func (o *HistoricalDdosMeta) HasStart() bool` + +HasStart returns a boolean if a field has been set. + +### GetEnd + +`func (o *HistoricalDdosMeta) GetEnd() string` + +GetEnd returns the End field if non-nil, zero value otherwise. + +### GetEndOk + +`func (o *HistoricalDdosMeta) GetEndOk() (*string, bool)` + +GetEndOk returns a tuple with the End field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEnd + +`func (o *HistoricalDdosMeta) SetEnd(v string)` + +SetEnd sets End field to given value. + +### HasEnd + +`func (o *HistoricalDdosMeta) HasEnd() bool` + +HasEnd returns a boolean if a field has been set. + +### GetDownsample + +`func (o *HistoricalDdosMeta) GetDownsample() string` + +GetDownsample returns the Downsample field if non-nil, zero value otherwise. + +### GetDownsampleOk + +`func (o *HistoricalDdosMeta) GetDownsampleOk() (*string, bool)` + +GetDownsampleOk returns a tuple with the Downsample field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDownsample + +`func (o *HistoricalDdosMeta) SetDownsample(v string)` + +SetDownsample sets Downsample field to given value. + +### HasDownsample + +`func (o *HistoricalDdosMeta) HasDownsample() bool` + +HasDownsample returns a boolean if a field has been set. + +### GetMetric + +`func (o *HistoricalDdosMeta) GetMetric() string` + +GetMetric returns the Metric field if non-nil, zero value otherwise. + +### GetMetricOk + +`func (o *HistoricalDdosMeta) GetMetricOk() (*string, bool)` + +GetMetricOk returns a tuple with the Metric field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMetric + +`func (o *HistoricalDdosMeta) SetMetric(v string)` + +SetMetric sets Metric field to given value. + +### HasMetric + +`func (o *HistoricalDdosMeta) HasMetric() bool` + +HasMetric returns a boolean if a field has been set. + + +[Back to API list](../README.md#documentation-for-api-endpoints) | [Back to README](../README.md) diff --git a/docs/HistoricalFieldResultsAttributes.md b/docs/HistoricalFieldResultsAttributes.md index 36202d7..23230c5 100644 --- a/docs/HistoricalFieldResultsAttributes.md +++ b/docs/HistoricalFieldResultsAttributes.md @@ -220,6 +220,15 @@ Name | Type | Description | Notes **DdosActionTarpit** | Pointer to **int32** | The number of times the tarpit action was taken. The tarpit action delays writing the response to the client. | [optional] **DdosActionClose** | Pointer to **int32** | The number of times the close action was taken. The close action aborts the connection as soon as possible. The close action takes effect either right after accept, right after the client hello, or right after the response was sent. | [optional] **DdosActionBlackhole** | Pointer to **int32** | The number of times the blackhole action was taken. The blackhole action quietly closes a TCP connection without sending a reset. The blackhole action quietly closes a TCP connection without notifying its peer (all TCP state is dropped). | [optional] +**BotChallengeStarts** | Pointer to **int32** | The number of challenge-start tokens created. | [optional] +**BotChallengeCompleteTokensPassed** | Pointer to **int32** | The number of challenge-complete tokens that passed validation. | [optional] +**BotChallengeCompleteTokensFailed** | Pointer to **int32** | The number of challenge-complete tokens that failed validation. | [optional] +**BotChallengeCompleteTokensChecked** | Pointer to **int32** | The number of challenge-complete tokens checked. | [optional] +**BotChallengeCompleteTokensDisabled** | Pointer to **int32** | The number of challenge-complete tokens not checked because the feature was disabled. | [optional] +**BotChallengeCompleteTokensIssued** | Pointer to **int32** | The number of challenge-complete tokens issued. For example, issuing a challenge-complete token after a series of CAPTCHA challenges ending in success. | [optional] +**BotChallengesIssued** | Pointer to **int32** | The number of challenges issued. For example, the issuance of a CAPTCHA challenge. | [optional] +**BotChallengesSucceeded** | Pointer to **int32** | The number of successful challenge solutions processed. For example, a correct CAPTCHA solution. | [optional] +**BotChallengesFailed** | Pointer to **int32** | The number of failed challenge solutions processed. For example, an incorrect CAPTCHA solution. | [optional] **ServiceID** | Pointer to [**ReadOnlyIDService**](ReadOnlyIDService.md) | | [optional] **StartTime** | Pointer to **int32** | | [optional] @@ -5652,6 +5661,231 @@ SetDdosActionBlackhole sets DdosActionBlackhole field to given value. HasDdosActionBlackhole returns a boolean if a field has been set. +### GetBotChallengeStarts + +`func (o *HistoricalFieldResultsAttributes) GetBotChallengeStarts() int32` + +GetBotChallengeStarts returns the BotChallengeStarts field if non-nil, zero value otherwise. + +### GetBotChallengeStartsOk + +`func (o *HistoricalFieldResultsAttributes) GetBotChallengeStartsOk() (*int32, bool)` + +GetBotChallengeStartsOk returns a tuple with the BotChallengeStarts field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBotChallengeStarts + +`func (o *HistoricalFieldResultsAttributes) SetBotChallengeStarts(v int32)` + +SetBotChallengeStarts sets BotChallengeStarts field to given value. + +### HasBotChallengeStarts + +`func (o *HistoricalFieldResultsAttributes) HasBotChallengeStarts() bool` + +HasBotChallengeStarts returns a boolean if a field has been set. + +### GetBotChallengeCompleteTokensPassed + +`func (o *HistoricalFieldResultsAttributes) GetBotChallengeCompleteTokensPassed() int32` + +GetBotChallengeCompleteTokensPassed returns the BotChallengeCompleteTokensPassed field if non-nil, zero value otherwise. + +### GetBotChallengeCompleteTokensPassedOk + +`func (o *HistoricalFieldResultsAttributes) GetBotChallengeCompleteTokensPassedOk() (*int32, bool)` + +GetBotChallengeCompleteTokensPassedOk returns a tuple with the BotChallengeCompleteTokensPassed field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBotChallengeCompleteTokensPassed + +`func (o *HistoricalFieldResultsAttributes) SetBotChallengeCompleteTokensPassed(v int32)` + +SetBotChallengeCompleteTokensPassed sets BotChallengeCompleteTokensPassed field to given value. + +### HasBotChallengeCompleteTokensPassed + +`func (o *HistoricalFieldResultsAttributes) HasBotChallengeCompleteTokensPassed() bool` + +HasBotChallengeCompleteTokensPassed returns a boolean if a field has been set. + +### GetBotChallengeCompleteTokensFailed + +`func (o *HistoricalFieldResultsAttributes) GetBotChallengeCompleteTokensFailed() int32` + +GetBotChallengeCompleteTokensFailed returns the BotChallengeCompleteTokensFailed field if non-nil, zero value otherwise. + +### GetBotChallengeCompleteTokensFailedOk + +`func (o *HistoricalFieldResultsAttributes) GetBotChallengeCompleteTokensFailedOk() (*int32, bool)` + +GetBotChallengeCompleteTokensFailedOk returns a tuple with the BotChallengeCompleteTokensFailed field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBotChallengeCompleteTokensFailed + +`func (o *HistoricalFieldResultsAttributes) SetBotChallengeCompleteTokensFailed(v int32)` + +SetBotChallengeCompleteTokensFailed sets BotChallengeCompleteTokensFailed field to given value. + +### HasBotChallengeCompleteTokensFailed + +`func (o *HistoricalFieldResultsAttributes) HasBotChallengeCompleteTokensFailed() bool` + +HasBotChallengeCompleteTokensFailed returns a boolean if a field has been set. + +### GetBotChallengeCompleteTokensChecked + +`func (o *HistoricalFieldResultsAttributes) GetBotChallengeCompleteTokensChecked() int32` + +GetBotChallengeCompleteTokensChecked returns the BotChallengeCompleteTokensChecked field if non-nil, zero value otherwise. + +### GetBotChallengeCompleteTokensCheckedOk + +`func (o *HistoricalFieldResultsAttributes) GetBotChallengeCompleteTokensCheckedOk() (*int32, bool)` + +GetBotChallengeCompleteTokensCheckedOk returns a tuple with the BotChallengeCompleteTokensChecked field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBotChallengeCompleteTokensChecked + +`func (o *HistoricalFieldResultsAttributes) SetBotChallengeCompleteTokensChecked(v int32)` + +SetBotChallengeCompleteTokensChecked sets BotChallengeCompleteTokensChecked field to given value. + +### HasBotChallengeCompleteTokensChecked + +`func (o *HistoricalFieldResultsAttributes) HasBotChallengeCompleteTokensChecked() bool` + +HasBotChallengeCompleteTokensChecked returns a boolean if a field has been set. + +### GetBotChallengeCompleteTokensDisabled + +`func (o *HistoricalFieldResultsAttributes) GetBotChallengeCompleteTokensDisabled() int32` + +GetBotChallengeCompleteTokensDisabled returns the BotChallengeCompleteTokensDisabled field if non-nil, zero value otherwise. + +### GetBotChallengeCompleteTokensDisabledOk + +`func (o *HistoricalFieldResultsAttributes) GetBotChallengeCompleteTokensDisabledOk() (*int32, bool)` + +GetBotChallengeCompleteTokensDisabledOk returns a tuple with the BotChallengeCompleteTokensDisabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBotChallengeCompleteTokensDisabled + +`func (o *HistoricalFieldResultsAttributes) SetBotChallengeCompleteTokensDisabled(v int32)` + +SetBotChallengeCompleteTokensDisabled sets BotChallengeCompleteTokensDisabled field to given value. + +### HasBotChallengeCompleteTokensDisabled + +`func (o *HistoricalFieldResultsAttributes) HasBotChallengeCompleteTokensDisabled() bool` + +HasBotChallengeCompleteTokensDisabled returns a boolean if a field has been set. + +### GetBotChallengeCompleteTokensIssued + +`func (o *HistoricalFieldResultsAttributes) GetBotChallengeCompleteTokensIssued() int32` + +GetBotChallengeCompleteTokensIssued returns the BotChallengeCompleteTokensIssued field if non-nil, zero value otherwise. + +### GetBotChallengeCompleteTokensIssuedOk + +`func (o *HistoricalFieldResultsAttributes) GetBotChallengeCompleteTokensIssuedOk() (*int32, bool)` + +GetBotChallengeCompleteTokensIssuedOk returns a tuple with the BotChallengeCompleteTokensIssued field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBotChallengeCompleteTokensIssued + +`func (o *HistoricalFieldResultsAttributes) SetBotChallengeCompleteTokensIssued(v int32)` + +SetBotChallengeCompleteTokensIssued sets BotChallengeCompleteTokensIssued field to given value. + +### HasBotChallengeCompleteTokensIssued + +`func (o *HistoricalFieldResultsAttributes) HasBotChallengeCompleteTokensIssued() bool` + +HasBotChallengeCompleteTokensIssued returns a boolean if a field has been set. + +### GetBotChallengesIssued + +`func (o *HistoricalFieldResultsAttributes) GetBotChallengesIssued() int32` + +GetBotChallengesIssued returns the BotChallengesIssued field if non-nil, zero value otherwise. + +### GetBotChallengesIssuedOk + +`func (o *HistoricalFieldResultsAttributes) GetBotChallengesIssuedOk() (*int32, bool)` + +GetBotChallengesIssuedOk returns a tuple with the BotChallengesIssued field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBotChallengesIssued + +`func (o *HistoricalFieldResultsAttributes) SetBotChallengesIssued(v int32)` + +SetBotChallengesIssued sets BotChallengesIssued field to given value. + +### HasBotChallengesIssued + +`func (o *HistoricalFieldResultsAttributes) HasBotChallengesIssued() bool` + +HasBotChallengesIssued returns a boolean if a field has been set. + +### GetBotChallengesSucceeded + +`func (o *HistoricalFieldResultsAttributes) GetBotChallengesSucceeded() int32` + +GetBotChallengesSucceeded returns the BotChallengesSucceeded field if non-nil, zero value otherwise. + +### GetBotChallengesSucceededOk + +`func (o *HistoricalFieldResultsAttributes) GetBotChallengesSucceededOk() (*int32, bool)` + +GetBotChallengesSucceededOk returns a tuple with the BotChallengesSucceeded field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBotChallengesSucceeded + +`func (o *HistoricalFieldResultsAttributes) SetBotChallengesSucceeded(v int32)` + +SetBotChallengesSucceeded sets BotChallengesSucceeded field to given value. + +### HasBotChallengesSucceeded + +`func (o *HistoricalFieldResultsAttributes) HasBotChallengesSucceeded() bool` + +HasBotChallengesSucceeded returns a boolean if a field has been set. + +### GetBotChallengesFailed + +`func (o *HistoricalFieldResultsAttributes) GetBotChallengesFailed() int32` + +GetBotChallengesFailed returns the BotChallengesFailed field if non-nil, zero value otherwise. + +### GetBotChallengesFailedOk + +`func (o *HistoricalFieldResultsAttributes) GetBotChallengesFailedOk() (*int32, bool)` + +GetBotChallengesFailedOk returns a tuple with the BotChallengesFailed field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBotChallengesFailed + +`func (o *HistoricalFieldResultsAttributes) SetBotChallengesFailed(v int32)` + +SetBotChallengesFailed sets BotChallengesFailed field to given value. + +### HasBotChallengesFailed + +`func (o *HistoricalFieldResultsAttributes) HasBotChallengesFailed() bool` + +HasBotChallengesFailed returns a boolean if a field has been set. + ### GetServiceID `func (o *HistoricalFieldResultsAttributes) GetServiceID() ReadOnlyIDService` diff --git a/docs/KvStoreAPI.md b/docs/KvStoreAPI.md index 759c629..698b6fe 100644 --- a/docs/KvStoreAPI.md +++ b/docs/KvStoreAPI.md @@ -4,16 +4,16 @@ All URIs are relative to *https://api.fastly.com* Method | HTTP request | Description ------------- | ------------- | ------------- -[**CreateStore**](KvStoreAPI.md#CreateStore) | **POST** `/resources/stores/kv` | Create an kv store. -[**DeleteStore**](KvStoreAPI.md#DeleteStore) | **DELETE** `/resources/stores/kv/{store_id}` | Delete an kv store. -[**GetStore**](KvStoreAPI.md#GetStore) | **GET** `/resources/stores/kv/{store_id}` | Describe an kv store. -[**GetStores**](KvStoreAPI.md#GetStores) | **GET** `/resources/stores/kv` | List kv stores. +[**CreateStore**](KvStoreAPI.md#CreateStore) | **POST** `/resources/stores/kv` | Create a KV store. +[**DeleteStore**](KvStoreAPI.md#DeleteStore) | **DELETE** `/resources/stores/kv/{store_id}` | Delete a KV store. +[**GetStore**](KvStoreAPI.md#GetStore) | **GET** `/resources/stores/kv/{store_id}` | Describe a KV store. +[**GetStores**](KvStoreAPI.md#GetStores) | **GET** `/resources/stores/kv` | List KV stores. ## CreateStore -Create an kv store. +Create a KV store. @@ -77,7 +77,7 @@ Name | Type | Description | Notes ## DeleteStore -Delete an kv store. +Delete a KV store. @@ -142,7 +142,7 @@ Name | Type | Description | Notes ## GetStore -Describe an kv store. +Describe a KV store. @@ -209,7 +209,7 @@ Name | Type | Description | Notes ## GetStores -List kv stores. +List KV stores. diff --git a/docs/LoggingLogentriesAPI.md b/docs/LoggingLogentriesAPI.md index bd2a3ad..a716010 100644 --- a/docs/LoggingLogentriesAPI.md +++ b/docs/LoggingLogentriesAPI.md @@ -39,7 +39,7 @@ func main() { format := "format_example" // string | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional) (default to "%h %l %u %t \"%r\" %>s %b") formatVersion := int32(56) // int32 | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional) (default to 2) port := int32(56) // int32 | The port number. (optional) (default to 20000) - token := "token_example" // string | Use token based authentication ([https://logentries.com/doc/input-token/](https://logentries.com/doc/input-token/)). (optional) + token := "token_example" // string | Use token based authentication. (optional) useTLS := openapiclient.logging_use_tls(0) // LoggingUseTLS | (optional) (default to LOGGINGUSETLS_no_tls) region := "region_example" // string | The region to which to stream logs. (optional) @@ -72,7 +72,7 @@ Other parameters are passed through a pointer to a apiCreateLogLogentriesRequest Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **name** | **string** | The name for the real-time logging configuration. | **placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | **responseCondition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | **format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [default to "%h %l %u %t \"%r\" %>s %b"] **formatVersion** | **int32** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [default to 2] **port** | **int32** | The port number. | [default to 20000] **token** | **string** | Use token based authentication ([https://logentries.com/doc/input-token/](https://logentries.com/doc/input-token/)). | **useTLS** | [**LoggingUseTLS**](LoggingUseTLS.md) | | [default to LOGGINGUSETLS_no_tls] **region** | **string** | The region to which to stream logs. | + **name** | **string** | The name for the real-time logging configuration. | **placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | **responseCondition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | **format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [default to "%h %l %u %t \"%r\" %>s %b"] **formatVersion** | **int32** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [default to 2] **port** | **int32** | The port number. | [default to 20000] **token** | **string** | Use token based authentication. | **useTLS** | [**LoggingUseTLS**](LoggingUseTLS.md) | | [default to LOGGINGUSETLS_no_tls] **region** | **string** | The region to which to stream logs. | ### Return type @@ -329,7 +329,7 @@ func main() { format := "format_example" // string | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional) (default to "%h %l %u %t \"%r\" %>s %b") formatVersion := int32(56) // int32 | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional) (default to 2) port := int32(56) // int32 | The port number. (optional) (default to 20000) - token := "token_example" // string | Use token based authentication ([https://logentries.com/doc/input-token/](https://logentries.com/doc/input-token/)). (optional) + token := "token_example" // string | Use token based authentication. (optional) useTLS := openapiclient.logging_use_tls(0) // LoggingUseTLS | (optional) (default to LOGGINGUSETLS_no_tls) region := "region_example" // string | The region to which to stream logs. (optional) @@ -363,7 +363,7 @@ Other parameters are passed through a pointer to a apiUpdateLogLogentriesRequest Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **name** | **string** | The name for the real-time logging configuration. | **placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | **responseCondition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | **format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [default to "%h %l %u %t \"%r\" %>s %b"] **formatVersion** | **int32** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [default to 2] **port** | **int32** | The port number. | [default to 20000] **token** | **string** | Use token based authentication ([https://logentries.com/doc/input-token/](https://logentries.com/doc/input-token/)). | **useTLS** | [**LoggingUseTLS**](LoggingUseTLS.md) | | [default to LOGGINGUSETLS_no_tls] **region** | **string** | The region to which to stream logs. | + **name** | **string** | The name for the real-time logging configuration. | **placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | **responseCondition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | **format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [default to "%h %l %u %t \"%r\" %>s %b"] **formatVersion** | **int32** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [default to 2] **port** | **int32** | The port number. | [default to 20000] **token** | **string** | Use token based authentication. | **useTLS** | [**LoggingUseTLS**](LoggingUseTLS.md) | | [default to LOGGINGUSETLS_no_tls] **region** | **string** | The region to which to stream logs. | ### Return type diff --git a/docs/LoggingLogentriesAdditional.md b/docs/LoggingLogentriesAdditional.md index b03966d..10934cb 100644 --- a/docs/LoggingLogentriesAdditional.md +++ b/docs/LoggingLogentriesAdditional.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Port** | Pointer to **int32** | The port number. | [optional] [default to 20000] -**Token** | Pointer to **string** | Use token based authentication ([https://logentries.com/doc/input-token/](https://logentries.com/doc/input-token/)). | [optional] +**Token** | Pointer to **string** | Use token based authentication. | [optional] **UseTLS** | Pointer to [**LoggingUseTLS**](LoggingUseTLS.md) | | [optional] [default to LOGGINGUSETLS_no_tls] **Region** | Pointer to **string** | The region to which to stream logs. | [optional] diff --git a/docs/LoggingLogentriesResponse.md b/docs/LoggingLogentriesResponse.md index ac06b1c..013bfcb 100644 --- a/docs/LoggingLogentriesResponse.md +++ b/docs/LoggingLogentriesResponse.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes **Format** | Pointer to **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [default to "%h %l %u %t \"%r\" %>s %b"] **FormatVersion** | Pointer to **string** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [default to "2"] **Port** | Pointer to **int32** | The port number. | [optional] [default to 20000] -**Token** | Pointer to **string** | Use token based authentication ([https://logentries.com/doc/input-token/](https://logentries.com/doc/input-token/)). | [optional] +**Token** | Pointer to **string** | Use token based authentication. | [optional] **UseTLS** | Pointer to [**LoggingUseTLS**](LoggingUseTLS.md) | | [optional] [default to LOGGINGUSETLS_no_tls] **Region** | Pointer to **string** | The region to which to stream logs. | [optional] **CreatedAt** | Pointer to **NullableTime** | Date and time in ISO 8601 format. | [optional] [readonly] diff --git a/docs/PlatformDdosDataItems.md b/docs/PlatformDdosDataItems.md new file mode 100644 index 0000000..2dd658f --- /dev/null +++ b/docs/PlatformDdosDataItems.md @@ -0,0 +1,54 @@ +# PlatformDdosDataItems + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Values** | Pointer to [**Values**](Values.md) | | [optional] + +## Methods + +### NewPlatformDdosDataItems + +`func NewPlatformDdosDataItems() *PlatformDdosDataItems` + +NewPlatformDdosDataItems instantiates a new PlatformDdosDataItems object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPlatformDdosDataItemsWithDefaults + +`func NewPlatformDdosDataItemsWithDefaults() *PlatformDdosDataItems` + +NewPlatformDdosDataItemsWithDefaults instantiates a new PlatformDdosDataItems object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetValues + +`func (o *PlatformDdosDataItems) GetValues() Values` + +GetValues returns the Values field if non-nil, zero value otherwise. + +### GetValuesOk + +`func (o *PlatformDdosDataItems) GetValuesOk() (*Values, 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 *PlatformDdosDataItems) SetValues(v Values)` + +SetValues sets Values field to given value. + +### HasValues + +`func (o *PlatformDdosDataItems) HasValues() bool` + +HasValues returns a boolean if a field has been set. + + +[Back to API list](../README.md#documentation-for-api-endpoints) | [Back to README](../README.md) diff --git a/docs/PlatformDdosEntry.md b/docs/PlatformDdosEntry.md new file mode 100644 index 0000000..6c23701 --- /dev/null +++ b/docs/PlatformDdosEntry.md @@ -0,0 +1,54 @@ +# PlatformDdosEntry + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Values** | Pointer to [**[]ValuesDdos**](ValuesDdos.md) | An array of values representing the metric values at each point in time. Note that this dataset is sparse: only the keys with non-zero values will be included in the record. | [optional] + +## Methods + +### NewPlatformDdosEntry + +`func NewPlatformDdosEntry() *PlatformDdosEntry` + +NewPlatformDdosEntry instantiates a new PlatformDdosEntry object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPlatformDdosEntryWithDefaults + +`func NewPlatformDdosEntryWithDefaults() *PlatformDdosEntry` + +NewPlatformDdosEntryWithDefaults instantiates a new PlatformDdosEntry object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetValues + +`func (o *PlatformDdosEntry) GetValues() []ValuesDdos` + +GetValues returns the Values field if non-nil, zero value otherwise. + +### GetValuesOk + +`func (o *PlatformDdosEntry) GetValuesOk() (*[]ValuesDdos, 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 *PlatformDdosEntry) SetValues(v []ValuesDdos)` + +SetValues sets Values field to given value. + +### HasValues + +`func (o *PlatformDdosEntry) HasValues() bool` + +HasValues returns a boolean if a field has been set. + + +[Back to API list](../README.md#documentation-for-api-endpoints) | [Back to README](../README.md) diff --git a/docs/PlatformDdosResponse.md b/docs/PlatformDdosResponse.md new file mode 100644 index 0000000..77c82d5 --- /dev/null +++ b/docs/PlatformDdosResponse.md @@ -0,0 +1,142 @@ +# PlatformDdosResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Status** | Pointer to **string** | Whether or not we were able to successfully execute the query. | [optional] +**Meta** | Pointer to [**HistoricalDdosMeta**](HistoricalDdosMeta.md) | | [optional] +**Msg** | Pointer to **NullableString** | If the query was not successful, this will provide a string that explains why. | [optional] +**Data** | Pointer to [**[]PlatformDdosEntry**](PlatformDdosEntry.md) | A list of timeseries. | [optional] + +## Methods + +### NewPlatformDdosResponse + +`func NewPlatformDdosResponse() *PlatformDdosResponse` + +NewPlatformDdosResponse instantiates a new PlatformDdosResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPlatformDdosResponseWithDefaults + +`func NewPlatformDdosResponseWithDefaults() *PlatformDdosResponse` + +NewPlatformDdosResponseWithDefaults instantiates a new PlatformDdosResponse object +This 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 *PlatformDdosResponse) GetStatus() string` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *PlatformDdosResponse) 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 *PlatformDdosResponse) SetStatus(v string)` + +SetStatus sets Status field to given value. + +### HasStatus + +`func (o *PlatformDdosResponse) HasStatus() bool` + +HasStatus returns a boolean if a field has been set. + +### GetMeta + +`func (o *PlatformDdosResponse) GetMeta() HistoricalDdosMeta` + +GetMeta returns the Meta field if non-nil, zero value otherwise. + +### GetMetaOk + +`func (o *PlatformDdosResponse) GetMetaOk() (*HistoricalDdosMeta, 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 *PlatformDdosResponse) SetMeta(v HistoricalDdosMeta)` + +SetMeta sets Meta field to given value. + +### HasMeta + +`func (o *PlatformDdosResponse) HasMeta() bool` + +HasMeta returns a boolean if a field has been set. + +### GetMsg + +`func (o *PlatformDdosResponse) GetMsg() string` + +GetMsg returns the Msg field if non-nil, zero value otherwise. + +### GetMsgOk + +`func (o *PlatformDdosResponse) GetMsgOk() (*string, bool)` + +GetMsgOk returns a tuple with the Msg field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMsg + +`func (o *PlatformDdosResponse) SetMsg(v string)` + +SetMsg sets Msg field to given value. + +### HasMsg + +`func (o *PlatformDdosResponse) HasMsg() bool` + +HasMsg returns a boolean if a field has been set. + +### SetMsgNil + +`func (o *PlatformDdosResponse) SetMsgNil(b bool)` + + SetMsgNil sets the value for Msg to be an explicit nil + +### UnsetMsg +`func (o *PlatformDdosResponse) UnsetMsg()` + +UnsetMsg ensures that no value is present for Msg, not even an explicit nil +### GetData + +`func (o *PlatformDdosResponse) GetData() []PlatformDdosEntry` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *PlatformDdosResponse) GetDataOk() (*[]PlatformDdosEntry, 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 *PlatformDdosResponse) SetData(v []PlatformDdosEntry)` + +SetData sets Data field to given value. + +### HasData + +`func (o *PlatformDdosResponse) HasData() bool` + +HasData returns a boolean if a field has been set. + + +[Back to API list](../README.md#documentation-for-api-endpoints) | [Back to README](../README.md) diff --git a/docs/PlatformDdosResponseAllOf.md b/docs/PlatformDdosResponseAllOf.md new file mode 100644 index 0000000..0ed17f3 --- /dev/null +++ b/docs/PlatformDdosResponseAllOf.md @@ -0,0 +1,54 @@ +# PlatformDdosResponseAllOf + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**[]PlatformDdosEntry**](PlatformDdosEntry.md) | A list of timeseries. | [optional] + +## Methods + +### NewPlatformDdosResponseAllOf + +`func NewPlatformDdosResponseAllOf() *PlatformDdosResponseAllOf` + +NewPlatformDdosResponseAllOf instantiates a new PlatformDdosResponseAllOf object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPlatformDdosResponseAllOfWithDefaults + +`func NewPlatformDdosResponseAllOfWithDefaults() *PlatformDdosResponseAllOf` + +NewPlatformDdosResponseAllOfWithDefaults instantiates a new PlatformDdosResponseAllOf object +This 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 *PlatformDdosResponseAllOf) GetData() []PlatformDdosEntry` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *PlatformDdosResponseAllOf) GetDataOk() (*[]PlatformDdosEntry, 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 *PlatformDdosResponseAllOf) SetData(v []PlatformDdosEntry)` + +SetData sets Data field to given value. + +### HasData + +`func (o *PlatformDdosResponseAllOf) HasData() bool` + +HasData returns a boolean if a field has been set. + + +[Back to API list](../README.md#documentation-for-api-endpoints) | [Back to README](../README.md) diff --git a/docs/RealtimeEntryAggregated.md b/docs/RealtimeEntryAggregated.md index 709c240..e37ea0e 100644 --- a/docs/RealtimeEntryAggregated.md +++ b/docs/RealtimeEntryAggregated.md @@ -222,6 +222,15 @@ Name | Type | Description | Notes **DdosActionTarpit** | Pointer to **int32** | The number of times the tarpit action was taken. The tarpit action delays writing the response to the client. | [optional] **DdosActionClose** | Pointer to **int32** | The number of times the close action was taken. The close action aborts the connection as soon as possible. The close action takes effect either right after accept, right after the client hello, or right after the response was sent. | [optional] **DdosActionBlackhole** | Pointer to **int32** | The number of times the blackhole action was taken. The blackhole action quietly closes a TCP connection without sending a reset. The blackhole action quietly closes a TCP connection without notifying its peer (all TCP state is dropped). | [optional] +**BotChallengeStarts** | Pointer to **int32** | The number of challenge-start tokens created. | [optional] +**BotChallengeCompleteTokensPassed** | Pointer to **int32** | The number of challenge-complete tokens that passed validation. | [optional] +**BotChallengeCompleteTokensFailed** | Pointer to **int32** | The number of challenge-complete tokens that failed validation. | [optional] +**BotChallengeCompleteTokensChecked** | Pointer to **int32** | The number of challenge-complete tokens checked. | [optional] +**BotChallengeCompleteTokensDisabled** | Pointer to **int32** | The number of challenge-complete tokens not checked because the feature was disabled. | [optional] +**BotChallengesIssued** | Pointer to **int32** | The number of challenges issued. For example, the issuance of a CAPTCHA challenge. | [optional] +**BotChallengesSucceeded** | Pointer to **int32** | The number of successful challenge solutions processed. For example, a correct CAPTCHA solution. | [optional] +**BotChallengesFailed** | Pointer to **int32** | The number of failed challenge solutions processed. For example, an incorrect CAPTCHA solution. | [optional] +**BotChallengeCompleteTokensIssued** | Pointer to **int32** | The number of challenge-complete tokens issued. For example, issuing a challenge-complete token after a series of CAPTCHA challenges ending in success. | [optional] ## Methods @@ -5692,5 +5701,230 @@ SetDdosActionBlackhole sets DdosActionBlackhole field to given value. HasDdosActionBlackhole returns a boolean if a field has been set. +### GetBotChallengeStarts + +`func (o *RealtimeEntryAggregated) GetBotChallengeStarts() int32` + +GetBotChallengeStarts returns the BotChallengeStarts field if non-nil, zero value otherwise. + +### GetBotChallengeStartsOk + +`func (o *RealtimeEntryAggregated) GetBotChallengeStartsOk() (*int32, bool)` + +GetBotChallengeStartsOk returns a tuple with the BotChallengeStarts field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBotChallengeStarts + +`func (o *RealtimeEntryAggregated) SetBotChallengeStarts(v int32)` + +SetBotChallengeStarts sets BotChallengeStarts field to given value. + +### HasBotChallengeStarts + +`func (o *RealtimeEntryAggregated) HasBotChallengeStarts() bool` + +HasBotChallengeStarts returns a boolean if a field has been set. + +### GetBotChallengeCompleteTokensPassed + +`func (o *RealtimeEntryAggregated) GetBotChallengeCompleteTokensPassed() int32` + +GetBotChallengeCompleteTokensPassed returns the BotChallengeCompleteTokensPassed field if non-nil, zero value otherwise. + +### GetBotChallengeCompleteTokensPassedOk + +`func (o *RealtimeEntryAggregated) GetBotChallengeCompleteTokensPassedOk() (*int32, bool)` + +GetBotChallengeCompleteTokensPassedOk returns a tuple with the BotChallengeCompleteTokensPassed field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBotChallengeCompleteTokensPassed + +`func (o *RealtimeEntryAggregated) SetBotChallengeCompleteTokensPassed(v int32)` + +SetBotChallengeCompleteTokensPassed sets BotChallengeCompleteTokensPassed field to given value. + +### HasBotChallengeCompleteTokensPassed + +`func (o *RealtimeEntryAggregated) HasBotChallengeCompleteTokensPassed() bool` + +HasBotChallengeCompleteTokensPassed returns a boolean if a field has been set. + +### GetBotChallengeCompleteTokensFailed + +`func (o *RealtimeEntryAggregated) GetBotChallengeCompleteTokensFailed() int32` + +GetBotChallengeCompleteTokensFailed returns the BotChallengeCompleteTokensFailed field if non-nil, zero value otherwise. + +### GetBotChallengeCompleteTokensFailedOk + +`func (o *RealtimeEntryAggregated) GetBotChallengeCompleteTokensFailedOk() (*int32, bool)` + +GetBotChallengeCompleteTokensFailedOk returns a tuple with the BotChallengeCompleteTokensFailed field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBotChallengeCompleteTokensFailed + +`func (o *RealtimeEntryAggregated) SetBotChallengeCompleteTokensFailed(v int32)` + +SetBotChallengeCompleteTokensFailed sets BotChallengeCompleteTokensFailed field to given value. + +### HasBotChallengeCompleteTokensFailed + +`func (o *RealtimeEntryAggregated) HasBotChallengeCompleteTokensFailed() bool` + +HasBotChallengeCompleteTokensFailed returns a boolean if a field has been set. + +### GetBotChallengeCompleteTokensChecked + +`func (o *RealtimeEntryAggregated) GetBotChallengeCompleteTokensChecked() int32` + +GetBotChallengeCompleteTokensChecked returns the BotChallengeCompleteTokensChecked field if non-nil, zero value otherwise. + +### GetBotChallengeCompleteTokensCheckedOk + +`func (o *RealtimeEntryAggregated) GetBotChallengeCompleteTokensCheckedOk() (*int32, bool)` + +GetBotChallengeCompleteTokensCheckedOk returns a tuple with the BotChallengeCompleteTokensChecked field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBotChallengeCompleteTokensChecked + +`func (o *RealtimeEntryAggregated) SetBotChallengeCompleteTokensChecked(v int32)` + +SetBotChallengeCompleteTokensChecked sets BotChallengeCompleteTokensChecked field to given value. + +### HasBotChallengeCompleteTokensChecked + +`func (o *RealtimeEntryAggregated) HasBotChallengeCompleteTokensChecked() bool` + +HasBotChallengeCompleteTokensChecked returns a boolean if a field has been set. + +### GetBotChallengeCompleteTokensDisabled + +`func (o *RealtimeEntryAggregated) GetBotChallengeCompleteTokensDisabled() int32` + +GetBotChallengeCompleteTokensDisabled returns the BotChallengeCompleteTokensDisabled field if non-nil, zero value otherwise. + +### GetBotChallengeCompleteTokensDisabledOk + +`func (o *RealtimeEntryAggregated) GetBotChallengeCompleteTokensDisabledOk() (*int32, bool)` + +GetBotChallengeCompleteTokensDisabledOk returns a tuple with the BotChallengeCompleteTokensDisabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBotChallengeCompleteTokensDisabled + +`func (o *RealtimeEntryAggregated) SetBotChallengeCompleteTokensDisabled(v int32)` + +SetBotChallengeCompleteTokensDisabled sets BotChallengeCompleteTokensDisabled field to given value. + +### HasBotChallengeCompleteTokensDisabled + +`func (o *RealtimeEntryAggregated) HasBotChallengeCompleteTokensDisabled() bool` + +HasBotChallengeCompleteTokensDisabled returns a boolean if a field has been set. + +### GetBotChallengesIssued + +`func (o *RealtimeEntryAggregated) GetBotChallengesIssued() int32` + +GetBotChallengesIssued returns the BotChallengesIssued field if non-nil, zero value otherwise. + +### GetBotChallengesIssuedOk + +`func (o *RealtimeEntryAggregated) GetBotChallengesIssuedOk() (*int32, bool)` + +GetBotChallengesIssuedOk returns a tuple with the BotChallengesIssued field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBotChallengesIssued + +`func (o *RealtimeEntryAggregated) SetBotChallengesIssued(v int32)` + +SetBotChallengesIssued sets BotChallengesIssued field to given value. + +### HasBotChallengesIssued + +`func (o *RealtimeEntryAggregated) HasBotChallengesIssued() bool` + +HasBotChallengesIssued returns a boolean if a field has been set. + +### GetBotChallengesSucceeded + +`func (o *RealtimeEntryAggregated) GetBotChallengesSucceeded() int32` + +GetBotChallengesSucceeded returns the BotChallengesSucceeded field if non-nil, zero value otherwise. + +### GetBotChallengesSucceededOk + +`func (o *RealtimeEntryAggregated) GetBotChallengesSucceededOk() (*int32, bool)` + +GetBotChallengesSucceededOk returns a tuple with the BotChallengesSucceeded field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBotChallengesSucceeded + +`func (o *RealtimeEntryAggregated) SetBotChallengesSucceeded(v int32)` + +SetBotChallengesSucceeded sets BotChallengesSucceeded field to given value. + +### HasBotChallengesSucceeded + +`func (o *RealtimeEntryAggregated) HasBotChallengesSucceeded() bool` + +HasBotChallengesSucceeded returns a boolean if a field has been set. + +### GetBotChallengesFailed + +`func (o *RealtimeEntryAggregated) GetBotChallengesFailed() int32` + +GetBotChallengesFailed returns the BotChallengesFailed field if non-nil, zero value otherwise. + +### GetBotChallengesFailedOk + +`func (o *RealtimeEntryAggregated) GetBotChallengesFailedOk() (*int32, bool)` + +GetBotChallengesFailedOk returns a tuple with the BotChallengesFailed field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBotChallengesFailed + +`func (o *RealtimeEntryAggregated) SetBotChallengesFailed(v int32)` + +SetBotChallengesFailed sets BotChallengesFailed field to given value. + +### HasBotChallengesFailed + +`func (o *RealtimeEntryAggregated) HasBotChallengesFailed() bool` + +HasBotChallengesFailed returns a boolean if a field has been set. + +### GetBotChallengeCompleteTokensIssued + +`func (o *RealtimeEntryAggregated) GetBotChallengeCompleteTokensIssued() int32` + +GetBotChallengeCompleteTokensIssued returns the BotChallengeCompleteTokensIssued field if non-nil, zero value otherwise. + +### GetBotChallengeCompleteTokensIssuedOk + +`func (o *RealtimeEntryAggregated) GetBotChallengeCompleteTokensIssuedOk() (*int32, bool)` + +GetBotChallengeCompleteTokensIssuedOk returns a tuple with the BotChallengeCompleteTokensIssued field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBotChallengeCompleteTokensIssued + +`func (o *RealtimeEntryAggregated) SetBotChallengeCompleteTokensIssued(v int32)` + +SetBotChallengeCompleteTokensIssued sets BotChallengeCompleteTokensIssued field to given value. + +### HasBotChallengeCompleteTokensIssued + +`func (o *RealtimeEntryAggregated) HasBotChallengeCompleteTokensIssued() bool` + +HasBotChallengeCompleteTokensIssued returns a boolean if a field has been set. + [Back to API list](../README.md#documentation-for-api-endpoints) | [Back to README](../README.md) diff --git a/docs/RealtimeMeasurements.md b/docs/RealtimeMeasurements.md index c8bfc97..6d732bc 100644 --- a/docs/RealtimeMeasurements.md +++ b/docs/RealtimeMeasurements.md @@ -222,6 +222,15 @@ Name | Type | Description | Notes **DdosActionTarpit** | Pointer to **int32** | The number of times the tarpit action was taken. The tarpit action delays writing the response to the client. | [optional] **DdosActionClose** | Pointer to **int32** | The number of times the close action was taken. The close action aborts the connection as soon as possible. The close action takes effect either right after accept, right after the client hello, or right after the response was sent. | [optional] **DdosActionBlackhole** | Pointer to **int32** | The number of times the blackhole action was taken. The blackhole action quietly closes a TCP connection without sending a reset. The blackhole action quietly closes a TCP connection without notifying its peer (all TCP state is dropped). | [optional] +**BotChallengeStarts** | Pointer to **int32** | The number of challenge-start tokens created. | [optional] +**BotChallengeCompleteTokensPassed** | Pointer to **int32** | The number of challenge-complete tokens that passed validation. | [optional] +**BotChallengeCompleteTokensFailed** | Pointer to **int32** | The number of challenge-complete tokens that failed validation. | [optional] +**BotChallengeCompleteTokensChecked** | Pointer to **int32** | The number of challenge-complete tokens checked. | [optional] +**BotChallengeCompleteTokensDisabled** | Pointer to **int32** | The number of challenge-complete tokens not checked because the feature was disabled. | [optional] +**BotChallengesIssued** | Pointer to **int32** | The number of challenges issued. For example, the issuance of a CAPTCHA challenge. | [optional] +**BotChallengesSucceeded** | Pointer to **int32** | The number of successful challenge solutions processed. For example, a correct CAPTCHA solution. | [optional] +**BotChallengesFailed** | Pointer to **int32** | The number of failed challenge solutions processed. For example, an incorrect CAPTCHA solution. | [optional] +**BotChallengeCompleteTokensIssued** | Pointer to **int32** | The number of challenge-complete tokens issued. For example, issuing a challenge-complete token after a series of CAPTCHA challenges ending in success. | [optional] ## Methods @@ -5692,5 +5701,230 @@ SetDdosActionBlackhole sets DdosActionBlackhole field to given value. HasDdosActionBlackhole returns a boolean if a field has been set. +### GetBotChallengeStarts + +`func (o *RealtimeMeasurements) GetBotChallengeStarts() int32` + +GetBotChallengeStarts returns the BotChallengeStarts field if non-nil, zero value otherwise. + +### GetBotChallengeStartsOk + +`func (o *RealtimeMeasurements) GetBotChallengeStartsOk() (*int32, bool)` + +GetBotChallengeStartsOk returns a tuple with the BotChallengeStarts field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBotChallengeStarts + +`func (o *RealtimeMeasurements) SetBotChallengeStarts(v int32)` + +SetBotChallengeStarts sets BotChallengeStarts field to given value. + +### HasBotChallengeStarts + +`func (o *RealtimeMeasurements) HasBotChallengeStarts() bool` + +HasBotChallengeStarts returns a boolean if a field has been set. + +### GetBotChallengeCompleteTokensPassed + +`func (o *RealtimeMeasurements) GetBotChallengeCompleteTokensPassed() int32` + +GetBotChallengeCompleteTokensPassed returns the BotChallengeCompleteTokensPassed field if non-nil, zero value otherwise. + +### GetBotChallengeCompleteTokensPassedOk + +`func (o *RealtimeMeasurements) GetBotChallengeCompleteTokensPassedOk() (*int32, bool)` + +GetBotChallengeCompleteTokensPassedOk returns a tuple with the BotChallengeCompleteTokensPassed field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBotChallengeCompleteTokensPassed + +`func (o *RealtimeMeasurements) SetBotChallengeCompleteTokensPassed(v int32)` + +SetBotChallengeCompleteTokensPassed sets BotChallengeCompleteTokensPassed field to given value. + +### HasBotChallengeCompleteTokensPassed + +`func (o *RealtimeMeasurements) HasBotChallengeCompleteTokensPassed() bool` + +HasBotChallengeCompleteTokensPassed returns a boolean if a field has been set. + +### GetBotChallengeCompleteTokensFailed + +`func (o *RealtimeMeasurements) GetBotChallengeCompleteTokensFailed() int32` + +GetBotChallengeCompleteTokensFailed returns the BotChallengeCompleteTokensFailed field if non-nil, zero value otherwise. + +### GetBotChallengeCompleteTokensFailedOk + +`func (o *RealtimeMeasurements) GetBotChallengeCompleteTokensFailedOk() (*int32, bool)` + +GetBotChallengeCompleteTokensFailedOk returns a tuple with the BotChallengeCompleteTokensFailed field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBotChallengeCompleteTokensFailed + +`func (o *RealtimeMeasurements) SetBotChallengeCompleteTokensFailed(v int32)` + +SetBotChallengeCompleteTokensFailed sets BotChallengeCompleteTokensFailed field to given value. + +### HasBotChallengeCompleteTokensFailed + +`func (o *RealtimeMeasurements) HasBotChallengeCompleteTokensFailed() bool` + +HasBotChallengeCompleteTokensFailed returns a boolean if a field has been set. + +### GetBotChallengeCompleteTokensChecked + +`func (o *RealtimeMeasurements) GetBotChallengeCompleteTokensChecked() int32` + +GetBotChallengeCompleteTokensChecked returns the BotChallengeCompleteTokensChecked field if non-nil, zero value otherwise. + +### GetBotChallengeCompleteTokensCheckedOk + +`func (o *RealtimeMeasurements) GetBotChallengeCompleteTokensCheckedOk() (*int32, bool)` + +GetBotChallengeCompleteTokensCheckedOk returns a tuple with the BotChallengeCompleteTokensChecked field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBotChallengeCompleteTokensChecked + +`func (o *RealtimeMeasurements) SetBotChallengeCompleteTokensChecked(v int32)` + +SetBotChallengeCompleteTokensChecked sets BotChallengeCompleteTokensChecked field to given value. + +### HasBotChallengeCompleteTokensChecked + +`func (o *RealtimeMeasurements) HasBotChallengeCompleteTokensChecked() bool` + +HasBotChallengeCompleteTokensChecked returns a boolean if a field has been set. + +### GetBotChallengeCompleteTokensDisabled + +`func (o *RealtimeMeasurements) GetBotChallengeCompleteTokensDisabled() int32` + +GetBotChallengeCompleteTokensDisabled returns the BotChallengeCompleteTokensDisabled field if non-nil, zero value otherwise. + +### GetBotChallengeCompleteTokensDisabledOk + +`func (o *RealtimeMeasurements) GetBotChallengeCompleteTokensDisabledOk() (*int32, bool)` + +GetBotChallengeCompleteTokensDisabledOk returns a tuple with the BotChallengeCompleteTokensDisabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBotChallengeCompleteTokensDisabled + +`func (o *RealtimeMeasurements) SetBotChallengeCompleteTokensDisabled(v int32)` + +SetBotChallengeCompleteTokensDisabled sets BotChallengeCompleteTokensDisabled field to given value. + +### HasBotChallengeCompleteTokensDisabled + +`func (o *RealtimeMeasurements) HasBotChallengeCompleteTokensDisabled() bool` + +HasBotChallengeCompleteTokensDisabled returns a boolean if a field has been set. + +### GetBotChallengesIssued + +`func (o *RealtimeMeasurements) GetBotChallengesIssued() int32` + +GetBotChallengesIssued returns the BotChallengesIssued field if non-nil, zero value otherwise. + +### GetBotChallengesIssuedOk + +`func (o *RealtimeMeasurements) GetBotChallengesIssuedOk() (*int32, bool)` + +GetBotChallengesIssuedOk returns a tuple with the BotChallengesIssued field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBotChallengesIssued + +`func (o *RealtimeMeasurements) SetBotChallengesIssued(v int32)` + +SetBotChallengesIssued sets BotChallengesIssued field to given value. + +### HasBotChallengesIssued + +`func (o *RealtimeMeasurements) HasBotChallengesIssued() bool` + +HasBotChallengesIssued returns a boolean if a field has been set. + +### GetBotChallengesSucceeded + +`func (o *RealtimeMeasurements) GetBotChallengesSucceeded() int32` + +GetBotChallengesSucceeded returns the BotChallengesSucceeded field if non-nil, zero value otherwise. + +### GetBotChallengesSucceededOk + +`func (o *RealtimeMeasurements) GetBotChallengesSucceededOk() (*int32, bool)` + +GetBotChallengesSucceededOk returns a tuple with the BotChallengesSucceeded field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBotChallengesSucceeded + +`func (o *RealtimeMeasurements) SetBotChallengesSucceeded(v int32)` + +SetBotChallengesSucceeded sets BotChallengesSucceeded field to given value. + +### HasBotChallengesSucceeded + +`func (o *RealtimeMeasurements) HasBotChallengesSucceeded() bool` + +HasBotChallengesSucceeded returns a boolean if a field has been set. + +### GetBotChallengesFailed + +`func (o *RealtimeMeasurements) GetBotChallengesFailed() int32` + +GetBotChallengesFailed returns the BotChallengesFailed field if non-nil, zero value otherwise. + +### GetBotChallengesFailedOk + +`func (o *RealtimeMeasurements) GetBotChallengesFailedOk() (*int32, bool)` + +GetBotChallengesFailedOk returns a tuple with the BotChallengesFailed field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBotChallengesFailed + +`func (o *RealtimeMeasurements) SetBotChallengesFailed(v int32)` + +SetBotChallengesFailed sets BotChallengesFailed field to given value. + +### HasBotChallengesFailed + +`func (o *RealtimeMeasurements) HasBotChallengesFailed() bool` + +HasBotChallengesFailed returns a boolean if a field has been set. + +### GetBotChallengeCompleteTokensIssued + +`func (o *RealtimeMeasurements) GetBotChallengeCompleteTokensIssued() int32` + +GetBotChallengeCompleteTokensIssued returns the BotChallengeCompleteTokensIssued field if non-nil, zero value otherwise. + +### GetBotChallengeCompleteTokensIssuedOk + +`func (o *RealtimeMeasurements) GetBotChallengeCompleteTokensIssuedOk() (*int32, bool)` + +GetBotChallengeCompleteTokensIssuedOk returns a tuple with the BotChallengeCompleteTokensIssued field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBotChallengeCompleteTokensIssued + +`func (o *RealtimeMeasurements) SetBotChallengeCompleteTokensIssued(v int32)` + +SetBotChallengeCompleteTokensIssued sets BotChallengeCompleteTokensIssued field to given value. + +### HasBotChallengeCompleteTokensIssued + +`func (o *RealtimeMeasurements) HasBotChallengeCompleteTokensIssued() bool` + +HasBotChallengeCompleteTokensIssued returns a boolean if a field has been set. + [Back to API list](../README.md#documentation-for-api-endpoints) | [Back to README](../README.md) diff --git a/docs/Results.md b/docs/Results.md index 94d9748..080c9f2 100644 --- a/docs/Results.md +++ b/docs/Results.md @@ -220,6 +220,15 @@ Name | Type | Description | Notes **DdosActionTarpit** | Pointer to **int32** | The number of times the tarpit action was taken. The tarpit action delays writing the response to the client. | [optional] **DdosActionClose** | Pointer to **int32** | The number of times the close action was taken. The close action aborts the connection as soon as possible. The close action takes effect either right after accept, right after the client hello, or right after the response was sent. | [optional] **DdosActionBlackhole** | Pointer to **int32** | The number of times the blackhole action was taken. The blackhole action quietly closes a TCP connection without sending a reset. The blackhole action quietly closes a TCP connection without notifying its peer (all TCP state is dropped). | [optional] +**BotChallengeStarts** | Pointer to **int32** | The number of challenge-start tokens created. | [optional] +**BotChallengeCompleteTokensPassed** | Pointer to **int32** | The number of challenge-complete tokens that passed validation. | [optional] +**BotChallengeCompleteTokensFailed** | Pointer to **int32** | The number of challenge-complete tokens that failed validation. | [optional] +**BotChallengeCompleteTokensChecked** | Pointer to **int32** | The number of challenge-complete tokens checked. | [optional] +**BotChallengeCompleteTokensDisabled** | Pointer to **int32** | The number of challenge-complete tokens not checked because the feature was disabled. | [optional] +**BotChallengeCompleteTokensIssued** | Pointer to **int32** | The number of challenge-complete tokens issued. For example, issuing a challenge-complete token after a series of CAPTCHA challenges ending in success. | [optional] +**BotChallengesIssued** | Pointer to **int32** | The number of challenges issued. For example, the issuance of a CAPTCHA challenge. | [optional] +**BotChallengesSucceeded** | Pointer to **int32** | The number of successful challenge solutions processed. For example, a correct CAPTCHA solution. | [optional] +**BotChallengesFailed** | Pointer to **int32** | The number of failed challenge solutions processed. For example, an incorrect CAPTCHA solution. | [optional] ## Methods @@ -5650,5 +5659,230 @@ SetDdosActionBlackhole sets DdosActionBlackhole field to given value. HasDdosActionBlackhole returns a boolean if a field has been set. +### GetBotChallengeStarts + +`func (o *Results) GetBotChallengeStarts() int32` + +GetBotChallengeStarts returns the BotChallengeStarts field if non-nil, zero value otherwise. + +### GetBotChallengeStartsOk + +`func (o *Results) GetBotChallengeStartsOk() (*int32, bool)` + +GetBotChallengeStartsOk returns a tuple with the BotChallengeStarts field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBotChallengeStarts + +`func (o *Results) SetBotChallengeStarts(v int32)` + +SetBotChallengeStarts sets BotChallengeStarts field to given value. + +### HasBotChallengeStarts + +`func (o *Results) HasBotChallengeStarts() bool` + +HasBotChallengeStarts returns a boolean if a field has been set. + +### GetBotChallengeCompleteTokensPassed + +`func (o *Results) GetBotChallengeCompleteTokensPassed() int32` + +GetBotChallengeCompleteTokensPassed returns the BotChallengeCompleteTokensPassed field if non-nil, zero value otherwise. + +### GetBotChallengeCompleteTokensPassedOk + +`func (o *Results) GetBotChallengeCompleteTokensPassedOk() (*int32, bool)` + +GetBotChallengeCompleteTokensPassedOk returns a tuple with the BotChallengeCompleteTokensPassed field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBotChallengeCompleteTokensPassed + +`func (o *Results) SetBotChallengeCompleteTokensPassed(v int32)` + +SetBotChallengeCompleteTokensPassed sets BotChallengeCompleteTokensPassed field to given value. + +### HasBotChallengeCompleteTokensPassed + +`func (o *Results) HasBotChallengeCompleteTokensPassed() bool` + +HasBotChallengeCompleteTokensPassed returns a boolean if a field has been set. + +### GetBotChallengeCompleteTokensFailed + +`func (o *Results) GetBotChallengeCompleteTokensFailed() int32` + +GetBotChallengeCompleteTokensFailed returns the BotChallengeCompleteTokensFailed field if non-nil, zero value otherwise. + +### GetBotChallengeCompleteTokensFailedOk + +`func (o *Results) GetBotChallengeCompleteTokensFailedOk() (*int32, bool)` + +GetBotChallengeCompleteTokensFailedOk returns a tuple with the BotChallengeCompleteTokensFailed field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBotChallengeCompleteTokensFailed + +`func (o *Results) SetBotChallengeCompleteTokensFailed(v int32)` + +SetBotChallengeCompleteTokensFailed sets BotChallengeCompleteTokensFailed field to given value. + +### HasBotChallengeCompleteTokensFailed + +`func (o *Results) HasBotChallengeCompleteTokensFailed() bool` + +HasBotChallengeCompleteTokensFailed returns a boolean if a field has been set. + +### GetBotChallengeCompleteTokensChecked + +`func (o *Results) GetBotChallengeCompleteTokensChecked() int32` + +GetBotChallengeCompleteTokensChecked returns the BotChallengeCompleteTokensChecked field if non-nil, zero value otherwise. + +### GetBotChallengeCompleteTokensCheckedOk + +`func (o *Results) GetBotChallengeCompleteTokensCheckedOk() (*int32, bool)` + +GetBotChallengeCompleteTokensCheckedOk returns a tuple with the BotChallengeCompleteTokensChecked field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBotChallengeCompleteTokensChecked + +`func (o *Results) SetBotChallengeCompleteTokensChecked(v int32)` + +SetBotChallengeCompleteTokensChecked sets BotChallengeCompleteTokensChecked field to given value. + +### HasBotChallengeCompleteTokensChecked + +`func (o *Results) HasBotChallengeCompleteTokensChecked() bool` + +HasBotChallengeCompleteTokensChecked returns a boolean if a field has been set. + +### GetBotChallengeCompleteTokensDisabled + +`func (o *Results) GetBotChallengeCompleteTokensDisabled() int32` + +GetBotChallengeCompleteTokensDisabled returns the BotChallengeCompleteTokensDisabled field if non-nil, zero value otherwise. + +### GetBotChallengeCompleteTokensDisabledOk + +`func (o *Results) GetBotChallengeCompleteTokensDisabledOk() (*int32, bool)` + +GetBotChallengeCompleteTokensDisabledOk returns a tuple with the BotChallengeCompleteTokensDisabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBotChallengeCompleteTokensDisabled + +`func (o *Results) SetBotChallengeCompleteTokensDisabled(v int32)` + +SetBotChallengeCompleteTokensDisabled sets BotChallengeCompleteTokensDisabled field to given value. + +### HasBotChallengeCompleteTokensDisabled + +`func (o *Results) HasBotChallengeCompleteTokensDisabled() bool` + +HasBotChallengeCompleteTokensDisabled returns a boolean if a field has been set. + +### GetBotChallengeCompleteTokensIssued + +`func (o *Results) GetBotChallengeCompleteTokensIssued() int32` + +GetBotChallengeCompleteTokensIssued returns the BotChallengeCompleteTokensIssued field if non-nil, zero value otherwise. + +### GetBotChallengeCompleteTokensIssuedOk + +`func (o *Results) GetBotChallengeCompleteTokensIssuedOk() (*int32, bool)` + +GetBotChallengeCompleteTokensIssuedOk returns a tuple with the BotChallengeCompleteTokensIssued field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBotChallengeCompleteTokensIssued + +`func (o *Results) SetBotChallengeCompleteTokensIssued(v int32)` + +SetBotChallengeCompleteTokensIssued sets BotChallengeCompleteTokensIssued field to given value. + +### HasBotChallengeCompleteTokensIssued + +`func (o *Results) HasBotChallengeCompleteTokensIssued() bool` + +HasBotChallengeCompleteTokensIssued returns a boolean if a field has been set. + +### GetBotChallengesIssued + +`func (o *Results) GetBotChallengesIssued() int32` + +GetBotChallengesIssued returns the BotChallengesIssued field if non-nil, zero value otherwise. + +### GetBotChallengesIssuedOk + +`func (o *Results) GetBotChallengesIssuedOk() (*int32, bool)` + +GetBotChallengesIssuedOk returns a tuple with the BotChallengesIssued field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBotChallengesIssued + +`func (o *Results) SetBotChallengesIssued(v int32)` + +SetBotChallengesIssued sets BotChallengesIssued field to given value. + +### HasBotChallengesIssued + +`func (o *Results) HasBotChallengesIssued() bool` + +HasBotChallengesIssued returns a boolean if a field has been set. + +### GetBotChallengesSucceeded + +`func (o *Results) GetBotChallengesSucceeded() int32` + +GetBotChallengesSucceeded returns the BotChallengesSucceeded field if non-nil, zero value otherwise. + +### GetBotChallengesSucceededOk + +`func (o *Results) GetBotChallengesSucceededOk() (*int32, bool)` + +GetBotChallengesSucceededOk returns a tuple with the BotChallengesSucceeded field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBotChallengesSucceeded + +`func (o *Results) SetBotChallengesSucceeded(v int32)` + +SetBotChallengesSucceeded sets BotChallengesSucceeded field to given value. + +### HasBotChallengesSucceeded + +`func (o *Results) HasBotChallengesSucceeded() bool` + +HasBotChallengesSucceeded returns a boolean if a field has been set. + +### GetBotChallengesFailed + +`func (o *Results) GetBotChallengesFailed() int32` + +GetBotChallengesFailed returns the BotChallengesFailed field if non-nil, zero value otherwise. + +### GetBotChallengesFailedOk + +`func (o *Results) GetBotChallengesFailedOk() (*int32, bool)` + +GetBotChallengesFailedOk returns a tuple with the BotChallengesFailed field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBotChallengesFailed + +`func (o *Results) SetBotChallengesFailed(v int32)` + +SetBotChallengesFailed sets BotChallengesFailed field to given value. + +### HasBotChallengesFailed + +`func (o *Results) HasBotChallengesFailed() bool` + +HasBotChallengesFailed returns a boolean if a field has been set. + [Back to API list](../README.md#documentation-for-api-endpoints) | [Back to README](../README.md) diff --git a/docs/SchemasSnippetResponse.md b/docs/SchemasSnippetResponse.md index c6d7364..29d9a70 100644 --- a/docs/SchemasSnippetResponse.md +++ b/docs/SchemasSnippetResponse.md @@ -5,10 +5,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Name** | Pointer to **string** | The name for the snippet. | [optional] -**Dynamic** | Pointer to **string** | Sets the snippet version. | [optional] **Type** | Pointer to **string** | The location in generated VCL where the snippet should be placed. | [optional] **Content** | Pointer to **string** | The VCL code that specifies exactly what the snippet does. | [optional] **Priority** | Pointer to **string** | Priority determines execution order. Lower numbers execute first. | [optional] [default to "100"] +**Dynamic** | Pointer to **string** | Sets the snippet version. | [optional] **CreatedAt** | Pointer to **NullableTime** | Date and time in ISO 8601 format. | [optional] [readonly] **DeletedAt** | Pointer to **NullableTime** | Date and time in ISO 8601 format. | [optional] [readonly] **UpdatedAt** | Pointer to **NullableTime** | Date and time in ISO 8601 format. | [optional] [readonly] @@ -60,31 +60,6 @@ SetName sets Name field to given value. HasName returns a boolean if a field has been set. -### GetDynamic - -`func (o *SchemasSnippetResponse) GetDynamic() string` - -GetDynamic returns the Dynamic field if non-nil, zero value otherwise. - -### GetDynamicOk - -`func (o *SchemasSnippetResponse) GetDynamicOk() (*string, bool)` - -GetDynamicOk returns a tuple with the Dynamic field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDynamic - -`func (o *SchemasSnippetResponse) SetDynamic(v string)` - -SetDynamic sets Dynamic field to given value. - -### HasDynamic - -`func (o *SchemasSnippetResponse) HasDynamic() bool` - -HasDynamic returns a boolean if a field has been set. - ### GetType `func (o *SchemasSnippetResponse) GetType() string` @@ -160,6 +135,31 @@ SetPriority sets Priority field to given value. HasPriority returns a boolean if a field has been set. +### GetDynamic + +`func (o *SchemasSnippetResponse) GetDynamic() string` + +GetDynamic returns the Dynamic field if non-nil, zero value otherwise. + +### GetDynamicOk + +`func (o *SchemasSnippetResponse) GetDynamicOk() (*string, bool)` + +GetDynamicOk returns a tuple with the Dynamic field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDynamic + +`func (o *SchemasSnippetResponse) SetDynamic(v string)` + +SetDynamic sets Dynamic field to given value. + +### HasDynamic + +`func (o *SchemasSnippetResponse) HasDynamic() bool` + +HasDynamic returns a boolean if a field has been set. + ### GetCreatedAt `func (o *SchemasSnippetResponse) GetCreatedAt() time.Time` diff --git a/docs/SchemasSnippetResponseCommon.md b/docs/SchemasSnippetResponseCommon.md new file mode 100644 index 0000000..4755511 --- /dev/null +++ b/docs/SchemasSnippetResponseCommon.md @@ -0,0 +1,214 @@ +# SchemasSnippetResponseCommon + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CreatedAt** | Pointer to **NullableTime** | Date and time in ISO 8601 format. | [optional] [readonly] +**DeletedAt** | Pointer to **NullableTime** | Date and time in ISO 8601 format. | [optional] [readonly] +**UpdatedAt** | Pointer to **NullableTime** | Date and time in ISO 8601 format. | [optional] [readonly] +**ServiceID** | Pointer to **string** | | [optional] [readonly] +**Version** | Pointer to **string** | String representing the number identifying a version of the service. | [optional] [readonly] +**ID** | Pointer to **string** | | [optional] [readonly] + +## Methods + +### NewSchemasSnippetResponseCommon + +`func NewSchemasSnippetResponseCommon() *SchemasSnippetResponseCommon` + +NewSchemasSnippetResponseCommon instantiates a new SchemasSnippetResponseCommon object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewSchemasSnippetResponseCommonWithDefaults + +`func NewSchemasSnippetResponseCommonWithDefaults() *SchemasSnippetResponseCommon` + +NewSchemasSnippetResponseCommonWithDefaults instantiates a new SchemasSnippetResponseCommon object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCreatedAt + +`func (o *SchemasSnippetResponseCommon) GetCreatedAt() time.Time` + +GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. + +### GetCreatedAtOk + +`func (o *SchemasSnippetResponseCommon) 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 *SchemasSnippetResponseCommon) SetCreatedAt(v time.Time)` + +SetCreatedAt sets CreatedAt field to given value. + +### HasCreatedAt + +`func (o *SchemasSnippetResponseCommon) HasCreatedAt() bool` + +HasCreatedAt returns a boolean if a field has been set. + +### SetCreatedAtNil + +`func (o *SchemasSnippetResponseCommon) SetCreatedAtNil(b bool)` + + SetCreatedAtNil sets the value for CreatedAt to be an explicit nil + +### UnsetCreatedAt +`func (o *SchemasSnippetResponseCommon) UnsetCreatedAt()` + +UnsetCreatedAt ensures that no value is present for CreatedAt, not even an explicit nil +### GetDeletedAt + +`func (o *SchemasSnippetResponseCommon) GetDeletedAt() time.Time` + +GetDeletedAt returns the DeletedAt field if non-nil, zero value otherwise. + +### GetDeletedAtOk + +`func (o *SchemasSnippetResponseCommon) GetDeletedAtOk() (*time.Time, bool)` + +GetDeletedAtOk returns a tuple with the DeletedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDeletedAt + +`func (o *SchemasSnippetResponseCommon) SetDeletedAt(v time.Time)` + +SetDeletedAt sets DeletedAt field to given value. + +### HasDeletedAt + +`func (o *SchemasSnippetResponseCommon) HasDeletedAt() bool` + +HasDeletedAt returns a boolean if a field has been set. + +### SetDeletedAtNil + +`func (o *SchemasSnippetResponseCommon) SetDeletedAtNil(b bool)` + + SetDeletedAtNil sets the value for DeletedAt to be an explicit nil + +### UnsetDeletedAt +`func (o *SchemasSnippetResponseCommon) UnsetDeletedAt()` + +UnsetDeletedAt ensures that no value is present for DeletedAt, not even an explicit nil +### GetUpdatedAt + +`func (o *SchemasSnippetResponseCommon) GetUpdatedAt() time.Time` + +GetUpdatedAt returns the UpdatedAt field if non-nil, zero value otherwise. + +### GetUpdatedAtOk + +`func (o *SchemasSnippetResponseCommon) 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 *SchemasSnippetResponseCommon) SetUpdatedAt(v time.Time)` + +SetUpdatedAt sets UpdatedAt field to given value. + +### HasUpdatedAt + +`func (o *SchemasSnippetResponseCommon) HasUpdatedAt() bool` + +HasUpdatedAt returns a boolean if a field has been set. + +### SetUpdatedAtNil + +`func (o *SchemasSnippetResponseCommon) SetUpdatedAtNil(b bool)` + + SetUpdatedAtNil sets the value for UpdatedAt to be an explicit nil + +### UnsetUpdatedAt +`func (o *SchemasSnippetResponseCommon) UnsetUpdatedAt()` + +UnsetUpdatedAt ensures that no value is present for UpdatedAt, not even an explicit nil +### GetServiceID + +`func (o *SchemasSnippetResponseCommon) GetServiceID() string` + +GetServiceID returns the ServiceID field if non-nil, zero value otherwise. + +### GetServiceIDOk + +`func (o *SchemasSnippetResponseCommon) GetServiceIDOk() (*string, bool)` + +GetServiceIDOk returns a tuple with the ServiceID field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetServiceID + +`func (o *SchemasSnippetResponseCommon) SetServiceID(v string)` + +SetServiceID sets ServiceID field to given value. + +### HasServiceID + +`func (o *SchemasSnippetResponseCommon) HasServiceID() bool` + +HasServiceID returns a boolean if a field has been set. + +### GetVersion + +`func (o *SchemasSnippetResponseCommon) GetVersion() string` + +GetVersion returns the Version field if non-nil, zero value otherwise. + +### GetVersionOk + +`func (o *SchemasSnippetResponseCommon) GetVersionOk() (*string, bool)` + +GetVersionOk returns a tuple with the Version field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVersion + +`func (o *SchemasSnippetResponseCommon) SetVersion(v string)` + +SetVersion sets Version field to given value. + +### HasVersion + +`func (o *SchemasSnippetResponseCommon) HasVersion() bool` + +HasVersion returns a boolean if a field has been set. + +### GetID + +`func (o *SchemasSnippetResponseCommon) GetID() string` + +GetID returns the ID field if non-nil, zero value otherwise. + +### GetIDOk + +`func (o *SchemasSnippetResponseCommon) 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 *SchemasSnippetResponseCommon) SetID(v string)` + +SetID sets ID field to given value. + +### HasID + +`func (o *SchemasSnippetResponseCommon) HasID() bool` + +HasID returns a boolean if a field has been set. + + +[Back to API list](../README.md#documentation-for-api-endpoints) | [Back to README](../README.md) diff --git a/docs/Snippet.md b/docs/Snippet.md index 1fe7c48..983b31b 100644 --- a/docs/Snippet.md +++ b/docs/Snippet.md @@ -5,10 +5,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Name** | Pointer to **string** | The name for the snippet. | [optional] -**Dynamic** | Pointer to **string** | Sets the snippet version. | [optional] **Type** | Pointer to **string** | The location in generated VCL where the snippet should be placed. | [optional] **Content** | Pointer to **string** | The VCL code that specifies exactly what the snippet does. | [optional] **Priority** | Pointer to **string** | Priority determines execution order. Lower numbers execute first. | [optional] [default to "100"] +**Dynamic** | Pointer to **string** | Sets the snippet version. | [optional] ## Methods @@ -54,31 +54,6 @@ SetName sets Name field to given value. HasName returns a boolean if a field has been set. -### GetDynamic - -`func (o *Snippet) GetDynamic() string` - -GetDynamic returns the Dynamic field if non-nil, zero value otherwise. - -### GetDynamicOk - -`func (o *Snippet) GetDynamicOk() (*string, bool)` - -GetDynamicOk returns a tuple with the Dynamic field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDynamic - -`func (o *Snippet) SetDynamic(v string)` - -SetDynamic sets Dynamic field to given value. - -### HasDynamic - -`func (o *Snippet) HasDynamic() bool` - -HasDynamic returns a boolean if a field has been set. - ### GetType `func (o *Snippet) GetType() string` @@ -154,5 +129,30 @@ SetPriority sets Priority field to given value. HasPriority returns a boolean if a field has been set. +### GetDynamic + +`func (o *Snippet) GetDynamic() string` + +GetDynamic returns the Dynamic field if non-nil, zero value otherwise. + +### GetDynamicOk + +`func (o *Snippet) GetDynamicOk() (*string, bool)` + +GetDynamicOk returns a tuple with the Dynamic field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDynamic + +`func (o *Snippet) SetDynamic(v string)` + +SetDynamic sets Dynamic field to given value. + +### HasDynamic + +`func (o *Snippet) HasDynamic() bool` + +HasDynamic returns a boolean if a field has been set. + [Back to API list](../README.md#documentation-for-api-endpoints) | [Back to README](../README.md) diff --git a/docs/SnippetAPI.md b/docs/SnippetAPI.md index ec3656d..a529c95 100644 --- a/docs/SnippetAPI.md +++ b/docs/SnippetAPI.md @@ -36,20 +36,20 @@ func main() { serviceID := "serviceId_example" // string | Alphanumeric string identifying the service. versionID := int32(56) // int32 | Integer identifying a service version. name := "name_example" // string | The name for the snippet. (optional) - dynamic := "dynamic_example" // string | Sets the snippet version. (optional) resourceType := "resourceType_example" // string | The location in generated VCL where the snippet should be placed. (optional) content := "content_example" // string | The VCL code that specifies exactly what the snippet does. (optional) priority := "priority_example" // string | Priority determines execution order. Lower numbers execute first. (optional) (default to "100") + dynamic := "dynamic_example" // string | Sets the snippet version. (optional) cfg := fastly.NewConfiguration() apiClient := fastly.NewAPIClient(cfg) ctx := fastly.NewAPIKeyContextFromEnv("FASTLY_API_TOKEN") - resp, r, err := apiClient.SnippetAPI.CreateSnippet(ctx, serviceID, versionID).Name(name).Dynamic(dynamic).ResourceType(resourceType).Content(content).Priority(priority).Execute() + resp, r, err := apiClient.SnippetAPI.CreateSnippet(ctx, serviceID, versionID).Name(name).ResourceType(resourceType).Content(content).Priority(priority).Dynamic(dynamic).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `SnippetAPI.CreateSnippet`: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } - // response from `CreateSnippet`: SnippetResponse + // response from `CreateSnippet`: SnippetResponsePost fmt.Fprintf(os.Stdout, "Response from `SnippetAPI.CreateSnippet`: %v\n", resp) } ``` @@ -70,11 +70,11 @@ Other parameters are passed through a pointer to a apiCreateSnippetRequest struc Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **name** | **string** | The name for the snippet. | **dynamic** | **string** | Sets the snippet version. | **resourceType** | **string** | The location in generated VCL where the snippet should be placed. | **content** | **string** | The VCL code that specifies exactly what the snippet does. | **priority** | **string** | Priority determines execution order. Lower numbers execute first. | [default to "100"] + **name** | **string** | The name for the snippet. | **resourceType** | **string** | The location in generated VCL where the snippet should be placed. | **content** | **string** | The VCL code that specifies exactly what the snippet does. | **priority** | **string** | Priority determines execution order. Lower numbers execute first. | [default to "100"] **dynamic** | **string** | Sets the snippet version. | ### Return type -[**SnippetResponse**](SnippetResponse.md) +[**SnippetResponsePost**](SnippetResponsePost.md) ### Authorization @@ -461,15 +461,15 @@ func main() { serviceID := "serviceId_example" // string | Alphanumeric string identifying the service. snippetID := "snippetId_example" // string | Alphanumeric string identifying a VCL Snippet. name := "name_example" // string | The name for the snippet. (optional) - dynamic := "dynamic_example" // string | Sets the snippet version. (optional) resourceType := "resourceType_example" // string | The location in generated VCL where the snippet should be placed. (optional) content := "content_example" // string | The VCL code that specifies exactly what the snippet does. (optional) priority := "priority_example" // string | Priority determines execution order. Lower numbers execute first. (optional) (default to "100") + dynamic := "dynamic_example" // string | Sets the snippet version. (optional) cfg := fastly.NewConfiguration() apiClient := fastly.NewAPIClient(cfg) ctx := fastly.NewAPIKeyContextFromEnv("FASTLY_API_TOKEN") - resp, r, err := apiClient.SnippetAPI.UpdateSnippetDynamic(ctx, serviceID, snippetID).Name(name).Dynamic(dynamic).ResourceType(resourceType).Content(content).Priority(priority).Execute() + resp, r, err := apiClient.SnippetAPI.UpdateSnippetDynamic(ctx, serviceID, snippetID).Name(name).ResourceType(resourceType).Content(content).Priority(priority).Dynamic(dynamic).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `SnippetAPI.UpdateSnippetDynamic`: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -495,7 +495,7 @@ Other parameters are passed through a pointer to a apiUpdateSnippetDynamicReques Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **name** | **string** | The name for the snippet. | **dynamic** | **string** | Sets the snippet version. | **resourceType** | **string** | The location in generated VCL where the snippet should be placed. | **content** | **string** | The VCL code that specifies exactly what the snippet does. | **priority** | **string** | Priority determines execution order. Lower numbers execute first. | [default to "100"] + **name** | **string** | The name for the snippet. | **resourceType** | **string** | The location in generated VCL where the snippet should be placed. | **content** | **string** | The VCL code that specifies exactly what the snippet does. | **priority** | **string** | Priority determines execution order. Lower numbers execute first. | [default to "100"] **dynamic** | **string** | Sets the snippet version. | ### Return type diff --git a/docs/SnippetAllOf.md b/docs/SnippetAllOf.md new file mode 100644 index 0000000..bea3e47 --- /dev/null +++ b/docs/SnippetAllOf.md @@ -0,0 +1,54 @@ +# SnippetAllOf + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Dynamic** | Pointer to **string** | Sets the snippet version. | [optional] + +## Methods + +### NewSnippetAllOf + +`func NewSnippetAllOf() *SnippetAllOf` + +NewSnippetAllOf instantiates a new SnippetAllOf object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewSnippetAllOfWithDefaults + +`func NewSnippetAllOfWithDefaults() *SnippetAllOf` + +NewSnippetAllOfWithDefaults instantiates a new SnippetAllOf object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetDynamic + +`func (o *SnippetAllOf) GetDynamic() string` + +GetDynamic returns the Dynamic field if non-nil, zero value otherwise. + +### GetDynamicOk + +`func (o *SnippetAllOf) GetDynamicOk() (*string, bool)` + +GetDynamicOk returns a tuple with the Dynamic field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDynamic + +`func (o *SnippetAllOf) SetDynamic(v string)` + +SetDynamic sets Dynamic field to given value. + +### HasDynamic + +`func (o *SnippetAllOf) HasDynamic() bool` + +HasDynamic returns a boolean if a field has been set. + + +[Back to API list](../README.md#documentation-for-api-endpoints) | [Back to README](../README.md) diff --git a/docs/SnippetCommon.md b/docs/SnippetCommon.md new file mode 100644 index 0000000..324633e --- /dev/null +++ b/docs/SnippetCommon.md @@ -0,0 +1,132 @@ +# SnippetCommon + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **string** | The name for the snippet. | [optional] +**Type** | Pointer to **string** | The location in generated VCL where the snippet should be placed. | [optional] +**Content** | Pointer to **string** | The VCL code that specifies exactly what the snippet does. | [optional] +**Priority** | Pointer to **string** | Priority determines execution order. Lower numbers execute first. | [optional] [default to "100"] + +## Methods + +### NewSnippetCommon + +`func NewSnippetCommon() *SnippetCommon` + +NewSnippetCommon instantiates a new SnippetCommon object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewSnippetCommonWithDefaults + +`func NewSnippetCommonWithDefaults() *SnippetCommon` + +NewSnippetCommonWithDefaults instantiates a new SnippetCommon object +This 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 *SnippetCommon) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *SnippetCommon) 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 *SnippetCommon) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *SnippetCommon) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetType + +`func (o *SnippetCommon) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *SnippetCommon) 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 *SnippetCommon) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *SnippetCommon) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetContent + +`func (o *SnippetCommon) GetContent() string` + +GetContent returns the Content field if non-nil, zero value otherwise. + +### GetContentOk + +`func (o *SnippetCommon) GetContentOk() (*string, bool)` + +GetContentOk returns a tuple with the Content field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContent + +`func (o *SnippetCommon) SetContent(v string)` + +SetContent sets Content field to given value. + +### HasContent + +`func (o *SnippetCommon) HasContent() bool` + +HasContent returns a boolean if a field has been set. + +### GetPriority + +`func (o *SnippetCommon) GetPriority() string` + +GetPriority returns the Priority field if non-nil, zero value otherwise. + +### GetPriorityOk + +`func (o *SnippetCommon) GetPriorityOk() (*string, 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 *SnippetCommon) SetPriority(v string)` + +SetPriority sets Priority field to given value. + +### HasPriority + +`func (o *SnippetCommon) HasPriority() bool` + +HasPriority returns a boolean if a field has been set. + + +[Back to API list](../README.md#documentation-for-api-endpoints) | [Back to README](../README.md) diff --git a/docs/SnippetResponse.md b/docs/SnippetResponse.md index 89b89c4..dc20a25 100644 --- a/docs/SnippetResponse.md +++ b/docs/SnippetResponse.md @@ -5,10 +5,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Name** | Pointer to **string** | The name for the snippet. | [optional] -**Dynamic** | Pointer to **string** | Sets the snippet version. | [optional] **Type** | Pointer to **string** | The location in generated VCL where the snippet should be placed. | [optional] **Content** | Pointer to **string** | The VCL code that specifies exactly what the snippet does. | [optional] **Priority** | Pointer to **string** | Priority determines execution order. Lower numbers execute first. | [optional] [default to "100"] +**Dynamic** | Pointer to **string** | Sets the snippet version. | [optional] **CreatedAt** | Pointer to **NullableTime** | Date and time in ISO 8601 format. | [optional] [readonly] **DeletedAt** | Pointer to **NullableTime** | Date and time in ISO 8601 format. | [optional] [readonly] **UpdatedAt** | Pointer to **NullableTime** | Date and time in ISO 8601 format. | [optional] [readonly] @@ -60,31 +60,6 @@ SetName sets Name field to given value. HasName returns a boolean if a field has been set. -### GetDynamic - -`func (o *SnippetResponse) GetDynamic() string` - -GetDynamic returns the Dynamic field if non-nil, zero value otherwise. - -### GetDynamicOk - -`func (o *SnippetResponse) GetDynamicOk() (*string, bool)` - -GetDynamicOk returns a tuple with the Dynamic field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDynamic - -`func (o *SnippetResponse) SetDynamic(v string)` - -SetDynamic sets Dynamic field to given value. - -### HasDynamic - -`func (o *SnippetResponse) HasDynamic() bool` - -HasDynamic returns a boolean if a field has been set. - ### GetType `func (o *SnippetResponse) GetType() string` @@ -160,6 +135,31 @@ SetPriority sets Priority field to given value. HasPriority returns a boolean if a field has been set. +### GetDynamic + +`func (o *SnippetResponse) GetDynamic() string` + +GetDynamic returns the Dynamic field if non-nil, zero value otherwise. + +### GetDynamicOk + +`func (o *SnippetResponse) GetDynamicOk() (*string, bool)` + +GetDynamicOk returns a tuple with the Dynamic field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDynamic + +`func (o *SnippetResponse) SetDynamic(v string)` + +SetDynamic sets Dynamic field to given value. + +### HasDynamic + +`func (o *SnippetResponse) HasDynamic() bool` + +HasDynamic returns a boolean if a field has been set. + ### GetCreatedAt `func (o *SnippetResponse) GetCreatedAt() time.Time` diff --git a/docs/SnippetResponseCommon.md b/docs/SnippetResponseCommon.md new file mode 100644 index 0000000..eeca75b --- /dev/null +++ b/docs/SnippetResponseCommon.md @@ -0,0 +1,214 @@ +# SnippetResponseCommon + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CreatedAt** | Pointer to **NullableTime** | Date and time in ISO 8601 format. | [optional] [readonly] +**DeletedAt** | Pointer to **NullableTime** | Date and time in ISO 8601 format. | [optional] [readonly] +**UpdatedAt** | Pointer to **NullableTime** | Date and time in ISO 8601 format. | [optional] [readonly] +**ServiceID** | Pointer to **string** | | [optional] [readonly] +**Version** | Pointer to **string** | String representing the number identifying a version of the service. | [optional] [readonly] +**ID** | Pointer to **string** | | [optional] [readonly] + +## Methods + +### NewSnippetResponseCommon + +`func NewSnippetResponseCommon() *SnippetResponseCommon` + +NewSnippetResponseCommon instantiates a new SnippetResponseCommon object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewSnippetResponseCommonWithDefaults + +`func NewSnippetResponseCommonWithDefaults() *SnippetResponseCommon` + +NewSnippetResponseCommonWithDefaults instantiates a new SnippetResponseCommon object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCreatedAt + +`func (o *SnippetResponseCommon) GetCreatedAt() time.Time` + +GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. + +### GetCreatedAtOk + +`func (o *SnippetResponseCommon) 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 *SnippetResponseCommon) SetCreatedAt(v time.Time)` + +SetCreatedAt sets CreatedAt field to given value. + +### HasCreatedAt + +`func (o *SnippetResponseCommon) HasCreatedAt() bool` + +HasCreatedAt returns a boolean if a field has been set. + +### SetCreatedAtNil + +`func (o *SnippetResponseCommon) SetCreatedAtNil(b bool)` + + SetCreatedAtNil sets the value for CreatedAt to be an explicit nil + +### UnsetCreatedAt +`func (o *SnippetResponseCommon) UnsetCreatedAt()` + +UnsetCreatedAt ensures that no value is present for CreatedAt, not even an explicit nil +### GetDeletedAt + +`func (o *SnippetResponseCommon) GetDeletedAt() time.Time` + +GetDeletedAt returns the DeletedAt field if non-nil, zero value otherwise. + +### GetDeletedAtOk + +`func (o *SnippetResponseCommon) GetDeletedAtOk() (*time.Time, bool)` + +GetDeletedAtOk returns a tuple with the DeletedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDeletedAt + +`func (o *SnippetResponseCommon) SetDeletedAt(v time.Time)` + +SetDeletedAt sets DeletedAt field to given value. + +### HasDeletedAt + +`func (o *SnippetResponseCommon) HasDeletedAt() bool` + +HasDeletedAt returns a boolean if a field has been set. + +### SetDeletedAtNil + +`func (o *SnippetResponseCommon) SetDeletedAtNil(b bool)` + + SetDeletedAtNil sets the value for DeletedAt to be an explicit nil + +### UnsetDeletedAt +`func (o *SnippetResponseCommon) UnsetDeletedAt()` + +UnsetDeletedAt ensures that no value is present for DeletedAt, not even an explicit nil +### GetUpdatedAt + +`func (o *SnippetResponseCommon) GetUpdatedAt() time.Time` + +GetUpdatedAt returns the UpdatedAt field if non-nil, zero value otherwise. + +### GetUpdatedAtOk + +`func (o *SnippetResponseCommon) 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 *SnippetResponseCommon) SetUpdatedAt(v time.Time)` + +SetUpdatedAt sets UpdatedAt field to given value. + +### HasUpdatedAt + +`func (o *SnippetResponseCommon) HasUpdatedAt() bool` + +HasUpdatedAt returns a boolean if a field has been set. + +### SetUpdatedAtNil + +`func (o *SnippetResponseCommon) SetUpdatedAtNil(b bool)` + + SetUpdatedAtNil sets the value for UpdatedAt to be an explicit nil + +### UnsetUpdatedAt +`func (o *SnippetResponseCommon) UnsetUpdatedAt()` + +UnsetUpdatedAt ensures that no value is present for UpdatedAt, not even an explicit nil +### GetServiceID + +`func (o *SnippetResponseCommon) GetServiceID() string` + +GetServiceID returns the ServiceID field if non-nil, zero value otherwise. + +### GetServiceIDOk + +`func (o *SnippetResponseCommon) GetServiceIDOk() (*string, bool)` + +GetServiceIDOk returns a tuple with the ServiceID field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetServiceID + +`func (o *SnippetResponseCommon) SetServiceID(v string)` + +SetServiceID sets ServiceID field to given value. + +### HasServiceID + +`func (o *SnippetResponseCommon) HasServiceID() bool` + +HasServiceID returns a boolean if a field has been set. + +### GetVersion + +`func (o *SnippetResponseCommon) GetVersion() string` + +GetVersion returns the Version field if non-nil, zero value otherwise. + +### GetVersionOk + +`func (o *SnippetResponseCommon) GetVersionOk() (*string, bool)` + +GetVersionOk returns a tuple with the Version field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVersion + +`func (o *SnippetResponseCommon) SetVersion(v string)` + +SetVersion sets Version field to given value. + +### HasVersion + +`func (o *SnippetResponseCommon) HasVersion() bool` + +HasVersion returns a boolean if a field has been set. + +### GetID + +`func (o *SnippetResponseCommon) GetID() string` + +GetID returns the ID field if non-nil, zero value otherwise. + +### GetIDOk + +`func (o *SnippetResponseCommon) 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 *SnippetResponseCommon) SetID(v string)` + +SetID sets ID field to given value. + +### HasID + +`func (o *SnippetResponseCommon) HasID() bool` + +HasID returns a boolean if a field has been set. + + +[Back to API list](../README.md#documentation-for-api-endpoints) | [Back to README](../README.md) diff --git a/docs/SnippetResponseAllOf.md b/docs/SnippetResponseCommonAllOf.md similarity index 63% rename from docs/SnippetResponseAllOf.md rename to docs/SnippetResponseCommonAllOf.md index 129ae35..8475442 100644 --- a/docs/SnippetResponseAllOf.md +++ b/docs/SnippetResponseCommonAllOf.md @@ -1,4 +1,4 @@ -# SnippetResponseAllOf +# SnippetResponseCommonAllOf ## Properties @@ -10,95 +10,95 @@ Name | Type | Description | Notes ## Methods -### NewSnippetResponseAllOf +### NewSnippetResponseCommonAllOf -`func NewSnippetResponseAllOf() *SnippetResponseAllOf` +`func NewSnippetResponseCommonAllOf() *SnippetResponseCommonAllOf` -NewSnippetResponseAllOf instantiates a new SnippetResponseAllOf object +NewSnippetResponseCommonAllOf instantiates a new SnippetResponseCommonAllOf object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed -### NewSnippetResponseAllOfWithDefaults +### NewSnippetResponseCommonAllOfWithDefaults -`func NewSnippetResponseAllOfWithDefaults() *SnippetResponseAllOf` +`func NewSnippetResponseCommonAllOfWithDefaults() *SnippetResponseCommonAllOf` -NewSnippetResponseAllOfWithDefaults instantiates a new SnippetResponseAllOf object +NewSnippetResponseCommonAllOfWithDefaults instantiates a new SnippetResponseCommonAllOf object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetServiceID -`func (o *SnippetResponseAllOf) GetServiceID() string` +`func (o *SnippetResponseCommonAllOf) GetServiceID() string` GetServiceID returns the ServiceID field if non-nil, zero value otherwise. ### GetServiceIDOk -`func (o *SnippetResponseAllOf) GetServiceIDOk() (*string, bool)` +`func (o *SnippetResponseCommonAllOf) GetServiceIDOk() (*string, bool)` GetServiceIDOk returns a tuple with the ServiceID field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetServiceID -`func (o *SnippetResponseAllOf) SetServiceID(v string)` +`func (o *SnippetResponseCommonAllOf) SetServiceID(v string)` SetServiceID sets ServiceID field to given value. ### HasServiceID -`func (o *SnippetResponseAllOf) HasServiceID() bool` +`func (o *SnippetResponseCommonAllOf) HasServiceID() bool` HasServiceID returns a boolean if a field has been set. ### GetVersion -`func (o *SnippetResponseAllOf) GetVersion() string` +`func (o *SnippetResponseCommonAllOf) GetVersion() string` GetVersion returns the Version field if non-nil, zero value otherwise. ### GetVersionOk -`func (o *SnippetResponseAllOf) GetVersionOk() (*string, bool)` +`func (o *SnippetResponseCommonAllOf) GetVersionOk() (*string, bool)` GetVersionOk returns a tuple with the Version field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetVersion -`func (o *SnippetResponseAllOf) SetVersion(v string)` +`func (o *SnippetResponseCommonAllOf) SetVersion(v string)` SetVersion sets Version field to given value. ### HasVersion -`func (o *SnippetResponseAllOf) HasVersion() bool` +`func (o *SnippetResponseCommonAllOf) HasVersion() bool` HasVersion returns a boolean if a field has been set. ### GetID -`func (o *SnippetResponseAllOf) GetID() string` +`func (o *SnippetResponseCommonAllOf) GetID() string` GetID returns the ID field if non-nil, zero value otherwise. ### GetIDOk -`func (o *SnippetResponseAllOf) GetIDOk() (*string, bool)` +`func (o *SnippetResponseCommonAllOf) 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 *SnippetResponseAllOf) SetID(v string)` +`func (o *SnippetResponseCommonAllOf) SetID(v string)` SetID sets ID field to given value. ### HasID -`func (o *SnippetResponseAllOf) HasID() bool` +`func (o *SnippetResponseCommonAllOf) HasID() bool` HasID returns a boolean if a field has been set. diff --git a/docs/SnippetResponsePost.md b/docs/SnippetResponsePost.md new file mode 100644 index 0000000..9b043e6 --- /dev/null +++ b/docs/SnippetResponsePost.md @@ -0,0 +1,344 @@ +# SnippetResponsePost + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **string** | The name for the snippet. | [optional] +**Type** | Pointer to **string** | The location in generated VCL where the snippet should be placed. | [optional] +**Content** | Pointer to **string** | The VCL code that specifies exactly what the snippet does. | [optional] +**Priority** | Pointer to **string** | Priority determines execution order. Lower numbers execute first. | [optional] [default to "100"] +**Dynamic** | Pointer to **float32** | Sets the snippet version. | [optional] +**CreatedAt** | Pointer to **NullableTime** | Date and time in ISO 8601 format. | [optional] [readonly] +**DeletedAt** | Pointer to **NullableTime** | Date and time in ISO 8601 format. | [optional] [readonly] +**UpdatedAt** | Pointer to **NullableTime** | Date and time in ISO 8601 format. | [optional] [readonly] +**ServiceID** | Pointer to **string** | | [optional] [readonly] +**Version** | Pointer to **string** | String representing the number identifying a version of the service. | [optional] [readonly] +**ID** | Pointer to **string** | | [optional] [readonly] + +## Methods + +### NewSnippetResponsePost + +`func NewSnippetResponsePost() *SnippetResponsePost` + +NewSnippetResponsePost instantiates a new SnippetResponsePost object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewSnippetResponsePostWithDefaults + +`func NewSnippetResponsePostWithDefaults() *SnippetResponsePost` + +NewSnippetResponsePostWithDefaults instantiates a new SnippetResponsePost object +This 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 *SnippetResponsePost) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *SnippetResponsePost) 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 *SnippetResponsePost) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *SnippetResponsePost) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetType + +`func (o *SnippetResponsePost) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *SnippetResponsePost) 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 *SnippetResponsePost) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *SnippetResponsePost) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetContent + +`func (o *SnippetResponsePost) GetContent() string` + +GetContent returns the Content field if non-nil, zero value otherwise. + +### GetContentOk + +`func (o *SnippetResponsePost) GetContentOk() (*string, bool)` + +GetContentOk returns a tuple with the Content field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContent + +`func (o *SnippetResponsePost) SetContent(v string)` + +SetContent sets Content field to given value. + +### HasContent + +`func (o *SnippetResponsePost) HasContent() bool` + +HasContent returns a boolean if a field has been set. + +### GetPriority + +`func (o *SnippetResponsePost) GetPriority() string` + +GetPriority returns the Priority field if non-nil, zero value otherwise. + +### GetPriorityOk + +`func (o *SnippetResponsePost) GetPriorityOk() (*string, 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 *SnippetResponsePost) SetPriority(v string)` + +SetPriority sets Priority field to given value. + +### HasPriority + +`func (o *SnippetResponsePost) HasPriority() bool` + +HasPriority returns a boolean if a field has been set. + +### GetDynamic + +`func (o *SnippetResponsePost) GetDynamic() float32` + +GetDynamic returns the Dynamic field if non-nil, zero value otherwise. + +### GetDynamicOk + +`func (o *SnippetResponsePost) GetDynamicOk() (*float32, bool)` + +GetDynamicOk returns a tuple with the Dynamic field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDynamic + +`func (o *SnippetResponsePost) SetDynamic(v float32)` + +SetDynamic sets Dynamic field to given value. + +### HasDynamic + +`func (o *SnippetResponsePost) HasDynamic() bool` + +HasDynamic returns a boolean if a field has been set. + +### GetCreatedAt + +`func (o *SnippetResponsePost) GetCreatedAt() time.Time` + +GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. + +### GetCreatedAtOk + +`func (o *SnippetResponsePost) 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 *SnippetResponsePost) SetCreatedAt(v time.Time)` + +SetCreatedAt sets CreatedAt field to given value. + +### HasCreatedAt + +`func (o *SnippetResponsePost) HasCreatedAt() bool` + +HasCreatedAt returns a boolean if a field has been set. + +### SetCreatedAtNil + +`func (o *SnippetResponsePost) SetCreatedAtNil(b bool)` + + SetCreatedAtNil sets the value for CreatedAt to be an explicit nil + +### UnsetCreatedAt +`func (o *SnippetResponsePost) UnsetCreatedAt()` + +UnsetCreatedAt ensures that no value is present for CreatedAt, not even an explicit nil +### GetDeletedAt + +`func (o *SnippetResponsePost) GetDeletedAt() time.Time` + +GetDeletedAt returns the DeletedAt field if non-nil, zero value otherwise. + +### GetDeletedAtOk + +`func (o *SnippetResponsePost) GetDeletedAtOk() (*time.Time, bool)` + +GetDeletedAtOk returns a tuple with the DeletedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDeletedAt + +`func (o *SnippetResponsePost) SetDeletedAt(v time.Time)` + +SetDeletedAt sets DeletedAt field to given value. + +### HasDeletedAt + +`func (o *SnippetResponsePost) HasDeletedAt() bool` + +HasDeletedAt returns a boolean if a field has been set. + +### SetDeletedAtNil + +`func (o *SnippetResponsePost) SetDeletedAtNil(b bool)` + + SetDeletedAtNil sets the value for DeletedAt to be an explicit nil + +### UnsetDeletedAt +`func (o *SnippetResponsePost) UnsetDeletedAt()` + +UnsetDeletedAt ensures that no value is present for DeletedAt, not even an explicit nil +### GetUpdatedAt + +`func (o *SnippetResponsePost) GetUpdatedAt() time.Time` + +GetUpdatedAt returns the UpdatedAt field if non-nil, zero value otherwise. + +### GetUpdatedAtOk + +`func (o *SnippetResponsePost) 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 *SnippetResponsePost) SetUpdatedAt(v time.Time)` + +SetUpdatedAt sets UpdatedAt field to given value. + +### HasUpdatedAt + +`func (o *SnippetResponsePost) HasUpdatedAt() bool` + +HasUpdatedAt returns a boolean if a field has been set. + +### SetUpdatedAtNil + +`func (o *SnippetResponsePost) SetUpdatedAtNil(b bool)` + + SetUpdatedAtNil sets the value for UpdatedAt to be an explicit nil + +### UnsetUpdatedAt +`func (o *SnippetResponsePost) UnsetUpdatedAt()` + +UnsetUpdatedAt ensures that no value is present for UpdatedAt, not even an explicit nil +### GetServiceID + +`func (o *SnippetResponsePost) GetServiceID() string` + +GetServiceID returns the ServiceID field if non-nil, zero value otherwise. + +### GetServiceIDOk + +`func (o *SnippetResponsePost) GetServiceIDOk() (*string, bool)` + +GetServiceIDOk returns a tuple with the ServiceID field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetServiceID + +`func (o *SnippetResponsePost) SetServiceID(v string)` + +SetServiceID sets ServiceID field to given value. + +### HasServiceID + +`func (o *SnippetResponsePost) HasServiceID() bool` + +HasServiceID returns a boolean if a field has been set. + +### GetVersion + +`func (o *SnippetResponsePost) GetVersion() string` + +GetVersion returns the Version field if non-nil, zero value otherwise. + +### GetVersionOk + +`func (o *SnippetResponsePost) GetVersionOk() (*string, bool)` + +GetVersionOk returns a tuple with the Version field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVersion + +`func (o *SnippetResponsePost) SetVersion(v string)` + +SetVersion sets Version field to given value. + +### HasVersion + +`func (o *SnippetResponsePost) HasVersion() bool` + +HasVersion returns a boolean if a field has been set. + +### GetID + +`func (o *SnippetResponsePost) GetID() string` + +GetID returns the ID field if non-nil, zero value otherwise. + +### GetIDOk + +`func (o *SnippetResponsePost) 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 *SnippetResponsePost) SetID(v string)` + +SetID sets ID field to given value. + +### HasID + +`func (o *SnippetResponsePost) HasID() bool` + +HasID returns a boolean if a field has been set. + + +[Back to API list](../README.md#documentation-for-api-endpoints) | [Back to README](../README.md) diff --git a/docs/SnippetWithDynamicNumber.md b/docs/SnippetWithDynamicNumber.md new file mode 100644 index 0000000..28e0161 --- /dev/null +++ b/docs/SnippetWithDynamicNumber.md @@ -0,0 +1,158 @@ +# SnippetWithDynamicNumber + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **string** | The name for the snippet. | [optional] +**Type** | Pointer to **string** | The location in generated VCL where the snippet should be placed. | [optional] +**Content** | Pointer to **string** | The VCL code that specifies exactly what the snippet does. | [optional] +**Priority** | Pointer to **string** | Priority determines execution order. Lower numbers execute first. | [optional] [default to "100"] +**Dynamic** | Pointer to **float32** | Sets the snippet version. | [optional] + +## Methods + +### NewSnippetWithDynamicNumber + +`func NewSnippetWithDynamicNumber() *SnippetWithDynamicNumber` + +NewSnippetWithDynamicNumber instantiates a new SnippetWithDynamicNumber object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewSnippetWithDynamicNumberWithDefaults + +`func NewSnippetWithDynamicNumberWithDefaults() *SnippetWithDynamicNumber` + +NewSnippetWithDynamicNumberWithDefaults instantiates a new SnippetWithDynamicNumber object +This 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 *SnippetWithDynamicNumber) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *SnippetWithDynamicNumber) 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 *SnippetWithDynamicNumber) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *SnippetWithDynamicNumber) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetType + +`func (o *SnippetWithDynamicNumber) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *SnippetWithDynamicNumber) 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 *SnippetWithDynamicNumber) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *SnippetWithDynamicNumber) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetContent + +`func (o *SnippetWithDynamicNumber) GetContent() string` + +GetContent returns the Content field if non-nil, zero value otherwise. + +### GetContentOk + +`func (o *SnippetWithDynamicNumber) GetContentOk() (*string, bool)` + +GetContentOk returns a tuple with the Content field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContent + +`func (o *SnippetWithDynamicNumber) SetContent(v string)` + +SetContent sets Content field to given value. + +### HasContent + +`func (o *SnippetWithDynamicNumber) HasContent() bool` + +HasContent returns a boolean if a field has been set. + +### GetPriority + +`func (o *SnippetWithDynamicNumber) GetPriority() string` + +GetPriority returns the Priority field if non-nil, zero value otherwise. + +### GetPriorityOk + +`func (o *SnippetWithDynamicNumber) GetPriorityOk() (*string, 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 *SnippetWithDynamicNumber) SetPriority(v string)` + +SetPriority sets Priority field to given value. + +### HasPriority + +`func (o *SnippetWithDynamicNumber) HasPriority() bool` + +HasPriority returns a boolean if a field has been set. + +### GetDynamic + +`func (o *SnippetWithDynamicNumber) GetDynamic() float32` + +GetDynamic returns the Dynamic field if non-nil, zero value otherwise. + +### GetDynamicOk + +`func (o *SnippetWithDynamicNumber) GetDynamicOk() (*float32, bool)` + +GetDynamicOk returns a tuple with the Dynamic field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDynamic + +`func (o *SnippetWithDynamicNumber) SetDynamic(v float32)` + +SetDynamic sets Dynamic field to given value. + +### HasDynamic + +`func (o *SnippetWithDynamicNumber) HasDynamic() bool` + +HasDynamic returns a boolean if a field has been set. + + +[Back to API list](../README.md#documentation-for-api-endpoints) | [Back to README](../README.md) diff --git a/docs/SnippetWithDynamicNumberAllOf.md b/docs/SnippetWithDynamicNumberAllOf.md new file mode 100644 index 0000000..7711620 --- /dev/null +++ b/docs/SnippetWithDynamicNumberAllOf.md @@ -0,0 +1,54 @@ +# SnippetWithDynamicNumberAllOf + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Dynamic** | Pointer to **float32** | Sets the snippet version. | [optional] + +## Methods + +### NewSnippetWithDynamicNumberAllOf + +`func NewSnippetWithDynamicNumberAllOf() *SnippetWithDynamicNumberAllOf` + +NewSnippetWithDynamicNumberAllOf instantiates a new SnippetWithDynamicNumberAllOf object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewSnippetWithDynamicNumberAllOfWithDefaults + +`func NewSnippetWithDynamicNumberAllOfWithDefaults() *SnippetWithDynamicNumberAllOf` + +NewSnippetWithDynamicNumberAllOfWithDefaults instantiates a new SnippetWithDynamicNumberAllOf object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetDynamic + +`func (o *SnippetWithDynamicNumberAllOf) GetDynamic() float32` + +GetDynamic returns the Dynamic field if non-nil, zero value otherwise. + +### GetDynamicOk + +`func (o *SnippetWithDynamicNumberAllOf) GetDynamicOk() (*float32, bool)` + +GetDynamicOk returns a tuple with the Dynamic field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDynamic + +`func (o *SnippetWithDynamicNumberAllOf) SetDynamic(v float32)` + +SetDynamic sets Dynamic field to given value. + +### HasDynamic + +`func (o *SnippetWithDynamicNumberAllOf) HasDynamic() bool` + +HasDynamic returns a boolean if a field has been set. + + +[Back to API list](../README.md#documentation-for-api-endpoints) | [Back to README](../README.md) diff --git a/docs/ValuesDdos.md b/docs/ValuesDdos.md new file mode 100644 index 0000000..9070cfc --- /dev/null +++ b/docs/ValuesDdos.md @@ -0,0 +1,184 @@ +# ValuesDdos + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DdosActionLimitStreamsConnections** | Pointer to **int32** | For HTTP/2, the number of connections the limit-streams action was applied to. The limit-streams action caps the allowed number of concurrent streams in a connection. | [optional] +**DdosActionLimitStreamsRequests** | Pointer to **int32** | For HTTP/2, the number of requests made on a connection for which the limit-streams action was taken. The limit-streams action caps the allowed number of concurrent streams in a connection. | [optional] +**DdosActionTarpitAccept** | Pointer to **int32** | The number of times the tarpit-accept action was taken. The tarpit-accept action adds a delay when accepting future connections. | [optional] +**DdosActionTarpit** | Pointer to **int32** | The number of times the tarpit action was taken. The tarpit action delays writing the response to the client. | [optional] +**DdosActionClose** | Pointer to **int32** | The number of times the close action was taken. The close action aborts the connection as soon as possible. The close action takes effect either right after accept, right after the client hello, or right after the response was sent. | [optional] +**DdosActionBlackhole** | Pointer to **int32** | The number of times the blackhole action was taken. The blackhole action quietly closes a TCP connection without sending a reset. The blackhole action quietly closes a TCP connection without notifying its peer (all TCP state is dropped). | [optional] + +## Methods + +### NewValuesDdos + +`func NewValuesDdos() *ValuesDdos` + +NewValuesDdos instantiates a new ValuesDdos object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewValuesDdosWithDefaults + +`func NewValuesDdosWithDefaults() *ValuesDdos` + +NewValuesDdosWithDefaults instantiates a new ValuesDdos object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetDdosActionLimitStreamsConnections + +`func (o *ValuesDdos) GetDdosActionLimitStreamsConnections() int32` + +GetDdosActionLimitStreamsConnections returns the DdosActionLimitStreamsConnections field if non-nil, zero value otherwise. + +### GetDdosActionLimitStreamsConnectionsOk + +`func (o *ValuesDdos) GetDdosActionLimitStreamsConnectionsOk() (*int32, bool)` + +GetDdosActionLimitStreamsConnectionsOk returns a tuple with the DdosActionLimitStreamsConnections field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDdosActionLimitStreamsConnections + +`func (o *ValuesDdos) SetDdosActionLimitStreamsConnections(v int32)` + +SetDdosActionLimitStreamsConnections sets DdosActionLimitStreamsConnections field to given value. + +### HasDdosActionLimitStreamsConnections + +`func (o *ValuesDdos) HasDdosActionLimitStreamsConnections() bool` + +HasDdosActionLimitStreamsConnections returns a boolean if a field has been set. + +### GetDdosActionLimitStreamsRequests + +`func (o *ValuesDdos) GetDdosActionLimitStreamsRequests() int32` + +GetDdosActionLimitStreamsRequests returns the DdosActionLimitStreamsRequests field if non-nil, zero value otherwise. + +### GetDdosActionLimitStreamsRequestsOk + +`func (o *ValuesDdos) GetDdosActionLimitStreamsRequestsOk() (*int32, bool)` + +GetDdosActionLimitStreamsRequestsOk returns a tuple with the DdosActionLimitStreamsRequests field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDdosActionLimitStreamsRequests + +`func (o *ValuesDdos) SetDdosActionLimitStreamsRequests(v int32)` + +SetDdosActionLimitStreamsRequests sets DdosActionLimitStreamsRequests field to given value. + +### HasDdosActionLimitStreamsRequests + +`func (o *ValuesDdos) HasDdosActionLimitStreamsRequests() bool` + +HasDdosActionLimitStreamsRequests returns a boolean if a field has been set. + +### GetDdosActionTarpitAccept + +`func (o *ValuesDdos) GetDdosActionTarpitAccept() int32` + +GetDdosActionTarpitAccept returns the DdosActionTarpitAccept field if non-nil, zero value otherwise. + +### GetDdosActionTarpitAcceptOk + +`func (o *ValuesDdos) GetDdosActionTarpitAcceptOk() (*int32, bool)` + +GetDdosActionTarpitAcceptOk returns a tuple with the DdosActionTarpitAccept field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDdosActionTarpitAccept + +`func (o *ValuesDdos) SetDdosActionTarpitAccept(v int32)` + +SetDdosActionTarpitAccept sets DdosActionTarpitAccept field to given value. + +### HasDdosActionTarpitAccept + +`func (o *ValuesDdos) HasDdosActionTarpitAccept() bool` + +HasDdosActionTarpitAccept returns a boolean if a field has been set. + +### GetDdosActionTarpit + +`func (o *ValuesDdos) GetDdosActionTarpit() int32` + +GetDdosActionTarpit returns the DdosActionTarpit field if non-nil, zero value otherwise. + +### GetDdosActionTarpitOk + +`func (o *ValuesDdos) GetDdosActionTarpitOk() (*int32, bool)` + +GetDdosActionTarpitOk returns a tuple with the DdosActionTarpit field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDdosActionTarpit + +`func (o *ValuesDdos) SetDdosActionTarpit(v int32)` + +SetDdosActionTarpit sets DdosActionTarpit field to given value. + +### HasDdosActionTarpit + +`func (o *ValuesDdos) HasDdosActionTarpit() bool` + +HasDdosActionTarpit returns a boolean if a field has been set. + +### GetDdosActionClose + +`func (o *ValuesDdos) GetDdosActionClose() int32` + +GetDdosActionClose returns the DdosActionClose field if non-nil, zero value otherwise. + +### GetDdosActionCloseOk + +`func (o *ValuesDdos) GetDdosActionCloseOk() (*int32, bool)` + +GetDdosActionCloseOk returns a tuple with the DdosActionClose field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDdosActionClose + +`func (o *ValuesDdos) SetDdosActionClose(v int32)` + +SetDdosActionClose sets DdosActionClose field to given value. + +### HasDdosActionClose + +`func (o *ValuesDdos) HasDdosActionClose() bool` + +HasDdosActionClose returns a boolean if a field has been set. + +### GetDdosActionBlackhole + +`func (o *ValuesDdos) GetDdosActionBlackhole() int32` + +GetDdosActionBlackhole returns the DdosActionBlackhole field if non-nil, zero value otherwise. + +### GetDdosActionBlackholeOk + +`func (o *ValuesDdos) GetDdosActionBlackholeOk() (*int32, bool)` + +GetDdosActionBlackholeOk returns a tuple with the DdosActionBlackhole field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDdosActionBlackhole + +`func (o *ValuesDdos) SetDdosActionBlackhole(v int32)` + +SetDdosActionBlackhole sets DdosActionBlackhole field to given value. + +### HasDdosActionBlackhole + +`func (o *ValuesDdos) HasDdosActionBlackhole() bool` + +HasDdosActionBlackhole returns a boolean if a field has been set. + + +[Back to API list](../README.md#documentation-for-api-endpoints) | [Back to README](../README.md) diff --git a/docs/WholePlatformDdosHistoricalAPI.md b/docs/WholePlatformDdosHistoricalAPI.md new file mode 100644 index 0000000..d4e1e41 --- /dev/null +++ b/docs/WholePlatformDdosHistoricalAPI.md @@ -0,0 +1,73 @@ +# WholePlatformDdosHistoricalAPI + +All URIs are relative to *https://api.fastly.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetPlatformDdosHistorical**](WholePlatformDdosHistoricalAPI.md#GetPlatformDdosHistorical) | **GET** `/metrics/platform/ddos` | Get historical DDoS metrics for the entire Fastly platform + + + +## GetPlatformDdosHistorical + +Get historical DDoS metrics for the entire Fastly platform + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + "github.com/fastly/fastly-go/fastly" +) + +func main() { + start := "2021-08-01T00:00:00.000Z" // string | A valid ISO-8601-formatted date and time, or UNIX timestamp, indicating the inclusive start of the query time range. If not provided, a default is chosen based on the provided `downsample` value. (optional) + end := "2020-08-02T00:00:00.000Z" // string | A valid ISO-8601-formatted date and time, or UNIX timestamp, indicating the exclusive end of the query time range. If not provided, a default is chosen based on the provided `downsample` value. (optional) + downsample := "hour" // string | Duration of sample windows. (optional) (default to "hour") + + cfg := fastly.NewConfiguration() + apiClient := fastly.NewAPIClient(cfg) + ctx := fastly.NewAPIKeyContextFromEnv("FASTLY_API_TOKEN") + resp, r, err := apiClient.WholePlatformDdosHistoricalAPI.GetPlatformDdosHistorical(ctx).Start(start).End(end).Downsample(downsample).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `WholePlatformDdosHistoricalAPI.GetPlatformDdosHistorical`: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetPlatformDdosHistorical`: PlatformDdosResponse + fmt.Fprintf(os.Stdout, "Response from `WholePlatformDdosHistoricalAPI.GetPlatformDdosHistorical`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetPlatformDdosHistoricalRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **start** | **string** | A valid ISO-8601-formatted date and time, or UNIX timestamp, indicating the inclusive start of the query time range. If not provided, a default is chosen based on the provided `downsample` value. | **end** | **string** | A valid ISO-8601-formatted date and time, or UNIX timestamp, indicating the exclusive end of the query time range. If not provided, a default is chosen based on the provided `downsample` value. | **downsample** | **string** | Duration of sample windows. | [default to "hour"] + +### Return type + +[**PlatformDdosResponse**](PlatformDdosResponse.md) + +### Authorization + +[API Token](https://developer.fastly.com/reference/api/#authentication) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[Back to top](#) | [Back to API list](../README.md#documentation-for-api-endpoints) | [Back to README](../README.md) diff --git a/fastly/api_kv_store.go b/fastly/api_kv_store.go index 96108c8..d3706ff 100644 --- a/fastly/api_kv_store.go +++ b/fastly/api_kv_store.go @@ -32,9 +32,9 @@ var ( type KvStoreAPI interface { /* - CreateStore Create an kv store. + CreateStore Create a KV store. - Create a new kv store. + Create a new KV store. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return APICreateStoreRequest @@ -46,9 +46,9 @@ type KvStoreAPI interface { CreateStoreExecute(r APICreateStoreRequest) (*StoreResponse, *http.Response, error) /* - DeleteStore Delete an kv store. + DeleteStore Delete a KV store. - An kv store must be empty before it can be deleted. Deleting an kv store that still contains keys will result in a `409` (Conflict). + A KV store must be empty before it can be deleted. Deleting a KV store that still contains keys will result in a `409` (Conflict). @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param storeID @@ -60,9 +60,9 @@ type KvStoreAPI interface { DeleteStoreExecute(r APIDeleteStoreRequest) (*http.Response, error) /* - GetStore Describe an kv store. + GetStore Describe a KV store. - Get an kv store by ID. + Get a KV store by ID. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param storeID @@ -75,7 +75,7 @@ type KvStoreAPI interface { GetStoreExecute(r APIGetStoreRequest) (*StoreResponse, *http.Response, error) /* - GetStores List kv stores. + GetStores List KV stores. Get all stores for a given customer. @@ -117,9 +117,9 @@ func (r APICreateStoreRequest) Execute() (*StoreResponse, *http.Response, error) } /* -CreateStore Create an kv store. +CreateStore Create a KV store. -Create a new kv store. +Create a new KV store. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return APICreateStoreRequest @@ -253,9 +253,9 @@ func (r APIDeleteStoreRequest) Execute() (*http.Response, error) { } /* -DeleteStore Delete an kv store. +DeleteStore Delete a KV store. -An kv store must be empty before it can be deleted. Deleting an kv store that still contains keys will result in a `409` (Conflict). +A KV store must be empty before it can be deleted. Deleting a KV store that still contains keys will result in a `409` (Conflict). @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param storeID @@ -376,9 +376,9 @@ func (r APIGetStoreRequest) Execute() (*StoreResponse, *http.Response, error) { } /* -GetStore Describe an kv store. +GetStore Describe a KV store. -Get an kv store by ID. +Get a KV store by ID. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param storeID @@ -521,7 +521,7 @@ func (r APIGetStoresRequest) Execute() (*InlineResponse2003, *http.Response, err } /* -GetStores List kv stores. +GetStores List KV stores. Get all stores for a given customer. diff --git a/fastly/api_logging_logentries.go b/fastly/api_logging_logentries.go index 13cf532..2e38259 100644 --- a/fastly/api_logging_logentries.go +++ b/fastly/api_logging_logentries.go @@ -180,7 +180,7 @@ func (r *APICreateLogLogentriesRequest) Port(port int32) *APICreateLogLogentries r.port = &port return r } -// Token Use token based authentication ([https://logentries.com/doc/input-token/](https://logentries.com/doc/input-token/)). +// Token Use token based authentication. func (r *APICreateLogLogentriesRequest) Token(token string) *APICreateLogLogentriesRequest { r.token = &token return r @@ -834,7 +834,7 @@ func (r *APIUpdateLogLogentriesRequest) Port(port int32) *APIUpdateLogLogentries r.port = &port return r } -// Token Use token based authentication ([https://logentries.com/doc/input-token/](https://logentries.com/doc/input-token/)). +// Token Use token based authentication. func (r *APIUpdateLogLogentriesRequest) Token(token string) *APIUpdateLogLogentriesRequest { r.token = &token return r diff --git a/fastly/api_snippet.go b/fastly/api_snippet.go index 386d068..aa0f708 100644 --- a/fastly/api_snippet.go +++ b/fastly/api_snippet.go @@ -44,8 +44,8 @@ type SnippetAPI interface { CreateSnippet(ctx context.Context, serviceID string, versionID int32) APICreateSnippetRequest // CreateSnippetExecute executes the request - // @return SnippetResponse - CreateSnippetExecute(r APICreateSnippetRequest) (*SnippetResponse, *http.Response, error) + // @return SnippetResponsePost + CreateSnippetExecute(r APICreateSnippetRequest) (*SnippetResponsePost, *http.Response, error) /* DeleteSnippet Delete a snippet @@ -157,10 +157,10 @@ type APICreateSnippetRequest struct { serviceID string versionID int32 name *string - dynamic *string resourceType *string content *string priority *string + dynamic *string } // Name The name for the snippet. @@ -168,11 +168,6 @@ func (r *APICreateSnippetRequest) Name(name string) *APICreateSnippetRequest { r.name = &name return r } -// Dynamic Sets the snippet version. -func (r *APICreateSnippetRequest) Dynamic(dynamic string) *APICreateSnippetRequest { - r.dynamic = &dynamic - return r -} // ResourceType The location in generated VCL where the snippet should be placed. func (r *APICreateSnippetRequest) ResourceType(resourceType string) *APICreateSnippetRequest { r.resourceType = &resourceType @@ -188,9 +183,14 @@ func (r *APICreateSnippetRequest) Priority(priority string) *APICreateSnippetReq r.priority = &priority return r } +// Dynamic Sets the snippet version. +func (r *APICreateSnippetRequest) Dynamic(dynamic string) *APICreateSnippetRequest { + r.dynamic = &dynamic + return r +} // Execute calls the API using the request data configured. -func (r APICreateSnippetRequest) Execute() (*SnippetResponse, *http.Response, error) { +func (r APICreateSnippetRequest) Execute() (*SnippetResponsePost, *http.Response, error) { return r.APIService.CreateSnippetExecute(r) } @@ -214,13 +214,13 @@ func (a *SnippetAPIService) CreateSnippet(ctx context.Context, serviceID string, } // CreateSnippetExecute executes the request -// @return SnippetResponse -func (a *SnippetAPIService) CreateSnippetExecute(r APICreateSnippetRequest) (*SnippetResponse, *http.Response, error) { +// @return SnippetResponsePost +func (a *SnippetAPIService) CreateSnippetExecute(r APICreateSnippetRequest) (*SnippetResponsePost, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost localVarPostBody any formFiles []formFile - localVarReturnValue *SnippetResponse + localVarReturnValue *SnippetResponsePost ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SnippetAPIService.CreateSnippet") @@ -256,9 +256,6 @@ func (a *SnippetAPIService) CreateSnippetExecute(r APICreateSnippetRequest) (*Sn if r.name != nil { localVarFormParams.Add("name", parameterToString(*r.name, "")) } - if r.dynamic != nil { - localVarFormParams.Add("dynamic", parameterToString(*r.dynamic, "")) - } if r.resourceType != nil { localVarFormParams.Add("type", parameterToString(*r.resourceType, "")) } @@ -268,6 +265,9 @@ func (a *SnippetAPIService) CreateSnippetExecute(r APICreateSnippetRequest) (*Sn if r.priority != nil { localVarFormParams.Add("priority", parameterToString(*r.priority, "")) } + if r.dynamic != nil { + localVarFormParams.Add("dynamic", parameterToString(*r.dynamic, "")) + } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { @@ -1042,10 +1042,10 @@ type APIUpdateSnippetDynamicRequest struct { serviceID string snippetID string name *string - dynamic *string resourceType *string content *string priority *string + dynamic *string } // Name The name for the snippet. @@ -1053,11 +1053,6 @@ func (r *APIUpdateSnippetDynamicRequest) Name(name string) *APIUpdateSnippetDyna r.name = &name return r } -// Dynamic Sets the snippet version. -func (r *APIUpdateSnippetDynamicRequest) Dynamic(dynamic string) *APIUpdateSnippetDynamicRequest { - r.dynamic = &dynamic - return r -} // ResourceType The location in generated VCL where the snippet should be placed. func (r *APIUpdateSnippetDynamicRequest) ResourceType(resourceType string) *APIUpdateSnippetDynamicRequest { r.resourceType = &resourceType @@ -1073,6 +1068,11 @@ func (r *APIUpdateSnippetDynamicRequest) Priority(priority string) *APIUpdateSni r.priority = &priority return r } +// Dynamic Sets the snippet version. +func (r *APIUpdateSnippetDynamicRequest) Dynamic(dynamic string) *APIUpdateSnippetDynamicRequest { + r.dynamic = &dynamic + return r +} // Execute calls the API using the request data configured. func (r APIUpdateSnippetDynamicRequest) Execute() (*SnippetResponse, *http.Response, error) { @@ -1141,9 +1141,6 @@ func (a *SnippetAPIService) UpdateSnippetDynamicExecute(r APIUpdateSnippetDynami if r.name != nil { localVarFormParams.Add("name", parameterToString(*r.name, "")) } - if r.dynamic != nil { - localVarFormParams.Add("dynamic", parameterToString(*r.dynamic, "")) - } if r.resourceType != nil { localVarFormParams.Add("type", parameterToString(*r.resourceType, "")) } @@ -1153,6 +1150,9 @@ func (a *SnippetAPIService) UpdateSnippetDynamicExecute(r APIUpdateSnippetDynami if r.priority != nil { localVarFormParams.Add("priority", parameterToString(*r.priority, "")) } + if r.dynamic != nil { + localVarFormParams.Add("dynamic", parameterToString(*r.dynamic, "")) + } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { diff --git a/fastly/api_whole_platform_ddos_historical.go b/fastly/api_whole_platform_ddos_historical.go new file mode 100644 index 0000000..b72b898 --- /dev/null +++ b/fastly/api_whole_platform_ddos_historical.go @@ -0,0 +1,206 @@ +// Package fastly is an API client library for interacting with most facets of the Fastly API. +package fastly + +/* +Fastly API + +Via the Fastly API you can perform any of the operations that are possible within the management console, including creating services, domains, and backends, configuring rules or uploading your own application code, as well as account operations such as user administration and billing reports. The API is organized into collections of endpoints that allow manipulation of objects related to Fastly services and accounts. For the most accurate and up-to-date API reference content, visit our [Developer Hub](https://developer.fastly.com/reference/api/) + +API version: 1.0.0 +Contact: oss@fastly.com +*/ + +// This code is auto-generated; DO NOT EDIT. + + +import ( + "bytes" + "context" + "io/ioutil" + "net/http" + gourl "net/url" + "strconv" +) + +// Linger please +var ( + _ context.Context +) + +// WholePlatformDdosHistoricalAPI defines an interface for interacting with the resource. +type WholePlatformDdosHistoricalAPI interface { + + /* + GetPlatformDdosHistorical Get historical DDoS metrics for the entire Fastly platform + + Fetches historical DDoS metrics for the entire Fastly platform. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return APIGetPlatformDdosHistoricalRequest + */ + GetPlatformDdosHistorical(ctx context.Context) APIGetPlatformDdosHistoricalRequest + + // GetPlatformDdosHistoricalExecute executes the request + // @return PlatformDdosResponse + GetPlatformDdosHistoricalExecute(r APIGetPlatformDdosHistoricalRequest) (*PlatformDdosResponse, *http.Response, error) +} + +// WholePlatformDdosHistoricalAPIService WholePlatformDdosHistoricalAPI service +type WholePlatformDdosHistoricalAPIService service + +// APIGetPlatformDdosHistoricalRequest represents a request for the resource. +type APIGetPlatformDdosHistoricalRequest struct { + ctx context.Context + APIService WholePlatformDdosHistoricalAPI + start *string + end *string + downsample *string +} + +// Start A valid ISO-8601-formatted date and time, or UNIX timestamp, indicating the inclusive start of the query time range. If not provided, a default is chosen based on the provided `downsample` value. +func (r *APIGetPlatformDdosHistoricalRequest) Start(start string) *APIGetPlatformDdosHistoricalRequest { + r.start = &start + return r +} +// End A valid ISO-8601-formatted date and time, or UNIX timestamp, indicating the exclusive end of the query time range. If not provided, a default is chosen based on the provided `downsample` value. +func (r *APIGetPlatformDdosHistoricalRequest) End(end string) *APIGetPlatformDdosHistoricalRequest { + r.end = &end + return r +} +// Downsample Duration of sample windows. +func (r *APIGetPlatformDdosHistoricalRequest) Downsample(downsample string) *APIGetPlatformDdosHistoricalRequest { + r.downsample = &downsample + return r +} + +// Execute calls the API using the request data configured. +func (r APIGetPlatformDdosHistoricalRequest) Execute() (*PlatformDdosResponse, *http.Response, error) { + return r.APIService.GetPlatformDdosHistoricalExecute(r) +} + +/* +GetPlatformDdosHistorical Get historical DDoS metrics for the entire Fastly platform + +Fetches historical DDoS metrics for the entire Fastly platform. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return APIGetPlatformDdosHistoricalRequest +*/ +func (a *WholePlatformDdosHistoricalAPIService) GetPlatformDdosHistorical(ctx context.Context) APIGetPlatformDdosHistoricalRequest { + return APIGetPlatformDdosHistoricalRequest{ + APIService: a, + ctx: ctx, + } +} + +// GetPlatformDdosHistoricalExecute executes the request +// @return PlatformDdosResponse +func (a *WholePlatformDdosHistoricalAPIService) GetPlatformDdosHistoricalExecute(r APIGetPlatformDdosHistoricalRequest) (*PlatformDdosResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody any + formFiles []formFile + localVarReturnValue *PlatformDdosResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WholePlatformDdosHistoricalAPIService.GetPlatformDdosHistorical") + if err != nil { + return localVarReturnValue, nil, &GenericAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/metrics/platform/ddos" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := gourl.Values{} + localVarFormParams := gourl.Values{} + + if r.start != nil { + localVarQueryParams.Add("start", parameterToString(*r.start, "")) + } + if r.end != nil { + localVarQueryParams.Add("end", parameterToString(*r.end, "")) + } + if r.downsample != nil { + localVarQueryParams.Add("downsample", parameterToString(*r.downsample, "")) + } + // 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["token"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Fastly-Key"] = 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 := ioutil.ReadAll(localVarHTTPResponse.Body) + _ = localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + + if localVarHTTPResponse.Request.Method != http.MethodGet && localVarHTTPResponse.Request.Method != http.MethodHead { + if remaining := localVarHTTPResponse.Header.Get("Fastly-RateLimit-Remaining"); remaining != "" { + if i, err := strconv.Atoi(remaining); err == nil { + a.client.RateLimitRemaining = i + } + } + if reset := localVarHTTPResponse.Header.Get("Fastly-RateLimit-Reset"); reset != "" { + if i, err := strconv.Atoi(reset); err == nil { + a.client.RateLimitReset = i + } + } + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/fastly/client.go b/fastly/client.go index c9b611a..8da2c84 100644 --- a/fastly/client.go +++ b/fastly/client.go @@ -295,6 +295,8 @@ type APIClient struct { WafRulesAPI WafRulesAPI WafTagsAPI WafTagsAPI + + WholePlatformDdosHistoricalAPI WholePlatformDdosHistoricalAPI } type service struct { @@ -430,6 +432,7 @@ func NewAPIClient(cfg *Configuration) *APIClient { c.WafRuleRevisionsAPI = (*WafRuleRevisionsAPIService)(&c.common) c.WafRulesAPI = (*WafRulesAPIService)(&c.common) c.WafTagsAPI = (*WafTagsAPIService)(&c.common) + c.WholePlatformDdosHistoricalAPI = (*WholePlatformDdosHistoricalAPIService)(&c.common) return c } diff --git a/fastly/configuration.go b/fastly/configuration.go index 2d8780f..92e1f20 100644 --- a/fastly/configuration.go +++ b/fastly/configuration.go @@ -105,7 +105,7 @@ type Configuration struct { func NewConfiguration() *Configuration { cfg := &Configuration{ DefaultHeader: make(map[string]string), - UserAgent: "fastly-go/v1.0.0-beta.21", + UserAgent: "fastly-go/v1.0.0-beta.22", Debug: false, Servers: ServerConfigurations{ { @@ -3280,6 +3280,12 @@ func NewConfiguration() *Configuration { Description: "No description provided", }, }, + "WholePlatformDdosHistoricalAPIService.GetPlatformDdosHistorical": { + { + URL: "https://api.fastly.com", + Description: "No description provided", + }, + }, }, } return cfg diff --git a/fastly/model_historical_ddos.go b/fastly/model_historical_ddos.go new file mode 100644 index 0000000..8c3e6dd --- /dev/null +++ b/fastly/model_historical_ddos.go @@ -0,0 +1,279 @@ +// Package fastly is an API client library for interacting with most facets of the Fastly API. +package fastly + +/* +Fastly API + +Via the Fastly API you can perform any of the operations that are possible within the management console, including creating services, domains, and backends, configuring rules or uploading your own application code, as well as account operations such as user administration and billing reports. The API is organized into collections of endpoints that allow manipulation of objects related to Fastly services and accounts. For the most accurate and up-to-date API reference content, visit our [Developer Hub](https://developer.fastly.com/reference/api/) + +API version: 1.0.0 +Contact: oss@fastly.com +*/ + +// This code is auto-generated; DO NOT EDIT. + + +import ( + "encoding/json" +) + +// HistoricalDdos struct for HistoricalDdos +type HistoricalDdos struct { + // Whether or not we were able to successfully execute the query. + Status *string `json:"status,omitempty"` + Meta *HistoricalDdosMeta `json:"meta,omitempty"` + // If the query was not successful, this will provide a string that explains why. + Msg NullableString `json:"msg,omitempty"` + // A list of [entries](#entry-data-model). + Data []PlatformDdosDataItems `json:"data,omitempty"` + AdditionalProperties map[string]any +} + +type _HistoricalDdos HistoricalDdos + +// NewHistoricalDdos instantiates a new HistoricalDdos object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewHistoricalDdos() *HistoricalDdos { + this := HistoricalDdos{} + return &this +} + +// NewHistoricalDdosWithDefaults instantiates a new HistoricalDdos object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewHistoricalDdosWithDefaults() *HistoricalDdos { + this := HistoricalDdos{} + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *HistoricalDdos) GetStatus() string { + if o == nil || o.Status == nil { + 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 *HistoricalDdos) GetStatusOk() (*string, bool) { + if o == nil || o.Status == nil { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *HistoricalDdos) HasStatus() bool { + if o != nil && o.Status != nil { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *HistoricalDdos) SetStatus(v string) { + o.Status = &v +} + +// GetMeta returns the Meta field value if set, zero value otherwise. +func (o *HistoricalDdos) GetMeta() HistoricalDdosMeta { + if o == nil || o.Meta == nil { + var ret HistoricalDdosMeta + 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 *HistoricalDdos) GetMetaOk() (*HistoricalDdosMeta, bool) { + if o == nil || o.Meta == nil { + return nil, false + } + return o.Meta, true +} + +// HasMeta returns a boolean if a field has been set. +func (o *HistoricalDdos) HasMeta() bool { + if o != nil && o.Meta != nil { + return true + } + + return false +} + +// SetMeta gets a reference to the given HistoricalDdosMeta and assigns it to the Meta field. +func (o *HistoricalDdos) SetMeta(v HistoricalDdosMeta) { + o.Meta = &v +} + +// GetMsg returns the Msg field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *HistoricalDdos) GetMsg() string { + if o == nil || o.Msg.Get() == nil { + var ret string + return ret + } + return *o.Msg.Get() +} + +// GetMsgOk returns a tuple with the Msg 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 *HistoricalDdos) GetMsgOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Msg.Get(), o.Msg.IsSet() +} + +// HasMsg returns a boolean if a field has been set. +func (o *HistoricalDdos) HasMsg() bool { + if o != nil && o.Msg.IsSet() { + return true + } + + return false +} + +// SetMsg gets a reference to the given NullableString and assigns it to the Msg field. +func (o *HistoricalDdos) SetMsg(v string) { + o.Msg.Set(&v) +} +// SetMsgNil sets the value for Msg to be an explicit nil +func (o *HistoricalDdos) SetMsgNil() { + o.Msg.Set(nil) +} + +// UnsetMsg ensures that no value is present for Msg, not even an explicit nil +func (o *HistoricalDdos) UnsetMsg() { + o.Msg.Unset() +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *HistoricalDdos) GetData() []PlatformDdosDataItems { + if o == nil || o.Data == nil { + var ret []PlatformDdosDataItems + 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 *HistoricalDdos) GetDataOk() ([]PlatformDdosDataItems, bool) { + if o == nil || o.Data == nil { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *HistoricalDdos) HasData() bool { + if o != nil && o.Data != nil { + return true + } + + return false +} + +// SetData gets a reference to the given []PlatformDdosDataItems and assigns it to the Data field. +func (o *HistoricalDdos) SetData(v []PlatformDdosDataItems) { + o.Data = v +} + +// MarshalJSON implements the json.Marshaler interface. +// Marshaler is the interface implemented by types that can marshal themselves into valid JSON. +func (o HistoricalDdos) MarshalJSON() ([]byte, error) { + toSerialize := map[string]any{} + if o.Status != nil { + toSerialize["status"] = o.Status + } + if o.Meta != nil { + toSerialize["meta"] = o.Meta + } + if o.Msg.IsSet() { + toSerialize["msg"] = o.Msg.Get() + } + if o.Data != nil { + toSerialize["data"] = o.Data + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return json.Marshal(toSerialize) +} + +// UnmarshalJSON implements the Unmarshaler interface. +// Unmarshaler is the interface implemented by types that can unmarshal a JSON description of themselves. +func (o *HistoricalDdos) UnmarshalJSON(bytes []byte) (err error) { + varHistoricalDdos := _HistoricalDdos{} + + if err = json.Unmarshal(bytes, &varHistoricalDdos); err == nil { + *o = HistoricalDdos(varHistoricalDdos) + } + + additionalProperties := make(map[string]any) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "status") + delete(additionalProperties, "meta") + delete(additionalProperties, "msg") + delete(additionalProperties, "data") + o.AdditionalProperties = additionalProperties + } + + return err +} + +// NullableHistoricalDdos is a helper abstraction for handling nullable historicalddos types. +type NullableHistoricalDdos struct { + value *HistoricalDdos + isSet bool +} + +// Get returns the value. +func (v NullableHistoricalDdos) Get() *HistoricalDdos { + return v.value +} + +// Set modifies the value. +func (v *NullableHistoricalDdos) Set(val *HistoricalDdos) { + v.value = val + v.isSet = true +} + +// IsSet indicates if the value was set. +func (v NullableHistoricalDdos) IsSet() bool { + return v.isSet +} + +// Unset removes the value. +func (v *NullableHistoricalDdos) Unset() { + v.value = nil + v.isSet = false +} + +// NewNullableHistoricalDdos returns a pointer to a new instance of NullableHistoricalDdos. +func NewNullableHistoricalDdos(val *HistoricalDdos) *NullableHistoricalDdos { + return &NullableHistoricalDdos{value: val, isSet: true} +} + +// MarshalJSON implements the json.Marshaler interface. +// Marshaler is the interface implemented by types that can marshal themselves into valid JSON. +func (v NullableHistoricalDdos) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +// UnmarshalJSON implements the Unmarshaler interface. +// Unmarshaler is the interface implemented by types that can unmarshal a JSON description of themselves. +func (v *NullableHistoricalDdos) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/fastly/model_historical_ddos_meta.go b/fastly/model_historical_ddos_meta.go new file mode 100644 index 0000000..2d17ce2 --- /dev/null +++ b/fastly/model_historical_ddos_meta.go @@ -0,0 +1,270 @@ +// Package fastly is an API client library for interacting with most facets of the Fastly API. +package fastly + +/* +Fastly API + +Via the Fastly API you can perform any of the operations that are possible within the management console, including creating services, domains, and backends, configuring rules or uploading your own application code, as well as account operations such as user administration and billing reports. The API is organized into collections of endpoints that allow manipulation of objects related to Fastly services and accounts. For the most accurate and up-to-date API reference content, visit our [Developer Hub](https://developer.fastly.com/reference/api/) + +API version: 1.0.0 +Contact: oss@fastly.com +*/ + +// This code is auto-generated; DO NOT EDIT. + + +import ( + "encoding/json" +) + +// HistoricalDdosMeta Meta information about the scope of the query in a human readable format. +type HistoricalDdosMeta struct { + // Start time that was used to perform the query as an ISO-8601-formatted date and time. + Start *string `json:"start,omitempty"` + // End time that was used to perform the query as an ISO-8601-formatted date and time. + End *string `json:"end,omitempty"` + // Downsample that was used to perform the query. One of `hour` or `day`. + Downsample *string `json:"downsample,omitempty"` + // A comma-separated list of the metrics that were requested. + Metric *string `json:"metric,omitempty"` + AdditionalProperties map[string]any +} + +type _HistoricalDdosMeta HistoricalDdosMeta + +// NewHistoricalDdosMeta instantiates a new HistoricalDdosMeta object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewHistoricalDdosMeta() *HistoricalDdosMeta { + this := HistoricalDdosMeta{} + return &this +} + +// NewHistoricalDdosMetaWithDefaults instantiates a new HistoricalDdosMeta object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewHistoricalDdosMetaWithDefaults() *HistoricalDdosMeta { + this := HistoricalDdosMeta{} + return &this +} + +// GetStart returns the Start field value if set, zero value otherwise. +func (o *HistoricalDdosMeta) GetStart() string { + if o == nil || o.Start == nil { + var ret string + return ret + } + return *o.Start +} + +// GetStartOk returns a tuple with the Start field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HistoricalDdosMeta) GetStartOk() (*string, bool) { + if o == nil || o.Start == nil { + return nil, false + } + return o.Start, true +} + +// HasStart returns a boolean if a field has been set. +func (o *HistoricalDdosMeta) HasStart() bool { + if o != nil && o.Start != nil { + return true + } + + return false +} + +// SetStart gets a reference to the given string and assigns it to the Start field. +func (o *HistoricalDdosMeta) SetStart(v string) { + o.Start = &v +} + +// GetEnd returns the End field value if set, zero value otherwise. +func (o *HistoricalDdosMeta) GetEnd() string { + if o == nil || o.End == nil { + var ret string + return ret + } + return *o.End +} + +// GetEndOk returns a tuple with the End field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HistoricalDdosMeta) GetEndOk() (*string, bool) { + if o == nil || o.End == nil { + return nil, false + } + return o.End, true +} + +// HasEnd returns a boolean if a field has been set. +func (o *HistoricalDdosMeta) HasEnd() bool { + if o != nil && o.End != nil { + return true + } + + return false +} + +// SetEnd gets a reference to the given string and assigns it to the End field. +func (o *HistoricalDdosMeta) SetEnd(v string) { + o.End = &v +} + +// GetDownsample returns the Downsample field value if set, zero value otherwise. +func (o *HistoricalDdosMeta) GetDownsample() string { + if o == nil || o.Downsample == nil { + var ret string + return ret + } + return *o.Downsample +} + +// GetDownsampleOk returns a tuple with the Downsample field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HistoricalDdosMeta) GetDownsampleOk() (*string, bool) { + if o == nil || o.Downsample == nil { + return nil, false + } + return o.Downsample, true +} + +// HasDownsample returns a boolean if a field has been set. +func (o *HistoricalDdosMeta) HasDownsample() bool { + if o != nil && o.Downsample != nil { + return true + } + + return false +} + +// SetDownsample gets a reference to the given string and assigns it to the Downsample field. +func (o *HistoricalDdosMeta) SetDownsample(v string) { + o.Downsample = &v +} + +// GetMetric returns the Metric field value if set, zero value otherwise. +func (o *HistoricalDdosMeta) GetMetric() string { + if o == nil || o.Metric == nil { + var ret string + return ret + } + return *o.Metric +} + +// GetMetricOk returns a tuple with the Metric field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HistoricalDdosMeta) GetMetricOk() (*string, bool) { + if o == nil || o.Metric == nil { + return nil, false + } + return o.Metric, true +} + +// HasMetric returns a boolean if a field has been set. +func (o *HistoricalDdosMeta) HasMetric() bool { + if o != nil && o.Metric != nil { + return true + } + + return false +} + +// SetMetric gets a reference to the given string and assigns it to the Metric field. +func (o *HistoricalDdosMeta) SetMetric(v string) { + o.Metric = &v +} + +// MarshalJSON implements the json.Marshaler interface. +// Marshaler is the interface implemented by types that can marshal themselves into valid JSON. +func (o HistoricalDdosMeta) MarshalJSON() ([]byte, error) { + toSerialize := map[string]any{} + if o.Start != nil { + toSerialize["start"] = o.Start + } + if o.End != nil { + toSerialize["end"] = o.End + } + if o.Downsample != nil { + toSerialize["downsample"] = o.Downsample + } + if o.Metric != nil { + toSerialize["metric"] = o.Metric + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return json.Marshal(toSerialize) +} + +// UnmarshalJSON implements the Unmarshaler interface. +// Unmarshaler is the interface implemented by types that can unmarshal a JSON description of themselves. +func (o *HistoricalDdosMeta) UnmarshalJSON(bytes []byte) (err error) { + varHistoricalDdosMeta := _HistoricalDdosMeta{} + + if err = json.Unmarshal(bytes, &varHistoricalDdosMeta); err == nil { + *o = HistoricalDdosMeta(varHistoricalDdosMeta) + } + + additionalProperties := make(map[string]any) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "start") + delete(additionalProperties, "end") + delete(additionalProperties, "downsample") + delete(additionalProperties, "metric") + o.AdditionalProperties = additionalProperties + } + + return err +} + +// NullableHistoricalDdosMeta is a helper abstraction for handling nullable historicalddosmeta types. +type NullableHistoricalDdosMeta struct { + value *HistoricalDdosMeta + isSet bool +} + +// Get returns the value. +func (v NullableHistoricalDdosMeta) Get() *HistoricalDdosMeta { + return v.value +} + +// Set modifies the value. +func (v *NullableHistoricalDdosMeta) Set(val *HistoricalDdosMeta) { + v.value = val + v.isSet = true +} + +// IsSet indicates if the value was set. +func (v NullableHistoricalDdosMeta) IsSet() bool { + return v.isSet +} + +// Unset removes the value. +func (v *NullableHistoricalDdosMeta) Unset() { + v.value = nil + v.isSet = false +} + +// NewNullableHistoricalDdosMeta returns a pointer to a new instance of NullableHistoricalDdosMeta. +func NewNullableHistoricalDdosMeta(val *HistoricalDdosMeta) *NullableHistoricalDdosMeta { + return &NullableHistoricalDdosMeta{value: val, isSet: true} +} + +// MarshalJSON implements the json.Marshaler interface. +// Marshaler is the interface implemented by types that can marshal themselves into valid JSON. +func (v NullableHistoricalDdosMeta) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +// UnmarshalJSON implements the Unmarshaler interface. +// Unmarshaler is the interface implemented by types that can unmarshal a JSON description of themselves. +func (v *NullableHistoricalDdosMeta) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/fastly/model_historical_field_results_attributes.go b/fastly/model_historical_field_results_attributes.go index 270548c..4888c72 100644 --- a/fastly/model_historical_field_results_attributes.go +++ b/fastly/model_historical_field_results_attributes.go @@ -453,6 +453,24 @@ type HistoricalFieldResultsAttributes struct { DdosActionClose *int32 `json:"ddos_action_close,omitempty"` // The number of times the blackhole action was taken. The blackhole action quietly closes a TCP connection without sending a reset. The blackhole action quietly closes a TCP connection without notifying its peer (all TCP state is dropped). DdosActionBlackhole *int32 `json:"ddos_action_blackhole,omitempty"` + // The number of challenge-start tokens created. + BotChallengeStarts *int32 `json:"bot_challenge_starts,omitempty"` + // The number of challenge-complete tokens that passed validation. + BotChallengeCompleteTokensPassed *int32 `json:"bot_challenge_complete_tokens_passed,omitempty"` + // The number of challenge-complete tokens that failed validation. + BotChallengeCompleteTokensFailed *int32 `json:"bot_challenge_complete_tokens_failed,omitempty"` + // The number of challenge-complete tokens checked. + BotChallengeCompleteTokensChecked *int32 `json:"bot_challenge_complete_tokens_checked,omitempty"` + // The number of challenge-complete tokens not checked because the feature was disabled. + BotChallengeCompleteTokensDisabled *int32 `json:"bot_challenge_complete_tokens_disabled,omitempty"` + // The number of challenge-complete tokens issued. For example, issuing a challenge-complete token after a series of CAPTCHA challenges ending in success. + BotChallengeCompleteTokensIssued *int32 `json:"bot_challenge_complete_tokens_issued,omitempty"` + // The number of challenges issued. For example, the issuance of a CAPTCHA challenge. + BotChallengesIssued *int32 `json:"bot_challenges_issued,omitempty"` + // The number of successful challenge solutions processed. For example, a correct CAPTCHA solution. + BotChallengesSucceeded *int32 `json:"bot_challenges_succeeded,omitempty"` + // The number of failed challenge solutions processed. For example, an incorrect CAPTCHA solution. + BotChallengesFailed *int32 `json:"bot_challenges_failed,omitempty"` ServiceID *ReadOnlyIDService `json:"service_id,omitempty"` StartTime *int32 `json:"start_time,omitempty"` AdditionalProperties map[string]any @@ -7405,6 +7423,294 @@ func (o *HistoricalFieldResultsAttributes) SetDdosActionBlackhole(v int32) { o.DdosActionBlackhole = &v } +// GetBotChallengeStarts returns the BotChallengeStarts field value if set, zero value otherwise. +func (o *HistoricalFieldResultsAttributes) GetBotChallengeStarts() int32 { + if o == nil || o.BotChallengeStarts == nil { + var ret int32 + return ret + } + return *o.BotChallengeStarts +} + +// GetBotChallengeStartsOk returns a tuple with the BotChallengeStarts field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HistoricalFieldResultsAttributes) GetBotChallengeStartsOk() (*int32, bool) { + if o == nil || o.BotChallengeStarts == nil { + return nil, false + } + return o.BotChallengeStarts, true +} + +// HasBotChallengeStarts returns a boolean if a field has been set. +func (o *HistoricalFieldResultsAttributes) HasBotChallengeStarts() bool { + if o != nil && o.BotChallengeStarts != nil { + return true + } + + return false +} + +// SetBotChallengeStarts gets a reference to the given int32 and assigns it to the BotChallengeStarts field. +func (o *HistoricalFieldResultsAttributes) SetBotChallengeStarts(v int32) { + o.BotChallengeStarts = &v +} + +// GetBotChallengeCompleteTokensPassed returns the BotChallengeCompleteTokensPassed field value if set, zero value otherwise. +func (o *HistoricalFieldResultsAttributes) GetBotChallengeCompleteTokensPassed() int32 { + if o == nil || o.BotChallengeCompleteTokensPassed == nil { + var ret int32 + return ret + } + return *o.BotChallengeCompleteTokensPassed +} + +// GetBotChallengeCompleteTokensPassedOk returns a tuple with the BotChallengeCompleteTokensPassed field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HistoricalFieldResultsAttributes) GetBotChallengeCompleteTokensPassedOk() (*int32, bool) { + if o == nil || o.BotChallengeCompleteTokensPassed == nil { + return nil, false + } + return o.BotChallengeCompleteTokensPassed, true +} + +// HasBotChallengeCompleteTokensPassed returns a boolean if a field has been set. +func (o *HistoricalFieldResultsAttributes) HasBotChallengeCompleteTokensPassed() bool { + if o != nil && o.BotChallengeCompleteTokensPassed != nil { + return true + } + + return false +} + +// SetBotChallengeCompleteTokensPassed gets a reference to the given int32 and assigns it to the BotChallengeCompleteTokensPassed field. +func (o *HistoricalFieldResultsAttributes) SetBotChallengeCompleteTokensPassed(v int32) { + o.BotChallengeCompleteTokensPassed = &v +} + +// GetBotChallengeCompleteTokensFailed returns the BotChallengeCompleteTokensFailed field value if set, zero value otherwise. +func (o *HistoricalFieldResultsAttributes) GetBotChallengeCompleteTokensFailed() int32 { + if o == nil || o.BotChallengeCompleteTokensFailed == nil { + var ret int32 + return ret + } + return *o.BotChallengeCompleteTokensFailed +} + +// GetBotChallengeCompleteTokensFailedOk returns a tuple with the BotChallengeCompleteTokensFailed field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HistoricalFieldResultsAttributes) GetBotChallengeCompleteTokensFailedOk() (*int32, bool) { + if o == nil || o.BotChallengeCompleteTokensFailed == nil { + return nil, false + } + return o.BotChallengeCompleteTokensFailed, true +} + +// HasBotChallengeCompleteTokensFailed returns a boolean if a field has been set. +func (o *HistoricalFieldResultsAttributes) HasBotChallengeCompleteTokensFailed() bool { + if o != nil && o.BotChallengeCompleteTokensFailed != nil { + return true + } + + return false +} + +// SetBotChallengeCompleteTokensFailed gets a reference to the given int32 and assigns it to the BotChallengeCompleteTokensFailed field. +func (o *HistoricalFieldResultsAttributes) SetBotChallengeCompleteTokensFailed(v int32) { + o.BotChallengeCompleteTokensFailed = &v +} + +// GetBotChallengeCompleteTokensChecked returns the BotChallengeCompleteTokensChecked field value if set, zero value otherwise. +func (o *HistoricalFieldResultsAttributes) GetBotChallengeCompleteTokensChecked() int32 { + if o == nil || o.BotChallengeCompleteTokensChecked == nil { + var ret int32 + return ret + } + return *o.BotChallengeCompleteTokensChecked +} + +// GetBotChallengeCompleteTokensCheckedOk returns a tuple with the BotChallengeCompleteTokensChecked field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HistoricalFieldResultsAttributes) GetBotChallengeCompleteTokensCheckedOk() (*int32, bool) { + if o == nil || o.BotChallengeCompleteTokensChecked == nil { + return nil, false + } + return o.BotChallengeCompleteTokensChecked, true +} + +// HasBotChallengeCompleteTokensChecked returns a boolean if a field has been set. +func (o *HistoricalFieldResultsAttributes) HasBotChallengeCompleteTokensChecked() bool { + if o != nil && o.BotChallengeCompleteTokensChecked != nil { + return true + } + + return false +} + +// SetBotChallengeCompleteTokensChecked gets a reference to the given int32 and assigns it to the BotChallengeCompleteTokensChecked field. +func (o *HistoricalFieldResultsAttributes) SetBotChallengeCompleteTokensChecked(v int32) { + o.BotChallengeCompleteTokensChecked = &v +} + +// GetBotChallengeCompleteTokensDisabled returns the BotChallengeCompleteTokensDisabled field value if set, zero value otherwise. +func (o *HistoricalFieldResultsAttributes) GetBotChallengeCompleteTokensDisabled() int32 { + if o == nil || o.BotChallengeCompleteTokensDisabled == nil { + var ret int32 + return ret + } + return *o.BotChallengeCompleteTokensDisabled +} + +// GetBotChallengeCompleteTokensDisabledOk returns a tuple with the BotChallengeCompleteTokensDisabled field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HistoricalFieldResultsAttributes) GetBotChallengeCompleteTokensDisabledOk() (*int32, bool) { + if o == nil || o.BotChallengeCompleteTokensDisabled == nil { + return nil, false + } + return o.BotChallengeCompleteTokensDisabled, true +} + +// HasBotChallengeCompleteTokensDisabled returns a boolean if a field has been set. +func (o *HistoricalFieldResultsAttributes) HasBotChallengeCompleteTokensDisabled() bool { + if o != nil && o.BotChallengeCompleteTokensDisabled != nil { + return true + } + + return false +} + +// SetBotChallengeCompleteTokensDisabled gets a reference to the given int32 and assigns it to the BotChallengeCompleteTokensDisabled field. +func (o *HistoricalFieldResultsAttributes) SetBotChallengeCompleteTokensDisabled(v int32) { + o.BotChallengeCompleteTokensDisabled = &v +} + +// GetBotChallengeCompleteTokensIssued returns the BotChallengeCompleteTokensIssued field value if set, zero value otherwise. +func (o *HistoricalFieldResultsAttributes) GetBotChallengeCompleteTokensIssued() int32 { + if o == nil || o.BotChallengeCompleteTokensIssued == nil { + var ret int32 + return ret + } + return *o.BotChallengeCompleteTokensIssued +} + +// GetBotChallengeCompleteTokensIssuedOk returns a tuple with the BotChallengeCompleteTokensIssued field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HistoricalFieldResultsAttributes) GetBotChallengeCompleteTokensIssuedOk() (*int32, bool) { + if o == nil || o.BotChallengeCompleteTokensIssued == nil { + return nil, false + } + return o.BotChallengeCompleteTokensIssued, true +} + +// HasBotChallengeCompleteTokensIssued returns a boolean if a field has been set. +func (o *HistoricalFieldResultsAttributes) HasBotChallengeCompleteTokensIssued() bool { + if o != nil && o.BotChallengeCompleteTokensIssued != nil { + return true + } + + return false +} + +// SetBotChallengeCompleteTokensIssued gets a reference to the given int32 and assigns it to the BotChallengeCompleteTokensIssued field. +func (o *HistoricalFieldResultsAttributes) SetBotChallengeCompleteTokensIssued(v int32) { + o.BotChallengeCompleteTokensIssued = &v +} + +// GetBotChallengesIssued returns the BotChallengesIssued field value if set, zero value otherwise. +func (o *HistoricalFieldResultsAttributes) GetBotChallengesIssued() int32 { + if o == nil || o.BotChallengesIssued == nil { + var ret int32 + return ret + } + return *o.BotChallengesIssued +} + +// GetBotChallengesIssuedOk returns a tuple with the BotChallengesIssued field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HistoricalFieldResultsAttributes) GetBotChallengesIssuedOk() (*int32, bool) { + if o == nil || o.BotChallengesIssued == nil { + return nil, false + } + return o.BotChallengesIssued, true +} + +// HasBotChallengesIssued returns a boolean if a field has been set. +func (o *HistoricalFieldResultsAttributes) HasBotChallengesIssued() bool { + if o != nil && o.BotChallengesIssued != nil { + return true + } + + return false +} + +// SetBotChallengesIssued gets a reference to the given int32 and assigns it to the BotChallengesIssued field. +func (o *HistoricalFieldResultsAttributes) SetBotChallengesIssued(v int32) { + o.BotChallengesIssued = &v +} + +// GetBotChallengesSucceeded returns the BotChallengesSucceeded field value if set, zero value otherwise. +func (o *HistoricalFieldResultsAttributes) GetBotChallengesSucceeded() int32 { + if o == nil || o.BotChallengesSucceeded == nil { + var ret int32 + return ret + } + return *o.BotChallengesSucceeded +} + +// GetBotChallengesSucceededOk returns a tuple with the BotChallengesSucceeded field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HistoricalFieldResultsAttributes) GetBotChallengesSucceededOk() (*int32, bool) { + if o == nil || o.BotChallengesSucceeded == nil { + return nil, false + } + return o.BotChallengesSucceeded, true +} + +// HasBotChallengesSucceeded returns a boolean if a field has been set. +func (o *HistoricalFieldResultsAttributes) HasBotChallengesSucceeded() bool { + if o != nil && o.BotChallengesSucceeded != nil { + return true + } + + return false +} + +// SetBotChallengesSucceeded gets a reference to the given int32 and assigns it to the BotChallengesSucceeded field. +func (o *HistoricalFieldResultsAttributes) SetBotChallengesSucceeded(v int32) { + o.BotChallengesSucceeded = &v +} + +// GetBotChallengesFailed returns the BotChallengesFailed field value if set, zero value otherwise. +func (o *HistoricalFieldResultsAttributes) GetBotChallengesFailed() int32 { + if o == nil || o.BotChallengesFailed == nil { + var ret int32 + return ret + } + return *o.BotChallengesFailed +} + +// GetBotChallengesFailedOk returns a tuple with the BotChallengesFailed field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HistoricalFieldResultsAttributes) GetBotChallengesFailedOk() (*int32, bool) { + if o == nil || o.BotChallengesFailed == nil { + return nil, false + } + return o.BotChallengesFailed, true +} + +// HasBotChallengesFailed returns a boolean if a field has been set. +func (o *HistoricalFieldResultsAttributes) HasBotChallengesFailed() bool { + if o != nil && o.BotChallengesFailed != nil { + return true + } + + return false +} + +// SetBotChallengesFailed gets a reference to the given int32 and assigns it to the BotChallengesFailed field. +func (o *HistoricalFieldResultsAttributes) SetBotChallengesFailed(v int32) { + o.BotChallengesFailed = &v +} + // GetServiceID returns the ServiceID field value if set, zero value otherwise. func (o *HistoricalFieldResultsAttributes) GetServiceID() ReadOnlyIDService { if o == nil || o.ServiceID == nil { @@ -8121,6 +8427,33 @@ func (o HistoricalFieldResultsAttributes) MarshalJSON() ([]byte, error) { if o.DdosActionBlackhole != nil { toSerialize["ddos_action_blackhole"] = o.DdosActionBlackhole } + if o.BotChallengeStarts != nil { + toSerialize["bot_challenge_starts"] = o.BotChallengeStarts + } + if o.BotChallengeCompleteTokensPassed != nil { + toSerialize["bot_challenge_complete_tokens_passed"] = o.BotChallengeCompleteTokensPassed + } + if o.BotChallengeCompleteTokensFailed != nil { + toSerialize["bot_challenge_complete_tokens_failed"] = o.BotChallengeCompleteTokensFailed + } + if o.BotChallengeCompleteTokensChecked != nil { + toSerialize["bot_challenge_complete_tokens_checked"] = o.BotChallengeCompleteTokensChecked + } + if o.BotChallengeCompleteTokensDisabled != nil { + toSerialize["bot_challenge_complete_tokens_disabled"] = o.BotChallengeCompleteTokensDisabled + } + if o.BotChallengeCompleteTokensIssued != nil { + toSerialize["bot_challenge_complete_tokens_issued"] = o.BotChallengeCompleteTokensIssued + } + if o.BotChallengesIssued != nil { + toSerialize["bot_challenges_issued"] = o.BotChallengesIssued + } + if o.BotChallengesSucceeded != nil { + toSerialize["bot_challenges_succeeded"] = o.BotChallengesSucceeded + } + if o.BotChallengesFailed != nil { + toSerialize["bot_challenges_failed"] = o.BotChallengesFailed + } if o.ServiceID != nil { toSerialize["service_id"] = o.ServiceID } @@ -8363,6 +8696,15 @@ func (o *HistoricalFieldResultsAttributes) UnmarshalJSON(bytes []byte) (err erro delete(additionalProperties, "ddos_action_tarpit") delete(additionalProperties, "ddos_action_close") delete(additionalProperties, "ddos_action_blackhole") + delete(additionalProperties, "bot_challenge_starts") + delete(additionalProperties, "bot_challenge_complete_tokens_passed") + delete(additionalProperties, "bot_challenge_complete_tokens_failed") + delete(additionalProperties, "bot_challenge_complete_tokens_checked") + delete(additionalProperties, "bot_challenge_complete_tokens_disabled") + delete(additionalProperties, "bot_challenge_complete_tokens_issued") + delete(additionalProperties, "bot_challenges_issued") + delete(additionalProperties, "bot_challenges_succeeded") + delete(additionalProperties, "bot_challenges_failed") delete(additionalProperties, "service_id") delete(additionalProperties, "start_time") o.AdditionalProperties = additionalProperties diff --git a/fastly/model_logging_logentries_additional.go b/fastly/model_logging_logentries_additional.go index 2b1080a..0520f22 100644 --- a/fastly/model_logging_logentries_additional.go +++ b/fastly/model_logging_logentries_additional.go @@ -21,7 +21,7 @@ import ( type LoggingLogentriesAdditional struct { // The port number. Port *int32 `json:"port,omitempty"` - // Use token based authentication ([https://logentries.com/doc/input-token/](https://logentries.com/doc/input-token/)). + // Use token based authentication. Token *string `json:"token,omitempty"` UseTLS *LoggingUseTLS `json:"use_tls,omitempty"` // The region to which to stream logs. diff --git a/fastly/model_logging_logentries_response.go b/fastly/model_logging_logentries_response.go index 306223c..a358026 100644 --- a/fastly/model_logging_logentries_response.go +++ b/fastly/model_logging_logentries_response.go @@ -32,7 +32,7 @@ type LoggingLogentriesResponse struct { FormatVersion *string `json:"format_version,omitempty"` // The port number. Port *int32 `json:"port,omitempty"` - // Use token based authentication ([https://logentries.com/doc/input-token/](https://logentries.com/doc/input-token/)). + // Use token based authentication. Token *string `json:"token,omitempty"` UseTLS *LoggingUseTLS `json:"use_tls,omitempty"` // The region to which to stream logs. diff --git a/fastly/model_platform_ddos_data_items.go b/fastly/model_platform_ddos_data_items.go new file mode 100644 index 0000000..d04f590 --- /dev/null +++ b/fastly/model_platform_ddos_data_items.go @@ -0,0 +1,155 @@ +// Package fastly is an API client library for interacting with most facets of the Fastly API. +package fastly + +/* +Fastly API + +Via the Fastly API you can perform any of the operations that are possible within the management console, including creating services, domains, and backends, configuring rules or uploading your own application code, as well as account operations such as user administration and billing reports. The API is organized into collections of endpoints that allow manipulation of objects related to Fastly services and accounts. For the most accurate and up-to-date API reference content, visit our [Developer Hub](https://developer.fastly.com/reference/api/) + +API version: 1.0.0 +Contact: oss@fastly.com +*/ + +// This code is auto-generated; DO NOT EDIT. + + +import ( + "encoding/json" +) + +// PlatformDdosDataItems struct for PlatformDdosDataItems +type PlatformDdosDataItems struct { + Values *Values `json:"values,omitempty"` + AdditionalProperties map[string]any +} + +type _PlatformDdosDataItems PlatformDdosDataItems + +// NewPlatformDdosDataItems instantiates a new PlatformDdosDataItems object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPlatformDdosDataItems() *PlatformDdosDataItems { + this := PlatformDdosDataItems{} + return &this +} + +// NewPlatformDdosDataItemsWithDefaults instantiates a new PlatformDdosDataItems object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPlatformDdosDataItemsWithDefaults() *PlatformDdosDataItems { + this := PlatformDdosDataItems{} + return &this +} + +// GetValues returns the Values field value if set, zero value otherwise. +func (o *PlatformDdosDataItems) GetValues() Values { + if o == nil || o.Values == nil { + var ret Values + return ret + } + return *o.Values +} + +// GetValuesOk returns a tuple with the Values field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PlatformDdosDataItems) GetValuesOk() (*Values, bool) { + if o == nil || o.Values == nil { + return nil, false + } + return o.Values, true +} + +// HasValues returns a boolean if a field has been set. +func (o *PlatformDdosDataItems) HasValues() bool { + if o != nil && o.Values != nil { + return true + } + + return false +} + +// SetValues gets a reference to the given Values and assigns it to the Values field. +func (o *PlatformDdosDataItems) SetValues(v Values) { + o.Values = &v +} + +// MarshalJSON implements the json.Marshaler interface. +// Marshaler is the interface implemented by types that can marshal themselves into valid JSON. +func (o PlatformDdosDataItems) MarshalJSON() ([]byte, error) { + toSerialize := map[string]any{} + if o.Values != nil { + toSerialize["values"] = o.Values + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return json.Marshal(toSerialize) +} + +// UnmarshalJSON implements the Unmarshaler interface. +// Unmarshaler is the interface implemented by types that can unmarshal a JSON description of themselves. +func (o *PlatformDdosDataItems) UnmarshalJSON(bytes []byte) (err error) { + varPlatformDdosDataItems := _PlatformDdosDataItems{} + + if err = json.Unmarshal(bytes, &varPlatformDdosDataItems); err == nil { + *o = PlatformDdosDataItems(varPlatformDdosDataItems) + } + + additionalProperties := make(map[string]any) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "values") + o.AdditionalProperties = additionalProperties + } + + return err +} + +// NullablePlatformDdosDataItems is a helper abstraction for handling nullable platformddosdataitems types. +type NullablePlatformDdosDataItems struct { + value *PlatformDdosDataItems + isSet bool +} + +// Get returns the value. +func (v NullablePlatformDdosDataItems) Get() *PlatformDdosDataItems { + return v.value +} + +// Set modifies the value. +func (v *NullablePlatformDdosDataItems) Set(val *PlatformDdosDataItems) { + v.value = val + v.isSet = true +} + +// IsSet indicates if the value was set. +func (v NullablePlatformDdosDataItems) IsSet() bool { + return v.isSet +} + +// Unset removes the value. +func (v *NullablePlatformDdosDataItems) Unset() { + v.value = nil + v.isSet = false +} + +// NewNullablePlatformDdosDataItems returns a pointer to a new instance of NullablePlatformDdosDataItems. +func NewNullablePlatformDdosDataItems(val *PlatformDdosDataItems) *NullablePlatformDdosDataItems { + return &NullablePlatformDdosDataItems{value: val, isSet: true} +} + +// MarshalJSON implements the json.Marshaler interface. +// Marshaler is the interface implemented by types that can marshal themselves into valid JSON. +func (v NullablePlatformDdosDataItems) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +// UnmarshalJSON implements the Unmarshaler interface. +// Unmarshaler is the interface implemented by types that can unmarshal a JSON description of themselves. +func (v *NullablePlatformDdosDataItems) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/fastly/model_platform_ddos_entry.go b/fastly/model_platform_ddos_entry.go new file mode 100644 index 0000000..b4c3bd8 --- /dev/null +++ b/fastly/model_platform_ddos_entry.go @@ -0,0 +1,156 @@ +// Package fastly is an API client library for interacting with most facets of the Fastly API. +package fastly + +/* +Fastly API + +Via the Fastly API you can perform any of the operations that are possible within the management console, including creating services, domains, and backends, configuring rules or uploading your own application code, as well as account operations such as user administration and billing reports. The API is organized into collections of endpoints that allow manipulation of objects related to Fastly services and accounts. For the most accurate and up-to-date API reference content, visit our [Developer Hub](https://developer.fastly.com/reference/api/) + +API version: 1.0.0 +Contact: oss@fastly.com +*/ + +// This code is auto-generated; DO NOT EDIT. + + +import ( + "encoding/json" +) + +// PlatformDdosEntry struct for PlatformDdosEntry +type PlatformDdosEntry struct { + // An array of values representing the metric values at each point in time. Note that this dataset is sparse: only the keys with non-zero values will be included in the record. + Values []ValuesDdos `json:"values,omitempty"` + AdditionalProperties map[string]any +} + +type _PlatformDdosEntry PlatformDdosEntry + +// NewPlatformDdosEntry instantiates a new PlatformDdosEntry object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPlatformDdosEntry() *PlatformDdosEntry { + this := PlatformDdosEntry{} + return &this +} + +// NewPlatformDdosEntryWithDefaults instantiates a new PlatformDdosEntry object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPlatformDdosEntryWithDefaults() *PlatformDdosEntry { + this := PlatformDdosEntry{} + return &this +} + +// GetValues returns the Values field value if set, zero value otherwise. +func (o *PlatformDdosEntry) GetValues() []ValuesDdos { + if o == nil || o.Values == nil { + var ret []ValuesDdos + return ret + } + return o.Values +} + +// GetValuesOk returns a tuple with the Values field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PlatformDdosEntry) GetValuesOk() ([]ValuesDdos, bool) { + if o == nil || o.Values == nil { + return nil, false + } + return o.Values, true +} + +// HasValues returns a boolean if a field has been set. +func (o *PlatformDdosEntry) HasValues() bool { + if o != nil && o.Values != nil { + return true + } + + return false +} + +// SetValues gets a reference to the given []ValuesDdos and assigns it to the Values field. +func (o *PlatformDdosEntry) SetValues(v []ValuesDdos) { + o.Values = v +} + +// MarshalJSON implements the json.Marshaler interface. +// Marshaler is the interface implemented by types that can marshal themselves into valid JSON. +func (o PlatformDdosEntry) MarshalJSON() ([]byte, error) { + toSerialize := map[string]any{} + if o.Values != nil { + toSerialize["values"] = o.Values + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return json.Marshal(toSerialize) +} + +// UnmarshalJSON implements the Unmarshaler interface. +// Unmarshaler is the interface implemented by types that can unmarshal a JSON description of themselves. +func (o *PlatformDdosEntry) UnmarshalJSON(bytes []byte) (err error) { + varPlatformDdosEntry := _PlatformDdosEntry{} + + if err = json.Unmarshal(bytes, &varPlatformDdosEntry); err == nil { + *o = PlatformDdosEntry(varPlatformDdosEntry) + } + + additionalProperties := make(map[string]any) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "values") + o.AdditionalProperties = additionalProperties + } + + return err +} + +// NullablePlatformDdosEntry is a helper abstraction for handling nullable platformddosentry types. +type NullablePlatformDdosEntry struct { + value *PlatformDdosEntry + isSet bool +} + +// Get returns the value. +func (v NullablePlatformDdosEntry) Get() *PlatformDdosEntry { + return v.value +} + +// Set modifies the value. +func (v *NullablePlatformDdosEntry) Set(val *PlatformDdosEntry) { + v.value = val + v.isSet = true +} + +// IsSet indicates if the value was set. +func (v NullablePlatformDdosEntry) IsSet() bool { + return v.isSet +} + +// Unset removes the value. +func (v *NullablePlatformDdosEntry) Unset() { + v.value = nil + v.isSet = false +} + +// NewNullablePlatformDdosEntry returns a pointer to a new instance of NullablePlatformDdosEntry. +func NewNullablePlatformDdosEntry(val *PlatformDdosEntry) *NullablePlatformDdosEntry { + return &NullablePlatformDdosEntry{value: val, isSet: true} +} + +// MarshalJSON implements the json.Marshaler interface. +// Marshaler is the interface implemented by types that can marshal themselves into valid JSON. +func (v NullablePlatformDdosEntry) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +// UnmarshalJSON implements the Unmarshaler interface. +// Unmarshaler is the interface implemented by types that can unmarshal a JSON description of themselves. +func (v *NullablePlatformDdosEntry) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/fastly/model_platform_ddos_response.go b/fastly/model_platform_ddos_response.go new file mode 100644 index 0000000..aa0aa0a --- /dev/null +++ b/fastly/model_platform_ddos_response.go @@ -0,0 +1,279 @@ +// Package fastly is an API client library for interacting with most facets of the Fastly API. +package fastly + +/* +Fastly API + +Via the Fastly API you can perform any of the operations that are possible within the management console, including creating services, domains, and backends, configuring rules or uploading your own application code, as well as account operations such as user administration and billing reports. The API is organized into collections of endpoints that allow manipulation of objects related to Fastly services and accounts. For the most accurate and up-to-date API reference content, visit our [Developer Hub](https://developer.fastly.com/reference/api/) + +API version: 1.0.0 +Contact: oss@fastly.com +*/ + +// This code is auto-generated; DO NOT EDIT. + + +import ( + "encoding/json" +) + +// PlatformDdosResponse struct for PlatformDdosResponse +type PlatformDdosResponse struct { + // Whether or not we were able to successfully execute the query. + Status *string `json:"status,omitempty"` + Meta *HistoricalDdosMeta `json:"meta,omitempty"` + // If the query was not successful, this will provide a string that explains why. + Msg NullableString `json:"msg,omitempty"` + // A list of timeseries. + Data []PlatformDdosEntry `json:"data,omitempty"` + AdditionalProperties map[string]any +} + +type _PlatformDdosResponse PlatformDdosResponse + +// NewPlatformDdosResponse instantiates a new PlatformDdosResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPlatformDdosResponse() *PlatformDdosResponse { + this := PlatformDdosResponse{} + return &this +} + +// NewPlatformDdosResponseWithDefaults instantiates a new PlatformDdosResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPlatformDdosResponseWithDefaults() *PlatformDdosResponse { + this := PlatformDdosResponse{} + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *PlatformDdosResponse) GetStatus() string { + if o == nil || o.Status == nil { + 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 *PlatformDdosResponse) GetStatusOk() (*string, bool) { + if o == nil || o.Status == nil { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *PlatformDdosResponse) HasStatus() bool { + if o != nil && o.Status != nil { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *PlatformDdosResponse) SetStatus(v string) { + o.Status = &v +} + +// GetMeta returns the Meta field value if set, zero value otherwise. +func (o *PlatformDdosResponse) GetMeta() HistoricalDdosMeta { + if o == nil || o.Meta == nil { + var ret HistoricalDdosMeta + 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 *PlatformDdosResponse) GetMetaOk() (*HistoricalDdosMeta, bool) { + if o == nil || o.Meta == nil { + return nil, false + } + return o.Meta, true +} + +// HasMeta returns a boolean if a field has been set. +func (o *PlatformDdosResponse) HasMeta() bool { + if o != nil && o.Meta != nil { + return true + } + + return false +} + +// SetMeta gets a reference to the given HistoricalDdosMeta and assigns it to the Meta field. +func (o *PlatformDdosResponse) SetMeta(v HistoricalDdosMeta) { + o.Meta = &v +} + +// GetMsg returns the Msg field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PlatformDdosResponse) GetMsg() string { + if o == nil || o.Msg.Get() == nil { + var ret string + return ret + } + return *o.Msg.Get() +} + +// GetMsgOk returns a tuple with the Msg 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 *PlatformDdosResponse) GetMsgOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Msg.Get(), o.Msg.IsSet() +} + +// HasMsg returns a boolean if a field has been set. +func (o *PlatformDdosResponse) HasMsg() bool { + if o != nil && o.Msg.IsSet() { + return true + } + + return false +} + +// SetMsg gets a reference to the given NullableString and assigns it to the Msg field. +func (o *PlatformDdosResponse) SetMsg(v string) { + o.Msg.Set(&v) +} +// SetMsgNil sets the value for Msg to be an explicit nil +func (o *PlatformDdosResponse) SetMsgNil() { + o.Msg.Set(nil) +} + +// UnsetMsg ensures that no value is present for Msg, not even an explicit nil +func (o *PlatformDdosResponse) UnsetMsg() { + o.Msg.Unset() +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *PlatformDdosResponse) GetData() []PlatformDdosEntry { + if o == nil || o.Data == nil { + var ret []PlatformDdosEntry + 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 *PlatformDdosResponse) GetDataOk() ([]PlatformDdosEntry, bool) { + if o == nil || o.Data == nil { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *PlatformDdosResponse) HasData() bool { + if o != nil && o.Data != nil { + return true + } + + return false +} + +// SetData gets a reference to the given []PlatformDdosEntry and assigns it to the Data field. +func (o *PlatformDdosResponse) SetData(v []PlatformDdosEntry) { + o.Data = v +} + +// MarshalJSON implements the json.Marshaler interface. +// Marshaler is the interface implemented by types that can marshal themselves into valid JSON. +func (o PlatformDdosResponse) MarshalJSON() ([]byte, error) { + toSerialize := map[string]any{} + if o.Status != nil { + toSerialize["status"] = o.Status + } + if o.Meta != nil { + toSerialize["meta"] = o.Meta + } + if o.Msg.IsSet() { + toSerialize["msg"] = o.Msg.Get() + } + if o.Data != nil { + toSerialize["data"] = o.Data + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return json.Marshal(toSerialize) +} + +// UnmarshalJSON implements the Unmarshaler interface. +// Unmarshaler is the interface implemented by types that can unmarshal a JSON description of themselves. +func (o *PlatformDdosResponse) UnmarshalJSON(bytes []byte) (err error) { + varPlatformDdosResponse := _PlatformDdosResponse{} + + if err = json.Unmarshal(bytes, &varPlatformDdosResponse); err == nil { + *o = PlatformDdosResponse(varPlatformDdosResponse) + } + + additionalProperties := make(map[string]any) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "status") + delete(additionalProperties, "meta") + delete(additionalProperties, "msg") + delete(additionalProperties, "data") + o.AdditionalProperties = additionalProperties + } + + return err +} + +// NullablePlatformDdosResponse is a helper abstraction for handling nullable platformddosresponse types. +type NullablePlatformDdosResponse struct { + value *PlatformDdosResponse + isSet bool +} + +// Get returns the value. +func (v NullablePlatformDdosResponse) Get() *PlatformDdosResponse { + return v.value +} + +// Set modifies the value. +func (v *NullablePlatformDdosResponse) Set(val *PlatformDdosResponse) { + v.value = val + v.isSet = true +} + +// IsSet indicates if the value was set. +func (v NullablePlatformDdosResponse) IsSet() bool { + return v.isSet +} + +// Unset removes the value. +func (v *NullablePlatformDdosResponse) Unset() { + v.value = nil + v.isSet = false +} + +// NewNullablePlatformDdosResponse returns a pointer to a new instance of NullablePlatformDdosResponse. +func NewNullablePlatformDdosResponse(val *PlatformDdosResponse) *NullablePlatformDdosResponse { + return &NullablePlatformDdosResponse{value: val, isSet: true} +} + +// MarshalJSON implements the json.Marshaler interface. +// Marshaler is the interface implemented by types that can marshal themselves into valid JSON. +func (v NullablePlatformDdosResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +// UnmarshalJSON implements the Unmarshaler interface. +// Unmarshaler is the interface implemented by types that can unmarshal a JSON description of themselves. +func (v *NullablePlatformDdosResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/fastly/model_platform_ddos_response_all_of.go b/fastly/model_platform_ddos_response_all_of.go new file mode 100644 index 0000000..25e544b --- /dev/null +++ b/fastly/model_platform_ddos_response_all_of.go @@ -0,0 +1,156 @@ +// Package fastly is an API client library for interacting with most facets of the Fastly API. +package fastly + +/* +Fastly API + +Via the Fastly API you can perform any of the operations that are possible within the management console, including creating services, domains, and backends, configuring rules or uploading your own application code, as well as account operations such as user administration and billing reports. The API is organized into collections of endpoints that allow manipulation of objects related to Fastly services and accounts. For the most accurate and up-to-date API reference content, visit our [Developer Hub](https://developer.fastly.com/reference/api/) + +API version: 1.0.0 +Contact: oss@fastly.com +*/ + +// This code is auto-generated; DO NOT EDIT. + + +import ( + "encoding/json" +) + +// PlatformDdosResponseAllOf struct for PlatformDdosResponseAllOf +type PlatformDdosResponseAllOf struct { + // A list of timeseries. + Data []PlatformDdosEntry `json:"data,omitempty"` + AdditionalProperties map[string]any +} + +type _PlatformDdosResponseAllOf PlatformDdosResponseAllOf + +// NewPlatformDdosResponseAllOf instantiates a new PlatformDdosResponseAllOf object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPlatformDdosResponseAllOf() *PlatformDdosResponseAllOf { + this := PlatformDdosResponseAllOf{} + return &this +} + +// NewPlatformDdosResponseAllOfWithDefaults instantiates a new PlatformDdosResponseAllOf object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPlatformDdosResponseAllOfWithDefaults() *PlatformDdosResponseAllOf { + this := PlatformDdosResponseAllOf{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *PlatformDdosResponseAllOf) GetData() []PlatformDdosEntry { + if o == nil || o.Data == nil { + var ret []PlatformDdosEntry + 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 *PlatformDdosResponseAllOf) GetDataOk() ([]PlatformDdosEntry, bool) { + if o == nil || o.Data == nil { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *PlatformDdosResponseAllOf) HasData() bool { + if o != nil && o.Data != nil { + return true + } + + return false +} + +// SetData gets a reference to the given []PlatformDdosEntry and assigns it to the Data field. +func (o *PlatformDdosResponseAllOf) SetData(v []PlatformDdosEntry) { + o.Data = v +} + +// MarshalJSON implements the json.Marshaler interface. +// Marshaler is the interface implemented by types that can marshal themselves into valid JSON. +func (o PlatformDdosResponseAllOf) MarshalJSON() ([]byte, error) { + toSerialize := map[string]any{} + if o.Data != nil { + toSerialize["data"] = o.Data + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return json.Marshal(toSerialize) +} + +// UnmarshalJSON implements the Unmarshaler interface. +// Unmarshaler is the interface implemented by types that can unmarshal a JSON description of themselves. +func (o *PlatformDdosResponseAllOf) UnmarshalJSON(bytes []byte) (err error) { + varPlatformDdosResponseAllOf := _PlatformDdosResponseAllOf{} + + if err = json.Unmarshal(bytes, &varPlatformDdosResponseAllOf); err == nil { + *o = PlatformDdosResponseAllOf(varPlatformDdosResponseAllOf) + } + + additionalProperties := make(map[string]any) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "data") + o.AdditionalProperties = additionalProperties + } + + return err +} + +// NullablePlatformDdosResponseAllOf is a helper abstraction for handling nullable platformddosresponseallof types. +type NullablePlatformDdosResponseAllOf struct { + value *PlatformDdosResponseAllOf + isSet bool +} + +// Get returns the value. +func (v NullablePlatformDdosResponseAllOf) Get() *PlatformDdosResponseAllOf { + return v.value +} + +// Set modifies the value. +func (v *NullablePlatformDdosResponseAllOf) Set(val *PlatformDdosResponseAllOf) { + v.value = val + v.isSet = true +} + +// IsSet indicates if the value was set. +func (v NullablePlatformDdosResponseAllOf) IsSet() bool { + return v.isSet +} + +// Unset removes the value. +func (v *NullablePlatformDdosResponseAllOf) Unset() { + v.value = nil + v.isSet = false +} + +// NewNullablePlatformDdosResponseAllOf returns a pointer to a new instance of NullablePlatformDdosResponseAllOf. +func NewNullablePlatformDdosResponseAllOf(val *PlatformDdosResponseAllOf) *NullablePlatformDdosResponseAllOf { + return &NullablePlatformDdosResponseAllOf{value: val, isSet: true} +} + +// MarshalJSON implements the json.Marshaler interface. +// Marshaler is the interface implemented by types that can marshal themselves into valid JSON. +func (v NullablePlatformDdosResponseAllOf) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +// UnmarshalJSON implements the Unmarshaler interface. +// Unmarshaler is the interface implemented by types that can unmarshal a JSON description of themselves. +func (v *NullablePlatformDdosResponseAllOf) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/fastly/model_realtime_entry_aggregated.go b/fastly/model_realtime_entry_aggregated.go index 310751d..3ed2028 100644 --- a/fastly/model_realtime_entry_aggregated.go +++ b/fastly/model_realtime_entry_aggregated.go @@ -457,6 +457,24 @@ type RealtimeEntryAggregated struct { DdosActionClose *int32 `json:"ddos_action_close,omitempty"` // The number of times the blackhole action was taken. The blackhole action quietly closes a TCP connection without sending a reset. The blackhole action quietly closes a TCP connection without notifying its peer (all TCP state is dropped). DdosActionBlackhole *int32 `json:"ddos_action_blackhole,omitempty"` + // The number of challenge-start tokens created. + BotChallengeStarts *int32 `json:"bot_challenge_starts,omitempty"` + // The number of challenge-complete tokens that passed validation. + BotChallengeCompleteTokensPassed *int32 `json:"bot_challenge_complete_tokens_passed,omitempty"` + // The number of challenge-complete tokens that failed validation. + BotChallengeCompleteTokensFailed *int32 `json:"bot_challenge_complete_tokens_failed,omitempty"` + // The number of challenge-complete tokens checked. + BotChallengeCompleteTokensChecked *int32 `json:"bot_challenge_complete_tokens_checked,omitempty"` + // The number of challenge-complete tokens not checked because the feature was disabled. + BotChallengeCompleteTokensDisabled *int32 `json:"bot_challenge_complete_tokens_disabled,omitempty"` + // The number of challenges issued. For example, the issuance of a CAPTCHA challenge. + BotChallengesIssued *int32 `json:"bot_challenges_issued,omitempty"` + // The number of successful challenge solutions processed. For example, a correct CAPTCHA solution. + BotChallengesSucceeded *int32 `json:"bot_challenges_succeeded,omitempty"` + // The number of failed challenge solutions processed. For example, an incorrect CAPTCHA solution. + BotChallengesFailed *int32 `json:"bot_challenges_failed,omitempty"` + // The number of challenge-complete tokens issued. For example, issuing a challenge-complete token after a series of CAPTCHA challenges ending in success. + BotChallengeCompleteTokensIssued *int32 `json:"bot_challenge_complete_tokens_issued,omitempty"` AdditionalProperties map[string]any } @@ -7461,6 +7479,294 @@ func (o *RealtimeEntryAggregated) SetDdosActionBlackhole(v int32) { o.DdosActionBlackhole = &v } +// GetBotChallengeStarts returns the BotChallengeStarts field value if set, zero value otherwise. +func (o *RealtimeEntryAggregated) GetBotChallengeStarts() int32 { + if o == nil || o.BotChallengeStarts == nil { + var ret int32 + return ret + } + return *o.BotChallengeStarts +} + +// GetBotChallengeStartsOk returns a tuple with the BotChallengeStarts field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RealtimeEntryAggregated) GetBotChallengeStartsOk() (*int32, bool) { + if o == nil || o.BotChallengeStarts == nil { + return nil, false + } + return o.BotChallengeStarts, true +} + +// HasBotChallengeStarts returns a boolean if a field has been set. +func (o *RealtimeEntryAggregated) HasBotChallengeStarts() bool { + if o != nil && o.BotChallengeStarts != nil { + return true + } + + return false +} + +// SetBotChallengeStarts gets a reference to the given int32 and assigns it to the BotChallengeStarts field. +func (o *RealtimeEntryAggregated) SetBotChallengeStarts(v int32) { + o.BotChallengeStarts = &v +} + +// GetBotChallengeCompleteTokensPassed returns the BotChallengeCompleteTokensPassed field value if set, zero value otherwise. +func (o *RealtimeEntryAggregated) GetBotChallengeCompleteTokensPassed() int32 { + if o == nil || o.BotChallengeCompleteTokensPassed == nil { + var ret int32 + return ret + } + return *o.BotChallengeCompleteTokensPassed +} + +// GetBotChallengeCompleteTokensPassedOk returns a tuple with the BotChallengeCompleteTokensPassed field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RealtimeEntryAggregated) GetBotChallengeCompleteTokensPassedOk() (*int32, bool) { + if o == nil || o.BotChallengeCompleteTokensPassed == nil { + return nil, false + } + return o.BotChallengeCompleteTokensPassed, true +} + +// HasBotChallengeCompleteTokensPassed returns a boolean if a field has been set. +func (o *RealtimeEntryAggregated) HasBotChallengeCompleteTokensPassed() bool { + if o != nil && o.BotChallengeCompleteTokensPassed != nil { + return true + } + + return false +} + +// SetBotChallengeCompleteTokensPassed gets a reference to the given int32 and assigns it to the BotChallengeCompleteTokensPassed field. +func (o *RealtimeEntryAggregated) SetBotChallengeCompleteTokensPassed(v int32) { + o.BotChallengeCompleteTokensPassed = &v +} + +// GetBotChallengeCompleteTokensFailed returns the BotChallengeCompleteTokensFailed field value if set, zero value otherwise. +func (o *RealtimeEntryAggregated) GetBotChallengeCompleteTokensFailed() int32 { + if o == nil || o.BotChallengeCompleteTokensFailed == nil { + var ret int32 + return ret + } + return *o.BotChallengeCompleteTokensFailed +} + +// GetBotChallengeCompleteTokensFailedOk returns a tuple with the BotChallengeCompleteTokensFailed field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RealtimeEntryAggregated) GetBotChallengeCompleteTokensFailedOk() (*int32, bool) { + if o == nil || o.BotChallengeCompleteTokensFailed == nil { + return nil, false + } + return o.BotChallengeCompleteTokensFailed, true +} + +// HasBotChallengeCompleteTokensFailed returns a boolean if a field has been set. +func (o *RealtimeEntryAggregated) HasBotChallengeCompleteTokensFailed() bool { + if o != nil && o.BotChallengeCompleteTokensFailed != nil { + return true + } + + return false +} + +// SetBotChallengeCompleteTokensFailed gets a reference to the given int32 and assigns it to the BotChallengeCompleteTokensFailed field. +func (o *RealtimeEntryAggregated) SetBotChallengeCompleteTokensFailed(v int32) { + o.BotChallengeCompleteTokensFailed = &v +} + +// GetBotChallengeCompleteTokensChecked returns the BotChallengeCompleteTokensChecked field value if set, zero value otherwise. +func (o *RealtimeEntryAggregated) GetBotChallengeCompleteTokensChecked() int32 { + if o == nil || o.BotChallengeCompleteTokensChecked == nil { + var ret int32 + return ret + } + return *o.BotChallengeCompleteTokensChecked +} + +// GetBotChallengeCompleteTokensCheckedOk returns a tuple with the BotChallengeCompleteTokensChecked field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RealtimeEntryAggregated) GetBotChallengeCompleteTokensCheckedOk() (*int32, bool) { + if o == nil || o.BotChallengeCompleteTokensChecked == nil { + return nil, false + } + return o.BotChallengeCompleteTokensChecked, true +} + +// HasBotChallengeCompleteTokensChecked returns a boolean if a field has been set. +func (o *RealtimeEntryAggregated) HasBotChallengeCompleteTokensChecked() bool { + if o != nil && o.BotChallengeCompleteTokensChecked != nil { + return true + } + + return false +} + +// SetBotChallengeCompleteTokensChecked gets a reference to the given int32 and assigns it to the BotChallengeCompleteTokensChecked field. +func (o *RealtimeEntryAggregated) SetBotChallengeCompleteTokensChecked(v int32) { + o.BotChallengeCompleteTokensChecked = &v +} + +// GetBotChallengeCompleteTokensDisabled returns the BotChallengeCompleteTokensDisabled field value if set, zero value otherwise. +func (o *RealtimeEntryAggregated) GetBotChallengeCompleteTokensDisabled() int32 { + if o == nil || o.BotChallengeCompleteTokensDisabled == nil { + var ret int32 + return ret + } + return *o.BotChallengeCompleteTokensDisabled +} + +// GetBotChallengeCompleteTokensDisabledOk returns a tuple with the BotChallengeCompleteTokensDisabled field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RealtimeEntryAggregated) GetBotChallengeCompleteTokensDisabledOk() (*int32, bool) { + if o == nil || o.BotChallengeCompleteTokensDisabled == nil { + return nil, false + } + return o.BotChallengeCompleteTokensDisabled, true +} + +// HasBotChallengeCompleteTokensDisabled returns a boolean if a field has been set. +func (o *RealtimeEntryAggregated) HasBotChallengeCompleteTokensDisabled() bool { + if o != nil && o.BotChallengeCompleteTokensDisabled != nil { + return true + } + + return false +} + +// SetBotChallengeCompleteTokensDisabled gets a reference to the given int32 and assigns it to the BotChallengeCompleteTokensDisabled field. +func (o *RealtimeEntryAggregated) SetBotChallengeCompleteTokensDisabled(v int32) { + o.BotChallengeCompleteTokensDisabled = &v +} + +// GetBotChallengesIssued returns the BotChallengesIssued field value if set, zero value otherwise. +func (o *RealtimeEntryAggregated) GetBotChallengesIssued() int32 { + if o == nil || o.BotChallengesIssued == nil { + var ret int32 + return ret + } + return *o.BotChallengesIssued +} + +// GetBotChallengesIssuedOk returns a tuple with the BotChallengesIssued field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RealtimeEntryAggregated) GetBotChallengesIssuedOk() (*int32, bool) { + if o == nil || o.BotChallengesIssued == nil { + return nil, false + } + return o.BotChallengesIssued, true +} + +// HasBotChallengesIssued returns a boolean if a field has been set. +func (o *RealtimeEntryAggregated) HasBotChallengesIssued() bool { + if o != nil && o.BotChallengesIssued != nil { + return true + } + + return false +} + +// SetBotChallengesIssued gets a reference to the given int32 and assigns it to the BotChallengesIssued field. +func (o *RealtimeEntryAggregated) SetBotChallengesIssued(v int32) { + o.BotChallengesIssued = &v +} + +// GetBotChallengesSucceeded returns the BotChallengesSucceeded field value if set, zero value otherwise. +func (o *RealtimeEntryAggregated) GetBotChallengesSucceeded() int32 { + if o == nil || o.BotChallengesSucceeded == nil { + var ret int32 + return ret + } + return *o.BotChallengesSucceeded +} + +// GetBotChallengesSucceededOk returns a tuple with the BotChallengesSucceeded field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RealtimeEntryAggregated) GetBotChallengesSucceededOk() (*int32, bool) { + if o == nil || o.BotChallengesSucceeded == nil { + return nil, false + } + return o.BotChallengesSucceeded, true +} + +// HasBotChallengesSucceeded returns a boolean if a field has been set. +func (o *RealtimeEntryAggregated) HasBotChallengesSucceeded() bool { + if o != nil && o.BotChallengesSucceeded != nil { + return true + } + + return false +} + +// SetBotChallengesSucceeded gets a reference to the given int32 and assigns it to the BotChallengesSucceeded field. +func (o *RealtimeEntryAggregated) SetBotChallengesSucceeded(v int32) { + o.BotChallengesSucceeded = &v +} + +// GetBotChallengesFailed returns the BotChallengesFailed field value if set, zero value otherwise. +func (o *RealtimeEntryAggregated) GetBotChallengesFailed() int32 { + if o == nil || o.BotChallengesFailed == nil { + var ret int32 + return ret + } + return *o.BotChallengesFailed +} + +// GetBotChallengesFailedOk returns a tuple with the BotChallengesFailed field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RealtimeEntryAggregated) GetBotChallengesFailedOk() (*int32, bool) { + if o == nil || o.BotChallengesFailed == nil { + return nil, false + } + return o.BotChallengesFailed, true +} + +// HasBotChallengesFailed returns a boolean if a field has been set. +func (o *RealtimeEntryAggregated) HasBotChallengesFailed() bool { + if o != nil && o.BotChallengesFailed != nil { + return true + } + + return false +} + +// SetBotChallengesFailed gets a reference to the given int32 and assigns it to the BotChallengesFailed field. +func (o *RealtimeEntryAggregated) SetBotChallengesFailed(v int32) { + o.BotChallengesFailed = &v +} + +// GetBotChallengeCompleteTokensIssued returns the BotChallengeCompleteTokensIssued field value if set, zero value otherwise. +func (o *RealtimeEntryAggregated) GetBotChallengeCompleteTokensIssued() int32 { + if o == nil || o.BotChallengeCompleteTokensIssued == nil { + var ret int32 + return ret + } + return *o.BotChallengeCompleteTokensIssued +} + +// GetBotChallengeCompleteTokensIssuedOk returns a tuple with the BotChallengeCompleteTokensIssued field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RealtimeEntryAggregated) GetBotChallengeCompleteTokensIssuedOk() (*int32, bool) { + if o == nil || o.BotChallengeCompleteTokensIssued == nil { + return nil, false + } + return o.BotChallengeCompleteTokensIssued, true +} + +// HasBotChallengeCompleteTokensIssued returns a boolean if a field has been set. +func (o *RealtimeEntryAggregated) HasBotChallengeCompleteTokensIssued() bool { + if o != nil && o.BotChallengeCompleteTokensIssued != nil { + return true + } + + return false +} + +// SetBotChallengeCompleteTokensIssued gets a reference to the given int32 and assigns it to the BotChallengeCompleteTokensIssued field. +func (o *RealtimeEntryAggregated) SetBotChallengeCompleteTokensIssued(v int32) { + o.BotChallengeCompleteTokensIssued = &v +} + // MarshalJSON implements the json.Marshaler interface. // Marshaler is the interface implemented by types that can marshal themselves into valid JSON. func (o RealtimeEntryAggregated) MarshalJSON() ([]byte, error) { @@ -8119,6 +8425,33 @@ func (o RealtimeEntryAggregated) MarshalJSON() ([]byte, error) { if o.DdosActionBlackhole != nil { toSerialize["ddos_action_blackhole"] = o.DdosActionBlackhole } + if o.BotChallengeStarts != nil { + toSerialize["bot_challenge_starts"] = o.BotChallengeStarts + } + if o.BotChallengeCompleteTokensPassed != nil { + toSerialize["bot_challenge_complete_tokens_passed"] = o.BotChallengeCompleteTokensPassed + } + if o.BotChallengeCompleteTokensFailed != nil { + toSerialize["bot_challenge_complete_tokens_failed"] = o.BotChallengeCompleteTokensFailed + } + if o.BotChallengeCompleteTokensChecked != nil { + toSerialize["bot_challenge_complete_tokens_checked"] = o.BotChallengeCompleteTokensChecked + } + if o.BotChallengeCompleteTokensDisabled != nil { + toSerialize["bot_challenge_complete_tokens_disabled"] = o.BotChallengeCompleteTokensDisabled + } + if o.BotChallengesIssued != nil { + toSerialize["bot_challenges_issued"] = o.BotChallengesIssued + } + if o.BotChallengesSucceeded != nil { + toSerialize["bot_challenges_succeeded"] = o.BotChallengesSucceeded + } + if o.BotChallengesFailed != nil { + toSerialize["bot_challenges_failed"] = o.BotChallengesFailed + } + if o.BotChallengeCompleteTokensIssued != nil { + toSerialize["bot_challenge_complete_tokens_issued"] = o.BotChallengeCompleteTokensIssued + } for key, value := range o.AdditionalProperties { toSerialize[key] = value @@ -8357,6 +8690,15 @@ func (o *RealtimeEntryAggregated) UnmarshalJSON(bytes []byte) (err error) { delete(additionalProperties, "ddos_action_tarpit") delete(additionalProperties, "ddos_action_close") delete(additionalProperties, "ddos_action_blackhole") + delete(additionalProperties, "bot_challenge_starts") + delete(additionalProperties, "bot_challenge_complete_tokens_passed") + delete(additionalProperties, "bot_challenge_complete_tokens_failed") + delete(additionalProperties, "bot_challenge_complete_tokens_checked") + delete(additionalProperties, "bot_challenge_complete_tokens_disabled") + delete(additionalProperties, "bot_challenges_issued") + delete(additionalProperties, "bot_challenges_succeeded") + delete(additionalProperties, "bot_challenges_failed") + delete(additionalProperties, "bot_challenge_complete_tokens_issued") o.AdditionalProperties = additionalProperties } diff --git a/fastly/model_realtime_measurements.go b/fastly/model_realtime_measurements.go index f026e5a..a608d97 100644 --- a/fastly/model_realtime_measurements.go +++ b/fastly/model_realtime_measurements.go @@ -457,6 +457,24 @@ type RealtimeMeasurements struct { DdosActionClose *int32 `json:"ddos_action_close,omitempty"` // The number of times the blackhole action was taken. The blackhole action quietly closes a TCP connection without sending a reset. The blackhole action quietly closes a TCP connection without notifying its peer (all TCP state is dropped). DdosActionBlackhole *int32 `json:"ddos_action_blackhole,omitempty"` + // The number of challenge-start tokens created. + BotChallengeStarts *int32 `json:"bot_challenge_starts,omitempty"` + // The number of challenge-complete tokens that passed validation. + BotChallengeCompleteTokensPassed *int32 `json:"bot_challenge_complete_tokens_passed,omitempty"` + // The number of challenge-complete tokens that failed validation. + BotChallengeCompleteTokensFailed *int32 `json:"bot_challenge_complete_tokens_failed,omitempty"` + // The number of challenge-complete tokens checked. + BotChallengeCompleteTokensChecked *int32 `json:"bot_challenge_complete_tokens_checked,omitempty"` + // The number of challenge-complete tokens not checked because the feature was disabled. + BotChallengeCompleteTokensDisabled *int32 `json:"bot_challenge_complete_tokens_disabled,omitempty"` + // The number of challenges issued. For example, the issuance of a CAPTCHA challenge. + BotChallengesIssued *int32 `json:"bot_challenges_issued,omitempty"` + // The number of successful challenge solutions processed. For example, a correct CAPTCHA solution. + BotChallengesSucceeded *int32 `json:"bot_challenges_succeeded,omitempty"` + // The number of failed challenge solutions processed. For example, an incorrect CAPTCHA solution. + BotChallengesFailed *int32 `json:"bot_challenges_failed,omitempty"` + // The number of challenge-complete tokens issued. For example, issuing a challenge-complete token after a series of CAPTCHA challenges ending in success. + BotChallengeCompleteTokensIssued *int32 `json:"bot_challenge_complete_tokens_issued,omitempty"` AdditionalProperties map[string]any } @@ -7461,6 +7479,294 @@ func (o *RealtimeMeasurements) SetDdosActionBlackhole(v int32) { o.DdosActionBlackhole = &v } +// GetBotChallengeStarts returns the BotChallengeStarts field value if set, zero value otherwise. +func (o *RealtimeMeasurements) GetBotChallengeStarts() int32 { + if o == nil || o.BotChallengeStarts == nil { + var ret int32 + return ret + } + return *o.BotChallengeStarts +} + +// GetBotChallengeStartsOk returns a tuple with the BotChallengeStarts field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RealtimeMeasurements) GetBotChallengeStartsOk() (*int32, bool) { + if o == nil || o.BotChallengeStarts == nil { + return nil, false + } + return o.BotChallengeStarts, true +} + +// HasBotChallengeStarts returns a boolean if a field has been set. +func (o *RealtimeMeasurements) HasBotChallengeStarts() bool { + if o != nil && o.BotChallengeStarts != nil { + return true + } + + return false +} + +// SetBotChallengeStarts gets a reference to the given int32 and assigns it to the BotChallengeStarts field. +func (o *RealtimeMeasurements) SetBotChallengeStarts(v int32) { + o.BotChallengeStarts = &v +} + +// GetBotChallengeCompleteTokensPassed returns the BotChallengeCompleteTokensPassed field value if set, zero value otherwise. +func (o *RealtimeMeasurements) GetBotChallengeCompleteTokensPassed() int32 { + if o == nil || o.BotChallengeCompleteTokensPassed == nil { + var ret int32 + return ret + } + return *o.BotChallengeCompleteTokensPassed +} + +// GetBotChallengeCompleteTokensPassedOk returns a tuple with the BotChallengeCompleteTokensPassed field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RealtimeMeasurements) GetBotChallengeCompleteTokensPassedOk() (*int32, bool) { + if o == nil || o.BotChallengeCompleteTokensPassed == nil { + return nil, false + } + return o.BotChallengeCompleteTokensPassed, true +} + +// HasBotChallengeCompleteTokensPassed returns a boolean if a field has been set. +func (o *RealtimeMeasurements) HasBotChallengeCompleteTokensPassed() bool { + if o != nil && o.BotChallengeCompleteTokensPassed != nil { + return true + } + + return false +} + +// SetBotChallengeCompleteTokensPassed gets a reference to the given int32 and assigns it to the BotChallengeCompleteTokensPassed field. +func (o *RealtimeMeasurements) SetBotChallengeCompleteTokensPassed(v int32) { + o.BotChallengeCompleteTokensPassed = &v +} + +// GetBotChallengeCompleteTokensFailed returns the BotChallengeCompleteTokensFailed field value if set, zero value otherwise. +func (o *RealtimeMeasurements) GetBotChallengeCompleteTokensFailed() int32 { + if o == nil || o.BotChallengeCompleteTokensFailed == nil { + var ret int32 + return ret + } + return *o.BotChallengeCompleteTokensFailed +} + +// GetBotChallengeCompleteTokensFailedOk returns a tuple with the BotChallengeCompleteTokensFailed field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RealtimeMeasurements) GetBotChallengeCompleteTokensFailedOk() (*int32, bool) { + if o == nil || o.BotChallengeCompleteTokensFailed == nil { + return nil, false + } + return o.BotChallengeCompleteTokensFailed, true +} + +// HasBotChallengeCompleteTokensFailed returns a boolean if a field has been set. +func (o *RealtimeMeasurements) HasBotChallengeCompleteTokensFailed() bool { + if o != nil && o.BotChallengeCompleteTokensFailed != nil { + return true + } + + return false +} + +// SetBotChallengeCompleteTokensFailed gets a reference to the given int32 and assigns it to the BotChallengeCompleteTokensFailed field. +func (o *RealtimeMeasurements) SetBotChallengeCompleteTokensFailed(v int32) { + o.BotChallengeCompleteTokensFailed = &v +} + +// GetBotChallengeCompleteTokensChecked returns the BotChallengeCompleteTokensChecked field value if set, zero value otherwise. +func (o *RealtimeMeasurements) GetBotChallengeCompleteTokensChecked() int32 { + if o == nil || o.BotChallengeCompleteTokensChecked == nil { + var ret int32 + return ret + } + return *o.BotChallengeCompleteTokensChecked +} + +// GetBotChallengeCompleteTokensCheckedOk returns a tuple with the BotChallengeCompleteTokensChecked field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RealtimeMeasurements) GetBotChallengeCompleteTokensCheckedOk() (*int32, bool) { + if o == nil || o.BotChallengeCompleteTokensChecked == nil { + return nil, false + } + return o.BotChallengeCompleteTokensChecked, true +} + +// HasBotChallengeCompleteTokensChecked returns a boolean if a field has been set. +func (o *RealtimeMeasurements) HasBotChallengeCompleteTokensChecked() bool { + if o != nil && o.BotChallengeCompleteTokensChecked != nil { + return true + } + + return false +} + +// SetBotChallengeCompleteTokensChecked gets a reference to the given int32 and assigns it to the BotChallengeCompleteTokensChecked field. +func (o *RealtimeMeasurements) SetBotChallengeCompleteTokensChecked(v int32) { + o.BotChallengeCompleteTokensChecked = &v +} + +// GetBotChallengeCompleteTokensDisabled returns the BotChallengeCompleteTokensDisabled field value if set, zero value otherwise. +func (o *RealtimeMeasurements) GetBotChallengeCompleteTokensDisabled() int32 { + if o == nil || o.BotChallengeCompleteTokensDisabled == nil { + var ret int32 + return ret + } + return *o.BotChallengeCompleteTokensDisabled +} + +// GetBotChallengeCompleteTokensDisabledOk returns a tuple with the BotChallengeCompleteTokensDisabled field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RealtimeMeasurements) GetBotChallengeCompleteTokensDisabledOk() (*int32, bool) { + if o == nil || o.BotChallengeCompleteTokensDisabled == nil { + return nil, false + } + return o.BotChallengeCompleteTokensDisabled, true +} + +// HasBotChallengeCompleteTokensDisabled returns a boolean if a field has been set. +func (o *RealtimeMeasurements) HasBotChallengeCompleteTokensDisabled() bool { + if o != nil && o.BotChallengeCompleteTokensDisabled != nil { + return true + } + + return false +} + +// SetBotChallengeCompleteTokensDisabled gets a reference to the given int32 and assigns it to the BotChallengeCompleteTokensDisabled field. +func (o *RealtimeMeasurements) SetBotChallengeCompleteTokensDisabled(v int32) { + o.BotChallengeCompleteTokensDisabled = &v +} + +// GetBotChallengesIssued returns the BotChallengesIssued field value if set, zero value otherwise. +func (o *RealtimeMeasurements) GetBotChallengesIssued() int32 { + if o == nil || o.BotChallengesIssued == nil { + var ret int32 + return ret + } + return *o.BotChallengesIssued +} + +// GetBotChallengesIssuedOk returns a tuple with the BotChallengesIssued field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RealtimeMeasurements) GetBotChallengesIssuedOk() (*int32, bool) { + if o == nil || o.BotChallengesIssued == nil { + return nil, false + } + return o.BotChallengesIssued, true +} + +// HasBotChallengesIssued returns a boolean if a field has been set. +func (o *RealtimeMeasurements) HasBotChallengesIssued() bool { + if o != nil && o.BotChallengesIssued != nil { + return true + } + + return false +} + +// SetBotChallengesIssued gets a reference to the given int32 and assigns it to the BotChallengesIssued field. +func (o *RealtimeMeasurements) SetBotChallengesIssued(v int32) { + o.BotChallengesIssued = &v +} + +// GetBotChallengesSucceeded returns the BotChallengesSucceeded field value if set, zero value otherwise. +func (o *RealtimeMeasurements) GetBotChallengesSucceeded() int32 { + if o == nil || o.BotChallengesSucceeded == nil { + var ret int32 + return ret + } + return *o.BotChallengesSucceeded +} + +// GetBotChallengesSucceededOk returns a tuple with the BotChallengesSucceeded field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RealtimeMeasurements) GetBotChallengesSucceededOk() (*int32, bool) { + if o == nil || o.BotChallengesSucceeded == nil { + return nil, false + } + return o.BotChallengesSucceeded, true +} + +// HasBotChallengesSucceeded returns a boolean if a field has been set. +func (o *RealtimeMeasurements) HasBotChallengesSucceeded() bool { + if o != nil && o.BotChallengesSucceeded != nil { + return true + } + + return false +} + +// SetBotChallengesSucceeded gets a reference to the given int32 and assigns it to the BotChallengesSucceeded field. +func (o *RealtimeMeasurements) SetBotChallengesSucceeded(v int32) { + o.BotChallengesSucceeded = &v +} + +// GetBotChallengesFailed returns the BotChallengesFailed field value if set, zero value otherwise. +func (o *RealtimeMeasurements) GetBotChallengesFailed() int32 { + if o == nil || o.BotChallengesFailed == nil { + var ret int32 + return ret + } + return *o.BotChallengesFailed +} + +// GetBotChallengesFailedOk returns a tuple with the BotChallengesFailed field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RealtimeMeasurements) GetBotChallengesFailedOk() (*int32, bool) { + if o == nil || o.BotChallengesFailed == nil { + return nil, false + } + return o.BotChallengesFailed, true +} + +// HasBotChallengesFailed returns a boolean if a field has been set. +func (o *RealtimeMeasurements) HasBotChallengesFailed() bool { + if o != nil && o.BotChallengesFailed != nil { + return true + } + + return false +} + +// SetBotChallengesFailed gets a reference to the given int32 and assigns it to the BotChallengesFailed field. +func (o *RealtimeMeasurements) SetBotChallengesFailed(v int32) { + o.BotChallengesFailed = &v +} + +// GetBotChallengeCompleteTokensIssued returns the BotChallengeCompleteTokensIssued field value if set, zero value otherwise. +func (o *RealtimeMeasurements) GetBotChallengeCompleteTokensIssued() int32 { + if o == nil || o.BotChallengeCompleteTokensIssued == nil { + var ret int32 + return ret + } + return *o.BotChallengeCompleteTokensIssued +} + +// GetBotChallengeCompleteTokensIssuedOk returns a tuple with the BotChallengeCompleteTokensIssued field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RealtimeMeasurements) GetBotChallengeCompleteTokensIssuedOk() (*int32, bool) { + if o == nil || o.BotChallengeCompleteTokensIssued == nil { + return nil, false + } + return o.BotChallengeCompleteTokensIssued, true +} + +// HasBotChallengeCompleteTokensIssued returns a boolean if a field has been set. +func (o *RealtimeMeasurements) HasBotChallengeCompleteTokensIssued() bool { + if o != nil && o.BotChallengeCompleteTokensIssued != nil { + return true + } + + return false +} + +// SetBotChallengeCompleteTokensIssued gets a reference to the given int32 and assigns it to the BotChallengeCompleteTokensIssued field. +func (o *RealtimeMeasurements) SetBotChallengeCompleteTokensIssued(v int32) { + o.BotChallengeCompleteTokensIssued = &v +} + // MarshalJSON implements the json.Marshaler interface. // Marshaler is the interface implemented by types that can marshal themselves into valid JSON. func (o RealtimeMeasurements) MarshalJSON() ([]byte, error) { @@ -8119,6 +8425,33 @@ func (o RealtimeMeasurements) MarshalJSON() ([]byte, error) { if o.DdosActionBlackhole != nil { toSerialize["ddos_action_blackhole"] = o.DdosActionBlackhole } + if o.BotChallengeStarts != nil { + toSerialize["bot_challenge_starts"] = o.BotChallengeStarts + } + if o.BotChallengeCompleteTokensPassed != nil { + toSerialize["bot_challenge_complete_tokens_passed"] = o.BotChallengeCompleteTokensPassed + } + if o.BotChallengeCompleteTokensFailed != nil { + toSerialize["bot_challenge_complete_tokens_failed"] = o.BotChallengeCompleteTokensFailed + } + if o.BotChallengeCompleteTokensChecked != nil { + toSerialize["bot_challenge_complete_tokens_checked"] = o.BotChallengeCompleteTokensChecked + } + if o.BotChallengeCompleteTokensDisabled != nil { + toSerialize["bot_challenge_complete_tokens_disabled"] = o.BotChallengeCompleteTokensDisabled + } + if o.BotChallengesIssued != nil { + toSerialize["bot_challenges_issued"] = o.BotChallengesIssued + } + if o.BotChallengesSucceeded != nil { + toSerialize["bot_challenges_succeeded"] = o.BotChallengesSucceeded + } + if o.BotChallengesFailed != nil { + toSerialize["bot_challenges_failed"] = o.BotChallengesFailed + } + if o.BotChallengeCompleteTokensIssued != nil { + toSerialize["bot_challenge_complete_tokens_issued"] = o.BotChallengeCompleteTokensIssued + } for key, value := range o.AdditionalProperties { toSerialize[key] = value @@ -8357,6 +8690,15 @@ func (o *RealtimeMeasurements) UnmarshalJSON(bytes []byte) (err error) { delete(additionalProperties, "ddos_action_tarpit") delete(additionalProperties, "ddos_action_close") delete(additionalProperties, "ddos_action_blackhole") + delete(additionalProperties, "bot_challenge_starts") + delete(additionalProperties, "bot_challenge_complete_tokens_passed") + delete(additionalProperties, "bot_challenge_complete_tokens_failed") + delete(additionalProperties, "bot_challenge_complete_tokens_checked") + delete(additionalProperties, "bot_challenge_complete_tokens_disabled") + delete(additionalProperties, "bot_challenges_issued") + delete(additionalProperties, "bot_challenges_succeeded") + delete(additionalProperties, "bot_challenges_failed") + delete(additionalProperties, "bot_challenge_complete_tokens_issued") o.AdditionalProperties = additionalProperties } diff --git a/fastly/model_results.go b/fastly/model_results.go index fb1b8bf..205ed33 100644 --- a/fastly/model_results.go +++ b/fastly/model_results.go @@ -453,6 +453,24 @@ type Results struct { DdosActionClose *int32 `json:"ddos_action_close,omitempty"` // The number of times the blackhole action was taken. The blackhole action quietly closes a TCP connection without sending a reset. The blackhole action quietly closes a TCP connection without notifying its peer (all TCP state is dropped). DdosActionBlackhole *int32 `json:"ddos_action_blackhole,omitempty"` + // The number of challenge-start tokens created. + BotChallengeStarts *int32 `json:"bot_challenge_starts,omitempty"` + // The number of challenge-complete tokens that passed validation. + BotChallengeCompleteTokensPassed *int32 `json:"bot_challenge_complete_tokens_passed,omitempty"` + // The number of challenge-complete tokens that failed validation. + BotChallengeCompleteTokensFailed *int32 `json:"bot_challenge_complete_tokens_failed,omitempty"` + // The number of challenge-complete tokens checked. + BotChallengeCompleteTokensChecked *int32 `json:"bot_challenge_complete_tokens_checked,omitempty"` + // The number of challenge-complete tokens not checked because the feature was disabled. + BotChallengeCompleteTokensDisabled *int32 `json:"bot_challenge_complete_tokens_disabled,omitempty"` + // The number of challenge-complete tokens issued. For example, issuing a challenge-complete token after a series of CAPTCHA challenges ending in success. + BotChallengeCompleteTokensIssued *int32 `json:"bot_challenge_complete_tokens_issued,omitempty"` + // The number of challenges issued. For example, the issuance of a CAPTCHA challenge. + BotChallengesIssued *int32 `json:"bot_challenges_issued,omitempty"` + // The number of successful challenge solutions processed. For example, a correct CAPTCHA solution. + BotChallengesSucceeded *int32 `json:"bot_challenges_succeeded,omitempty"` + // The number of failed challenge solutions processed. For example, an incorrect CAPTCHA solution. + BotChallengesFailed *int32 `json:"bot_challenges_failed,omitempty"` AdditionalProperties map[string]any } @@ -7403,6 +7421,294 @@ func (o *Results) SetDdosActionBlackhole(v int32) { o.DdosActionBlackhole = &v } +// GetBotChallengeStarts returns the BotChallengeStarts field value if set, zero value otherwise. +func (o *Results) GetBotChallengeStarts() int32 { + if o == nil || o.BotChallengeStarts == nil { + var ret int32 + return ret + } + return *o.BotChallengeStarts +} + +// GetBotChallengeStartsOk returns a tuple with the BotChallengeStarts field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Results) GetBotChallengeStartsOk() (*int32, bool) { + if o == nil || o.BotChallengeStarts == nil { + return nil, false + } + return o.BotChallengeStarts, true +} + +// HasBotChallengeStarts returns a boolean if a field has been set. +func (o *Results) HasBotChallengeStarts() bool { + if o != nil && o.BotChallengeStarts != nil { + return true + } + + return false +} + +// SetBotChallengeStarts gets a reference to the given int32 and assigns it to the BotChallengeStarts field. +func (o *Results) SetBotChallengeStarts(v int32) { + o.BotChallengeStarts = &v +} + +// GetBotChallengeCompleteTokensPassed returns the BotChallengeCompleteTokensPassed field value if set, zero value otherwise. +func (o *Results) GetBotChallengeCompleteTokensPassed() int32 { + if o == nil || o.BotChallengeCompleteTokensPassed == nil { + var ret int32 + return ret + } + return *o.BotChallengeCompleteTokensPassed +} + +// GetBotChallengeCompleteTokensPassedOk returns a tuple with the BotChallengeCompleteTokensPassed field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Results) GetBotChallengeCompleteTokensPassedOk() (*int32, bool) { + if o == nil || o.BotChallengeCompleteTokensPassed == nil { + return nil, false + } + return o.BotChallengeCompleteTokensPassed, true +} + +// HasBotChallengeCompleteTokensPassed returns a boolean if a field has been set. +func (o *Results) HasBotChallengeCompleteTokensPassed() bool { + if o != nil && o.BotChallengeCompleteTokensPassed != nil { + return true + } + + return false +} + +// SetBotChallengeCompleteTokensPassed gets a reference to the given int32 and assigns it to the BotChallengeCompleteTokensPassed field. +func (o *Results) SetBotChallengeCompleteTokensPassed(v int32) { + o.BotChallengeCompleteTokensPassed = &v +} + +// GetBotChallengeCompleteTokensFailed returns the BotChallengeCompleteTokensFailed field value if set, zero value otherwise. +func (o *Results) GetBotChallengeCompleteTokensFailed() int32 { + if o == nil || o.BotChallengeCompleteTokensFailed == nil { + var ret int32 + return ret + } + return *o.BotChallengeCompleteTokensFailed +} + +// GetBotChallengeCompleteTokensFailedOk returns a tuple with the BotChallengeCompleteTokensFailed field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Results) GetBotChallengeCompleteTokensFailedOk() (*int32, bool) { + if o == nil || o.BotChallengeCompleteTokensFailed == nil { + return nil, false + } + return o.BotChallengeCompleteTokensFailed, true +} + +// HasBotChallengeCompleteTokensFailed returns a boolean if a field has been set. +func (o *Results) HasBotChallengeCompleteTokensFailed() bool { + if o != nil && o.BotChallengeCompleteTokensFailed != nil { + return true + } + + return false +} + +// SetBotChallengeCompleteTokensFailed gets a reference to the given int32 and assigns it to the BotChallengeCompleteTokensFailed field. +func (o *Results) SetBotChallengeCompleteTokensFailed(v int32) { + o.BotChallengeCompleteTokensFailed = &v +} + +// GetBotChallengeCompleteTokensChecked returns the BotChallengeCompleteTokensChecked field value if set, zero value otherwise. +func (o *Results) GetBotChallengeCompleteTokensChecked() int32 { + if o == nil || o.BotChallengeCompleteTokensChecked == nil { + var ret int32 + return ret + } + return *o.BotChallengeCompleteTokensChecked +} + +// GetBotChallengeCompleteTokensCheckedOk returns a tuple with the BotChallengeCompleteTokensChecked field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Results) GetBotChallengeCompleteTokensCheckedOk() (*int32, bool) { + if o == nil || o.BotChallengeCompleteTokensChecked == nil { + return nil, false + } + return o.BotChallengeCompleteTokensChecked, true +} + +// HasBotChallengeCompleteTokensChecked returns a boolean if a field has been set. +func (o *Results) HasBotChallengeCompleteTokensChecked() bool { + if o != nil && o.BotChallengeCompleteTokensChecked != nil { + return true + } + + return false +} + +// SetBotChallengeCompleteTokensChecked gets a reference to the given int32 and assigns it to the BotChallengeCompleteTokensChecked field. +func (o *Results) SetBotChallengeCompleteTokensChecked(v int32) { + o.BotChallengeCompleteTokensChecked = &v +} + +// GetBotChallengeCompleteTokensDisabled returns the BotChallengeCompleteTokensDisabled field value if set, zero value otherwise. +func (o *Results) GetBotChallengeCompleteTokensDisabled() int32 { + if o == nil || o.BotChallengeCompleteTokensDisabled == nil { + var ret int32 + return ret + } + return *o.BotChallengeCompleteTokensDisabled +} + +// GetBotChallengeCompleteTokensDisabledOk returns a tuple with the BotChallengeCompleteTokensDisabled field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Results) GetBotChallengeCompleteTokensDisabledOk() (*int32, bool) { + if o == nil || o.BotChallengeCompleteTokensDisabled == nil { + return nil, false + } + return o.BotChallengeCompleteTokensDisabled, true +} + +// HasBotChallengeCompleteTokensDisabled returns a boolean if a field has been set. +func (o *Results) HasBotChallengeCompleteTokensDisabled() bool { + if o != nil && o.BotChallengeCompleteTokensDisabled != nil { + return true + } + + return false +} + +// SetBotChallengeCompleteTokensDisabled gets a reference to the given int32 and assigns it to the BotChallengeCompleteTokensDisabled field. +func (o *Results) SetBotChallengeCompleteTokensDisabled(v int32) { + o.BotChallengeCompleteTokensDisabled = &v +} + +// GetBotChallengeCompleteTokensIssued returns the BotChallengeCompleteTokensIssued field value if set, zero value otherwise. +func (o *Results) GetBotChallengeCompleteTokensIssued() int32 { + if o == nil || o.BotChallengeCompleteTokensIssued == nil { + var ret int32 + return ret + } + return *o.BotChallengeCompleteTokensIssued +} + +// GetBotChallengeCompleteTokensIssuedOk returns a tuple with the BotChallengeCompleteTokensIssued field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Results) GetBotChallengeCompleteTokensIssuedOk() (*int32, bool) { + if o == nil || o.BotChallengeCompleteTokensIssued == nil { + return nil, false + } + return o.BotChallengeCompleteTokensIssued, true +} + +// HasBotChallengeCompleteTokensIssued returns a boolean if a field has been set. +func (o *Results) HasBotChallengeCompleteTokensIssued() bool { + if o != nil && o.BotChallengeCompleteTokensIssued != nil { + return true + } + + return false +} + +// SetBotChallengeCompleteTokensIssued gets a reference to the given int32 and assigns it to the BotChallengeCompleteTokensIssued field. +func (o *Results) SetBotChallengeCompleteTokensIssued(v int32) { + o.BotChallengeCompleteTokensIssued = &v +} + +// GetBotChallengesIssued returns the BotChallengesIssued field value if set, zero value otherwise. +func (o *Results) GetBotChallengesIssued() int32 { + if o == nil || o.BotChallengesIssued == nil { + var ret int32 + return ret + } + return *o.BotChallengesIssued +} + +// GetBotChallengesIssuedOk returns a tuple with the BotChallengesIssued field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Results) GetBotChallengesIssuedOk() (*int32, bool) { + if o == nil || o.BotChallengesIssued == nil { + return nil, false + } + return o.BotChallengesIssued, true +} + +// HasBotChallengesIssued returns a boolean if a field has been set. +func (o *Results) HasBotChallengesIssued() bool { + if o != nil && o.BotChallengesIssued != nil { + return true + } + + return false +} + +// SetBotChallengesIssued gets a reference to the given int32 and assigns it to the BotChallengesIssued field. +func (o *Results) SetBotChallengesIssued(v int32) { + o.BotChallengesIssued = &v +} + +// GetBotChallengesSucceeded returns the BotChallengesSucceeded field value if set, zero value otherwise. +func (o *Results) GetBotChallengesSucceeded() int32 { + if o == nil || o.BotChallengesSucceeded == nil { + var ret int32 + return ret + } + return *o.BotChallengesSucceeded +} + +// GetBotChallengesSucceededOk returns a tuple with the BotChallengesSucceeded field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Results) GetBotChallengesSucceededOk() (*int32, bool) { + if o == nil || o.BotChallengesSucceeded == nil { + return nil, false + } + return o.BotChallengesSucceeded, true +} + +// HasBotChallengesSucceeded returns a boolean if a field has been set. +func (o *Results) HasBotChallengesSucceeded() bool { + if o != nil && o.BotChallengesSucceeded != nil { + return true + } + + return false +} + +// SetBotChallengesSucceeded gets a reference to the given int32 and assigns it to the BotChallengesSucceeded field. +func (o *Results) SetBotChallengesSucceeded(v int32) { + o.BotChallengesSucceeded = &v +} + +// GetBotChallengesFailed returns the BotChallengesFailed field value if set, zero value otherwise. +func (o *Results) GetBotChallengesFailed() int32 { + if o == nil || o.BotChallengesFailed == nil { + var ret int32 + return ret + } + return *o.BotChallengesFailed +} + +// GetBotChallengesFailedOk returns a tuple with the BotChallengesFailed field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Results) GetBotChallengesFailedOk() (*int32, bool) { + if o == nil || o.BotChallengesFailed == nil { + return nil, false + } + return o.BotChallengesFailed, true +} + +// HasBotChallengesFailed returns a boolean if a field has been set. +func (o *Results) HasBotChallengesFailed() bool { + if o != nil && o.BotChallengesFailed != nil { + return true + } + + return false +} + +// SetBotChallengesFailed gets a reference to the given int32 and assigns it to the BotChallengesFailed field. +func (o *Results) SetBotChallengesFailed(v int32) { + o.BotChallengesFailed = &v +} + // MarshalJSON implements the json.Marshaler interface. // Marshaler is the interface implemented by types that can marshal themselves into valid JSON. func (o Results) MarshalJSON() ([]byte, error) { @@ -8055,6 +8361,33 @@ func (o Results) MarshalJSON() ([]byte, error) { if o.DdosActionBlackhole != nil { toSerialize["ddos_action_blackhole"] = o.DdosActionBlackhole } + if o.BotChallengeStarts != nil { + toSerialize["bot_challenge_starts"] = o.BotChallengeStarts + } + if o.BotChallengeCompleteTokensPassed != nil { + toSerialize["bot_challenge_complete_tokens_passed"] = o.BotChallengeCompleteTokensPassed + } + if o.BotChallengeCompleteTokensFailed != nil { + toSerialize["bot_challenge_complete_tokens_failed"] = o.BotChallengeCompleteTokensFailed + } + if o.BotChallengeCompleteTokensChecked != nil { + toSerialize["bot_challenge_complete_tokens_checked"] = o.BotChallengeCompleteTokensChecked + } + if o.BotChallengeCompleteTokensDisabled != nil { + toSerialize["bot_challenge_complete_tokens_disabled"] = o.BotChallengeCompleteTokensDisabled + } + if o.BotChallengeCompleteTokensIssued != nil { + toSerialize["bot_challenge_complete_tokens_issued"] = o.BotChallengeCompleteTokensIssued + } + if o.BotChallengesIssued != nil { + toSerialize["bot_challenges_issued"] = o.BotChallengesIssued + } + if o.BotChallengesSucceeded != nil { + toSerialize["bot_challenges_succeeded"] = o.BotChallengesSucceeded + } + if o.BotChallengesFailed != nil { + toSerialize["bot_challenges_failed"] = o.BotChallengesFailed + } for key, value := range o.AdditionalProperties { toSerialize[key] = value @@ -8291,6 +8624,15 @@ func (o *Results) UnmarshalJSON(bytes []byte) (err error) { delete(additionalProperties, "ddos_action_tarpit") delete(additionalProperties, "ddos_action_close") delete(additionalProperties, "ddos_action_blackhole") + delete(additionalProperties, "bot_challenge_starts") + delete(additionalProperties, "bot_challenge_complete_tokens_passed") + delete(additionalProperties, "bot_challenge_complete_tokens_failed") + delete(additionalProperties, "bot_challenge_complete_tokens_checked") + delete(additionalProperties, "bot_challenge_complete_tokens_disabled") + delete(additionalProperties, "bot_challenge_complete_tokens_issued") + delete(additionalProperties, "bot_challenges_issued") + delete(additionalProperties, "bot_challenges_succeeded") + delete(additionalProperties, "bot_challenges_failed") o.AdditionalProperties = additionalProperties } diff --git a/fastly/model_schemas_snippet_response.go b/fastly/model_schemas_snippet_response.go index cf33db6..0165d06 100644 --- a/fastly/model_schemas_snippet_response.go +++ b/fastly/model_schemas_snippet_response.go @@ -22,14 +22,14 @@ import ( type SchemasSnippetResponse struct { // The name for the snippet. Name *string `json:"name,omitempty"` - // Sets the snippet version. - Dynamic *string `json:"dynamic,omitempty"` // The location in generated VCL where the snippet should be placed. Type *string `json:"type,omitempty"` // The VCL code that specifies exactly what the snippet does. Content *string `json:"content,omitempty"` // Priority determines execution order. Lower numbers execute first. Priority *string `json:"priority,omitempty"` + // Sets the snippet version. + Dynamic *string `json:"dynamic,omitempty"` // Date and time in ISO 8601 format. CreatedAt NullableTime `json:"created_at,omitempty"` // Date and time in ISO 8601 format. @@ -98,38 +98,6 @@ func (o *SchemasSnippetResponse) SetName(v string) { o.Name = &v } -// GetDynamic returns the Dynamic field value if set, zero value otherwise. -func (o *SchemasSnippetResponse) GetDynamic() string { - if o == nil || o.Dynamic == nil { - var ret string - return ret - } - return *o.Dynamic -} - -// GetDynamicOk returns a tuple with the Dynamic field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SchemasSnippetResponse) GetDynamicOk() (*string, bool) { - if o == nil || o.Dynamic == nil { - return nil, false - } - return o.Dynamic, true -} - -// HasDynamic returns a boolean if a field has been set. -func (o *SchemasSnippetResponse) HasDynamic() bool { - if o != nil && o.Dynamic != nil { - return true - } - - return false -} - -// SetDynamic gets a reference to the given string and assigns it to the Dynamic field. -func (o *SchemasSnippetResponse) SetDynamic(v string) { - o.Dynamic = &v -} - // GetType returns the Type field value if set, zero value otherwise. func (o *SchemasSnippetResponse) GetType() string { if o == nil || o.Type == nil { @@ -226,6 +194,38 @@ func (o *SchemasSnippetResponse) SetPriority(v string) { o.Priority = &v } +// GetDynamic returns the Dynamic field value if set, zero value otherwise. +func (o *SchemasSnippetResponse) GetDynamic() string { + if o == nil || o.Dynamic == nil { + var ret string + return ret + } + return *o.Dynamic +} + +// GetDynamicOk returns a tuple with the Dynamic field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SchemasSnippetResponse) GetDynamicOk() (*string, bool) { + if o == nil || o.Dynamic == nil { + return nil, false + } + return o.Dynamic, true +} + +// HasDynamic returns a boolean if a field has been set. +func (o *SchemasSnippetResponse) HasDynamic() bool { + if o != nil && o.Dynamic != nil { + return true + } + + return false +} + +// SetDynamic gets a reference to the given string and assigns it to the Dynamic field. +func (o *SchemasSnippetResponse) SetDynamic(v string) { + o.Dynamic = &v +} + // GetCreatedAt returns the CreatedAt field value if set, zero value otherwise (both if not set or set to explicit null). func (o *SchemasSnippetResponse) GetCreatedAt() time.Time { if o == nil || o.CreatedAt.Get() == nil { @@ -455,9 +455,6 @@ func (o SchemasSnippetResponse) MarshalJSON() ([]byte, error) { if o.Name != nil { toSerialize["name"] = o.Name } - if o.Dynamic != nil { - toSerialize["dynamic"] = o.Dynamic - } if o.Type != nil { toSerialize["type"] = o.Type } @@ -467,6 +464,9 @@ func (o SchemasSnippetResponse) MarshalJSON() ([]byte, error) { if o.Priority != nil { toSerialize["priority"] = o.Priority } + if o.Dynamic != nil { + toSerialize["dynamic"] = o.Dynamic + } if o.CreatedAt.IsSet() { toSerialize["created_at"] = o.CreatedAt.Get() } @@ -506,10 +506,10 @@ func (o *SchemasSnippetResponse) UnmarshalJSON(bytes []byte) (err error) { if err = json.Unmarshal(bytes, &additionalProperties); err == nil { delete(additionalProperties, "name") - delete(additionalProperties, "dynamic") delete(additionalProperties, "type") delete(additionalProperties, "content") delete(additionalProperties, "priority") + delete(additionalProperties, "dynamic") delete(additionalProperties, "created_at") delete(additionalProperties, "deleted_at") delete(additionalProperties, "updated_at") diff --git a/fastly/model_schemas_snippet_response_common.go b/fastly/model_schemas_snippet_response_common.go new file mode 100644 index 0000000..ee74236 --- /dev/null +++ b/fastly/model_schemas_snippet_response_common.go @@ -0,0 +1,375 @@ +// Package fastly is an API client library for interacting with most facets of the Fastly API. +package fastly + +/* +Fastly API + +Via the Fastly API you can perform any of the operations that are possible within the management console, including creating services, domains, and backends, configuring rules or uploading your own application code, as well as account operations such as user administration and billing reports. The API is organized into collections of endpoints that allow manipulation of objects related to Fastly services and accounts. For the most accurate and up-to-date API reference content, visit our [Developer Hub](https://developer.fastly.com/reference/api/) + +API version: 1.0.0 +Contact: oss@fastly.com +*/ + +// This code is auto-generated; DO NOT EDIT. + + +import ( + "encoding/json" + "time" +) + +// SchemasSnippetResponseCommon struct for SchemasSnippetResponseCommon +type SchemasSnippetResponseCommon struct { + // Date and time in ISO 8601 format. + CreatedAt NullableTime `json:"created_at,omitempty"` + // Date and time in ISO 8601 format. + DeletedAt NullableTime `json:"deleted_at,omitempty"` + // Date and time in ISO 8601 format. + UpdatedAt NullableTime `json:"updated_at,omitempty"` + ServiceID *string `json:"service_id,omitempty"` + // String representing the number identifying a version of the service. + Version *string `json:"version,omitempty"` + ID *string `json:"id,omitempty"` + AdditionalProperties map[string]any +} + +type _SchemasSnippetResponseCommon SchemasSnippetResponseCommon + +// NewSchemasSnippetResponseCommon instantiates a new SchemasSnippetResponseCommon object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSchemasSnippetResponseCommon() *SchemasSnippetResponseCommon { + this := SchemasSnippetResponseCommon{} + return &this +} + +// NewSchemasSnippetResponseCommonWithDefaults instantiates a new SchemasSnippetResponseCommon object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSchemasSnippetResponseCommonWithDefaults() *SchemasSnippetResponseCommon { + this := SchemasSnippetResponseCommon{} + return &this +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SchemasSnippetResponseCommon) GetCreatedAt() time.Time { + if o == nil || o.CreatedAt.Get() == nil { + var ret time.Time + return ret + } + return *o.CreatedAt.Get() +} + +// GetCreatedAtOk returns a tuple with the CreatedAt 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 *SchemasSnippetResponseCommon) GetCreatedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.CreatedAt.Get(), o.CreatedAt.IsSet() +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *SchemasSnippetResponseCommon) HasCreatedAt() bool { + if o != nil && o.CreatedAt.IsSet() { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given NullableTime and assigns it to the CreatedAt field. +func (o *SchemasSnippetResponseCommon) SetCreatedAt(v time.Time) { + o.CreatedAt.Set(&v) +} +// SetCreatedAtNil sets the value for CreatedAt to be an explicit nil +func (o *SchemasSnippetResponseCommon) SetCreatedAtNil() { + o.CreatedAt.Set(nil) +} + +// UnsetCreatedAt ensures that no value is present for CreatedAt, not even an explicit nil +func (o *SchemasSnippetResponseCommon) UnsetCreatedAt() { + o.CreatedAt.Unset() +} + +// GetDeletedAt returns the DeletedAt field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SchemasSnippetResponseCommon) GetDeletedAt() time.Time { + if o == nil || o.DeletedAt.Get() == nil { + var ret time.Time + return ret + } + return *o.DeletedAt.Get() +} + +// GetDeletedAtOk returns a tuple with the DeletedAt 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 *SchemasSnippetResponseCommon) GetDeletedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.DeletedAt.Get(), o.DeletedAt.IsSet() +} + +// HasDeletedAt returns a boolean if a field has been set. +func (o *SchemasSnippetResponseCommon) HasDeletedAt() bool { + if o != nil && o.DeletedAt.IsSet() { + return true + } + + return false +} + +// SetDeletedAt gets a reference to the given NullableTime and assigns it to the DeletedAt field. +func (o *SchemasSnippetResponseCommon) SetDeletedAt(v time.Time) { + o.DeletedAt.Set(&v) +} +// SetDeletedAtNil sets the value for DeletedAt to be an explicit nil +func (o *SchemasSnippetResponseCommon) SetDeletedAtNil() { + o.DeletedAt.Set(nil) +} + +// UnsetDeletedAt ensures that no value is present for DeletedAt, not even an explicit nil +func (o *SchemasSnippetResponseCommon) UnsetDeletedAt() { + o.DeletedAt.Unset() +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SchemasSnippetResponseCommon) GetUpdatedAt() time.Time { + if o == nil || o.UpdatedAt.Get() == nil { + var ret time.Time + return ret + } + return *o.UpdatedAt.Get() +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt 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 *SchemasSnippetResponseCommon) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.UpdatedAt.Get(), o.UpdatedAt.IsSet() +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *SchemasSnippetResponseCommon) HasUpdatedAt() bool { + if o != nil && o.UpdatedAt.IsSet() { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given NullableTime and assigns it to the UpdatedAt field. +func (o *SchemasSnippetResponseCommon) SetUpdatedAt(v time.Time) { + o.UpdatedAt.Set(&v) +} +// SetUpdatedAtNil sets the value for UpdatedAt to be an explicit nil +func (o *SchemasSnippetResponseCommon) SetUpdatedAtNil() { + o.UpdatedAt.Set(nil) +} + +// UnsetUpdatedAt ensures that no value is present for UpdatedAt, not even an explicit nil +func (o *SchemasSnippetResponseCommon) UnsetUpdatedAt() { + o.UpdatedAt.Unset() +} + +// GetServiceID returns the ServiceID field value if set, zero value otherwise. +func (o *SchemasSnippetResponseCommon) GetServiceID() string { + if o == nil || o.ServiceID == nil { + var ret string + return ret + } + return *o.ServiceID +} + +// GetServiceIDOk returns a tuple with the ServiceID field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SchemasSnippetResponseCommon) GetServiceIDOk() (*string, bool) { + if o == nil || o.ServiceID == nil { + return nil, false + } + return o.ServiceID, true +} + +// HasServiceID returns a boolean if a field has been set. +func (o *SchemasSnippetResponseCommon) HasServiceID() bool { + if o != nil && o.ServiceID != nil { + return true + } + + return false +} + +// SetServiceID gets a reference to the given string and assigns it to the ServiceID field. +func (o *SchemasSnippetResponseCommon) SetServiceID(v string) { + o.ServiceID = &v +} + +// GetVersion returns the Version field value if set, zero value otherwise. +func (o *SchemasSnippetResponseCommon) GetVersion() string { + if o == nil || o.Version == nil { + var ret string + return ret + } + return *o.Version +} + +// GetVersionOk returns a tuple with the Version field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SchemasSnippetResponseCommon) GetVersionOk() (*string, bool) { + if o == nil || o.Version == nil { + return nil, false + } + return o.Version, true +} + +// HasVersion returns a boolean if a field has been set. +func (o *SchemasSnippetResponseCommon) HasVersion() bool { + if o != nil && o.Version != nil { + return true + } + + return false +} + +// SetVersion gets a reference to the given string and assigns it to the Version field. +func (o *SchemasSnippetResponseCommon) SetVersion(v string) { + o.Version = &v +} + +// GetID returns the ID field value if set, zero value otherwise. +func (o *SchemasSnippetResponseCommon) GetID() string { + if o == nil || o.ID == nil { + 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 *SchemasSnippetResponseCommon) GetIDOk() (*string, bool) { + if o == nil || o.ID == nil { + return nil, false + } + return o.ID, true +} + +// HasID returns a boolean if a field has been set. +func (o *SchemasSnippetResponseCommon) HasID() bool { + if o != nil && o.ID != nil { + return true + } + + return false +} + +// SetID gets a reference to the given string and assigns it to the ID field. +func (o *SchemasSnippetResponseCommon) SetID(v string) { + o.ID = &v +} + +// MarshalJSON implements the json.Marshaler interface. +// Marshaler is the interface implemented by types that can marshal themselves into valid JSON. +func (o SchemasSnippetResponseCommon) MarshalJSON() ([]byte, error) { + toSerialize := map[string]any{} + if o.CreatedAt.IsSet() { + toSerialize["created_at"] = o.CreatedAt.Get() + } + if o.DeletedAt.IsSet() { + toSerialize["deleted_at"] = o.DeletedAt.Get() + } + if o.UpdatedAt.IsSet() { + toSerialize["updated_at"] = o.UpdatedAt.Get() + } + if o.ServiceID != nil { + toSerialize["service_id"] = o.ServiceID + } + if o.Version != nil { + toSerialize["version"] = o.Version + } + if o.ID != nil { + toSerialize["id"] = o.ID + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return json.Marshal(toSerialize) +} + +// UnmarshalJSON implements the Unmarshaler interface. +// Unmarshaler is the interface implemented by types that can unmarshal a JSON description of themselves. +func (o *SchemasSnippetResponseCommon) UnmarshalJSON(bytes []byte) (err error) { + varSchemasSnippetResponseCommon := _SchemasSnippetResponseCommon{} + + if err = json.Unmarshal(bytes, &varSchemasSnippetResponseCommon); err == nil { + *o = SchemasSnippetResponseCommon(varSchemasSnippetResponseCommon) + } + + additionalProperties := make(map[string]any) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "created_at") + delete(additionalProperties, "deleted_at") + delete(additionalProperties, "updated_at") + delete(additionalProperties, "service_id") + delete(additionalProperties, "version") + delete(additionalProperties, "id") + o.AdditionalProperties = additionalProperties + } + + return err +} + +// NullableSchemasSnippetResponseCommon is a helper abstraction for handling nullable schemassnippetresponsecommon types. +type NullableSchemasSnippetResponseCommon struct { + value *SchemasSnippetResponseCommon + isSet bool +} + +// Get returns the value. +func (v NullableSchemasSnippetResponseCommon) Get() *SchemasSnippetResponseCommon { + return v.value +} + +// Set modifies the value. +func (v *NullableSchemasSnippetResponseCommon) Set(val *SchemasSnippetResponseCommon) { + v.value = val + v.isSet = true +} + +// IsSet indicates if the value was set. +func (v NullableSchemasSnippetResponseCommon) IsSet() bool { + return v.isSet +} + +// Unset removes the value. +func (v *NullableSchemasSnippetResponseCommon) Unset() { + v.value = nil + v.isSet = false +} + +// NewNullableSchemasSnippetResponseCommon returns a pointer to a new instance of NullableSchemasSnippetResponseCommon. +func NewNullableSchemasSnippetResponseCommon(val *SchemasSnippetResponseCommon) *NullableSchemasSnippetResponseCommon { + return &NullableSchemasSnippetResponseCommon{value: val, isSet: true} +} + +// MarshalJSON implements the json.Marshaler interface. +// Marshaler is the interface implemented by types that can marshal themselves into valid JSON. +func (v NullableSchemasSnippetResponseCommon) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +// UnmarshalJSON implements the Unmarshaler interface. +// Unmarshaler is the interface implemented by types that can unmarshal a JSON description of themselves. +func (v *NullableSchemasSnippetResponseCommon) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/fastly/model_snippet.go b/fastly/model_snippet.go index 2323e47..068520c 100644 --- a/fastly/model_snippet.go +++ b/fastly/model_snippet.go @@ -21,14 +21,14 @@ import ( type Snippet struct { // The name for the snippet. Name *string `json:"name,omitempty"` - // Sets the snippet version. - Dynamic *string `json:"dynamic,omitempty"` // The location in generated VCL where the snippet should be placed. Type *string `json:"type,omitempty"` // The VCL code that specifies exactly what the snippet does. Content *string `json:"content,omitempty"` // Priority determines execution order. Lower numbers execute first. Priority *string `json:"priority,omitempty"` + // Sets the snippet version. + Dynamic *string `json:"dynamic,omitempty"` AdditionalProperties map[string]any } @@ -87,38 +87,6 @@ func (o *Snippet) SetName(v string) { o.Name = &v } -// GetDynamic returns the Dynamic field value if set, zero value otherwise. -func (o *Snippet) GetDynamic() string { - if o == nil || o.Dynamic == nil { - var ret string - return ret - } - return *o.Dynamic -} - -// GetDynamicOk returns a tuple with the Dynamic field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Snippet) GetDynamicOk() (*string, bool) { - if o == nil || o.Dynamic == nil { - return nil, false - } - return o.Dynamic, true -} - -// HasDynamic returns a boolean if a field has been set. -func (o *Snippet) HasDynamic() bool { - if o != nil && o.Dynamic != nil { - return true - } - - return false -} - -// SetDynamic gets a reference to the given string and assigns it to the Dynamic field. -func (o *Snippet) SetDynamic(v string) { - o.Dynamic = &v -} - // GetType returns the Type field value if set, zero value otherwise. func (o *Snippet) GetType() string { if o == nil || o.Type == nil { @@ -215,6 +183,38 @@ func (o *Snippet) SetPriority(v string) { o.Priority = &v } +// GetDynamic returns the Dynamic field value if set, zero value otherwise. +func (o *Snippet) GetDynamic() string { + if o == nil || o.Dynamic == nil { + var ret string + return ret + } + return *o.Dynamic +} + +// GetDynamicOk returns a tuple with the Dynamic field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Snippet) GetDynamicOk() (*string, bool) { + if o == nil || o.Dynamic == nil { + return nil, false + } + return o.Dynamic, true +} + +// HasDynamic returns a boolean if a field has been set. +func (o *Snippet) HasDynamic() bool { + if o != nil && o.Dynamic != nil { + return true + } + + return false +} + +// SetDynamic gets a reference to the given string and assigns it to the Dynamic field. +func (o *Snippet) SetDynamic(v string) { + o.Dynamic = &v +} + // MarshalJSON implements the json.Marshaler interface. // Marshaler is the interface implemented by types that can marshal themselves into valid JSON. func (o Snippet) MarshalJSON() ([]byte, error) { @@ -222,9 +222,6 @@ func (o Snippet) MarshalJSON() ([]byte, error) { if o.Name != nil { toSerialize["name"] = o.Name } - if o.Dynamic != nil { - toSerialize["dynamic"] = o.Dynamic - } if o.Type != nil { toSerialize["type"] = o.Type } @@ -234,6 +231,9 @@ func (o Snippet) MarshalJSON() ([]byte, error) { if o.Priority != nil { toSerialize["priority"] = o.Priority } + if o.Dynamic != nil { + toSerialize["dynamic"] = o.Dynamic + } for key, value := range o.AdditionalProperties { toSerialize[key] = value @@ -255,10 +255,10 @@ func (o *Snippet) UnmarshalJSON(bytes []byte) (err error) { if err = json.Unmarshal(bytes, &additionalProperties); err == nil { delete(additionalProperties, "name") - delete(additionalProperties, "dynamic") delete(additionalProperties, "type") delete(additionalProperties, "content") delete(additionalProperties, "priority") + delete(additionalProperties, "dynamic") o.AdditionalProperties = additionalProperties } diff --git a/fastly/model_snippet_all_of.go b/fastly/model_snippet_all_of.go new file mode 100644 index 0000000..b539bc0 --- /dev/null +++ b/fastly/model_snippet_all_of.go @@ -0,0 +1,156 @@ +// Package fastly is an API client library for interacting with most facets of the Fastly API. +package fastly + +/* +Fastly API + +Via the Fastly API you can perform any of the operations that are possible within the management console, including creating services, domains, and backends, configuring rules or uploading your own application code, as well as account operations such as user administration and billing reports. The API is organized into collections of endpoints that allow manipulation of objects related to Fastly services and accounts. For the most accurate and up-to-date API reference content, visit our [Developer Hub](https://developer.fastly.com/reference/api/) + +API version: 1.0.0 +Contact: oss@fastly.com +*/ + +// This code is auto-generated; DO NOT EDIT. + + +import ( + "encoding/json" +) + +// SnippetAllOf struct for SnippetAllOf +type SnippetAllOf struct { + // Sets the snippet version. + Dynamic *string `json:"dynamic,omitempty"` + AdditionalProperties map[string]any +} + +type _SnippetAllOf SnippetAllOf + +// NewSnippetAllOf instantiates a new SnippetAllOf object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSnippetAllOf() *SnippetAllOf { + this := SnippetAllOf{} + return &this +} + +// NewSnippetAllOfWithDefaults instantiates a new SnippetAllOf object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSnippetAllOfWithDefaults() *SnippetAllOf { + this := SnippetAllOf{} + return &this +} + +// GetDynamic returns the Dynamic field value if set, zero value otherwise. +func (o *SnippetAllOf) GetDynamic() string { + if o == nil || o.Dynamic == nil { + var ret string + return ret + } + return *o.Dynamic +} + +// GetDynamicOk returns a tuple with the Dynamic field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SnippetAllOf) GetDynamicOk() (*string, bool) { + if o == nil || o.Dynamic == nil { + return nil, false + } + return o.Dynamic, true +} + +// HasDynamic returns a boolean if a field has been set. +func (o *SnippetAllOf) HasDynamic() bool { + if o != nil && o.Dynamic != nil { + return true + } + + return false +} + +// SetDynamic gets a reference to the given string and assigns it to the Dynamic field. +func (o *SnippetAllOf) SetDynamic(v string) { + o.Dynamic = &v +} + +// MarshalJSON implements the json.Marshaler interface. +// Marshaler is the interface implemented by types that can marshal themselves into valid JSON. +func (o SnippetAllOf) MarshalJSON() ([]byte, error) { + toSerialize := map[string]any{} + if o.Dynamic != nil { + toSerialize["dynamic"] = o.Dynamic + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return json.Marshal(toSerialize) +} + +// UnmarshalJSON implements the Unmarshaler interface. +// Unmarshaler is the interface implemented by types that can unmarshal a JSON description of themselves. +func (o *SnippetAllOf) UnmarshalJSON(bytes []byte) (err error) { + varSnippetAllOf := _SnippetAllOf{} + + if err = json.Unmarshal(bytes, &varSnippetAllOf); err == nil { + *o = SnippetAllOf(varSnippetAllOf) + } + + additionalProperties := make(map[string]any) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "dynamic") + o.AdditionalProperties = additionalProperties + } + + return err +} + +// NullableSnippetAllOf is a helper abstraction for handling nullable snippetallof types. +type NullableSnippetAllOf struct { + value *SnippetAllOf + isSet bool +} + +// Get returns the value. +func (v NullableSnippetAllOf) Get() *SnippetAllOf { + return v.value +} + +// Set modifies the value. +func (v *NullableSnippetAllOf) Set(val *SnippetAllOf) { + v.value = val + v.isSet = true +} + +// IsSet indicates if the value was set. +func (v NullableSnippetAllOf) IsSet() bool { + return v.isSet +} + +// Unset removes the value. +func (v *NullableSnippetAllOf) Unset() { + v.value = nil + v.isSet = false +} + +// NewNullableSnippetAllOf returns a pointer to a new instance of NullableSnippetAllOf. +func NewNullableSnippetAllOf(val *SnippetAllOf) *NullableSnippetAllOf { + return &NullableSnippetAllOf{value: val, isSet: true} +} + +// MarshalJSON implements the json.Marshaler interface. +// Marshaler is the interface implemented by types that can marshal themselves into valid JSON. +func (v NullableSnippetAllOf) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +// UnmarshalJSON implements the Unmarshaler interface. +// Unmarshaler is the interface implemented by types that can unmarshal a JSON description of themselves. +func (v *NullableSnippetAllOf) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/fastly/model_snippet_common.go b/fastly/model_snippet_common.go new file mode 100644 index 0000000..b01963c --- /dev/null +++ b/fastly/model_snippet_common.go @@ -0,0 +1,274 @@ +// Package fastly is an API client library for interacting with most facets of the Fastly API. +package fastly + +/* +Fastly API + +Via the Fastly API you can perform any of the operations that are possible within the management console, including creating services, domains, and backends, configuring rules or uploading your own application code, as well as account operations such as user administration and billing reports. The API is organized into collections of endpoints that allow manipulation of objects related to Fastly services and accounts. For the most accurate and up-to-date API reference content, visit our [Developer Hub](https://developer.fastly.com/reference/api/) + +API version: 1.0.0 +Contact: oss@fastly.com +*/ + +// This code is auto-generated; DO NOT EDIT. + + +import ( + "encoding/json" +) + +// SnippetCommon struct for SnippetCommon +type SnippetCommon struct { + // The name for the snippet. + Name *string `json:"name,omitempty"` + // The location in generated VCL where the snippet should be placed. + Type *string `json:"type,omitempty"` + // The VCL code that specifies exactly what the snippet does. + Content *string `json:"content,omitempty"` + // Priority determines execution order. Lower numbers execute first. + Priority *string `json:"priority,omitempty"` + AdditionalProperties map[string]any +} + +type _SnippetCommon SnippetCommon + +// NewSnippetCommon instantiates a new SnippetCommon object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSnippetCommon() *SnippetCommon { + this := SnippetCommon{} + var priority string = "100" + this.Priority = &priority + return &this +} + +// NewSnippetCommonWithDefaults instantiates a new SnippetCommon object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSnippetCommonWithDefaults() *SnippetCommon { + this := SnippetCommon{} + var priority string = "100" + this.Priority = &priority + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *SnippetCommon) GetName() string { + if o == nil || o.Name == nil { + 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 *SnippetCommon) GetNameOk() (*string, bool) { + if o == nil || o.Name == nil { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *SnippetCommon) HasName() bool { + if o != nil && o.Name != nil { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *SnippetCommon) SetName(v string) { + o.Name = &v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *SnippetCommon) GetType() string { + if o == nil || o.Type == nil { + 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 *SnippetCommon) GetTypeOk() (*string, bool) { + if o == nil || o.Type == nil { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *SnippetCommon) HasType() bool { + if o != nil && o.Type != nil { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *SnippetCommon) SetType(v string) { + o.Type = &v +} + +// GetContent returns the Content field value if set, zero value otherwise. +func (o *SnippetCommon) GetContent() string { + if o == nil || o.Content == nil { + var ret string + return ret + } + return *o.Content +} + +// GetContentOk returns a tuple with the Content field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SnippetCommon) GetContentOk() (*string, bool) { + if o == nil || o.Content == nil { + return nil, false + } + return o.Content, true +} + +// HasContent returns a boolean if a field has been set. +func (o *SnippetCommon) HasContent() bool { + if o != nil && o.Content != nil { + return true + } + + return false +} + +// SetContent gets a reference to the given string and assigns it to the Content field. +func (o *SnippetCommon) SetContent(v string) { + o.Content = &v +} + +// GetPriority returns the Priority field value if set, zero value otherwise. +func (o *SnippetCommon) GetPriority() string { + if o == nil || o.Priority == nil { + var ret string + 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 *SnippetCommon) GetPriorityOk() (*string, bool) { + if o == nil || o.Priority == nil { + return nil, false + } + return o.Priority, true +} + +// HasPriority returns a boolean if a field has been set. +func (o *SnippetCommon) HasPriority() bool { + if o != nil && o.Priority != nil { + return true + } + + return false +} + +// SetPriority gets a reference to the given string and assigns it to the Priority field. +func (o *SnippetCommon) SetPriority(v string) { + o.Priority = &v +} + +// MarshalJSON implements the json.Marshaler interface. +// Marshaler is the interface implemented by types that can marshal themselves into valid JSON. +func (o SnippetCommon) MarshalJSON() ([]byte, error) { + toSerialize := map[string]any{} + if o.Name != nil { + toSerialize["name"] = o.Name + } + if o.Type != nil { + toSerialize["type"] = o.Type + } + if o.Content != nil { + toSerialize["content"] = o.Content + } + if o.Priority != nil { + toSerialize["priority"] = o.Priority + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return json.Marshal(toSerialize) +} + +// UnmarshalJSON implements the Unmarshaler interface. +// Unmarshaler is the interface implemented by types that can unmarshal a JSON description of themselves. +func (o *SnippetCommon) UnmarshalJSON(bytes []byte) (err error) { + varSnippetCommon := _SnippetCommon{} + + if err = json.Unmarshal(bytes, &varSnippetCommon); err == nil { + *o = SnippetCommon(varSnippetCommon) + } + + additionalProperties := make(map[string]any) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "name") + delete(additionalProperties, "type") + delete(additionalProperties, "content") + delete(additionalProperties, "priority") + o.AdditionalProperties = additionalProperties + } + + return err +} + +// NullableSnippetCommon is a helper abstraction for handling nullable snippetcommon types. +type NullableSnippetCommon struct { + value *SnippetCommon + isSet bool +} + +// Get returns the value. +func (v NullableSnippetCommon) Get() *SnippetCommon { + return v.value +} + +// Set modifies the value. +func (v *NullableSnippetCommon) Set(val *SnippetCommon) { + v.value = val + v.isSet = true +} + +// IsSet indicates if the value was set. +func (v NullableSnippetCommon) IsSet() bool { + return v.isSet +} + +// Unset removes the value. +func (v *NullableSnippetCommon) Unset() { + v.value = nil + v.isSet = false +} + +// NewNullableSnippetCommon returns a pointer to a new instance of NullableSnippetCommon. +func NewNullableSnippetCommon(val *SnippetCommon) *NullableSnippetCommon { + return &NullableSnippetCommon{value: val, isSet: true} +} + +// MarshalJSON implements the json.Marshaler interface. +// Marshaler is the interface implemented by types that can marshal themselves into valid JSON. +func (v NullableSnippetCommon) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +// UnmarshalJSON implements the Unmarshaler interface. +// Unmarshaler is the interface implemented by types that can unmarshal a JSON description of themselves. +func (v *NullableSnippetCommon) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/fastly/model_snippet_response.go b/fastly/model_snippet_response.go index facd125..b8f74d1 100644 --- a/fastly/model_snippet_response.go +++ b/fastly/model_snippet_response.go @@ -22,14 +22,14 @@ import ( type SnippetResponse struct { // The name for the snippet. Name *string `json:"name,omitempty"` - // Sets the snippet version. - Dynamic *string `json:"dynamic,omitempty"` // The location in generated VCL where the snippet should be placed. Type *string `json:"type,omitempty"` // The VCL code that specifies exactly what the snippet does. Content *string `json:"content,omitempty"` // Priority determines execution order. Lower numbers execute first. Priority *string `json:"priority,omitempty"` + // Sets the snippet version. + Dynamic *string `json:"dynamic,omitempty"` // Date and time in ISO 8601 format. CreatedAt NullableTime `json:"created_at,omitempty"` // Date and time in ISO 8601 format. @@ -98,38 +98,6 @@ func (o *SnippetResponse) SetName(v string) { o.Name = &v } -// GetDynamic returns the Dynamic field value if set, zero value otherwise. -func (o *SnippetResponse) GetDynamic() string { - if o == nil || o.Dynamic == nil { - var ret string - return ret - } - return *o.Dynamic -} - -// GetDynamicOk returns a tuple with the Dynamic field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SnippetResponse) GetDynamicOk() (*string, bool) { - if o == nil || o.Dynamic == nil { - return nil, false - } - return o.Dynamic, true -} - -// HasDynamic returns a boolean if a field has been set. -func (o *SnippetResponse) HasDynamic() bool { - if o != nil && o.Dynamic != nil { - return true - } - - return false -} - -// SetDynamic gets a reference to the given string and assigns it to the Dynamic field. -func (o *SnippetResponse) SetDynamic(v string) { - o.Dynamic = &v -} - // GetType returns the Type field value if set, zero value otherwise. func (o *SnippetResponse) GetType() string { if o == nil || o.Type == nil { @@ -226,6 +194,38 @@ func (o *SnippetResponse) SetPriority(v string) { o.Priority = &v } +// GetDynamic returns the Dynamic field value if set, zero value otherwise. +func (o *SnippetResponse) GetDynamic() string { + if o == nil || o.Dynamic == nil { + var ret string + return ret + } + return *o.Dynamic +} + +// GetDynamicOk returns a tuple with the Dynamic field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SnippetResponse) GetDynamicOk() (*string, bool) { + if o == nil || o.Dynamic == nil { + return nil, false + } + return o.Dynamic, true +} + +// HasDynamic returns a boolean if a field has been set. +func (o *SnippetResponse) HasDynamic() bool { + if o != nil && o.Dynamic != nil { + return true + } + + return false +} + +// SetDynamic gets a reference to the given string and assigns it to the Dynamic field. +func (o *SnippetResponse) SetDynamic(v string) { + o.Dynamic = &v +} + // GetCreatedAt returns the CreatedAt field value if set, zero value otherwise (both if not set or set to explicit null). func (o *SnippetResponse) GetCreatedAt() time.Time { if o == nil || o.CreatedAt.Get() == nil { @@ -455,9 +455,6 @@ func (o SnippetResponse) MarshalJSON() ([]byte, error) { if o.Name != nil { toSerialize["name"] = o.Name } - if o.Dynamic != nil { - toSerialize["dynamic"] = o.Dynamic - } if o.Type != nil { toSerialize["type"] = o.Type } @@ -467,6 +464,9 @@ func (o SnippetResponse) MarshalJSON() ([]byte, error) { if o.Priority != nil { toSerialize["priority"] = o.Priority } + if o.Dynamic != nil { + toSerialize["dynamic"] = o.Dynamic + } if o.CreatedAt.IsSet() { toSerialize["created_at"] = o.CreatedAt.Get() } @@ -506,10 +506,10 @@ func (o *SnippetResponse) UnmarshalJSON(bytes []byte) (err error) { if err = json.Unmarshal(bytes, &additionalProperties); err == nil { delete(additionalProperties, "name") - delete(additionalProperties, "dynamic") delete(additionalProperties, "type") delete(additionalProperties, "content") delete(additionalProperties, "priority") + delete(additionalProperties, "dynamic") delete(additionalProperties, "created_at") delete(additionalProperties, "deleted_at") delete(additionalProperties, "updated_at") diff --git a/fastly/model_snippet_response_common.go b/fastly/model_snippet_response_common.go new file mode 100644 index 0000000..2fd9bb7 --- /dev/null +++ b/fastly/model_snippet_response_common.go @@ -0,0 +1,375 @@ +// Package fastly is an API client library for interacting with most facets of the Fastly API. +package fastly + +/* +Fastly API + +Via the Fastly API you can perform any of the operations that are possible within the management console, including creating services, domains, and backends, configuring rules or uploading your own application code, as well as account operations such as user administration and billing reports. The API is organized into collections of endpoints that allow manipulation of objects related to Fastly services and accounts. For the most accurate and up-to-date API reference content, visit our [Developer Hub](https://developer.fastly.com/reference/api/) + +API version: 1.0.0 +Contact: oss@fastly.com +*/ + +// This code is auto-generated; DO NOT EDIT. + + +import ( + "encoding/json" + "time" +) + +// SnippetResponseCommon struct for SnippetResponseCommon +type SnippetResponseCommon struct { + // Date and time in ISO 8601 format. + CreatedAt NullableTime `json:"created_at,omitempty"` + // Date and time in ISO 8601 format. + DeletedAt NullableTime `json:"deleted_at,omitempty"` + // Date and time in ISO 8601 format. + UpdatedAt NullableTime `json:"updated_at,omitempty"` + ServiceID *string `json:"service_id,omitempty"` + // String representing the number identifying a version of the service. + Version *string `json:"version,omitempty"` + ID *string `json:"id,omitempty"` + AdditionalProperties map[string]any +} + +type _SnippetResponseCommon SnippetResponseCommon + +// NewSnippetResponseCommon instantiates a new SnippetResponseCommon object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSnippetResponseCommon() *SnippetResponseCommon { + this := SnippetResponseCommon{} + return &this +} + +// NewSnippetResponseCommonWithDefaults instantiates a new SnippetResponseCommon object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSnippetResponseCommonWithDefaults() *SnippetResponseCommon { + this := SnippetResponseCommon{} + return &this +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SnippetResponseCommon) GetCreatedAt() time.Time { + if o == nil || o.CreatedAt.Get() == nil { + var ret time.Time + return ret + } + return *o.CreatedAt.Get() +} + +// GetCreatedAtOk returns a tuple with the CreatedAt 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 *SnippetResponseCommon) GetCreatedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.CreatedAt.Get(), o.CreatedAt.IsSet() +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *SnippetResponseCommon) HasCreatedAt() bool { + if o != nil && o.CreatedAt.IsSet() { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given NullableTime and assigns it to the CreatedAt field. +func (o *SnippetResponseCommon) SetCreatedAt(v time.Time) { + o.CreatedAt.Set(&v) +} +// SetCreatedAtNil sets the value for CreatedAt to be an explicit nil +func (o *SnippetResponseCommon) SetCreatedAtNil() { + o.CreatedAt.Set(nil) +} + +// UnsetCreatedAt ensures that no value is present for CreatedAt, not even an explicit nil +func (o *SnippetResponseCommon) UnsetCreatedAt() { + o.CreatedAt.Unset() +} + +// GetDeletedAt returns the DeletedAt field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SnippetResponseCommon) GetDeletedAt() time.Time { + if o == nil || o.DeletedAt.Get() == nil { + var ret time.Time + return ret + } + return *o.DeletedAt.Get() +} + +// GetDeletedAtOk returns a tuple with the DeletedAt 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 *SnippetResponseCommon) GetDeletedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.DeletedAt.Get(), o.DeletedAt.IsSet() +} + +// HasDeletedAt returns a boolean if a field has been set. +func (o *SnippetResponseCommon) HasDeletedAt() bool { + if o != nil && o.DeletedAt.IsSet() { + return true + } + + return false +} + +// SetDeletedAt gets a reference to the given NullableTime and assigns it to the DeletedAt field. +func (o *SnippetResponseCommon) SetDeletedAt(v time.Time) { + o.DeletedAt.Set(&v) +} +// SetDeletedAtNil sets the value for DeletedAt to be an explicit nil +func (o *SnippetResponseCommon) SetDeletedAtNil() { + o.DeletedAt.Set(nil) +} + +// UnsetDeletedAt ensures that no value is present for DeletedAt, not even an explicit nil +func (o *SnippetResponseCommon) UnsetDeletedAt() { + o.DeletedAt.Unset() +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SnippetResponseCommon) GetUpdatedAt() time.Time { + if o == nil || o.UpdatedAt.Get() == nil { + var ret time.Time + return ret + } + return *o.UpdatedAt.Get() +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt 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 *SnippetResponseCommon) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.UpdatedAt.Get(), o.UpdatedAt.IsSet() +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *SnippetResponseCommon) HasUpdatedAt() bool { + if o != nil && o.UpdatedAt.IsSet() { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given NullableTime and assigns it to the UpdatedAt field. +func (o *SnippetResponseCommon) SetUpdatedAt(v time.Time) { + o.UpdatedAt.Set(&v) +} +// SetUpdatedAtNil sets the value for UpdatedAt to be an explicit nil +func (o *SnippetResponseCommon) SetUpdatedAtNil() { + o.UpdatedAt.Set(nil) +} + +// UnsetUpdatedAt ensures that no value is present for UpdatedAt, not even an explicit nil +func (o *SnippetResponseCommon) UnsetUpdatedAt() { + o.UpdatedAt.Unset() +} + +// GetServiceID returns the ServiceID field value if set, zero value otherwise. +func (o *SnippetResponseCommon) GetServiceID() string { + if o == nil || o.ServiceID == nil { + var ret string + return ret + } + return *o.ServiceID +} + +// GetServiceIDOk returns a tuple with the ServiceID field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SnippetResponseCommon) GetServiceIDOk() (*string, bool) { + if o == nil || o.ServiceID == nil { + return nil, false + } + return o.ServiceID, true +} + +// HasServiceID returns a boolean if a field has been set. +func (o *SnippetResponseCommon) HasServiceID() bool { + if o != nil && o.ServiceID != nil { + return true + } + + return false +} + +// SetServiceID gets a reference to the given string and assigns it to the ServiceID field. +func (o *SnippetResponseCommon) SetServiceID(v string) { + o.ServiceID = &v +} + +// GetVersion returns the Version field value if set, zero value otherwise. +func (o *SnippetResponseCommon) GetVersion() string { + if o == nil || o.Version == nil { + var ret string + return ret + } + return *o.Version +} + +// GetVersionOk returns a tuple with the Version field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SnippetResponseCommon) GetVersionOk() (*string, bool) { + if o == nil || o.Version == nil { + return nil, false + } + return o.Version, true +} + +// HasVersion returns a boolean if a field has been set. +func (o *SnippetResponseCommon) HasVersion() bool { + if o != nil && o.Version != nil { + return true + } + + return false +} + +// SetVersion gets a reference to the given string and assigns it to the Version field. +func (o *SnippetResponseCommon) SetVersion(v string) { + o.Version = &v +} + +// GetID returns the ID field value if set, zero value otherwise. +func (o *SnippetResponseCommon) GetID() string { + if o == nil || o.ID == nil { + 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 *SnippetResponseCommon) GetIDOk() (*string, bool) { + if o == nil || o.ID == nil { + return nil, false + } + return o.ID, true +} + +// HasID returns a boolean if a field has been set. +func (o *SnippetResponseCommon) HasID() bool { + if o != nil && o.ID != nil { + return true + } + + return false +} + +// SetID gets a reference to the given string and assigns it to the ID field. +func (o *SnippetResponseCommon) SetID(v string) { + o.ID = &v +} + +// MarshalJSON implements the json.Marshaler interface. +// Marshaler is the interface implemented by types that can marshal themselves into valid JSON. +func (o SnippetResponseCommon) MarshalJSON() ([]byte, error) { + toSerialize := map[string]any{} + if o.CreatedAt.IsSet() { + toSerialize["created_at"] = o.CreatedAt.Get() + } + if o.DeletedAt.IsSet() { + toSerialize["deleted_at"] = o.DeletedAt.Get() + } + if o.UpdatedAt.IsSet() { + toSerialize["updated_at"] = o.UpdatedAt.Get() + } + if o.ServiceID != nil { + toSerialize["service_id"] = o.ServiceID + } + if o.Version != nil { + toSerialize["version"] = o.Version + } + if o.ID != nil { + toSerialize["id"] = o.ID + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return json.Marshal(toSerialize) +} + +// UnmarshalJSON implements the Unmarshaler interface. +// Unmarshaler is the interface implemented by types that can unmarshal a JSON description of themselves. +func (o *SnippetResponseCommon) UnmarshalJSON(bytes []byte) (err error) { + varSnippetResponseCommon := _SnippetResponseCommon{} + + if err = json.Unmarshal(bytes, &varSnippetResponseCommon); err == nil { + *o = SnippetResponseCommon(varSnippetResponseCommon) + } + + additionalProperties := make(map[string]any) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "created_at") + delete(additionalProperties, "deleted_at") + delete(additionalProperties, "updated_at") + delete(additionalProperties, "service_id") + delete(additionalProperties, "version") + delete(additionalProperties, "id") + o.AdditionalProperties = additionalProperties + } + + return err +} + +// NullableSnippetResponseCommon is a helper abstraction for handling nullable snippetresponsecommon types. +type NullableSnippetResponseCommon struct { + value *SnippetResponseCommon + isSet bool +} + +// Get returns the value. +func (v NullableSnippetResponseCommon) Get() *SnippetResponseCommon { + return v.value +} + +// Set modifies the value. +func (v *NullableSnippetResponseCommon) Set(val *SnippetResponseCommon) { + v.value = val + v.isSet = true +} + +// IsSet indicates if the value was set. +func (v NullableSnippetResponseCommon) IsSet() bool { + return v.isSet +} + +// Unset removes the value. +func (v *NullableSnippetResponseCommon) Unset() { + v.value = nil + v.isSet = false +} + +// NewNullableSnippetResponseCommon returns a pointer to a new instance of NullableSnippetResponseCommon. +func NewNullableSnippetResponseCommon(val *SnippetResponseCommon) *NullableSnippetResponseCommon { + return &NullableSnippetResponseCommon{value: val, isSet: true} +} + +// MarshalJSON implements the json.Marshaler interface. +// Marshaler is the interface implemented by types that can marshal themselves into valid JSON. +func (v NullableSnippetResponseCommon) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +// UnmarshalJSON implements the Unmarshaler interface. +// Unmarshaler is the interface implemented by types that can unmarshal a JSON description of themselves. +func (v *NullableSnippetResponseCommon) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/fastly/model_snippet_response_all_of.go b/fastly/model_snippet_response_common_all_of.go similarity index 65% rename from fastly/model_snippet_response_all_of.go rename to fastly/model_snippet_response_common_all_of.go index 722ef6a..7f47473 100644 --- a/fastly/model_snippet_response_all_of.go +++ b/fastly/model_snippet_response_common_all_of.go @@ -17,8 +17,8 @@ import ( "encoding/json" ) -// SnippetResponseAllOf struct for SnippetResponseAllOf -type SnippetResponseAllOf struct { +// SnippetResponseCommonAllOf struct for SnippetResponseCommonAllOf +type SnippetResponseCommonAllOf struct { ServiceID *string `json:"service_id,omitempty"` // String representing the number identifying a version of the service. Version *string `json:"version,omitempty"` @@ -26,27 +26,27 @@ type SnippetResponseAllOf struct { AdditionalProperties map[string]any } -type _SnippetResponseAllOf SnippetResponseAllOf +type _SnippetResponseCommonAllOf SnippetResponseCommonAllOf -// NewSnippetResponseAllOf instantiates a new SnippetResponseAllOf object +// NewSnippetResponseCommonAllOf instantiates a new SnippetResponseCommonAllOf object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewSnippetResponseAllOf() *SnippetResponseAllOf { - this := SnippetResponseAllOf{} +func NewSnippetResponseCommonAllOf() *SnippetResponseCommonAllOf { + this := SnippetResponseCommonAllOf{} return &this } -// NewSnippetResponseAllOfWithDefaults instantiates a new SnippetResponseAllOf object +// NewSnippetResponseCommonAllOfWithDefaults instantiates a new SnippetResponseCommonAllOf object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set -func NewSnippetResponseAllOfWithDefaults() *SnippetResponseAllOf { - this := SnippetResponseAllOf{} +func NewSnippetResponseCommonAllOfWithDefaults() *SnippetResponseCommonAllOf { + this := SnippetResponseCommonAllOf{} return &this } // GetServiceID returns the ServiceID field value if set, zero value otherwise. -func (o *SnippetResponseAllOf) GetServiceID() string { +func (o *SnippetResponseCommonAllOf) GetServiceID() string { if o == nil || o.ServiceID == nil { var ret string return ret @@ -56,7 +56,7 @@ func (o *SnippetResponseAllOf) GetServiceID() string { // GetServiceIDOk returns a tuple with the ServiceID field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *SnippetResponseAllOf) GetServiceIDOk() (*string, bool) { +func (o *SnippetResponseCommonAllOf) GetServiceIDOk() (*string, bool) { if o == nil || o.ServiceID == nil { return nil, false } @@ -64,7 +64,7 @@ func (o *SnippetResponseAllOf) GetServiceIDOk() (*string, bool) { } // HasServiceID returns a boolean if a field has been set. -func (o *SnippetResponseAllOf) HasServiceID() bool { +func (o *SnippetResponseCommonAllOf) HasServiceID() bool { if o != nil && o.ServiceID != nil { return true } @@ -73,12 +73,12 @@ func (o *SnippetResponseAllOf) HasServiceID() bool { } // SetServiceID gets a reference to the given string and assigns it to the ServiceID field. -func (o *SnippetResponseAllOf) SetServiceID(v string) { +func (o *SnippetResponseCommonAllOf) SetServiceID(v string) { o.ServiceID = &v } // GetVersion returns the Version field value if set, zero value otherwise. -func (o *SnippetResponseAllOf) GetVersion() string { +func (o *SnippetResponseCommonAllOf) GetVersion() string { if o == nil || o.Version == nil { var ret string return ret @@ -88,7 +88,7 @@ func (o *SnippetResponseAllOf) GetVersion() string { // GetVersionOk returns a tuple with the Version field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *SnippetResponseAllOf) GetVersionOk() (*string, bool) { +func (o *SnippetResponseCommonAllOf) GetVersionOk() (*string, bool) { if o == nil || o.Version == nil { return nil, false } @@ -96,7 +96,7 @@ func (o *SnippetResponseAllOf) GetVersionOk() (*string, bool) { } // HasVersion returns a boolean if a field has been set. -func (o *SnippetResponseAllOf) HasVersion() bool { +func (o *SnippetResponseCommonAllOf) HasVersion() bool { if o != nil && o.Version != nil { return true } @@ -105,12 +105,12 @@ func (o *SnippetResponseAllOf) HasVersion() bool { } // SetVersion gets a reference to the given string and assigns it to the Version field. -func (o *SnippetResponseAllOf) SetVersion(v string) { +func (o *SnippetResponseCommonAllOf) SetVersion(v string) { o.Version = &v } // GetID returns the ID field value if set, zero value otherwise. -func (o *SnippetResponseAllOf) GetID() string { +func (o *SnippetResponseCommonAllOf) GetID() string { if o == nil || o.ID == nil { var ret string return ret @@ -120,7 +120,7 @@ func (o *SnippetResponseAllOf) GetID() string { // 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 *SnippetResponseAllOf) GetIDOk() (*string, bool) { +func (o *SnippetResponseCommonAllOf) GetIDOk() (*string, bool) { if o == nil || o.ID == nil { return nil, false } @@ -128,7 +128,7 @@ func (o *SnippetResponseAllOf) GetIDOk() (*string, bool) { } // HasID returns a boolean if a field has been set. -func (o *SnippetResponseAllOf) HasID() bool { +func (o *SnippetResponseCommonAllOf) HasID() bool { if o != nil && o.ID != nil { return true } @@ -137,13 +137,13 @@ func (o *SnippetResponseAllOf) HasID() bool { } // SetID gets a reference to the given string and assigns it to the ID field. -func (o *SnippetResponseAllOf) SetID(v string) { +func (o *SnippetResponseCommonAllOf) SetID(v string) { o.ID = &v } // MarshalJSON implements the json.Marshaler interface. // Marshaler is the interface implemented by types that can marshal themselves into valid JSON. -func (o SnippetResponseAllOf) MarshalJSON() ([]byte, error) { +func (o SnippetResponseCommonAllOf) MarshalJSON() ([]byte, error) { toSerialize := map[string]any{} if o.ServiceID != nil { toSerialize["service_id"] = o.ServiceID @@ -164,11 +164,11 @@ func (o SnippetResponseAllOf) MarshalJSON() ([]byte, error) { // UnmarshalJSON implements the Unmarshaler interface. // Unmarshaler is the interface implemented by types that can unmarshal a JSON description of themselves. -func (o *SnippetResponseAllOf) UnmarshalJSON(bytes []byte) (err error) { - varSnippetResponseAllOf := _SnippetResponseAllOf{} +func (o *SnippetResponseCommonAllOf) UnmarshalJSON(bytes []byte) (err error) { + varSnippetResponseCommonAllOf := _SnippetResponseCommonAllOf{} - if err = json.Unmarshal(bytes, &varSnippetResponseAllOf); err == nil { - *o = SnippetResponseAllOf(varSnippetResponseAllOf) + if err = json.Unmarshal(bytes, &varSnippetResponseCommonAllOf); err == nil { + *o = SnippetResponseCommonAllOf(varSnippetResponseCommonAllOf) } additionalProperties := make(map[string]any) @@ -183,48 +183,48 @@ func (o *SnippetResponseAllOf) UnmarshalJSON(bytes []byte) (err error) { return err } -// NullableSnippetResponseAllOf is a helper abstraction for handling nullable snippetresponseallof types. -type NullableSnippetResponseAllOf struct { - value *SnippetResponseAllOf +// NullableSnippetResponseCommonAllOf is a helper abstraction for handling nullable snippetresponsecommonallof types. +type NullableSnippetResponseCommonAllOf struct { + value *SnippetResponseCommonAllOf isSet bool } // Get returns the value. -func (v NullableSnippetResponseAllOf) Get() *SnippetResponseAllOf { +func (v NullableSnippetResponseCommonAllOf) Get() *SnippetResponseCommonAllOf { return v.value } // Set modifies the value. -func (v *NullableSnippetResponseAllOf) Set(val *SnippetResponseAllOf) { +func (v *NullableSnippetResponseCommonAllOf) Set(val *SnippetResponseCommonAllOf) { v.value = val v.isSet = true } // IsSet indicates if the value was set. -func (v NullableSnippetResponseAllOf) IsSet() bool { +func (v NullableSnippetResponseCommonAllOf) IsSet() bool { return v.isSet } // Unset removes the value. -func (v *NullableSnippetResponseAllOf) Unset() { +func (v *NullableSnippetResponseCommonAllOf) Unset() { v.value = nil v.isSet = false } -// NewNullableSnippetResponseAllOf returns a pointer to a new instance of NullableSnippetResponseAllOf. -func NewNullableSnippetResponseAllOf(val *SnippetResponseAllOf) *NullableSnippetResponseAllOf { - return &NullableSnippetResponseAllOf{value: val, isSet: true} +// NewNullableSnippetResponseCommonAllOf returns a pointer to a new instance of NullableSnippetResponseCommonAllOf. +func NewNullableSnippetResponseCommonAllOf(val *SnippetResponseCommonAllOf) *NullableSnippetResponseCommonAllOf { + return &NullableSnippetResponseCommonAllOf{value: val, isSet: true} } // MarshalJSON implements the json.Marshaler interface. // Marshaler is the interface implemented by types that can marshal themselves into valid JSON. -func (v NullableSnippetResponseAllOf) MarshalJSON() ([]byte, error) { +func (v NullableSnippetResponseCommonAllOf) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } // UnmarshalJSON implements the Unmarshaler interface. // Unmarshaler is the interface implemented by types that can unmarshal a JSON description of themselves. -func (v *NullableSnippetResponseAllOf) UnmarshalJSON(src []byte) error { +func (v *NullableSnippetResponseCommonAllOf) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } diff --git a/fastly/model_snippet_response_post.go b/fastly/model_snippet_response_post.go new file mode 100644 index 0000000..0f71432 --- /dev/null +++ b/fastly/model_snippet_response_post.go @@ -0,0 +1,569 @@ +// Package fastly is an API client library for interacting with most facets of the Fastly API. +package fastly + +/* +Fastly API + +Via the Fastly API you can perform any of the operations that are possible within the management console, including creating services, domains, and backends, configuring rules or uploading your own application code, as well as account operations such as user administration and billing reports. The API is organized into collections of endpoints that allow manipulation of objects related to Fastly services and accounts. For the most accurate and up-to-date API reference content, visit our [Developer Hub](https://developer.fastly.com/reference/api/) + +API version: 1.0.0 +Contact: oss@fastly.com +*/ + +// This code is auto-generated; DO NOT EDIT. + + +import ( + "encoding/json" + "time" +) + +// SnippetResponsePost struct for SnippetResponsePost +type SnippetResponsePost struct { + // The name for the snippet. + Name *string `json:"name,omitempty"` + // The location in generated VCL where the snippet should be placed. + Type *string `json:"type,omitempty"` + // The VCL code that specifies exactly what the snippet does. + Content *string `json:"content,omitempty"` + // Priority determines execution order. Lower numbers execute first. + Priority *string `json:"priority,omitempty"` + // Sets the snippet version. + Dynamic *float32 `json:"dynamic,omitempty"` + // Date and time in ISO 8601 format. + CreatedAt NullableTime `json:"created_at,omitempty"` + // Date and time in ISO 8601 format. + DeletedAt NullableTime `json:"deleted_at,omitempty"` + // Date and time in ISO 8601 format. + UpdatedAt NullableTime `json:"updated_at,omitempty"` + ServiceID *string `json:"service_id,omitempty"` + // String representing the number identifying a version of the service. + Version *string `json:"version,omitempty"` + ID *string `json:"id,omitempty"` + AdditionalProperties map[string]any +} + +type _SnippetResponsePost SnippetResponsePost + +// NewSnippetResponsePost instantiates a new SnippetResponsePost object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSnippetResponsePost() *SnippetResponsePost { + this := SnippetResponsePost{} + var priority string = "100" + this.Priority = &priority + return &this +} + +// NewSnippetResponsePostWithDefaults instantiates a new SnippetResponsePost object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSnippetResponsePostWithDefaults() *SnippetResponsePost { + this := SnippetResponsePost{} + var priority string = "100" + this.Priority = &priority + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *SnippetResponsePost) GetName() string { + if o == nil || o.Name == nil { + 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 *SnippetResponsePost) GetNameOk() (*string, bool) { + if o == nil || o.Name == nil { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *SnippetResponsePost) HasName() bool { + if o != nil && o.Name != nil { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *SnippetResponsePost) SetName(v string) { + o.Name = &v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *SnippetResponsePost) GetType() string { + if o == nil || o.Type == nil { + 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 *SnippetResponsePost) GetTypeOk() (*string, bool) { + if o == nil || o.Type == nil { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *SnippetResponsePost) HasType() bool { + if o != nil && o.Type != nil { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *SnippetResponsePost) SetType(v string) { + o.Type = &v +} + +// GetContent returns the Content field value if set, zero value otherwise. +func (o *SnippetResponsePost) GetContent() string { + if o == nil || o.Content == nil { + var ret string + return ret + } + return *o.Content +} + +// GetContentOk returns a tuple with the Content field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SnippetResponsePost) GetContentOk() (*string, bool) { + if o == nil || o.Content == nil { + return nil, false + } + return o.Content, true +} + +// HasContent returns a boolean if a field has been set. +func (o *SnippetResponsePost) HasContent() bool { + if o != nil && o.Content != nil { + return true + } + + return false +} + +// SetContent gets a reference to the given string and assigns it to the Content field. +func (o *SnippetResponsePost) SetContent(v string) { + o.Content = &v +} + +// GetPriority returns the Priority field value if set, zero value otherwise. +func (o *SnippetResponsePost) GetPriority() string { + if o == nil || o.Priority == nil { + var ret string + 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 *SnippetResponsePost) GetPriorityOk() (*string, bool) { + if o == nil || o.Priority == nil { + return nil, false + } + return o.Priority, true +} + +// HasPriority returns a boolean if a field has been set. +func (o *SnippetResponsePost) HasPriority() bool { + if o != nil && o.Priority != nil { + return true + } + + return false +} + +// SetPriority gets a reference to the given string and assigns it to the Priority field. +func (o *SnippetResponsePost) SetPriority(v string) { + o.Priority = &v +} + +// GetDynamic returns the Dynamic field value if set, zero value otherwise. +func (o *SnippetResponsePost) GetDynamic() float32 { + if o == nil || o.Dynamic == nil { + var ret float32 + return ret + } + return *o.Dynamic +} + +// GetDynamicOk returns a tuple with the Dynamic field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SnippetResponsePost) GetDynamicOk() (*float32, bool) { + if o == nil || o.Dynamic == nil { + return nil, false + } + return o.Dynamic, true +} + +// HasDynamic returns a boolean if a field has been set. +func (o *SnippetResponsePost) HasDynamic() bool { + if o != nil && o.Dynamic != nil { + return true + } + + return false +} + +// SetDynamic gets a reference to the given float32 and assigns it to the Dynamic field. +func (o *SnippetResponsePost) SetDynamic(v float32) { + o.Dynamic = &v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SnippetResponsePost) GetCreatedAt() time.Time { + if o == nil || o.CreatedAt.Get() == nil { + var ret time.Time + return ret + } + return *o.CreatedAt.Get() +} + +// GetCreatedAtOk returns a tuple with the CreatedAt 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 *SnippetResponsePost) GetCreatedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.CreatedAt.Get(), o.CreatedAt.IsSet() +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *SnippetResponsePost) HasCreatedAt() bool { + if o != nil && o.CreatedAt.IsSet() { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given NullableTime and assigns it to the CreatedAt field. +func (o *SnippetResponsePost) SetCreatedAt(v time.Time) { + o.CreatedAt.Set(&v) +} +// SetCreatedAtNil sets the value for CreatedAt to be an explicit nil +func (o *SnippetResponsePost) SetCreatedAtNil() { + o.CreatedAt.Set(nil) +} + +// UnsetCreatedAt ensures that no value is present for CreatedAt, not even an explicit nil +func (o *SnippetResponsePost) UnsetCreatedAt() { + o.CreatedAt.Unset() +} + +// GetDeletedAt returns the DeletedAt field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SnippetResponsePost) GetDeletedAt() time.Time { + if o == nil || o.DeletedAt.Get() == nil { + var ret time.Time + return ret + } + return *o.DeletedAt.Get() +} + +// GetDeletedAtOk returns a tuple with the DeletedAt 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 *SnippetResponsePost) GetDeletedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.DeletedAt.Get(), o.DeletedAt.IsSet() +} + +// HasDeletedAt returns a boolean if a field has been set. +func (o *SnippetResponsePost) HasDeletedAt() bool { + if o != nil && o.DeletedAt.IsSet() { + return true + } + + return false +} + +// SetDeletedAt gets a reference to the given NullableTime and assigns it to the DeletedAt field. +func (o *SnippetResponsePost) SetDeletedAt(v time.Time) { + o.DeletedAt.Set(&v) +} +// SetDeletedAtNil sets the value for DeletedAt to be an explicit nil +func (o *SnippetResponsePost) SetDeletedAtNil() { + o.DeletedAt.Set(nil) +} + +// UnsetDeletedAt ensures that no value is present for DeletedAt, not even an explicit nil +func (o *SnippetResponsePost) UnsetDeletedAt() { + o.DeletedAt.Unset() +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SnippetResponsePost) GetUpdatedAt() time.Time { + if o == nil || o.UpdatedAt.Get() == nil { + var ret time.Time + return ret + } + return *o.UpdatedAt.Get() +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt 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 *SnippetResponsePost) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.UpdatedAt.Get(), o.UpdatedAt.IsSet() +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *SnippetResponsePost) HasUpdatedAt() bool { + if o != nil && o.UpdatedAt.IsSet() { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given NullableTime and assigns it to the UpdatedAt field. +func (o *SnippetResponsePost) SetUpdatedAt(v time.Time) { + o.UpdatedAt.Set(&v) +} +// SetUpdatedAtNil sets the value for UpdatedAt to be an explicit nil +func (o *SnippetResponsePost) SetUpdatedAtNil() { + o.UpdatedAt.Set(nil) +} + +// UnsetUpdatedAt ensures that no value is present for UpdatedAt, not even an explicit nil +func (o *SnippetResponsePost) UnsetUpdatedAt() { + o.UpdatedAt.Unset() +} + +// GetServiceID returns the ServiceID field value if set, zero value otherwise. +func (o *SnippetResponsePost) GetServiceID() string { + if o == nil || o.ServiceID == nil { + var ret string + return ret + } + return *o.ServiceID +} + +// GetServiceIDOk returns a tuple with the ServiceID field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SnippetResponsePost) GetServiceIDOk() (*string, bool) { + if o == nil || o.ServiceID == nil { + return nil, false + } + return o.ServiceID, true +} + +// HasServiceID returns a boolean if a field has been set. +func (o *SnippetResponsePost) HasServiceID() bool { + if o != nil && o.ServiceID != nil { + return true + } + + return false +} + +// SetServiceID gets a reference to the given string and assigns it to the ServiceID field. +func (o *SnippetResponsePost) SetServiceID(v string) { + o.ServiceID = &v +} + +// GetVersion returns the Version field value if set, zero value otherwise. +func (o *SnippetResponsePost) GetVersion() string { + if o == nil || o.Version == nil { + var ret string + return ret + } + return *o.Version +} + +// GetVersionOk returns a tuple with the Version field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SnippetResponsePost) GetVersionOk() (*string, bool) { + if o == nil || o.Version == nil { + return nil, false + } + return o.Version, true +} + +// HasVersion returns a boolean if a field has been set. +func (o *SnippetResponsePost) HasVersion() bool { + if o != nil && o.Version != nil { + return true + } + + return false +} + +// SetVersion gets a reference to the given string and assigns it to the Version field. +func (o *SnippetResponsePost) SetVersion(v string) { + o.Version = &v +} + +// GetID returns the ID field value if set, zero value otherwise. +func (o *SnippetResponsePost) GetID() string { + if o == nil || o.ID == nil { + 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 *SnippetResponsePost) GetIDOk() (*string, bool) { + if o == nil || o.ID == nil { + return nil, false + } + return o.ID, true +} + +// HasID returns a boolean if a field has been set. +func (o *SnippetResponsePost) HasID() bool { + if o != nil && o.ID != nil { + return true + } + + return false +} + +// SetID gets a reference to the given string and assigns it to the ID field. +func (o *SnippetResponsePost) SetID(v string) { + o.ID = &v +} + +// MarshalJSON implements the json.Marshaler interface. +// Marshaler is the interface implemented by types that can marshal themselves into valid JSON. +func (o SnippetResponsePost) MarshalJSON() ([]byte, error) { + toSerialize := map[string]any{} + if o.Name != nil { + toSerialize["name"] = o.Name + } + if o.Type != nil { + toSerialize["type"] = o.Type + } + if o.Content != nil { + toSerialize["content"] = o.Content + } + if o.Priority != nil { + toSerialize["priority"] = o.Priority + } + if o.Dynamic != nil { + toSerialize["dynamic"] = o.Dynamic + } + if o.CreatedAt.IsSet() { + toSerialize["created_at"] = o.CreatedAt.Get() + } + if o.DeletedAt.IsSet() { + toSerialize["deleted_at"] = o.DeletedAt.Get() + } + if o.UpdatedAt.IsSet() { + toSerialize["updated_at"] = o.UpdatedAt.Get() + } + if o.ServiceID != nil { + toSerialize["service_id"] = o.ServiceID + } + if o.Version != nil { + toSerialize["version"] = o.Version + } + if o.ID != nil { + toSerialize["id"] = o.ID + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return json.Marshal(toSerialize) +} + +// UnmarshalJSON implements the Unmarshaler interface. +// Unmarshaler is the interface implemented by types that can unmarshal a JSON description of themselves. +func (o *SnippetResponsePost) UnmarshalJSON(bytes []byte) (err error) { + varSnippetResponsePost := _SnippetResponsePost{} + + if err = json.Unmarshal(bytes, &varSnippetResponsePost); err == nil { + *o = SnippetResponsePost(varSnippetResponsePost) + } + + additionalProperties := make(map[string]any) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "name") + delete(additionalProperties, "type") + delete(additionalProperties, "content") + delete(additionalProperties, "priority") + delete(additionalProperties, "dynamic") + delete(additionalProperties, "created_at") + delete(additionalProperties, "deleted_at") + delete(additionalProperties, "updated_at") + delete(additionalProperties, "service_id") + delete(additionalProperties, "version") + delete(additionalProperties, "id") + o.AdditionalProperties = additionalProperties + } + + return err +} + +// NullableSnippetResponsePost is a helper abstraction for handling nullable snippetresponsepost types. +type NullableSnippetResponsePost struct { + value *SnippetResponsePost + isSet bool +} + +// Get returns the value. +func (v NullableSnippetResponsePost) Get() *SnippetResponsePost { + return v.value +} + +// Set modifies the value. +func (v *NullableSnippetResponsePost) Set(val *SnippetResponsePost) { + v.value = val + v.isSet = true +} + +// IsSet indicates if the value was set. +func (v NullableSnippetResponsePost) IsSet() bool { + return v.isSet +} + +// Unset removes the value. +func (v *NullableSnippetResponsePost) Unset() { + v.value = nil + v.isSet = false +} + +// NewNullableSnippetResponsePost returns a pointer to a new instance of NullableSnippetResponsePost. +func NewNullableSnippetResponsePost(val *SnippetResponsePost) *NullableSnippetResponsePost { + return &NullableSnippetResponsePost{value: val, isSet: true} +} + +// MarshalJSON implements the json.Marshaler interface. +// Marshaler is the interface implemented by types that can marshal themselves into valid JSON. +func (v NullableSnippetResponsePost) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +// UnmarshalJSON implements the Unmarshaler interface. +// Unmarshaler is the interface implemented by types that can unmarshal a JSON description of themselves. +func (v *NullableSnippetResponsePost) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/fastly/model_snippet_with_dynamic_number.go b/fastly/model_snippet_with_dynamic_number.go new file mode 100644 index 0000000..6ba50bc --- /dev/null +++ b/fastly/model_snippet_with_dynamic_number.go @@ -0,0 +1,312 @@ +// Package fastly is an API client library for interacting with most facets of the Fastly API. +package fastly + +/* +Fastly API + +Via the Fastly API you can perform any of the operations that are possible within the management console, including creating services, domains, and backends, configuring rules or uploading your own application code, as well as account operations such as user administration and billing reports. The API is organized into collections of endpoints that allow manipulation of objects related to Fastly services and accounts. For the most accurate and up-to-date API reference content, visit our [Developer Hub](https://developer.fastly.com/reference/api/) + +API version: 1.0.0 +Contact: oss@fastly.com +*/ + +// This code is auto-generated; DO NOT EDIT. + + +import ( + "encoding/json" +) + +// SnippetWithDynamicNumber struct for SnippetWithDynamicNumber +type SnippetWithDynamicNumber struct { + // The name for the snippet. + Name *string `json:"name,omitempty"` + // The location in generated VCL where the snippet should be placed. + Type *string `json:"type,omitempty"` + // The VCL code that specifies exactly what the snippet does. + Content *string `json:"content,omitempty"` + // Priority determines execution order. Lower numbers execute first. + Priority *string `json:"priority,omitempty"` + // Sets the snippet version. + Dynamic *float32 `json:"dynamic,omitempty"` + AdditionalProperties map[string]any +} + +type _SnippetWithDynamicNumber SnippetWithDynamicNumber + +// NewSnippetWithDynamicNumber instantiates a new SnippetWithDynamicNumber object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSnippetWithDynamicNumber() *SnippetWithDynamicNumber { + this := SnippetWithDynamicNumber{} + var priority string = "100" + this.Priority = &priority + return &this +} + +// NewSnippetWithDynamicNumberWithDefaults instantiates a new SnippetWithDynamicNumber object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSnippetWithDynamicNumberWithDefaults() *SnippetWithDynamicNumber { + this := SnippetWithDynamicNumber{} + var priority string = "100" + this.Priority = &priority + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *SnippetWithDynamicNumber) GetName() string { + if o == nil || o.Name == nil { + 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 *SnippetWithDynamicNumber) GetNameOk() (*string, bool) { + if o == nil || o.Name == nil { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *SnippetWithDynamicNumber) HasName() bool { + if o != nil && o.Name != nil { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *SnippetWithDynamicNumber) SetName(v string) { + o.Name = &v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *SnippetWithDynamicNumber) GetType() string { + if o == nil || o.Type == nil { + 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 *SnippetWithDynamicNumber) GetTypeOk() (*string, bool) { + if o == nil || o.Type == nil { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *SnippetWithDynamicNumber) HasType() bool { + if o != nil && o.Type != nil { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *SnippetWithDynamicNumber) SetType(v string) { + o.Type = &v +} + +// GetContent returns the Content field value if set, zero value otherwise. +func (o *SnippetWithDynamicNumber) GetContent() string { + if o == nil || o.Content == nil { + var ret string + return ret + } + return *o.Content +} + +// GetContentOk returns a tuple with the Content field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SnippetWithDynamicNumber) GetContentOk() (*string, bool) { + if o == nil || o.Content == nil { + return nil, false + } + return o.Content, true +} + +// HasContent returns a boolean if a field has been set. +func (o *SnippetWithDynamicNumber) HasContent() bool { + if o != nil && o.Content != nil { + return true + } + + return false +} + +// SetContent gets a reference to the given string and assigns it to the Content field. +func (o *SnippetWithDynamicNumber) SetContent(v string) { + o.Content = &v +} + +// GetPriority returns the Priority field value if set, zero value otherwise. +func (o *SnippetWithDynamicNumber) GetPriority() string { + if o == nil || o.Priority == nil { + var ret string + 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 *SnippetWithDynamicNumber) GetPriorityOk() (*string, bool) { + if o == nil || o.Priority == nil { + return nil, false + } + return o.Priority, true +} + +// HasPriority returns a boolean if a field has been set. +func (o *SnippetWithDynamicNumber) HasPriority() bool { + if o != nil && o.Priority != nil { + return true + } + + return false +} + +// SetPriority gets a reference to the given string and assigns it to the Priority field. +func (o *SnippetWithDynamicNumber) SetPriority(v string) { + o.Priority = &v +} + +// GetDynamic returns the Dynamic field value if set, zero value otherwise. +func (o *SnippetWithDynamicNumber) GetDynamic() float32 { + if o == nil || o.Dynamic == nil { + var ret float32 + return ret + } + return *o.Dynamic +} + +// GetDynamicOk returns a tuple with the Dynamic field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SnippetWithDynamicNumber) GetDynamicOk() (*float32, bool) { + if o == nil || o.Dynamic == nil { + return nil, false + } + return o.Dynamic, true +} + +// HasDynamic returns a boolean if a field has been set. +func (o *SnippetWithDynamicNumber) HasDynamic() bool { + if o != nil && o.Dynamic != nil { + return true + } + + return false +} + +// SetDynamic gets a reference to the given float32 and assigns it to the Dynamic field. +func (o *SnippetWithDynamicNumber) SetDynamic(v float32) { + o.Dynamic = &v +} + +// MarshalJSON implements the json.Marshaler interface. +// Marshaler is the interface implemented by types that can marshal themselves into valid JSON. +func (o SnippetWithDynamicNumber) MarshalJSON() ([]byte, error) { + toSerialize := map[string]any{} + if o.Name != nil { + toSerialize["name"] = o.Name + } + if o.Type != nil { + toSerialize["type"] = o.Type + } + if o.Content != nil { + toSerialize["content"] = o.Content + } + if o.Priority != nil { + toSerialize["priority"] = o.Priority + } + if o.Dynamic != nil { + toSerialize["dynamic"] = o.Dynamic + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return json.Marshal(toSerialize) +} + +// UnmarshalJSON implements the Unmarshaler interface. +// Unmarshaler is the interface implemented by types that can unmarshal a JSON description of themselves. +func (o *SnippetWithDynamicNumber) UnmarshalJSON(bytes []byte) (err error) { + varSnippetWithDynamicNumber := _SnippetWithDynamicNumber{} + + if err = json.Unmarshal(bytes, &varSnippetWithDynamicNumber); err == nil { + *o = SnippetWithDynamicNumber(varSnippetWithDynamicNumber) + } + + additionalProperties := make(map[string]any) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "name") + delete(additionalProperties, "type") + delete(additionalProperties, "content") + delete(additionalProperties, "priority") + delete(additionalProperties, "dynamic") + o.AdditionalProperties = additionalProperties + } + + return err +} + +// NullableSnippetWithDynamicNumber is a helper abstraction for handling nullable snippetwithdynamicnumber types. +type NullableSnippetWithDynamicNumber struct { + value *SnippetWithDynamicNumber + isSet bool +} + +// Get returns the value. +func (v NullableSnippetWithDynamicNumber) Get() *SnippetWithDynamicNumber { + return v.value +} + +// Set modifies the value. +func (v *NullableSnippetWithDynamicNumber) Set(val *SnippetWithDynamicNumber) { + v.value = val + v.isSet = true +} + +// IsSet indicates if the value was set. +func (v NullableSnippetWithDynamicNumber) IsSet() bool { + return v.isSet +} + +// Unset removes the value. +func (v *NullableSnippetWithDynamicNumber) Unset() { + v.value = nil + v.isSet = false +} + +// NewNullableSnippetWithDynamicNumber returns a pointer to a new instance of NullableSnippetWithDynamicNumber. +func NewNullableSnippetWithDynamicNumber(val *SnippetWithDynamicNumber) *NullableSnippetWithDynamicNumber { + return &NullableSnippetWithDynamicNumber{value: val, isSet: true} +} + +// MarshalJSON implements the json.Marshaler interface. +// Marshaler is the interface implemented by types that can marshal themselves into valid JSON. +func (v NullableSnippetWithDynamicNumber) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +// UnmarshalJSON implements the Unmarshaler interface. +// Unmarshaler is the interface implemented by types that can unmarshal a JSON description of themselves. +func (v *NullableSnippetWithDynamicNumber) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/fastly/model_snippet_with_dynamic_number_all_of.go b/fastly/model_snippet_with_dynamic_number_all_of.go new file mode 100644 index 0000000..8b97453 --- /dev/null +++ b/fastly/model_snippet_with_dynamic_number_all_of.go @@ -0,0 +1,156 @@ +// Package fastly is an API client library for interacting with most facets of the Fastly API. +package fastly + +/* +Fastly API + +Via the Fastly API you can perform any of the operations that are possible within the management console, including creating services, domains, and backends, configuring rules or uploading your own application code, as well as account operations such as user administration and billing reports. The API is organized into collections of endpoints that allow manipulation of objects related to Fastly services and accounts. For the most accurate and up-to-date API reference content, visit our [Developer Hub](https://developer.fastly.com/reference/api/) + +API version: 1.0.0 +Contact: oss@fastly.com +*/ + +// This code is auto-generated; DO NOT EDIT. + + +import ( + "encoding/json" +) + +// SnippetWithDynamicNumberAllOf struct for SnippetWithDynamicNumberAllOf +type SnippetWithDynamicNumberAllOf struct { + // Sets the snippet version. + Dynamic *float32 `json:"dynamic,omitempty"` + AdditionalProperties map[string]any +} + +type _SnippetWithDynamicNumberAllOf SnippetWithDynamicNumberAllOf + +// NewSnippetWithDynamicNumberAllOf instantiates a new SnippetWithDynamicNumberAllOf object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSnippetWithDynamicNumberAllOf() *SnippetWithDynamicNumberAllOf { + this := SnippetWithDynamicNumberAllOf{} + return &this +} + +// NewSnippetWithDynamicNumberAllOfWithDefaults instantiates a new SnippetWithDynamicNumberAllOf object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSnippetWithDynamicNumberAllOfWithDefaults() *SnippetWithDynamicNumberAllOf { + this := SnippetWithDynamicNumberAllOf{} + return &this +} + +// GetDynamic returns the Dynamic field value if set, zero value otherwise. +func (o *SnippetWithDynamicNumberAllOf) GetDynamic() float32 { + if o == nil || o.Dynamic == nil { + var ret float32 + return ret + } + return *o.Dynamic +} + +// GetDynamicOk returns a tuple with the Dynamic field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SnippetWithDynamicNumberAllOf) GetDynamicOk() (*float32, bool) { + if o == nil || o.Dynamic == nil { + return nil, false + } + return o.Dynamic, true +} + +// HasDynamic returns a boolean if a field has been set. +func (o *SnippetWithDynamicNumberAllOf) HasDynamic() bool { + if o != nil && o.Dynamic != nil { + return true + } + + return false +} + +// SetDynamic gets a reference to the given float32 and assigns it to the Dynamic field. +func (o *SnippetWithDynamicNumberAllOf) SetDynamic(v float32) { + o.Dynamic = &v +} + +// MarshalJSON implements the json.Marshaler interface. +// Marshaler is the interface implemented by types that can marshal themselves into valid JSON. +func (o SnippetWithDynamicNumberAllOf) MarshalJSON() ([]byte, error) { + toSerialize := map[string]any{} + if o.Dynamic != nil { + toSerialize["dynamic"] = o.Dynamic + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return json.Marshal(toSerialize) +} + +// UnmarshalJSON implements the Unmarshaler interface. +// Unmarshaler is the interface implemented by types that can unmarshal a JSON description of themselves. +func (o *SnippetWithDynamicNumberAllOf) UnmarshalJSON(bytes []byte) (err error) { + varSnippetWithDynamicNumberAllOf := _SnippetWithDynamicNumberAllOf{} + + if err = json.Unmarshal(bytes, &varSnippetWithDynamicNumberAllOf); err == nil { + *o = SnippetWithDynamicNumberAllOf(varSnippetWithDynamicNumberAllOf) + } + + additionalProperties := make(map[string]any) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "dynamic") + o.AdditionalProperties = additionalProperties + } + + return err +} + +// NullableSnippetWithDynamicNumberAllOf is a helper abstraction for handling nullable snippetwithdynamicnumberallof types. +type NullableSnippetWithDynamicNumberAllOf struct { + value *SnippetWithDynamicNumberAllOf + isSet bool +} + +// Get returns the value. +func (v NullableSnippetWithDynamicNumberAllOf) Get() *SnippetWithDynamicNumberAllOf { + return v.value +} + +// Set modifies the value. +func (v *NullableSnippetWithDynamicNumberAllOf) Set(val *SnippetWithDynamicNumberAllOf) { + v.value = val + v.isSet = true +} + +// IsSet indicates if the value was set. +func (v NullableSnippetWithDynamicNumberAllOf) IsSet() bool { + return v.isSet +} + +// Unset removes the value. +func (v *NullableSnippetWithDynamicNumberAllOf) Unset() { + v.value = nil + v.isSet = false +} + +// NewNullableSnippetWithDynamicNumberAllOf returns a pointer to a new instance of NullableSnippetWithDynamicNumberAllOf. +func NewNullableSnippetWithDynamicNumberAllOf(val *SnippetWithDynamicNumberAllOf) *NullableSnippetWithDynamicNumberAllOf { + return &NullableSnippetWithDynamicNumberAllOf{value: val, isSet: true} +} + +// MarshalJSON implements the json.Marshaler interface. +// Marshaler is the interface implemented by types that can marshal themselves into valid JSON. +func (v NullableSnippetWithDynamicNumberAllOf) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +// UnmarshalJSON implements the Unmarshaler interface. +// Unmarshaler is the interface implemented by types that can unmarshal a JSON description of themselves. +func (v *NullableSnippetWithDynamicNumberAllOf) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/fastly/model_values_ddos.go b/fastly/model_values_ddos.go new file mode 100644 index 0000000..6bfda82 --- /dev/null +++ b/fastly/model_values_ddos.go @@ -0,0 +1,346 @@ +// Package fastly is an API client library for interacting with most facets of the Fastly API. +package fastly + +/* +Fastly API + +Via the Fastly API you can perform any of the operations that are possible within the management console, including creating services, domains, and backends, configuring rules or uploading your own application code, as well as account operations such as user administration and billing reports. The API is organized into collections of endpoints that allow manipulation of objects related to Fastly services and accounts. For the most accurate and up-to-date API reference content, visit our [Developer Hub](https://developer.fastly.com/reference/api/) + +API version: 1.0.0 +Contact: oss@fastly.com +*/ + +// This code is auto-generated; DO NOT EDIT. + + +import ( + "encoding/json" +) + +// ValuesDdos The results of the query, optionally filtered and grouped over the requested timespan. +type ValuesDdos struct { + // For HTTP/2, the number of connections the limit-streams action was applied to. The limit-streams action caps the allowed number of concurrent streams in a connection. + DdosActionLimitStreamsConnections *int32 `json:"ddos_action_limit_streams_connections,omitempty"` + // For HTTP/2, the number of requests made on a connection for which the limit-streams action was taken. The limit-streams action caps the allowed number of concurrent streams in a connection. + DdosActionLimitStreamsRequests *int32 `json:"ddos_action_limit_streams_requests,omitempty"` + // The number of times the tarpit-accept action was taken. The tarpit-accept action adds a delay when accepting future connections. + DdosActionTarpitAccept *int32 `json:"ddos_action_tarpit_accept,omitempty"` + // The number of times the tarpit action was taken. The tarpit action delays writing the response to the client. + DdosActionTarpit *int32 `json:"ddos_action_tarpit,omitempty"` + // The number of times the close action was taken. The close action aborts the connection as soon as possible. The close action takes effect either right after accept, right after the client hello, or right after the response was sent. + DdosActionClose *int32 `json:"ddos_action_close,omitempty"` + // The number of times the blackhole action was taken. The blackhole action quietly closes a TCP connection without sending a reset. The blackhole action quietly closes a TCP connection without notifying its peer (all TCP state is dropped). + DdosActionBlackhole *int32 `json:"ddos_action_blackhole,omitempty"` + AdditionalProperties map[string]any +} + +type _ValuesDdos ValuesDdos + +// NewValuesDdos instantiates a new ValuesDdos object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewValuesDdos() *ValuesDdos { + this := ValuesDdos{} + return &this +} + +// NewValuesDdosWithDefaults instantiates a new ValuesDdos object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewValuesDdosWithDefaults() *ValuesDdos { + this := ValuesDdos{} + return &this +} + +// GetDdosActionLimitStreamsConnections returns the DdosActionLimitStreamsConnections field value if set, zero value otherwise. +func (o *ValuesDdos) GetDdosActionLimitStreamsConnections() int32 { + if o == nil || o.DdosActionLimitStreamsConnections == nil { + var ret int32 + return ret + } + return *o.DdosActionLimitStreamsConnections +} + +// GetDdosActionLimitStreamsConnectionsOk returns a tuple with the DdosActionLimitStreamsConnections field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ValuesDdos) GetDdosActionLimitStreamsConnectionsOk() (*int32, bool) { + if o == nil || o.DdosActionLimitStreamsConnections == nil { + return nil, false + } + return o.DdosActionLimitStreamsConnections, true +} + +// HasDdosActionLimitStreamsConnections returns a boolean if a field has been set. +func (o *ValuesDdos) HasDdosActionLimitStreamsConnections() bool { + if o != nil && o.DdosActionLimitStreamsConnections != nil { + return true + } + + return false +} + +// SetDdosActionLimitStreamsConnections gets a reference to the given int32 and assigns it to the DdosActionLimitStreamsConnections field. +func (o *ValuesDdos) SetDdosActionLimitStreamsConnections(v int32) { + o.DdosActionLimitStreamsConnections = &v +} + +// GetDdosActionLimitStreamsRequests returns the DdosActionLimitStreamsRequests field value if set, zero value otherwise. +func (o *ValuesDdos) GetDdosActionLimitStreamsRequests() int32 { + if o == nil || o.DdosActionLimitStreamsRequests == nil { + var ret int32 + return ret + } + return *o.DdosActionLimitStreamsRequests +} + +// GetDdosActionLimitStreamsRequestsOk returns a tuple with the DdosActionLimitStreamsRequests field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ValuesDdos) GetDdosActionLimitStreamsRequestsOk() (*int32, bool) { + if o == nil || o.DdosActionLimitStreamsRequests == nil { + return nil, false + } + return o.DdosActionLimitStreamsRequests, true +} + +// HasDdosActionLimitStreamsRequests returns a boolean if a field has been set. +func (o *ValuesDdos) HasDdosActionLimitStreamsRequests() bool { + if o != nil && o.DdosActionLimitStreamsRequests != nil { + return true + } + + return false +} + +// SetDdosActionLimitStreamsRequests gets a reference to the given int32 and assigns it to the DdosActionLimitStreamsRequests field. +func (o *ValuesDdos) SetDdosActionLimitStreamsRequests(v int32) { + o.DdosActionLimitStreamsRequests = &v +} + +// GetDdosActionTarpitAccept returns the DdosActionTarpitAccept field value if set, zero value otherwise. +func (o *ValuesDdos) GetDdosActionTarpitAccept() int32 { + if o == nil || o.DdosActionTarpitAccept == nil { + var ret int32 + return ret + } + return *o.DdosActionTarpitAccept +} + +// GetDdosActionTarpitAcceptOk returns a tuple with the DdosActionTarpitAccept field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ValuesDdos) GetDdosActionTarpitAcceptOk() (*int32, bool) { + if o == nil || o.DdosActionTarpitAccept == nil { + return nil, false + } + return o.DdosActionTarpitAccept, true +} + +// HasDdosActionTarpitAccept returns a boolean if a field has been set. +func (o *ValuesDdos) HasDdosActionTarpitAccept() bool { + if o != nil && o.DdosActionTarpitAccept != nil { + return true + } + + return false +} + +// SetDdosActionTarpitAccept gets a reference to the given int32 and assigns it to the DdosActionTarpitAccept field. +func (o *ValuesDdos) SetDdosActionTarpitAccept(v int32) { + o.DdosActionTarpitAccept = &v +} + +// GetDdosActionTarpit returns the DdosActionTarpit field value if set, zero value otherwise. +func (o *ValuesDdos) GetDdosActionTarpit() int32 { + if o == nil || o.DdosActionTarpit == nil { + var ret int32 + return ret + } + return *o.DdosActionTarpit +} + +// GetDdosActionTarpitOk returns a tuple with the DdosActionTarpit field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ValuesDdos) GetDdosActionTarpitOk() (*int32, bool) { + if o == nil || o.DdosActionTarpit == nil { + return nil, false + } + return o.DdosActionTarpit, true +} + +// HasDdosActionTarpit returns a boolean if a field has been set. +func (o *ValuesDdos) HasDdosActionTarpit() bool { + if o != nil && o.DdosActionTarpit != nil { + return true + } + + return false +} + +// SetDdosActionTarpit gets a reference to the given int32 and assigns it to the DdosActionTarpit field. +func (o *ValuesDdos) SetDdosActionTarpit(v int32) { + o.DdosActionTarpit = &v +} + +// GetDdosActionClose returns the DdosActionClose field value if set, zero value otherwise. +func (o *ValuesDdos) GetDdosActionClose() int32 { + if o == nil || o.DdosActionClose == nil { + var ret int32 + return ret + } + return *o.DdosActionClose +} + +// GetDdosActionCloseOk returns a tuple with the DdosActionClose field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ValuesDdos) GetDdosActionCloseOk() (*int32, bool) { + if o == nil || o.DdosActionClose == nil { + return nil, false + } + return o.DdosActionClose, true +} + +// HasDdosActionClose returns a boolean if a field has been set. +func (o *ValuesDdos) HasDdosActionClose() bool { + if o != nil && o.DdosActionClose != nil { + return true + } + + return false +} + +// SetDdosActionClose gets a reference to the given int32 and assigns it to the DdosActionClose field. +func (o *ValuesDdos) SetDdosActionClose(v int32) { + o.DdosActionClose = &v +} + +// GetDdosActionBlackhole returns the DdosActionBlackhole field value if set, zero value otherwise. +func (o *ValuesDdos) GetDdosActionBlackhole() int32 { + if o == nil || o.DdosActionBlackhole == nil { + var ret int32 + return ret + } + return *o.DdosActionBlackhole +} + +// GetDdosActionBlackholeOk returns a tuple with the DdosActionBlackhole field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ValuesDdos) GetDdosActionBlackholeOk() (*int32, bool) { + if o == nil || o.DdosActionBlackhole == nil { + return nil, false + } + return o.DdosActionBlackhole, true +} + +// HasDdosActionBlackhole returns a boolean if a field has been set. +func (o *ValuesDdos) HasDdosActionBlackhole() bool { + if o != nil && o.DdosActionBlackhole != nil { + return true + } + + return false +} + +// SetDdosActionBlackhole gets a reference to the given int32 and assigns it to the DdosActionBlackhole field. +func (o *ValuesDdos) SetDdosActionBlackhole(v int32) { + o.DdosActionBlackhole = &v +} + +// MarshalJSON implements the json.Marshaler interface. +// Marshaler is the interface implemented by types that can marshal themselves into valid JSON. +func (o ValuesDdos) MarshalJSON() ([]byte, error) { + toSerialize := map[string]any{} + if o.DdosActionLimitStreamsConnections != nil { + toSerialize["ddos_action_limit_streams_connections"] = o.DdosActionLimitStreamsConnections + } + if o.DdosActionLimitStreamsRequests != nil { + toSerialize["ddos_action_limit_streams_requests"] = o.DdosActionLimitStreamsRequests + } + if o.DdosActionTarpitAccept != nil { + toSerialize["ddos_action_tarpit_accept"] = o.DdosActionTarpitAccept + } + if o.DdosActionTarpit != nil { + toSerialize["ddos_action_tarpit"] = o.DdosActionTarpit + } + if o.DdosActionClose != nil { + toSerialize["ddos_action_close"] = o.DdosActionClose + } + if o.DdosActionBlackhole != nil { + toSerialize["ddos_action_blackhole"] = o.DdosActionBlackhole + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return json.Marshal(toSerialize) +} + +// UnmarshalJSON implements the Unmarshaler interface. +// Unmarshaler is the interface implemented by types that can unmarshal a JSON description of themselves. +func (o *ValuesDdos) UnmarshalJSON(bytes []byte) (err error) { + varValuesDdos := _ValuesDdos{} + + if err = json.Unmarshal(bytes, &varValuesDdos); err == nil { + *o = ValuesDdos(varValuesDdos) + } + + additionalProperties := make(map[string]any) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "ddos_action_limit_streams_connections") + delete(additionalProperties, "ddos_action_limit_streams_requests") + delete(additionalProperties, "ddos_action_tarpit_accept") + delete(additionalProperties, "ddos_action_tarpit") + delete(additionalProperties, "ddos_action_close") + delete(additionalProperties, "ddos_action_blackhole") + o.AdditionalProperties = additionalProperties + } + + return err +} + +// NullableValuesDdos is a helper abstraction for handling nullable valuesddos types. +type NullableValuesDdos struct { + value *ValuesDdos + isSet bool +} + +// Get returns the value. +func (v NullableValuesDdos) Get() *ValuesDdos { + return v.value +} + +// Set modifies the value. +func (v *NullableValuesDdos) Set(val *ValuesDdos) { + v.value = val + v.isSet = true +} + +// IsSet indicates if the value was set. +func (v NullableValuesDdos) IsSet() bool { + return v.isSet +} + +// Unset removes the value. +func (v *NullableValuesDdos) Unset() { + v.value = nil + v.isSet = false +} + +// NewNullableValuesDdos returns a pointer to a new instance of NullableValuesDdos. +func NewNullableValuesDdos(val *ValuesDdos) *NullableValuesDdos { + return &NullableValuesDdos{value: val, isSet: true} +} + +// MarshalJSON implements the json.Marshaler interface. +// Marshaler is the interface implemented by types that can marshal themselves into valid JSON. +func (v NullableValuesDdos) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +// UnmarshalJSON implements the Unmarshaler interface. +// Unmarshaler is the interface implemented by types that can unmarshal a JSON description of themselves. +func (v *NullableValuesDdos) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/sig.json b/sig.json index 8d0afc0..92d418f 100644 --- a/sig.json +++ b/sig.json @@ -1 +1 @@ -{"G": "95706192", "D": "691cfbf5"} +{"G": "ecaca45c", "D": "ffdeb163"}