diff --git a/CHANGELOG.md b/CHANGELOG.md index f906bf7..225b3b9 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,29 @@ # Changelog +## [vv1.0.0-beta.30](https://github.com/fastly/fastly-go/releases/tag/release/vv1.0.0-beta.30) (2024-06-27) + +**Bug fixes:** + +- bugfix(alerts-definitions): For Origin derived metrics, correct `all_bandwidth` type to `integer` + +**Enhancements:** + +- feat(logging-s3): Add `file_max_bytes` configuration field +- feat(alerts-definitions): Add `integration_id` parameter to the List Alert Definitions endpoint +- feat(alerts-definitions): For Origin derived metrics, add `all_status_4xx_excl_404_rate` and `all_status_404_rate` properties +- feat(alerts-definitions): For Domain derived metrics, add `status_4xx_excl_404_rate` and `status_404_rate` properties +- feat(alerts-definitions): For Stats derived metrics, add `status_4xx_excl_404_rate`, `status_404_rate`, `all_status_5xx_rate`, + `all_status_4xx_rate`, `all_status_gte_400_rate`, and `all_status_lt_500_rate` properties +- feat(billing-invoices): For invoice line items, added `ProductLine` property + +**Documentation:** + +- doc(billing-invoices): "Billing Invoices API" relabeled to "Invoices API" +- doc(billing-invoices): Updated documentation of `billing_start_date` and `billing_end_date` query parameters of + List of invoices endpoint +- doc(alerts-definitions): Updated documentation of several fields +- doc(notification-service): Updated documentation examples for several fields + ## [vv1.0.0-beta.29](https://github.com/fastly/fastly-go/releases/tag/release/vv1.0.0-beta.29) (2024-05-24) **Bug fixes:** diff --git a/README.md b/README.md index ed1d29a..efae896 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ Add the following to your project's `go.mod`: ```go.mod require ( - github.com/fastly/fastly-go v1.0.0-beta.29 + github.com/fastly/fastly-go v1.0.0-beta.30 ) ``` @@ -638,6 +638,8 @@ The fastly-go API client currently does not support the following endpoints: - [`/resources/stores/kv/{store_id}/batch`](https://www.fastly.com/documentation/reference/api/services/resources/kv-store-item) (PUT) - [`/tls/activations/{tls_activation_id}`](https://www.fastly.com/documentation/reference/api/tls/mutual-tls/activations) (GET, PATCH) - [`/tls/activations`](https://www.fastly.com/documentation/reference/api/tls/mutual-tls/activations) (GET) +- [`/tls/preview/domains/{tls_preview_domain_id}`](https://www.fastly.com/documentation/reference/api/) (GET, PATCH) +- [`/tls/preview/domains`](https://www.fastly.com/documentation/reference/api/) (GET, POST) - [`/v1/channel/{service_id}/ts/h/limit/{max_entries}`](https://www.fastly.com/documentation/reference/api/metrics-stats/origin-insights) (GET) - [`/v1/channel/{service_id}/ts/h`](https://www.fastly.com/documentation/reference/api/metrics-stats/origin-insights) (GET) - [`/v1/channel/{service_id}/ts/{start_timestamp}`](https://www.fastly.com/documentation/reference/api/metrics-stats/origin-insights) (GET) diff --git a/docs/BillingInvoicesAPI.md b/docs/BillingInvoicesAPI.md index a678ecf..98487d4 100644 --- a/docs/BillingInvoicesAPI.md +++ b/docs/BillingInvoicesAPI.md @@ -96,8 +96,8 @@ import ( ) func main() { - billingStartDate := "2023-01-01T00:00:00Z" // string | (optional) - billingEndDate := "2023-01-31T00:00:00Z" // string | (optional) + billingStartDate := "2023-01-01" // string | (optional) + billingEndDate := "2023-01-31" // string | (optional) limit := "limit_example" // string | Number of results per page. The maximum is 200. (optional) (default to "100") cursor := "cursor_example" // string | Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. (optional) diff --git a/docs/Invoicelineitems.md b/docs/Invoicelineitems.md index 89bcd8e..d435fcb 100644 --- a/docs/Invoicelineitems.md +++ b/docs/Invoicelineitems.md @@ -11,6 +11,7 @@ Name | Type | Description | Notes **Units** | Pointer to **float32** | Total number of units of usage. | [optional] **ProductName** | Pointer to **string** | The name of the product. | [optional] **ProductGroup** | Pointer to **string** | The broader classification of the product (e.g., `Compute` or `Full-Site Delivery`). | [optional] +**ProductLine** | Pointer to **string** | The broader classification of the product (e.g., `Network Services` or `Security`). | [optional] **Region** | Pointer to **string** | The geographical area applicable for regionally based products. | [optional] **UsageType** | Pointer to **string** | The unit of measure (e.g., `requests` or `bandwidth`). | [optional] @@ -208,6 +209,31 @@ SetProductGroup sets ProductGroup field to given value. HasProductGroup returns a boolean if a field has been set. +### GetProductLine + +`func (o *Invoicelineitems) GetProductLine() string` + +GetProductLine returns the ProductLine field if non-nil, zero value otherwise. + +### GetProductLineOk + +`func (o *Invoicelineitems) GetProductLineOk() (*string, bool)` + +GetProductLineOk returns a tuple with the ProductLine field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProductLine + +`func (o *Invoicelineitems) SetProductLine(v string)` + +SetProductLine sets ProductLine field to given value. + +### HasProductLine + +`func (o *Invoicelineitems) HasProductLine() bool` + +HasProductLine returns a boolean if a field has been set. + ### GetRegion `func (o *Invoicelineitems) GetRegion() string` diff --git a/docs/LoggingS3API.md b/docs/LoggingS3API.md index 7b9e7ea..88b972d 100644 --- a/docs/LoggingS3API.md +++ b/docs/LoggingS3API.md @@ -55,11 +55,12 @@ func main() { secretKey := "secretKey_example" // string | The secret key for your S3 account. Not required if `iam_role` is provided. (optional) serverSideEncryptionKmsKeyID := "serverSideEncryptionKmsKeyId_example" // string | Optional server-side KMS Key ID. Must be set if `server_side_encryption` is set to `aws:kms` or `AES256`. (optional) (default to "null") serverSideEncryption := "serverSideEncryption_example" // string | Set this to `AES256` or `aws:kms` to enable S3 Server Side Encryption. (optional) (default to "null") + fileMaxBytes := int32(56) // int32 | The maximum number of bytes for each uploaded file. A value of 0 can be used to indicate there is no limit on the size of uploaded files, otherwise the minimum value is 1048576 bytes (1 MiB.) (optional) cfg := fastly.NewConfiguration() apiClient := fastly.NewAPIClient(cfg) ctx := fastly.NewAPIKeyContextFromEnv("FASTLY_API_TOKEN") - resp, r, err := apiClient.LoggingS3API.CreateLogAwsS3(ctx, serviceID, versionID).Name(name).Placement(placement).ResponseCondition(responseCondition).Format(format).FormatVersion(formatVersion).MessageType(messageType).TimestampFormat(timestampFormat).CompressionCodec(compressionCodec).Period(period).GzipLevel(gzipLevel).AccessKey(accessKey).ACL(acl).BucketName(bucketName).Domain(domain).IamRole(iamRole).Path(path).PublicKey(publicKey).Redundancy(redundancy).SecretKey(secretKey).ServerSideEncryptionKmsKeyID(serverSideEncryptionKmsKeyID).ServerSideEncryption(serverSideEncryption).Execute() + resp, r, err := apiClient.LoggingS3API.CreateLogAwsS3(ctx, serviceID, versionID).Name(name).Placement(placement).ResponseCondition(responseCondition).Format(format).FormatVersion(formatVersion).MessageType(messageType).TimestampFormat(timestampFormat).CompressionCodec(compressionCodec).Period(period).GzipLevel(gzipLevel).AccessKey(accessKey).ACL(acl).BucketName(bucketName).Domain(domain).IamRole(iamRole).Path(path).PublicKey(publicKey).Redundancy(redundancy).SecretKey(secretKey).ServerSideEncryptionKmsKeyID(serverSideEncryptionKmsKeyID).ServerSideEncryption(serverSideEncryption).FileMaxBytes(fileMaxBytes).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `LoggingS3API.CreateLogAwsS3`: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -85,7 +86,7 @@ Other parameters are passed through a pointer to a apiCreateLogAwsS3Request stru 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] **messageType** | **string** | How the message should be formatted. | [default to "classic"] **timestampFormat** | **string** | A timestamp format | **compressionCodec** | **string** | The codec used for compressing your logs. Valid values are `zstd`, `snappy`, and `gzip`. Specifying both `compression_codec` and `gzip_level` in the same API request will result in an error. | **period** | **int32** | How frequently log files are finalized so they can be available for reading (in seconds). | [default to 3600] **gzipLevel** | **int32** | The level of gzip encoding when sending logs (default `0`, no compression). Specifying both `compression_codec` and `gzip_level` in the same API request will result in an error. | [default to 0] **accessKey** | **string** | The access key for your S3 account. Not required if `iam_role` is provided. | **acl** | **string** | The access control list (ACL) specific request header. See the AWS documentation for [Access Control List (ACL) Specific Request Headers](https://docs.aws.amazon.com/AmazonS3/latest/API/mpUploadInitiate.html#initiate-mpu-acl-specific-request-headers) for more information. | **bucketName** | **string** | The bucket name for S3 account. | **domain** | **string** | The domain of the Amazon S3 endpoint. | **iamRole** | **string** | The Amazon Resource Name (ARN) for the IAM role granting Fastly access to S3. Not required if `access_key` and `secret_key` are provided. | **path** | **string** | The path to upload logs to. | [default to "null"] **publicKey** | **string** | A PGP public key that Fastly will use to encrypt your log files before writing them to disk. | [default to "null"] **redundancy** | **string** | The S3 redundancy level. | [default to "null"] **secretKey** | **string** | The secret key for your S3 account. Not required if `iam_role` is provided. | **serverSideEncryptionKmsKeyID** | **string** | Optional server-side KMS Key ID. Must be set if `server_side_encryption` is set to `aws:kms` or `AES256`. | [default to "null"] **serverSideEncryption** | **string** | Set this to `AES256` or `aws:kms` to enable S3 Server Side Encryption. | [default to "null"] + **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] **messageType** | **string** | How the message should be formatted. | [default to "classic"] **timestampFormat** | **string** | A timestamp format | **compressionCodec** | **string** | The codec used for compressing your logs. Valid values are `zstd`, `snappy`, and `gzip`. Specifying both `compression_codec` and `gzip_level` in the same API request will result in an error. | **period** | **int32** | How frequently log files are finalized so they can be available for reading (in seconds). | [default to 3600] **gzipLevel** | **int32** | The level of gzip encoding when sending logs (default `0`, no compression). Specifying both `compression_codec` and `gzip_level` in the same API request will result in an error. | [default to 0] **accessKey** | **string** | The access key for your S3 account. Not required if `iam_role` is provided. | **acl** | **string** | The access control list (ACL) specific request header. See the AWS documentation for [Access Control List (ACL) Specific Request Headers](https://docs.aws.amazon.com/AmazonS3/latest/API/mpUploadInitiate.html#initiate-mpu-acl-specific-request-headers) for more information. | **bucketName** | **string** | The bucket name for S3 account. | **domain** | **string** | The domain of the Amazon S3 endpoint. | **iamRole** | **string** | The Amazon Resource Name (ARN) for the IAM role granting Fastly access to S3. Not required if `access_key` and `secret_key` are provided. | **path** | **string** | The path to upload logs to. | [default to "null"] **publicKey** | **string** | A PGP public key that Fastly will use to encrypt your log files before writing them to disk. | [default to "null"] **redundancy** | **string** | The S3 redundancy level. | [default to "null"] **secretKey** | **string** | The secret key for your S3 account. Not required if `iam_role` is provided. | **serverSideEncryptionKmsKeyID** | **string** | Optional server-side KMS Key ID. Must be set if `server_side_encryption` is set to `aws:kms` or `AES256`. | [default to "null"] **serverSideEncryption** | **string** | Set this to `AES256` or `aws:kms` to enable S3 Server Side Encryption. | [default to "null"] **fileMaxBytes** | **int32** | The maximum number of bytes for each uploaded file. A value of 0 can be used to indicate there is no limit on the size of uploaded files, otherwise the minimum value is 1048576 bytes (1 MiB.) | ### Return type @@ -357,11 +358,12 @@ func main() { secretKey := "secretKey_example" // string | The secret key for your S3 account. Not required if `iam_role` is provided. (optional) serverSideEncryptionKmsKeyID := "serverSideEncryptionKmsKeyId_example" // string | Optional server-side KMS Key ID. Must be set if `server_side_encryption` is set to `aws:kms` or `AES256`. (optional) (default to "null") serverSideEncryption := "serverSideEncryption_example" // string | Set this to `AES256` or `aws:kms` to enable S3 Server Side Encryption. (optional) (default to "null") + fileMaxBytes := int32(56) // int32 | The maximum number of bytes for each uploaded file. A value of 0 can be used to indicate there is no limit on the size of uploaded files, otherwise the minimum value is 1048576 bytes (1 MiB.) (optional) cfg := fastly.NewConfiguration() apiClient := fastly.NewAPIClient(cfg) ctx := fastly.NewAPIKeyContextFromEnv("FASTLY_API_TOKEN") - resp, r, err := apiClient.LoggingS3API.UpdateLogAwsS3(ctx, serviceID, versionID, loggingS3Name).Name(name).Placement(placement).ResponseCondition(responseCondition).Format(format).FormatVersion(formatVersion).MessageType(messageType).TimestampFormat(timestampFormat).CompressionCodec(compressionCodec).Period(period).GzipLevel(gzipLevel).AccessKey(accessKey).ACL(acl).BucketName(bucketName).Domain(domain).IamRole(iamRole).Path(path).PublicKey(publicKey).Redundancy(redundancy).SecretKey(secretKey).ServerSideEncryptionKmsKeyID(serverSideEncryptionKmsKeyID).ServerSideEncryption(serverSideEncryption).Execute() + resp, r, err := apiClient.LoggingS3API.UpdateLogAwsS3(ctx, serviceID, versionID, loggingS3Name).Name(name).Placement(placement).ResponseCondition(responseCondition).Format(format).FormatVersion(formatVersion).MessageType(messageType).TimestampFormat(timestampFormat).CompressionCodec(compressionCodec).Period(period).GzipLevel(gzipLevel).AccessKey(accessKey).ACL(acl).BucketName(bucketName).Domain(domain).IamRole(iamRole).Path(path).PublicKey(publicKey).Redundancy(redundancy).SecretKey(secretKey).ServerSideEncryptionKmsKeyID(serverSideEncryptionKmsKeyID).ServerSideEncryption(serverSideEncryption).FileMaxBytes(fileMaxBytes).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `LoggingS3API.UpdateLogAwsS3`: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -388,7 +390,7 @@ Other parameters are passed through a pointer to a apiUpdateLogAwsS3Request stru 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] **messageType** | **string** | How the message should be formatted. | [default to "classic"] **timestampFormat** | **string** | A timestamp format | **compressionCodec** | **string** | The codec used for compressing your logs. Valid values are `zstd`, `snappy`, and `gzip`. Specifying both `compression_codec` and `gzip_level` in the same API request will result in an error. | **period** | **int32** | How frequently log files are finalized so they can be available for reading (in seconds). | [default to 3600] **gzipLevel** | **int32** | The level of gzip encoding when sending logs (default `0`, no compression). Specifying both `compression_codec` and `gzip_level` in the same API request will result in an error. | [default to 0] **accessKey** | **string** | The access key for your S3 account. Not required if `iam_role` is provided. | **acl** | **string** | The access control list (ACL) specific request header. See the AWS documentation for [Access Control List (ACL) Specific Request Headers](https://docs.aws.amazon.com/AmazonS3/latest/API/mpUploadInitiate.html#initiate-mpu-acl-specific-request-headers) for more information. | **bucketName** | **string** | The bucket name for S3 account. | **domain** | **string** | The domain of the Amazon S3 endpoint. | **iamRole** | **string** | The Amazon Resource Name (ARN) for the IAM role granting Fastly access to S3. Not required if `access_key` and `secret_key` are provided. | **path** | **string** | The path to upload logs to. | [default to "null"] **publicKey** | **string** | A PGP public key that Fastly will use to encrypt your log files before writing them to disk. | [default to "null"] **redundancy** | **string** | The S3 redundancy level. | [default to "null"] **secretKey** | **string** | The secret key for your S3 account. Not required if `iam_role` is provided. | **serverSideEncryptionKmsKeyID** | **string** | Optional server-side KMS Key ID. Must be set if `server_side_encryption` is set to `aws:kms` or `AES256`. | [default to "null"] **serverSideEncryption** | **string** | Set this to `AES256` or `aws:kms` to enable S3 Server Side Encryption. | [default to "null"] + **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] **messageType** | **string** | How the message should be formatted. | [default to "classic"] **timestampFormat** | **string** | A timestamp format | **compressionCodec** | **string** | The codec used for compressing your logs. Valid values are `zstd`, `snappy`, and `gzip`. Specifying both `compression_codec` and `gzip_level` in the same API request will result in an error. | **period** | **int32** | How frequently log files are finalized so they can be available for reading (in seconds). | [default to 3600] **gzipLevel** | **int32** | The level of gzip encoding when sending logs (default `0`, no compression). Specifying both `compression_codec` and `gzip_level` in the same API request will result in an error. | [default to 0] **accessKey** | **string** | The access key for your S3 account. Not required if `iam_role` is provided. | **acl** | **string** | The access control list (ACL) specific request header. See the AWS documentation for [Access Control List (ACL) Specific Request Headers](https://docs.aws.amazon.com/AmazonS3/latest/API/mpUploadInitiate.html#initiate-mpu-acl-specific-request-headers) for more information. | **bucketName** | **string** | The bucket name for S3 account. | **domain** | **string** | The domain of the Amazon S3 endpoint. | **iamRole** | **string** | The Amazon Resource Name (ARN) for the IAM role granting Fastly access to S3. Not required if `access_key` and `secret_key` are provided. | **path** | **string** | The path to upload logs to. | [default to "null"] **publicKey** | **string** | A PGP public key that Fastly will use to encrypt your log files before writing them to disk. | [default to "null"] **redundancy** | **string** | The S3 redundancy level. | [default to "null"] **secretKey** | **string** | The secret key for your S3 account. Not required if `iam_role` is provided. | **serverSideEncryptionKmsKeyID** | **string** | Optional server-side KMS Key ID. Must be set if `server_side_encryption` is set to `aws:kms` or `AES256`. | [default to "null"] **serverSideEncryption** | **string** | Set this to `AES256` or `aws:kms` to enable S3 Server Side Encryption. | [default to "null"] **fileMaxBytes** | **int32** | The maximum number of bytes for each uploaded file. A value of 0 can be used to indicate there is no limit on the size of uploaded files, otherwise the minimum value is 1048576 bytes (1 MiB.) | ### Return type diff --git a/docs/LoggingS3Additional.md b/docs/LoggingS3Additional.md index 8c8ae86..3bb6a66 100644 --- a/docs/LoggingS3Additional.md +++ b/docs/LoggingS3Additional.md @@ -15,6 +15,7 @@ Name | Type | Description | Notes **SecretKey** | Pointer to **NullableString** | The secret key for your S3 account. Not required if `iam_role` is provided. | [optional] **ServerSideEncryptionKmsKeyID** | Pointer to **NullableString** | Optional server-side KMS Key ID. Must be set if `server_side_encryption` is set to `aws:kms` or `AES256`. | [optional] [default to "null"] **ServerSideEncryption** | Pointer to **NullableString** | Set this to `AES256` or `aws:kms` to enable S3 Server Side Encryption. | [optional] [default to "null"] +**FileMaxBytes** | Pointer to **int32** | The maximum number of bytes for each uploaded file. A value of 0 can be used to indicate there is no limit on the size of uploaded files, otherwise the minimum value is 1048576 bytes (1 MiB.) | [optional] ## Methods @@ -390,5 +391,30 @@ HasServerSideEncryption returns a boolean if a field has been set. `func (o *LoggingS3Additional) UnsetServerSideEncryption()` UnsetServerSideEncryption ensures that no value is present for ServerSideEncryption, not even an explicit nil +### GetFileMaxBytes + +`func (o *LoggingS3Additional) GetFileMaxBytes() int32` + +GetFileMaxBytes returns the FileMaxBytes field if non-nil, zero value otherwise. + +### GetFileMaxBytesOk + +`func (o *LoggingS3Additional) GetFileMaxBytesOk() (*int32, bool)` + +GetFileMaxBytesOk returns a tuple with the FileMaxBytes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFileMaxBytes + +`func (o *LoggingS3Additional) SetFileMaxBytes(v int32)` + +SetFileMaxBytes sets FileMaxBytes field to given value. + +### HasFileMaxBytes + +`func (o *LoggingS3Additional) HasFileMaxBytes() bool` + +HasFileMaxBytes 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/LoggingS3Response.md b/docs/LoggingS3Response.md index 7c7c5d9..cf0566a 100644 --- a/docs/LoggingS3Response.md +++ b/docs/LoggingS3Response.md @@ -30,6 +30,7 @@ Name | Type | Description | Notes **SecretKey** | Pointer to **NullableString** | The secret key for your S3 account. Not required if `iam_role` is provided. | [optional] **ServerSideEncryptionKmsKeyID** | Pointer to **NullableString** | Optional server-side KMS Key ID. Must be set if `server_side_encryption` is set to `aws:kms` or `AES256`. | [optional] [default to "null"] **ServerSideEncryption** | Pointer to **NullableString** | Set this to `AES256` or `aws:kms` to enable S3 Server Side Encryption. | [optional] [default to "null"] +**FileMaxBytes** | Pointer to **int32** | The maximum number of bytes for each uploaded file. A value of 0 can be used to indicate there is no limit on the size of uploaded files, otherwise the minimum value is 1048576 bytes (1 MiB.) | [optional] ## Methods @@ -840,5 +841,30 @@ HasServerSideEncryption returns a boolean if a field has been set. `func (o *LoggingS3Response) UnsetServerSideEncryption()` UnsetServerSideEncryption ensures that no value is present for ServerSideEncryption, not even an explicit nil +### GetFileMaxBytes + +`func (o *LoggingS3Response) GetFileMaxBytes() int32` + +GetFileMaxBytes returns the FileMaxBytes field if non-nil, zero value otherwise. + +### GetFileMaxBytesOk + +`func (o *LoggingS3Response) GetFileMaxBytesOk() (*int32, bool)` + +GetFileMaxBytesOk returns a tuple with the FileMaxBytes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFileMaxBytes + +`func (o *LoggingS3Response) SetFileMaxBytes(v int32)` + +SetFileMaxBytes sets FileMaxBytes field to given value. + +### HasFileMaxBytes + +`func (o *LoggingS3Response) HasFileMaxBytes() bool` + +HasFileMaxBytes 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/fastly/api_logging_s3.go b/fastly/api_logging_s3.go index c7ae0e5..49e1640 100644 --- a/fastly/api_logging_s3.go +++ b/fastly/api_logging_s3.go @@ -145,6 +145,7 @@ type APICreateLogAwsS3Request struct { secretKey *string serverSideEncryptionKmsKeyID *string serverSideEncryption *string + fileMaxBytes *int32 } // Name The name for the real-time logging configuration. @@ -252,6 +253,11 @@ func (r *APICreateLogAwsS3Request) ServerSideEncryption(serverSideEncryption str r.serverSideEncryption = &serverSideEncryption return r } +// FileMaxBytes The maximum number of bytes for each uploaded file. A value of 0 can be used to indicate there is no limit on the size of uploaded files, otherwise the minimum value is 1048576 bytes (1 MiB.) +func (r *APICreateLogAwsS3Request) FileMaxBytes(fileMaxBytes int32) *APICreateLogAwsS3Request { + r.fileMaxBytes = &fileMaxBytes + return r +} // Execute calls the API using the request data configured. func (r APICreateLogAwsS3Request) Execute() (*LoggingS3Response, *http.Response, error) { @@ -380,6 +386,9 @@ func (a *LoggingS3APIService) CreateLogAwsS3Execute(r APICreateLogAwsS3Request) if r.serverSideEncryption != nil { localVarFormParams.Add("server_side_encryption", parameterToString(*r.serverSideEncryption, "")) } + if r.fileMaxBytes != nil { + localVarFormParams.Add("file_max_bytes", parameterToString(*r.fileMaxBytes, "")) + } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { @@ -895,6 +904,7 @@ type APIUpdateLogAwsS3Request struct { secretKey *string serverSideEncryptionKmsKeyID *string serverSideEncryption *string + fileMaxBytes *int32 } // Name The name for the real-time logging configuration. @@ -1002,6 +1012,11 @@ func (r *APIUpdateLogAwsS3Request) ServerSideEncryption(serverSideEncryption str r.serverSideEncryption = &serverSideEncryption return r } +// FileMaxBytes The maximum number of bytes for each uploaded file. A value of 0 can be used to indicate there is no limit on the size of uploaded files, otherwise the minimum value is 1048576 bytes (1 MiB.) +func (r *APIUpdateLogAwsS3Request) FileMaxBytes(fileMaxBytes int32) *APIUpdateLogAwsS3Request { + r.fileMaxBytes = &fileMaxBytes + return r +} // Execute calls the API using the request data configured. func (r APIUpdateLogAwsS3Request) Execute() (*LoggingS3Response, *http.Response, error) { @@ -1133,6 +1148,9 @@ func (a *LoggingS3APIService) UpdateLogAwsS3Execute(r APIUpdateLogAwsS3Request) if r.serverSideEncryption != nil { localVarFormParams.Add("server_side_encryption", parameterToString(*r.serverSideEncryption, "")) } + if r.fileMaxBytes != nil { + localVarFormParams.Add("file_max_bytes", parameterToString(*r.fileMaxBytes, "")) + } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { diff --git a/fastly/configuration.go b/fastly/configuration.go index 573b920..ab59273 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.29", + UserAgent: "fastly-go/v1.0.0-beta.30", Debug: false, Servers: ServerConfigurations{ { diff --git a/fastly/model_invoicelineitems.go b/fastly/model_invoicelineitems.go index 7c16c34..326f2bf 100644 --- a/fastly/model_invoicelineitems.go +++ b/fastly/model_invoicelineitems.go @@ -33,6 +33,8 @@ type Invoicelineitems struct { ProductName *string `json:"ProductName,omitempty"` // The broader classification of the product (e.g., `Compute` or `Full-Site Delivery`). ProductGroup *string `json:"ProductGroup,omitempty"` + // The broader classification of the product (e.g., `Network Services` or `Security`). + ProductLine *string `json:"ProductLine,omitempty"` // The geographical area applicable for regionally based products. Region *string `json:"Region,omitempty"` // The unit of measure (e.g., `requests` or `bandwidth`). @@ -283,6 +285,38 @@ func (o *Invoicelineitems) SetProductGroup(v string) { o.ProductGroup = &v } +// GetProductLine returns the ProductLine field value if set, zero value otherwise. +func (o *Invoicelineitems) GetProductLine() string { + if o == nil || o.ProductLine == nil { + var ret string + return ret + } + return *o.ProductLine +} + +// GetProductLineOk returns a tuple with the ProductLine field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Invoicelineitems) GetProductLineOk() (*string, bool) { + if o == nil || o.ProductLine == nil { + return nil, false + } + return o.ProductLine, true +} + +// HasProductLine returns a boolean if a field has been set. +func (o *Invoicelineitems) HasProductLine() bool { + if o != nil && o.ProductLine != nil { + return true + } + + return false +} + +// SetProductLine gets a reference to the given string and assigns it to the ProductLine field. +func (o *Invoicelineitems) SetProductLine(v string) { + o.ProductLine = &v +} + // GetRegion returns the Region field value if set, zero value otherwise. func (o *Invoicelineitems) GetRegion() string { if o == nil || o.Region == nil { @@ -372,6 +406,9 @@ func (o Invoicelineitems) MarshalJSON() ([]byte, error) { if o.ProductGroup != nil { toSerialize["ProductGroup"] = o.ProductGroup } + if o.ProductLine != nil { + toSerialize["ProductLine"] = o.ProductLine + } if o.Region != nil { toSerialize["Region"] = o.Region } @@ -405,6 +442,7 @@ func (o *Invoicelineitems) UnmarshalJSON(bytes []byte) (err error) { delete(additionalProperties, "units") delete(additionalProperties, "ProductName") delete(additionalProperties, "ProductGroup") + delete(additionalProperties, "ProductLine") delete(additionalProperties, "Region") delete(additionalProperties, "UsageType") o.AdditionalProperties = additionalProperties diff --git a/fastly/model_logging_s3_additional.go b/fastly/model_logging_s3_additional.go index b76d4e8..0500b77 100644 --- a/fastly/model_logging_s3_additional.go +++ b/fastly/model_logging_s3_additional.go @@ -41,6 +41,8 @@ type LoggingS3Additional struct { ServerSideEncryptionKmsKeyID NullableString `json:"server_side_encryption_kms_key_id,omitempty"` // Set this to `AES256` or `aws:kms` to enable S3 Server Side Encryption. ServerSideEncryption NullableString `json:"server_side_encryption,omitempty"` + // The maximum number of bytes for each uploaded file. A value of 0 can be used to indicate there is no limit on the size of uploaded files, otherwise the minimum value is 1048576 bytes (1 MiB.) + FileMaxBytes *int32 `json:"file_max_bytes,omitempty"` AdditionalProperties map[string]any } @@ -515,6 +517,38 @@ func (o *LoggingS3Additional) UnsetServerSideEncryption() { o.ServerSideEncryption.Unset() } +// GetFileMaxBytes returns the FileMaxBytes field value if set, zero value otherwise. +func (o *LoggingS3Additional) GetFileMaxBytes() int32 { + if o == nil || o.FileMaxBytes == nil { + var ret int32 + return ret + } + return *o.FileMaxBytes +} + +// GetFileMaxBytesOk returns a tuple with the FileMaxBytes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoggingS3Additional) GetFileMaxBytesOk() (*int32, bool) { + if o == nil || o.FileMaxBytes == nil { + return nil, false + } + return o.FileMaxBytes, true +} + +// HasFileMaxBytes returns a boolean if a field has been set. +func (o *LoggingS3Additional) HasFileMaxBytes() bool { + if o != nil && o.FileMaxBytes != nil { + return true + } + + return false +} + +// SetFileMaxBytes gets a reference to the given int32 and assigns it to the FileMaxBytes field. +func (o *LoggingS3Additional) SetFileMaxBytes(v int32) { + o.FileMaxBytes = &v +} + // MarshalJSON implements the json.Marshaler interface. // Marshaler is the interface implemented by types that can marshal themselves into valid JSON. func (o LoggingS3Additional) MarshalJSON() ([]byte, error) { @@ -552,6 +586,9 @@ func (o LoggingS3Additional) MarshalJSON() ([]byte, error) { if o.ServerSideEncryption.IsSet() { toSerialize["server_side_encryption"] = o.ServerSideEncryption.Get() } + if o.FileMaxBytes != nil { + toSerialize["file_max_bytes"] = o.FileMaxBytes + } for key, value := range o.AdditionalProperties { toSerialize[key] = value @@ -583,6 +620,7 @@ func (o *LoggingS3Additional) UnmarshalJSON(bytes []byte) (err error) { delete(additionalProperties, "secret_key") delete(additionalProperties, "server_side_encryption_kms_key_id") delete(additionalProperties, "server_side_encryption") + delete(additionalProperties, "file_max_bytes") o.AdditionalProperties = additionalProperties } diff --git a/fastly/model_logging_s3_response.go b/fastly/model_logging_s3_response.go index 6916d32..319d6bb 100644 --- a/fastly/model_logging_s3_response.go +++ b/fastly/model_logging_s3_response.go @@ -70,6 +70,8 @@ type LoggingS3Response struct { ServerSideEncryptionKmsKeyID NullableString `json:"server_side_encryption_kms_key_id,omitempty"` // Set this to `AES256` or `aws:kms` to enable S3 Server Side Encryption. ServerSideEncryption NullableString `json:"server_side_encryption,omitempty"` + // The maximum number of bytes for each uploaded file. A value of 0 can be used to indicate there is no limit on the size of uploaded files, otherwise the minimum value is 1048576 bytes (1 MiB.) + FileMaxBytes *int32 `json:"file_max_bytes,omitempty"` AdditionalProperties map[string]any } @@ -1104,6 +1106,38 @@ func (o *LoggingS3Response) UnsetServerSideEncryption() { o.ServerSideEncryption.Unset() } +// GetFileMaxBytes returns the FileMaxBytes field value if set, zero value otherwise. +func (o *LoggingS3Response) GetFileMaxBytes() int32 { + if o == nil || o.FileMaxBytes == nil { + var ret int32 + return ret + } + return *o.FileMaxBytes +} + +// GetFileMaxBytesOk returns a tuple with the FileMaxBytes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoggingS3Response) GetFileMaxBytesOk() (*int32, bool) { + if o == nil || o.FileMaxBytes == nil { + return nil, false + } + return o.FileMaxBytes, true +} + +// HasFileMaxBytes returns a boolean if a field has been set. +func (o *LoggingS3Response) HasFileMaxBytes() bool { + if o != nil && o.FileMaxBytes != nil { + return true + } + + return false +} + +// SetFileMaxBytes gets a reference to the given int32 and assigns it to the FileMaxBytes field. +func (o *LoggingS3Response) SetFileMaxBytes(v int32) { + o.FileMaxBytes = &v +} + // MarshalJSON implements the json.Marshaler interface. // Marshaler is the interface implemented by types that can marshal themselves into valid JSON. func (o LoggingS3Response) MarshalJSON() ([]byte, error) { @@ -1186,6 +1220,9 @@ func (o LoggingS3Response) MarshalJSON() ([]byte, error) { if o.ServerSideEncryption.IsSet() { toSerialize["server_side_encryption"] = o.ServerSideEncryption.Get() } + if o.FileMaxBytes != nil { + toSerialize["file_max_bytes"] = o.FileMaxBytes + } for key, value := range o.AdditionalProperties { toSerialize[key] = value @@ -1232,6 +1269,7 @@ func (o *LoggingS3Response) UnmarshalJSON(bytes []byte) (err error) { delete(additionalProperties, "secret_key") delete(additionalProperties, "server_side_encryption_kms_key_id") delete(additionalProperties, "server_side_encryption") + delete(additionalProperties, "file_max_bytes") o.AdditionalProperties = additionalProperties } diff --git a/sig.json b/sig.json index a2ee922..d84bb6e 100644 --- a/sig.json +++ b/sig.json @@ -1 +1 @@ -{"G": "12e42c04", "D": "dd010b17"} +{"G": "5a2ccc65", "D": "ec7f026b"}