From 979d19997bd577c5f2ea30f9f6ec9fa1f73be65c Mon Sep 17 00:00:00 2001 From: github-actions Date: Mon, 5 Aug 2024 06:39:40 +0000 Subject: [PATCH] Generated v1.0.0-beta.32 --- CHANGELOG.md | 10 + README.md | 17 +- docs/AsyncResponse.md | 80 ++ docs/BillingInvoicesAPI.md | 68 +- docs/BillingUsageMetricsAPI.md | 153 ++++ docs/CreateDashboardRequest.md | 111 +++ docs/Dashboard.md | 266 ++++++ docs/DashboardItem.md | 164 ++++ docs/DashboardItemPropertyDataSource.md | 70 ++ ...ardItemPropertyDataSourcePropertyConfig.md | 49 ++ docs/DashboardItemPropertyVisualization.md | 70 ++ ...ItemPropertyVisualizationPropertyConfig.md | 101 +++ docs/DashboardPropertyCreatedBy.md | 28 + docs/DashboardPropertyUpdatedBy.md | 28 + docs/DomainInspectorMeasurements.md | 2 +- ...voiceResponse.md => EomInvoiceResponse.md} | 86 +- docs/GetServiceLevelUsageResponse.md | 54 ++ docs/GetServiceLevelUsageTypesResponse.md | 54 ++ docs/IncludedWithTlsConfiguration.md | 54 ++ docs/IncludedWithTlsConfigurationItem.md | 106 +++ docs/ListDashboardsResponse.md | 90 ++ ...Response.md => ListEomInvoicesResponse.md} | 30 +- docs/MtdInvoiceResponse.md | 184 +++++ docs/Mtdinvoice.md | 184 +++++ docs/Mtdlineitems.md | 262 ++++++ docs/ObservabilityCustomDashboardsAPI.md | 335 ++++++++ docs/RealtimeEntryAggregated.md | 26 + docs/RealtimeMeasurements.md | 26 + .../RelationshipDefaultEcdsaTlsCertificate.md | 54 ++ ...saTlsCertificateDefaultEcdsaCertificate.md | 54 ++ ...sCertificateDefaultEcdsaCertificateData.md | 80 ++ docs/RelationshipDefaultTlsCertificate.md | 54 ++ ...DefaultTlsCertificateDefaultCertificate.md | 54 ++ ...ultTlsCertificateDefaultCertificateData.md | 80 ++ docs/RelationshipTlsDnsRecord.md | 54 -- docs/RelationshipTlsDnsRecordDnsRecord.md | 54 -- docs/RelationshipTlsDnsRecords.md | 54 -- docs/RelationshipTlsDnsRecordsRequest.md | 54 ++ ...ationshipTlsDnsRecordsRequestDnsRecords.md | 54 ++ ...nshipTlsDnsRecordsRequestDnsRecordsData.md | 80 ++ docs/RelationshipTlsDnsRecordsResponse.md | 54 ++ ...tionshipTlsDnsRecordsResponseDnsRecords.md | 54 ++ ...hipTlsDnsRecordsResponseDnsRecordsData.md} | 30 +- docs/Results.md | 26 + docs/Serviceusagemetric.md | 132 +++ docs/Serviceusagemetrics.md | 54 ++ docs/ServiceusagemetricsData.md | 210 +++++ docs/Serviceusagetype.md | 80 ++ docs/Serviceusagetypes.md | 54 ++ docs/TlsCertificateBlobResponse.md | 54 ++ docs/TlsCertificatesAPI.md | 68 ++ docs/TlsDnsRecord.md | 28 +- docs/UpdateDashboardRequest.md | 116 +++ docs/Values.md | 2 +- fastly/api_billing_invoices.go | 207 ++++- fastly/api_billing_usage_metrics.go | 476 +++++++++++ fastly/api_observability_custom_dashboards.go | 775 ++++++++++++++++++ fastly/api_tls_certificates.go | 149 ++++ fastly/client.go | 6 + fastly/configuration.go | 56 +- fastly/model_async_response.go | 192 +++++ fastly/model_create_dashboard_request.go | 226 +++++ fastly/model_dashboard.go | 442 ++++++++++ fastly/model_dashboard_item.go | 320 ++++++++ ...del_dashboard_item_property_data_source.go | 179 ++++ ...em_property_data_source_property_config.go | 149 ++++ ...l_dashboard_item_property_visualization.go | 179 ++++ ..._property_visualization_property_config.go | 229 ++++++ fastly/model_dashboard_property_created_by.go | 92 +++ fastly/model_dashboard_property_updated_by.go | 92 +++ fastly/model_domain_inspector_measurements.go | 2 +- ...ponse.go => model_eom_invoice_response.go} | 124 +-- .../model_get_service_level_usage_response.go | 155 ++++ ...get_service_level_usage_types_response.go} | 66 +- .../model_included_with_tls_configuration.go | 155 ++++ ...el_included_with_tls_configuration_item.go | 234 ++++++ fastly/model_invoicelineitems.go | 30 +- fastly/model_list_dashboards_response.go | 194 +++++ ...go => model_list_eom_invoices_response.go} | 68 +- fastly/model_mtd_invoice_response.go | 346 ++++++++ fastly/model_mtdinvoice.go | 346 ++++++++ fastly/model_mtdlineitems.go | 460 +++++++++++ fastly/model_realtime_entry_aggregated.go | 38 + fastly/model_realtime_measurements.go | 38 + ...ationship_default_ecdsa_tls_certificate.go | 155 ++++ ...s_certificate_default_ecdsa_certificate.go | 155 ++++ ...tificate_default_ecdsa_certificate_data.go | 197 +++++ ...el_relationship_default_tls_certificate.go | 155 ++++ ...ult_tls_certificate_default_certificate.go | 155 ++++ ...ls_certificate_default_certificate_data.go | 197 +++++ fastly/model_relationship_tls_dns_record.go | 155 ---- ...l_relationship_tls_dns_records_request.go} | 66 +- ...hip_tls_dns_records_request_dns_records.go | 155 ++++ ...s_dns_records_request_dns_records_data.go} | 68 +- ...l_relationship_tls_dns_records_response.go | 155 ++++ ...ip_tls_dns_records_response_dns_records.go | 155 ++++ ...s_dns_records_response_dns_records_data.go | 196 +++++ ...del_relationships_for_tls_configuration.go | 20 +- fastly/model_results.go | 38 + fastly/model_serviceusagemetric.go | 269 ++++++ fastly/model_serviceusagemetrics.go | 155 ++++ fastly/model_serviceusagemetrics_data.go | 382 +++++++++ fastly/model_serviceusagetype.go | 194 +++++ fastly/model_serviceusagetypes.go | 155 ++++ fastly/model_tls_certificate_blob_response.go | 156 ++++ fastly/model_tls_dns_record.go | 40 +- fastly/model_update_dashboard_request.go | 233 ++++++ fastly/model_values.go | 2 +- sig.json | 2 +- 109 files changed, 13330 insertions(+), 701 deletions(-) create mode 100644 docs/AsyncResponse.md create mode 100644 docs/BillingUsageMetricsAPI.md create mode 100644 docs/CreateDashboardRequest.md create mode 100644 docs/Dashboard.md create mode 100644 docs/DashboardItem.md create mode 100644 docs/DashboardItemPropertyDataSource.md create mode 100644 docs/DashboardItemPropertyDataSourcePropertyConfig.md create mode 100644 docs/DashboardItemPropertyVisualization.md create mode 100644 docs/DashboardItemPropertyVisualizationPropertyConfig.md create mode 100644 docs/DashboardPropertyCreatedBy.md create mode 100644 docs/DashboardPropertyUpdatedBy.md rename docs/{InvoiceResponse.md => EomInvoiceResponse.md} (69%) create mode 100644 docs/GetServiceLevelUsageResponse.md create mode 100644 docs/GetServiceLevelUsageTypesResponse.md create mode 100644 docs/IncludedWithTlsConfiguration.md create mode 100644 docs/IncludedWithTlsConfigurationItem.md create mode 100644 docs/ListDashboardsResponse.md rename docs/{ListInvoicesResponse.md => ListEomInvoicesResponse.md} (62%) create mode 100644 docs/MtdInvoiceResponse.md create mode 100644 docs/Mtdinvoice.md create mode 100644 docs/Mtdlineitems.md create mode 100644 docs/ObservabilityCustomDashboardsAPI.md create mode 100644 docs/RelationshipDefaultEcdsaTlsCertificate.md create mode 100644 docs/RelationshipDefaultEcdsaTlsCertificateDefaultEcdsaCertificate.md create mode 100644 docs/RelationshipDefaultEcdsaTlsCertificateDefaultEcdsaCertificateData.md create mode 100644 docs/RelationshipDefaultTlsCertificate.md create mode 100644 docs/RelationshipDefaultTlsCertificateDefaultCertificate.md create mode 100644 docs/RelationshipDefaultTlsCertificateDefaultCertificateData.md delete mode 100644 docs/RelationshipTlsDnsRecord.md delete mode 100644 docs/RelationshipTlsDnsRecordDnsRecord.md delete mode 100644 docs/RelationshipTlsDnsRecords.md create mode 100644 docs/RelationshipTlsDnsRecordsRequest.md create mode 100644 docs/RelationshipTlsDnsRecordsRequestDnsRecords.md create mode 100644 docs/RelationshipTlsDnsRecordsRequestDnsRecordsData.md create mode 100644 docs/RelationshipTlsDnsRecordsResponse.md create mode 100644 docs/RelationshipTlsDnsRecordsResponseDnsRecords.md rename docs/{RelationshipMemberTlsDnsRecord.md => RelationshipTlsDnsRecordsResponseDnsRecordsData.md} (52%) create mode 100644 docs/Serviceusagemetric.md create mode 100644 docs/Serviceusagemetrics.md create mode 100644 docs/ServiceusagemetricsData.md create mode 100644 docs/Serviceusagetype.md create mode 100644 docs/Serviceusagetypes.md create mode 100644 docs/TlsCertificateBlobResponse.md create mode 100644 docs/UpdateDashboardRequest.md create mode 100644 fastly/api_billing_usage_metrics.go create mode 100644 fastly/api_observability_custom_dashboards.go create mode 100644 fastly/model_async_response.go create mode 100644 fastly/model_create_dashboard_request.go create mode 100644 fastly/model_dashboard.go create mode 100644 fastly/model_dashboard_item.go create mode 100644 fastly/model_dashboard_item_property_data_source.go create mode 100644 fastly/model_dashboard_item_property_data_source_property_config.go create mode 100644 fastly/model_dashboard_item_property_visualization.go create mode 100644 fastly/model_dashboard_item_property_visualization_property_config.go create mode 100644 fastly/model_dashboard_property_created_by.go create mode 100644 fastly/model_dashboard_property_updated_by.go rename fastly/{model_invoice_response.go => model_eom_invoice_response.go} (75%) create mode 100644 fastly/model_get_service_level_usage_response.go rename fastly/{model_relationship_tls_dns_record_dns_record.go => model_get_service_level_usage_types_response.go} (55%) create mode 100644 fastly/model_included_with_tls_configuration.go create mode 100644 fastly/model_included_with_tls_configuration_item.go create mode 100644 fastly/model_list_dashboards_response.go rename fastly/{model_list_invoices_response.go => model_list_eom_invoices_response.go} (64%) create mode 100644 fastly/model_mtd_invoice_response.go create mode 100644 fastly/model_mtdinvoice.go create mode 100644 fastly/model_mtdlineitems.go create mode 100644 fastly/model_relationship_default_ecdsa_tls_certificate.go create mode 100644 fastly/model_relationship_default_ecdsa_tls_certificate_default_ecdsa_certificate.go create mode 100644 fastly/model_relationship_default_ecdsa_tls_certificate_default_ecdsa_certificate_data.go create mode 100644 fastly/model_relationship_default_tls_certificate.go create mode 100644 fastly/model_relationship_default_tls_certificate_default_certificate.go create mode 100644 fastly/model_relationship_default_tls_certificate_default_certificate_data.go delete mode 100644 fastly/model_relationship_tls_dns_record.go rename fastly/{model_relationship_tls_dns_records.go => model_relationship_tls_dns_records_request.go} (55%) create mode 100644 fastly/model_relationship_tls_dns_records_request_dns_records.go rename fastly/{model_relationship_member_tls_dns_record.go => model_relationship_tls_dns_records_request_dns_records_data.go} (55%) create mode 100644 fastly/model_relationship_tls_dns_records_response.go create mode 100644 fastly/model_relationship_tls_dns_records_response_dns_records.go create mode 100644 fastly/model_relationship_tls_dns_records_response_dns_records_data.go create mode 100644 fastly/model_serviceusagemetric.go create mode 100644 fastly/model_serviceusagemetrics.go create mode 100644 fastly/model_serviceusagemetrics_data.go create mode 100644 fastly/model_serviceusagetype.go create mode 100644 fastly/model_serviceusagetypes.go create mode 100644 fastly/model_tls_certificate_blob_response.go create mode 100644 fastly/model_update_dashboard_request.go diff --git a/CHANGELOG.md b/CHANGELOG.md index c18695e8..de87077a 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,15 @@ # Changelog +## [v1.0.0-beta.32](https://github.com/fastly/fastly-go/releases/tag/release/v1.0.0-beta.32) (2024-08-04) + +**Enhancements:** + +- feat(observability): Adds new Observability Custom Dashboards API +- feat(billing-invoices): Adds month-to-date invoice information +- feat(billing-usage-metrics): Adds information on service-level usage. +- feat(tls): Adds an endpoint to get a TLS certificate blob (Limited Availability) +- feat(stats): Add `origin_offload` metric + ## [v1.0.0-beta.31](https://github.com/fastly/fastly-go/releases/tag/v1.0.0-beta.31) (2024-07-01) **Bug fixes:** diff --git a/README.md b/README.md index 1d8e4c09..d8b2dfb1 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 1.0.0-beta.31 + github.com/fastly/fastly-go 1.0.0-beta.32 ) ``` @@ -103,7 +103,10 @@ Class | Method | Description *BillingAddressAPI* | [**GetBillingAddr**](docs/BillingAddressAPI.md#getbillingaddr) | Get a billing address *BillingAddressAPI* | [**UpdateBillingAddr**](docs/BillingAddressAPI.md#updatebillingaddr) | Update a billing address *BillingInvoicesAPI* | [**GetInvoiceByInvoiceID**](docs/BillingInvoicesAPI.md#getinvoicebyinvoiceid) | Get invoice by ID. +*BillingInvoicesAPI* | [**GetMonthToDateInvoice**](docs/BillingInvoicesAPI.md#getmonthtodateinvoice) | Get month-to-date invoice. *BillingInvoicesAPI* | [**ListInvoices**](docs/BillingInvoicesAPI.md#listinvoices) | List of invoices. +*BillingUsageMetricsAPI* | [**GetServiceLevelUsage**](docs/BillingUsageMetricsAPI.md#getservicelevelusage) | Retrieve service-level usage metrics for a product. +*BillingUsageMetricsAPI* | [**GetServiceLevelUsageTypes**](docs/BillingUsageMetricsAPI.md#getservicelevelusagetypes) | Retrieve product usage types for a customer. *CacheSettingsAPI* | [**CreateCacheSettings**](docs/CacheSettingsAPI.md#createcachesettings) | Create a cache settings object *CacheSettingsAPI* | [**DeleteCacheSettings**](docs/CacheSettingsAPI.md#deletecachesettings) | Delete a cache settings object *CacheSettingsAPI* | [**GetCacheSettings**](docs/CacheSettingsAPI.md#getcachesettings) | Get a cache settings object @@ -415,6 +418,11 @@ Class | Method | Description *MutualAuthenticationAPI* | [**GetMutualAuthentication**](docs/MutualAuthenticationAPI.md#getmutualauthentication) | Get a Mutual Authentication *MutualAuthenticationAPI* | [**ListMutualAuthentications**](docs/MutualAuthenticationAPI.md#listmutualauthentications) | List Mutual Authentications *MutualAuthenticationAPI* | [**PatchMutualAuthentication**](docs/MutualAuthenticationAPI.md#patchmutualauthentication) | Update a Mutual Authentication +*ObservabilityCustomDashboardsAPI* | [**CreateDashboard**](docs/ObservabilityCustomDashboardsAPI.md#createdashboard) | Create a new dashboard +*ObservabilityCustomDashboardsAPI* | [**DeleteDashboard**](docs/ObservabilityCustomDashboardsAPI.md#deletedashboard) | Delete an existing dashboard +*ObservabilityCustomDashboardsAPI* | [**GetDashboard**](docs/ObservabilityCustomDashboardsAPI.md#getdashboard) | Retrieve a dashboard by ID +*ObservabilityCustomDashboardsAPI* | [**ListDashboards**](docs/ObservabilityCustomDashboardsAPI.md#listdashboards) | List all custom dashboards +*ObservabilityCustomDashboardsAPI* | [**UpdateDashboard**](docs/ObservabilityCustomDashboardsAPI.md#updatedashboard) | Update an existing dashboard *OriginInspectorHistoricalAPI* | [**GetOriginInspectorHistorical**](docs/OriginInspectorHistoricalAPI.md#getorigininspectorhistorical) | Get historical origin data for a service *OriginInspectorRealtimeAPI* | [**GetOriginInspectorLast120Seconds**](docs/OriginInspectorRealtimeAPI.md#getorigininspectorlast120seconds) | Get real-time origin data for the last 120 seconds *OriginInspectorRealtimeAPI* | [**GetOriginInspectorLastMaxEntries**](docs/OriginInspectorRealtimeAPI.md#getorigininspectorlastmaxentries) | Get a limited number of real-time origin data entries @@ -516,6 +524,7 @@ Class | Method | Description *TLSCertificatesAPI* | [**CreateTLSCert**](docs/TlsCertificatesAPI.md#createtlscert) | Create a TLS certificate *TLSCertificatesAPI* | [**DeleteTLSCert**](docs/TlsCertificatesAPI.md#deletetlscert) | Delete a TLS certificate *TLSCertificatesAPI* | [**GetTLSCert**](docs/TlsCertificatesAPI.md#gettlscert) | Get a TLS certificate +*TLSCertificatesAPI* | [**GetTLSCertBlob**](docs/TlsCertificatesAPI.md#gettlscertblob) | Get a TLS certificate blob (Limited Availability) *TLSCertificatesAPI* | [**ListTLSCerts**](docs/TlsCertificatesAPI.md#listtlscerts) | List TLS certificates *TLSCertificatesAPI* | [**UpdateTLSCert**](docs/TlsCertificatesAPI.md#updatetlscert) | Update a TLS certificate *TLSConfigurationsAPI* | [**GetTLSConfig**](docs/TlsConfigurationsAPI.md#gettlsconfig) | Get a TLS configuration @@ -629,6 +638,8 @@ The fastly-go API client currently does not support the following endpoints: - [`/alerts/definitions/{definition_id}`](https://www.fastly.com/documentation/reference/api/observability/alerts/definitions) (DELETE, GET, PUT) - [`/alerts/definitions`](https://www.fastly.com/documentation/reference/api/observability/alerts/definitions) (GET, POST) - [`/alerts/history`](https://www.fastly.com/documentation/reference/api/observability/alerts/history) (GET) +- [`/dns/configurations/{dns_configuration_id}`](https://www.fastly.com/documentation/reference/api/) (DELETE, GET, PATCH) +- [`/dns/configurations`](https://www.fastly.com/documentation/reference/api/) (GET, POST) - [`/notifications/integration-types`](https://developer.fastly.com/reference/api/observability/notification) (GET) - [`/notifications/integrations/{integration_id}/rotateSigningKey`](https://developer.fastly.com/reference/api/observability/notification) (POST) - [`/notifications/integrations/{integration_id}/signingKey`](https://developer.fastly.com/reference/api/observability/notification) (GET) @@ -638,7 +649,9 @@ 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/configurations/{tls_configuration_id}`](https://www.fastly.com/documentation/reference/api/) (DELETE, GET, PATCH) +- [`/tls/configurations`](https://www.fastly.com/documentation/reference/api/) (GET, POST) +- [`/tls/preview/domains/{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) diff --git a/docs/AsyncResponse.md b/docs/AsyncResponse.md new file mode 100644 index 00000000..9335a912 --- /dev/null +++ b/docs/AsyncResponse.md @@ -0,0 +1,80 @@ +# AsyncResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Title** | Pointer to **string** | | [optional] +**Status** | Pointer to **string** | | [optional] + +## Methods + +### NewAsyncResponse + +`func NewAsyncResponse() *AsyncResponse` + +NewAsyncResponse instantiates a new AsyncResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewAsyncResponseWithDefaults + +`func NewAsyncResponseWithDefaults() *AsyncResponse` + +NewAsyncResponseWithDefaults instantiates a new AsyncResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetTitle + +`func (o *AsyncResponse) GetTitle() string` + +GetTitle returns the Title field if non-nil, zero value otherwise. + +### GetTitleOk + +`func (o *AsyncResponse) GetTitleOk() (*string, bool)` + +GetTitleOk returns a tuple with the Title field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTitle + +`func (o *AsyncResponse) SetTitle(v string)` + +SetTitle sets Title field to given value. + +### HasTitle + +`func (o *AsyncResponse) HasTitle() bool` + +HasTitle returns a boolean if a field has been set. + +### GetStatus + +`func (o *AsyncResponse) GetStatus() string` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *AsyncResponse) 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 *AsyncResponse) SetStatus(v string)` + +SetStatus sets Status field to given value. + +### HasStatus + +`func (o *AsyncResponse) HasStatus() bool` + +HasStatus 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/BillingInvoicesAPI.md b/docs/BillingInvoicesAPI.md index 98487d4d..150a43cb 100644 --- a/docs/BillingInvoicesAPI.md +++ b/docs/BillingInvoicesAPI.md @@ -6,6 +6,7 @@ Method | HTTP request | Description ------------- | ------------- | ------------- [**GetInvoiceByInvoiceID**](BillingInvoicesAPI.md#GetInvoiceByInvoiceID) | **GET** `/billing/v3/invoices/{invoice_id}` | Get invoice by ID. +[**GetMonthToDateInvoice**](BillingInvoicesAPI.md#GetMonthToDateInvoice) | **GET** `/billing/v3/invoices/month-to-date` | Get month-to-date invoice. [**ListInvoices**](BillingInvoicesAPI.md#ListInvoices) | **GET** `/billing/v3/invoices` | List of invoices. @@ -39,7 +40,7 @@ func main() { fmt.Fprintf(os.Stderr, "Error when calling `BillingInvoicesAPI.GetInvoiceByInvoiceID`: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } - // response from `GetInvoiceByInvoiceID`: InvoiceResponse + // response from `GetInvoiceByInvoiceID`: EomInvoiceResponse fmt.Fprintf(os.Stdout, "Response from `BillingInvoicesAPI.GetInvoiceByInvoiceID`: %v\n", resp) } ``` @@ -63,7 +64,66 @@ Name | Type | Description | Notes ### Return type -[**InvoiceResponse**](InvoiceResponse.md) +[**EomInvoiceResponse**](EomInvoiceResponse.md) + +### Authorization + +[API Token](https://www.fastly.com/documentation/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) + + +## GetMonthToDateInvoice + +Get month-to-date invoice. + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + "github.com/fastly/fastly-go/fastly" +) + +func main() { + + cfg := fastly.NewConfiguration() + apiClient := fastly.NewAPIClient(cfg) + ctx := fastly.NewAPIKeyContextFromEnv("FASTLY_API_TOKEN") + resp, r, err := apiClient.BillingInvoicesAPI.GetMonthToDateInvoice(ctx).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `BillingInvoicesAPI.GetMonthToDateInvoice`: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetMonthToDateInvoice`: MtdInvoiceResponse + fmt.Fprintf(os.Stdout, "Response from `BillingInvoicesAPI.GetMonthToDateInvoice`: %v\n", resp) +} +``` + +### Path Parameters + +This endpoint does not need any parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetMonthToDateInvoiceRequest struct via the builder pattern + + + +### Return type + +[**MtdInvoiceResponse**](MtdInvoiceResponse.md) ### Authorization @@ -109,7 +169,7 @@ func main() { fmt.Fprintf(os.Stderr, "Error when calling `BillingInvoicesAPI.ListInvoices`: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } - // response from `ListInvoices`: ListInvoicesResponse + // response from `ListInvoices`: ListEomInvoicesResponse fmt.Fprintf(os.Stdout, "Response from `BillingInvoicesAPI.ListInvoices`: %v\n", resp) } ``` @@ -129,7 +189,7 @@ Name | Type | Description | Notes ### Return type -[**ListInvoicesResponse**](ListInvoicesResponse.md) +[**ListEomInvoicesResponse**](ListEomInvoicesResponse.md) ### Authorization diff --git a/docs/BillingUsageMetricsAPI.md b/docs/BillingUsageMetricsAPI.md new file mode 100644 index 00000000..3f074fe1 --- /dev/null +++ b/docs/BillingUsageMetricsAPI.md @@ -0,0 +1,153 @@ +# BillingUsageMetricsAPI + +> [!NOTE] +> All URIs are relative to `https://api.fastly.com` + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetServiceLevelUsage**](BillingUsageMetricsAPI.md#GetServiceLevelUsage) | **GET** `/billing/v2/account_customers/{customer_id}/service-usage-metrics` | Retrieve service-level usage metrics for a product. +[**GetServiceLevelUsageTypes**](BillingUsageMetricsAPI.md#GetServiceLevelUsageTypes) | **GET** `/billing/v2/account_customers/{customer_id}/service-usage-types` | Retrieve product usage types for a customer. + + + +## GetServiceLevelUsage + +Retrieve service-level usage metrics for a product. + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + "github.com/fastly/fastly-go/fastly" +) + +func main() { + customerID := "customerId_example" // string | Alphanumeric string identifying the customer. + productID := "productId_example" // string | The product identifier for the metrics returned (e.g., `cdn_usage`). This field is not required for CSV requests. + usageTypeName := "usageTypeName_example" // string | The usage type name for the metrics returned (e.g., `North America Requests`). This field is not required for CSV requests. + timeGranularity := "timeGranularity_example" // string | + startDate := "2023-01-01" // string | (optional) + endDate := "2023-01-31" // string | (optional) + startMonth := "2023-01" // string | (optional) + endMonth := "2023-03" // string | (optional) + limit := "limit_example" // string | Number of results per page. The maximum is 100. (optional) (default to "5") + 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) + + cfg := fastly.NewConfiguration() + apiClient := fastly.NewAPIClient(cfg) + ctx := fastly.NewAPIKeyContextFromEnv("FASTLY_API_TOKEN") + resp, r, err := apiClient.BillingUsageMetricsAPI.GetServiceLevelUsage(ctx, customerID).ProductID(productID).UsageTypeName(usageTypeName).TimeGranularity(timeGranularity).StartDate(startDate).EndDate(endDate).StartMonth(startMonth).EndMonth(endMonth).Limit(limit).Cursor(cursor).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `BillingUsageMetricsAPI.GetServiceLevelUsage`: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetServiceLevelUsage`: Serviceusagemetrics + fmt.Fprintf(os.Stdout, "Response from `BillingUsageMetricsAPI.GetServiceLevelUsage`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**customerID** | **string** | Alphanumeric string identifying the customer. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetServiceLevelUsageRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **productID** | **string** | The product identifier for the metrics returned (e.g., `cdn_usage`). This field is not required for CSV requests. | **usageTypeName** | **string** | The usage type name for the metrics returned (e.g., `North America Requests`). This field is not required for CSV requests. | **timeGranularity** | **string** | | **startDate** | **string** | | **endDate** | **string** | | **startMonth** | **string** | | **endMonth** | **string** | | **limit** | **string** | Number of results per page. The maximum is 100. | [default to "5"] **cursor** | **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. | + +### Return type + +[**Serviceusagemetrics**](Serviceusagemetrics.md) + +### Authorization + +[API Token](https://www.fastly.com/documentation/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) + + +## GetServiceLevelUsageTypes + +Retrieve product usage types for a customer. + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + "github.com/fastly/fastly-go/fastly" +) + +func main() { + customerID := "customerId_example" // string | Alphanumeric string identifying the customer. + + cfg := fastly.NewConfiguration() + apiClient := fastly.NewAPIClient(cfg) + ctx := fastly.NewAPIKeyContextFromEnv("FASTLY_API_TOKEN") + resp, r, err := apiClient.BillingUsageMetricsAPI.GetServiceLevelUsageTypes(ctx, customerID).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `BillingUsageMetricsAPI.GetServiceLevelUsageTypes`: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetServiceLevelUsageTypes`: Serviceusagetypes + fmt.Fprintf(os.Stdout, "Response from `BillingUsageMetricsAPI.GetServiceLevelUsageTypes`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**customerID** | **string** | Alphanumeric string identifying the customer. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetServiceLevelUsageTypesRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**Serviceusagetypes**](Serviceusagetypes.md) + +### Authorization + +[API Token](https://www.fastly.com/documentation/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/docs/CreateDashboardRequest.md b/docs/CreateDashboardRequest.md new file mode 100644 index 00000000..fd263472 --- /dev/null +++ b/docs/CreateDashboardRequest.md @@ -0,0 +1,111 @@ +# CreateDashboardRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | A human-readable name | +**Description** | Pointer to **string** | A short description of the dashboard | [optional] +**Items** | Pointer to [**[]DashboardItem**](DashboardItem.md) | A list of [dashboard items](#dashboard-item). | [optional] + +## Methods + +### NewCreateDashboardRequest + +`func NewCreateDashboardRequest(name string, ) *CreateDashboardRequest` + +NewCreateDashboardRequest instantiates a new CreateDashboardRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCreateDashboardRequestWithDefaults + +`func NewCreateDashboardRequestWithDefaults() *CreateDashboardRequest` + +NewCreateDashboardRequestWithDefaults instantiates a new CreateDashboardRequest object +This 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 *CreateDashboardRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *CreateDashboardRequest) 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 *CreateDashboardRequest) SetName(v string)` + +SetName sets Name field to given value. + + +### GetDescription + +`func (o *CreateDashboardRequest) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *CreateDashboardRequest) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *CreateDashboardRequest) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *CreateDashboardRequest) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetItems + +`func (o *CreateDashboardRequest) GetItems() []DashboardItem` + +GetItems returns the Items field if non-nil, zero value otherwise. + +### GetItemsOk + +`func (o *CreateDashboardRequest) GetItemsOk() (*[]DashboardItem, bool)` + +GetItemsOk returns a tuple with the Items field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetItems + +`func (o *CreateDashboardRequest) SetItems(v []DashboardItem)` + +SetItems sets Items field to given value. + +### HasItems + +`func (o *CreateDashboardRequest) HasItems() bool` + +HasItems returns a boolean if a field has been set. + +### SetItemsNil + +`func (o *CreateDashboardRequest) SetItemsNil(b bool)` + + SetItemsNil sets the value for Items to be an explicit nil + +### UnsetItems +`func (o *CreateDashboardRequest) UnsetItems()` + +UnsetItems ensures that no value is present for Items, not even an explicit nil + +[Back to API list](../README.md#documentation-for-api-endpoints) | [Back to README](../README.md) diff --git a/docs/Dashboard.md b/docs/Dashboard.md new file mode 100644 index 00000000..a58ee492 --- /dev/null +++ b/docs/Dashboard.md @@ -0,0 +1,266 @@ +# Dashboard + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ID** | Pointer to **string** | Dashboard identifier (UUID) | [optional] [readonly] +**Name** | Pointer to **string** | A human-readable name | [optional] +**Description** | Pointer to **string** | A short description of the dashboard | [optional] +**Items** | Pointer to [**[]DashboardItem**](DashboardItem.md) | A list of [dashboard items](#dashboard-item). | [optional] +**CreatedAt** | 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] +**CreatedBy** | Pointer to [**DashboardPropertyCreatedBy**](DashboardPropertyCreatedBy.md) | | [optional] +**UpdatedBy** | Pointer to [**DashboardPropertyUpdatedBy**](DashboardPropertyUpdatedBy.md) | | [optional] + +## Methods + +### NewDashboard + +`func NewDashboard() *Dashboard` + +NewDashboard instantiates a new Dashboard object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDashboardWithDefaults + +`func NewDashboardWithDefaults() *Dashboard` + +NewDashboardWithDefaults instantiates a new Dashboard object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetID + +`func (o *Dashboard) GetID() string` + +GetID returns the ID field if non-nil, zero value otherwise. + +### GetIDOk + +`func (o *Dashboard) 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 *Dashboard) SetID(v string)` + +SetID sets ID field to given value. + +### HasID + +`func (o *Dashboard) HasID() bool` + +HasID returns a boolean if a field has been set. + +### GetName + +`func (o *Dashboard) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *Dashboard) 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 *Dashboard) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *Dashboard) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetDescription + +`func (o *Dashboard) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *Dashboard) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *Dashboard) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *Dashboard) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetItems + +`func (o *Dashboard) GetItems() []DashboardItem` + +GetItems returns the Items field if non-nil, zero value otherwise. + +### GetItemsOk + +`func (o *Dashboard) GetItemsOk() (*[]DashboardItem, bool)` + +GetItemsOk returns a tuple with the Items field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetItems + +`func (o *Dashboard) SetItems(v []DashboardItem)` + +SetItems sets Items field to given value. + +### HasItems + +`func (o *Dashboard) HasItems() bool` + +HasItems returns a boolean if a field has been set. + +### SetItemsNil + +`func (o *Dashboard) SetItemsNil(b bool)` + + SetItemsNil sets the value for Items to be an explicit nil + +### UnsetItems +`func (o *Dashboard) UnsetItems()` + +UnsetItems ensures that no value is present for Items, not even an explicit nil +### GetCreatedAt + +`func (o *Dashboard) GetCreatedAt() time.Time` + +GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. + +### GetCreatedAtOk + +`func (o *Dashboard) 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 *Dashboard) SetCreatedAt(v time.Time)` + +SetCreatedAt sets CreatedAt field to given value. + +### HasCreatedAt + +`func (o *Dashboard) HasCreatedAt() bool` + +HasCreatedAt returns a boolean if a field has been set. + +### SetCreatedAtNil + +`func (o *Dashboard) SetCreatedAtNil(b bool)` + + SetCreatedAtNil sets the value for CreatedAt to be an explicit nil + +### UnsetCreatedAt +`func (o *Dashboard) UnsetCreatedAt()` + +UnsetCreatedAt ensures that no value is present for CreatedAt, not even an explicit nil +### GetUpdatedAt + +`func (o *Dashboard) GetUpdatedAt() time.Time` + +GetUpdatedAt returns the UpdatedAt field if non-nil, zero value otherwise. + +### GetUpdatedAtOk + +`func (o *Dashboard) 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 *Dashboard) SetUpdatedAt(v time.Time)` + +SetUpdatedAt sets UpdatedAt field to given value. + +### HasUpdatedAt + +`func (o *Dashboard) HasUpdatedAt() bool` + +HasUpdatedAt returns a boolean if a field has been set. + +### SetUpdatedAtNil + +`func (o *Dashboard) SetUpdatedAtNil(b bool)` + + SetUpdatedAtNil sets the value for UpdatedAt to be an explicit nil + +### UnsetUpdatedAt +`func (o *Dashboard) UnsetUpdatedAt()` + +UnsetUpdatedAt ensures that no value is present for UpdatedAt, not even an explicit nil +### GetCreatedBy + +`func (o *Dashboard) GetCreatedBy() DashboardPropertyCreatedBy` + +GetCreatedBy returns the CreatedBy field if non-nil, zero value otherwise. + +### GetCreatedByOk + +`func (o *Dashboard) GetCreatedByOk() (*DashboardPropertyCreatedBy, bool)` + +GetCreatedByOk returns a tuple with the CreatedBy field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedBy + +`func (o *Dashboard) SetCreatedBy(v DashboardPropertyCreatedBy)` + +SetCreatedBy sets CreatedBy field to given value. + +### HasCreatedBy + +`func (o *Dashboard) HasCreatedBy() bool` + +HasCreatedBy returns a boolean if a field has been set. + +### GetUpdatedBy + +`func (o *Dashboard) GetUpdatedBy() DashboardPropertyUpdatedBy` + +GetUpdatedBy returns the UpdatedBy field if non-nil, zero value otherwise. + +### GetUpdatedByOk + +`func (o *Dashboard) GetUpdatedByOk() (*DashboardPropertyUpdatedBy, bool)` + +GetUpdatedByOk returns a tuple with the UpdatedBy field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpdatedBy + +`func (o *Dashboard) SetUpdatedBy(v DashboardPropertyUpdatedBy)` + +SetUpdatedBy sets UpdatedBy field to given value. + +### HasUpdatedBy + +`func (o *Dashboard) HasUpdatedBy() bool` + +HasUpdatedBy 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/DashboardItem.md b/docs/DashboardItem.md new file mode 100644 index 00000000..a516e07f --- /dev/null +++ b/docs/DashboardItem.md @@ -0,0 +1,164 @@ +# DashboardItem + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ID** | Pointer to **string** | Dashboard item identifier (UUID) | [optional] [readonly] +**Title** | **string** | A human-readable title for the dashboard item | +**Subtitle** | **string** | A human-readable subtitle for the dashboard item. Often a description of the visualization. | +**DataSource** | [**DashboardItemPropertyDataSource**](DashboardItemPropertyDataSource.md) | | +**Visualization** | [**DashboardItemPropertyVisualization**](DashboardItemPropertyVisualization.md) | | +**Span** | Pointer to **int32** | The number of columns for the dashboard item to span. Dashboards are rendered on a 12-column grid on \"desktop\" screen sizes. | [optional] [default to 4] + +## Methods + +### NewDashboardItem + +`func NewDashboardItem(title string, subtitle string, dataSource DashboardItemPropertyDataSource, visualization DashboardItemPropertyVisualization, ) *DashboardItem` + +NewDashboardItem instantiates a new DashboardItem object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDashboardItemWithDefaults + +`func NewDashboardItemWithDefaults() *DashboardItem` + +NewDashboardItemWithDefaults instantiates a new DashboardItem object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetID + +`func (o *DashboardItem) GetID() string` + +GetID returns the ID field if non-nil, zero value otherwise. + +### GetIDOk + +`func (o *DashboardItem) 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 *DashboardItem) SetID(v string)` + +SetID sets ID field to given value. + +### HasID + +`func (o *DashboardItem) HasID() bool` + +HasID returns a boolean if a field has been set. + +### GetTitle + +`func (o *DashboardItem) GetTitle() string` + +GetTitle returns the Title field if non-nil, zero value otherwise. + +### GetTitleOk + +`func (o *DashboardItem) GetTitleOk() (*string, bool)` + +GetTitleOk returns a tuple with the Title field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTitle + +`func (o *DashboardItem) SetTitle(v string)` + +SetTitle sets Title field to given value. + + +### GetSubtitle + +`func (o *DashboardItem) GetSubtitle() string` + +GetSubtitle returns the Subtitle field if non-nil, zero value otherwise. + +### GetSubtitleOk + +`func (o *DashboardItem) GetSubtitleOk() (*string, bool)` + +GetSubtitleOk returns a tuple with the Subtitle field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSubtitle + +`func (o *DashboardItem) SetSubtitle(v string)` + +SetSubtitle sets Subtitle field to given value. + + +### GetDataSource + +`func (o *DashboardItem) GetDataSource() DashboardItemPropertyDataSource` + +GetDataSource returns the DataSource field if non-nil, zero value otherwise. + +### GetDataSourceOk + +`func (o *DashboardItem) GetDataSourceOk() (*DashboardItemPropertyDataSource, bool)` + +GetDataSourceOk returns a tuple with the DataSource field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDataSource + +`func (o *DashboardItem) SetDataSource(v DashboardItemPropertyDataSource)` + +SetDataSource sets DataSource field to given value. + + +### GetVisualization + +`func (o *DashboardItem) GetVisualization() DashboardItemPropertyVisualization` + +GetVisualization returns the Visualization field if non-nil, zero value otherwise. + +### GetVisualizationOk + +`func (o *DashboardItem) GetVisualizationOk() (*DashboardItemPropertyVisualization, bool)` + +GetVisualizationOk returns a tuple with the Visualization field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVisualization + +`func (o *DashboardItem) SetVisualization(v DashboardItemPropertyVisualization)` + +SetVisualization sets Visualization field to given value. + + +### GetSpan + +`func (o *DashboardItem) GetSpan() int32` + +GetSpan returns the Span field if non-nil, zero value otherwise. + +### GetSpanOk + +`func (o *DashboardItem) GetSpanOk() (*int32, bool)` + +GetSpanOk returns a tuple with the Span field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSpan + +`func (o *DashboardItem) SetSpan(v int32)` + +SetSpan sets Span field to given value. + +### HasSpan + +`func (o *DashboardItem) HasSpan() bool` + +HasSpan 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/DashboardItemPropertyDataSource.md b/docs/DashboardItemPropertyDataSource.md new file mode 100644 index 00000000..0138042c --- /dev/null +++ b/docs/DashboardItemPropertyDataSource.md @@ -0,0 +1,70 @@ +# DashboardItemPropertyDataSource + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | The source of the data to display. | +**Config** | [**DashboardItemPropertyDataSourcePropertyConfig**](DashboardItemPropertyDataSourcePropertyConfig.md) | | + +## Methods + +### NewDashboardItemPropertyDataSource + +`func NewDashboardItemPropertyDataSource(resourceType string, config DashboardItemPropertyDataSourcePropertyConfig, ) *DashboardItemPropertyDataSource` + +NewDashboardItemPropertyDataSource instantiates a new DashboardItemPropertyDataSource object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDashboardItemPropertyDataSourceWithDefaults + +`func NewDashboardItemPropertyDataSourceWithDefaults() *DashboardItemPropertyDataSource` + +NewDashboardItemPropertyDataSourceWithDefaults instantiates a new DashboardItemPropertyDataSource object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *DashboardItemPropertyDataSource) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *DashboardItemPropertyDataSource) 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 *DashboardItemPropertyDataSource) SetType(v string)` + +SetType sets Type field to given value. + + +### GetConfig + +`func (o *DashboardItemPropertyDataSource) GetConfig() DashboardItemPropertyDataSourcePropertyConfig` + +GetConfig returns the Config field if non-nil, zero value otherwise. + +### GetConfigOk + +`func (o *DashboardItemPropertyDataSource) GetConfigOk() (*DashboardItemPropertyDataSourcePropertyConfig, bool)` + +GetConfigOk returns a tuple with the Config field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConfig + +`func (o *DashboardItemPropertyDataSource) SetConfig(v DashboardItemPropertyDataSourcePropertyConfig)` + +SetConfig sets Config field to given value. + + + +[Back to API list](../README.md#documentation-for-api-endpoints) | [Back to README](../README.md) diff --git a/docs/DashboardItemPropertyDataSourcePropertyConfig.md b/docs/DashboardItemPropertyDataSourcePropertyConfig.md new file mode 100644 index 00000000..54a2dbb7 --- /dev/null +++ b/docs/DashboardItemPropertyDataSourcePropertyConfig.md @@ -0,0 +1,49 @@ +# DashboardItemPropertyDataSourcePropertyConfig + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Metrics** | **[]string** | The metrics to visualize. Valid options are defined by the selected [data source](#field_data_source). | + +## Methods + +### NewDashboardItemPropertyDataSourcePropertyConfig + +`func NewDashboardItemPropertyDataSourcePropertyConfig(metrics []string, ) *DashboardItemPropertyDataSourcePropertyConfig` + +NewDashboardItemPropertyDataSourcePropertyConfig instantiates a new DashboardItemPropertyDataSourcePropertyConfig object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDashboardItemPropertyDataSourcePropertyConfigWithDefaults + +`func NewDashboardItemPropertyDataSourcePropertyConfigWithDefaults() *DashboardItemPropertyDataSourcePropertyConfig` + +NewDashboardItemPropertyDataSourcePropertyConfigWithDefaults instantiates a new DashboardItemPropertyDataSourcePropertyConfig object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetMetrics + +`func (o *DashboardItemPropertyDataSourcePropertyConfig) GetMetrics() []string` + +GetMetrics returns the Metrics field if non-nil, zero value otherwise. + +### GetMetricsOk + +`func (o *DashboardItemPropertyDataSourcePropertyConfig) GetMetricsOk() (*[]string, bool)` + +GetMetricsOk returns a tuple with the Metrics field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMetrics + +`func (o *DashboardItemPropertyDataSourcePropertyConfig) SetMetrics(v []string)` + +SetMetrics sets Metrics field to given value. + + + +[Back to API list](../README.md#documentation-for-api-endpoints) | [Back to README](../README.md) diff --git a/docs/DashboardItemPropertyVisualization.md b/docs/DashboardItemPropertyVisualization.md new file mode 100644 index 00000000..d4fcc234 --- /dev/null +++ b/docs/DashboardItemPropertyVisualization.md @@ -0,0 +1,70 @@ +# DashboardItemPropertyVisualization + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | The type of visualization to display. | +**Config** | [**DashboardItemPropertyVisualizationPropertyConfig**](DashboardItemPropertyVisualizationPropertyConfig.md) | | + +## Methods + +### NewDashboardItemPropertyVisualization + +`func NewDashboardItemPropertyVisualization(resourceType string, config DashboardItemPropertyVisualizationPropertyConfig, ) *DashboardItemPropertyVisualization` + +NewDashboardItemPropertyVisualization instantiates a new DashboardItemPropertyVisualization object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDashboardItemPropertyVisualizationWithDefaults + +`func NewDashboardItemPropertyVisualizationWithDefaults() *DashboardItemPropertyVisualization` + +NewDashboardItemPropertyVisualizationWithDefaults instantiates a new DashboardItemPropertyVisualization object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *DashboardItemPropertyVisualization) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *DashboardItemPropertyVisualization) 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 *DashboardItemPropertyVisualization) SetType(v string)` + +SetType sets Type field to given value. + + +### GetConfig + +`func (o *DashboardItemPropertyVisualization) GetConfig() DashboardItemPropertyVisualizationPropertyConfig` + +GetConfig returns the Config field if non-nil, zero value otherwise. + +### GetConfigOk + +`func (o *DashboardItemPropertyVisualization) GetConfigOk() (*DashboardItemPropertyVisualizationPropertyConfig, bool)` + +GetConfigOk returns a tuple with the Config field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConfig + +`func (o *DashboardItemPropertyVisualization) SetConfig(v DashboardItemPropertyVisualizationPropertyConfig)` + +SetConfig sets Config field to given value. + + + +[Back to API list](../README.md#documentation-for-api-endpoints) | [Back to README](../README.md) diff --git a/docs/DashboardItemPropertyVisualizationPropertyConfig.md b/docs/DashboardItemPropertyVisualizationPropertyConfig.md new file mode 100644 index 00000000..65fbb9b8 --- /dev/null +++ b/docs/DashboardItemPropertyVisualizationPropertyConfig.md @@ -0,0 +1,101 @@ +# DashboardItemPropertyVisualizationPropertyConfig + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**PlotType** | **string** | The type of chart to display. | +**Format** | Pointer to **string** | (Optional) The units to use to format the data. | [optional] [default to "number"] +**CalculationMethod** | Pointer to **string** | (Optional) The aggregation function to apply to the dataset. | [optional] + +## Methods + +### NewDashboardItemPropertyVisualizationPropertyConfig + +`func NewDashboardItemPropertyVisualizationPropertyConfig(plotType string, ) *DashboardItemPropertyVisualizationPropertyConfig` + +NewDashboardItemPropertyVisualizationPropertyConfig instantiates a new DashboardItemPropertyVisualizationPropertyConfig object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDashboardItemPropertyVisualizationPropertyConfigWithDefaults + +`func NewDashboardItemPropertyVisualizationPropertyConfigWithDefaults() *DashboardItemPropertyVisualizationPropertyConfig` + +NewDashboardItemPropertyVisualizationPropertyConfigWithDefaults instantiates a new DashboardItemPropertyVisualizationPropertyConfig object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetPlotType + +`func (o *DashboardItemPropertyVisualizationPropertyConfig) GetPlotType() string` + +GetPlotType returns the PlotType field if non-nil, zero value otherwise. + +### GetPlotTypeOk + +`func (o *DashboardItemPropertyVisualizationPropertyConfig) GetPlotTypeOk() (*string, bool)` + +GetPlotTypeOk returns a tuple with the PlotType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPlotType + +`func (o *DashboardItemPropertyVisualizationPropertyConfig) SetPlotType(v string)` + +SetPlotType sets PlotType field to given value. + + +### GetFormat + +`func (o *DashboardItemPropertyVisualizationPropertyConfig) GetFormat() string` + +GetFormat returns the Format field if non-nil, zero value otherwise. + +### GetFormatOk + +`func (o *DashboardItemPropertyVisualizationPropertyConfig) GetFormatOk() (*string, bool)` + +GetFormatOk returns a tuple with the Format field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFormat + +`func (o *DashboardItemPropertyVisualizationPropertyConfig) SetFormat(v string)` + +SetFormat sets Format field to given value. + +### HasFormat + +`func (o *DashboardItemPropertyVisualizationPropertyConfig) HasFormat() bool` + +HasFormat returns a boolean if a field has been set. + +### GetCalculationMethod + +`func (o *DashboardItemPropertyVisualizationPropertyConfig) GetCalculationMethod() string` + +GetCalculationMethod returns the CalculationMethod field if non-nil, zero value otherwise. + +### GetCalculationMethodOk + +`func (o *DashboardItemPropertyVisualizationPropertyConfig) GetCalculationMethodOk() (*string, bool)` + +GetCalculationMethodOk returns a tuple with the CalculationMethod field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCalculationMethod + +`func (o *DashboardItemPropertyVisualizationPropertyConfig) SetCalculationMethod(v string)` + +SetCalculationMethod sets CalculationMethod field to given value. + +### HasCalculationMethod + +`func (o *DashboardItemPropertyVisualizationPropertyConfig) HasCalculationMethod() bool` + +HasCalculationMethod 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/DashboardPropertyCreatedBy.md b/docs/DashboardPropertyCreatedBy.md new file mode 100644 index 00000000..b3d64e90 --- /dev/null +++ b/docs/DashboardPropertyCreatedBy.md @@ -0,0 +1,28 @@ +# DashboardPropertyCreatedBy + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Methods + +### NewDashboardPropertyCreatedBy + +`func NewDashboardPropertyCreatedBy() *DashboardPropertyCreatedBy` + +NewDashboardPropertyCreatedBy instantiates a new DashboardPropertyCreatedBy object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDashboardPropertyCreatedByWithDefaults + +`func NewDashboardPropertyCreatedByWithDefaults() *DashboardPropertyCreatedBy` + +NewDashboardPropertyCreatedByWithDefaults instantiates a new DashboardPropertyCreatedBy object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + + +[Back to API list](../README.md#documentation-for-api-endpoints) | [Back to README](../README.md) diff --git a/docs/DashboardPropertyUpdatedBy.md b/docs/DashboardPropertyUpdatedBy.md new file mode 100644 index 00000000..a8ad0c24 --- /dev/null +++ b/docs/DashboardPropertyUpdatedBy.md @@ -0,0 +1,28 @@ +# DashboardPropertyUpdatedBy + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Methods + +### NewDashboardPropertyUpdatedBy + +`func NewDashboardPropertyUpdatedBy() *DashboardPropertyUpdatedBy` + +NewDashboardPropertyUpdatedBy instantiates a new DashboardPropertyUpdatedBy object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDashboardPropertyUpdatedByWithDefaults + +`func NewDashboardPropertyUpdatedByWithDefaults() *DashboardPropertyUpdatedBy` + +NewDashboardPropertyUpdatedByWithDefaults instantiates a new DashboardPropertyUpdatedBy object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + + +[Back to API list](../README.md#documentation-for-api-endpoints) | [Back to README](../README.md) diff --git a/docs/DomainInspectorMeasurements.md b/docs/DomainInspectorMeasurements.md index 811832f5..c44b8bde 100644 --- a/docs/DomainInspectorMeasurements.md +++ b/docs/DomainInspectorMeasurements.md @@ -42,7 +42,7 @@ Name | Type | Description | Notes **OriginFetchRespBodyBytes** | Pointer to **int32** | Total body bytes received from origin. | [optional] **Bandwidth** | Pointer to **int32** | Total bytes delivered (`resp_header_bytes` + `resp_body_bytes` + `bereq_header_bytes` + `bereq_body_bytes`). | [optional] **EdgeHitRatio** | Pointer to **float32** | Ratio of cache hits to cache misses at the edge, between 0 and 1 (`edge_hit_requests` / (`edge_hit_requests` + `edge_miss_requests`)). | [optional] -**OriginOffload** | Pointer to **float32** | Ratio of response bytes delivered from the edge compared to what is delivered from origin, between 0 and 1. (`edge_resp_body_bytes` + `edge_resp_header_bytes`) / (`origin_fetch_resp_body_bytes` + `origin_fetch_resp_header_bytes` + `edge_resp_body_bytes` + `edge_resp_header_bytes`). | [optional] +**OriginOffload** | Pointer to **float32** | Origin Offload measures the ratio of bytes served to end users that were cached by Fastly, over the bytes served to end users, between 0 and 1. ((`edge_resp_body_bytes` + `edge_resp_header_bytes`) - (`origin_fetch_resp_body_bytes` + `origin_fetch_resp_header_bytes`)) / (`edge_resp_body_bytes` + `edge_resp_header_bytes`). Previously, Origin Offload used a different formula. [Learn more](https://www.fastly.com/documentation/reference/changes/2024/06/add-origin_offload-metric). | [optional] **OriginStatus200** | Pointer to **int32** | Number of responses received from origin with status code 200 (Success). | [optional] **OriginStatus204** | Pointer to **int32** | Number of responses received from origin with status code 204 (No Content). | [optional] **OriginStatus206** | Pointer to **int32** | Number of responses received from origin with status code 206 (Partial Content). | [optional] diff --git a/docs/InvoiceResponse.md b/docs/EomInvoiceResponse.md similarity index 69% rename from docs/InvoiceResponse.md rename to docs/EomInvoiceResponse.md index 45b80194..3899bba7 100644 --- a/docs/InvoiceResponse.md +++ b/docs/EomInvoiceResponse.md @@ -1,4 +1,4 @@ -# InvoiceResponse +# EomInvoiceResponse ## Properties @@ -16,245 +16,245 @@ Name | Type | Description | Notes ## Methods -### NewInvoiceResponse +### NewEomInvoiceResponse -`func NewInvoiceResponse() *InvoiceResponse` +`func NewEomInvoiceResponse() *EomInvoiceResponse` -NewInvoiceResponse instantiates a new InvoiceResponse object +NewEomInvoiceResponse instantiates a new EomInvoiceResponse object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed -### NewInvoiceResponseWithDefaults +### NewEomInvoiceResponseWithDefaults -`func NewInvoiceResponseWithDefaults() *InvoiceResponse` +`func NewEomInvoiceResponseWithDefaults() *EomInvoiceResponse` -NewInvoiceResponseWithDefaults instantiates a new InvoiceResponse object +NewEomInvoiceResponseWithDefaults instantiates a new EomInvoiceResponse object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetCustomerID -`func (o *InvoiceResponse) GetCustomerID() string` +`func (o *EomInvoiceResponse) GetCustomerID() string` GetCustomerID returns the CustomerID field if non-nil, zero value otherwise. ### GetCustomerIDOk -`func (o *InvoiceResponse) GetCustomerIDOk() (*string, bool)` +`func (o *EomInvoiceResponse) GetCustomerIDOk() (*string, bool)` GetCustomerIDOk returns a tuple with the CustomerID field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetCustomerID -`func (o *InvoiceResponse) SetCustomerID(v string)` +`func (o *EomInvoiceResponse) SetCustomerID(v string)` SetCustomerID sets CustomerID field to given value. ### HasCustomerID -`func (o *InvoiceResponse) HasCustomerID() bool` +`func (o *EomInvoiceResponse) HasCustomerID() bool` HasCustomerID returns a boolean if a field has been set. ### GetInvoiceID -`func (o *InvoiceResponse) GetInvoiceID() string` +`func (o *EomInvoiceResponse) GetInvoiceID() string` GetInvoiceID returns the InvoiceID field if non-nil, zero value otherwise. ### GetInvoiceIDOk -`func (o *InvoiceResponse) GetInvoiceIDOk() (*string, bool)` +`func (o *EomInvoiceResponse) GetInvoiceIDOk() (*string, bool)` GetInvoiceIDOk returns a tuple with the InvoiceID field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetInvoiceID -`func (o *InvoiceResponse) SetInvoiceID(v string)` +`func (o *EomInvoiceResponse) SetInvoiceID(v string)` SetInvoiceID sets InvoiceID field to given value. ### HasInvoiceID -`func (o *InvoiceResponse) HasInvoiceID() bool` +`func (o *EomInvoiceResponse) HasInvoiceID() bool` HasInvoiceID returns a boolean if a field has been set. ### GetInvoicePostedOn -`func (o *InvoiceResponse) GetInvoicePostedOn() time.Time` +`func (o *EomInvoiceResponse) GetInvoicePostedOn() time.Time` GetInvoicePostedOn returns the InvoicePostedOn field if non-nil, zero value otherwise. ### GetInvoicePostedOnOk -`func (o *InvoiceResponse) GetInvoicePostedOnOk() (*time.Time, bool)` +`func (o *EomInvoiceResponse) GetInvoicePostedOnOk() (*time.Time, bool)` GetInvoicePostedOnOk returns a tuple with the InvoicePostedOn field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetInvoicePostedOn -`func (o *InvoiceResponse) SetInvoicePostedOn(v time.Time)` +`func (o *EomInvoiceResponse) SetInvoicePostedOn(v time.Time)` SetInvoicePostedOn sets InvoicePostedOn field to given value. ### HasInvoicePostedOn -`func (o *InvoiceResponse) HasInvoicePostedOn() bool` +`func (o *EomInvoiceResponse) HasInvoicePostedOn() bool` HasInvoicePostedOn returns a boolean if a field has been set. ### GetBillingStartDate -`func (o *InvoiceResponse) GetBillingStartDate() time.Time` +`func (o *EomInvoiceResponse) GetBillingStartDate() time.Time` GetBillingStartDate returns the BillingStartDate field if non-nil, zero value otherwise. ### GetBillingStartDateOk -`func (o *InvoiceResponse) GetBillingStartDateOk() (*time.Time, bool)` +`func (o *EomInvoiceResponse) GetBillingStartDateOk() (*time.Time, bool)` GetBillingStartDateOk returns a tuple with the BillingStartDate field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetBillingStartDate -`func (o *InvoiceResponse) SetBillingStartDate(v time.Time)` +`func (o *EomInvoiceResponse) SetBillingStartDate(v time.Time)` SetBillingStartDate sets BillingStartDate field to given value. ### HasBillingStartDate -`func (o *InvoiceResponse) HasBillingStartDate() bool` +`func (o *EomInvoiceResponse) HasBillingStartDate() bool` HasBillingStartDate returns a boolean if a field has been set. ### GetBillingEndDate -`func (o *InvoiceResponse) GetBillingEndDate() time.Time` +`func (o *EomInvoiceResponse) GetBillingEndDate() time.Time` GetBillingEndDate returns the BillingEndDate field if non-nil, zero value otherwise. ### GetBillingEndDateOk -`func (o *InvoiceResponse) GetBillingEndDateOk() (*time.Time, bool)` +`func (o *EomInvoiceResponse) GetBillingEndDateOk() (*time.Time, bool)` GetBillingEndDateOk returns a tuple with the BillingEndDate field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetBillingEndDate -`func (o *InvoiceResponse) SetBillingEndDate(v time.Time)` +`func (o *EomInvoiceResponse) SetBillingEndDate(v time.Time)` SetBillingEndDate sets BillingEndDate field to given value. ### HasBillingEndDate -`func (o *InvoiceResponse) HasBillingEndDate() bool` +`func (o *EomInvoiceResponse) HasBillingEndDate() bool` HasBillingEndDate returns a boolean if a field has been set. ### GetStatementNumber -`func (o *InvoiceResponse) GetStatementNumber() string` +`func (o *EomInvoiceResponse) GetStatementNumber() string` GetStatementNumber returns the StatementNumber field if non-nil, zero value otherwise. ### GetStatementNumberOk -`func (o *InvoiceResponse) GetStatementNumberOk() (*string, bool)` +`func (o *EomInvoiceResponse) GetStatementNumberOk() (*string, bool)` GetStatementNumberOk returns a tuple with the StatementNumber field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetStatementNumber -`func (o *InvoiceResponse) SetStatementNumber(v string)` +`func (o *EomInvoiceResponse) SetStatementNumber(v string)` SetStatementNumber sets StatementNumber field to given value. ### HasStatementNumber -`func (o *InvoiceResponse) HasStatementNumber() bool` +`func (o *EomInvoiceResponse) HasStatementNumber() bool` HasStatementNumber returns a boolean if a field has been set. ### GetCurrencyCode -`func (o *InvoiceResponse) GetCurrencyCode() string` +`func (o *EomInvoiceResponse) GetCurrencyCode() string` GetCurrencyCode returns the CurrencyCode field if non-nil, zero value otherwise. ### GetCurrencyCodeOk -`func (o *InvoiceResponse) GetCurrencyCodeOk() (*string, bool)` +`func (o *EomInvoiceResponse) GetCurrencyCodeOk() (*string, bool)` GetCurrencyCodeOk returns a tuple with the CurrencyCode field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetCurrencyCode -`func (o *InvoiceResponse) SetCurrencyCode(v string)` +`func (o *EomInvoiceResponse) SetCurrencyCode(v string)` SetCurrencyCode sets CurrencyCode field to given value. ### HasCurrencyCode -`func (o *InvoiceResponse) HasCurrencyCode() bool` +`func (o *EomInvoiceResponse) HasCurrencyCode() bool` HasCurrencyCode returns a boolean if a field has been set. ### GetMonthlyTransactionAmount -`func (o *InvoiceResponse) GetMonthlyTransactionAmount() float32` +`func (o *EomInvoiceResponse) GetMonthlyTransactionAmount() float32` GetMonthlyTransactionAmount returns the MonthlyTransactionAmount field if non-nil, zero value otherwise. ### GetMonthlyTransactionAmountOk -`func (o *InvoiceResponse) GetMonthlyTransactionAmountOk() (*float32, bool)` +`func (o *EomInvoiceResponse) GetMonthlyTransactionAmountOk() (*float32, bool)` GetMonthlyTransactionAmountOk returns a tuple with the MonthlyTransactionAmount field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetMonthlyTransactionAmount -`func (o *InvoiceResponse) SetMonthlyTransactionAmount(v float32)` +`func (o *EomInvoiceResponse) SetMonthlyTransactionAmount(v float32)` SetMonthlyTransactionAmount sets MonthlyTransactionAmount field to given value. ### HasMonthlyTransactionAmount -`func (o *InvoiceResponse) HasMonthlyTransactionAmount() bool` +`func (o *EomInvoiceResponse) HasMonthlyTransactionAmount() bool` HasMonthlyTransactionAmount returns a boolean if a field has been set. ### GetTransactionLineItems -`func (o *InvoiceResponse) GetTransactionLineItems() []Invoicelineitems` +`func (o *EomInvoiceResponse) GetTransactionLineItems() []Invoicelineitems` GetTransactionLineItems returns the TransactionLineItems field if non-nil, zero value otherwise. ### GetTransactionLineItemsOk -`func (o *InvoiceResponse) GetTransactionLineItemsOk() (*[]Invoicelineitems, bool)` +`func (o *EomInvoiceResponse) GetTransactionLineItemsOk() (*[]Invoicelineitems, bool)` GetTransactionLineItemsOk returns a tuple with the TransactionLineItems field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetTransactionLineItems -`func (o *InvoiceResponse) SetTransactionLineItems(v []Invoicelineitems)` +`func (o *EomInvoiceResponse) SetTransactionLineItems(v []Invoicelineitems)` SetTransactionLineItems sets TransactionLineItems field to given value. ### HasTransactionLineItems -`func (o *InvoiceResponse) HasTransactionLineItems() bool` +`func (o *EomInvoiceResponse) HasTransactionLineItems() bool` HasTransactionLineItems returns a boolean if a field has been set. diff --git a/docs/GetServiceLevelUsageResponse.md b/docs/GetServiceLevelUsageResponse.md new file mode 100644 index 00000000..9cd4af29 --- /dev/null +++ b/docs/GetServiceLevelUsageResponse.md @@ -0,0 +1,54 @@ +# GetServiceLevelUsageResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**ServiceusagemetricsData**](ServiceusagemetricsData.md) | | [optional] + +## Methods + +### NewGetServiceLevelUsageResponse + +`func NewGetServiceLevelUsageResponse() *GetServiceLevelUsageResponse` + +NewGetServiceLevelUsageResponse instantiates a new GetServiceLevelUsageResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewGetServiceLevelUsageResponseWithDefaults + +`func NewGetServiceLevelUsageResponseWithDefaults() *GetServiceLevelUsageResponse` + +NewGetServiceLevelUsageResponseWithDefaults instantiates a new GetServiceLevelUsageResponse object +This 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 *GetServiceLevelUsageResponse) GetData() ServiceusagemetricsData` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *GetServiceLevelUsageResponse) GetDataOk() (*ServiceusagemetricsData, 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 *GetServiceLevelUsageResponse) SetData(v ServiceusagemetricsData)` + +SetData sets Data field to given value. + +### HasData + +`func (o *GetServiceLevelUsageResponse) 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/GetServiceLevelUsageTypesResponse.md b/docs/GetServiceLevelUsageTypesResponse.md new file mode 100644 index 00000000..ae160601 --- /dev/null +++ b/docs/GetServiceLevelUsageTypesResponse.md @@ -0,0 +1,54 @@ +# GetServiceLevelUsageTypesResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**[]Serviceusagetype**](Serviceusagetype.md) | | [optional] + +## Methods + +### NewGetServiceLevelUsageTypesResponse + +`func NewGetServiceLevelUsageTypesResponse() *GetServiceLevelUsageTypesResponse` + +NewGetServiceLevelUsageTypesResponse instantiates a new GetServiceLevelUsageTypesResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewGetServiceLevelUsageTypesResponseWithDefaults + +`func NewGetServiceLevelUsageTypesResponseWithDefaults() *GetServiceLevelUsageTypesResponse` + +NewGetServiceLevelUsageTypesResponseWithDefaults instantiates a new GetServiceLevelUsageTypesResponse object +This 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 *GetServiceLevelUsageTypesResponse) GetData() []Serviceusagetype` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *GetServiceLevelUsageTypesResponse) GetDataOk() (*[]Serviceusagetype, 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 *GetServiceLevelUsageTypesResponse) SetData(v []Serviceusagetype)` + +SetData sets Data field to given value. + +### HasData + +`func (o *GetServiceLevelUsageTypesResponse) 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/IncludedWithTlsConfiguration.md b/docs/IncludedWithTlsConfiguration.md new file mode 100644 index 00000000..1c6cdb35 --- /dev/null +++ b/docs/IncludedWithTlsConfiguration.md @@ -0,0 +1,54 @@ +# IncludedWithTLSConfiguration + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Included** | Pointer to [**[]IncludedWithTLSConfigurationItem**](IncludedWithTLSConfigurationItem.md) | | [optional] + +## Methods + +### NewIncludedWithTLSConfiguration + +`func NewIncludedWithTLSConfiguration() *IncludedWithTLSConfiguration` + +NewIncludedWithTLSConfiguration instantiates a new IncludedWithTLSConfiguration object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewIncludedWithTLSConfigurationWithDefaults + +`func NewIncludedWithTLSConfigurationWithDefaults() *IncludedWithTLSConfiguration` + +NewIncludedWithTLSConfigurationWithDefaults instantiates a new IncludedWithTLSConfiguration object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetIncluded + +`func (o *IncludedWithTLSConfiguration) GetIncluded() []IncludedWithTLSConfigurationItem` + +GetIncluded returns the Included field if non-nil, zero value otherwise. + +### GetIncludedOk + +`func (o *IncludedWithTLSConfiguration) GetIncludedOk() (*[]IncludedWithTLSConfigurationItem, bool)` + +GetIncludedOk returns a tuple with the Included field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIncluded + +`func (o *IncludedWithTLSConfiguration) SetIncluded(v []IncludedWithTLSConfigurationItem)` + +SetIncluded sets Included field to given value. + +### HasIncluded + +`func (o *IncludedWithTLSConfiguration) HasIncluded() bool` + +HasIncluded 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/IncludedWithTlsConfigurationItem.md b/docs/IncludedWithTlsConfigurationItem.md new file mode 100644 index 00000000..34060a38 --- /dev/null +++ b/docs/IncludedWithTlsConfigurationItem.md @@ -0,0 +1,106 @@ +# IncludedWithTLSConfigurationItem + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ID** | Pointer to **string** | The IP address or hostname of the DNS record. | [optional] +**Type** | Pointer to [**TypeTLSDNSRecord**](TypeTLSDNSRecord.md) | | [optional] [default to TYPETLSDNSRECORD_DNS_RECORD] +**Attributes** | Pointer to [**TLSDNSRecord**](TlsDNSRecord.md) | | [optional] + +## Methods + +### NewIncludedWithTLSConfigurationItem + +`func NewIncludedWithTLSConfigurationItem() *IncludedWithTLSConfigurationItem` + +NewIncludedWithTLSConfigurationItem instantiates a new IncludedWithTLSConfigurationItem object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewIncludedWithTLSConfigurationItemWithDefaults + +`func NewIncludedWithTLSConfigurationItemWithDefaults() *IncludedWithTLSConfigurationItem` + +NewIncludedWithTLSConfigurationItemWithDefaults instantiates a new IncludedWithTLSConfigurationItem object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetID + +`func (o *IncludedWithTLSConfigurationItem) GetID() string` + +GetID returns the ID field if non-nil, zero value otherwise. + +### GetIDOk + +`func (o *IncludedWithTLSConfigurationItem) 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 *IncludedWithTLSConfigurationItem) SetID(v string)` + +SetID sets ID field to given value. + +### HasID + +`func (o *IncludedWithTLSConfigurationItem) HasID() bool` + +HasID returns a boolean if a field has been set. + +### GetType + +`func (o *IncludedWithTLSConfigurationItem) GetType() TypeTLSDNSRecord` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *IncludedWithTLSConfigurationItem) GetTypeOk() (*TypeTLSDNSRecord, 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 *IncludedWithTLSConfigurationItem) SetType(v TypeTLSDNSRecord)` + +SetType sets Type field to given value. + +### HasType + +`func (o *IncludedWithTLSConfigurationItem) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetAttributes + +`func (o *IncludedWithTLSConfigurationItem) GetAttributes() TLSDNSRecord` + +GetAttributes returns the Attributes field if non-nil, zero value otherwise. + +### GetAttributesOk + +`func (o *IncludedWithTLSConfigurationItem) GetAttributesOk() (*TLSDNSRecord, bool)` + +GetAttributesOk returns a tuple with the Attributes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAttributes + +`func (o *IncludedWithTLSConfigurationItem) SetAttributes(v TLSDNSRecord)` + +SetAttributes sets Attributes field to given value. + +### HasAttributes + +`func (o *IncludedWithTLSConfigurationItem) HasAttributes() bool` + +HasAttributes 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/ListDashboardsResponse.md b/docs/ListDashboardsResponse.md new file mode 100644 index 00000000..1b658f73 --- /dev/null +++ b/docs/ListDashboardsResponse.md @@ -0,0 +1,90 @@ +# ListDashboardsResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**[]Dashboard**](Dashboard.md) | | [optional] +**Meta** | Pointer to **any** | Meta for the pagination. | [optional] + +## Methods + +### NewListDashboardsResponse + +`func NewListDashboardsResponse() *ListDashboardsResponse` + +NewListDashboardsResponse instantiates a new ListDashboardsResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewListDashboardsResponseWithDefaults + +`func NewListDashboardsResponseWithDefaults() *ListDashboardsResponse` + +NewListDashboardsResponseWithDefaults instantiates a new ListDashboardsResponse object +This 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 *ListDashboardsResponse) GetData() []Dashboard` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ListDashboardsResponse) GetDataOk() (*[]Dashboard, 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 *ListDashboardsResponse) SetData(v []Dashboard)` + +SetData sets Data field to given value. + +### HasData + +`func (o *ListDashboardsResponse) HasData() bool` + +HasData returns a boolean if a field has been set. + +### GetMeta + +`func (o *ListDashboardsResponse) GetMeta() any` + +GetMeta returns the Meta field if non-nil, zero value otherwise. + +### GetMetaOk + +`func (o *ListDashboardsResponse) GetMetaOk() (*any, 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 *ListDashboardsResponse) SetMeta(v any)` + +SetMeta sets Meta field to given value. + +### HasMeta + +`func (o *ListDashboardsResponse) HasMeta() bool` + +HasMeta returns a boolean if a field has been set. + +### SetMetaNil + +`func (o *ListDashboardsResponse) SetMetaNil(b bool)` + + SetMetaNil sets the value for Meta to be an explicit nil + +### UnsetMeta +`func (o *ListDashboardsResponse) UnsetMeta()` + +UnsetMeta ensures that no value is present for Meta, not even an explicit nil + +[Back to API list](../README.md#documentation-for-api-endpoints) | [Back to README](../README.md) diff --git a/docs/ListInvoicesResponse.md b/docs/ListEomInvoicesResponse.md similarity index 62% rename from docs/ListInvoicesResponse.md rename to docs/ListEomInvoicesResponse.md index 87f2f01a..b2a8b902 100644 --- a/docs/ListInvoicesResponse.md +++ b/docs/ListEomInvoicesResponse.md @@ -1,4 +1,4 @@ -# ListInvoicesResponse +# ListEomInvoicesResponse ## Properties @@ -9,70 +9,70 @@ Name | Type | Description | Notes ## Methods -### NewListInvoicesResponse +### NewListEomInvoicesResponse -`func NewListInvoicesResponse() *ListInvoicesResponse` +`func NewListEomInvoicesResponse() *ListEomInvoicesResponse` -NewListInvoicesResponse instantiates a new ListInvoicesResponse object +NewListEomInvoicesResponse instantiates a new ListEomInvoicesResponse object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed -### NewListInvoicesResponseWithDefaults +### NewListEomInvoicesResponseWithDefaults -`func NewListInvoicesResponseWithDefaults() *ListInvoicesResponse` +`func NewListEomInvoicesResponseWithDefaults() *ListEomInvoicesResponse` -NewListInvoicesResponseWithDefaults instantiates a new ListInvoicesResponse object +NewListEomInvoicesResponseWithDefaults instantiates a new ListEomInvoicesResponse object This 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 *ListInvoicesResponse) GetData() []Invoice` +`func (o *ListEomInvoicesResponse) GetData() []Invoice` GetData returns the Data field if non-nil, zero value otherwise. ### GetDataOk -`func (o *ListInvoicesResponse) GetDataOk() (*[]Invoice, bool)` +`func (o *ListEomInvoicesResponse) GetDataOk() (*[]Invoice, 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 *ListInvoicesResponse) SetData(v []Invoice)` +`func (o *ListEomInvoicesResponse) SetData(v []Invoice)` SetData sets Data field to given value. ### HasData -`func (o *ListInvoicesResponse) HasData() bool` +`func (o *ListEomInvoicesResponse) HasData() bool` HasData returns a boolean if a field has been set. ### GetMeta -`func (o *ListInvoicesResponse) GetMeta() Metadata` +`func (o *ListEomInvoicesResponse) GetMeta() Metadata` GetMeta returns the Meta field if non-nil, zero value otherwise. ### GetMetaOk -`func (o *ListInvoicesResponse) GetMetaOk() (*Metadata, bool)` +`func (o *ListEomInvoicesResponse) GetMetaOk() (*Metadata, 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 *ListInvoicesResponse) SetMeta(v Metadata)` +`func (o *ListEomInvoicesResponse) SetMeta(v Metadata)` SetMeta sets Meta field to given value. ### HasMeta -`func (o *ListInvoicesResponse) HasMeta() bool` +`func (o *ListEomInvoicesResponse) HasMeta() bool` HasMeta returns a boolean if a field has been set. diff --git a/docs/MtdInvoiceResponse.md b/docs/MtdInvoiceResponse.md new file mode 100644 index 00000000..ea9a7604 --- /dev/null +++ b/docs/MtdInvoiceResponse.md @@ -0,0 +1,184 @@ +# MtdInvoiceResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CustomerID** | Pointer to **string** | The Customer ID associated with the invoice. | [optional] +**InvoiceID** | Pointer to **string** | An alphanumeric string identifying the invoice. | [optional] +**BillingStartDate** | Pointer to **time.Time** | The date and time (in ISO 8601 format) for the initiation point of a billing cycle, signifying the start of charges for a service or subscription. | [optional] +**BillingEndDate** | Pointer to **time.Time** | The date and time (in ISO 8601 format) for the termination point of a billing cycle, signifying the end of charges for a service or subscription. | [optional] +**MonthlyTransactionAmount** | Pointer to **string** | The total billable amount for invoiced services charged within a single month. | [optional] +**TransactionLineItems** | Pointer to [**[]Mtdlineitems**](Mtdlineitems.md) | | [optional] + +## Methods + +### NewMtdInvoiceResponse + +`func NewMtdInvoiceResponse() *MtdInvoiceResponse` + +NewMtdInvoiceResponse instantiates a new MtdInvoiceResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewMtdInvoiceResponseWithDefaults + +`func NewMtdInvoiceResponseWithDefaults() *MtdInvoiceResponse` + +NewMtdInvoiceResponseWithDefaults instantiates a new MtdInvoiceResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCustomerID + +`func (o *MtdInvoiceResponse) GetCustomerID() string` + +GetCustomerID returns the CustomerID field if non-nil, zero value otherwise. + +### GetCustomerIDOk + +`func (o *MtdInvoiceResponse) GetCustomerIDOk() (*string, bool)` + +GetCustomerIDOk returns a tuple with the CustomerID field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCustomerID + +`func (o *MtdInvoiceResponse) SetCustomerID(v string)` + +SetCustomerID sets CustomerID field to given value. + +### HasCustomerID + +`func (o *MtdInvoiceResponse) HasCustomerID() bool` + +HasCustomerID returns a boolean if a field has been set. + +### GetInvoiceID + +`func (o *MtdInvoiceResponse) GetInvoiceID() string` + +GetInvoiceID returns the InvoiceID field if non-nil, zero value otherwise. + +### GetInvoiceIDOk + +`func (o *MtdInvoiceResponse) GetInvoiceIDOk() (*string, bool)` + +GetInvoiceIDOk returns a tuple with the InvoiceID field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetInvoiceID + +`func (o *MtdInvoiceResponse) SetInvoiceID(v string)` + +SetInvoiceID sets InvoiceID field to given value. + +### HasInvoiceID + +`func (o *MtdInvoiceResponse) HasInvoiceID() bool` + +HasInvoiceID returns a boolean if a field has been set. + +### GetBillingStartDate + +`func (o *MtdInvoiceResponse) GetBillingStartDate() time.Time` + +GetBillingStartDate returns the BillingStartDate field if non-nil, zero value otherwise. + +### GetBillingStartDateOk + +`func (o *MtdInvoiceResponse) GetBillingStartDateOk() (*time.Time, bool)` + +GetBillingStartDateOk returns a tuple with the BillingStartDate field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBillingStartDate + +`func (o *MtdInvoiceResponse) SetBillingStartDate(v time.Time)` + +SetBillingStartDate sets BillingStartDate field to given value. + +### HasBillingStartDate + +`func (o *MtdInvoiceResponse) HasBillingStartDate() bool` + +HasBillingStartDate returns a boolean if a field has been set. + +### GetBillingEndDate + +`func (o *MtdInvoiceResponse) GetBillingEndDate() time.Time` + +GetBillingEndDate returns the BillingEndDate field if non-nil, zero value otherwise. + +### GetBillingEndDateOk + +`func (o *MtdInvoiceResponse) GetBillingEndDateOk() (*time.Time, bool)` + +GetBillingEndDateOk returns a tuple with the BillingEndDate field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBillingEndDate + +`func (o *MtdInvoiceResponse) SetBillingEndDate(v time.Time)` + +SetBillingEndDate sets BillingEndDate field to given value. + +### HasBillingEndDate + +`func (o *MtdInvoiceResponse) HasBillingEndDate() bool` + +HasBillingEndDate returns a boolean if a field has been set. + +### GetMonthlyTransactionAmount + +`func (o *MtdInvoiceResponse) GetMonthlyTransactionAmount() string` + +GetMonthlyTransactionAmount returns the MonthlyTransactionAmount field if non-nil, zero value otherwise. + +### GetMonthlyTransactionAmountOk + +`func (o *MtdInvoiceResponse) GetMonthlyTransactionAmountOk() (*string, bool)` + +GetMonthlyTransactionAmountOk returns a tuple with the MonthlyTransactionAmount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMonthlyTransactionAmount + +`func (o *MtdInvoiceResponse) SetMonthlyTransactionAmount(v string)` + +SetMonthlyTransactionAmount sets MonthlyTransactionAmount field to given value. + +### HasMonthlyTransactionAmount + +`func (o *MtdInvoiceResponse) HasMonthlyTransactionAmount() bool` + +HasMonthlyTransactionAmount returns a boolean if a field has been set. + +### GetTransactionLineItems + +`func (o *MtdInvoiceResponse) GetTransactionLineItems() []Mtdlineitems` + +GetTransactionLineItems returns the TransactionLineItems field if non-nil, zero value otherwise. + +### GetTransactionLineItemsOk + +`func (o *MtdInvoiceResponse) GetTransactionLineItemsOk() (*[]Mtdlineitems, bool)` + +GetTransactionLineItemsOk returns a tuple with the TransactionLineItems field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTransactionLineItems + +`func (o *MtdInvoiceResponse) SetTransactionLineItems(v []Mtdlineitems)` + +SetTransactionLineItems sets TransactionLineItems field to given value. + +### HasTransactionLineItems + +`func (o *MtdInvoiceResponse) HasTransactionLineItems() bool` + +HasTransactionLineItems 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/Mtdinvoice.md b/docs/Mtdinvoice.md new file mode 100644 index 00000000..e9043632 --- /dev/null +++ b/docs/Mtdinvoice.md @@ -0,0 +1,184 @@ +# Mtdinvoice + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CustomerID** | Pointer to **string** | The Customer ID associated with the invoice. | [optional] +**InvoiceID** | Pointer to **string** | An alphanumeric string identifying the invoice. | [optional] +**BillingStartDate** | Pointer to **time.Time** | The date and time (in ISO 8601 format) for the initiation point of a billing cycle, signifying the start of charges for a service or subscription. | [optional] +**BillingEndDate** | Pointer to **time.Time** | The date and time (in ISO 8601 format) for the termination point of a billing cycle, signifying the end of charges for a service or subscription. | [optional] +**MonthlyTransactionAmount** | Pointer to **string** | The total billable amount for invoiced services charged within a single month. | [optional] +**TransactionLineItems** | Pointer to [**[]Mtdlineitems**](Mtdlineitems.md) | | [optional] + +## Methods + +### NewMtdinvoice + +`func NewMtdinvoice() *Mtdinvoice` + +NewMtdinvoice instantiates a new Mtdinvoice object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewMtdinvoiceWithDefaults + +`func NewMtdinvoiceWithDefaults() *Mtdinvoice` + +NewMtdinvoiceWithDefaults instantiates a new Mtdinvoice object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCustomerID + +`func (o *Mtdinvoice) GetCustomerID() string` + +GetCustomerID returns the CustomerID field if non-nil, zero value otherwise. + +### GetCustomerIDOk + +`func (o *Mtdinvoice) GetCustomerIDOk() (*string, bool)` + +GetCustomerIDOk returns a tuple with the CustomerID field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCustomerID + +`func (o *Mtdinvoice) SetCustomerID(v string)` + +SetCustomerID sets CustomerID field to given value. + +### HasCustomerID + +`func (o *Mtdinvoice) HasCustomerID() bool` + +HasCustomerID returns a boolean if a field has been set. + +### GetInvoiceID + +`func (o *Mtdinvoice) GetInvoiceID() string` + +GetInvoiceID returns the InvoiceID field if non-nil, zero value otherwise. + +### GetInvoiceIDOk + +`func (o *Mtdinvoice) GetInvoiceIDOk() (*string, bool)` + +GetInvoiceIDOk returns a tuple with the InvoiceID field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetInvoiceID + +`func (o *Mtdinvoice) SetInvoiceID(v string)` + +SetInvoiceID sets InvoiceID field to given value. + +### HasInvoiceID + +`func (o *Mtdinvoice) HasInvoiceID() bool` + +HasInvoiceID returns a boolean if a field has been set. + +### GetBillingStartDate + +`func (o *Mtdinvoice) GetBillingStartDate() time.Time` + +GetBillingStartDate returns the BillingStartDate field if non-nil, zero value otherwise. + +### GetBillingStartDateOk + +`func (o *Mtdinvoice) GetBillingStartDateOk() (*time.Time, bool)` + +GetBillingStartDateOk returns a tuple with the BillingStartDate field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBillingStartDate + +`func (o *Mtdinvoice) SetBillingStartDate(v time.Time)` + +SetBillingStartDate sets BillingStartDate field to given value. + +### HasBillingStartDate + +`func (o *Mtdinvoice) HasBillingStartDate() bool` + +HasBillingStartDate returns a boolean if a field has been set. + +### GetBillingEndDate + +`func (o *Mtdinvoice) GetBillingEndDate() time.Time` + +GetBillingEndDate returns the BillingEndDate field if non-nil, zero value otherwise. + +### GetBillingEndDateOk + +`func (o *Mtdinvoice) GetBillingEndDateOk() (*time.Time, bool)` + +GetBillingEndDateOk returns a tuple with the BillingEndDate field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBillingEndDate + +`func (o *Mtdinvoice) SetBillingEndDate(v time.Time)` + +SetBillingEndDate sets BillingEndDate field to given value. + +### HasBillingEndDate + +`func (o *Mtdinvoice) HasBillingEndDate() bool` + +HasBillingEndDate returns a boolean if a field has been set. + +### GetMonthlyTransactionAmount + +`func (o *Mtdinvoice) GetMonthlyTransactionAmount() string` + +GetMonthlyTransactionAmount returns the MonthlyTransactionAmount field if non-nil, zero value otherwise. + +### GetMonthlyTransactionAmountOk + +`func (o *Mtdinvoice) GetMonthlyTransactionAmountOk() (*string, bool)` + +GetMonthlyTransactionAmountOk returns a tuple with the MonthlyTransactionAmount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMonthlyTransactionAmount + +`func (o *Mtdinvoice) SetMonthlyTransactionAmount(v string)` + +SetMonthlyTransactionAmount sets MonthlyTransactionAmount field to given value. + +### HasMonthlyTransactionAmount + +`func (o *Mtdinvoice) HasMonthlyTransactionAmount() bool` + +HasMonthlyTransactionAmount returns a boolean if a field has been set. + +### GetTransactionLineItems + +`func (o *Mtdinvoice) GetTransactionLineItems() []Mtdlineitems` + +GetTransactionLineItems returns the TransactionLineItems field if non-nil, zero value otherwise. + +### GetTransactionLineItemsOk + +`func (o *Mtdinvoice) GetTransactionLineItemsOk() (*[]Mtdlineitems, bool)` + +GetTransactionLineItemsOk returns a tuple with the TransactionLineItems field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTransactionLineItems + +`func (o *Mtdinvoice) SetTransactionLineItems(v []Mtdlineitems)` + +SetTransactionLineItems sets TransactionLineItems field to given value. + +### HasTransactionLineItems + +`func (o *Mtdinvoice) HasTransactionLineItems() bool` + +HasTransactionLineItems 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/Mtdlineitems.md b/docs/Mtdlineitems.md new file mode 100644 index 00000000..2567c9ed --- /dev/null +++ b/docs/Mtdlineitems.md @@ -0,0 +1,262 @@ +# Mtdlineitems + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Description** | Pointer to **string** | Invoice line item transaction name. | [optional] +**Amount** | Pointer to **float32** | Billed amount for line item. | [optional] +**Rate** | Pointer to **float32** | Price per unit. | [optional] +**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] + +## Methods + +### NewMtdlineitems + +`func NewMtdlineitems() *Mtdlineitems` + +NewMtdlineitems instantiates a new Mtdlineitems object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewMtdlineitemsWithDefaults + +`func NewMtdlineitemsWithDefaults() *Mtdlineitems` + +NewMtdlineitemsWithDefaults instantiates a new Mtdlineitems object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetDescription + +`func (o *Mtdlineitems) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *Mtdlineitems) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *Mtdlineitems) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *Mtdlineitems) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetAmount + +`func (o *Mtdlineitems) GetAmount() float32` + +GetAmount returns the Amount field if non-nil, zero value otherwise. + +### GetAmountOk + +`func (o *Mtdlineitems) GetAmountOk() (*float32, bool)` + +GetAmountOk returns a tuple with the Amount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAmount + +`func (o *Mtdlineitems) SetAmount(v float32)` + +SetAmount sets Amount field to given value. + +### HasAmount + +`func (o *Mtdlineitems) HasAmount() bool` + +HasAmount returns a boolean if a field has been set. + +### GetRate + +`func (o *Mtdlineitems) GetRate() float32` + +GetRate returns the Rate field if non-nil, zero value otherwise. + +### GetRateOk + +`func (o *Mtdlineitems) GetRateOk() (*float32, bool)` + +GetRateOk returns a tuple with the Rate field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRate + +`func (o *Mtdlineitems) SetRate(v float32)` + +SetRate sets Rate field to given value. + +### HasRate + +`func (o *Mtdlineitems) HasRate() bool` + +HasRate returns a boolean if a field has been set. + +### GetUnits + +`func (o *Mtdlineitems) GetUnits() float32` + +GetUnits returns the Units field if non-nil, zero value otherwise. + +### GetUnitsOk + +`func (o *Mtdlineitems) GetUnitsOk() (*float32, bool)` + +GetUnitsOk returns a tuple with the Units field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUnits + +`func (o *Mtdlineitems) SetUnits(v float32)` + +SetUnits sets Units field to given value. + +### HasUnits + +`func (o *Mtdlineitems) HasUnits() bool` + +HasUnits returns a boolean if a field has been set. + +### GetProductName + +`func (o *Mtdlineitems) GetProductName() string` + +GetProductName returns the ProductName field if non-nil, zero value otherwise. + +### GetProductNameOk + +`func (o *Mtdlineitems) GetProductNameOk() (*string, bool)` + +GetProductNameOk returns a tuple with the ProductName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProductName + +`func (o *Mtdlineitems) SetProductName(v string)` + +SetProductName sets ProductName field to given value. + +### HasProductName + +`func (o *Mtdlineitems) HasProductName() bool` + +HasProductName returns a boolean if a field has been set. + +### GetProductGroup + +`func (o *Mtdlineitems) GetProductGroup() string` + +GetProductGroup returns the ProductGroup field if non-nil, zero value otherwise. + +### GetProductGroupOk + +`func (o *Mtdlineitems) GetProductGroupOk() (*string, bool)` + +GetProductGroupOk returns a tuple with the ProductGroup field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProductGroup + +`func (o *Mtdlineitems) SetProductGroup(v string)` + +SetProductGroup sets ProductGroup field to given value. + +### HasProductGroup + +`func (o *Mtdlineitems) HasProductGroup() bool` + +HasProductGroup returns a boolean if a field has been set. + +### GetProductLine + +`func (o *Mtdlineitems) GetProductLine() string` + +GetProductLine returns the ProductLine field if non-nil, zero value otherwise. + +### GetProductLineOk + +`func (o *Mtdlineitems) 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 *Mtdlineitems) SetProductLine(v string)` + +SetProductLine sets ProductLine field to given value. + +### HasProductLine + +`func (o *Mtdlineitems) HasProductLine() bool` + +HasProductLine returns a boolean if a field has been set. + +### GetRegion + +`func (o *Mtdlineitems) GetRegion() string` + +GetRegion returns the Region field if non-nil, zero value otherwise. + +### GetRegionOk + +`func (o *Mtdlineitems) GetRegionOk() (*string, bool)` + +GetRegionOk returns a tuple with the Region field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRegion + +`func (o *Mtdlineitems) SetRegion(v string)` + +SetRegion sets Region field to given value. + +### HasRegion + +`func (o *Mtdlineitems) HasRegion() bool` + +HasRegion returns a boolean if a field has been set. + +### GetUsageType + +`func (o *Mtdlineitems) GetUsageType() string` + +GetUsageType returns the UsageType field if non-nil, zero value otherwise. + +### GetUsageTypeOk + +`func (o *Mtdlineitems) GetUsageTypeOk() (*string, bool)` + +GetUsageTypeOk returns a tuple with the UsageType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUsageType + +`func (o *Mtdlineitems) SetUsageType(v string)` + +SetUsageType sets UsageType field to given value. + +### HasUsageType + +`func (o *Mtdlineitems) HasUsageType() bool` + +HasUsageType 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/ObservabilityCustomDashboardsAPI.md b/docs/ObservabilityCustomDashboardsAPI.md new file mode 100644 index 00000000..df1f88e9 --- /dev/null +++ b/docs/ObservabilityCustomDashboardsAPI.md @@ -0,0 +1,335 @@ +# ObservabilityCustomDashboardsAPI + +> [!NOTE] +> All URIs are relative to `https://api.fastly.com` + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateDashboard**](ObservabilityCustomDashboardsAPI.md#CreateDashboard) | **POST** `/observability/dashboards` | Create a new dashboard +[**DeleteDashboard**](ObservabilityCustomDashboardsAPI.md#DeleteDashboard) | **DELETE** `/observability/dashboards/{dashboard_id}` | Delete an existing dashboard +[**GetDashboard**](ObservabilityCustomDashboardsAPI.md#GetDashboard) | **GET** `/observability/dashboards/{dashboard_id}` | Retrieve a dashboard by ID +[**ListDashboards**](ObservabilityCustomDashboardsAPI.md#ListDashboards) | **GET** `/observability/dashboards` | List all custom dashboards +[**UpdateDashboard**](ObservabilityCustomDashboardsAPI.md#UpdateDashboard) | **PATCH** `/observability/dashboards/{dashboard_id}` | Update an existing dashboard + + + +## CreateDashboard + +Create a new dashboard + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + "github.com/fastly/fastly-go/fastly" +) + +func main() { + createDashboardRequest := *openapiclient.NewCreateDashboardRequest("Name_example") // CreateDashboardRequest | (optional) + + cfg := fastly.NewConfiguration() + apiClient := fastly.NewAPIClient(cfg) + ctx := fastly.NewAPIKeyContextFromEnv("FASTLY_API_TOKEN") + resp, r, err := apiClient.ObservabilityCustomDashboardsAPI.CreateDashboard(ctx).CreateDashboardRequest(createDashboardRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ObservabilityCustomDashboardsAPI.CreateDashboard`: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateDashboard`: Dashboard + fmt.Fprintf(os.Stdout, "Response from `ObservabilityCustomDashboardsAPI.CreateDashboard`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateDashboardRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **createDashboardRequest** | [**CreateDashboardRequest**](CreateDashboardRequest.md) | | + +### Return type + +[**Dashboard**](Dashboard.md) + +### Authorization + +[API Token](https://www.fastly.com/documentation/reference/api/#authentication) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[Back to top](#) | [Back to API list](../README.md#documentation-for-api-endpoints) | [Back to README](../README.md) + + +## DeleteDashboard + +Delete an existing dashboard + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + "github.com/fastly/fastly-go/fastly" +) + +func main() { + dashboardID := "2eGFXF4F4kTxd4gU39Bg3e" // string | + + cfg := fastly.NewConfiguration() + apiClient := fastly.NewAPIClient(cfg) + ctx := fastly.NewAPIKeyContextFromEnv("FASTLY_API_TOKEN") + resp, r, err := apiClient.ObservabilityCustomDashboardsAPI.DeleteDashboard(ctx, dashboardID).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ObservabilityCustomDashboardsAPI.DeleteDashboard`: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**dashboardID** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteDashboardRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + + (empty response body) + +### Authorization + +[API Token](https://www.fastly.com/documentation/reference/api/#authentication) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[Back to top](#) | [Back to API list](../README.md#documentation-for-api-endpoints) | [Back to README](../README.md) + + +## GetDashboard + +Retrieve a dashboard by ID + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + "github.com/fastly/fastly-go/fastly" +) + +func main() { + dashboardID := "2eGFXF4F4kTxd4gU39Bg3e" // string | + + cfg := fastly.NewConfiguration() + apiClient := fastly.NewAPIClient(cfg) + ctx := fastly.NewAPIKeyContextFromEnv("FASTLY_API_TOKEN") + resp, r, err := apiClient.ObservabilityCustomDashboardsAPI.GetDashboard(ctx, dashboardID).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ObservabilityCustomDashboardsAPI.GetDashboard`: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetDashboard`: Dashboard + fmt.Fprintf(os.Stdout, "Response from `ObservabilityCustomDashboardsAPI.GetDashboard`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**dashboardID** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetDashboardRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**Dashboard**](Dashboard.md) + +### Authorization + +[API Token](https://www.fastly.com/documentation/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) + + +## ListDashboards + +List all custom dashboards + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + "github.com/fastly/fastly-go/fastly" +) + +func main() { + + cfg := fastly.NewConfiguration() + apiClient := fastly.NewAPIClient(cfg) + ctx := fastly.NewAPIKeyContextFromEnv("FASTLY_API_TOKEN") + resp, r, err := apiClient.ObservabilityCustomDashboardsAPI.ListDashboards(ctx).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ObservabilityCustomDashboardsAPI.ListDashboards`: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListDashboards`: ListDashboardsResponse + fmt.Fprintf(os.Stdout, "Response from `ObservabilityCustomDashboardsAPI.ListDashboards`: %v\n", resp) +} +``` + +### Path Parameters + +This endpoint does not need any parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a apiListDashboardsRequest struct via the builder pattern + + + +### Return type + +[**ListDashboardsResponse**](ListDashboardsResponse.md) + +### Authorization + +[API Token](https://www.fastly.com/documentation/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) + + +## UpdateDashboard + +Update an existing dashboard + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + "github.com/fastly/fastly-go/fastly" +) + +func main() { + dashboardID := "2eGFXF4F4kTxd4gU39Bg3e" // string | + updateDashboardRequest := *openapiclient.NewUpdateDashboardRequest() // UpdateDashboardRequest | (optional) + + cfg := fastly.NewConfiguration() + apiClient := fastly.NewAPIClient(cfg) + ctx := fastly.NewAPIKeyContextFromEnv("FASTLY_API_TOKEN") + resp, r, err := apiClient.ObservabilityCustomDashboardsAPI.UpdateDashboard(ctx, dashboardID).UpdateDashboardRequest(updateDashboardRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ObservabilityCustomDashboardsAPI.UpdateDashboard`: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateDashboard`: Dashboard + fmt.Fprintf(os.Stdout, "Response from `ObservabilityCustomDashboardsAPI.UpdateDashboard`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**dashboardID** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateDashboardRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **updateDashboardRequest** | [**UpdateDashboardRequest**](UpdateDashboardRequest.md) | | + +### Return type + +[**Dashboard**](Dashboard.md) + +### Authorization + +[API Token](https://www.fastly.com/documentation/reference/api/#authentication) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[Back to top](#) | [Back to API list](../README.md#documentation-for-api-endpoints) | [Back to README](../README.md) diff --git a/docs/RealtimeEntryAggregated.md b/docs/RealtimeEntryAggregated.md index 8698b192..4f43c3d9 100644 --- a/docs/RealtimeEntryAggregated.md +++ b/docs/RealtimeEntryAggregated.md @@ -252,6 +252,7 @@ Name | Type | Description | Notes **AllStatus3xx** | Pointer to **int32** | Number of \"Redirection\" codes delivered for all sources. | [optional] **AllStatus4xx** | Pointer to **int32** | Number of \"Client Error\" codes delivered for all sources. | [optional] **AllStatus5xx** | Pointer to **int32** | Number of \"Server Error\" codes delivered for all sources. | [optional] +**OriginOffload** | Pointer to **float32** | Origin Offload measures the ratio of bytes served to end users that were cached by Fastly, over the bytes served to end users, between 0 and 1. ((`edge_resp_body_bytes` + `edge_resp_header_bytes`) - (`origin_fetch_resp_body_bytes` + `origin_fetch_resp_header_bytes`)) / (`edge_resp_body_bytes` + `edge_resp_header_bytes`). | [optional] ## Methods @@ -6472,5 +6473,30 @@ SetAllStatus5xx sets AllStatus5xx field to given value. HasAllStatus5xx returns a boolean if a field has been set. +### GetOriginOffload + +`func (o *RealtimeEntryAggregated) GetOriginOffload() float32` + +GetOriginOffload returns the OriginOffload field if non-nil, zero value otherwise. + +### GetOriginOffloadOk + +`func (o *RealtimeEntryAggregated) GetOriginOffloadOk() (*float32, bool)` + +GetOriginOffloadOk returns a tuple with the OriginOffload field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOriginOffload + +`func (o *RealtimeEntryAggregated) SetOriginOffload(v float32)` + +SetOriginOffload sets OriginOffload field to given value. + +### HasOriginOffload + +`func (o *RealtimeEntryAggregated) HasOriginOffload() bool` + +HasOriginOffload 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 7f5557ee..3afc473b 100644 --- a/docs/RealtimeMeasurements.md +++ b/docs/RealtimeMeasurements.md @@ -252,6 +252,7 @@ Name | Type | Description | Notes **AllStatus3xx** | Pointer to **int32** | Number of \"Redirection\" codes delivered for all sources. | [optional] **AllStatus4xx** | Pointer to **int32** | Number of \"Client Error\" codes delivered for all sources. | [optional] **AllStatus5xx** | Pointer to **int32** | Number of \"Server Error\" codes delivered for all sources. | [optional] +**OriginOffload** | Pointer to **float32** | Origin Offload measures the ratio of bytes served to end users that were cached by Fastly, over the bytes served to end users, between 0 and 1. ((`edge_resp_body_bytes` + `edge_resp_header_bytes`) - (`origin_fetch_resp_body_bytes` + `origin_fetch_resp_header_bytes`)) / (`edge_resp_body_bytes` + `edge_resp_header_bytes`). | [optional] ## Methods @@ -6472,5 +6473,30 @@ SetAllStatus5xx sets AllStatus5xx field to given value. HasAllStatus5xx returns a boolean if a field has been set. +### GetOriginOffload + +`func (o *RealtimeMeasurements) GetOriginOffload() float32` + +GetOriginOffload returns the OriginOffload field if non-nil, zero value otherwise. + +### GetOriginOffloadOk + +`func (o *RealtimeMeasurements) GetOriginOffloadOk() (*float32, bool)` + +GetOriginOffloadOk returns a tuple with the OriginOffload field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOriginOffload + +`func (o *RealtimeMeasurements) SetOriginOffload(v float32)` + +SetOriginOffload sets OriginOffload field to given value. + +### HasOriginOffload + +`func (o *RealtimeMeasurements) HasOriginOffload() bool` + +HasOriginOffload 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/RelationshipDefaultEcdsaTlsCertificate.md b/docs/RelationshipDefaultEcdsaTlsCertificate.md new file mode 100644 index 00000000..98967e19 --- /dev/null +++ b/docs/RelationshipDefaultEcdsaTlsCertificate.md @@ -0,0 +1,54 @@ +# RelationshipDefaultEcdsaTLSCertificate + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DefaultEcdsaCertificate** | Pointer to [**RelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificate**](RelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificate.md) | | [optional] + +## Methods + +### NewRelationshipDefaultEcdsaTLSCertificate + +`func NewRelationshipDefaultEcdsaTLSCertificate() *RelationshipDefaultEcdsaTLSCertificate` + +NewRelationshipDefaultEcdsaTLSCertificate instantiates a new RelationshipDefaultEcdsaTLSCertificate object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewRelationshipDefaultEcdsaTLSCertificateWithDefaults + +`func NewRelationshipDefaultEcdsaTLSCertificateWithDefaults() *RelationshipDefaultEcdsaTLSCertificate` + +NewRelationshipDefaultEcdsaTLSCertificateWithDefaults instantiates a new RelationshipDefaultEcdsaTLSCertificate object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetDefaultEcdsaCertificate + +`func (o *RelationshipDefaultEcdsaTLSCertificate) GetDefaultEcdsaCertificate() RelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificate` + +GetDefaultEcdsaCertificate returns the DefaultEcdsaCertificate field if non-nil, zero value otherwise. + +### GetDefaultEcdsaCertificateOk + +`func (o *RelationshipDefaultEcdsaTLSCertificate) GetDefaultEcdsaCertificateOk() (*RelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificate, bool)` + +GetDefaultEcdsaCertificateOk returns a tuple with the DefaultEcdsaCertificate field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDefaultEcdsaCertificate + +`func (o *RelationshipDefaultEcdsaTLSCertificate) SetDefaultEcdsaCertificate(v RelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificate)` + +SetDefaultEcdsaCertificate sets DefaultEcdsaCertificate field to given value. + +### HasDefaultEcdsaCertificate + +`func (o *RelationshipDefaultEcdsaTLSCertificate) HasDefaultEcdsaCertificate() bool` + +HasDefaultEcdsaCertificate 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/RelationshipDefaultEcdsaTlsCertificateDefaultEcdsaCertificate.md b/docs/RelationshipDefaultEcdsaTlsCertificateDefaultEcdsaCertificate.md new file mode 100644 index 00000000..b5b10208 --- /dev/null +++ b/docs/RelationshipDefaultEcdsaTlsCertificateDefaultEcdsaCertificate.md @@ -0,0 +1,54 @@ +# RelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificate + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**RelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificateData**](RelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificateData.md) | | [optional] + +## Methods + +### NewRelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificate + +`func NewRelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificate() *RelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificate` + +NewRelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificate instantiates a new RelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificate object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewRelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificateWithDefaults + +`func NewRelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificateWithDefaults() *RelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificate` + +NewRelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificateWithDefaults instantiates a new RelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificate object +This 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 *RelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificate) GetData() RelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificateData` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *RelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificate) GetDataOk() (*RelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificateData, 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 *RelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificate) SetData(v RelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificateData)` + +SetData sets Data field to given value. + +### HasData + +`func (o *RelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificate) 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/RelationshipDefaultEcdsaTlsCertificateDefaultEcdsaCertificateData.md b/docs/RelationshipDefaultEcdsaTlsCertificateDefaultEcdsaCertificateData.md new file mode 100644 index 00000000..d0ad827b --- /dev/null +++ b/docs/RelationshipDefaultEcdsaTlsCertificateDefaultEcdsaCertificateData.md @@ -0,0 +1,80 @@ +# RelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificateData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | Pointer to [**TypeTLSCertificate**](TypeTLSCertificate.md) | | [optional] [default to TYPETLSCERTIFICATE_TLS_CERTIFICATE] +**ID** | Pointer to **string** | Alphanumeric string identifying the default ECDSA TLS certificate. | [optional] + +## Methods + +### NewRelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificateData + +`func NewRelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificateData() *RelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificateData` + +NewRelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificateData instantiates a new RelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificateData object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewRelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificateDataWithDefaults + +`func NewRelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificateDataWithDefaults() *RelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificateData` + +NewRelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificateDataWithDefaults instantiates a new RelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificateData object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *RelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificateData) GetType() TypeTLSCertificate` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *RelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificateData) GetTypeOk() (*TypeTLSCertificate, 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 *RelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificateData) SetType(v TypeTLSCertificate)` + +SetType sets Type field to given value. + +### HasType + +`func (o *RelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificateData) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetID + +`func (o *RelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificateData) GetID() string` + +GetID returns the ID field if non-nil, zero value otherwise. + +### GetIDOk + +`func (o *RelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificateData) 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 *RelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificateData) SetID(v string)` + +SetID sets ID field to given value. + +### HasID + +`func (o *RelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificateData) 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/RelationshipDefaultTlsCertificate.md b/docs/RelationshipDefaultTlsCertificate.md new file mode 100644 index 00000000..5a46581d --- /dev/null +++ b/docs/RelationshipDefaultTlsCertificate.md @@ -0,0 +1,54 @@ +# RelationshipDefaultTLSCertificate + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DefaultCertificate** | Pointer to [**RelationshipDefaultTLSCertificateDefaultCertificate**](RelationshipDefaultTLSCertificateDefaultCertificate.md) | | [optional] + +## Methods + +### NewRelationshipDefaultTLSCertificate + +`func NewRelationshipDefaultTLSCertificate() *RelationshipDefaultTLSCertificate` + +NewRelationshipDefaultTLSCertificate instantiates a new RelationshipDefaultTLSCertificate object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewRelationshipDefaultTLSCertificateWithDefaults + +`func NewRelationshipDefaultTLSCertificateWithDefaults() *RelationshipDefaultTLSCertificate` + +NewRelationshipDefaultTLSCertificateWithDefaults instantiates a new RelationshipDefaultTLSCertificate object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetDefaultCertificate + +`func (o *RelationshipDefaultTLSCertificate) GetDefaultCertificate() RelationshipDefaultTLSCertificateDefaultCertificate` + +GetDefaultCertificate returns the DefaultCertificate field if non-nil, zero value otherwise. + +### GetDefaultCertificateOk + +`func (o *RelationshipDefaultTLSCertificate) GetDefaultCertificateOk() (*RelationshipDefaultTLSCertificateDefaultCertificate, bool)` + +GetDefaultCertificateOk returns a tuple with the DefaultCertificate field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDefaultCertificate + +`func (o *RelationshipDefaultTLSCertificate) SetDefaultCertificate(v RelationshipDefaultTLSCertificateDefaultCertificate)` + +SetDefaultCertificate sets DefaultCertificate field to given value. + +### HasDefaultCertificate + +`func (o *RelationshipDefaultTLSCertificate) HasDefaultCertificate() bool` + +HasDefaultCertificate 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/RelationshipDefaultTlsCertificateDefaultCertificate.md b/docs/RelationshipDefaultTlsCertificateDefaultCertificate.md new file mode 100644 index 00000000..2cce173f --- /dev/null +++ b/docs/RelationshipDefaultTlsCertificateDefaultCertificate.md @@ -0,0 +1,54 @@ +# RelationshipDefaultTLSCertificateDefaultCertificate + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**RelationshipDefaultTLSCertificateDefaultCertificateData**](RelationshipDefaultTLSCertificateDefaultCertificateData.md) | | [optional] + +## Methods + +### NewRelationshipDefaultTLSCertificateDefaultCertificate + +`func NewRelationshipDefaultTLSCertificateDefaultCertificate() *RelationshipDefaultTLSCertificateDefaultCertificate` + +NewRelationshipDefaultTLSCertificateDefaultCertificate instantiates a new RelationshipDefaultTLSCertificateDefaultCertificate object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewRelationshipDefaultTLSCertificateDefaultCertificateWithDefaults + +`func NewRelationshipDefaultTLSCertificateDefaultCertificateWithDefaults() *RelationshipDefaultTLSCertificateDefaultCertificate` + +NewRelationshipDefaultTLSCertificateDefaultCertificateWithDefaults instantiates a new RelationshipDefaultTLSCertificateDefaultCertificate object +This 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 *RelationshipDefaultTLSCertificateDefaultCertificate) GetData() RelationshipDefaultTLSCertificateDefaultCertificateData` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *RelationshipDefaultTLSCertificateDefaultCertificate) GetDataOk() (*RelationshipDefaultTLSCertificateDefaultCertificateData, 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 *RelationshipDefaultTLSCertificateDefaultCertificate) SetData(v RelationshipDefaultTLSCertificateDefaultCertificateData)` + +SetData sets Data field to given value. + +### HasData + +`func (o *RelationshipDefaultTLSCertificateDefaultCertificate) 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/RelationshipDefaultTlsCertificateDefaultCertificateData.md b/docs/RelationshipDefaultTlsCertificateDefaultCertificateData.md new file mode 100644 index 00000000..323f2bb2 --- /dev/null +++ b/docs/RelationshipDefaultTlsCertificateDefaultCertificateData.md @@ -0,0 +1,80 @@ +# RelationshipDefaultTLSCertificateDefaultCertificateData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | Pointer to [**TypeTLSCertificate**](TypeTLSCertificate.md) | | [optional] [default to TYPETLSCERTIFICATE_TLS_CERTIFICATE] +**ID** | Pointer to **string** | Alphanumeric string identifying the default TLS certificate. | [optional] + +## Methods + +### NewRelationshipDefaultTLSCertificateDefaultCertificateData + +`func NewRelationshipDefaultTLSCertificateDefaultCertificateData() *RelationshipDefaultTLSCertificateDefaultCertificateData` + +NewRelationshipDefaultTLSCertificateDefaultCertificateData instantiates a new RelationshipDefaultTLSCertificateDefaultCertificateData object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewRelationshipDefaultTLSCertificateDefaultCertificateDataWithDefaults + +`func NewRelationshipDefaultTLSCertificateDefaultCertificateDataWithDefaults() *RelationshipDefaultTLSCertificateDefaultCertificateData` + +NewRelationshipDefaultTLSCertificateDefaultCertificateDataWithDefaults instantiates a new RelationshipDefaultTLSCertificateDefaultCertificateData object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *RelationshipDefaultTLSCertificateDefaultCertificateData) GetType() TypeTLSCertificate` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *RelationshipDefaultTLSCertificateDefaultCertificateData) GetTypeOk() (*TypeTLSCertificate, 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 *RelationshipDefaultTLSCertificateDefaultCertificateData) SetType(v TypeTLSCertificate)` + +SetType sets Type field to given value. + +### HasType + +`func (o *RelationshipDefaultTLSCertificateDefaultCertificateData) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetID + +`func (o *RelationshipDefaultTLSCertificateDefaultCertificateData) GetID() string` + +GetID returns the ID field if non-nil, zero value otherwise. + +### GetIDOk + +`func (o *RelationshipDefaultTLSCertificateDefaultCertificateData) 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 *RelationshipDefaultTLSCertificateDefaultCertificateData) SetID(v string)` + +SetID sets ID field to given value. + +### HasID + +`func (o *RelationshipDefaultTLSCertificateDefaultCertificateData) 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/RelationshipTlsDnsRecord.md b/docs/RelationshipTlsDnsRecord.md deleted file mode 100644 index 820c561a..00000000 --- a/docs/RelationshipTlsDnsRecord.md +++ /dev/null @@ -1,54 +0,0 @@ -# RelationshipTLSDNSRecord - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**DNSRecord** | Pointer to [**RelationshipTLSDNSRecordDNSRecord**](RelationshipTLSDNSRecordDNSRecord.md) | | [optional] - -## Methods - -### NewRelationshipTLSDNSRecord - -`func NewRelationshipTLSDNSRecord() *RelationshipTLSDNSRecord` - -NewRelationshipTLSDNSRecord instantiates a new RelationshipTLSDNSRecord object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewRelationshipTLSDNSRecordWithDefaults - -`func NewRelationshipTLSDNSRecordWithDefaults() *RelationshipTLSDNSRecord` - -NewRelationshipTLSDNSRecordWithDefaults instantiates a new RelationshipTLSDNSRecord object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetDNSRecord - -`func (o *RelationshipTLSDNSRecord) GetDNSRecord() RelationshipTLSDNSRecordDNSRecord` - -GetDNSRecord returns the DNSRecord field if non-nil, zero value otherwise. - -### GetDNSRecordOk - -`func (o *RelationshipTLSDNSRecord) GetDNSRecordOk() (*RelationshipTLSDNSRecordDNSRecord, bool)` - -GetDNSRecordOk returns a tuple with the DNSRecord field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDNSRecord - -`func (o *RelationshipTLSDNSRecord) SetDNSRecord(v RelationshipTLSDNSRecordDNSRecord)` - -SetDNSRecord sets DNSRecord field to given value. - -### HasDNSRecord - -`func (o *RelationshipTLSDNSRecord) HasDNSRecord() bool` - -HasDNSRecord 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/RelationshipTlsDnsRecordDnsRecord.md b/docs/RelationshipTlsDnsRecordDnsRecord.md deleted file mode 100644 index 49a298b8..00000000 --- a/docs/RelationshipTlsDnsRecordDnsRecord.md +++ /dev/null @@ -1,54 +0,0 @@ -# RelationshipTLSDNSRecordDNSRecord - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Data** | Pointer to [**[]RelationshipMemberTLSDNSRecord**](RelationshipMemberTLSDNSRecord.md) | | [optional] - -## Methods - -### NewRelationshipTLSDNSRecordDNSRecord - -`func NewRelationshipTLSDNSRecordDNSRecord() *RelationshipTLSDNSRecordDNSRecord` - -NewRelationshipTLSDNSRecordDNSRecord instantiates a new RelationshipTLSDNSRecordDNSRecord object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewRelationshipTLSDNSRecordDNSRecordWithDefaults - -`func NewRelationshipTLSDNSRecordDNSRecordWithDefaults() *RelationshipTLSDNSRecordDNSRecord` - -NewRelationshipTLSDNSRecordDNSRecordWithDefaults instantiates a new RelationshipTLSDNSRecordDNSRecord object -This 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 *RelationshipTLSDNSRecordDNSRecord) GetData() []RelationshipMemberTLSDNSRecord` - -GetData returns the Data field if non-nil, zero value otherwise. - -### GetDataOk - -`func (o *RelationshipTLSDNSRecordDNSRecord) GetDataOk() (*[]RelationshipMemberTLSDNSRecord, 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 *RelationshipTLSDNSRecordDNSRecord) SetData(v []RelationshipMemberTLSDNSRecord)` - -SetData sets Data field to given value. - -### HasData - -`func (o *RelationshipTLSDNSRecordDNSRecord) 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/RelationshipTlsDnsRecords.md b/docs/RelationshipTlsDnsRecords.md deleted file mode 100644 index c02a9e31..00000000 --- a/docs/RelationshipTlsDnsRecords.md +++ /dev/null @@ -1,54 +0,0 @@ -# RelationshipTLSDNSRecords - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**DNSRecords** | Pointer to [**RelationshipTLSDNSRecordDNSRecord**](RelationshipTLSDNSRecordDNSRecord.md) | | [optional] - -## Methods - -### NewRelationshipTLSDNSRecords - -`func NewRelationshipTLSDNSRecords() *RelationshipTLSDNSRecords` - -NewRelationshipTLSDNSRecords instantiates a new RelationshipTLSDNSRecords object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewRelationshipTLSDNSRecordsWithDefaults - -`func NewRelationshipTLSDNSRecordsWithDefaults() *RelationshipTLSDNSRecords` - -NewRelationshipTLSDNSRecordsWithDefaults instantiates a new RelationshipTLSDNSRecords object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetDNSRecords - -`func (o *RelationshipTLSDNSRecords) GetDNSRecords() RelationshipTLSDNSRecordDNSRecord` - -GetDNSRecords returns the DNSRecords field if non-nil, zero value otherwise. - -### GetDNSRecordsOk - -`func (o *RelationshipTLSDNSRecords) GetDNSRecordsOk() (*RelationshipTLSDNSRecordDNSRecord, bool)` - -GetDNSRecordsOk returns a tuple with the DNSRecords field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDNSRecords - -`func (o *RelationshipTLSDNSRecords) SetDNSRecords(v RelationshipTLSDNSRecordDNSRecord)` - -SetDNSRecords sets DNSRecords field to given value. - -### HasDNSRecords - -`func (o *RelationshipTLSDNSRecords) HasDNSRecords() bool` - -HasDNSRecords 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/RelationshipTlsDnsRecordsRequest.md b/docs/RelationshipTlsDnsRecordsRequest.md new file mode 100644 index 00000000..b5f744fe --- /dev/null +++ b/docs/RelationshipTlsDnsRecordsRequest.md @@ -0,0 +1,54 @@ +# RelationshipTLSDNSRecordsRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DNSRecords** | Pointer to [**RelationshipTLSDNSRecordsRequestDNSRecords**](RelationshipTLSDNSRecordsRequestDNSRecords.md) | | [optional] + +## Methods + +### NewRelationshipTLSDNSRecordsRequest + +`func NewRelationshipTLSDNSRecordsRequest() *RelationshipTLSDNSRecordsRequest` + +NewRelationshipTLSDNSRecordsRequest instantiates a new RelationshipTLSDNSRecordsRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewRelationshipTLSDNSRecordsRequestWithDefaults + +`func NewRelationshipTLSDNSRecordsRequestWithDefaults() *RelationshipTLSDNSRecordsRequest` + +NewRelationshipTLSDNSRecordsRequestWithDefaults instantiates a new RelationshipTLSDNSRecordsRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetDNSRecords + +`func (o *RelationshipTLSDNSRecordsRequest) GetDNSRecords() RelationshipTLSDNSRecordsRequestDNSRecords` + +GetDNSRecords returns the DNSRecords field if non-nil, zero value otherwise. + +### GetDNSRecordsOk + +`func (o *RelationshipTLSDNSRecordsRequest) GetDNSRecordsOk() (*RelationshipTLSDNSRecordsRequestDNSRecords, bool)` + +GetDNSRecordsOk returns a tuple with the DNSRecords field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDNSRecords + +`func (o *RelationshipTLSDNSRecordsRequest) SetDNSRecords(v RelationshipTLSDNSRecordsRequestDNSRecords)` + +SetDNSRecords sets DNSRecords field to given value. + +### HasDNSRecords + +`func (o *RelationshipTLSDNSRecordsRequest) HasDNSRecords() bool` + +HasDNSRecords 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/RelationshipTlsDnsRecordsRequestDnsRecords.md b/docs/RelationshipTlsDnsRecordsRequestDnsRecords.md new file mode 100644 index 00000000..bd466c20 --- /dev/null +++ b/docs/RelationshipTlsDnsRecordsRequestDnsRecords.md @@ -0,0 +1,54 @@ +# RelationshipTLSDNSRecordsRequestDNSRecords + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**[]RelationshipTLSDNSRecordsRequestDNSRecordsData**](RelationshipTLSDNSRecordsRequestDNSRecordsData.md) | | [optional] + +## Methods + +### NewRelationshipTLSDNSRecordsRequestDNSRecords + +`func NewRelationshipTLSDNSRecordsRequestDNSRecords() *RelationshipTLSDNSRecordsRequestDNSRecords` + +NewRelationshipTLSDNSRecordsRequestDNSRecords instantiates a new RelationshipTLSDNSRecordsRequestDNSRecords object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewRelationshipTLSDNSRecordsRequestDNSRecordsWithDefaults + +`func NewRelationshipTLSDNSRecordsRequestDNSRecordsWithDefaults() *RelationshipTLSDNSRecordsRequestDNSRecords` + +NewRelationshipTLSDNSRecordsRequestDNSRecordsWithDefaults instantiates a new RelationshipTLSDNSRecordsRequestDNSRecords object +This 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 *RelationshipTLSDNSRecordsRequestDNSRecords) GetData() []RelationshipTLSDNSRecordsRequestDNSRecordsData` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *RelationshipTLSDNSRecordsRequestDNSRecords) GetDataOk() (*[]RelationshipTLSDNSRecordsRequestDNSRecordsData, 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 *RelationshipTLSDNSRecordsRequestDNSRecords) SetData(v []RelationshipTLSDNSRecordsRequestDNSRecordsData)` + +SetData sets Data field to given value. + +### HasData + +`func (o *RelationshipTLSDNSRecordsRequestDNSRecords) 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/RelationshipTlsDnsRecordsRequestDnsRecordsData.md b/docs/RelationshipTlsDnsRecordsRequestDnsRecordsData.md new file mode 100644 index 00000000..dbfa8db6 --- /dev/null +++ b/docs/RelationshipTlsDnsRecordsRequestDnsRecordsData.md @@ -0,0 +1,80 @@ +# RelationshipTLSDNSRecordsRequestDNSRecordsData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | Pointer to [**TypeTLSDNSRecord**](TypeTLSDNSRecord.md) | | [optional] [default to TYPETLSDNSRECORD_DNS_RECORD] +**ID** | Pointer to **string** | | [optional] + +## Methods + +### NewRelationshipTLSDNSRecordsRequestDNSRecordsData + +`func NewRelationshipTLSDNSRecordsRequestDNSRecordsData() *RelationshipTLSDNSRecordsRequestDNSRecordsData` + +NewRelationshipTLSDNSRecordsRequestDNSRecordsData instantiates a new RelationshipTLSDNSRecordsRequestDNSRecordsData object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewRelationshipTLSDNSRecordsRequestDNSRecordsDataWithDefaults + +`func NewRelationshipTLSDNSRecordsRequestDNSRecordsDataWithDefaults() *RelationshipTLSDNSRecordsRequestDNSRecordsData` + +NewRelationshipTLSDNSRecordsRequestDNSRecordsDataWithDefaults instantiates a new RelationshipTLSDNSRecordsRequestDNSRecordsData object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *RelationshipTLSDNSRecordsRequestDNSRecordsData) GetType() TypeTLSDNSRecord` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *RelationshipTLSDNSRecordsRequestDNSRecordsData) GetTypeOk() (*TypeTLSDNSRecord, 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 *RelationshipTLSDNSRecordsRequestDNSRecordsData) SetType(v TypeTLSDNSRecord)` + +SetType sets Type field to given value. + +### HasType + +`func (o *RelationshipTLSDNSRecordsRequestDNSRecordsData) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetID + +`func (o *RelationshipTLSDNSRecordsRequestDNSRecordsData) GetID() string` + +GetID returns the ID field if non-nil, zero value otherwise. + +### GetIDOk + +`func (o *RelationshipTLSDNSRecordsRequestDNSRecordsData) 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 *RelationshipTLSDNSRecordsRequestDNSRecordsData) SetID(v string)` + +SetID sets ID field to given value. + +### HasID + +`func (o *RelationshipTLSDNSRecordsRequestDNSRecordsData) 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/RelationshipTlsDnsRecordsResponse.md b/docs/RelationshipTlsDnsRecordsResponse.md new file mode 100644 index 00000000..4647cfeb --- /dev/null +++ b/docs/RelationshipTlsDnsRecordsResponse.md @@ -0,0 +1,54 @@ +# RelationshipTLSDNSRecordsResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DNSRecords** | Pointer to [**RelationshipTLSDNSRecordsResponseDNSRecords**](RelationshipTLSDNSRecordsResponseDNSRecords.md) | | [optional] + +## Methods + +### NewRelationshipTLSDNSRecordsResponse + +`func NewRelationshipTLSDNSRecordsResponse() *RelationshipTLSDNSRecordsResponse` + +NewRelationshipTLSDNSRecordsResponse instantiates a new RelationshipTLSDNSRecordsResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewRelationshipTLSDNSRecordsResponseWithDefaults + +`func NewRelationshipTLSDNSRecordsResponseWithDefaults() *RelationshipTLSDNSRecordsResponse` + +NewRelationshipTLSDNSRecordsResponseWithDefaults instantiates a new RelationshipTLSDNSRecordsResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetDNSRecords + +`func (o *RelationshipTLSDNSRecordsResponse) GetDNSRecords() RelationshipTLSDNSRecordsResponseDNSRecords` + +GetDNSRecords returns the DNSRecords field if non-nil, zero value otherwise. + +### GetDNSRecordsOk + +`func (o *RelationshipTLSDNSRecordsResponse) GetDNSRecordsOk() (*RelationshipTLSDNSRecordsResponseDNSRecords, bool)` + +GetDNSRecordsOk returns a tuple with the DNSRecords field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDNSRecords + +`func (o *RelationshipTLSDNSRecordsResponse) SetDNSRecords(v RelationshipTLSDNSRecordsResponseDNSRecords)` + +SetDNSRecords sets DNSRecords field to given value. + +### HasDNSRecords + +`func (o *RelationshipTLSDNSRecordsResponse) HasDNSRecords() bool` + +HasDNSRecords 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/RelationshipTlsDnsRecordsResponseDnsRecords.md b/docs/RelationshipTlsDnsRecordsResponseDnsRecords.md new file mode 100644 index 00000000..297ceac5 --- /dev/null +++ b/docs/RelationshipTlsDnsRecordsResponseDnsRecords.md @@ -0,0 +1,54 @@ +# RelationshipTLSDNSRecordsResponseDNSRecords + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**[]RelationshipTLSDNSRecordsResponseDNSRecordsData**](RelationshipTLSDNSRecordsResponseDNSRecordsData.md) | | [optional] + +## Methods + +### NewRelationshipTLSDNSRecordsResponseDNSRecords + +`func NewRelationshipTLSDNSRecordsResponseDNSRecords() *RelationshipTLSDNSRecordsResponseDNSRecords` + +NewRelationshipTLSDNSRecordsResponseDNSRecords instantiates a new RelationshipTLSDNSRecordsResponseDNSRecords object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewRelationshipTLSDNSRecordsResponseDNSRecordsWithDefaults + +`func NewRelationshipTLSDNSRecordsResponseDNSRecordsWithDefaults() *RelationshipTLSDNSRecordsResponseDNSRecords` + +NewRelationshipTLSDNSRecordsResponseDNSRecordsWithDefaults instantiates a new RelationshipTLSDNSRecordsResponseDNSRecords object +This 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 *RelationshipTLSDNSRecordsResponseDNSRecords) GetData() []RelationshipTLSDNSRecordsResponseDNSRecordsData` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *RelationshipTLSDNSRecordsResponseDNSRecords) GetDataOk() (*[]RelationshipTLSDNSRecordsResponseDNSRecordsData, 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 *RelationshipTLSDNSRecordsResponseDNSRecords) SetData(v []RelationshipTLSDNSRecordsResponseDNSRecordsData)` + +SetData sets Data field to given value. + +### HasData + +`func (o *RelationshipTLSDNSRecordsResponseDNSRecords) 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/RelationshipMemberTlsDnsRecord.md b/docs/RelationshipTlsDnsRecordsResponseDnsRecordsData.md similarity index 52% rename from docs/RelationshipMemberTlsDnsRecord.md rename to docs/RelationshipTlsDnsRecordsResponseDnsRecordsData.md index 82a0c7fa..1b1b9b97 100644 --- a/docs/RelationshipMemberTlsDnsRecord.md +++ b/docs/RelationshipTlsDnsRecordsResponseDnsRecordsData.md @@ -1,4 +1,4 @@ -# RelationshipMemberTLSDNSRecord +# RelationshipTLSDNSRecordsResponseDNSRecordsData ## Properties @@ -9,70 +9,70 @@ Name | Type | Description | Notes ## Methods -### NewRelationshipMemberTLSDNSRecord +### NewRelationshipTLSDNSRecordsResponseDNSRecordsData -`func NewRelationshipMemberTLSDNSRecord() *RelationshipMemberTLSDNSRecord` +`func NewRelationshipTLSDNSRecordsResponseDNSRecordsData() *RelationshipTLSDNSRecordsResponseDNSRecordsData` -NewRelationshipMemberTLSDNSRecord instantiates a new RelationshipMemberTLSDNSRecord object +NewRelationshipTLSDNSRecordsResponseDNSRecordsData instantiates a new RelationshipTLSDNSRecordsResponseDNSRecordsData object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed -### NewRelationshipMemberTLSDNSRecordWithDefaults +### NewRelationshipTLSDNSRecordsResponseDNSRecordsDataWithDefaults -`func NewRelationshipMemberTLSDNSRecordWithDefaults() *RelationshipMemberTLSDNSRecord` +`func NewRelationshipTLSDNSRecordsResponseDNSRecordsDataWithDefaults() *RelationshipTLSDNSRecordsResponseDNSRecordsData` -NewRelationshipMemberTLSDNSRecordWithDefaults instantiates a new RelationshipMemberTLSDNSRecord object +NewRelationshipTLSDNSRecordsResponseDNSRecordsDataWithDefaults instantiates a new RelationshipTLSDNSRecordsResponseDNSRecordsData object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetType -`func (o *RelationshipMemberTLSDNSRecord) GetType() TypeTLSDNSRecord` +`func (o *RelationshipTLSDNSRecordsResponseDNSRecordsData) GetType() TypeTLSDNSRecord` GetType returns the Type field if non-nil, zero value otherwise. ### GetTypeOk -`func (o *RelationshipMemberTLSDNSRecord) GetTypeOk() (*TypeTLSDNSRecord, bool)` +`func (o *RelationshipTLSDNSRecordsResponseDNSRecordsData) GetTypeOk() (*TypeTLSDNSRecord, 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 *RelationshipMemberTLSDNSRecord) SetType(v TypeTLSDNSRecord)` +`func (o *RelationshipTLSDNSRecordsResponseDNSRecordsData) SetType(v TypeTLSDNSRecord)` SetType sets Type field to given value. ### HasType -`func (o *RelationshipMemberTLSDNSRecord) HasType() bool` +`func (o *RelationshipTLSDNSRecordsResponseDNSRecordsData) HasType() bool` HasType returns a boolean if a field has been set. ### GetID -`func (o *RelationshipMemberTLSDNSRecord) GetID() string` +`func (o *RelationshipTLSDNSRecordsResponseDNSRecordsData) GetID() string` GetID returns the ID field if non-nil, zero value otherwise. ### GetIDOk -`func (o *RelationshipMemberTLSDNSRecord) GetIDOk() (*string, bool)` +`func (o *RelationshipTLSDNSRecordsResponseDNSRecordsData) 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 *RelationshipMemberTLSDNSRecord) SetID(v string)` +`func (o *RelationshipTLSDNSRecordsResponseDNSRecordsData) SetID(v string)` SetID sets ID field to given value. ### HasID -`func (o *RelationshipMemberTLSDNSRecord) HasID() bool` +`func (o *RelationshipTLSDNSRecordsResponseDNSRecordsData) HasID() bool` HasID returns a boolean if a field has been set. diff --git a/docs/Results.md b/docs/Results.md index c84b7eb7..13583421 100644 --- a/docs/Results.md +++ b/docs/Results.md @@ -252,6 +252,7 @@ Name | Type | Description | Notes **AllStatus3xx** | Pointer to **int32** | Number of \"Redirection\" codes delivered for all sources. | [optional] **AllStatus4xx** | Pointer to **int32** | Number of \"Client Error\" codes delivered for all sources. | [optional] **AllStatus5xx** | Pointer to **int32** | Number of \"Server Error\" codes delivered for all sources. | [optional] +**OriginOffload** | Pointer to **float32** | Origin Offload measures the ratio of bytes served to end users that were cached by Fastly, over the bytes served to end users, between 0 and 1. ((`edge_resp_body_bytes` + `edge_resp_header_bytes`) - (`origin_fetch_resp_body_bytes` + `origin_fetch_resp_header_bytes`)) / (`edge_resp_body_bytes` + `edge_resp_header_bytes`). | [optional] **ServiceID** | Pointer to **string** | | [optional] [readonly] **StartTime** | Pointer to **int32** | Timestamp for the start of the time period being reported | [optional] @@ -6484,6 +6485,31 @@ SetAllStatus5xx sets AllStatus5xx field to given value. HasAllStatus5xx returns a boolean if a field has been set. +### GetOriginOffload + +`func (o *Results) GetOriginOffload() float32` + +GetOriginOffload returns the OriginOffload field if non-nil, zero value otherwise. + +### GetOriginOffloadOk + +`func (o *Results) GetOriginOffloadOk() (*float32, bool)` + +GetOriginOffloadOk returns a tuple with the OriginOffload field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOriginOffload + +`func (o *Results) SetOriginOffload(v float32)` + +SetOriginOffload sets OriginOffload field to given value. + +### HasOriginOffload + +`func (o *Results) HasOriginOffload() bool` + +HasOriginOffload returns a boolean if a field has been set. + ### GetServiceID `func (o *Results) GetServiceID() string` diff --git a/docs/Serviceusagemetric.md b/docs/Serviceusagemetric.md new file mode 100644 index 00000000..8d5b8350 --- /dev/null +++ b/docs/Serviceusagemetric.md @@ -0,0 +1,132 @@ +# Serviceusagemetric + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CustomerID** | Pointer to **string** | | [optional] [readonly] +**ServiceID** | Pointer to **string** | Service ID associated with the usage. | [optional] +**ServiceName** | Pointer to **string** | Name of the service associated with the usage. | [optional] +**UsageUnits** | Pointer to **float32** | The quantity of the usage for the billing period. Amount will be in the units provided in the parent object (e.g., a quantity of `1.3` with a unit of `gb` would have a usage amount of 1.3 gigabytes). | [optional] + +## Methods + +### NewServiceusagemetric + +`func NewServiceusagemetric() *Serviceusagemetric` + +NewServiceusagemetric instantiates a new Serviceusagemetric object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewServiceusagemetricWithDefaults + +`func NewServiceusagemetricWithDefaults() *Serviceusagemetric` + +NewServiceusagemetricWithDefaults instantiates a new Serviceusagemetric object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCustomerID + +`func (o *Serviceusagemetric) GetCustomerID() string` + +GetCustomerID returns the CustomerID field if non-nil, zero value otherwise. + +### GetCustomerIDOk + +`func (o *Serviceusagemetric) GetCustomerIDOk() (*string, bool)` + +GetCustomerIDOk returns a tuple with the CustomerID field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCustomerID + +`func (o *Serviceusagemetric) SetCustomerID(v string)` + +SetCustomerID sets CustomerID field to given value. + +### HasCustomerID + +`func (o *Serviceusagemetric) HasCustomerID() bool` + +HasCustomerID returns a boolean if a field has been set. + +### GetServiceID + +`func (o *Serviceusagemetric) GetServiceID() string` + +GetServiceID returns the ServiceID field if non-nil, zero value otherwise. + +### GetServiceIDOk + +`func (o *Serviceusagemetric) 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 *Serviceusagemetric) SetServiceID(v string)` + +SetServiceID sets ServiceID field to given value. + +### HasServiceID + +`func (o *Serviceusagemetric) HasServiceID() bool` + +HasServiceID returns a boolean if a field has been set. + +### GetServiceName + +`func (o *Serviceusagemetric) GetServiceName() string` + +GetServiceName returns the ServiceName field if non-nil, zero value otherwise. + +### GetServiceNameOk + +`func (o *Serviceusagemetric) GetServiceNameOk() (*string, bool)` + +GetServiceNameOk returns a tuple with the ServiceName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetServiceName + +`func (o *Serviceusagemetric) SetServiceName(v string)` + +SetServiceName sets ServiceName field to given value. + +### HasServiceName + +`func (o *Serviceusagemetric) HasServiceName() bool` + +HasServiceName returns a boolean if a field has been set. + +### GetUsageUnits + +`func (o *Serviceusagemetric) GetUsageUnits() float32` + +GetUsageUnits returns the UsageUnits field if non-nil, zero value otherwise. + +### GetUsageUnitsOk + +`func (o *Serviceusagemetric) GetUsageUnitsOk() (*float32, bool)` + +GetUsageUnitsOk returns a tuple with the UsageUnits field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUsageUnits + +`func (o *Serviceusagemetric) SetUsageUnits(v float32)` + +SetUsageUnits sets UsageUnits field to given value. + +### HasUsageUnits + +`func (o *Serviceusagemetric) HasUsageUnits() bool` + +HasUsageUnits 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/Serviceusagemetrics.md b/docs/Serviceusagemetrics.md new file mode 100644 index 00000000..bf9750fb --- /dev/null +++ b/docs/Serviceusagemetrics.md @@ -0,0 +1,54 @@ +# Serviceusagemetrics + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**ServiceusagemetricsData**](ServiceusagemetricsData.md) | | [optional] + +## Methods + +### NewServiceusagemetrics + +`func NewServiceusagemetrics() *Serviceusagemetrics` + +NewServiceusagemetrics instantiates a new Serviceusagemetrics object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewServiceusagemetricsWithDefaults + +`func NewServiceusagemetricsWithDefaults() *Serviceusagemetrics` + +NewServiceusagemetricsWithDefaults instantiates a new Serviceusagemetrics object +This 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 *Serviceusagemetrics) GetData() ServiceusagemetricsData` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *Serviceusagemetrics) GetDataOk() (*ServiceusagemetricsData, 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 *Serviceusagemetrics) SetData(v ServiceusagemetricsData)` + +SetData sets Data field to given value. + +### HasData + +`func (o *Serviceusagemetrics) 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/ServiceusagemetricsData.md b/docs/ServiceusagemetricsData.md new file mode 100644 index 00000000..ae9143ef --- /dev/null +++ b/docs/ServiceusagemetricsData.md @@ -0,0 +1,210 @@ +# ServiceusagemetricsData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CustomerID** | Pointer to **string** | | [optional] [readonly] +**StartTime** | Pointer to **time.Time** | Date and time (in ISO 8601 format) for initiation point of a billing cycle, signifying the start of charges for a service or subscription. | [optional] +**EndTime** | Pointer to **time.Time** | Date and time (in ISO 8601 format) for termination point of a billing cycle, signifying the end of charges for a service or subscription. | [optional] +**UsageType** | Pointer to **string** | The usage type identifier for the usage. This is a single, billable metric for the product. | [optional] +**Unit** | Pointer to **string** | The unit for the usage as shown on an invoice. If there is no explicit unit, this field will be \"unit\" (e.g., a request with `product_id` of 'cdn_usage' and `usage_type` of 'North America Requests' has no unit, and will return \"unit\"). | [optional] +**Details** | Pointer to [**[]Serviceusagemetric**](Serviceusagemetric.md) | | [optional] +**Meta** | Pointer to [**Metadata**](Metadata.md) | | [optional] + +## Methods + +### NewServiceusagemetricsData + +`func NewServiceusagemetricsData() *ServiceusagemetricsData` + +NewServiceusagemetricsData instantiates a new ServiceusagemetricsData object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewServiceusagemetricsDataWithDefaults + +`func NewServiceusagemetricsDataWithDefaults() *ServiceusagemetricsData` + +NewServiceusagemetricsDataWithDefaults instantiates a new ServiceusagemetricsData object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCustomerID + +`func (o *ServiceusagemetricsData) GetCustomerID() string` + +GetCustomerID returns the CustomerID field if non-nil, zero value otherwise. + +### GetCustomerIDOk + +`func (o *ServiceusagemetricsData) GetCustomerIDOk() (*string, bool)` + +GetCustomerIDOk returns a tuple with the CustomerID field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCustomerID + +`func (o *ServiceusagemetricsData) SetCustomerID(v string)` + +SetCustomerID sets CustomerID field to given value. + +### HasCustomerID + +`func (o *ServiceusagemetricsData) HasCustomerID() bool` + +HasCustomerID returns a boolean if a field has been set. + +### GetStartTime + +`func (o *ServiceusagemetricsData) GetStartTime() time.Time` + +GetStartTime returns the StartTime field if non-nil, zero value otherwise. + +### GetStartTimeOk + +`func (o *ServiceusagemetricsData) GetStartTimeOk() (*time.Time, bool)` + +GetStartTimeOk returns a tuple with the StartTime field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStartTime + +`func (o *ServiceusagemetricsData) SetStartTime(v time.Time)` + +SetStartTime sets StartTime field to given value. + +### HasStartTime + +`func (o *ServiceusagemetricsData) HasStartTime() bool` + +HasStartTime returns a boolean if a field has been set. + +### GetEndTime + +`func (o *ServiceusagemetricsData) GetEndTime() time.Time` + +GetEndTime returns the EndTime field if non-nil, zero value otherwise. + +### GetEndTimeOk + +`func (o *ServiceusagemetricsData) GetEndTimeOk() (*time.Time, bool)` + +GetEndTimeOk returns a tuple with the EndTime field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEndTime + +`func (o *ServiceusagemetricsData) SetEndTime(v time.Time)` + +SetEndTime sets EndTime field to given value. + +### HasEndTime + +`func (o *ServiceusagemetricsData) HasEndTime() bool` + +HasEndTime returns a boolean if a field has been set. + +### GetUsageType + +`func (o *ServiceusagemetricsData) GetUsageType() string` + +GetUsageType returns the UsageType field if non-nil, zero value otherwise. + +### GetUsageTypeOk + +`func (o *ServiceusagemetricsData) GetUsageTypeOk() (*string, bool)` + +GetUsageTypeOk returns a tuple with the UsageType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUsageType + +`func (o *ServiceusagemetricsData) SetUsageType(v string)` + +SetUsageType sets UsageType field to given value. + +### HasUsageType + +`func (o *ServiceusagemetricsData) HasUsageType() bool` + +HasUsageType returns a boolean if a field has been set. + +### GetUnit + +`func (o *ServiceusagemetricsData) GetUnit() string` + +GetUnit returns the Unit field if non-nil, zero value otherwise. + +### GetUnitOk + +`func (o *ServiceusagemetricsData) GetUnitOk() (*string, bool)` + +GetUnitOk returns a tuple with the Unit field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUnit + +`func (o *ServiceusagemetricsData) SetUnit(v string)` + +SetUnit sets Unit field to given value. + +### HasUnit + +`func (o *ServiceusagemetricsData) HasUnit() bool` + +HasUnit returns a boolean if a field has been set. + +### GetDetails + +`func (o *ServiceusagemetricsData) GetDetails() []Serviceusagemetric` + +GetDetails returns the Details field if non-nil, zero value otherwise. + +### GetDetailsOk + +`func (o *ServiceusagemetricsData) GetDetailsOk() (*[]Serviceusagemetric, bool)` + +GetDetailsOk returns a tuple with the Details field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDetails + +`func (o *ServiceusagemetricsData) SetDetails(v []Serviceusagemetric)` + +SetDetails sets Details field to given value. + +### HasDetails + +`func (o *ServiceusagemetricsData) HasDetails() bool` + +HasDetails returns a boolean if a field has been set. + +### GetMeta + +`func (o *ServiceusagemetricsData) GetMeta() Metadata` + +GetMeta returns the Meta field if non-nil, zero value otherwise. + +### GetMetaOk + +`func (o *ServiceusagemetricsData) GetMetaOk() (*Metadata, 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 *ServiceusagemetricsData) SetMeta(v Metadata)` + +SetMeta sets Meta field to given value. + +### HasMeta + +`func (o *ServiceusagemetricsData) HasMeta() bool` + +HasMeta 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/Serviceusagetype.md b/docs/Serviceusagetype.md new file mode 100644 index 00000000..39978780 --- /dev/null +++ b/docs/Serviceusagetype.md @@ -0,0 +1,80 @@ +# Serviceusagetype + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ProductID** | Pointer to **string** | The product identifier associated with the usage type. This corresponds to a Fastly product offering. | [optional] +**Name** | Pointer to **string** | Full name of the product usage type as it might appear on a customer's invoice. | [optional] + +## Methods + +### NewServiceusagetype + +`func NewServiceusagetype() *Serviceusagetype` + +NewServiceusagetype instantiates a new Serviceusagetype object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewServiceusagetypeWithDefaults + +`func NewServiceusagetypeWithDefaults() *Serviceusagetype` + +NewServiceusagetypeWithDefaults instantiates a new Serviceusagetype object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetProductID + +`func (o *Serviceusagetype) GetProductID() string` + +GetProductID returns the ProductID field if non-nil, zero value otherwise. + +### GetProductIDOk + +`func (o *Serviceusagetype) GetProductIDOk() (*string, bool)` + +GetProductIDOk returns a tuple with the ProductID field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProductID + +`func (o *Serviceusagetype) SetProductID(v string)` + +SetProductID sets ProductID field to given value. + +### HasProductID + +`func (o *Serviceusagetype) HasProductID() bool` + +HasProductID returns a boolean if a field has been set. + +### GetName + +`func (o *Serviceusagetype) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *Serviceusagetype) 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 *Serviceusagetype) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *Serviceusagetype) HasName() bool` + +HasName 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/Serviceusagetypes.md b/docs/Serviceusagetypes.md new file mode 100644 index 00000000..2fd5ed84 --- /dev/null +++ b/docs/Serviceusagetypes.md @@ -0,0 +1,54 @@ +# Serviceusagetypes + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**[]Serviceusagetype**](Serviceusagetype.md) | | [optional] + +## Methods + +### NewServiceusagetypes + +`func NewServiceusagetypes() *Serviceusagetypes` + +NewServiceusagetypes instantiates a new Serviceusagetypes object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewServiceusagetypesWithDefaults + +`func NewServiceusagetypesWithDefaults() *Serviceusagetypes` + +NewServiceusagetypesWithDefaults instantiates a new Serviceusagetypes object +This 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 *Serviceusagetypes) GetData() []Serviceusagetype` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *Serviceusagetypes) GetDataOk() (*[]Serviceusagetype, 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 *Serviceusagetypes) SetData(v []Serviceusagetype)` + +SetData sets Data field to given value. + +### HasData + +`func (o *Serviceusagetypes) 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/TlsCertificateBlobResponse.md b/docs/TlsCertificateBlobResponse.md new file mode 100644 index 00000000..7b9bacb5 --- /dev/null +++ b/docs/TlsCertificateBlobResponse.md @@ -0,0 +1,54 @@ +# TLSCertificateBlobResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CertBlob** | Pointer to **string** | A certificate blob | [optional] [readonly] + +## Methods + +### NewTLSCertificateBlobResponse + +`func NewTLSCertificateBlobResponse() *TLSCertificateBlobResponse` + +NewTLSCertificateBlobResponse instantiates a new TLSCertificateBlobResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTLSCertificateBlobResponseWithDefaults + +`func NewTLSCertificateBlobResponseWithDefaults() *TLSCertificateBlobResponse` + +NewTLSCertificateBlobResponseWithDefaults instantiates a new TLSCertificateBlobResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCertBlob + +`func (o *TLSCertificateBlobResponse) GetCertBlob() string` + +GetCertBlob returns the CertBlob field if non-nil, zero value otherwise. + +### GetCertBlobOk + +`func (o *TLSCertificateBlobResponse) GetCertBlobOk() (*string, bool)` + +GetCertBlobOk returns a tuple with the CertBlob field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCertBlob + +`func (o *TLSCertificateBlobResponse) SetCertBlob(v string)` + +SetCertBlob sets CertBlob field to given value. + +### HasCertBlob + +`func (o *TLSCertificateBlobResponse) HasCertBlob() bool` + +HasCertBlob 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/TlsCertificatesAPI.md b/docs/TlsCertificatesAPI.md index 55e14dd6..66bdb656 100644 --- a/docs/TlsCertificatesAPI.md +++ b/docs/TlsCertificatesAPI.md @@ -8,6 +8,7 @@ Method | HTTP request | Description [**CreateTLSCert**](TlsCertificatesAPI.md#CreateTLSCert) | **POST** `/tls/certificates` | Create a TLS certificate [**DeleteTLSCert**](TlsCertificatesAPI.md#DeleteTLSCert) | **DELETE** `/tls/certificates/{tls_certificate_id}` | Delete a TLS certificate [**GetTLSCert**](TlsCertificatesAPI.md#GetTLSCert) | **GET** `/tls/certificates/{tls_certificate_id}` | Get a TLS certificate +[**GetTLSCertBlob**](TlsCertificatesAPI.md#GetTLSCertBlob) | **GET** `/tls/certificates/{tls_certificate_id}/blob` | Get a TLS certificate blob (Limited Availability) [**ListTLSCerts**](TlsCertificatesAPI.md#ListTLSCerts) | **GET** `/tls/certificates` | List TLS certificates [**UpdateTLSCert**](TlsCertificatesAPI.md#UpdateTLSCert) | **PATCH** `/tls/certificates/{tls_certificate_id}` | Update a TLS certificate @@ -208,6 +209,73 @@ Name | Type | Description | Notes [Back to top](#) | [Back to API list](../README.md#documentation-for-api-endpoints) | [Back to README](../README.md) +## GetTLSCertBlob + +Get a TLS certificate blob (Limited Availability) + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + "github.com/fastly/fastly-go/fastly" +) + +func main() { + tlsCertificateID := "tlsCertificateId_example" // string | Alphanumeric string identifying a TLS certificate. + + cfg := fastly.NewConfiguration() + apiClient := fastly.NewAPIClient(cfg) + ctx := fastly.NewAPIKeyContextFromEnv("FASTLY_API_TOKEN") + resp, r, err := apiClient.TLSCertificatesAPI.GetTLSCertBlob(ctx, tlsCertificateID).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TLSCertificatesAPI.GetTLSCertBlob`: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetTLSCertBlob`: TLSCertificateBlobResponse + fmt.Fprintf(os.Stdout, "Response from `TLSCertificatesAPI.GetTLSCertBlob`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**tlsCertificateID** | **string** | Alphanumeric string identifying a TLS certificate. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetTLSCertBlobRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**TLSCertificateBlobResponse**](TlsCertificateBlobResponse.md) + +### Authorization + +[API Token](https://www.fastly.com/documentation/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) + + ## ListTLSCerts List TLS certificates diff --git a/docs/TlsDnsRecord.md b/docs/TlsDnsRecord.md index 31d70735..1f85a68c 100644 --- a/docs/TlsDnsRecord.md +++ b/docs/TlsDnsRecord.md @@ -4,8 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ID** | Pointer to **string** | The IP address or hostname of the DNS record. | [optional] -**Region** | Pointer to **string** | Specifies the regions that will be used to route traffic. Select DNS Records with a `global` region to route traffic to the most performant point of presence (POP) worldwide (global pricing will apply). Select DNS records with a `us-eu` region to exclusively land traffic on North American and European POPs. | [optional] +**Region** | Pointer to **string** | Specifies the regions that will be used to route traffic. Select DNS records with a `global` region to route traffic to the most performant point of presence (POP) worldwide (global pricing will apply). Select DNS records with a `na/eu` region to exclusively land traffic on North American and European POPs. | [optional] **RecordType** | Pointer to **string** | The type of the DNS record. `A` specifies an IPv4 address to be used for an A record to be used for apex domains (e.g., `example.com`). `AAAA` specifies an IPv6 address for use in an A record for apex domains. `CNAME` specifies the hostname to be used for a CNAME record for subdomains or wildcard domains (e.g., `www.example.com` or `*.example.com`). | [optional] ## Methods @@ -27,31 +26,6 @@ NewTLSDNSRecordWithDefaults instantiates a new TLSDNSRecord object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set -### GetID - -`func (o *TLSDNSRecord) GetID() string` - -GetID returns the ID field if non-nil, zero value otherwise. - -### GetIDOk - -`func (o *TLSDNSRecord) 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 *TLSDNSRecord) SetID(v string)` - -SetID sets ID field to given value. - -### HasID - -`func (o *TLSDNSRecord) HasID() bool` - -HasID returns a boolean if a field has been set. - ### GetRegion `func (o *TLSDNSRecord) GetRegion() string` diff --git a/docs/UpdateDashboardRequest.md b/docs/UpdateDashboardRequest.md new file mode 100644 index 00000000..c306dc76 --- /dev/null +++ b/docs/UpdateDashboardRequest.md @@ -0,0 +1,116 @@ +# UpdateDashboardRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **string** | A human-readable name | [optional] +**Description** | Pointer to **string** | A short description of the dashboard | [optional] +**Items** | Pointer to [**[]DashboardItem**](DashboardItem.md) | A list of [dashboard items](#dashboard-item). | [optional] + +## Methods + +### NewUpdateDashboardRequest + +`func NewUpdateDashboardRequest() *UpdateDashboardRequest` + +NewUpdateDashboardRequest instantiates a new UpdateDashboardRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewUpdateDashboardRequestWithDefaults + +`func NewUpdateDashboardRequestWithDefaults() *UpdateDashboardRequest` + +NewUpdateDashboardRequestWithDefaults instantiates a new UpdateDashboardRequest object +This 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 *UpdateDashboardRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *UpdateDashboardRequest) 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 *UpdateDashboardRequest) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *UpdateDashboardRequest) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetDescription + +`func (o *UpdateDashboardRequest) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *UpdateDashboardRequest) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *UpdateDashboardRequest) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *UpdateDashboardRequest) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetItems + +`func (o *UpdateDashboardRequest) GetItems() []DashboardItem` + +GetItems returns the Items field if non-nil, zero value otherwise. + +### GetItemsOk + +`func (o *UpdateDashboardRequest) GetItemsOk() (*[]DashboardItem, bool)` + +GetItemsOk returns a tuple with the Items field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetItems + +`func (o *UpdateDashboardRequest) SetItems(v []DashboardItem)` + +SetItems sets Items field to given value. + +### HasItems + +`func (o *UpdateDashboardRequest) HasItems() bool` + +HasItems returns a boolean if a field has been set. + +### SetItemsNil + +`func (o *UpdateDashboardRequest) SetItemsNil(b bool)` + + SetItemsNil sets the value for Items to be an explicit nil + +### UnsetItems +`func (o *UpdateDashboardRequest) UnsetItems()` + +UnsetItems ensures that no value is present for Items, not even an explicit nil + +[Back to API list](../README.md#documentation-for-api-endpoints) | [Back to README](../README.md) diff --git a/docs/Values.md b/docs/Values.md index b7564905..e5571fe9 100644 --- a/docs/Values.md +++ b/docs/Values.md @@ -42,7 +42,7 @@ Name | Type | Description | Notes **OriginFetchRespBodyBytes** | Pointer to **int32** | Total body bytes received from origin. | [optional] **Bandwidth** | Pointer to **int32** | Total bytes delivered (`resp_header_bytes` + `resp_body_bytes` + `bereq_header_bytes` + `bereq_body_bytes`). | [optional] **EdgeHitRatio** | Pointer to **float32** | Ratio of cache hits to cache misses at the edge, between 0 and 1 (`edge_hit_requests` / (`edge_hit_requests` + `edge_miss_requests`)). | [optional] -**OriginOffload** | Pointer to **float32** | Ratio of response bytes delivered from the edge compared to what is delivered from origin, between 0 and 1. (`edge_resp_body_bytes` + `edge_resp_header_bytes`) / (`origin_fetch_resp_body_bytes` + `origin_fetch_resp_header_bytes` + `edge_resp_body_bytes` + `edge_resp_header_bytes`). | [optional] +**OriginOffload** | Pointer to **float32** | Origin Offload measures the ratio of bytes served to end users that were cached by Fastly, over the bytes served to end users, between 0 and 1. ((`edge_resp_body_bytes` + `edge_resp_header_bytes`) - (`origin_fetch_resp_body_bytes` + `origin_fetch_resp_header_bytes`)) / (`edge_resp_body_bytes` + `edge_resp_header_bytes`). Previously, Origin Offload used a different formula. [Learn more](https://www.fastly.com/documentation/reference/changes/2024/06/add-origin_offload-metric). | [optional] **OriginStatus200** | Pointer to **int32** | Number of responses received from origin with status code 200 (Success). | [optional] **OriginStatus204** | Pointer to **int32** | Number of responses received from origin with status code 204 (No Content). | [optional] **OriginStatus206** | Pointer to **int32** | Number of responses received from origin with status code 206 (Partial Content). | [optional] diff --git a/fastly/api_billing_invoices.go b/fastly/api_billing_invoices.go index 2ab1aae4..899ff5df 100644 --- a/fastly/api_billing_invoices.go +++ b/fastly/api_billing_invoices.go @@ -43,8 +43,22 @@ type BillingInvoicesAPI interface { GetInvoiceByInvoiceID(ctx context.Context, invoiceID string) APIGetInvoiceByInvoiceIDRequest // GetInvoiceByInvoiceIDExecute executes the request - // @return InvoiceResponse - GetInvoiceByInvoiceIDExecute(r APIGetInvoiceByInvoiceIDRequest) (*InvoiceResponse, *http.Response, error) + // @return EomInvoiceResponse + GetInvoiceByInvoiceIDExecute(r APIGetInvoiceByInvoiceIDRequest) (*EomInvoiceResponse, *http.Response, error) + + /* + GetMonthToDateInvoice Get month-to-date invoice. + + Returns month-to-date invoice for the current month. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return APIGetMonthToDateInvoiceRequest + */ + GetMonthToDateInvoice(ctx context.Context) APIGetMonthToDateInvoiceRequest + + // GetMonthToDateInvoiceExecute executes the request + // @return MtdInvoiceResponse + GetMonthToDateInvoiceExecute(r APIGetMonthToDateInvoiceRequest) (*MtdInvoiceResponse, *http.Response, error) /* ListInvoices List of invoices. @@ -57,8 +71,8 @@ type BillingInvoicesAPI interface { ListInvoices(ctx context.Context) APIListInvoicesRequest // ListInvoicesExecute executes the request - // @return ListInvoicesResponse - ListInvoicesExecute(r APIListInvoicesRequest) (*ListInvoicesResponse, *http.Response, error) + // @return ListEomInvoicesResponse + ListInvoicesExecute(r APIListInvoicesRequest) (*ListEomInvoicesResponse, *http.Response, error) } // BillingInvoicesAPIService BillingInvoicesAPI service @@ -73,7 +87,7 @@ type APIGetInvoiceByInvoiceIDRequest struct { // Execute calls the API using the request data configured. -func (r APIGetInvoiceByInvoiceIDRequest) Execute() (*InvoiceResponse, *http.Response, error) { +func (r APIGetInvoiceByInvoiceIDRequest) Execute() (*EomInvoiceResponse, *http.Response, error) { return r.APIService.GetInvoiceByInvoiceIDExecute(r) } @@ -95,13 +109,13 @@ func (a *BillingInvoicesAPIService) GetInvoiceByInvoiceID(ctx context.Context, i } // GetInvoiceByInvoiceIDExecute executes the request -// @return InvoiceResponse -func (a *BillingInvoicesAPIService) GetInvoiceByInvoiceIDExecute(r APIGetInvoiceByInvoiceIDRequest) (*InvoiceResponse, *http.Response, error) { +// @return EomInvoiceResponse +func (a *BillingInvoicesAPIService) GetInvoiceByInvoiceIDExecute(r APIGetInvoiceByInvoiceIDRequest) (*EomInvoiceResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody any formFiles []formFile - localVarReturnValue *InvoiceResponse + localVarReturnValue *EomInvoiceResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BillingInvoicesAPIService.GetInvoiceByInvoiceID") @@ -227,6 +241,175 @@ func (a *BillingInvoicesAPIService) GetInvoiceByInvoiceIDExecute(r APIGetInvoice return localVarReturnValue, localVarHTTPResponse, nil } +// APIGetMonthToDateInvoiceRequest represents a request for the resource. +type APIGetMonthToDateInvoiceRequest struct { + ctx context.Context + APIService BillingInvoicesAPI +} + + +// Execute calls the API using the request data configured. +func (r APIGetMonthToDateInvoiceRequest) Execute() (*MtdInvoiceResponse, *http.Response, error) { + return r.APIService.GetMonthToDateInvoiceExecute(r) +} + +/* +GetMonthToDateInvoice Get month-to-date invoice. + +Returns month-to-date invoice for the current month. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return APIGetMonthToDateInvoiceRequest +*/ +func (a *BillingInvoicesAPIService) GetMonthToDateInvoice(ctx context.Context) APIGetMonthToDateInvoiceRequest { + return APIGetMonthToDateInvoiceRequest{ + APIService: a, + ctx: ctx, + } +} + +// GetMonthToDateInvoiceExecute executes the request +// @return MtdInvoiceResponse +func (a *BillingInvoicesAPIService) GetMonthToDateInvoiceExecute(r APIGetMonthToDateInvoiceRequest) (*MtdInvoiceResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody any + formFiles []formFile + localVarReturnValue *MtdInvoiceResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BillingInvoicesAPIService.GetMonthToDateInvoice") + if err != nil { + return localVarReturnValue, nil, &GenericAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/billing/v3/invoices/month-to-date" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := gourl.Values{} + localVarFormParams := gourl.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["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, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + 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 +} + // APIListInvoicesRequest represents a request for the resource. type APIListInvoicesRequest struct { ctx context.Context @@ -259,7 +442,7 @@ func (r *APIListInvoicesRequest) Cursor(cursor string) *APIListInvoicesRequest { } // Execute calls the API using the request data configured. -func (r APIListInvoicesRequest) Execute() (*ListInvoicesResponse, *http.Response, error) { +func (r APIListInvoicesRequest) Execute() (*ListEomInvoicesResponse, *http.Response, error) { return r.APIService.ListInvoicesExecute(r) } @@ -279,13 +462,13 @@ func (a *BillingInvoicesAPIService) ListInvoices(ctx context.Context) APIListInv } // ListInvoicesExecute executes the request -// @return ListInvoicesResponse -func (a *BillingInvoicesAPIService) ListInvoicesExecute(r APIListInvoicesRequest) (*ListInvoicesResponse, *http.Response, error) { +// @return ListEomInvoicesResponse +func (a *BillingInvoicesAPIService) ListInvoicesExecute(r APIListInvoicesRequest) (*ListEomInvoicesResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody any formFiles []formFile - localVarReturnValue *ListInvoicesResponse + localVarReturnValue *ListEomInvoicesResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BillingInvoicesAPIService.ListInvoices") diff --git a/fastly/api_billing_usage_metrics.go b/fastly/api_billing_usage_metrics.go new file mode 100644 index 00000000..6362f8cf --- /dev/null +++ b/fastly/api_billing_usage_metrics.go @@ -0,0 +1,476 @@ +// 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://www.fastly.com/documentation/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" + "strings" +) + +// Linger please +var ( + _ context.Context +) + +// BillingUsageMetricsAPI defines an interface for interacting with the resource. +type BillingUsageMetricsAPI interface { + + /* + GetServiceLevelUsage Retrieve service-level usage metrics for a product. + + Returns product usage, broken down by service. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param customerID Alphanumeric string identifying the customer. + @return APIGetServiceLevelUsageRequest + */ + GetServiceLevelUsage(ctx context.Context, customerID string) APIGetServiceLevelUsageRequest + + // GetServiceLevelUsageExecute executes the request + // @return Serviceusagemetrics + GetServiceLevelUsageExecute(r APIGetServiceLevelUsageRequest) (*Serviceusagemetrics, *http.Response, error) + + /* + GetServiceLevelUsageTypes Retrieve product usage types for a customer. + + Returns product usage types reported by the customer's services. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param customerID Alphanumeric string identifying the customer. + @return APIGetServiceLevelUsageTypesRequest + */ + GetServiceLevelUsageTypes(ctx context.Context, customerID string) APIGetServiceLevelUsageTypesRequest + + // GetServiceLevelUsageTypesExecute executes the request + // @return Serviceusagetypes + GetServiceLevelUsageTypesExecute(r APIGetServiceLevelUsageTypesRequest) (*Serviceusagetypes, *http.Response, error) +} + +// BillingUsageMetricsAPIService BillingUsageMetricsAPI service +type BillingUsageMetricsAPIService service + +// APIGetServiceLevelUsageRequest represents a request for the resource. +type APIGetServiceLevelUsageRequest struct { + ctx context.Context + APIService BillingUsageMetricsAPI + customerID string + productID *string + usageTypeName *string + timeGranularity *string + startDate *string + endDate *string + startMonth *string + endMonth *string + limit *string + cursor *string +} + +// ProductID The product identifier for the metrics returned (e.g., `cdn_usage`). This field is not required for CSV requests. +func (r *APIGetServiceLevelUsageRequest) ProductID(productID string) *APIGetServiceLevelUsageRequest { + r.productID = &productID + return r +} +// UsageTypeName The usage type name for the metrics returned (e.g., `North America Requests`). This field is not required for CSV requests. +func (r *APIGetServiceLevelUsageRequest) UsageTypeName(usageTypeName string) *APIGetServiceLevelUsageRequest { + r.usageTypeName = &usageTypeName + return r +} +// TimeGranularity returns a pointer to a request. +func (r *APIGetServiceLevelUsageRequest) TimeGranularity(timeGranularity string) *APIGetServiceLevelUsageRequest { + r.timeGranularity = &timeGranularity + return r +} +// StartDate returns a pointer to a request. +func (r *APIGetServiceLevelUsageRequest) StartDate(startDate string) *APIGetServiceLevelUsageRequest { + r.startDate = &startDate + return r +} +// EndDate returns a pointer to a request. +func (r *APIGetServiceLevelUsageRequest) EndDate(endDate string) *APIGetServiceLevelUsageRequest { + r.endDate = &endDate + return r +} +// StartMonth returns a pointer to a request. +func (r *APIGetServiceLevelUsageRequest) StartMonth(startMonth string) *APIGetServiceLevelUsageRequest { + r.startMonth = &startMonth + return r +} +// EndMonth returns a pointer to a request. +func (r *APIGetServiceLevelUsageRequest) EndMonth(endMonth string) *APIGetServiceLevelUsageRequest { + r.endMonth = &endMonth + return r +} +// Limit Number of results per page. The maximum is 100. +func (r *APIGetServiceLevelUsageRequest) Limit(limit string) *APIGetServiceLevelUsageRequest { + r.limit = &limit + return r +} +// Cursor 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. +func (r *APIGetServiceLevelUsageRequest) Cursor(cursor string) *APIGetServiceLevelUsageRequest { + r.cursor = &cursor + return r +} + +// Execute calls the API using the request data configured. +func (r APIGetServiceLevelUsageRequest) Execute() (*Serviceusagemetrics, *http.Response, error) { + return r.APIService.GetServiceLevelUsageExecute(r) +} + +/* +GetServiceLevelUsage Retrieve service-level usage metrics for a product. + +Returns product usage, broken down by service. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param customerID Alphanumeric string identifying the customer. + @return APIGetServiceLevelUsageRequest +*/ +func (a *BillingUsageMetricsAPIService) GetServiceLevelUsage(ctx context.Context, customerID string) APIGetServiceLevelUsageRequest { + return APIGetServiceLevelUsageRequest{ + APIService: a, + ctx: ctx, + customerID: customerID, + } +} + +// GetServiceLevelUsageExecute executes the request +// @return Serviceusagemetrics +func (a *BillingUsageMetricsAPIService) GetServiceLevelUsageExecute(r APIGetServiceLevelUsageRequest) (*Serviceusagemetrics, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody any + formFiles []formFile + localVarReturnValue *Serviceusagemetrics + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BillingUsageMetricsAPIService.GetServiceLevelUsage") + if err != nil { + return localVarReturnValue, nil, &GenericAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/billing/v2/account_customers/{customer_id}/service-usage-metrics" + localVarPath = strings.ReplaceAll(localVarPath, "{"+"customer_id"+"}", gourl.PathEscape(parameterToString(r.customerID, ""))) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := gourl.Values{} + localVarFormParams := gourl.Values{} + if r.productID == nil { + return localVarReturnValue, nil, reportError("productID is required and must be specified") + } + if r.usageTypeName == nil { + return localVarReturnValue, nil, reportError("usageTypeName is required and must be specified") + } + if r.timeGranularity == nil { + return localVarReturnValue, nil, reportError("timeGranularity is required and must be specified") + } + + localVarQueryParams.Add("product_id", parameterToString(*r.productID, "")) + localVarQueryParams.Add("usage_type_name", parameterToString(*r.usageTypeName, "")) + localVarQueryParams.Add("time_granularity", parameterToString(*r.timeGranularity, "")) + if r.startDate != nil { + localVarQueryParams.Add("start_date", parameterToString(*r.startDate, "")) + } + if r.endDate != nil { + localVarQueryParams.Add("end_date", parameterToString(*r.endDate, "")) + } + if r.startMonth != nil { + localVarQueryParams.Add("start_month", parameterToString(*r.startMonth, "")) + } + if r.endMonth != nil { + localVarQueryParams.Add("end_month", parameterToString(*r.endMonth, "")) + } + if r.limit != nil { + localVarQueryParams.Add("limit", parameterToString(*r.limit, "")) + } + if r.cursor != nil { + localVarQueryParams.Add("cursor", parameterToString(*r.cursor, "")) + } + // 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, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + 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 +} + +// APIGetServiceLevelUsageTypesRequest represents a request for the resource. +type APIGetServiceLevelUsageTypesRequest struct { + ctx context.Context + APIService BillingUsageMetricsAPI + customerID string +} + + +// Execute calls the API using the request data configured. +func (r APIGetServiceLevelUsageTypesRequest) Execute() (*Serviceusagetypes, *http.Response, error) { + return r.APIService.GetServiceLevelUsageTypesExecute(r) +} + +/* +GetServiceLevelUsageTypes Retrieve product usage types for a customer. + +Returns product usage types reported by the customer's services. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param customerID Alphanumeric string identifying the customer. + @return APIGetServiceLevelUsageTypesRequest +*/ +func (a *BillingUsageMetricsAPIService) GetServiceLevelUsageTypes(ctx context.Context, customerID string) APIGetServiceLevelUsageTypesRequest { + return APIGetServiceLevelUsageTypesRequest{ + APIService: a, + ctx: ctx, + customerID: customerID, + } +} + +// GetServiceLevelUsageTypesExecute executes the request +// @return Serviceusagetypes +func (a *BillingUsageMetricsAPIService) GetServiceLevelUsageTypesExecute(r APIGetServiceLevelUsageTypesRequest) (*Serviceusagetypes, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody any + formFiles []formFile + localVarReturnValue *Serviceusagetypes + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BillingUsageMetricsAPIService.GetServiceLevelUsageTypes") + if err != nil { + return localVarReturnValue, nil, &GenericAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/billing/v2/account_customers/{customer_id}/service-usage-types" + localVarPath = strings.ReplaceAll(localVarPath, "{"+"customer_id"+"}", gourl.PathEscape(parameterToString(r.customerID, ""))) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := gourl.Values{} + localVarFormParams := gourl.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["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, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + 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/api_observability_custom_dashboards.go b/fastly/api_observability_custom_dashboards.go new file mode 100644 index 00000000..b67ebe02 --- /dev/null +++ b/fastly/api_observability_custom_dashboards.go @@ -0,0 +1,775 @@ +// 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://www.fastly.com/documentation/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" + "strings" +) + +// Linger please +var ( + _ context.Context +) + +// ObservabilityCustomDashboardsAPI defines an interface for interacting with the resource. +type ObservabilityCustomDashboardsAPI interface { + + /* + CreateDashboard Create a new dashboard + + Create a new dashboard + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return APICreateDashboardRequest + */ + CreateDashboard(ctx context.Context) APICreateDashboardRequest + + // CreateDashboardExecute executes the request + // @return Dashboard + CreateDashboardExecute(r APICreateDashboardRequest) (*Dashboard, *http.Response, error) + + /* + DeleteDashboard Delete an existing dashboard + + Delete an existing dashboard + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param dashboardID + @return APIDeleteDashboardRequest + */ + DeleteDashboard(ctx context.Context, dashboardID string) APIDeleteDashboardRequest + + // DeleteDashboardExecute executes the request + DeleteDashboardExecute(r APIDeleteDashboardRequest) (*http.Response, error) + + /* + GetDashboard Retrieve a dashboard by ID + + Retrieve a dashboard by ID + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param dashboardID + @return APIGetDashboardRequest + */ + GetDashboard(ctx context.Context, dashboardID string) APIGetDashboardRequest + + // GetDashboardExecute executes the request + // @return Dashboard + GetDashboardExecute(r APIGetDashboardRequest) (*Dashboard, *http.Response, error) + + /* + ListDashboards List all custom dashboards + + List all custom dashboards + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return APIListDashboardsRequest + */ + ListDashboards(ctx context.Context) APIListDashboardsRequest + + // ListDashboardsExecute executes the request + // @return ListDashboardsResponse + ListDashboardsExecute(r APIListDashboardsRequest) (*ListDashboardsResponse, *http.Response, error) + + /* + UpdateDashboard Update an existing dashboard + + Update an existing dashboard + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param dashboardID + @return APIUpdateDashboardRequest + */ + UpdateDashboard(ctx context.Context, dashboardID string) APIUpdateDashboardRequest + + // UpdateDashboardExecute executes the request + // @return Dashboard + UpdateDashboardExecute(r APIUpdateDashboardRequest) (*Dashboard, *http.Response, error) +} + +// ObservabilityCustomDashboardsAPIService ObservabilityCustomDashboardsAPI service +type ObservabilityCustomDashboardsAPIService service + +// APICreateDashboardRequest represents a request for the resource. +type APICreateDashboardRequest struct { + ctx context.Context + APIService ObservabilityCustomDashboardsAPI + createDashboardRequest *CreateDashboardRequest +} + +// CreateDashboardRequest returns a pointer to a request. +func (r *APICreateDashboardRequest) CreateDashboardRequest(createDashboardRequest CreateDashboardRequest) *APICreateDashboardRequest { + r.createDashboardRequest = &createDashboardRequest + return r +} + +// Execute calls the API using the request data configured. +func (r APICreateDashboardRequest) Execute() (*Dashboard, *http.Response, error) { + return r.APIService.CreateDashboardExecute(r) +} + +/* +CreateDashboard Create a new dashboard + +Create a new dashboard + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return APICreateDashboardRequest +*/ +func (a *ObservabilityCustomDashboardsAPIService) CreateDashboard(ctx context.Context) APICreateDashboardRequest { + return APICreateDashboardRequest{ + APIService: a, + ctx: ctx, + } +} + +// CreateDashboardExecute executes the request +// @return Dashboard +func (a *ObservabilityCustomDashboardsAPIService) CreateDashboardExecute(r APICreateDashboardRequest) (*Dashboard, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody any + formFiles []formFile + localVarReturnValue *Dashboard + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ObservabilityCustomDashboardsAPIService.CreateDashboard") + if err != nil { + return localVarReturnValue, nil, &GenericAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/observability/dashboards" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := gourl.Values{} + localVarFormParams := gourl.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.createDashboardRequest + 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 +} + +// APIDeleteDashboardRequest represents a request for the resource. +type APIDeleteDashboardRequest struct { + ctx context.Context + APIService ObservabilityCustomDashboardsAPI + dashboardID string +} + + +// Execute calls the API using the request data configured. +func (r APIDeleteDashboardRequest) Execute() (*http.Response, error) { + return r.APIService.DeleteDashboardExecute(r) +} + +/* +DeleteDashboard Delete an existing dashboard + +Delete an existing dashboard + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param dashboardID + @return APIDeleteDashboardRequest +*/ +func (a *ObservabilityCustomDashboardsAPIService) DeleteDashboard(ctx context.Context, dashboardID string) APIDeleteDashboardRequest { + return APIDeleteDashboardRequest{ + APIService: a, + ctx: ctx, + dashboardID: dashboardID, + } +} + +// DeleteDashboardExecute executes the request +func (a *ObservabilityCustomDashboardsAPIService) DeleteDashboardExecute(r APIDeleteDashboardRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody any + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ObservabilityCustomDashboardsAPIService.DeleteDashboard") + if err != nil { + return nil, &GenericAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/observability/dashboards/{dashboard_id}" + localVarPath = strings.ReplaceAll(localVarPath, "{"+"dashboard_id"+"}", gourl.PathEscape(parameterToString(r.dashboardID, ""))) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := gourl.Values{} + localVarFormParams := gourl.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // 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 nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + _ = localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return 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 localVarHTTPResponse, nil +} + +// APIGetDashboardRequest represents a request for the resource. +type APIGetDashboardRequest struct { + ctx context.Context + APIService ObservabilityCustomDashboardsAPI + dashboardID string +} + + +// Execute calls the API using the request data configured. +func (r APIGetDashboardRequest) Execute() (*Dashboard, *http.Response, error) { + return r.APIService.GetDashboardExecute(r) +} + +/* +GetDashboard Retrieve a dashboard by ID + +Retrieve a dashboard by ID + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param dashboardID + @return APIGetDashboardRequest +*/ +func (a *ObservabilityCustomDashboardsAPIService) GetDashboard(ctx context.Context, dashboardID string) APIGetDashboardRequest { + return APIGetDashboardRequest{ + APIService: a, + ctx: ctx, + dashboardID: dashboardID, + } +} + +// GetDashboardExecute executes the request +// @return Dashboard +func (a *ObservabilityCustomDashboardsAPIService) GetDashboardExecute(r APIGetDashboardRequest) (*Dashboard, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody any + formFiles []formFile + localVarReturnValue *Dashboard + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ObservabilityCustomDashboardsAPIService.GetDashboard") + if err != nil { + return localVarReturnValue, nil, &GenericAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/observability/dashboards/{dashboard_id}" + localVarPath = strings.ReplaceAll(localVarPath, "{"+"dashboard_id"+"}", gourl.PathEscape(parameterToString(r.dashboardID, ""))) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := gourl.Values{} + localVarFormParams := gourl.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["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 +} + +// APIListDashboardsRequest represents a request for the resource. +type APIListDashboardsRequest struct { + ctx context.Context + APIService ObservabilityCustomDashboardsAPI +} + + +// Execute calls the API using the request data configured. +func (r APIListDashboardsRequest) Execute() (*ListDashboardsResponse, *http.Response, error) { + return r.APIService.ListDashboardsExecute(r) +} + +/* +ListDashboards List all custom dashboards + +List all custom dashboards + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return APIListDashboardsRequest +*/ +func (a *ObservabilityCustomDashboardsAPIService) ListDashboards(ctx context.Context) APIListDashboardsRequest { + return APIListDashboardsRequest{ + APIService: a, + ctx: ctx, + } +} + +// ListDashboardsExecute executes the request +// @return ListDashboardsResponse +func (a *ObservabilityCustomDashboardsAPIService) ListDashboardsExecute(r APIListDashboardsRequest) (*ListDashboardsResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody any + formFiles []formFile + localVarReturnValue *ListDashboardsResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ObservabilityCustomDashboardsAPIService.ListDashboards") + if err != nil { + return localVarReturnValue, nil, &GenericAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/observability/dashboards" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := gourl.Values{} + localVarFormParams := gourl.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["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 +} + +// APIUpdateDashboardRequest represents a request for the resource. +type APIUpdateDashboardRequest struct { + ctx context.Context + APIService ObservabilityCustomDashboardsAPI + dashboardID string + updateDashboardRequest *UpdateDashboardRequest +} + +// UpdateDashboardRequest returns a pointer to a request. +func (r *APIUpdateDashboardRequest) UpdateDashboardRequest(updateDashboardRequest UpdateDashboardRequest) *APIUpdateDashboardRequest { + r.updateDashboardRequest = &updateDashboardRequest + return r +} + +// Execute calls the API using the request data configured. +func (r APIUpdateDashboardRequest) Execute() (*Dashboard, *http.Response, error) { + return r.APIService.UpdateDashboardExecute(r) +} + +/* +UpdateDashboard Update an existing dashboard + +Update an existing dashboard + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param dashboardID + @return APIUpdateDashboardRequest +*/ +func (a *ObservabilityCustomDashboardsAPIService) UpdateDashboard(ctx context.Context, dashboardID string) APIUpdateDashboardRequest { + return APIUpdateDashboardRequest{ + APIService: a, + ctx: ctx, + dashboardID: dashboardID, + } +} + +// UpdateDashboardExecute executes the request +// @return Dashboard +func (a *ObservabilityCustomDashboardsAPIService) UpdateDashboardExecute(r APIUpdateDashboardRequest) (*Dashboard, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody any + formFiles []formFile + localVarReturnValue *Dashboard + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ObservabilityCustomDashboardsAPIService.UpdateDashboard") + if err != nil { + return localVarReturnValue, nil, &GenericAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/observability/dashboards/{dashboard_id}" + localVarPath = strings.ReplaceAll(localVarPath, "{"+"dashboard_id"+"}", gourl.PathEscape(parameterToString(r.dashboardID, ""))) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := gourl.Values{} + localVarFormParams := gourl.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.updateDashboardRequest + 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/api_tls_certificates.go b/fastly/api_tls_certificates.go index 6271e3ad..da6a920c 100644 --- a/fastly/api_tls_certificates.go +++ b/fastly/api_tls_certificates.go @@ -74,6 +74,21 @@ type TLSCertificatesAPI interface { // @return TLSCertificateResponse GetTLSCertExecute(r APIGetTLSCertRequest) (*TLSCertificateResponse, *http.Response, error) + /* + GetTLSCertBlob Get a TLS certificate blob (Limited Availability) + + Retrieve a TLS certificate blob. This feature is part of a [limited availability](https://docs.fastly.com/products/fastly-product-lifecycle#limited-availability) release. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param tlsCertificateID Alphanumeric string identifying a TLS certificate. + @return APIGetTLSCertBlobRequest + */ + GetTLSCertBlob(ctx context.Context, tlsCertificateID string) APIGetTLSCertBlobRequest + + // GetTLSCertBlobExecute executes the request + // @return TLSCertificateBlobResponse + GetTLSCertBlobExecute(r APIGetTLSCertBlobRequest) (*TLSCertificateBlobResponse, *http.Response, error) + /* ListTLSCerts List TLS certificates @@ -502,6 +517,140 @@ func (a *TLSCertificatesAPIService) GetTLSCertExecute(r APIGetTLSCertRequest) (* return localVarReturnValue, localVarHTTPResponse, nil } +// APIGetTLSCertBlobRequest represents a request for the resource. +type APIGetTLSCertBlobRequest struct { + ctx context.Context + APIService TLSCertificatesAPI + tlsCertificateID string +} + + +// Execute calls the API using the request data configured. +func (r APIGetTLSCertBlobRequest) Execute() (*TLSCertificateBlobResponse, *http.Response, error) { + return r.APIService.GetTLSCertBlobExecute(r) +} + +/* +GetTLSCertBlob Get a TLS certificate blob (Limited Availability) + +Retrieve a TLS certificate blob. This feature is part of a [limited availability](https://docs.fastly.com/products/fastly-product-lifecycle#limited-availability) release. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param tlsCertificateID Alphanumeric string identifying a TLS certificate. + @return APIGetTLSCertBlobRequest +*/ +func (a *TLSCertificatesAPIService) GetTLSCertBlob(ctx context.Context, tlsCertificateID string) APIGetTLSCertBlobRequest { + return APIGetTLSCertBlobRequest{ + APIService: a, + ctx: ctx, + tlsCertificateID: tlsCertificateID, + } +} + +// GetTLSCertBlobExecute executes the request +// @return TLSCertificateBlobResponse +func (a *TLSCertificatesAPIService) GetTLSCertBlobExecute(r APIGetTLSCertBlobRequest) (*TLSCertificateBlobResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody any + formFiles []formFile + localVarReturnValue *TLSCertificateBlobResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TLSCertificatesAPIService.GetTLSCertBlob") + if err != nil { + return localVarReturnValue, nil, &GenericAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/tls/certificates/{tls_certificate_id}/blob" + localVarPath = strings.ReplaceAll(localVarPath, "{"+"tls_certificate_id"+"}", gourl.PathEscape(parameterToString(r.tlsCertificateID, ""))) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := gourl.Values{} + localVarFormParams := gourl.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["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 +} + // APIListTLSCertsRequest represents a request for the resource. type APIListTLSCertsRequest struct { ctx context.Context diff --git a/fastly/client.go b/fastly/client.go index dfcd89e8..771b7247 100644 --- a/fastly/client.go +++ b/fastly/client.go @@ -80,6 +80,8 @@ type APIClient struct { BillingInvoicesAPI BillingInvoicesAPI + BillingUsageMetricsAPI BillingUsageMetricsAPI + CacheSettingsAPI CacheSettingsAPI ConditionAPI ConditionAPI @@ -216,6 +218,8 @@ type APIClient struct { MutualAuthenticationAPI MutualAuthenticationAPI + ObservabilityCustomDashboardsAPI ObservabilityCustomDashboardsAPI + OriginInspectorHistoricalAPI OriginInspectorHistoricalAPI OriginInspectorRealtimeAPI OriginInspectorRealtimeAPI @@ -330,6 +334,7 @@ func NewAPIClient(cfg *Configuration) *APIClient { c.BillingAPI = (*BillingAPIService)(&c.common) c.BillingAddressAPI = (*BillingAddressAPIService)(&c.common) c.BillingInvoicesAPI = (*BillingInvoicesAPIService)(&c.common) + c.BillingUsageMetricsAPI = (*BillingUsageMetricsAPIService)(&c.common) c.CacheSettingsAPI = (*CacheSettingsAPIService)(&c.common) c.ConditionAPI = (*ConditionAPIService)(&c.common) c.ConfigStoreAPI = (*ConfigStoreAPIService)(&c.common) @@ -398,6 +403,7 @@ func NewAPIClient(cfg *Configuration) *APIClient { c.LoggingSumologicAPI = (*LoggingSumologicAPIService)(&c.common) c.LoggingSyslogAPI = (*LoggingSyslogAPIService)(&c.common) c.MutualAuthenticationAPI = (*MutualAuthenticationAPIService)(&c.common) + c.ObservabilityCustomDashboardsAPI = (*ObservabilityCustomDashboardsAPIService)(&c.common) c.OriginInspectorHistoricalAPI = (*OriginInspectorHistoricalAPIService)(&c.common) c.OriginInspectorRealtimeAPI = (*OriginInspectorRealtimeAPIService)(&c.common) c.PackageAPI = (*PackageAPIService)(&c.common) diff --git a/fastly/configuration.go b/fastly/configuration.go index 06a3e9ac..8e15938c 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/1.0.0-beta.31", + UserAgent: "fastly-go/1.0.0-beta.32", Debug: false, Servers: ServerConfigurations{ { @@ -322,12 +322,30 @@ func NewConfiguration() *Configuration { Description: "No description provided", }, }, + "BillingInvoicesAPIService.GetMonthToDateInvoice": { + { + URL: "https://api.fastly.com", + Description: "No description provided", + }, + }, "BillingInvoicesAPIService.ListInvoices": { { URL: "https://api.fastly.com", Description: "No description provided", }, }, + "BillingUsageMetricsAPIService.GetServiceLevelUsage": { + { + URL: "https://api.fastly.com", + Description: "No description provided", + }, + }, + "BillingUsageMetricsAPIService.GetServiceLevelUsageTypes": { + { + URL: "https://api.fastly.com", + Description: "No description provided", + }, + }, "CacheSettingsAPIService.CreateCacheSettings": { { URL: "https://api.fastly.com", @@ -2194,6 +2212,36 @@ func NewConfiguration() *Configuration { Description: "No description provided", }, }, + "ObservabilityCustomDashboardsAPIService.CreateDashboard": { + { + URL: "https://api.fastly.com", + Description: "No description provided", + }, + }, + "ObservabilityCustomDashboardsAPIService.DeleteDashboard": { + { + URL: "https://api.fastly.com", + Description: "No description provided", + }, + }, + "ObservabilityCustomDashboardsAPIService.GetDashboard": { + { + URL: "https://api.fastly.com", + Description: "No description provided", + }, + }, + "ObservabilityCustomDashboardsAPIService.ListDashboards": { + { + URL: "https://api.fastly.com", + Description: "No description provided", + }, + }, + "ObservabilityCustomDashboardsAPIService.UpdateDashboard": { + { + URL: "https://api.fastly.com", + Description: "No description provided", + }, + }, "OriginInspectorHistoricalAPIService.GetOriginInspectorHistorical": { { URL: "https://api.fastly.com", @@ -2800,6 +2848,12 @@ func NewConfiguration() *Configuration { Description: "No description provided", }, }, + "TLSCertificatesAPIService.GetTLSCertBlob": { + { + URL: "https://api.fastly.com", + Description: "No description provided", + }, + }, "TLSCertificatesAPIService.ListTLSCerts": { { URL: "https://api.fastly.com", diff --git a/fastly/model_async_response.go b/fastly/model_async_response.go new file mode 100644 index 00000000..68c337f0 --- /dev/null +++ b/fastly/model_async_response.go @@ -0,0 +1,192 @@ +// 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://www.fastly.com/documentation/reference/api/) + +API version: 1.0.0 +Contact: oss@fastly.com +*/ + +// This code is auto-generated; DO NOT EDIT. + + +import ( + "encoding/json" +) + +// AsyncResponse struct for AsyncResponse +type AsyncResponse struct { + Title *string `json:"title,omitempty"` + Status *string `json:"status,omitempty"` + AdditionalProperties map[string]any +} + +type _AsyncResponse AsyncResponse + +// NewAsyncResponse instantiates a new AsyncResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAsyncResponse() *AsyncResponse { + this := AsyncResponse{} + return &this +} + +// NewAsyncResponseWithDefaults instantiates a new AsyncResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAsyncResponseWithDefaults() *AsyncResponse { + this := AsyncResponse{} + return &this +} + +// GetTitle returns the Title field value if set, zero value otherwise. +func (o *AsyncResponse) GetTitle() string { + if o == nil || o.Title == nil { + var ret string + return ret + } + return *o.Title +} + +// GetTitleOk returns a tuple with the Title field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AsyncResponse) GetTitleOk() (*string, bool) { + if o == nil || o.Title == nil { + return nil, false + } + return o.Title, true +} + +// HasTitle returns a boolean if a field has been set. +func (o *AsyncResponse) HasTitle() bool { + if o != nil && o.Title != nil { + return true + } + + return false +} + +// SetTitle gets a reference to the given string and assigns it to the Title field. +func (o *AsyncResponse) SetTitle(v string) { + o.Title = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *AsyncResponse) 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 *AsyncResponse) 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 *AsyncResponse) 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 *AsyncResponse) SetStatus(v string) { + o.Status = &v +} + +// MarshalJSON implements the json.Marshaler interface. +// Marshaler is the interface implemented by types that can marshal themselves into valid JSON. +func (o AsyncResponse) MarshalJSON() ([]byte, error) { + toSerialize := map[string]any{} + if o.Title != nil { + toSerialize["title"] = o.Title + } + if o.Status != nil { + toSerialize["status"] = o.Status + } + + 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 *AsyncResponse) UnmarshalJSON(bytes []byte) (err error) { + varAsyncResponse := _AsyncResponse{} + + if err = json.Unmarshal(bytes, &varAsyncResponse); err == nil { + *o = AsyncResponse(varAsyncResponse) + } + + additionalProperties := make(map[string]any) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "title") + delete(additionalProperties, "status") + o.AdditionalProperties = additionalProperties + } + + return err +} + +// NullableAsyncResponse is a helper abstraction for handling nullable asyncresponse types. +type NullableAsyncResponse struct { + value *AsyncResponse + isSet bool +} + +// Get returns the value. +func (v NullableAsyncResponse) Get() *AsyncResponse { + return v.value +} + +// Set modifies the value. +func (v *NullableAsyncResponse) Set(val *AsyncResponse) { + v.value = val + v.isSet = true +} + +// IsSet indicates if the value was set. +func (v NullableAsyncResponse) IsSet() bool { + return v.isSet +} + +// Unset removes the value. +func (v *NullableAsyncResponse) Unset() { + v.value = nil + v.isSet = false +} + +// NewNullableAsyncResponse returns a pointer to a new instance of NullableAsyncResponse. +func NewNullableAsyncResponse(val *AsyncResponse) *NullableAsyncResponse { + return &NullableAsyncResponse{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 NullableAsyncResponse) 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 *NullableAsyncResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/fastly/model_create_dashboard_request.go b/fastly/model_create_dashboard_request.go new file mode 100644 index 00000000..e25048d0 --- /dev/null +++ b/fastly/model_create_dashboard_request.go @@ -0,0 +1,226 @@ +// 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://www.fastly.com/documentation/reference/api/) + +API version: 1.0.0 +Contact: oss@fastly.com +*/ + +// This code is auto-generated; DO NOT EDIT. + + +import ( + "encoding/json" +) + +// CreateDashboardRequest struct for CreateDashboardRequest +type CreateDashboardRequest struct { + // A human-readable name + Name string `json:"name"` + // A short description of the dashboard + Description *string `json:"description,omitempty"` + // A list of [dashboard items](#dashboard-item). + Items []DashboardItem `json:"items,omitempty"` + AdditionalProperties map[string]any +} + +type _CreateDashboardRequest CreateDashboardRequest + +// NewCreateDashboardRequest instantiates a new CreateDashboardRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateDashboardRequest(name string) *CreateDashboardRequest { + this := CreateDashboardRequest{} + this.Name = name + return &this +} + +// NewCreateDashboardRequestWithDefaults instantiates a new CreateDashboardRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateDashboardRequestWithDefaults() *CreateDashboardRequest { + this := CreateDashboardRequest{} + return &this +} + +// GetName returns the Name field value +func (o *CreateDashboardRequest) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *CreateDashboardRequest) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *CreateDashboardRequest) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *CreateDashboardRequest) GetDescription() string { + if o == nil || o.Description == nil { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateDashboardRequest) GetDescriptionOk() (*string, bool) { + if o == nil || o.Description == nil { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *CreateDashboardRequest) HasDescription() bool { + if o != nil && o.Description != nil { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *CreateDashboardRequest) SetDescription(v string) { + o.Description = &v +} + +// GetItems returns the Items field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CreateDashboardRequest) GetItems() []DashboardItem { + if o == nil { + var ret []DashboardItem + return ret + } + return o.Items +} + +// GetItemsOk returns a tuple with the Items 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 *CreateDashboardRequest) GetItemsOk() ([]DashboardItem, bool) { + if o == nil || o.Items == nil { + return nil, false + } + return o.Items, true +} + +// HasItems returns a boolean if a field has been set. +func (o *CreateDashboardRequest) HasItems() bool { + if o != nil && o.Items != nil { + return true + } + + return false +} + +// SetItems gets a reference to the given []DashboardItem and assigns it to the Items field. +func (o *CreateDashboardRequest) SetItems(v []DashboardItem) { + o.Items = v +} + +// MarshalJSON implements the json.Marshaler interface. +// Marshaler is the interface implemented by types that can marshal themselves into valid JSON. +func (o CreateDashboardRequest) MarshalJSON() ([]byte, error) { + toSerialize := map[string]any{} + if true { + toSerialize["name"] = o.Name + } + if o.Description != nil { + toSerialize["description"] = o.Description + } + if o.Items != nil { + toSerialize["items"] = o.Items + } + + 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 *CreateDashboardRequest) UnmarshalJSON(bytes []byte) (err error) { + varCreateDashboardRequest := _CreateDashboardRequest{} + + if err = json.Unmarshal(bytes, &varCreateDashboardRequest); err == nil { + *o = CreateDashboardRequest(varCreateDashboardRequest) + } + + additionalProperties := make(map[string]any) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "name") + delete(additionalProperties, "description") + delete(additionalProperties, "items") + o.AdditionalProperties = additionalProperties + } + + return err +} + +// NullableCreateDashboardRequest is a helper abstraction for handling nullable createdashboardrequest types. +type NullableCreateDashboardRequest struct { + value *CreateDashboardRequest + isSet bool +} + +// Get returns the value. +func (v NullableCreateDashboardRequest) Get() *CreateDashboardRequest { + return v.value +} + +// Set modifies the value. +func (v *NullableCreateDashboardRequest) Set(val *CreateDashboardRequest) { + v.value = val + v.isSet = true +} + +// IsSet indicates if the value was set. +func (v NullableCreateDashboardRequest) IsSet() bool { + return v.isSet +} + +// Unset removes the value. +func (v *NullableCreateDashboardRequest) Unset() { + v.value = nil + v.isSet = false +} + +// NewNullableCreateDashboardRequest returns a pointer to a new instance of NullableCreateDashboardRequest. +func NewNullableCreateDashboardRequest(val *CreateDashboardRequest) *NullableCreateDashboardRequest { + return &NullableCreateDashboardRequest{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 NullableCreateDashboardRequest) 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 *NullableCreateDashboardRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/fastly/model_dashboard.go b/fastly/model_dashboard.go new file mode 100644 index 00000000..f1954ff2 --- /dev/null +++ b/fastly/model_dashboard.go @@ -0,0 +1,442 @@ +// 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://www.fastly.com/documentation/reference/api/) + +API version: 1.0.0 +Contact: oss@fastly.com +*/ + +// This code is auto-generated; DO NOT EDIT. + + +import ( + "encoding/json" + "time" +) + +// Dashboard struct for Dashboard +type Dashboard struct { + // Dashboard identifier (UUID) + ID *string `json:"id,omitempty"` + // A human-readable name + Name *string `json:"name,omitempty"` + // A short description of the dashboard + Description *string `json:"description,omitempty"` + // A list of [dashboard items](#dashboard-item). + Items []DashboardItem `json:"items,omitempty"` + // Date and time in ISO 8601 format. + CreatedAt NullableTime `json:"created_at,omitempty"` + // Date and time in ISO 8601 format. + UpdatedAt NullableTime `json:"updated_at,omitempty"` + CreatedBy *DashboardPropertyCreatedBy `json:"created_by,omitempty"` + UpdatedBy *DashboardPropertyUpdatedBy `json:"updated_by,omitempty"` + AdditionalProperties map[string]any +} + +type _Dashboard Dashboard + +// NewDashboard instantiates a new Dashboard object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDashboard() *Dashboard { + this := Dashboard{} + return &this +} + +// NewDashboardWithDefaults instantiates a new Dashboard object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDashboardWithDefaults() *Dashboard { + this := Dashboard{} + return &this +} + +// GetID returns the ID field value if set, zero value otherwise. +func (o *Dashboard) 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 *Dashboard) 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 *Dashboard) 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 *Dashboard) SetID(v string) { + o.ID = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *Dashboard) 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 *Dashboard) 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 *Dashboard) 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 *Dashboard) SetName(v string) { + o.Name = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *Dashboard) GetDescription() string { + if o == nil || o.Description == nil { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Dashboard) GetDescriptionOk() (*string, bool) { + if o == nil || o.Description == nil { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *Dashboard) HasDescription() bool { + if o != nil && o.Description != nil { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *Dashboard) SetDescription(v string) { + o.Description = &v +} + +// GetItems returns the Items field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Dashboard) GetItems() []DashboardItem { + if o == nil { + var ret []DashboardItem + return ret + } + return o.Items +} + +// GetItemsOk returns a tuple with the Items 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 *Dashboard) GetItemsOk() ([]DashboardItem, bool) { + if o == nil || o.Items == nil { + return nil, false + } + return o.Items, true +} + +// HasItems returns a boolean if a field has been set. +func (o *Dashboard) HasItems() bool { + if o != nil && o.Items != nil { + return true + } + + return false +} + +// SetItems gets a reference to the given []DashboardItem and assigns it to the Items field. +func (o *Dashboard) SetItems(v []DashboardItem) { + o.Items = v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Dashboard) 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 *Dashboard) 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 *Dashboard) 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 *Dashboard) SetCreatedAt(v time.Time) { + o.CreatedAt.Set(&v) +} +// SetCreatedAtNil sets the value for CreatedAt to be an explicit nil +func (o *Dashboard) SetCreatedAtNil() { + o.CreatedAt.Set(nil) +} + +// UnsetCreatedAt ensures that no value is present for CreatedAt, not even an explicit nil +func (o *Dashboard) UnsetCreatedAt() { + o.CreatedAt.Unset() +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Dashboard) 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 *Dashboard) 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 *Dashboard) 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 *Dashboard) SetUpdatedAt(v time.Time) { + o.UpdatedAt.Set(&v) +} +// SetUpdatedAtNil sets the value for UpdatedAt to be an explicit nil +func (o *Dashboard) SetUpdatedAtNil() { + o.UpdatedAt.Set(nil) +} + +// UnsetUpdatedAt ensures that no value is present for UpdatedAt, not even an explicit nil +func (o *Dashboard) UnsetUpdatedAt() { + o.UpdatedAt.Unset() +} + +// GetCreatedBy returns the CreatedBy field value if set, zero value otherwise. +func (o *Dashboard) GetCreatedBy() DashboardPropertyCreatedBy { + if o == nil || o.CreatedBy == nil { + var ret DashboardPropertyCreatedBy + return ret + } + return *o.CreatedBy +} + +// GetCreatedByOk returns a tuple with the CreatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Dashboard) GetCreatedByOk() (*DashboardPropertyCreatedBy, bool) { + if o == nil || o.CreatedBy == nil { + return nil, false + } + return o.CreatedBy, true +} + +// HasCreatedBy returns a boolean if a field has been set. +func (o *Dashboard) HasCreatedBy() bool { + if o != nil && o.CreatedBy != nil { + return true + } + + return false +} + +// SetCreatedBy gets a reference to the given DashboardPropertyCreatedBy and assigns it to the CreatedBy field. +func (o *Dashboard) SetCreatedBy(v DashboardPropertyCreatedBy) { + o.CreatedBy = &v +} + +// GetUpdatedBy returns the UpdatedBy field value if set, zero value otherwise. +func (o *Dashboard) GetUpdatedBy() DashboardPropertyUpdatedBy { + if o == nil || o.UpdatedBy == nil { + var ret DashboardPropertyUpdatedBy + return ret + } + return *o.UpdatedBy +} + +// GetUpdatedByOk returns a tuple with the UpdatedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Dashboard) GetUpdatedByOk() (*DashboardPropertyUpdatedBy, bool) { + if o == nil || o.UpdatedBy == nil { + return nil, false + } + return o.UpdatedBy, true +} + +// HasUpdatedBy returns a boolean if a field has been set. +func (o *Dashboard) HasUpdatedBy() bool { + if o != nil && o.UpdatedBy != nil { + return true + } + + return false +} + +// SetUpdatedBy gets a reference to the given DashboardPropertyUpdatedBy and assigns it to the UpdatedBy field. +func (o *Dashboard) SetUpdatedBy(v DashboardPropertyUpdatedBy) { + o.UpdatedBy = &v +} + +// MarshalJSON implements the json.Marshaler interface. +// Marshaler is the interface implemented by types that can marshal themselves into valid JSON. +func (o Dashboard) MarshalJSON() ([]byte, error) { + toSerialize := map[string]any{} + if o.ID != nil { + toSerialize["id"] = o.ID + } + if o.Name != nil { + toSerialize["name"] = o.Name + } + if o.Description != nil { + toSerialize["description"] = o.Description + } + if o.Items != nil { + toSerialize["items"] = o.Items + } + if o.CreatedAt.IsSet() { + toSerialize["created_at"] = o.CreatedAt.Get() + } + if o.UpdatedAt.IsSet() { + toSerialize["updated_at"] = o.UpdatedAt.Get() + } + if o.CreatedBy != nil { + toSerialize["created_by"] = o.CreatedBy + } + if o.UpdatedBy != nil { + toSerialize["updated_by"] = o.UpdatedBy + } + + 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 *Dashboard) UnmarshalJSON(bytes []byte) (err error) { + varDashboard := _Dashboard{} + + if err = json.Unmarshal(bytes, &varDashboard); err == nil { + *o = Dashboard(varDashboard) + } + + additionalProperties := make(map[string]any) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "id") + delete(additionalProperties, "name") + delete(additionalProperties, "description") + delete(additionalProperties, "items") + delete(additionalProperties, "created_at") + delete(additionalProperties, "updated_at") + delete(additionalProperties, "created_by") + delete(additionalProperties, "updated_by") + o.AdditionalProperties = additionalProperties + } + + return err +} + +// NullableDashboard is a helper abstraction for handling nullable dashboard types. +type NullableDashboard struct { + value *Dashboard + isSet bool +} + +// Get returns the value. +func (v NullableDashboard) Get() *Dashboard { + return v.value +} + +// Set modifies the value. +func (v *NullableDashboard) Set(val *Dashboard) { + v.value = val + v.isSet = true +} + +// IsSet indicates if the value was set. +func (v NullableDashboard) IsSet() bool { + return v.isSet +} + +// Unset removes the value. +func (v *NullableDashboard) Unset() { + v.value = nil + v.isSet = false +} + +// NewNullableDashboard returns a pointer to a new instance of NullableDashboard. +func NewNullableDashboard(val *Dashboard) *NullableDashboard { + return &NullableDashboard{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 NullableDashboard) 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 *NullableDashboard) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/fastly/model_dashboard_item.go b/fastly/model_dashboard_item.go new file mode 100644 index 00000000..c3906c67 --- /dev/null +++ b/fastly/model_dashboard_item.go @@ -0,0 +1,320 @@ +// 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://www.fastly.com/documentation/reference/api/) + +API version: 1.0.0 +Contact: oss@fastly.com +*/ + +// This code is auto-generated; DO NOT EDIT. + + +import ( + "encoding/json" +) + +// DashboardItem A dashboard item. Typically a data visualization like a chart. +type DashboardItem struct { + // Dashboard item identifier (UUID) + ID *string `json:"id,omitempty"` + // A human-readable title for the dashboard item + Title string `json:"title"` + // A human-readable subtitle for the dashboard item. Often a description of the visualization. + Subtitle string `json:"subtitle"` + DataSource DashboardItemPropertyDataSource `json:"data_source"` + Visualization DashboardItemPropertyVisualization `json:"visualization"` + // The number of columns for the dashboard item to span. Dashboards are rendered on a 12-column grid on \"desktop\" screen sizes. + Span *int32 `json:"span,omitempty"` + AdditionalProperties map[string]any +} + +type _DashboardItem DashboardItem + +// NewDashboardItem instantiates a new DashboardItem object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDashboardItem(title string, subtitle string, dataSource DashboardItemPropertyDataSource, visualization DashboardItemPropertyVisualization) *DashboardItem { + this := DashboardItem{} + this.Title = title + this.Subtitle = subtitle + this.DataSource = dataSource + this.Visualization = visualization + var span int32 = 4 + this.Span = &span + return &this +} + +// NewDashboardItemWithDefaults instantiates a new DashboardItem object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDashboardItemWithDefaults() *DashboardItem { + this := DashboardItem{} + var span int32 = 4 + this.Span = &span + return &this +} + +// GetID returns the ID field value if set, zero value otherwise. +func (o *DashboardItem) 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 *DashboardItem) 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 *DashboardItem) 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 *DashboardItem) SetID(v string) { + o.ID = &v +} + +// GetTitle returns the Title field value +func (o *DashboardItem) GetTitle() string { + if o == nil { + var ret string + return ret + } + + return o.Title +} + +// GetTitleOk returns a tuple with the Title field value +// and a boolean to check if the value has been set. +func (o *DashboardItem) GetTitleOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Title, true +} + +// SetTitle sets field value +func (o *DashboardItem) SetTitle(v string) { + o.Title = v +} + +// GetSubtitle returns the Subtitle field value +func (o *DashboardItem) GetSubtitle() string { + if o == nil { + var ret string + return ret + } + + return o.Subtitle +} + +// GetSubtitleOk returns a tuple with the Subtitle field value +// and a boolean to check if the value has been set. +func (o *DashboardItem) GetSubtitleOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Subtitle, true +} + +// SetSubtitle sets field value +func (o *DashboardItem) SetSubtitle(v string) { + o.Subtitle = v +} + +// GetDataSource returns the DataSource field value +func (o *DashboardItem) GetDataSource() DashboardItemPropertyDataSource { + if o == nil { + var ret DashboardItemPropertyDataSource + return ret + } + + return o.DataSource +} + +// GetDataSourceOk returns a tuple with the DataSource field value +// and a boolean to check if the value has been set. +func (o *DashboardItem) GetDataSourceOk() (*DashboardItemPropertyDataSource, bool) { + if o == nil { + return nil, false + } + return &o.DataSource, true +} + +// SetDataSource sets field value +func (o *DashboardItem) SetDataSource(v DashboardItemPropertyDataSource) { + o.DataSource = v +} + +// GetVisualization returns the Visualization field value +func (o *DashboardItem) GetVisualization() DashboardItemPropertyVisualization { + if o == nil { + var ret DashboardItemPropertyVisualization + return ret + } + + return o.Visualization +} + +// GetVisualizationOk returns a tuple with the Visualization field value +// and a boolean to check if the value has been set. +func (o *DashboardItem) GetVisualizationOk() (*DashboardItemPropertyVisualization, bool) { + if o == nil { + return nil, false + } + return &o.Visualization, true +} + +// SetVisualization sets field value +func (o *DashboardItem) SetVisualization(v DashboardItemPropertyVisualization) { + o.Visualization = v +} + +// GetSpan returns the Span field value if set, zero value otherwise. +func (o *DashboardItem) GetSpan() int32 { + if o == nil || o.Span == nil { + var ret int32 + return ret + } + return *o.Span +} + +// GetSpanOk returns a tuple with the Span field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DashboardItem) GetSpanOk() (*int32, bool) { + if o == nil || o.Span == nil { + return nil, false + } + return o.Span, true +} + +// HasSpan returns a boolean if a field has been set. +func (o *DashboardItem) HasSpan() bool { + if o != nil && o.Span != nil { + return true + } + + return false +} + +// SetSpan gets a reference to the given int32 and assigns it to the Span field. +func (o *DashboardItem) SetSpan(v int32) { + o.Span = &v +} + +// MarshalJSON implements the json.Marshaler interface. +// Marshaler is the interface implemented by types that can marshal themselves into valid JSON. +func (o DashboardItem) MarshalJSON() ([]byte, error) { + toSerialize := map[string]any{} + if o.ID != nil { + toSerialize["id"] = o.ID + } + if true { + toSerialize["title"] = o.Title + } + if true { + toSerialize["subtitle"] = o.Subtitle + } + if true { + toSerialize["data_source"] = o.DataSource + } + if true { + toSerialize["visualization"] = o.Visualization + } + if o.Span != nil { + toSerialize["span"] = o.Span + } + + 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 *DashboardItem) UnmarshalJSON(bytes []byte) (err error) { + varDashboardItem := _DashboardItem{} + + if err = json.Unmarshal(bytes, &varDashboardItem); err == nil { + *o = DashboardItem(varDashboardItem) + } + + additionalProperties := make(map[string]any) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "id") + delete(additionalProperties, "title") + delete(additionalProperties, "subtitle") + delete(additionalProperties, "data_source") + delete(additionalProperties, "visualization") + delete(additionalProperties, "span") + o.AdditionalProperties = additionalProperties + } + + return err +} + +// NullableDashboardItem is a helper abstraction for handling nullable dashboarditem types. +type NullableDashboardItem struct { + value *DashboardItem + isSet bool +} + +// Get returns the value. +func (v NullableDashboardItem) Get() *DashboardItem { + return v.value +} + +// Set modifies the value. +func (v *NullableDashboardItem) Set(val *DashboardItem) { + v.value = val + v.isSet = true +} + +// IsSet indicates if the value was set. +func (v NullableDashboardItem) IsSet() bool { + return v.isSet +} + +// Unset removes the value. +func (v *NullableDashboardItem) Unset() { + v.value = nil + v.isSet = false +} + +// NewNullableDashboardItem returns a pointer to a new instance of NullableDashboardItem. +func NewNullableDashboardItem(val *DashboardItem) *NullableDashboardItem { + return &NullableDashboardItem{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 NullableDashboardItem) 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 *NullableDashboardItem) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/fastly/model_dashboard_item_property_data_source.go b/fastly/model_dashboard_item_property_data_source.go new file mode 100644 index 00000000..9c241fa8 --- /dev/null +++ b/fastly/model_dashboard_item_property_data_source.go @@ -0,0 +1,179 @@ +// 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://www.fastly.com/documentation/reference/api/) + +API version: 1.0.0 +Contact: oss@fastly.com +*/ + +// This code is auto-generated; DO NOT EDIT. + + +import ( + "encoding/json" +) + +// DashboardItemPropertyDataSource [An object](#data-source) which describes the data to display. +type DashboardItemPropertyDataSource struct { + // The source of the data to display. + Type string `json:"type"` + Config DashboardItemPropertyDataSourcePropertyConfig `json:"config"` + AdditionalProperties map[string]any +} + +type _DashboardItemPropertyDataSource DashboardItemPropertyDataSource + +// NewDashboardItemPropertyDataSource instantiates a new DashboardItemPropertyDataSource object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDashboardItemPropertyDataSource(resourceType string, config DashboardItemPropertyDataSourcePropertyConfig) *DashboardItemPropertyDataSource { + this := DashboardItemPropertyDataSource{} + this.Type = resourceType + this.Config = config + return &this +} + +// NewDashboardItemPropertyDataSourceWithDefaults instantiates a new DashboardItemPropertyDataSource object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDashboardItemPropertyDataSourceWithDefaults() *DashboardItemPropertyDataSource { + this := DashboardItemPropertyDataSource{} + return &this +} + +// GetType returns the Type field value +func (o *DashboardItemPropertyDataSource) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *DashboardItemPropertyDataSource) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *DashboardItemPropertyDataSource) SetType(v string) { + o.Type = v +} + +// GetConfig returns the Config field value +func (o *DashboardItemPropertyDataSource) GetConfig() DashboardItemPropertyDataSourcePropertyConfig { + if o == nil { + var ret DashboardItemPropertyDataSourcePropertyConfig + return ret + } + + return o.Config +} + +// GetConfigOk returns a tuple with the Config field value +// and a boolean to check if the value has been set. +func (o *DashboardItemPropertyDataSource) GetConfigOk() (*DashboardItemPropertyDataSourcePropertyConfig, bool) { + if o == nil { + return nil, false + } + return &o.Config, true +} + +// SetConfig sets field value +func (o *DashboardItemPropertyDataSource) SetConfig(v DashboardItemPropertyDataSourcePropertyConfig) { + o.Config = v +} + +// MarshalJSON implements the json.Marshaler interface. +// Marshaler is the interface implemented by types that can marshal themselves into valid JSON. +func (o DashboardItemPropertyDataSource) MarshalJSON() ([]byte, error) { + toSerialize := map[string]any{} + if true { + toSerialize["type"] = o.Type + } + if true { + toSerialize["config"] = o.Config + } + + 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 *DashboardItemPropertyDataSource) UnmarshalJSON(bytes []byte) (err error) { + varDashboardItemPropertyDataSource := _DashboardItemPropertyDataSource{} + + if err = json.Unmarshal(bytes, &varDashboardItemPropertyDataSource); err == nil { + *o = DashboardItemPropertyDataSource(varDashboardItemPropertyDataSource) + } + + additionalProperties := make(map[string]any) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "type") + delete(additionalProperties, "config") + o.AdditionalProperties = additionalProperties + } + + return err +} + +// NullableDashboardItemPropertyDataSource is a helper abstraction for handling nullable dashboarditempropertydatasource types. +type NullableDashboardItemPropertyDataSource struct { + value *DashboardItemPropertyDataSource + isSet bool +} + +// Get returns the value. +func (v NullableDashboardItemPropertyDataSource) Get() *DashboardItemPropertyDataSource { + return v.value +} + +// Set modifies the value. +func (v *NullableDashboardItemPropertyDataSource) Set(val *DashboardItemPropertyDataSource) { + v.value = val + v.isSet = true +} + +// IsSet indicates if the value was set. +func (v NullableDashboardItemPropertyDataSource) IsSet() bool { + return v.isSet +} + +// Unset removes the value. +func (v *NullableDashboardItemPropertyDataSource) Unset() { + v.value = nil + v.isSet = false +} + +// NewNullableDashboardItemPropertyDataSource returns a pointer to a new instance of NullableDashboardItemPropertyDataSource. +func NewNullableDashboardItemPropertyDataSource(val *DashboardItemPropertyDataSource) *NullableDashboardItemPropertyDataSource { + return &NullableDashboardItemPropertyDataSource{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 NullableDashboardItemPropertyDataSource) 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 *NullableDashboardItemPropertyDataSource) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/fastly/model_dashboard_item_property_data_source_property_config.go b/fastly/model_dashboard_item_property_data_source_property_config.go new file mode 100644 index 00000000..3f653f25 --- /dev/null +++ b/fastly/model_dashboard_item_property_data_source_property_config.go @@ -0,0 +1,149 @@ +// 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://www.fastly.com/documentation/reference/api/) + +API version: 1.0.0 +Contact: oss@fastly.com +*/ + +// This code is auto-generated; DO NOT EDIT. + + +import ( + "encoding/json" +) + +// DashboardItemPropertyDataSourcePropertyConfig [Configuration options](#data-source-config) for the selected data source. +type DashboardItemPropertyDataSourcePropertyConfig struct { + // The metrics to visualize. Valid options are defined by the selected [data source](#field_data_source). + Metrics []string `json:"metrics"` + AdditionalProperties map[string]any +} + +type _DashboardItemPropertyDataSourcePropertyConfig DashboardItemPropertyDataSourcePropertyConfig + +// NewDashboardItemPropertyDataSourcePropertyConfig instantiates a new DashboardItemPropertyDataSourcePropertyConfig object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDashboardItemPropertyDataSourcePropertyConfig(metrics []string) *DashboardItemPropertyDataSourcePropertyConfig { + this := DashboardItemPropertyDataSourcePropertyConfig{} + this.Metrics = metrics + return &this +} + +// NewDashboardItemPropertyDataSourcePropertyConfigWithDefaults instantiates a new DashboardItemPropertyDataSourcePropertyConfig object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDashboardItemPropertyDataSourcePropertyConfigWithDefaults() *DashboardItemPropertyDataSourcePropertyConfig { + this := DashboardItemPropertyDataSourcePropertyConfig{} + return &this +} + +// GetMetrics returns the Metrics field value +func (o *DashboardItemPropertyDataSourcePropertyConfig) GetMetrics() []string { + if o == nil { + var ret []string + return ret + } + + return o.Metrics +} + +// GetMetricsOk returns a tuple with the Metrics field value +// and a boolean to check if the value has been set. +func (o *DashboardItemPropertyDataSourcePropertyConfig) GetMetricsOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.Metrics, true +} + +// SetMetrics sets field value +func (o *DashboardItemPropertyDataSourcePropertyConfig) SetMetrics(v []string) { + o.Metrics = v +} + +// MarshalJSON implements the json.Marshaler interface. +// Marshaler is the interface implemented by types that can marshal themselves into valid JSON. +func (o DashboardItemPropertyDataSourcePropertyConfig) MarshalJSON() ([]byte, error) { + toSerialize := map[string]any{} + if true { + toSerialize["metrics"] = o.Metrics + } + + 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 *DashboardItemPropertyDataSourcePropertyConfig) UnmarshalJSON(bytes []byte) (err error) { + varDashboardItemPropertyDataSourcePropertyConfig := _DashboardItemPropertyDataSourcePropertyConfig{} + + if err = json.Unmarshal(bytes, &varDashboardItemPropertyDataSourcePropertyConfig); err == nil { + *o = DashboardItemPropertyDataSourcePropertyConfig(varDashboardItemPropertyDataSourcePropertyConfig) + } + + additionalProperties := make(map[string]any) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "metrics") + o.AdditionalProperties = additionalProperties + } + + return err +} + +// NullableDashboardItemPropertyDataSourcePropertyConfig is a helper abstraction for handling nullable dashboarditempropertydatasourcepropertyconfig types. +type NullableDashboardItemPropertyDataSourcePropertyConfig struct { + value *DashboardItemPropertyDataSourcePropertyConfig + isSet bool +} + +// Get returns the value. +func (v NullableDashboardItemPropertyDataSourcePropertyConfig) Get() *DashboardItemPropertyDataSourcePropertyConfig { + return v.value +} + +// Set modifies the value. +func (v *NullableDashboardItemPropertyDataSourcePropertyConfig) Set(val *DashboardItemPropertyDataSourcePropertyConfig) { + v.value = val + v.isSet = true +} + +// IsSet indicates if the value was set. +func (v NullableDashboardItemPropertyDataSourcePropertyConfig) IsSet() bool { + return v.isSet +} + +// Unset removes the value. +func (v *NullableDashboardItemPropertyDataSourcePropertyConfig) Unset() { + v.value = nil + v.isSet = false +} + +// NewNullableDashboardItemPropertyDataSourcePropertyConfig returns a pointer to a new instance of NullableDashboardItemPropertyDataSourcePropertyConfig. +func NewNullableDashboardItemPropertyDataSourcePropertyConfig(val *DashboardItemPropertyDataSourcePropertyConfig) *NullableDashboardItemPropertyDataSourcePropertyConfig { + return &NullableDashboardItemPropertyDataSourcePropertyConfig{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 NullableDashboardItemPropertyDataSourcePropertyConfig) 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 *NullableDashboardItemPropertyDataSourcePropertyConfig) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/fastly/model_dashboard_item_property_visualization.go b/fastly/model_dashboard_item_property_visualization.go new file mode 100644 index 00000000..e9e003f8 --- /dev/null +++ b/fastly/model_dashboard_item_property_visualization.go @@ -0,0 +1,179 @@ +// 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://www.fastly.com/documentation/reference/api/) + +API version: 1.0.0 +Contact: oss@fastly.com +*/ + +// This code is auto-generated; DO NOT EDIT. + + +import ( + "encoding/json" +) + +// DashboardItemPropertyVisualization [An object](#visualization) which describes the data visualization to display. +type DashboardItemPropertyVisualization struct { + // The type of visualization to display. + Type string `json:"type"` + Config DashboardItemPropertyVisualizationPropertyConfig `json:"config"` + AdditionalProperties map[string]any +} + +type _DashboardItemPropertyVisualization DashboardItemPropertyVisualization + +// NewDashboardItemPropertyVisualization instantiates a new DashboardItemPropertyVisualization object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDashboardItemPropertyVisualization(resourceType string, config DashboardItemPropertyVisualizationPropertyConfig) *DashboardItemPropertyVisualization { + this := DashboardItemPropertyVisualization{} + this.Type = resourceType + this.Config = config + return &this +} + +// NewDashboardItemPropertyVisualizationWithDefaults instantiates a new DashboardItemPropertyVisualization object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDashboardItemPropertyVisualizationWithDefaults() *DashboardItemPropertyVisualization { + this := DashboardItemPropertyVisualization{} + return &this +} + +// GetType returns the Type field value +func (o *DashboardItemPropertyVisualization) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *DashboardItemPropertyVisualization) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *DashboardItemPropertyVisualization) SetType(v string) { + o.Type = v +} + +// GetConfig returns the Config field value +func (o *DashboardItemPropertyVisualization) GetConfig() DashboardItemPropertyVisualizationPropertyConfig { + if o == nil { + var ret DashboardItemPropertyVisualizationPropertyConfig + return ret + } + + return o.Config +} + +// GetConfigOk returns a tuple with the Config field value +// and a boolean to check if the value has been set. +func (o *DashboardItemPropertyVisualization) GetConfigOk() (*DashboardItemPropertyVisualizationPropertyConfig, bool) { + if o == nil { + return nil, false + } + return &o.Config, true +} + +// SetConfig sets field value +func (o *DashboardItemPropertyVisualization) SetConfig(v DashboardItemPropertyVisualizationPropertyConfig) { + o.Config = v +} + +// MarshalJSON implements the json.Marshaler interface. +// Marshaler is the interface implemented by types that can marshal themselves into valid JSON. +func (o DashboardItemPropertyVisualization) MarshalJSON() ([]byte, error) { + toSerialize := map[string]any{} + if true { + toSerialize["type"] = o.Type + } + if true { + toSerialize["config"] = o.Config + } + + 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 *DashboardItemPropertyVisualization) UnmarshalJSON(bytes []byte) (err error) { + varDashboardItemPropertyVisualization := _DashboardItemPropertyVisualization{} + + if err = json.Unmarshal(bytes, &varDashboardItemPropertyVisualization); err == nil { + *o = DashboardItemPropertyVisualization(varDashboardItemPropertyVisualization) + } + + additionalProperties := make(map[string]any) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "type") + delete(additionalProperties, "config") + o.AdditionalProperties = additionalProperties + } + + return err +} + +// NullableDashboardItemPropertyVisualization is a helper abstraction for handling nullable dashboarditempropertyvisualization types. +type NullableDashboardItemPropertyVisualization struct { + value *DashboardItemPropertyVisualization + isSet bool +} + +// Get returns the value. +func (v NullableDashboardItemPropertyVisualization) Get() *DashboardItemPropertyVisualization { + return v.value +} + +// Set modifies the value. +func (v *NullableDashboardItemPropertyVisualization) Set(val *DashboardItemPropertyVisualization) { + v.value = val + v.isSet = true +} + +// IsSet indicates if the value was set. +func (v NullableDashboardItemPropertyVisualization) IsSet() bool { + return v.isSet +} + +// Unset removes the value. +func (v *NullableDashboardItemPropertyVisualization) Unset() { + v.value = nil + v.isSet = false +} + +// NewNullableDashboardItemPropertyVisualization returns a pointer to a new instance of NullableDashboardItemPropertyVisualization. +func NewNullableDashboardItemPropertyVisualization(val *DashboardItemPropertyVisualization) *NullableDashboardItemPropertyVisualization { + return &NullableDashboardItemPropertyVisualization{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 NullableDashboardItemPropertyVisualization) 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 *NullableDashboardItemPropertyVisualization) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/fastly/model_dashboard_item_property_visualization_property_config.go b/fastly/model_dashboard_item_property_visualization_property_config.go new file mode 100644 index 00000000..82bfb1c2 --- /dev/null +++ b/fastly/model_dashboard_item_property_visualization_property_config.go @@ -0,0 +1,229 @@ +// 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://www.fastly.com/documentation/reference/api/) + +API version: 1.0.0 +Contact: oss@fastly.com +*/ + +// This code is auto-generated; DO NOT EDIT. + + +import ( + "encoding/json" +) + +// DashboardItemPropertyVisualizationPropertyConfig [Configuration options](#visualization-config) for the given visualization. +type DashboardItemPropertyVisualizationPropertyConfig struct { + // The type of chart to display. + PlotType string `json:"plot_type"` + // (Optional) The units to use to format the data. + Format *string `json:"format,omitempty"` + // (Optional) The aggregation function to apply to the dataset. + CalculationMethod *string `json:"calculation_method,omitempty"` + AdditionalProperties map[string]any +} + +type _DashboardItemPropertyVisualizationPropertyConfig DashboardItemPropertyVisualizationPropertyConfig + +// NewDashboardItemPropertyVisualizationPropertyConfig instantiates a new DashboardItemPropertyVisualizationPropertyConfig object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDashboardItemPropertyVisualizationPropertyConfig(plotType string) *DashboardItemPropertyVisualizationPropertyConfig { + this := DashboardItemPropertyVisualizationPropertyConfig{} + this.PlotType = plotType + var format string = "number" + this.Format = &format + return &this +} + +// NewDashboardItemPropertyVisualizationPropertyConfigWithDefaults instantiates a new DashboardItemPropertyVisualizationPropertyConfig object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDashboardItemPropertyVisualizationPropertyConfigWithDefaults() *DashboardItemPropertyVisualizationPropertyConfig { + this := DashboardItemPropertyVisualizationPropertyConfig{} + var format string = "number" + this.Format = &format + return &this +} + +// GetPlotType returns the PlotType field value +func (o *DashboardItemPropertyVisualizationPropertyConfig) GetPlotType() string { + if o == nil { + var ret string + return ret + } + + return o.PlotType +} + +// GetPlotTypeOk returns a tuple with the PlotType field value +// and a boolean to check if the value has been set. +func (o *DashboardItemPropertyVisualizationPropertyConfig) GetPlotTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.PlotType, true +} + +// SetPlotType sets field value +func (o *DashboardItemPropertyVisualizationPropertyConfig) SetPlotType(v string) { + o.PlotType = v +} + +// GetFormat returns the Format field value if set, zero value otherwise. +func (o *DashboardItemPropertyVisualizationPropertyConfig) GetFormat() string { + if o == nil || o.Format == nil { + var ret string + return ret + } + return *o.Format +} + +// GetFormatOk returns a tuple with the Format field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DashboardItemPropertyVisualizationPropertyConfig) GetFormatOk() (*string, bool) { + if o == nil || o.Format == nil { + return nil, false + } + return o.Format, true +} + +// HasFormat returns a boolean if a field has been set. +func (o *DashboardItemPropertyVisualizationPropertyConfig) HasFormat() bool { + if o != nil && o.Format != nil { + return true + } + + return false +} + +// SetFormat gets a reference to the given string and assigns it to the Format field. +func (o *DashboardItemPropertyVisualizationPropertyConfig) SetFormat(v string) { + o.Format = &v +} + +// GetCalculationMethod returns the CalculationMethod field value if set, zero value otherwise. +func (o *DashboardItemPropertyVisualizationPropertyConfig) GetCalculationMethod() string { + if o == nil || o.CalculationMethod == nil { + var ret string + return ret + } + return *o.CalculationMethod +} + +// GetCalculationMethodOk returns a tuple with the CalculationMethod field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DashboardItemPropertyVisualizationPropertyConfig) GetCalculationMethodOk() (*string, bool) { + if o == nil || o.CalculationMethod == nil { + return nil, false + } + return o.CalculationMethod, true +} + +// HasCalculationMethod returns a boolean if a field has been set. +func (o *DashboardItemPropertyVisualizationPropertyConfig) HasCalculationMethod() bool { + if o != nil && o.CalculationMethod != nil { + return true + } + + return false +} + +// SetCalculationMethod gets a reference to the given string and assigns it to the CalculationMethod field. +func (o *DashboardItemPropertyVisualizationPropertyConfig) SetCalculationMethod(v string) { + o.CalculationMethod = &v +} + +// MarshalJSON implements the json.Marshaler interface. +// Marshaler is the interface implemented by types that can marshal themselves into valid JSON. +func (o DashboardItemPropertyVisualizationPropertyConfig) MarshalJSON() ([]byte, error) { + toSerialize := map[string]any{} + if true { + toSerialize["plot_type"] = o.PlotType + } + if o.Format != nil { + toSerialize["format"] = o.Format + } + if o.CalculationMethod != nil { + toSerialize["calculation_method"] = o.CalculationMethod + } + + 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 *DashboardItemPropertyVisualizationPropertyConfig) UnmarshalJSON(bytes []byte) (err error) { + varDashboardItemPropertyVisualizationPropertyConfig := _DashboardItemPropertyVisualizationPropertyConfig{} + + if err = json.Unmarshal(bytes, &varDashboardItemPropertyVisualizationPropertyConfig); err == nil { + *o = DashboardItemPropertyVisualizationPropertyConfig(varDashboardItemPropertyVisualizationPropertyConfig) + } + + additionalProperties := make(map[string]any) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "plot_type") + delete(additionalProperties, "format") + delete(additionalProperties, "calculation_method") + o.AdditionalProperties = additionalProperties + } + + return err +} + +// NullableDashboardItemPropertyVisualizationPropertyConfig is a helper abstraction for handling nullable dashboarditempropertyvisualizationpropertyconfig types. +type NullableDashboardItemPropertyVisualizationPropertyConfig struct { + value *DashboardItemPropertyVisualizationPropertyConfig + isSet bool +} + +// Get returns the value. +func (v NullableDashboardItemPropertyVisualizationPropertyConfig) Get() *DashboardItemPropertyVisualizationPropertyConfig { + return v.value +} + +// Set modifies the value. +func (v *NullableDashboardItemPropertyVisualizationPropertyConfig) Set(val *DashboardItemPropertyVisualizationPropertyConfig) { + v.value = val + v.isSet = true +} + +// IsSet indicates if the value was set. +func (v NullableDashboardItemPropertyVisualizationPropertyConfig) IsSet() bool { + return v.isSet +} + +// Unset removes the value. +func (v *NullableDashboardItemPropertyVisualizationPropertyConfig) Unset() { + v.value = nil + v.isSet = false +} + +// NewNullableDashboardItemPropertyVisualizationPropertyConfig returns a pointer to a new instance of NullableDashboardItemPropertyVisualizationPropertyConfig. +func NewNullableDashboardItemPropertyVisualizationPropertyConfig(val *DashboardItemPropertyVisualizationPropertyConfig) *NullableDashboardItemPropertyVisualizationPropertyConfig { + return &NullableDashboardItemPropertyVisualizationPropertyConfig{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 NullableDashboardItemPropertyVisualizationPropertyConfig) 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 *NullableDashboardItemPropertyVisualizationPropertyConfig) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/fastly/model_dashboard_property_created_by.go b/fastly/model_dashboard_property_created_by.go new file mode 100644 index 00000000..5c89a10a --- /dev/null +++ b/fastly/model_dashboard_property_created_by.go @@ -0,0 +1,92 @@ +// 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://www.fastly.com/documentation/reference/api/) + +API version: 1.0.0 +Contact: oss@fastly.com +*/ + +// This code is auto-generated; DO NOT EDIT. + + +import ( + "encoding/json" +) + +// DashboardPropertyCreatedBy The ID of the user who created the dashboard +type DashboardPropertyCreatedBy struct { +} + +// NewDashboardPropertyCreatedBy instantiates a new DashboardPropertyCreatedBy object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDashboardPropertyCreatedBy() *DashboardPropertyCreatedBy { + this := DashboardPropertyCreatedBy{} + return &this +} + +// NewDashboardPropertyCreatedByWithDefaults instantiates a new DashboardPropertyCreatedBy object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDashboardPropertyCreatedByWithDefaults() *DashboardPropertyCreatedBy { + this := DashboardPropertyCreatedBy{} + return &this +} + +// MarshalJSON implements the json.Marshaler interface. +// Marshaler is the interface implemented by types that can marshal themselves into valid JSON. +func (o DashboardPropertyCreatedBy) MarshalJSON() ([]byte, error) { + toSerialize := map[string]any{} + return json.Marshal(toSerialize) +} + +// NullableDashboardPropertyCreatedBy is a helper abstraction for handling nullable dashboardpropertycreatedby types. +type NullableDashboardPropertyCreatedBy struct { + value *DashboardPropertyCreatedBy + isSet bool +} + +// Get returns the value. +func (v NullableDashboardPropertyCreatedBy) Get() *DashboardPropertyCreatedBy { + return v.value +} + +// Set modifies the value. +func (v *NullableDashboardPropertyCreatedBy) Set(val *DashboardPropertyCreatedBy) { + v.value = val + v.isSet = true +} + +// IsSet indicates if the value was set. +func (v NullableDashboardPropertyCreatedBy) IsSet() bool { + return v.isSet +} + +// Unset removes the value. +func (v *NullableDashboardPropertyCreatedBy) Unset() { + v.value = nil + v.isSet = false +} + +// NewNullableDashboardPropertyCreatedBy returns a pointer to a new instance of NullableDashboardPropertyCreatedBy. +func NewNullableDashboardPropertyCreatedBy(val *DashboardPropertyCreatedBy) *NullableDashboardPropertyCreatedBy { + return &NullableDashboardPropertyCreatedBy{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 NullableDashboardPropertyCreatedBy) 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 *NullableDashboardPropertyCreatedBy) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/fastly/model_dashboard_property_updated_by.go b/fastly/model_dashboard_property_updated_by.go new file mode 100644 index 00000000..e0df60ff --- /dev/null +++ b/fastly/model_dashboard_property_updated_by.go @@ -0,0 +1,92 @@ +// 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://www.fastly.com/documentation/reference/api/) + +API version: 1.0.0 +Contact: oss@fastly.com +*/ + +// This code is auto-generated; DO NOT EDIT. + + +import ( + "encoding/json" +) + +// DashboardPropertyUpdatedBy The ID of the user who last modified the dashboard +type DashboardPropertyUpdatedBy struct { +} + +// NewDashboardPropertyUpdatedBy instantiates a new DashboardPropertyUpdatedBy object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDashboardPropertyUpdatedBy() *DashboardPropertyUpdatedBy { + this := DashboardPropertyUpdatedBy{} + return &this +} + +// NewDashboardPropertyUpdatedByWithDefaults instantiates a new DashboardPropertyUpdatedBy object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDashboardPropertyUpdatedByWithDefaults() *DashboardPropertyUpdatedBy { + this := DashboardPropertyUpdatedBy{} + return &this +} + +// MarshalJSON implements the json.Marshaler interface. +// Marshaler is the interface implemented by types that can marshal themselves into valid JSON. +func (o DashboardPropertyUpdatedBy) MarshalJSON() ([]byte, error) { + toSerialize := map[string]any{} + return json.Marshal(toSerialize) +} + +// NullableDashboardPropertyUpdatedBy is a helper abstraction for handling nullable dashboardpropertyupdatedby types. +type NullableDashboardPropertyUpdatedBy struct { + value *DashboardPropertyUpdatedBy + isSet bool +} + +// Get returns the value. +func (v NullableDashboardPropertyUpdatedBy) Get() *DashboardPropertyUpdatedBy { + return v.value +} + +// Set modifies the value. +func (v *NullableDashboardPropertyUpdatedBy) Set(val *DashboardPropertyUpdatedBy) { + v.value = val + v.isSet = true +} + +// IsSet indicates if the value was set. +func (v NullableDashboardPropertyUpdatedBy) IsSet() bool { + return v.isSet +} + +// Unset removes the value. +func (v *NullableDashboardPropertyUpdatedBy) Unset() { + v.value = nil + v.isSet = false +} + +// NewNullableDashboardPropertyUpdatedBy returns a pointer to a new instance of NullableDashboardPropertyUpdatedBy. +func NewNullableDashboardPropertyUpdatedBy(val *DashboardPropertyUpdatedBy) *NullableDashboardPropertyUpdatedBy { + return &NullableDashboardPropertyUpdatedBy{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 NullableDashboardPropertyUpdatedBy) 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 *NullableDashboardPropertyUpdatedBy) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/fastly/model_domain_inspector_measurements.go b/fastly/model_domain_inspector_measurements.go index 0491e232..f8045732 100644 --- a/fastly/model_domain_inspector_measurements.go +++ b/fastly/model_domain_inspector_measurements.go @@ -95,7 +95,7 @@ type DomainInspectorMeasurements struct { Bandwidth *int32 `json:"bandwidth,omitempty"` // Ratio of cache hits to cache misses at the edge, between 0 and 1 (`edge_hit_requests` / (`edge_hit_requests` + `edge_miss_requests`)). EdgeHitRatio *float32 `json:"edge_hit_ratio,omitempty"` - // Ratio of response bytes delivered from the edge compared to what is delivered from origin, between 0 and 1. (`edge_resp_body_bytes` + `edge_resp_header_bytes`) / (`origin_fetch_resp_body_bytes` + `origin_fetch_resp_header_bytes` + `edge_resp_body_bytes` + `edge_resp_header_bytes`). + // Origin Offload measures the ratio of bytes served to end users that were cached by Fastly, over the bytes served to end users, between 0 and 1. ((`edge_resp_body_bytes` + `edge_resp_header_bytes`) - (`origin_fetch_resp_body_bytes` + `origin_fetch_resp_header_bytes`)) / (`edge_resp_body_bytes` + `edge_resp_header_bytes`). Previously, Origin Offload used a different formula. [Learn more](https://www.fastly.com/documentation/reference/changes/2024/06/add-origin_offload-metric). OriginOffload *float32 `json:"origin_offload,omitempty"` // Number of responses received from origin with status code 200 (Success). OriginStatus200 *int32 `json:"origin_status_200,omitempty"` diff --git a/fastly/model_invoice_response.go b/fastly/model_eom_invoice_response.go similarity index 75% rename from fastly/model_invoice_response.go rename to fastly/model_eom_invoice_response.go index fbfbdb49..24ea8a06 100644 --- a/fastly/model_invoice_response.go +++ b/fastly/model_eom_invoice_response.go @@ -18,8 +18,8 @@ import ( "time" ) -// InvoiceResponse struct for InvoiceResponse -type InvoiceResponse struct { +// EomInvoiceResponse struct for EomInvoiceResponse +type EomInvoiceResponse struct { // Customer ID associated with the invoice. CustomerID *string `json:"customer_id,omitempty"` // Alphanumeric string identifying the invoice. @@ -40,27 +40,27 @@ type InvoiceResponse struct { AdditionalProperties map[string]any } -type _InvoiceResponse InvoiceResponse +type _EomInvoiceResponse EomInvoiceResponse -// NewInvoiceResponse instantiates a new InvoiceResponse object +// NewEomInvoiceResponse instantiates a new EomInvoiceResponse object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewInvoiceResponse() *InvoiceResponse { - this := InvoiceResponse{} +func NewEomInvoiceResponse() *EomInvoiceResponse { + this := EomInvoiceResponse{} return &this } -// NewInvoiceResponseWithDefaults instantiates a new InvoiceResponse object +// NewEomInvoiceResponseWithDefaults instantiates a new EomInvoiceResponse object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set -func NewInvoiceResponseWithDefaults() *InvoiceResponse { - this := InvoiceResponse{} +func NewEomInvoiceResponseWithDefaults() *EomInvoiceResponse { + this := EomInvoiceResponse{} return &this } // GetCustomerID returns the CustomerID field value if set, zero value otherwise. -func (o *InvoiceResponse) GetCustomerID() string { +func (o *EomInvoiceResponse) GetCustomerID() string { if o == nil || o.CustomerID == nil { var ret string return ret @@ -70,7 +70,7 @@ func (o *InvoiceResponse) GetCustomerID() string { // GetCustomerIDOk returns a tuple with the CustomerID field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *InvoiceResponse) GetCustomerIDOk() (*string, bool) { +func (o *EomInvoiceResponse) GetCustomerIDOk() (*string, bool) { if o == nil || o.CustomerID == nil { return nil, false } @@ -78,7 +78,7 @@ func (o *InvoiceResponse) GetCustomerIDOk() (*string, bool) { } // HasCustomerID returns a boolean if a field has been set. -func (o *InvoiceResponse) HasCustomerID() bool { +func (o *EomInvoiceResponse) HasCustomerID() bool { if o != nil && o.CustomerID != nil { return true } @@ -87,12 +87,12 @@ func (o *InvoiceResponse) HasCustomerID() bool { } // SetCustomerID gets a reference to the given string and assigns it to the CustomerID field. -func (o *InvoiceResponse) SetCustomerID(v string) { +func (o *EomInvoiceResponse) SetCustomerID(v string) { o.CustomerID = &v } // GetInvoiceID returns the InvoiceID field value if set, zero value otherwise. -func (o *InvoiceResponse) GetInvoiceID() string { +func (o *EomInvoiceResponse) GetInvoiceID() string { if o == nil || o.InvoiceID == nil { var ret string return ret @@ -102,7 +102,7 @@ func (o *InvoiceResponse) GetInvoiceID() string { // GetInvoiceIDOk returns a tuple with the InvoiceID field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *InvoiceResponse) GetInvoiceIDOk() (*string, bool) { +func (o *EomInvoiceResponse) GetInvoiceIDOk() (*string, bool) { if o == nil || o.InvoiceID == nil { return nil, false } @@ -110,7 +110,7 @@ func (o *InvoiceResponse) GetInvoiceIDOk() (*string, bool) { } // HasInvoiceID returns a boolean if a field has been set. -func (o *InvoiceResponse) HasInvoiceID() bool { +func (o *EomInvoiceResponse) HasInvoiceID() bool { if o != nil && o.InvoiceID != nil { return true } @@ -119,12 +119,12 @@ func (o *InvoiceResponse) HasInvoiceID() bool { } // SetInvoiceID gets a reference to the given string and assigns it to the InvoiceID field. -func (o *InvoiceResponse) SetInvoiceID(v string) { +func (o *EomInvoiceResponse) SetInvoiceID(v string) { o.InvoiceID = &v } // GetInvoicePostedOn returns the InvoicePostedOn field value if set, zero value otherwise. -func (o *InvoiceResponse) GetInvoicePostedOn() time.Time { +func (o *EomInvoiceResponse) GetInvoicePostedOn() time.Time { if o == nil || o.InvoicePostedOn == nil { var ret time.Time return ret @@ -134,7 +134,7 @@ func (o *InvoiceResponse) GetInvoicePostedOn() time.Time { // GetInvoicePostedOnOk returns a tuple with the InvoicePostedOn field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *InvoiceResponse) GetInvoicePostedOnOk() (*time.Time, bool) { +func (o *EomInvoiceResponse) GetInvoicePostedOnOk() (*time.Time, bool) { if o == nil || o.InvoicePostedOn == nil { return nil, false } @@ -142,7 +142,7 @@ func (o *InvoiceResponse) GetInvoicePostedOnOk() (*time.Time, bool) { } // HasInvoicePostedOn returns a boolean if a field has been set. -func (o *InvoiceResponse) HasInvoicePostedOn() bool { +func (o *EomInvoiceResponse) HasInvoicePostedOn() bool { if o != nil && o.InvoicePostedOn != nil { return true } @@ -151,12 +151,12 @@ func (o *InvoiceResponse) HasInvoicePostedOn() bool { } // SetInvoicePostedOn gets a reference to the given time.Time and assigns it to the InvoicePostedOn field. -func (o *InvoiceResponse) SetInvoicePostedOn(v time.Time) { +func (o *EomInvoiceResponse) SetInvoicePostedOn(v time.Time) { o.InvoicePostedOn = &v } // GetBillingStartDate returns the BillingStartDate field value if set, zero value otherwise. -func (o *InvoiceResponse) GetBillingStartDate() time.Time { +func (o *EomInvoiceResponse) GetBillingStartDate() time.Time { if o == nil || o.BillingStartDate == nil { var ret time.Time return ret @@ -166,7 +166,7 @@ func (o *InvoiceResponse) GetBillingStartDate() time.Time { // GetBillingStartDateOk returns a tuple with the BillingStartDate field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *InvoiceResponse) GetBillingStartDateOk() (*time.Time, bool) { +func (o *EomInvoiceResponse) GetBillingStartDateOk() (*time.Time, bool) { if o == nil || o.BillingStartDate == nil { return nil, false } @@ -174,7 +174,7 @@ func (o *InvoiceResponse) GetBillingStartDateOk() (*time.Time, bool) { } // HasBillingStartDate returns a boolean if a field has been set. -func (o *InvoiceResponse) HasBillingStartDate() bool { +func (o *EomInvoiceResponse) HasBillingStartDate() bool { if o != nil && o.BillingStartDate != nil { return true } @@ -183,12 +183,12 @@ func (o *InvoiceResponse) HasBillingStartDate() bool { } // SetBillingStartDate gets a reference to the given time.Time and assigns it to the BillingStartDate field. -func (o *InvoiceResponse) SetBillingStartDate(v time.Time) { +func (o *EomInvoiceResponse) SetBillingStartDate(v time.Time) { o.BillingStartDate = &v } // GetBillingEndDate returns the BillingEndDate field value if set, zero value otherwise. -func (o *InvoiceResponse) GetBillingEndDate() time.Time { +func (o *EomInvoiceResponse) GetBillingEndDate() time.Time { if o == nil || o.BillingEndDate == nil { var ret time.Time return ret @@ -198,7 +198,7 @@ func (o *InvoiceResponse) GetBillingEndDate() time.Time { // GetBillingEndDateOk returns a tuple with the BillingEndDate field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *InvoiceResponse) GetBillingEndDateOk() (*time.Time, bool) { +func (o *EomInvoiceResponse) GetBillingEndDateOk() (*time.Time, bool) { if o == nil || o.BillingEndDate == nil { return nil, false } @@ -206,7 +206,7 @@ func (o *InvoiceResponse) GetBillingEndDateOk() (*time.Time, bool) { } // HasBillingEndDate returns a boolean if a field has been set. -func (o *InvoiceResponse) HasBillingEndDate() bool { +func (o *EomInvoiceResponse) HasBillingEndDate() bool { if o != nil && o.BillingEndDate != nil { return true } @@ -215,12 +215,12 @@ func (o *InvoiceResponse) HasBillingEndDate() bool { } // SetBillingEndDate gets a reference to the given time.Time and assigns it to the BillingEndDate field. -func (o *InvoiceResponse) SetBillingEndDate(v time.Time) { +func (o *EomInvoiceResponse) SetBillingEndDate(v time.Time) { o.BillingEndDate = &v } // GetStatementNumber returns the StatementNumber field value if set, zero value otherwise. -func (o *InvoiceResponse) GetStatementNumber() string { +func (o *EomInvoiceResponse) GetStatementNumber() string { if o == nil || o.StatementNumber == nil { var ret string return ret @@ -230,7 +230,7 @@ func (o *InvoiceResponse) GetStatementNumber() string { // GetStatementNumberOk returns a tuple with the StatementNumber field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *InvoiceResponse) GetStatementNumberOk() (*string, bool) { +func (o *EomInvoiceResponse) GetStatementNumberOk() (*string, bool) { if o == nil || o.StatementNumber == nil { return nil, false } @@ -238,7 +238,7 @@ func (o *InvoiceResponse) GetStatementNumberOk() (*string, bool) { } // HasStatementNumber returns a boolean if a field has been set. -func (o *InvoiceResponse) HasStatementNumber() bool { +func (o *EomInvoiceResponse) HasStatementNumber() bool { if o != nil && o.StatementNumber != nil { return true } @@ -247,12 +247,12 @@ func (o *InvoiceResponse) HasStatementNumber() bool { } // SetStatementNumber gets a reference to the given string and assigns it to the StatementNumber field. -func (o *InvoiceResponse) SetStatementNumber(v string) { +func (o *EomInvoiceResponse) SetStatementNumber(v string) { o.StatementNumber = &v } // GetCurrencyCode returns the CurrencyCode field value if set, zero value otherwise. -func (o *InvoiceResponse) GetCurrencyCode() string { +func (o *EomInvoiceResponse) GetCurrencyCode() string { if o == nil || o.CurrencyCode == nil { var ret string return ret @@ -262,7 +262,7 @@ func (o *InvoiceResponse) GetCurrencyCode() string { // GetCurrencyCodeOk returns a tuple with the CurrencyCode field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *InvoiceResponse) GetCurrencyCodeOk() (*string, bool) { +func (o *EomInvoiceResponse) GetCurrencyCodeOk() (*string, bool) { if o == nil || o.CurrencyCode == nil { return nil, false } @@ -270,7 +270,7 @@ func (o *InvoiceResponse) GetCurrencyCodeOk() (*string, bool) { } // HasCurrencyCode returns a boolean if a field has been set. -func (o *InvoiceResponse) HasCurrencyCode() bool { +func (o *EomInvoiceResponse) HasCurrencyCode() bool { if o != nil && o.CurrencyCode != nil { return true } @@ -279,12 +279,12 @@ func (o *InvoiceResponse) HasCurrencyCode() bool { } // SetCurrencyCode gets a reference to the given string and assigns it to the CurrencyCode field. -func (o *InvoiceResponse) SetCurrencyCode(v string) { +func (o *EomInvoiceResponse) SetCurrencyCode(v string) { o.CurrencyCode = &v } // GetMonthlyTransactionAmount returns the MonthlyTransactionAmount field value if set, zero value otherwise. -func (o *InvoiceResponse) GetMonthlyTransactionAmount() float32 { +func (o *EomInvoiceResponse) GetMonthlyTransactionAmount() float32 { if o == nil || o.MonthlyTransactionAmount == nil { var ret float32 return ret @@ -294,7 +294,7 @@ func (o *InvoiceResponse) GetMonthlyTransactionAmount() float32 { // GetMonthlyTransactionAmountOk returns a tuple with the MonthlyTransactionAmount field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *InvoiceResponse) GetMonthlyTransactionAmountOk() (*float32, bool) { +func (o *EomInvoiceResponse) GetMonthlyTransactionAmountOk() (*float32, bool) { if o == nil || o.MonthlyTransactionAmount == nil { return nil, false } @@ -302,7 +302,7 @@ func (o *InvoiceResponse) GetMonthlyTransactionAmountOk() (*float32, bool) { } // HasMonthlyTransactionAmount returns a boolean if a field has been set. -func (o *InvoiceResponse) HasMonthlyTransactionAmount() bool { +func (o *EomInvoiceResponse) HasMonthlyTransactionAmount() bool { if o != nil && o.MonthlyTransactionAmount != nil { return true } @@ -311,12 +311,12 @@ func (o *InvoiceResponse) HasMonthlyTransactionAmount() bool { } // SetMonthlyTransactionAmount gets a reference to the given float32 and assigns it to the MonthlyTransactionAmount field. -func (o *InvoiceResponse) SetMonthlyTransactionAmount(v float32) { +func (o *EomInvoiceResponse) SetMonthlyTransactionAmount(v float32) { o.MonthlyTransactionAmount = &v } // GetTransactionLineItems returns the TransactionLineItems field value if set, zero value otherwise. -func (o *InvoiceResponse) GetTransactionLineItems() []Invoicelineitems { +func (o *EomInvoiceResponse) GetTransactionLineItems() []Invoicelineitems { if o == nil || o.TransactionLineItems == nil { var ret []Invoicelineitems return ret @@ -326,7 +326,7 @@ func (o *InvoiceResponse) GetTransactionLineItems() []Invoicelineitems { // GetTransactionLineItemsOk returns a tuple with the TransactionLineItems field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *InvoiceResponse) GetTransactionLineItemsOk() ([]Invoicelineitems, bool) { +func (o *EomInvoiceResponse) GetTransactionLineItemsOk() ([]Invoicelineitems, bool) { if o == nil || o.TransactionLineItems == nil { return nil, false } @@ -334,7 +334,7 @@ func (o *InvoiceResponse) GetTransactionLineItemsOk() ([]Invoicelineitems, bool) } // HasTransactionLineItems returns a boolean if a field has been set. -func (o *InvoiceResponse) HasTransactionLineItems() bool { +func (o *EomInvoiceResponse) HasTransactionLineItems() bool { if o != nil && o.TransactionLineItems != nil { return true } @@ -343,13 +343,13 @@ func (o *InvoiceResponse) HasTransactionLineItems() bool { } // SetTransactionLineItems gets a reference to the given []Invoicelineitems and assigns it to the TransactionLineItems field. -func (o *InvoiceResponse) SetTransactionLineItems(v []Invoicelineitems) { +func (o *EomInvoiceResponse) SetTransactionLineItems(v []Invoicelineitems) { o.TransactionLineItems = v } // MarshalJSON implements the json.Marshaler interface. // Marshaler is the interface implemented by types that can marshal themselves into valid JSON. -func (o InvoiceResponse) MarshalJSON() ([]byte, error) { +func (o EomInvoiceResponse) MarshalJSON() ([]byte, error) { toSerialize := map[string]any{} if o.CustomerID != nil { toSerialize["customer_id"] = o.CustomerID @@ -388,11 +388,11 @@ func (o InvoiceResponse) 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 *InvoiceResponse) UnmarshalJSON(bytes []byte) (err error) { - varInvoiceResponse := _InvoiceResponse{} +func (o *EomInvoiceResponse) UnmarshalJSON(bytes []byte) (err error) { + varEomInvoiceResponse := _EomInvoiceResponse{} - if err = json.Unmarshal(bytes, &varInvoiceResponse); err == nil { - *o = InvoiceResponse(varInvoiceResponse) + if err = json.Unmarshal(bytes, &varEomInvoiceResponse); err == nil { + *o = EomInvoiceResponse(varEomInvoiceResponse) } additionalProperties := make(map[string]any) @@ -413,48 +413,48 @@ func (o *InvoiceResponse) UnmarshalJSON(bytes []byte) (err error) { return err } -// NullableInvoiceResponse is a helper abstraction for handling nullable invoiceresponse types. -type NullableInvoiceResponse struct { - value *InvoiceResponse +// NullableEomInvoiceResponse is a helper abstraction for handling nullable eominvoiceresponse types. +type NullableEomInvoiceResponse struct { + value *EomInvoiceResponse isSet bool } // Get returns the value. -func (v NullableInvoiceResponse) Get() *InvoiceResponse { +func (v NullableEomInvoiceResponse) Get() *EomInvoiceResponse { return v.value } // Set modifies the value. -func (v *NullableInvoiceResponse) Set(val *InvoiceResponse) { +func (v *NullableEomInvoiceResponse) Set(val *EomInvoiceResponse) { v.value = val v.isSet = true } // IsSet indicates if the value was set. -func (v NullableInvoiceResponse) IsSet() bool { +func (v NullableEomInvoiceResponse) IsSet() bool { return v.isSet } // Unset removes the value. -func (v *NullableInvoiceResponse) Unset() { +func (v *NullableEomInvoiceResponse) Unset() { v.value = nil v.isSet = false } -// NewNullableInvoiceResponse returns a pointer to a new instance of NullableInvoiceResponse. -func NewNullableInvoiceResponse(val *InvoiceResponse) *NullableInvoiceResponse { - return &NullableInvoiceResponse{value: val, isSet: true} +// NewNullableEomInvoiceResponse returns a pointer to a new instance of NullableEomInvoiceResponse. +func NewNullableEomInvoiceResponse(val *EomInvoiceResponse) *NullableEomInvoiceResponse { + return &NullableEomInvoiceResponse{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 NullableInvoiceResponse) MarshalJSON() ([]byte, error) { +func (v NullableEomInvoiceResponse) 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 *NullableInvoiceResponse) UnmarshalJSON(src []byte) error { +func (v *NullableEomInvoiceResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } diff --git a/fastly/model_get_service_level_usage_response.go b/fastly/model_get_service_level_usage_response.go new file mode 100644 index 00000000..09ef84c6 --- /dev/null +++ b/fastly/model_get_service_level_usage_response.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://www.fastly.com/documentation/reference/api/) + +API version: 1.0.0 +Contact: oss@fastly.com +*/ + +// This code is auto-generated; DO NOT EDIT. + + +import ( + "encoding/json" +) + +// GetServiceLevelUsageResponse struct for GetServiceLevelUsageResponse +type GetServiceLevelUsageResponse struct { + Data *ServiceusagemetricsData `json:"data,omitempty"` + AdditionalProperties map[string]any +} + +type _GetServiceLevelUsageResponse GetServiceLevelUsageResponse + +// NewGetServiceLevelUsageResponse instantiates a new GetServiceLevelUsageResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGetServiceLevelUsageResponse() *GetServiceLevelUsageResponse { + this := GetServiceLevelUsageResponse{} + return &this +} + +// NewGetServiceLevelUsageResponseWithDefaults instantiates a new GetServiceLevelUsageResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGetServiceLevelUsageResponseWithDefaults() *GetServiceLevelUsageResponse { + this := GetServiceLevelUsageResponse{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *GetServiceLevelUsageResponse) GetData() ServiceusagemetricsData { + if o == nil || o.Data == nil { + var ret ServiceusagemetricsData + 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 *GetServiceLevelUsageResponse) GetDataOk() (*ServiceusagemetricsData, 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 *GetServiceLevelUsageResponse) HasData() bool { + if o != nil && o.Data != nil { + return true + } + + return false +} + +// SetData gets a reference to the given ServiceusagemetricsData and assigns it to the Data field. +func (o *GetServiceLevelUsageResponse) SetData(v ServiceusagemetricsData) { + 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 GetServiceLevelUsageResponse) 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 *GetServiceLevelUsageResponse) UnmarshalJSON(bytes []byte) (err error) { + varGetServiceLevelUsageResponse := _GetServiceLevelUsageResponse{} + + if err = json.Unmarshal(bytes, &varGetServiceLevelUsageResponse); err == nil { + *o = GetServiceLevelUsageResponse(varGetServiceLevelUsageResponse) + } + + additionalProperties := make(map[string]any) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "data") + o.AdditionalProperties = additionalProperties + } + + return err +} + +// NullableGetServiceLevelUsageResponse is a helper abstraction for handling nullable getservicelevelusageresponse types. +type NullableGetServiceLevelUsageResponse struct { + value *GetServiceLevelUsageResponse + isSet bool +} + +// Get returns the value. +func (v NullableGetServiceLevelUsageResponse) Get() *GetServiceLevelUsageResponse { + return v.value +} + +// Set modifies the value. +func (v *NullableGetServiceLevelUsageResponse) Set(val *GetServiceLevelUsageResponse) { + v.value = val + v.isSet = true +} + +// IsSet indicates if the value was set. +func (v NullableGetServiceLevelUsageResponse) IsSet() bool { + return v.isSet +} + +// Unset removes the value. +func (v *NullableGetServiceLevelUsageResponse) Unset() { + v.value = nil + v.isSet = false +} + +// NewNullableGetServiceLevelUsageResponse returns a pointer to a new instance of NullableGetServiceLevelUsageResponse. +func NewNullableGetServiceLevelUsageResponse(val *GetServiceLevelUsageResponse) *NullableGetServiceLevelUsageResponse { + return &NullableGetServiceLevelUsageResponse{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 NullableGetServiceLevelUsageResponse) 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 *NullableGetServiceLevelUsageResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/fastly/model_relationship_tls_dns_record_dns_record.go b/fastly/model_get_service_level_usage_types_response.go similarity index 55% rename from fastly/model_relationship_tls_dns_record_dns_record.go rename to fastly/model_get_service_level_usage_types_response.go index 434d7411..2185ad48 100644 --- a/fastly/model_relationship_tls_dns_record_dns_record.go +++ b/fastly/model_get_service_level_usage_types_response.go @@ -17,35 +17,35 @@ import ( "encoding/json" ) -// RelationshipTLSDNSRecordDNSRecord struct for RelationshipTLSDNSRecordDNSRecord -type RelationshipTLSDNSRecordDNSRecord struct { - Data []RelationshipMemberTLSDNSRecord `json:"data,omitempty"` +// GetServiceLevelUsageTypesResponse struct for GetServiceLevelUsageTypesResponse +type GetServiceLevelUsageTypesResponse struct { + Data []Serviceusagetype `json:"data,omitempty"` AdditionalProperties map[string]any } -type _RelationshipTLSDNSRecordDNSRecord RelationshipTLSDNSRecordDNSRecord +type _GetServiceLevelUsageTypesResponse GetServiceLevelUsageTypesResponse -// NewRelationshipTLSDNSRecordDNSRecord instantiates a new RelationshipTLSDNSRecordDNSRecord object +// NewGetServiceLevelUsageTypesResponse instantiates a new GetServiceLevelUsageTypesResponse object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewRelationshipTLSDNSRecordDNSRecord() *RelationshipTLSDNSRecordDNSRecord { - this := RelationshipTLSDNSRecordDNSRecord{} +func NewGetServiceLevelUsageTypesResponse() *GetServiceLevelUsageTypesResponse { + this := GetServiceLevelUsageTypesResponse{} return &this } -// NewRelationshipTLSDNSRecordDNSRecordWithDefaults instantiates a new RelationshipTLSDNSRecordDNSRecord object +// NewGetServiceLevelUsageTypesResponseWithDefaults instantiates a new GetServiceLevelUsageTypesResponse object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set -func NewRelationshipTLSDNSRecordDNSRecordWithDefaults() *RelationshipTLSDNSRecordDNSRecord { - this := RelationshipTLSDNSRecordDNSRecord{} +func NewGetServiceLevelUsageTypesResponseWithDefaults() *GetServiceLevelUsageTypesResponse { + this := GetServiceLevelUsageTypesResponse{} return &this } // GetData returns the Data field value if set, zero value otherwise. -func (o *RelationshipTLSDNSRecordDNSRecord) GetData() []RelationshipMemberTLSDNSRecord { +func (o *GetServiceLevelUsageTypesResponse) GetData() []Serviceusagetype { if o == nil || o.Data == nil { - var ret []RelationshipMemberTLSDNSRecord + var ret []Serviceusagetype return ret } return o.Data @@ -53,7 +53,7 @@ func (o *RelationshipTLSDNSRecordDNSRecord) GetData() []RelationshipMemberTLSDNS // 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 *RelationshipTLSDNSRecordDNSRecord) GetDataOk() ([]RelationshipMemberTLSDNSRecord, bool) { +func (o *GetServiceLevelUsageTypesResponse) GetDataOk() ([]Serviceusagetype, bool) { if o == nil || o.Data == nil { return nil, false } @@ -61,7 +61,7 @@ func (o *RelationshipTLSDNSRecordDNSRecord) GetDataOk() ([]RelationshipMemberTLS } // HasData returns a boolean if a field has been set. -func (o *RelationshipTLSDNSRecordDNSRecord) HasData() bool { +func (o *GetServiceLevelUsageTypesResponse) HasData() bool { if o != nil && o.Data != nil { return true } @@ -69,14 +69,14 @@ func (o *RelationshipTLSDNSRecordDNSRecord) HasData() bool { return false } -// SetData gets a reference to the given []RelationshipMemberTLSDNSRecord and assigns it to the Data field. -func (o *RelationshipTLSDNSRecordDNSRecord) SetData(v []RelationshipMemberTLSDNSRecord) { +// SetData gets a reference to the given []Serviceusagetype and assigns it to the Data field. +func (o *GetServiceLevelUsageTypesResponse) SetData(v []Serviceusagetype) { 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 RelationshipTLSDNSRecordDNSRecord) MarshalJSON() ([]byte, error) { +func (o GetServiceLevelUsageTypesResponse) MarshalJSON() ([]byte, error) { toSerialize := map[string]any{} if o.Data != nil { toSerialize["data"] = o.Data @@ -91,11 +91,11 @@ func (o RelationshipTLSDNSRecordDNSRecord) 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 *RelationshipTLSDNSRecordDNSRecord) UnmarshalJSON(bytes []byte) (err error) { - varRelationshipTLSDNSRecordDNSRecord := _RelationshipTLSDNSRecordDNSRecord{} +func (o *GetServiceLevelUsageTypesResponse) UnmarshalJSON(bytes []byte) (err error) { + varGetServiceLevelUsageTypesResponse := _GetServiceLevelUsageTypesResponse{} - if err = json.Unmarshal(bytes, &varRelationshipTLSDNSRecordDNSRecord); err == nil { - *o = RelationshipTLSDNSRecordDNSRecord(varRelationshipTLSDNSRecordDNSRecord) + if err = json.Unmarshal(bytes, &varGetServiceLevelUsageTypesResponse); err == nil { + *o = GetServiceLevelUsageTypesResponse(varGetServiceLevelUsageTypesResponse) } additionalProperties := make(map[string]any) @@ -108,48 +108,48 @@ func (o *RelationshipTLSDNSRecordDNSRecord) UnmarshalJSON(bytes []byte) (err err return err } -// NullableRelationshipTLSDNSRecordDNSRecord is a helper abstraction for handling nullable relationshiptlsdnsrecorddnsrecord types. -type NullableRelationshipTLSDNSRecordDNSRecord struct { - value *RelationshipTLSDNSRecordDNSRecord +// NullableGetServiceLevelUsageTypesResponse is a helper abstraction for handling nullable getservicelevelusagetypesresponse types. +type NullableGetServiceLevelUsageTypesResponse struct { + value *GetServiceLevelUsageTypesResponse isSet bool } // Get returns the value. -func (v NullableRelationshipTLSDNSRecordDNSRecord) Get() *RelationshipTLSDNSRecordDNSRecord { +func (v NullableGetServiceLevelUsageTypesResponse) Get() *GetServiceLevelUsageTypesResponse { return v.value } // Set modifies the value. -func (v *NullableRelationshipTLSDNSRecordDNSRecord) Set(val *RelationshipTLSDNSRecordDNSRecord) { +func (v *NullableGetServiceLevelUsageTypesResponse) Set(val *GetServiceLevelUsageTypesResponse) { v.value = val v.isSet = true } // IsSet indicates if the value was set. -func (v NullableRelationshipTLSDNSRecordDNSRecord) IsSet() bool { +func (v NullableGetServiceLevelUsageTypesResponse) IsSet() bool { return v.isSet } // Unset removes the value. -func (v *NullableRelationshipTLSDNSRecordDNSRecord) Unset() { +func (v *NullableGetServiceLevelUsageTypesResponse) Unset() { v.value = nil v.isSet = false } -// NewNullableRelationshipTLSDNSRecordDNSRecord returns a pointer to a new instance of NullableRelationshipTLSDNSRecordDNSRecord. -func NewNullableRelationshipTLSDNSRecordDNSRecord(val *RelationshipTLSDNSRecordDNSRecord) *NullableRelationshipTLSDNSRecordDNSRecord { - return &NullableRelationshipTLSDNSRecordDNSRecord{value: val, isSet: true} +// NewNullableGetServiceLevelUsageTypesResponse returns a pointer to a new instance of NullableGetServiceLevelUsageTypesResponse. +func NewNullableGetServiceLevelUsageTypesResponse(val *GetServiceLevelUsageTypesResponse) *NullableGetServiceLevelUsageTypesResponse { + return &NullableGetServiceLevelUsageTypesResponse{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 NullableRelationshipTLSDNSRecordDNSRecord) MarshalJSON() ([]byte, error) { +func (v NullableGetServiceLevelUsageTypesResponse) 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 *NullableRelationshipTLSDNSRecordDNSRecord) UnmarshalJSON(src []byte) error { +func (v *NullableGetServiceLevelUsageTypesResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } diff --git a/fastly/model_included_with_tls_configuration.go b/fastly/model_included_with_tls_configuration.go new file mode 100644 index 00000000..37f80ce4 --- /dev/null +++ b/fastly/model_included_with_tls_configuration.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://www.fastly.com/documentation/reference/api/) + +API version: 1.0.0 +Contact: oss@fastly.com +*/ + +// This code is auto-generated; DO NOT EDIT. + + +import ( + "encoding/json" +) + +// IncludedWithTLSConfiguration struct for IncludedWithTLSConfiguration +type IncludedWithTLSConfiguration struct { + Included []IncludedWithTLSConfigurationItem `json:"included,omitempty"` + AdditionalProperties map[string]any +} + +type _IncludedWithTLSConfiguration IncludedWithTLSConfiguration + +// NewIncludedWithTLSConfiguration instantiates a new IncludedWithTLSConfiguration object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewIncludedWithTLSConfiguration() *IncludedWithTLSConfiguration { + this := IncludedWithTLSConfiguration{} + return &this +} + +// NewIncludedWithTLSConfigurationWithDefaults instantiates a new IncludedWithTLSConfiguration object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewIncludedWithTLSConfigurationWithDefaults() *IncludedWithTLSConfiguration { + this := IncludedWithTLSConfiguration{} + return &this +} + +// GetIncluded returns the Included field value if set, zero value otherwise. +func (o *IncludedWithTLSConfiguration) GetIncluded() []IncludedWithTLSConfigurationItem { + if o == nil || o.Included == nil { + var ret []IncludedWithTLSConfigurationItem + return ret + } + return o.Included +} + +// GetIncludedOk returns a tuple with the Included field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IncludedWithTLSConfiguration) GetIncludedOk() ([]IncludedWithTLSConfigurationItem, bool) { + if o == nil || o.Included == nil { + return nil, false + } + return o.Included, true +} + +// HasIncluded returns a boolean if a field has been set. +func (o *IncludedWithTLSConfiguration) HasIncluded() bool { + if o != nil && o.Included != nil { + return true + } + + return false +} + +// SetIncluded gets a reference to the given []IncludedWithTLSConfigurationItem and assigns it to the Included field. +func (o *IncludedWithTLSConfiguration) SetIncluded(v []IncludedWithTLSConfigurationItem) { + o.Included = v +} + +// MarshalJSON implements the json.Marshaler interface. +// Marshaler is the interface implemented by types that can marshal themselves into valid JSON. +func (o IncludedWithTLSConfiguration) MarshalJSON() ([]byte, error) { + toSerialize := map[string]any{} + if o.Included != nil { + toSerialize["included"] = o.Included + } + + 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 *IncludedWithTLSConfiguration) UnmarshalJSON(bytes []byte) (err error) { + varIncludedWithTLSConfiguration := _IncludedWithTLSConfiguration{} + + if err = json.Unmarshal(bytes, &varIncludedWithTLSConfiguration); err == nil { + *o = IncludedWithTLSConfiguration(varIncludedWithTLSConfiguration) + } + + additionalProperties := make(map[string]any) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "included") + o.AdditionalProperties = additionalProperties + } + + return err +} + +// NullableIncludedWithTLSConfiguration is a helper abstraction for handling nullable includedwithtlsconfiguration types. +type NullableIncludedWithTLSConfiguration struct { + value *IncludedWithTLSConfiguration + isSet bool +} + +// Get returns the value. +func (v NullableIncludedWithTLSConfiguration) Get() *IncludedWithTLSConfiguration { + return v.value +} + +// Set modifies the value. +func (v *NullableIncludedWithTLSConfiguration) Set(val *IncludedWithTLSConfiguration) { + v.value = val + v.isSet = true +} + +// IsSet indicates if the value was set. +func (v NullableIncludedWithTLSConfiguration) IsSet() bool { + return v.isSet +} + +// Unset removes the value. +func (v *NullableIncludedWithTLSConfiguration) Unset() { + v.value = nil + v.isSet = false +} + +// NewNullableIncludedWithTLSConfiguration returns a pointer to a new instance of NullableIncludedWithTLSConfiguration. +func NewNullableIncludedWithTLSConfiguration(val *IncludedWithTLSConfiguration) *NullableIncludedWithTLSConfiguration { + return &NullableIncludedWithTLSConfiguration{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 NullableIncludedWithTLSConfiguration) 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 *NullableIncludedWithTLSConfiguration) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/fastly/model_included_with_tls_configuration_item.go b/fastly/model_included_with_tls_configuration_item.go new file mode 100644 index 00000000..43e01c6d --- /dev/null +++ b/fastly/model_included_with_tls_configuration_item.go @@ -0,0 +1,234 @@ +// 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://www.fastly.com/documentation/reference/api/) + +API version: 1.0.0 +Contact: oss@fastly.com +*/ + +// This code is auto-generated; DO NOT EDIT. + + +import ( + "encoding/json" +) + +// IncludedWithTLSConfigurationItem struct for IncludedWithTLSConfigurationItem +type IncludedWithTLSConfigurationItem struct { + // The IP address or hostname of the DNS record. + ID *string `json:"id,omitempty"` + Type *TypeTLSDNSRecord `json:"type,omitempty"` + Attributes *TLSDNSRecord `json:"attributes,omitempty"` + AdditionalProperties map[string]any +} + +type _IncludedWithTLSConfigurationItem IncludedWithTLSConfigurationItem + +// NewIncludedWithTLSConfigurationItem instantiates a new IncludedWithTLSConfigurationItem object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewIncludedWithTLSConfigurationItem() *IncludedWithTLSConfigurationItem { + this := IncludedWithTLSConfigurationItem{} + var resourceType TypeTLSDNSRecord = TYPETLSDNSRECORD_DNS_RECORD + this.Type = &resourceType + return &this +} + +// NewIncludedWithTLSConfigurationItemWithDefaults instantiates a new IncludedWithTLSConfigurationItem object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewIncludedWithTLSConfigurationItemWithDefaults() *IncludedWithTLSConfigurationItem { + this := IncludedWithTLSConfigurationItem{} + var resourceType TypeTLSDNSRecord = TYPETLSDNSRECORD_DNS_RECORD + this.Type = &resourceType + return &this +} + +// GetID returns the ID field value if set, zero value otherwise. +func (o *IncludedWithTLSConfigurationItem) 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 *IncludedWithTLSConfigurationItem) 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 *IncludedWithTLSConfigurationItem) 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 *IncludedWithTLSConfigurationItem) SetID(v string) { + o.ID = &v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *IncludedWithTLSConfigurationItem) GetType() TypeTLSDNSRecord { + if o == nil || o.Type == nil { + var ret TypeTLSDNSRecord + 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 *IncludedWithTLSConfigurationItem) GetTypeOk() (*TypeTLSDNSRecord, 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 *IncludedWithTLSConfigurationItem) HasType() bool { + if o != nil && o.Type != nil { + return true + } + + return false +} + +// SetType gets a reference to the given TypeTLSDNSRecord and assigns it to the Type field. +func (o *IncludedWithTLSConfigurationItem) SetType(v TypeTLSDNSRecord) { + o.Type = &v +} + +// GetAttributes returns the Attributes field value if set, zero value otherwise. +func (o *IncludedWithTLSConfigurationItem) GetAttributes() TLSDNSRecord { + if o == nil || o.Attributes == nil { + var ret TLSDNSRecord + return ret + } + return *o.Attributes +} + +// GetAttributesOk returns a tuple with the Attributes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IncludedWithTLSConfigurationItem) GetAttributesOk() (*TLSDNSRecord, bool) { + if o == nil || o.Attributes == nil { + return nil, false + } + return o.Attributes, true +} + +// HasAttributes returns a boolean if a field has been set. +func (o *IncludedWithTLSConfigurationItem) HasAttributes() bool { + if o != nil && o.Attributes != nil { + return true + } + + return false +} + +// SetAttributes gets a reference to the given TLSDNSRecord and assigns it to the Attributes field. +func (o *IncludedWithTLSConfigurationItem) SetAttributes(v TLSDNSRecord) { + o.Attributes = &v +} + +// MarshalJSON implements the json.Marshaler interface. +// Marshaler is the interface implemented by types that can marshal themselves into valid JSON. +func (o IncludedWithTLSConfigurationItem) MarshalJSON() ([]byte, error) { + toSerialize := map[string]any{} + if o.ID != nil { + toSerialize["id"] = o.ID + } + if o.Type != nil { + toSerialize["type"] = o.Type + } + if o.Attributes != nil { + toSerialize["attributes"] = o.Attributes + } + + 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 *IncludedWithTLSConfigurationItem) UnmarshalJSON(bytes []byte) (err error) { + varIncludedWithTLSConfigurationItem := _IncludedWithTLSConfigurationItem{} + + if err = json.Unmarshal(bytes, &varIncludedWithTLSConfigurationItem); err == nil { + *o = IncludedWithTLSConfigurationItem(varIncludedWithTLSConfigurationItem) + } + + additionalProperties := make(map[string]any) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "id") + delete(additionalProperties, "type") + delete(additionalProperties, "attributes") + o.AdditionalProperties = additionalProperties + } + + return err +} + +// NullableIncludedWithTLSConfigurationItem is a helper abstraction for handling nullable includedwithtlsconfigurationitem types. +type NullableIncludedWithTLSConfigurationItem struct { + value *IncludedWithTLSConfigurationItem + isSet bool +} + +// Get returns the value. +func (v NullableIncludedWithTLSConfigurationItem) Get() *IncludedWithTLSConfigurationItem { + return v.value +} + +// Set modifies the value. +func (v *NullableIncludedWithTLSConfigurationItem) Set(val *IncludedWithTLSConfigurationItem) { + v.value = val + v.isSet = true +} + +// IsSet indicates if the value was set. +func (v NullableIncludedWithTLSConfigurationItem) IsSet() bool { + return v.isSet +} + +// Unset removes the value. +func (v *NullableIncludedWithTLSConfigurationItem) Unset() { + v.value = nil + v.isSet = false +} + +// NewNullableIncludedWithTLSConfigurationItem returns a pointer to a new instance of NullableIncludedWithTLSConfigurationItem. +func NewNullableIncludedWithTLSConfigurationItem(val *IncludedWithTLSConfigurationItem) *NullableIncludedWithTLSConfigurationItem { + return &NullableIncludedWithTLSConfigurationItem{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 NullableIncludedWithTLSConfigurationItem) 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 *NullableIncludedWithTLSConfigurationItem) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/fastly/model_invoicelineitems.go b/fastly/model_invoicelineitems.go index 326f2bfc..d006e834 100644 --- a/fastly/model_invoicelineitems.go +++ b/fastly/model_invoicelineitems.go @@ -30,15 +30,15 @@ type Invoicelineitems struct { // Total number of units of usage. Units *float32 `json:"units,omitempty"` // The name of the product. - ProductName *string `json:"ProductName,omitempty"` + ProductName *string `json:"product_name,omitempty"` // The broader classification of the product (e.g., `Compute` or `Full-Site Delivery`). - ProductGroup *string `json:"ProductGroup,omitempty"` + ProductGroup *string `json:"product_group,omitempty"` // The broader classification of the product (e.g., `Network Services` or `Security`). - ProductLine *string `json:"ProductLine,omitempty"` + ProductLine *string `json:"product_line,omitempty"` // The geographical area applicable for regionally based products. - Region *string `json:"Region,omitempty"` + Region *string `json:"region,omitempty"` // The unit of measure (e.g., `requests` or `bandwidth`). - UsageType *string `json:"UsageType,omitempty"` + UsageType *string `json:"usage_type,omitempty"` AdditionalProperties map[string]any } @@ -401,19 +401,19 @@ func (o Invoicelineitems) MarshalJSON() ([]byte, error) { toSerialize["units"] = o.Units } if o.ProductName != nil { - toSerialize["ProductName"] = o.ProductName + toSerialize["product_name"] = o.ProductName } if o.ProductGroup != nil { - toSerialize["ProductGroup"] = o.ProductGroup + toSerialize["product_group"] = o.ProductGroup } if o.ProductLine != nil { - toSerialize["ProductLine"] = o.ProductLine + toSerialize["product_line"] = o.ProductLine } if o.Region != nil { - toSerialize["Region"] = o.Region + toSerialize["region"] = o.Region } if o.UsageType != nil { - toSerialize["UsageType"] = o.UsageType + toSerialize["usage_type"] = o.UsageType } for key, value := range o.AdditionalProperties { @@ -440,11 +440,11 @@ func (o *Invoicelineitems) UnmarshalJSON(bytes []byte) (err error) { delete(additionalProperties, "credit_coupon_code") delete(additionalProperties, "rate") delete(additionalProperties, "units") - delete(additionalProperties, "ProductName") - delete(additionalProperties, "ProductGroup") - delete(additionalProperties, "ProductLine") - delete(additionalProperties, "Region") - delete(additionalProperties, "UsageType") + delete(additionalProperties, "product_name") + delete(additionalProperties, "product_group") + delete(additionalProperties, "product_line") + delete(additionalProperties, "region") + delete(additionalProperties, "usage_type") o.AdditionalProperties = additionalProperties } diff --git a/fastly/model_list_dashboards_response.go b/fastly/model_list_dashboards_response.go new file mode 100644 index 00000000..d365c313 --- /dev/null +++ b/fastly/model_list_dashboards_response.go @@ -0,0 +1,194 @@ +// 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://www.fastly.com/documentation/reference/api/) + +API version: 1.0.0 +Contact: oss@fastly.com +*/ + +// This code is auto-generated; DO NOT EDIT. + + +import ( + "encoding/json" +) + +// ListDashboardsResponse struct for ListDashboardsResponse +type ListDashboardsResponse struct { + Data []Dashboard `json:"data,omitempty"` + // Meta for the pagination. + Meta any `json:"meta,omitempty"` + AdditionalProperties map[string]any +} + +type _ListDashboardsResponse ListDashboardsResponse + +// NewListDashboardsResponse instantiates a new ListDashboardsResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewListDashboardsResponse() *ListDashboardsResponse { + this := ListDashboardsResponse{} + return &this +} + +// NewListDashboardsResponseWithDefaults instantiates a new ListDashboardsResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewListDashboardsResponseWithDefaults() *ListDashboardsResponse { + this := ListDashboardsResponse{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *ListDashboardsResponse) GetData() []Dashboard { + if o == nil || o.Data == nil { + var ret []Dashboard + 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 *ListDashboardsResponse) GetDataOk() ([]Dashboard, 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 *ListDashboardsResponse) HasData() bool { + if o != nil && o.Data != nil { + return true + } + + return false +} + +// SetData gets a reference to the given []Dashboard and assigns it to the Data field. +func (o *ListDashboardsResponse) SetData(v []Dashboard) { + o.Data = v +} + +// GetMeta returns the Meta field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ListDashboardsResponse) GetMeta() any { + if o == nil { + var ret any + 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. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ListDashboardsResponse) GetMetaOk() (*any, 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 *ListDashboardsResponse) HasMeta() bool { + if o != nil && o.Meta != nil { + return true + } + + return false +} + +// SetMeta gets a reference to the given any and assigns it to the Meta field. +func (o *ListDashboardsResponse) SetMeta(v any) { + o.Meta = v +} + +// MarshalJSON implements the json.Marshaler interface. +// Marshaler is the interface implemented by types that can marshal themselves into valid JSON. +func (o ListDashboardsResponse) MarshalJSON() ([]byte, error) { + toSerialize := map[string]any{} + if o.Data != nil { + toSerialize["data"] = o.Data + } + if o.Meta != nil { + toSerialize["meta"] = o.Meta + } + + 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 *ListDashboardsResponse) UnmarshalJSON(bytes []byte) (err error) { + varListDashboardsResponse := _ListDashboardsResponse{} + + if err = json.Unmarshal(bytes, &varListDashboardsResponse); err == nil { + *o = ListDashboardsResponse(varListDashboardsResponse) + } + + additionalProperties := make(map[string]any) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "data") + delete(additionalProperties, "meta") + o.AdditionalProperties = additionalProperties + } + + return err +} + +// NullableListDashboardsResponse is a helper abstraction for handling nullable listdashboardsresponse types. +type NullableListDashboardsResponse struct { + value *ListDashboardsResponse + isSet bool +} + +// Get returns the value. +func (v NullableListDashboardsResponse) Get() *ListDashboardsResponse { + return v.value +} + +// Set modifies the value. +func (v *NullableListDashboardsResponse) Set(val *ListDashboardsResponse) { + v.value = val + v.isSet = true +} + +// IsSet indicates if the value was set. +func (v NullableListDashboardsResponse) IsSet() bool { + return v.isSet +} + +// Unset removes the value. +func (v *NullableListDashboardsResponse) Unset() { + v.value = nil + v.isSet = false +} + +// NewNullableListDashboardsResponse returns a pointer to a new instance of NullableListDashboardsResponse. +func NewNullableListDashboardsResponse(val *ListDashboardsResponse) *NullableListDashboardsResponse { + return &NullableListDashboardsResponse{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 NullableListDashboardsResponse) 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 *NullableListDashboardsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/fastly/model_list_invoices_response.go b/fastly/model_list_eom_invoices_response.go similarity index 64% rename from fastly/model_list_invoices_response.go rename to fastly/model_list_eom_invoices_response.go index 3075dd20..561cea07 100644 --- a/fastly/model_list_invoices_response.go +++ b/fastly/model_list_eom_invoices_response.go @@ -17,34 +17,34 @@ import ( "encoding/json" ) -// ListInvoicesResponse struct for ListInvoicesResponse -type ListInvoicesResponse struct { +// ListEomInvoicesResponse struct for ListEomInvoicesResponse +type ListEomInvoicesResponse struct { Data []Invoice `json:"data,omitempty"` Meta *Metadata `json:"meta,omitempty"` AdditionalProperties map[string]any } -type _ListInvoicesResponse ListInvoicesResponse +type _ListEomInvoicesResponse ListEomInvoicesResponse -// NewListInvoicesResponse instantiates a new ListInvoicesResponse object +// NewListEomInvoicesResponse instantiates a new ListEomInvoicesResponse object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewListInvoicesResponse() *ListInvoicesResponse { - this := ListInvoicesResponse{} +func NewListEomInvoicesResponse() *ListEomInvoicesResponse { + this := ListEomInvoicesResponse{} return &this } -// NewListInvoicesResponseWithDefaults instantiates a new ListInvoicesResponse object +// NewListEomInvoicesResponseWithDefaults instantiates a new ListEomInvoicesResponse object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set -func NewListInvoicesResponseWithDefaults() *ListInvoicesResponse { - this := ListInvoicesResponse{} +func NewListEomInvoicesResponseWithDefaults() *ListEomInvoicesResponse { + this := ListEomInvoicesResponse{} return &this } // GetData returns the Data field value if set, zero value otherwise. -func (o *ListInvoicesResponse) GetData() []Invoice { +func (o *ListEomInvoicesResponse) GetData() []Invoice { if o == nil || o.Data == nil { var ret []Invoice return ret @@ -54,7 +54,7 @@ func (o *ListInvoicesResponse) GetData() []Invoice { // 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 *ListInvoicesResponse) GetDataOk() ([]Invoice, bool) { +func (o *ListEomInvoicesResponse) GetDataOk() ([]Invoice, bool) { if o == nil || o.Data == nil { return nil, false } @@ -62,7 +62,7 @@ func (o *ListInvoicesResponse) GetDataOk() ([]Invoice, bool) { } // HasData returns a boolean if a field has been set. -func (o *ListInvoicesResponse) HasData() bool { +func (o *ListEomInvoicesResponse) HasData() bool { if o != nil && o.Data != nil { return true } @@ -71,12 +71,12 @@ func (o *ListInvoicesResponse) HasData() bool { } // SetData gets a reference to the given []Invoice and assigns it to the Data field. -func (o *ListInvoicesResponse) SetData(v []Invoice) { +func (o *ListEomInvoicesResponse) SetData(v []Invoice) { o.Data = v } // GetMeta returns the Meta field value if set, zero value otherwise. -func (o *ListInvoicesResponse) GetMeta() Metadata { +func (o *ListEomInvoicesResponse) GetMeta() Metadata { if o == nil || o.Meta == nil { var ret Metadata return ret @@ -86,7 +86,7 @@ func (o *ListInvoicesResponse) GetMeta() Metadata { // 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 *ListInvoicesResponse) GetMetaOk() (*Metadata, bool) { +func (o *ListEomInvoicesResponse) GetMetaOk() (*Metadata, bool) { if o == nil || o.Meta == nil { return nil, false } @@ -94,7 +94,7 @@ func (o *ListInvoicesResponse) GetMetaOk() (*Metadata, bool) { } // HasMeta returns a boolean if a field has been set. -func (o *ListInvoicesResponse) HasMeta() bool { +func (o *ListEomInvoicesResponse) HasMeta() bool { if o != nil && o.Meta != nil { return true } @@ -103,13 +103,13 @@ func (o *ListInvoicesResponse) HasMeta() bool { } // SetMeta gets a reference to the given Metadata and assigns it to the Meta field. -func (o *ListInvoicesResponse) SetMeta(v Metadata) { +func (o *ListEomInvoicesResponse) SetMeta(v Metadata) { o.Meta = &v } // MarshalJSON implements the json.Marshaler interface. // Marshaler is the interface implemented by types that can marshal themselves into valid JSON. -func (o ListInvoicesResponse) MarshalJSON() ([]byte, error) { +func (o ListEomInvoicesResponse) MarshalJSON() ([]byte, error) { toSerialize := map[string]any{} if o.Data != nil { toSerialize["data"] = o.Data @@ -127,11 +127,11 @@ func (o ListInvoicesResponse) 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 *ListInvoicesResponse) UnmarshalJSON(bytes []byte) (err error) { - varListInvoicesResponse := _ListInvoicesResponse{} +func (o *ListEomInvoicesResponse) UnmarshalJSON(bytes []byte) (err error) { + varListEomInvoicesResponse := _ListEomInvoicesResponse{} - if err = json.Unmarshal(bytes, &varListInvoicesResponse); err == nil { - *o = ListInvoicesResponse(varListInvoicesResponse) + if err = json.Unmarshal(bytes, &varListEomInvoicesResponse); err == nil { + *o = ListEomInvoicesResponse(varListEomInvoicesResponse) } additionalProperties := make(map[string]any) @@ -145,48 +145,48 @@ func (o *ListInvoicesResponse) UnmarshalJSON(bytes []byte) (err error) { return err } -// NullableListInvoicesResponse is a helper abstraction for handling nullable listinvoicesresponse types. -type NullableListInvoicesResponse struct { - value *ListInvoicesResponse +// NullableListEomInvoicesResponse is a helper abstraction for handling nullable listeominvoicesresponse types. +type NullableListEomInvoicesResponse struct { + value *ListEomInvoicesResponse isSet bool } // Get returns the value. -func (v NullableListInvoicesResponse) Get() *ListInvoicesResponse { +func (v NullableListEomInvoicesResponse) Get() *ListEomInvoicesResponse { return v.value } // Set modifies the value. -func (v *NullableListInvoicesResponse) Set(val *ListInvoicesResponse) { +func (v *NullableListEomInvoicesResponse) Set(val *ListEomInvoicesResponse) { v.value = val v.isSet = true } // IsSet indicates if the value was set. -func (v NullableListInvoicesResponse) IsSet() bool { +func (v NullableListEomInvoicesResponse) IsSet() bool { return v.isSet } // Unset removes the value. -func (v *NullableListInvoicesResponse) Unset() { +func (v *NullableListEomInvoicesResponse) Unset() { v.value = nil v.isSet = false } -// NewNullableListInvoicesResponse returns a pointer to a new instance of NullableListInvoicesResponse. -func NewNullableListInvoicesResponse(val *ListInvoicesResponse) *NullableListInvoicesResponse { - return &NullableListInvoicesResponse{value: val, isSet: true} +// NewNullableListEomInvoicesResponse returns a pointer to a new instance of NullableListEomInvoicesResponse. +func NewNullableListEomInvoicesResponse(val *ListEomInvoicesResponse) *NullableListEomInvoicesResponse { + return &NullableListEomInvoicesResponse{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 NullableListInvoicesResponse) MarshalJSON() ([]byte, error) { +func (v NullableListEomInvoicesResponse) 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 *NullableListInvoicesResponse) UnmarshalJSON(src []byte) error { +func (v *NullableListEomInvoicesResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } diff --git a/fastly/model_mtd_invoice_response.go b/fastly/model_mtd_invoice_response.go new file mode 100644 index 00000000..7f9e6963 --- /dev/null +++ b/fastly/model_mtd_invoice_response.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://www.fastly.com/documentation/reference/api/) + +API version: 1.0.0 +Contact: oss@fastly.com +*/ + +// This code is auto-generated; DO NOT EDIT. + + +import ( + "encoding/json" + "time" +) + +// MtdInvoiceResponse struct for MtdInvoiceResponse +type MtdInvoiceResponse struct { + // The Customer ID associated with the invoice. + CustomerID *string `json:"customer_id,omitempty"` + // An alphanumeric string identifying the invoice. + InvoiceID *string `json:"invoice_id,omitempty"` + // The date and time (in ISO 8601 format) for the initiation point of a billing cycle, signifying the start of charges for a service or subscription. + BillingStartDate *time.Time `json:"billing_start_date,omitempty"` + // The date and time (in ISO 8601 format) for the termination point of a billing cycle, signifying the end of charges for a service or subscription. + BillingEndDate *time.Time `json:"billing_end_date,omitempty"` + // The total billable amount for invoiced services charged within a single month. + MonthlyTransactionAmount *string `json:"monthly_transaction_amount,omitempty"` + TransactionLineItems []Mtdlineitems `json:"transaction_line_items,omitempty"` + AdditionalProperties map[string]any +} + +type _MtdInvoiceResponse MtdInvoiceResponse + +// NewMtdInvoiceResponse instantiates a new MtdInvoiceResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewMtdInvoiceResponse() *MtdInvoiceResponse { + this := MtdInvoiceResponse{} + return &this +} + +// NewMtdInvoiceResponseWithDefaults instantiates a new MtdInvoiceResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewMtdInvoiceResponseWithDefaults() *MtdInvoiceResponse { + this := MtdInvoiceResponse{} + return &this +} + +// GetCustomerID returns the CustomerID field value if set, zero value otherwise. +func (o *MtdInvoiceResponse) GetCustomerID() string { + if o == nil || o.CustomerID == nil { + var ret string + return ret + } + return *o.CustomerID +} + +// GetCustomerIDOk returns a tuple with the CustomerID field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MtdInvoiceResponse) GetCustomerIDOk() (*string, bool) { + if o == nil || o.CustomerID == nil { + return nil, false + } + return o.CustomerID, true +} + +// HasCustomerID returns a boolean if a field has been set. +func (o *MtdInvoiceResponse) HasCustomerID() bool { + if o != nil && o.CustomerID != nil { + return true + } + + return false +} + +// SetCustomerID gets a reference to the given string and assigns it to the CustomerID field. +func (o *MtdInvoiceResponse) SetCustomerID(v string) { + o.CustomerID = &v +} + +// GetInvoiceID returns the InvoiceID field value if set, zero value otherwise. +func (o *MtdInvoiceResponse) GetInvoiceID() string { + if o == nil || o.InvoiceID == nil { + var ret string + return ret + } + return *o.InvoiceID +} + +// GetInvoiceIDOk returns a tuple with the InvoiceID field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MtdInvoiceResponse) GetInvoiceIDOk() (*string, bool) { + if o == nil || o.InvoiceID == nil { + return nil, false + } + return o.InvoiceID, true +} + +// HasInvoiceID returns a boolean if a field has been set. +func (o *MtdInvoiceResponse) HasInvoiceID() bool { + if o != nil && o.InvoiceID != nil { + return true + } + + return false +} + +// SetInvoiceID gets a reference to the given string and assigns it to the InvoiceID field. +func (o *MtdInvoiceResponse) SetInvoiceID(v string) { + o.InvoiceID = &v +} + +// GetBillingStartDate returns the BillingStartDate field value if set, zero value otherwise. +func (o *MtdInvoiceResponse) GetBillingStartDate() time.Time { + if o == nil || o.BillingStartDate == nil { + var ret time.Time + return ret + } + return *o.BillingStartDate +} + +// GetBillingStartDateOk returns a tuple with the BillingStartDate field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MtdInvoiceResponse) GetBillingStartDateOk() (*time.Time, bool) { + if o == nil || o.BillingStartDate == nil { + return nil, false + } + return o.BillingStartDate, true +} + +// HasBillingStartDate returns a boolean if a field has been set. +func (o *MtdInvoiceResponse) HasBillingStartDate() bool { + if o != nil && o.BillingStartDate != nil { + return true + } + + return false +} + +// SetBillingStartDate gets a reference to the given time.Time and assigns it to the BillingStartDate field. +func (o *MtdInvoiceResponse) SetBillingStartDate(v time.Time) { + o.BillingStartDate = &v +} + +// GetBillingEndDate returns the BillingEndDate field value if set, zero value otherwise. +func (o *MtdInvoiceResponse) GetBillingEndDate() time.Time { + if o == nil || o.BillingEndDate == nil { + var ret time.Time + return ret + } + return *o.BillingEndDate +} + +// GetBillingEndDateOk returns a tuple with the BillingEndDate field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MtdInvoiceResponse) GetBillingEndDateOk() (*time.Time, bool) { + if o == nil || o.BillingEndDate == nil { + return nil, false + } + return o.BillingEndDate, true +} + +// HasBillingEndDate returns a boolean if a field has been set. +func (o *MtdInvoiceResponse) HasBillingEndDate() bool { + if o != nil && o.BillingEndDate != nil { + return true + } + + return false +} + +// SetBillingEndDate gets a reference to the given time.Time and assigns it to the BillingEndDate field. +func (o *MtdInvoiceResponse) SetBillingEndDate(v time.Time) { + o.BillingEndDate = &v +} + +// GetMonthlyTransactionAmount returns the MonthlyTransactionAmount field value if set, zero value otherwise. +func (o *MtdInvoiceResponse) GetMonthlyTransactionAmount() string { + if o == nil || o.MonthlyTransactionAmount == nil { + var ret string + return ret + } + return *o.MonthlyTransactionAmount +} + +// GetMonthlyTransactionAmountOk returns a tuple with the MonthlyTransactionAmount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MtdInvoiceResponse) GetMonthlyTransactionAmountOk() (*string, bool) { + if o == nil || o.MonthlyTransactionAmount == nil { + return nil, false + } + return o.MonthlyTransactionAmount, true +} + +// HasMonthlyTransactionAmount returns a boolean if a field has been set. +func (o *MtdInvoiceResponse) HasMonthlyTransactionAmount() bool { + if o != nil && o.MonthlyTransactionAmount != nil { + return true + } + + return false +} + +// SetMonthlyTransactionAmount gets a reference to the given string and assigns it to the MonthlyTransactionAmount field. +func (o *MtdInvoiceResponse) SetMonthlyTransactionAmount(v string) { + o.MonthlyTransactionAmount = &v +} + +// GetTransactionLineItems returns the TransactionLineItems field value if set, zero value otherwise. +func (o *MtdInvoiceResponse) GetTransactionLineItems() []Mtdlineitems { + if o == nil || o.TransactionLineItems == nil { + var ret []Mtdlineitems + return ret + } + return o.TransactionLineItems +} + +// GetTransactionLineItemsOk returns a tuple with the TransactionLineItems field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MtdInvoiceResponse) GetTransactionLineItemsOk() ([]Mtdlineitems, bool) { + if o == nil || o.TransactionLineItems == nil { + return nil, false + } + return o.TransactionLineItems, true +} + +// HasTransactionLineItems returns a boolean if a field has been set. +func (o *MtdInvoiceResponse) HasTransactionLineItems() bool { + if o != nil && o.TransactionLineItems != nil { + return true + } + + return false +} + +// SetTransactionLineItems gets a reference to the given []Mtdlineitems and assigns it to the TransactionLineItems field. +func (o *MtdInvoiceResponse) SetTransactionLineItems(v []Mtdlineitems) { + o.TransactionLineItems = v +} + +// MarshalJSON implements the json.Marshaler interface. +// Marshaler is the interface implemented by types that can marshal themselves into valid JSON. +func (o MtdInvoiceResponse) MarshalJSON() ([]byte, error) { + toSerialize := map[string]any{} + if o.CustomerID != nil { + toSerialize["customer_id"] = o.CustomerID + } + if o.InvoiceID != nil { + toSerialize["invoice_id"] = o.InvoiceID + } + if o.BillingStartDate != nil { + toSerialize["billing_start_date"] = o.BillingStartDate + } + if o.BillingEndDate != nil { + toSerialize["billing_end_date"] = o.BillingEndDate + } + if o.MonthlyTransactionAmount != nil { + toSerialize["monthly_transaction_amount"] = o.MonthlyTransactionAmount + } + if o.TransactionLineItems != nil { + toSerialize["transaction_line_items"] = o.TransactionLineItems + } + + 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 *MtdInvoiceResponse) UnmarshalJSON(bytes []byte) (err error) { + varMtdInvoiceResponse := _MtdInvoiceResponse{} + + if err = json.Unmarshal(bytes, &varMtdInvoiceResponse); err == nil { + *o = MtdInvoiceResponse(varMtdInvoiceResponse) + } + + additionalProperties := make(map[string]any) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "customer_id") + delete(additionalProperties, "invoice_id") + delete(additionalProperties, "billing_start_date") + delete(additionalProperties, "billing_end_date") + delete(additionalProperties, "monthly_transaction_amount") + delete(additionalProperties, "transaction_line_items") + o.AdditionalProperties = additionalProperties + } + + return err +} + +// NullableMtdInvoiceResponse is a helper abstraction for handling nullable mtdinvoiceresponse types. +type NullableMtdInvoiceResponse struct { + value *MtdInvoiceResponse + isSet bool +} + +// Get returns the value. +func (v NullableMtdInvoiceResponse) Get() *MtdInvoiceResponse { + return v.value +} + +// Set modifies the value. +func (v *NullableMtdInvoiceResponse) Set(val *MtdInvoiceResponse) { + v.value = val + v.isSet = true +} + +// IsSet indicates if the value was set. +func (v NullableMtdInvoiceResponse) IsSet() bool { + return v.isSet +} + +// Unset removes the value. +func (v *NullableMtdInvoiceResponse) Unset() { + v.value = nil + v.isSet = false +} + +// NewNullableMtdInvoiceResponse returns a pointer to a new instance of NullableMtdInvoiceResponse. +func NewNullableMtdInvoiceResponse(val *MtdInvoiceResponse) *NullableMtdInvoiceResponse { + return &NullableMtdInvoiceResponse{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 NullableMtdInvoiceResponse) 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 *NullableMtdInvoiceResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/fastly/model_mtdinvoice.go b/fastly/model_mtdinvoice.go new file mode 100644 index 00000000..dcac2d55 --- /dev/null +++ b/fastly/model_mtdinvoice.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://www.fastly.com/documentation/reference/api/) + +API version: 1.0.0 +Contact: oss@fastly.com +*/ + +// This code is auto-generated; DO NOT EDIT. + + +import ( + "encoding/json" + "time" +) + +// Mtdinvoice struct for Mtdinvoice +type Mtdinvoice struct { + // The Customer ID associated with the invoice. + CustomerID *string `json:"customer_id,omitempty"` + // An alphanumeric string identifying the invoice. + InvoiceID *string `json:"invoice_id,omitempty"` + // The date and time (in ISO 8601 format) for the initiation point of a billing cycle, signifying the start of charges for a service or subscription. + BillingStartDate *time.Time `json:"billing_start_date,omitempty"` + // The date and time (in ISO 8601 format) for the termination point of a billing cycle, signifying the end of charges for a service or subscription. + BillingEndDate *time.Time `json:"billing_end_date,omitempty"` + // The total billable amount for invoiced services charged within a single month. + MonthlyTransactionAmount *string `json:"monthly_transaction_amount,omitempty"` + TransactionLineItems []Mtdlineitems `json:"transaction_line_items,omitempty"` + AdditionalProperties map[string]any +} + +type _Mtdinvoice Mtdinvoice + +// NewMtdinvoice instantiates a new Mtdinvoice object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewMtdinvoice() *Mtdinvoice { + this := Mtdinvoice{} + return &this +} + +// NewMtdinvoiceWithDefaults instantiates a new Mtdinvoice object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewMtdinvoiceWithDefaults() *Mtdinvoice { + this := Mtdinvoice{} + return &this +} + +// GetCustomerID returns the CustomerID field value if set, zero value otherwise. +func (o *Mtdinvoice) GetCustomerID() string { + if o == nil || o.CustomerID == nil { + var ret string + return ret + } + return *o.CustomerID +} + +// GetCustomerIDOk returns a tuple with the CustomerID field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Mtdinvoice) GetCustomerIDOk() (*string, bool) { + if o == nil || o.CustomerID == nil { + return nil, false + } + return o.CustomerID, true +} + +// HasCustomerID returns a boolean if a field has been set. +func (o *Mtdinvoice) HasCustomerID() bool { + if o != nil && o.CustomerID != nil { + return true + } + + return false +} + +// SetCustomerID gets a reference to the given string and assigns it to the CustomerID field. +func (o *Mtdinvoice) SetCustomerID(v string) { + o.CustomerID = &v +} + +// GetInvoiceID returns the InvoiceID field value if set, zero value otherwise. +func (o *Mtdinvoice) GetInvoiceID() string { + if o == nil || o.InvoiceID == nil { + var ret string + return ret + } + return *o.InvoiceID +} + +// GetInvoiceIDOk returns a tuple with the InvoiceID field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Mtdinvoice) GetInvoiceIDOk() (*string, bool) { + if o == nil || o.InvoiceID == nil { + return nil, false + } + return o.InvoiceID, true +} + +// HasInvoiceID returns a boolean if a field has been set. +func (o *Mtdinvoice) HasInvoiceID() bool { + if o != nil && o.InvoiceID != nil { + return true + } + + return false +} + +// SetInvoiceID gets a reference to the given string and assigns it to the InvoiceID field. +func (o *Mtdinvoice) SetInvoiceID(v string) { + o.InvoiceID = &v +} + +// GetBillingStartDate returns the BillingStartDate field value if set, zero value otherwise. +func (o *Mtdinvoice) GetBillingStartDate() time.Time { + if o == nil || o.BillingStartDate == nil { + var ret time.Time + return ret + } + return *o.BillingStartDate +} + +// GetBillingStartDateOk returns a tuple with the BillingStartDate field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Mtdinvoice) GetBillingStartDateOk() (*time.Time, bool) { + if o == nil || o.BillingStartDate == nil { + return nil, false + } + return o.BillingStartDate, true +} + +// HasBillingStartDate returns a boolean if a field has been set. +func (o *Mtdinvoice) HasBillingStartDate() bool { + if o != nil && o.BillingStartDate != nil { + return true + } + + return false +} + +// SetBillingStartDate gets a reference to the given time.Time and assigns it to the BillingStartDate field. +func (o *Mtdinvoice) SetBillingStartDate(v time.Time) { + o.BillingStartDate = &v +} + +// GetBillingEndDate returns the BillingEndDate field value if set, zero value otherwise. +func (o *Mtdinvoice) GetBillingEndDate() time.Time { + if o == nil || o.BillingEndDate == nil { + var ret time.Time + return ret + } + return *o.BillingEndDate +} + +// GetBillingEndDateOk returns a tuple with the BillingEndDate field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Mtdinvoice) GetBillingEndDateOk() (*time.Time, bool) { + if o == nil || o.BillingEndDate == nil { + return nil, false + } + return o.BillingEndDate, true +} + +// HasBillingEndDate returns a boolean if a field has been set. +func (o *Mtdinvoice) HasBillingEndDate() bool { + if o != nil && o.BillingEndDate != nil { + return true + } + + return false +} + +// SetBillingEndDate gets a reference to the given time.Time and assigns it to the BillingEndDate field. +func (o *Mtdinvoice) SetBillingEndDate(v time.Time) { + o.BillingEndDate = &v +} + +// GetMonthlyTransactionAmount returns the MonthlyTransactionAmount field value if set, zero value otherwise. +func (o *Mtdinvoice) GetMonthlyTransactionAmount() string { + if o == nil || o.MonthlyTransactionAmount == nil { + var ret string + return ret + } + return *o.MonthlyTransactionAmount +} + +// GetMonthlyTransactionAmountOk returns a tuple with the MonthlyTransactionAmount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Mtdinvoice) GetMonthlyTransactionAmountOk() (*string, bool) { + if o == nil || o.MonthlyTransactionAmount == nil { + return nil, false + } + return o.MonthlyTransactionAmount, true +} + +// HasMonthlyTransactionAmount returns a boolean if a field has been set. +func (o *Mtdinvoice) HasMonthlyTransactionAmount() bool { + if o != nil && o.MonthlyTransactionAmount != nil { + return true + } + + return false +} + +// SetMonthlyTransactionAmount gets a reference to the given string and assigns it to the MonthlyTransactionAmount field. +func (o *Mtdinvoice) SetMonthlyTransactionAmount(v string) { + o.MonthlyTransactionAmount = &v +} + +// GetTransactionLineItems returns the TransactionLineItems field value if set, zero value otherwise. +func (o *Mtdinvoice) GetTransactionLineItems() []Mtdlineitems { + if o == nil || o.TransactionLineItems == nil { + var ret []Mtdlineitems + return ret + } + return o.TransactionLineItems +} + +// GetTransactionLineItemsOk returns a tuple with the TransactionLineItems field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Mtdinvoice) GetTransactionLineItemsOk() ([]Mtdlineitems, bool) { + if o == nil || o.TransactionLineItems == nil { + return nil, false + } + return o.TransactionLineItems, true +} + +// HasTransactionLineItems returns a boolean if a field has been set. +func (o *Mtdinvoice) HasTransactionLineItems() bool { + if o != nil && o.TransactionLineItems != nil { + return true + } + + return false +} + +// SetTransactionLineItems gets a reference to the given []Mtdlineitems and assigns it to the TransactionLineItems field. +func (o *Mtdinvoice) SetTransactionLineItems(v []Mtdlineitems) { + o.TransactionLineItems = v +} + +// MarshalJSON implements the json.Marshaler interface. +// Marshaler is the interface implemented by types that can marshal themselves into valid JSON. +func (o Mtdinvoice) MarshalJSON() ([]byte, error) { + toSerialize := map[string]any{} + if o.CustomerID != nil { + toSerialize["customer_id"] = o.CustomerID + } + if o.InvoiceID != nil { + toSerialize["invoice_id"] = o.InvoiceID + } + if o.BillingStartDate != nil { + toSerialize["billing_start_date"] = o.BillingStartDate + } + if o.BillingEndDate != nil { + toSerialize["billing_end_date"] = o.BillingEndDate + } + if o.MonthlyTransactionAmount != nil { + toSerialize["monthly_transaction_amount"] = o.MonthlyTransactionAmount + } + if o.TransactionLineItems != nil { + toSerialize["transaction_line_items"] = o.TransactionLineItems + } + + 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 *Mtdinvoice) UnmarshalJSON(bytes []byte) (err error) { + varMtdinvoice := _Mtdinvoice{} + + if err = json.Unmarshal(bytes, &varMtdinvoice); err == nil { + *o = Mtdinvoice(varMtdinvoice) + } + + additionalProperties := make(map[string]any) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "customer_id") + delete(additionalProperties, "invoice_id") + delete(additionalProperties, "billing_start_date") + delete(additionalProperties, "billing_end_date") + delete(additionalProperties, "monthly_transaction_amount") + delete(additionalProperties, "transaction_line_items") + o.AdditionalProperties = additionalProperties + } + + return err +} + +// NullableMtdinvoice is a helper abstraction for handling nullable mtdinvoice types. +type NullableMtdinvoice struct { + value *Mtdinvoice + isSet bool +} + +// Get returns the value. +func (v NullableMtdinvoice) Get() *Mtdinvoice { + return v.value +} + +// Set modifies the value. +func (v *NullableMtdinvoice) Set(val *Mtdinvoice) { + v.value = val + v.isSet = true +} + +// IsSet indicates if the value was set. +func (v NullableMtdinvoice) IsSet() bool { + return v.isSet +} + +// Unset removes the value. +func (v *NullableMtdinvoice) Unset() { + v.value = nil + v.isSet = false +} + +// NewNullableMtdinvoice returns a pointer to a new instance of NullableMtdinvoice. +func NewNullableMtdinvoice(val *Mtdinvoice) *NullableMtdinvoice { + return &NullableMtdinvoice{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 NullableMtdinvoice) 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 *NullableMtdinvoice) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/fastly/model_mtdlineitems.go b/fastly/model_mtdlineitems.go new file mode 100644 index 00000000..611fdb31 --- /dev/null +++ b/fastly/model_mtdlineitems.go @@ -0,0 +1,460 @@ +// 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://www.fastly.com/documentation/reference/api/) + +API version: 1.0.0 +Contact: oss@fastly.com +*/ + +// This code is auto-generated; DO NOT EDIT. + + +import ( + "encoding/json" +) + +// Mtdlineitems struct for Mtdlineitems +type Mtdlineitems struct { + // Invoice line item transaction name. + Description *string `json:"description,omitempty"` + // Billed amount for line item. + Amount *float32 `json:"amount,omitempty"` + // Price per unit. + Rate *float32 `json:"rate,omitempty"` + // Total number of units of usage. + Units *float32 `json:"units,omitempty"` + // The name of the product. + ProductName *string `json:"product_name,omitempty"` + // The broader classification of the product (e.g., `Compute` or `Full-Site Delivery`). + ProductGroup *string `json:"product_group,omitempty"` + // The broader classification of the product (e.g., `Network Services` or `Security`). + ProductLine *string `json:"product_line,omitempty"` + // The geographical area applicable for regionally based products. + Region *string `json:"region,omitempty"` + // The unit of measure (e.g., `requests` or `bandwidth`). + UsageType *string `json:"usage_type,omitempty"` + AdditionalProperties map[string]any +} + +type _Mtdlineitems Mtdlineitems + +// NewMtdlineitems instantiates a new Mtdlineitems object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewMtdlineitems() *Mtdlineitems { + this := Mtdlineitems{} + return &this +} + +// NewMtdlineitemsWithDefaults instantiates a new Mtdlineitems object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewMtdlineitemsWithDefaults() *Mtdlineitems { + this := Mtdlineitems{} + return &this +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *Mtdlineitems) GetDescription() string { + if o == nil || o.Description == nil { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Mtdlineitems) GetDescriptionOk() (*string, bool) { + if o == nil || o.Description == nil { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *Mtdlineitems) HasDescription() bool { + if o != nil && o.Description != nil { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *Mtdlineitems) SetDescription(v string) { + o.Description = &v +} + +// GetAmount returns the Amount field value if set, zero value otherwise. +func (o *Mtdlineitems) GetAmount() float32 { + if o == nil || o.Amount == nil { + var ret float32 + return ret + } + return *o.Amount +} + +// GetAmountOk returns a tuple with the Amount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Mtdlineitems) GetAmountOk() (*float32, bool) { + if o == nil || o.Amount == nil { + return nil, false + } + return o.Amount, true +} + +// HasAmount returns a boolean if a field has been set. +func (o *Mtdlineitems) HasAmount() bool { + if o != nil && o.Amount != nil { + return true + } + + return false +} + +// SetAmount gets a reference to the given float32 and assigns it to the Amount field. +func (o *Mtdlineitems) SetAmount(v float32) { + o.Amount = &v +} + +// GetRate returns the Rate field value if set, zero value otherwise. +func (o *Mtdlineitems) GetRate() float32 { + if o == nil || o.Rate == nil { + var ret float32 + return ret + } + return *o.Rate +} + +// GetRateOk returns a tuple with the Rate field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Mtdlineitems) GetRateOk() (*float32, bool) { + if o == nil || o.Rate == nil { + return nil, false + } + return o.Rate, true +} + +// HasRate returns a boolean if a field has been set. +func (o *Mtdlineitems) HasRate() bool { + if o != nil && o.Rate != nil { + return true + } + + return false +} + +// SetRate gets a reference to the given float32 and assigns it to the Rate field. +func (o *Mtdlineitems) SetRate(v float32) { + o.Rate = &v +} + +// GetUnits returns the Units field value if set, zero value otherwise. +func (o *Mtdlineitems) GetUnits() float32 { + if o == nil || o.Units == nil { + var ret float32 + return ret + } + return *o.Units +} + +// GetUnitsOk returns a tuple with the Units field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Mtdlineitems) GetUnitsOk() (*float32, bool) { + if o == nil || o.Units == nil { + return nil, false + } + return o.Units, true +} + +// HasUnits returns a boolean if a field has been set. +func (o *Mtdlineitems) HasUnits() bool { + if o != nil && o.Units != nil { + return true + } + + return false +} + +// SetUnits gets a reference to the given float32 and assigns it to the Units field. +func (o *Mtdlineitems) SetUnits(v float32) { + o.Units = &v +} + +// GetProductName returns the ProductName field value if set, zero value otherwise. +func (o *Mtdlineitems) GetProductName() string { + if o == nil || o.ProductName == nil { + var ret string + return ret + } + return *o.ProductName +} + +// GetProductNameOk returns a tuple with the ProductName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Mtdlineitems) GetProductNameOk() (*string, bool) { + if o == nil || o.ProductName == nil { + return nil, false + } + return o.ProductName, true +} + +// HasProductName returns a boolean if a field has been set. +func (o *Mtdlineitems) HasProductName() bool { + if o != nil && o.ProductName != nil { + return true + } + + return false +} + +// SetProductName gets a reference to the given string and assigns it to the ProductName field. +func (o *Mtdlineitems) SetProductName(v string) { + o.ProductName = &v +} + +// GetProductGroup returns the ProductGroup field value if set, zero value otherwise. +func (o *Mtdlineitems) GetProductGroup() string { + if o == nil || o.ProductGroup == nil { + var ret string + return ret + } + return *o.ProductGroup +} + +// GetProductGroupOk returns a tuple with the ProductGroup field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Mtdlineitems) GetProductGroupOk() (*string, bool) { + if o == nil || o.ProductGroup == nil { + return nil, false + } + return o.ProductGroup, true +} + +// HasProductGroup returns a boolean if a field has been set. +func (o *Mtdlineitems) HasProductGroup() bool { + if o != nil && o.ProductGroup != nil { + return true + } + + return false +} + +// SetProductGroup gets a reference to the given string and assigns it to the ProductGroup field. +func (o *Mtdlineitems) SetProductGroup(v string) { + o.ProductGroup = &v +} + +// GetProductLine returns the ProductLine field value if set, zero value otherwise. +func (o *Mtdlineitems) 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 *Mtdlineitems) 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 *Mtdlineitems) 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 *Mtdlineitems) SetProductLine(v string) { + o.ProductLine = &v +} + +// GetRegion returns the Region field value if set, zero value otherwise. +func (o *Mtdlineitems) GetRegion() string { + if o == nil || o.Region == nil { + var ret string + return ret + } + return *o.Region +} + +// GetRegionOk returns a tuple with the Region field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Mtdlineitems) GetRegionOk() (*string, bool) { + if o == nil || o.Region == nil { + return nil, false + } + return o.Region, true +} + +// HasRegion returns a boolean if a field has been set. +func (o *Mtdlineitems) HasRegion() bool { + if o != nil && o.Region != nil { + return true + } + + return false +} + +// SetRegion gets a reference to the given string and assigns it to the Region field. +func (o *Mtdlineitems) SetRegion(v string) { + o.Region = &v +} + +// GetUsageType returns the UsageType field value if set, zero value otherwise. +func (o *Mtdlineitems) GetUsageType() string { + if o == nil || o.UsageType == nil { + var ret string + return ret + } + return *o.UsageType +} + +// GetUsageTypeOk returns a tuple with the UsageType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Mtdlineitems) GetUsageTypeOk() (*string, bool) { + if o == nil || o.UsageType == nil { + return nil, false + } + return o.UsageType, true +} + +// HasUsageType returns a boolean if a field has been set. +func (o *Mtdlineitems) HasUsageType() bool { + if o != nil && o.UsageType != nil { + return true + } + + return false +} + +// SetUsageType gets a reference to the given string and assigns it to the UsageType field. +func (o *Mtdlineitems) SetUsageType(v string) { + o.UsageType = &v +} + +// MarshalJSON implements the json.Marshaler interface. +// Marshaler is the interface implemented by types that can marshal themselves into valid JSON. +func (o Mtdlineitems) MarshalJSON() ([]byte, error) { + toSerialize := map[string]any{} + if o.Description != nil { + toSerialize["description"] = o.Description + } + if o.Amount != nil { + toSerialize["amount"] = o.Amount + } + if o.Rate != nil { + toSerialize["rate"] = o.Rate + } + if o.Units != nil { + toSerialize["units"] = o.Units + } + if o.ProductName != nil { + toSerialize["product_name"] = o.ProductName + } + if o.ProductGroup != nil { + toSerialize["product_group"] = o.ProductGroup + } + if o.ProductLine != nil { + toSerialize["product_line"] = o.ProductLine + } + if o.Region != nil { + toSerialize["region"] = o.Region + } + if o.UsageType != nil { + toSerialize["usage_type"] = o.UsageType + } + + 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 *Mtdlineitems) UnmarshalJSON(bytes []byte) (err error) { + varMtdlineitems := _Mtdlineitems{} + + if err = json.Unmarshal(bytes, &varMtdlineitems); err == nil { + *o = Mtdlineitems(varMtdlineitems) + } + + additionalProperties := make(map[string]any) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "description") + delete(additionalProperties, "amount") + delete(additionalProperties, "rate") + delete(additionalProperties, "units") + delete(additionalProperties, "product_name") + delete(additionalProperties, "product_group") + delete(additionalProperties, "product_line") + delete(additionalProperties, "region") + delete(additionalProperties, "usage_type") + o.AdditionalProperties = additionalProperties + } + + return err +} + +// NullableMtdlineitems is a helper abstraction for handling nullable mtdlineitems types. +type NullableMtdlineitems struct { + value *Mtdlineitems + isSet bool +} + +// Get returns the value. +func (v NullableMtdlineitems) Get() *Mtdlineitems { + return v.value +} + +// Set modifies the value. +func (v *NullableMtdlineitems) Set(val *Mtdlineitems) { + v.value = val + v.isSet = true +} + +// IsSet indicates if the value was set. +func (v NullableMtdlineitems) IsSet() bool { + return v.isSet +} + +// Unset removes the value. +func (v *NullableMtdlineitems) Unset() { + v.value = nil + v.isSet = false +} + +// NewNullableMtdlineitems returns a pointer to a new instance of NullableMtdlineitems. +func NewNullableMtdlineitems(val *Mtdlineitems) *NullableMtdlineitems { + return &NullableMtdlineitems{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 NullableMtdlineitems) 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 *NullableMtdlineitems) 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 33780a1b..149f6bac 100644 --- a/fastly/model_realtime_entry_aggregated.go +++ b/fastly/model_realtime_entry_aggregated.go @@ -517,6 +517,8 @@ type RealtimeEntryAggregated struct { AllStatus4xx *int32 `json:"all_status_4xx,omitempty"` // Number of \"Server Error\" codes delivered for all sources. AllStatus5xx *int32 `json:"all_status_5xx,omitempty"` + // Origin Offload measures the ratio of bytes served to end users that were cached by Fastly, over the bytes served to end users, between 0 and 1. ((`edge_resp_body_bytes` + `edge_resp_header_bytes`) - (`origin_fetch_resp_body_bytes` + `origin_fetch_resp_header_bytes`)) / (`edge_resp_body_bytes` + `edge_resp_header_bytes`). + OriginOffload *float32 `json:"origin_offload,omitempty"` AdditionalProperties map[string]any } @@ -8481,6 +8483,38 @@ func (o *RealtimeEntryAggregated) SetAllStatus5xx(v int32) { o.AllStatus5xx = &v } +// GetOriginOffload returns the OriginOffload field value if set, zero value otherwise. +func (o *RealtimeEntryAggregated) GetOriginOffload() float32 { + if o == nil || o.OriginOffload == nil { + var ret float32 + return ret + } + return *o.OriginOffload +} + +// GetOriginOffloadOk returns a tuple with the OriginOffload field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RealtimeEntryAggregated) GetOriginOffloadOk() (*float32, bool) { + if o == nil || o.OriginOffload == nil { + return nil, false + } + return o.OriginOffload, true +} + +// HasOriginOffload returns a boolean if a field has been set. +func (o *RealtimeEntryAggregated) HasOriginOffload() bool { + if o != nil && o.OriginOffload != nil { + return true + } + + return false +} + +// SetOriginOffload gets a reference to the given float32 and assigns it to the OriginOffload field. +func (o *RealtimeEntryAggregated) SetOriginOffload(v float32) { + o.OriginOffload = &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) { @@ -9229,6 +9263,9 @@ func (o RealtimeEntryAggregated) MarshalJSON() ([]byte, error) { if o.AllStatus5xx != nil { toSerialize["all_status_5xx"] = o.AllStatus5xx } + if o.OriginOffload != nil { + toSerialize["origin_offload"] = o.OriginOffload + } for key, value := range o.AdditionalProperties { toSerialize[key] = value @@ -9497,6 +9534,7 @@ func (o *RealtimeEntryAggregated) UnmarshalJSON(bytes []byte) (err error) { delete(additionalProperties, "all_status_3xx") delete(additionalProperties, "all_status_4xx") delete(additionalProperties, "all_status_5xx") + delete(additionalProperties, "origin_offload") o.AdditionalProperties = additionalProperties } diff --git a/fastly/model_realtime_measurements.go b/fastly/model_realtime_measurements.go index 7ff798e4..0e5e9cf6 100644 --- a/fastly/model_realtime_measurements.go +++ b/fastly/model_realtime_measurements.go @@ -517,6 +517,8 @@ type RealtimeMeasurements struct { AllStatus4xx *int32 `json:"all_status_4xx,omitempty"` // Number of \"Server Error\" codes delivered for all sources. AllStatus5xx *int32 `json:"all_status_5xx,omitempty"` + // Origin Offload measures the ratio of bytes served to end users that were cached by Fastly, over the bytes served to end users, between 0 and 1. ((`edge_resp_body_bytes` + `edge_resp_header_bytes`) - (`origin_fetch_resp_body_bytes` + `origin_fetch_resp_header_bytes`)) / (`edge_resp_body_bytes` + `edge_resp_header_bytes`). + OriginOffload *float32 `json:"origin_offload,omitempty"` AdditionalProperties map[string]any } @@ -8481,6 +8483,38 @@ func (o *RealtimeMeasurements) SetAllStatus5xx(v int32) { o.AllStatus5xx = &v } +// GetOriginOffload returns the OriginOffload field value if set, zero value otherwise. +func (o *RealtimeMeasurements) GetOriginOffload() float32 { + if o == nil || o.OriginOffload == nil { + var ret float32 + return ret + } + return *o.OriginOffload +} + +// GetOriginOffloadOk returns a tuple with the OriginOffload field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RealtimeMeasurements) GetOriginOffloadOk() (*float32, bool) { + if o == nil || o.OriginOffload == nil { + return nil, false + } + return o.OriginOffload, true +} + +// HasOriginOffload returns a boolean if a field has been set. +func (o *RealtimeMeasurements) HasOriginOffload() bool { + if o != nil && o.OriginOffload != nil { + return true + } + + return false +} + +// SetOriginOffload gets a reference to the given float32 and assigns it to the OriginOffload field. +func (o *RealtimeMeasurements) SetOriginOffload(v float32) { + o.OriginOffload = &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) { @@ -9229,6 +9263,9 @@ func (o RealtimeMeasurements) MarshalJSON() ([]byte, error) { if o.AllStatus5xx != nil { toSerialize["all_status_5xx"] = o.AllStatus5xx } + if o.OriginOffload != nil { + toSerialize["origin_offload"] = o.OriginOffload + } for key, value := range o.AdditionalProperties { toSerialize[key] = value @@ -9497,6 +9534,7 @@ func (o *RealtimeMeasurements) UnmarshalJSON(bytes []byte) (err error) { delete(additionalProperties, "all_status_3xx") delete(additionalProperties, "all_status_4xx") delete(additionalProperties, "all_status_5xx") + delete(additionalProperties, "origin_offload") o.AdditionalProperties = additionalProperties } diff --git a/fastly/model_relationship_default_ecdsa_tls_certificate.go b/fastly/model_relationship_default_ecdsa_tls_certificate.go new file mode 100644 index 00000000..3ffde124 --- /dev/null +++ b/fastly/model_relationship_default_ecdsa_tls_certificate.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://www.fastly.com/documentation/reference/api/) + +API version: 1.0.0 +Contact: oss@fastly.com +*/ + +// This code is auto-generated; DO NOT EDIT. + + +import ( + "encoding/json" +) + +// RelationshipDefaultEcdsaTLSCertificate struct for RelationshipDefaultEcdsaTLSCertificate +type RelationshipDefaultEcdsaTLSCertificate struct { + DefaultEcdsaCertificate *RelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificate `json:"default_ecdsa_certificate,omitempty"` + AdditionalProperties map[string]any +} + +type _RelationshipDefaultEcdsaTLSCertificate RelationshipDefaultEcdsaTLSCertificate + +// NewRelationshipDefaultEcdsaTLSCertificate instantiates a new RelationshipDefaultEcdsaTLSCertificate object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRelationshipDefaultEcdsaTLSCertificate() *RelationshipDefaultEcdsaTLSCertificate { + this := RelationshipDefaultEcdsaTLSCertificate{} + return &this +} + +// NewRelationshipDefaultEcdsaTLSCertificateWithDefaults instantiates a new RelationshipDefaultEcdsaTLSCertificate object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRelationshipDefaultEcdsaTLSCertificateWithDefaults() *RelationshipDefaultEcdsaTLSCertificate { + this := RelationshipDefaultEcdsaTLSCertificate{} + return &this +} + +// GetDefaultEcdsaCertificate returns the DefaultEcdsaCertificate field value if set, zero value otherwise. +func (o *RelationshipDefaultEcdsaTLSCertificate) GetDefaultEcdsaCertificate() RelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificate { + if o == nil || o.DefaultEcdsaCertificate == nil { + var ret RelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificate + return ret + } + return *o.DefaultEcdsaCertificate +} + +// GetDefaultEcdsaCertificateOk returns a tuple with the DefaultEcdsaCertificate field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RelationshipDefaultEcdsaTLSCertificate) GetDefaultEcdsaCertificateOk() (*RelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificate, bool) { + if o == nil || o.DefaultEcdsaCertificate == nil { + return nil, false + } + return o.DefaultEcdsaCertificate, true +} + +// HasDefaultEcdsaCertificate returns a boolean if a field has been set. +func (o *RelationshipDefaultEcdsaTLSCertificate) HasDefaultEcdsaCertificate() bool { + if o != nil && o.DefaultEcdsaCertificate != nil { + return true + } + + return false +} + +// SetDefaultEcdsaCertificate gets a reference to the given RelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificate and assigns it to the DefaultEcdsaCertificate field. +func (o *RelationshipDefaultEcdsaTLSCertificate) SetDefaultEcdsaCertificate(v RelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificate) { + o.DefaultEcdsaCertificate = &v +} + +// MarshalJSON implements the json.Marshaler interface. +// Marshaler is the interface implemented by types that can marshal themselves into valid JSON. +func (o RelationshipDefaultEcdsaTLSCertificate) MarshalJSON() ([]byte, error) { + toSerialize := map[string]any{} + if o.DefaultEcdsaCertificate != nil { + toSerialize["default_ecdsa_certificate"] = o.DefaultEcdsaCertificate + } + + 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 *RelationshipDefaultEcdsaTLSCertificate) UnmarshalJSON(bytes []byte) (err error) { + varRelationshipDefaultEcdsaTLSCertificate := _RelationshipDefaultEcdsaTLSCertificate{} + + if err = json.Unmarshal(bytes, &varRelationshipDefaultEcdsaTLSCertificate); err == nil { + *o = RelationshipDefaultEcdsaTLSCertificate(varRelationshipDefaultEcdsaTLSCertificate) + } + + additionalProperties := make(map[string]any) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "default_ecdsa_certificate") + o.AdditionalProperties = additionalProperties + } + + return err +} + +// NullableRelationshipDefaultEcdsaTLSCertificate is a helper abstraction for handling nullable relationshipdefaultecdsatlscertificate types. +type NullableRelationshipDefaultEcdsaTLSCertificate struct { + value *RelationshipDefaultEcdsaTLSCertificate + isSet bool +} + +// Get returns the value. +func (v NullableRelationshipDefaultEcdsaTLSCertificate) Get() *RelationshipDefaultEcdsaTLSCertificate { + return v.value +} + +// Set modifies the value. +func (v *NullableRelationshipDefaultEcdsaTLSCertificate) Set(val *RelationshipDefaultEcdsaTLSCertificate) { + v.value = val + v.isSet = true +} + +// IsSet indicates if the value was set. +func (v NullableRelationshipDefaultEcdsaTLSCertificate) IsSet() bool { + return v.isSet +} + +// Unset removes the value. +func (v *NullableRelationshipDefaultEcdsaTLSCertificate) Unset() { + v.value = nil + v.isSet = false +} + +// NewNullableRelationshipDefaultEcdsaTLSCertificate returns a pointer to a new instance of NullableRelationshipDefaultEcdsaTLSCertificate. +func NewNullableRelationshipDefaultEcdsaTLSCertificate(val *RelationshipDefaultEcdsaTLSCertificate) *NullableRelationshipDefaultEcdsaTLSCertificate { + return &NullableRelationshipDefaultEcdsaTLSCertificate{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 NullableRelationshipDefaultEcdsaTLSCertificate) 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 *NullableRelationshipDefaultEcdsaTLSCertificate) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/fastly/model_relationship_default_ecdsa_tls_certificate_default_ecdsa_certificate.go b/fastly/model_relationship_default_ecdsa_tls_certificate_default_ecdsa_certificate.go new file mode 100644 index 00000000..171fb133 --- /dev/null +++ b/fastly/model_relationship_default_ecdsa_tls_certificate_default_ecdsa_certificate.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://www.fastly.com/documentation/reference/api/) + +API version: 1.0.0 +Contact: oss@fastly.com +*/ + +// This code is auto-generated; DO NOT EDIT. + + +import ( + "encoding/json" +) + +// RelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificate struct for RelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificate +type RelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificate struct { + Data *RelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificateData `json:"data,omitempty"` + AdditionalProperties map[string]any +} + +type _RelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificate RelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificate + +// NewRelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificate instantiates a new RelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificate object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificate() *RelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificate { + this := RelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificate{} + return &this +} + +// NewRelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificateWithDefaults instantiates a new RelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificate object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificateWithDefaults() *RelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificate { + this := RelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificate{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *RelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificate) GetData() RelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificateData { + if o == nil || o.Data == nil { + var ret RelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificateData + 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 *RelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificate) GetDataOk() (*RelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificateData, 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 *RelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificate) HasData() bool { + if o != nil && o.Data != nil { + return true + } + + return false +} + +// SetData gets a reference to the given RelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificateData and assigns it to the Data field. +func (o *RelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificate) SetData(v RelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificateData) { + 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 RelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificate) 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 *RelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificate) UnmarshalJSON(bytes []byte) (err error) { + varRelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificate := _RelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificate{} + + if err = json.Unmarshal(bytes, &varRelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificate); err == nil { + *o = RelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificate(varRelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificate) + } + + additionalProperties := make(map[string]any) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "data") + o.AdditionalProperties = additionalProperties + } + + return err +} + +// NullableRelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificate is a helper abstraction for handling nullable relationshipdefaultecdsatlscertificatedefaultecdsacertificate types. +type NullableRelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificate struct { + value *RelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificate + isSet bool +} + +// Get returns the value. +func (v NullableRelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificate) Get() *RelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificate { + return v.value +} + +// Set modifies the value. +func (v *NullableRelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificate) Set(val *RelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificate) { + v.value = val + v.isSet = true +} + +// IsSet indicates if the value was set. +func (v NullableRelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificate) IsSet() bool { + return v.isSet +} + +// Unset removes the value. +func (v *NullableRelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificate) Unset() { + v.value = nil + v.isSet = false +} + +// NewNullableRelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificate returns a pointer to a new instance of NullableRelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificate. +func NewNullableRelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificate(val *RelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificate) *NullableRelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificate { + return &NullableRelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificate{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 NullableRelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificate) 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 *NullableRelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificate) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/fastly/model_relationship_default_ecdsa_tls_certificate_default_ecdsa_certificate_data.go b/fastly/model_relationship_default_ecdsa_tls_certificate_default_ecdsa_certificate_data.go new file mode 100644 index 00000000..9e1832ea --- /dev/null +++ b/fastly/model_relationship_default_ecdsa_tls_certificate_default_ecdsa_certificate_data.go @@ -0,0 +1,197 @@ +// 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://www.fastly.com/documentation/reference/api/) + +API version: 1.0.0 +Contact: oss@fastly.com +*/ + +// This code is auto-generated; DO NOT EDIT. + + +import ( + "encoding/json" +) + +// RelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificateData struct for RelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificateData +type RelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificateData struct { + Type *TypeTLSCertificate `json:"type,omitempty"` + // Alphanumeric string identifying the default ECDSA TLS certificate. + ID *string `json:"id,omitempty"` + AdditionalProperties map[string]any +} + +type _RelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificateData RelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificateData + +// NewRelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificateData instantiates a new RelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificateData object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificateData() *RelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificateData { + this := RelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificateData{} + var resourceType TypeTLSCertificate = TYPETLSCERTIFICATE_TLS_CERTIFICATE + this.Type = &resourceType + return &this +} + +// NewRelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificateDataWithDefaults instantiates a new RelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificateData object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificateDataWithDefaults() *RelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificateData { + this := RelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificateData{} + var resourceType TypeTLSCertificate = TYPETLSCERTIFICATE_TLS_CERTIFICATE + this.Type = &resourceType + return &this +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *RelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificateData) GetType() TypeTLSCertificate { + if o == nil || o.Type == nil { + var ret TypeTLSCertificate + 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 *RelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificateData) GetTypeOk() (*TypeTLSCertificate, 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 *RelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificateData) HasType() bool { + if o != nil && o.Type != nil { + return true + } + + return false +} + +// SetType gets a reference to the given TypeTLSCertificate and assigns it to the Type field. +func (o *RelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificateData) SetType(v TypeTLSCertificate) { + o.Type = &v +} + +// GetID returns the ID field value if set, zero value otherwise. +func (o *RelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificateData) 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 *RelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificateData) 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 *RelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificateData) 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 *RelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificateData) 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 RelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificateData) MarshalJSON() ([]byte, error) { + toSerialize := map[string]any{} + if o.Type != nil { + toSerialize["type"] = o.Type + } + 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 *RelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificateData) UnmarshalJSON(bytes []byte) (err error) { + varRelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificateData := _RelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificateData{} + + if err = json.Unmarshal(bytes, &varRelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificateData); err == nil { + *o = RelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificateData(varRelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificateData) + } + + additionalProperties := make(map[string]any) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "type") + delete(additionalProperties, "id") + o.AdditionalProperties = additionalProperties + } + + return err +} + +// NullableRelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificateData is a helper abstraction for handling nullable relationshipdefaultecdsatlscertificatedefaultecdsacertificatedata types. +type NullableRelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificateData struct { + value *RelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificateData + isSet bool +} + +// Get returns the value. +func (v NullableRelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificateData) Get() *RelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificateData { + return v.value +} + +// Set modifies the value. +func (v *NullableRelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificateData) Set(val *RelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificateData) { + v.value = val + v.isSet = true +} + +// IsSet indicates if the value was set. +func (v NullableRelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificateData) IsSet() bool { + return v.isSet +} + +// Unset removes the value. +func (v *NullableRelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificateData) Unset() { + v.value = nil + v.isSet = false +} + +// NewNullableRelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificateData returns a pointer to a new instance of NullableRelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificateData. +func NewNullableRelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificateData(val *RelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificateData) *NullableRelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificateData { + return &NullableRelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificateData{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 NullableRelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificateData) 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 *NullableRelationshipDefaultEcdsaTLSCertificateDefaultEcdsaCertificateData) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/fastly/model_relationship_default_tls_certificate.go b/fastly/model_relationship_default_tls_certificate.go new file mode 100644 index 00000000..345712fc --- /dev/null +++ b/fastly/model_relationship_default_tls_certificate.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://www.fastly.com/documentation/reference/api/) + +API version: 1.0.0 +Contact: oss@fastly.com +*/ + +// This code is auto-generated; DO NOT EDIT. + + +import ( + "encoding/json" +) + +// RelationshipDefaultTLSCertificate struct for RelationshipDefaultTLSCertificate +type RelationshipDefaultTLSCertificate struct { + DefaultCertificate *RelationshipDefaultTLSCertificateDefaultCertificate `json:"default_certificate,omitempty"` + AdditionalProperties map[string]any +} + +type _RelationshipDefaultTLSCertificate RelationshipDefaultTLSCertificate + +// NewRelationshipDefaultTLSCertificate instantiates a new RelationshipDefaultTLSCertificate object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRelationshipDefaultTLSCertificate() *RelationshipDefaultTLSCertificate { + this := RelationshipDefaultTLSCertificate{} + return &this +} + +// NewRelationshipDefaultTLSCertificateWithDefaults instantiates a new RelationshipDefaultTLSCertificate object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRelationshipDefaultTLSCertificateWithDefaults() *RelationshipDefaultTLSCertificate { + this := RelationshipDefaultTLSCertificate{} + return &this +} + +// GetDefaultCertificate returns the DefaultCertificate field value if set, zero value otherwise. +func (o *RelationshipDefaultTLSCertificate) GetDefaultCertificate() RelationshipDefaultTLSCertificateDefaultCertificate { + if o == nil || o.DefaultCertificate == nil { + var ret RelationshipDefaultTLSCertificateDefaultCertificate + return ret + } + return *o.DefaultCertificate +} + +// GetDefaultCertificateOk returns a tuple with the DefaultCertificate field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RelationshipDefaultTLSCertificate) GetDefaultCertificateOk() (*RelationshipDefaultTLSCertificateDefaultCertificate, bool) { + if o == nil || o.DefaultCertificate == nil { + return nil, false + } + return o.DefaultCertificate, true +} + +// HasDefaultCertificate returns a boolean if a field has been set. +func (o *RelationshipDefaultTLSCertificate) HasDefaultCertificate() bool { + if o != nil && o.DefaultCertificate != nil { + return true + } + + return false +} + +// SetDefaultCertificate gets a reference to the given RelationshipDefaultTLSCertificateDefaultCertificate and assigns it to the DefaultCertificate field. +func (o *RelationshipDefaultTLSCertificate) SetDefaultCertificate(v RelationshipDefaultTLSCertificateDefaultCertificate) { + o.DefaultCertificate = &v +} + +// MarshalJSON implements the json.Marshaler interface. +// Marshaler is the interface implemented by types that can marshal themselves into valid JSON. +func (o RelationshipDefaultTLSCertificate) MarshalJSON() ([]byte, error) { + toSerialize := map[string]any{} + if o.DefaultCertificate != nil { + toSerialize["default_certificate"] = o.DefaultCertificate + } + + 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 *RelationshipDefaultTLSCertificate) UnmarshalJSON(bytes []byte) (err error) { + varRelationshipDefaultTLSCertificate := _RelationshipDefaultTLSCertificate{} + + if err = json.Unmarshal(bytes, &varRelationshipDefaultTLSCertificate); err == nil { + *o = RelationshipDefaultTLSCertificate(varRelationshipDefaultTLSCertificate) + } + + additionalProperties := make(map[string]any) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "default_certificate") + o.AdditionalProperties = additionalProperties + } + + return err +} + +// NullableRelationshipDefaultTLSCertificate is a helper abstraction for handling nullable relationshipdefaulttlscertificate types. +type NullableRelationshipDefaultTLSCertificate struct { + value *RelationshipDefaultTLSCertificate + isSet bool +} + +// Get returns the value. +func (v NullableRelationshipDefaultTLSCertificate) Get() *RelationshipDefaultTLSCertificate { + return v.value +} + +// Set modifies the value. +func (v *NullableRelationshipDefaultTLSCertificate) Set(val *RelationshipDefaultTLSCertificate) { + v.value = val + v.isSet = true +} + +// IsSet indicates if the value was set. +func (v NullableRelationshipDefaultTLSCertificate) IsSet() bool { + return v.isSet +} + +// Unset removes the value. +func (v *NullableRelationshipDefaultTLSCertificate) Unset() { + v.value = nil + v.isSet = false +} + +// NewNullableRelationshipDefaultTLSCertificate returns a pointer to a new instance of NullableRelationshipDefaultTLSCertificate. +func NewNullableRelationshipDefaultTLSCertificate(val *RelationshipDefaultTLSCertificate) *NullableRelationshipDefaultTLSCertificate { + return &NullableRelationshipDefaultTLSCertificate{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 NullableRelationshipDefaultTLSCertificate) 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 *NullableRelationshipDefaultTLSCertificate) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/fastly/model_relationship_default_tls_certificate_default_certificate.go b/fastly/model_relationship_default_tls_certificate_default_certificate.go new file mode 100644 index 00000000..a088aee6 --- /dev/null +++ b/fastly/model_relationship_default_tls_certificate_default_certificate.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://www.fastly.com/documentation/reference/api/) + +API version: 1.0.0 +Contact: oss@fastly.com +*/ + +// This code is auto-generated; DO NOT EDIT. + + +import ( + "encoding/json" +) + +// RelationshipDefaultTLSCertificateDefaultCertificate struct for RelationshipDefaultTLSCertificateDefaultCertificate +type RelationshipDefaultTLSCertificateDefaultCertificate struct { + Data *RelationshipDefaultTLSCertificateDefaultCertificateData `json:"data,omitempty"` + AdditionalProperties map[string]any +} + +type _RelationshipDefaultTLSCertificateDefaultCertificate RelationshipDefaultTLSCertificateDefaultCertificate + +// NewRelationshipDefaultTLSCertificateDefaultCertificate instantiates a new RelationshipDefaultTLSCertificateDefaultCertificate object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRelationshipDefaultTLSCertificateDefaultCertificate() *RelationshipDefaultTLSCertificateDefaultCertificate { + this := RelationshipDefaultTLSCertificateDefaultCertificate{} + return &this +} + +// NewRelationshipDefaultTLSCertificateDefaultCertificateWithDefaults instantiates a new RelationshipDefaultTLSCertificateDefaultCertificate object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRelationshipDefaultTLSCertificateDefaultCertificateWithDefaults() *RelationshipDefaultTLSCertificateDefaultCertificate { + this := RelationshipDefaultTLSCertificateDefaultCertificate{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *RelationshipDefaultTLSCertificateDefaultCertificate) GetData() RelationshipDefaultTLSCertificateDefaultCertificateData { + if o == nil || o.Data == nil { + var ret RelationshipDefaultTLSCertificateDefaultCertificateData + 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 *RelationshipDefaultTLSCertificateDefaultCertificate) GetDataOk() (*RelationshipDefaultTLSCertificateDefaultCertificateData, 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 *RelationshipDefaultTLSCertificateDefaultCertificate) HasData() bool { + if o != nil && o.Data != nil { + return true + } + + return false +} + +// SetData gets a reference to the given RelationshipDefaultTLSCertificateDefaultCertificateData and assigns it to the Data field. +func (o *RelationshipDefaultTLSCertificateDefaultCertificate) SetData(v RelationshipDefaultTLSCertificateDefaultCertificateData) { + 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 RelationshipDefaultTLSCertificateDefaultCertificate) 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 *RelationshipDefaultTLSCertificateDefaultCertificate) UnmarshalJSON(bytes []byte) (err error) { + varRelationshipDefaultTLSCertificateDefaultCertificate := _RelationshipDefaultTLSCertificateDefaultCertificate{} + + if err = json.Unmarshal(bytes, &varRelationshipDefaultTLSCertificateDefaultCertificate); err == nil { + *o = RelationshipDefaultTLSCertificateDefaultCertificate(varRelationshipDefaultTLSCertificateDefaultCertificate) + } + + additionalProperties := make(map[string]any) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "data") + o.AdditionalProperties = additionalProperties + } + + return err +} + +// NullableRelationshipDefaultTLSCertificateDefaultCertificate is a helper abstraction for handling nullable relationshipdefaulttlscertificatedefaultcertificate types. +type NullableRelationshipDefaultTLSCertificateDefaultCertificate struct { + value *RelationshipDefaultTLSCertificateDefaultCertificate + isSet bool +} + +// Get returns the value. +func (v NullableRelationshipDefaultTLSCertificateDefaultCertificate) Get() *RelationshipDefaultTLSCertificateDefaultCertificate { + return v.value +} + +// Set modifies the value. +func (v *NullableRelationshipDefaultTLSCertificateDefaultCertificate) Set(val *RelationshipDefaultTLSCertificateDefaultCertificate) { + v.value = val + v.isSet = true +} + +// IsSet indicates if the value was set. +func (v NullableRelationshipDefaultTLSCertificateDefaultCertificate) IsSet() bool { + return v.isSet +} + +// Unset removes the value. +func (v *NullableRelationshipDefaultTLSCertificateDefaultCertificate) Unset() { + v.value = nil + v.isSet = false +} + +// NewNullableRelationshipDefaultTLSCertificateDefaultCertificate returns a pointer to a new instance of NullableRelationshipDefaultTLSCertificateDefaultCertificate. +func NewNullableRelationshipDefaultTLSCertificateDefaultCertificate(val *RelationshipDefaultTLSCertificateDefaultCertificate) *NullableRelationshipDefaultTLSCertificateDefaultCertificate { + return &NullableRelationshipDefaultTLSCertificateDefaultCertificate{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 NullableRelationshipDefaultTLSCertificateDefaultCertificate) 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 *NullableRelationshipDefaultTLSCertificateDefaultCertificate) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/fastly/model_relationship_default_tls_certificate_default_certificate_data.go b/fastly/model_relationship_default_tls_certificate_default_certificate_data.go new file mode 100644 index 00000000..d57f0d45 --- /dev/null +++ b/fastly/model_relationship_default_tls_certificate_default_certificate_data.go @@ -0,0 +1,197 @@ +// 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://www.fastly.com/documentation/reference/api/) + +API version: 1.0.0 +Contact: oss@fastly.com +*/ + +// This code is auto-generated; DO NOT EDIT. + + +import ( + "encoding/json" +) + +// RelationshipDefaultTLSCertificateDefaultCertificateData struct for RelationshipDefaultTLSCertificateDefaultCertificateData +type RelationshipDefaultTLSCertificateDefaultCertificateData struct { + Type *TypeTLSCertificate `json:"type,omitempty"` + // Alphanumeric string identifying the default TLS certificate. + ID *string `json:"id,omitempty"` + AdditionalProperties map[string]any +} + +type _RelationshipDefaultTLSCertificateDefaultCertificateData RelationshipDefaultTLSCertificateDefaultCertificateData + +// NewRelationshipDefaultTLSCertificateDefaultCertificateData instantiates a new RelationshipDefaultTLSCertificateDefaultCertificateData object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRelationshipDefaultTLSCertificateDefaultCertificateData() *RelationshipDefaultTLSCertificateDefaultCertificateData { + this := RelationshipDefaultTLSCertificateDefaultCertificateData{} + var resourceType TypeTLSCertificate = TYPETLSCERTIFICATE_TLS_CERTIFICATE + this.Type = &resourceType + return &this +} + +// NewRelationshipDefaultTLSCertificateDefaultCertificateDataWithDefaults instantiates a new RelationshipDefaultTLSCertificateDefaultCertificateData object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRelationshipDefaultTLSCertificateDefaultCertificateDataWithDefaults() *RelationshipDefaultTLSCertificateDefaultCertificateData { + this := RelationshipDefaultTLSCertificateDefaultCertificateData{} + var resourceType TypeTLSCertificate = TYPETLSCERTIFICATE_TLS_CERTIFICATE + this.Type = &resourceType + return &this +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *RelationshipDefaultTLSCertificateDefaultCertificateData) GetType() TypeTLSCertificate { + if o == nil || o.Type == nil { + var ret TypeTLSCertificate + 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 *RelationshipDefaultTLSCertificateDefaultCertificateData) GetTypeOk() (*TypeTLSCertificate, 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 *RelationshipDefaultTLSCertificateDefaultCertificateData) HasType() bool { + if o != nil && o.Type != nil { + return true + } + + return false +} + +// SetType gets a reference to the given TypeTLSCertificate and assigns it to the Type field. +func (o *RelationshipDefaultTLSCertificateDefaultCertificateData) SetType(v TypeTLSCertificate) { + o.Type = &v +} + +// GetID returns the ID field value if set, zero value otherwise. +func (o *RelationshipDefaultTLSCertificateDefaultCertificateData) 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 *RelationshipDefaultTLSCertificateDefaultCertificateData) 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 *RelationshipDefaultTLSCertificateDefaultCertificateData) 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 *RelationshipDefaultTLSCertificateDefaultCertificateData) 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 RelationshipDefaultTLSCertificateDefaultCertificateData) MarshalJSON() ([]byte, error) { + toSerialize := map[string]any{} + if o.Type != nil { + toSerialize["type"] = o.Type + } + 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 *RelationshipDefaultTLSCertificateDefaultCertificateData) UnmarshalJSON(bytes []byte) (err error) { + varRelationshipDefaultTLSCertificateDefaultCertificateData := _RelationshipDefaultTLSCertificateDefaultCertificateData{} + + if err = json.Unmarshal(bytes, &varRelationshipDefaultTLSCertificateDefaultCertificateData); err == nil { + *o = RelationshipDefaultTLSCertificateDefaultCertificateData(varRelationshipDefaultTLSCertificateDefaultCertificateData) + } + + additionalProperties := make(map[string]any) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "type") + delete(additionalProperties, "id") + o.AdditionalProperties = additionalProperties + } + + return err +} + +// NullableRelationshipDefaultTLSCertificateDefaultCertificateData is a helper abstraction for handling nullable relationshipdefaulttlscertificatedefaultcertificatedata types. +type NullableRelationshipDefaultTLSCertificateDefaultCertificateData struct { + value *RelationshipDefaultTLSCertificateDefaultCertificateData + isSet bool +} + +// Get returns the value. +func (v NullableRelationshipDefaultTLSCertificateDefaultCertificateData) Get() *RelationshipDefaultTLSCertificateDefaultCertificateData { + return v.value +} + +// Set modifies the value. +func (v *NullableRelationshipDefaultTLSCertificateDefaultCertificateData) Set(val *RelationshipDefaultTLSCertificateDefaultCertificateData) { + v.value = val + v.isSet = true +} + +// IsSet indicates if the value was set. +func (v NullableRelationshipDefaultTLSCertificateDefaultCertificateData) IsSet() bool { + return v.isSet +} + +// Unset removes the value. +func (v *NullableRelationshipDefaultTLSCertificateDefaultCertificateData) Unset() { + v.value = nil + v.isSet = false +} + +// NewNullableRelationshipDefaultTLSCertificateDefaultCertificateData returns a pointer to a new instance of NullableRelationshipDefaultTLSCertificateDefaultCertificateData. +func NewNullableRelationshipDefaultTLSCertificateDefaultCertificateData(val *RelationshipDefaultTLSCertificateDefaultCertificateData) *NullableRelationshipDefaultTLSCertificateDefaultCertificateData { + return &NullableRelationshipDefaultTLSCertificateDefaultCertificateData{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 NullableRelationshipDefaultTLSCertificateDefaultCertificateData) 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 *NullableRelationshipDefaultTLSCertificateDefaultCertificateData) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/fastly/model_relationship_tls_dns_record.go b/fastly/model_relationship_tls_dns_record.go deleted file mode 100644 index a3e34001..00000000 --- a/fastly/model_relationship_tls_dns_record.go +++ /dev/null @@ -1,155 +0,0 @@ -// 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://www.fastly.com/documentation/reference/api/) - -API version: 1.0.0 -Contact: oss@fastly.com -*/ - -// This code is auto-generated; DO NOT EDIT. - - -import ( - "encoding/json" -) - -// RelationshipTLSDNSRecord struct for RelationshipTLSDNSRecord -type RelationshipTLSDNSRecord struct { - DNSRecord *RelationshipTLSDNSRecordDNSRecord `json:"dns_record,omitempty"` - AdditionalProperties map[string]any -} - -type _RelationshipTLSDNSRecord RelationshipTLSDNSRecord - -// NewRelationshipTLSDNSRecord instantiates a new RelationshipTLSDNSRecord object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewRelationshipTLSDNSRecord() *RelationshipTLSDNSRecord { - this := RelationshipTLSDNSRecord{} - return &this -} - -// NewRelationshipTLSDNSRecordWithDefaults instantiates a new RelationshipTLSDNSRecord object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewRelationshipTLSDNSRecordWithDefaults() *RelationshipTLSDNSRecord { - this := RelationshipTLSDNSRecord{} - return &this -} - -// GetDNSRecord returns the DNSRecord field value if set, zero value otherwise. -func (o *RelationshipTLSDNSRecord) GetDNSRecord() RelationshipTLSDNSRecordDNSRecord { - if o == nil || o.DNSRecord == nil { - var ret RelationshipTLSDNSRecordDNSRecord - return ret - } - return *o.DNSRecord -} - -// GetDNSRecordOk returns a tuple with the DNSRecord field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RelationshipTLSDNSRecord) GetDNSRecordOk() (*RelationshipTLSDNSRecordDNSRecord, bool) { - if o == nil || o.DNSRecord == nil { - return nil, false - } - return o.DNSRecord, true -} - -// HasDNSRecord returns a boolean if a field has been set. -func (o *RelationshipTLSDNSRecord) HasDNSRecord() bool { - if o != nil && o.DNSRecord != nil { - return true - } - - return false -} - -// SetDNSRecord gets a reference to the given RelationshipTLSDNSRecordDNSRecord and assigns it to the DNSRecord field. -func (o *RelationshipTLSDNSRecord) SetDNSRecord(v RelationshipTLSDNSRecordDNSRecord) { - o.DNSRecord = &v -} - -// MarshalJSON implements the json.Marshaler interface. -// Marshaler is the interface implemented by types that can marshal themselves into valid JSON. -func (o RelationshipTLSDNSRecord) MarshalJSON() ([]byte, error) { - toSerialize := map[string]any{} - if o.DNSRecord != nil { - toSerialize["dns_record"] = o.DNSRecord - } - - 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 *RelationshipTLSDNSRecord) UnmarshalJSON(bytes []byte) (err error) { - varRelationshipTLSDNSRecord := _RelationshipTLSDNSRecord{} - - if err = json.Unmarshal(bytes, &varRelationshipTLSDNSRecord); err == nil { - *o = RelationshipTLSDNSRecord(varRelationshipTLSDNSRecord) - } - - additionalProperties := make(map[string]any) - - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { - delete(additionalProperties, "dns_record") - o.AdditionalProperties = additionalProperties - } - - return err -} - -// NullableRelationshipTLSDNSRecord is a helper abstraction for handling nullable relationshiptlsdnsrecord types. -type NullableRelationshipTLSDNSRecord struct { - value *RelationshipTLSDNSRecord - isSet bool -} - -// Get returns the value. -func (v NullableRelationshipTLSDNSRecord) Get() *RelationshipTLSDNSRecord { - return v.value -} - -// Set modifies the value. -func (v *NullableRelationshipTLSDNSRecord) Set(val *RelationshipTLSDNSRecord) { - v.value = val - v.isSet = true -} - -// IsSet indicates if the value was set. -func (v NullableRelationshipTLSDNSRecord) IsSet() bool { - return v.isSet -} - -// Unset removes the value. -func (v *NullableRelationshipTLSDNSRecord) Unset() { - v.value = nil - v.isSet = false -} - -// NewNullableRelationshipTLSDNSRecord returns a pointer to a new instance of NullableRelationshipTLSDNSRecord. -func NewNullableRelationshipTLSDNSRecord(val *RelationshipTLSDNSRecord) *NullableRelationshipTLSDNSRecord { - return &NullableRelationshipTLSDNSRecord{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 NullableRelationshipTLSDNSRecord) 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 *NullableRelationshipTLSDNSRecord) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/fastly/model_relationship_tls_dns_records.go b/fastly/model_relationship_tls_dns_records_request.go similarity index 55% rename from fastly/model_relationship_tls_dns_records.go rename to fastly/model_relationship_tls_dns_records_request.go index 85200bd8..26f96df5 100644 --- a/fastly/model_relationship_tls_dns_records.go +++ b/fastly/model_relationship_tls_dns_records_request.go @@ -17,35 +17,35 @@ import ( "encoding/json" ) -// RelationshipTLSDNSRecords struct for RelationshipTLSDNSRecords -type RelationshipTLSDNSRecords struct { - DNSRecords *RelationshipTLSDNSRecordDNSRecord `json:"dns_records,omitempty"` +// RelationshipTLSDNSRecordsRequest struct for RelationshipTLSDNSRecordsRequest +type RelationshipTLSDNSRecordsRequest struct { + DNSRecords *RelationshipTLSDNSRecordsRequestDNSRecords `json:"dns_records,omitempty"` AdditionalProperties map[string]any } -type _RelationshipTLSDNSRecords RelationshipTLSDNSRecords +type _RelationshipTLSDNSRecordsRequest RelationshipTLSDNSRecordsRequest -// NewRelationshipTLSDNSRecords instantiates a new RelationshipTLSDNSRecords object +// NewRelationshipTLSDNSRecordsRequest instantiates a new RelationshipTLSDNSRecordsRequest object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewRelationshipTLSDNSRecords() *RelationshipTLSDNSRecords { - this := RelationshipTLSDNSRecords{} +func NewRelationshipTLSDNSRecordsRequest() *RelationshipTLSDNSRecordsRequest { + this := RelationshipTLSDNSRecordsRequest{} return &this } -// NewRelationshipTLSDNSRecordsWithDefaults instantiates a new RelationshipTLSDNSRecords object +// NewRelationshipTLSDNSRecordsRequestWithDefaults instantiates a new RelationshipTLSDNSRecordsRequest object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set -func NewRelationshipTLSDNSRecordsWithDefaults() *RelationshipTLSDNSRecords { - this := RelationshipTLSDNSRecords{} +func NewRelationshipTLSDNSRecordsRequestWithDefaults() *RelationshipTLSDNSRecordsRequest { + this := RelationshipTLSDNSRecordsRequest{} return &this } // GetDNSRecords returns the DNSRecords field value if set, zero value otherwise. -func (o *RelationshipTLSDNSRecords) GetDNSRecords() RelationshipTLSDNSRecordDNSRecord { +func (o *RelationshipTLSDNSRecordsRequest) GetDNSRecords() RelationshipTLSDNSRecordsRequestDNSRecords { if o == nil || o.DNSRecords == nil { - var ret RelationshipTLSDNSRecordDNSRecord + var ret RelationshipTLSDNSRecordsRequestDNSRecords return ret } return *o.DNSRecords @@ -53,7 +53,7 @@ func (o *RelationshipTLSDNSRecords) GetDNSRecords() RelationshipTLSDNSRecordDNSR // GetDNSRecordsOk returns a tuple with the DNSRecords field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *RelationshipTLSDNSRecords) GetDNSRecordsOk() (*RelationshipTLSDNSRecordDNSRecord, bool) { +func (o *RelationshipTLSDNSRecordsRequest) GetDNSRecordsOk() (*RelationshipTLSDNSRecordsRequestDNSRecords, bool) { if o == nil || o.DNSRecords == nil { return nil, false } @@ -61,7 +61,7 @@ func (o *RelationshipTLSDNSRecords) GetDNSRecordsOk() (*RelationshipTLSDNSRecord } // HasDNSRecords returns a boolean if a field has been set. -func (o *RelationshipTLSDNSRecords) HasDNSRecords() bool { +func (o *RelationshipTLSDNSRecordsRequest) HasDNSRecords() bool { if o != nil && o.DNSRecords != nil { return true } @@ -69,14 +69,14 @@ func (o *RelationshipTLSDNSRecords) HasDNSRecords() bool { return false } -// SetDNSRecords gets a reference to the given RelationshipTLSDNSRecordDNSRecord and assigns it to the DNSRecords field. -func (o *RelationshipTLSDNSRecords) SetDNSRecords(v RelationshipTLSDNSRecordDNSRecord) { +// SetDNSRecords gets a reference to the given RelationshipTLSDNSRecordsRequestDNSRecords and assigns it to the DNSRecords field. +func (o *RelationshipTLSDNSRecordsRequest) SetDNSRecords(v RelationshipTLSDNSRecordsRequestDNSRecords) { o.DNSRecords = &v } // MarshalJSON implements the json.Marshaler interface. // Marshaler is the interface implemented by types that can marshal themselves into valid JSON. -func (o RelationshipTLSDNSRecords) MarshalJSON() ([]byte, error) { +func (o RelationshipTLSDNSRecordsRequest) MarshalJSON() ([]byte, error) { toSerialize := map[string]any{} if o.DNSRecords != nil { toSerialize["dns_records"] = o.DNSRecords @@ -91,11 +91,11 @@ func (o RelationshipTLSDNSRecords) 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 *RelationshipTLSDNSRecords) UnmarshalJSON(bytes []byte) (err error) { - varRelationshipTLSDNSRecords := _RelationshipTLSDNSRecords{} +func (o *RelationshipTLSDNSRecordsRequest) UnmarshalJSON(bytes []byte) (err error) { + varRelationshipTLSDNSRecordsRequest := _RelationshipTLSDNSRecordsRequest{} - if err = json.Unmarshal(bytes, &varRelationshipTLSDNSRecords); err == nil { - *o = RelationshipTLSDNSRecords(varRelationshipTLSDNSRecords) + if err = json.Unmarshal(bytes, &varRelationshipTLSDNSRecordsRequest); err == nil { + *o = RelationshipTLSDNSRecordsRequest(varRelationshipTLSDNSRecordsRequest) } additionalProperties := make(map[string]any) @@ -108,48 +108,48 @@ func (o *RelationshipTLSDNSRecords) UnmarshalJSON(bytes []byte) (err error) { return err } -// NullableRelationshipTLSDNSRecords is a helper abstraction for handling nullable relationshiptlsdnsrecords types. -type NullableRelationshipTLSDNSRecords struct { - value *RelationshipTLSDNSRecords +// NullableRelationshipTLSDNSRecordsRequest is a helper abstraction for handling nullable relationshiptlsdnsrecordsrequest types. +type NullableRelationshipTLSDNSRecordsRequest struct { + value *RelationshipTLSDNSRecordsRequest isSet bool } // Get returns the value. -func (v NullableRelationshipTLSDNSRecords) Get() *RelationshipTLSDNSRecords { +func (v NullableRelationshipTLSDNSRecordsRequest) Get() *RelationshipTLSDNSRecordsRequest { return v.value } // Set modifies the value. -func (v *NullableRelationshipTLSDNSRecords) Set(val *RelationshipTLSDNSRecords) { +func (v *NullableRelationshipTLSDNSRecordsRequest) Set(val *RelationshipTLSDNSRecordsRequest) { v.value = val v.isSet = true } // IsSet indicates if the value was set. -func (v NullableRelationshipTLSDNSRecords) IsSet() bool { +func (v NullableRelationshipTLSDNSRecordsRequest) IsSet() bool { return v.isSet } // Unset removes the value. -func (v *NullableRelationshipTLSDNSRecords) Unset() { +func (v *NullableRelationshipTLSDNSRecordsRequest) Unset() { v.value = nil v.isSet = false } -// NewNullableRelationshipTLSDNSRecords returns a pointer to a new instance of NullableRelationshipTLSDNSRecords. -func NewNullableRelationshipTLSDNSRecords(val *RelationshipTLSDNSRecords) *NullableRelationshipTLSDNSRecords { - return &NullableRelationshipTLSDNSRecords{value: val, isSet: true} +// NewNullableRelationshipTLSDNSRecordsRequest returns a pointer to a new instance of NullableRelationshipTLSDNSRecordsRequest. +func NewNullableRelationshipTLSDNSRecordsRequest(val *RelationshipTLSDNSRecordsRequest) *NullableRelationshipTLSDNSRecordsRequest { + return &NullableRelationshipTLSDNSRecordsRequest{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 NullableRelationshipTLSDNSRecords) MarshalJSON() ([]byte, error) { +func (v NullableRelationshipTLSDNSRecordsRequest) 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 *NullableRelationshipTLSDNSRecords) UnmarshalJSON(src []byte) error { +func (v *NullableRelationshipTLSDNSRecordsRequest) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } diff --git a/fastly/model_relationship_tls_dns_records_request_dns_records.go b/fastly/model_relationship_tls_dns_records_request_dns_records.go new file mode 100644 index 00000000..b9742c1b --- /dev/null +++ b/fastly/model_relationship_tls_dns_records_request_dns_records.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://www.fastly.com/documentation/reference/api/) + +API version: 1.0.0 +Contact: oss@fastly.com +*/ + +// This code is auto-generated; DO NOT EDIT. + + +import ( + "encoding/json" +) + +// RelationshipTLSDNSRecordsRequestDNSRecords struct for RelationshipTLSDNSRecordsRequestDNSRecords +type RelationshipTLSDNSRecordsRequestDNSRecords struct { + Data []RelationshipTLSDNSRecordsRequestDNSRecordsData `json:"data,omitempty"` + AdditionalProperties map[string]any +} + +type _RelationshipTLSDNSRecordsRequestDNSRecords RelationshipTLSDNSRecordsRequestDNSRecords + +// NewRelationshipTLSDNSRecordsRequestDNSRecords instantiates a new RelationshipTLSDNSRecordsRequestDNSRecords object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRelationshipTLSDNSRecordsRequestDNSRecords() *RelationshipTLSDNSRecordsRequestDNSRecords { + this := RelationshipTLSDNSRecordsRequestDNSRecords{} + return &this +} + +// NewRelationshipTLSDNSRecordsRequestDNSRecordsWithDefaults instantiates a new RelationshipTLSDNSRecordsRequestDNSRecords object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRelationshipTLSDNSRecordsRequestDNSRecordsWithDefaults() *RelationshipTLSDNSRecordsRequestDNSRecords { + this := RelationshipTLSDNSRecordsRequestDNSRecords{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *RelationshipTLSDNSRecordsRequestDNSRecords) GetData() []RelationshipTLSDNSRecordsRequestDNSRecordsData { + if o == nil || o.Data == nil { + var ret []RelationshipTLSDNSRecordsRequestDNSRecordsData + 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 *RelationshipTLSDNSRecordsRequestDNSRecords) GetDataOk() ([]RelationshipTLSDNSRecordsRequestDNSRecordsData, 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 *RelationshipTLSDNSRecordsRequestDNSRecords) HasData() bool { + if o != nil && o.Data != nil { + return true + } + + return false +} + +// SetData gets a reference to the given []RelationshipTLSDNSRecordsRequestDNSRecordsData and assigns it to the Data field. +func (o *RelationshipTLSDNSRecordsRequestDNSRecords) SetData(v []RelationshipTLSDNSRecordsRequestDNSRecordsData) { + 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 RelationshipTLSDNSRecordsRequestDNSRecords) 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 *RelationshipTLSDNSRecordsRequestDNSRecords) UnmarshalJSON(bytes []byte) (err error) { + varRelationshipTLSDNSRecordsRequestDNSRecords := _RelationshipTLSDNSRecordsRequestDNSRecords{} + + if err = json.Unmarshal(bytes, &varRelationshipTLSDNSRecordsRequestDNSRecords); err == nil { + *o = RelationshipTLSDNSRecordsRequestDNSRecords(varRelationshipTLSDNSRecordsRequestDNSRecords) + } + + additionalProperties := make(map[string]any) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "data") + o.AdditionalProperties = additionalProperties + } + + return err +} + +// NullableRelationshipTLSDNSRecordsRequestDNSRecords is a helper abstraction for handling nullable relationshiptlsdnsrecordsrequestdnsrecords types. +type NullableRelationshipTLSDNSRecordsRequestDNSRecords struct { + value *RelationshipTLSDNSRecordsRequestDNSRecords + isSet bool +} + +// Get returns the value. +func (v NullableRelationshipTLSDNSRecordsRequestDNSRecords) Get() *RelationshipTLSDNSRecordsRequestDNSRecords { + return v.value +} + +// Set modifies the value. +func (v *NullableRelationshipTLSDNSRecordsRequestDNSRecords) Set(val *RelationshipTLSDNSRecordsRequestDNSRecords) { + v.value = val + v.isSet = true +} + +// IsSet indicates if the value was set. +func (v NullableRelationshipTLSDNSRecordsRequestDNSRecords) IsSet() bool { + return v.isSet +} + +// Unset removes the value. +func (v *NullableRelationshipTLSDNSRecordsRequestDNSRecords) Unset() { + v.value = nil + v.isSet = false +} + +// NewNullableRelationshipTLSDNSRecordsRequestDNSRecords returns a pointer to a new instance of NullableRelationshipTLSDNSRecordsRequestDNSRecords. +func NewNullableRelationshipTLSDNSRecordsRequestDNSRecords(val *RelationshipTLSDNSRecordsRequestDNSRecords) *NullableRelationshipTLSDNSRecordsRequestDNSRecords { + return &NullableRelationshipTLSDNSRecordsRequestDNSRecords{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 NullableRelationshipTLSDNSRecordsRequestDNSRecords) 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 *NullableRelationshipTLSDNSRecordsRequestDNSRecords) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/fastly/model_relationship_member_tls_dns_record.go b/fastly/model_relationship_tls_dns_records_request_dns_records_data.go similarity index 55% rename from fastly/model_relationship_member_tls_dns_record.go rename to fastly/model_relationship_tls_dns_records_request_dns_records_data.go index 230986d7..2a8417b9 100644 --- a/fastly/model_relationship_member_tls_dns_record.go +++ b/fastly/model_relationship_tls_dns_records_request_dns_records_data.go @@ -17,38 +17,38 @@ import ( "encoding/json" ) -// RelationshipMemberTLSDNSRecord struct for RelationshipMemberTLSDNSRecord -type RelationshipMemberTLSDNSRecord struct { +// RelationshipTLSDNSRecordsRequestDNSRecordsData struct for RelationshipTLSDNSRecordsRequestDNSRecordsData +type RelationshipTLSDNSRecordsRequestDNSRecordsData struct { Type *TypeTLSDNSRecord `json:"type,omitempty"` ID *string `json:"id,omitempty"` AdditionalProperties map[string]any } -type _RelationshipMemberTLSDNSRecord RelationshipMemberTLSDNSRecord +type _RelationshipTLSDNSRecordsRequestDNSRecordsData RelationshipTLSDNSRecordsRequestDNSRecordsData -// NewRelationshipMemberTLSDNSRecord instantiates a new RelationshipMemberTLSDNSRecord object +// NewRelationshipTLSDNSRecordsRequestDNSRecordsData instantiates a new RelationshipTLSDNSRecordsRequestDNSRecordsData object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewRelationshipMemberTLSDNSRecord() *RelationshipMemberTLSDNSRecord { - this := RelationshipMemberTLSDNSRecord{} +func NewRelationshipTLSDNSRecordsRequestDNSRecordsData() *RelationshipTLSDNSRecordsRequestDNSRecordsData { + this := RelationshipTLSDNSRecordsRequestDNSRecordsData{} var resourceType TypeTLSDNSRecord = TYPETLSDNSRECORD_DNS_RECORD this.Type = &resourceType return &this } -// NewRelationshipMemberTLSDNSRecordWithDefaults instantiates a new RelationshipMemberTLSDNSRecord object +// NewRelationshipTLSDNSRecordsRequestDNSRecordsDataWithDefaults instantiates a new RelationshipTLSDNSRecordsRequestDNSRecordsData object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set -func NewRelationshipMemberTLSDNSRecordWithDefaults() *RelationshipMemberTLSDNSRecord { - this := RelationshipMemberTLSDNSRecord{} +func NewRelationshipTLSDNSRecordsRequestDNSRecordsDataWithDefaults() *RelationshipTLSDNSRecordsRequestDNSRecordsData { + this := RelationshipTLSDNSRecordsRequestDNSRecordsData{} var resourceType TypeTLSDNSRecord = TYPETLSDNSRECORD_DNS_RECORD this.Type = &resourceType return &this } // GetType returns the Type field value if set, zero value otherwise. -func (o *RelationshipMemberTLSDNSRecord) GetType() TypeTLSDNSRecord { +func (o *RelationshipTLSDNSRecordsRequestDNSRecordsData) GetType() TypeTLSDNSRecord { if o == nil || o.Type == nil { var ret TypeTLSDNSRecord return ret @@ -58,7 +58,7 @@ func (o *RelationshipMemberTLSDNSRecord) GetType() TypeTLSDNSRecord { // 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 *RelationshipMemberTLSDNSRecord) GetTypeOk() (*TypeTLSDNSRecord, bool) { +func (o *RelationshipTLSDNSRecordsRequestDNSRecordsData) GetTypeOk() (*TypeTLSDNSRecord, bool) { if o == nil || o.Type == nil { return nil, false } @@ -66,7 +66,7 @@ func (o *RelationshipMemberTLSDNSRecord) GetTypeOk() (*TypeTLSDNSRecord, bool) { } // HasType returns a boolean if a field has been set. -func (o *RelationshipMemberTLSDNSRecord) HasType() bool { +func (o *RelationshipTLSDNSRecordsRequestDNSRecordsData) HasType() bool { if o != nil && o.Type != nil { return true } @@ -75,12 +75,12 @@ func (o *RelationshipMemberTLSDNSRecord) HasType() bool { } // SetType gets a reference to the given TypeTLSDNSRecord and assigns it to the Type field. -func (o *RelationshipMemberTLSDNSRecord) SetType(v TypeTLSDNSRecord) { +func (o *RelationshipTLSDNSRecordsRequestDNSRecordsData) SetType(v TypeTLSDNSRecord) { o.Type = &v } // GetID returns the ID field value if set, zero value otherwise. -func (o *RelationshipMemberTLSDNSRecord) GetID() string { +func (o *RelationshipTLSDNSRecordsRequestDNSRecordsData) GetID() string { if o == nil || o.ID == nil { var ret string return ret @@ -90,7 +90,7 @@ func (o *RelationshipMemberTLSDNSRecord) 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 *RelationshipMemberTLSDNSRecord) GetIDOk() (*string, bool) { +func (o *RelationshipTLSDNSRecordsRequestDNSRecordsData) GetIDOk() (*string, bool) { if o == nil || o.ID == nil { return nil, false } @@ -98,7 +98,7 @@ func (o *RelationshipMemberTLSDNSRecord) GetIDOk() (*string, bool) { } // HasID returns a boolean if a field has been set. -func (o *RelationshipMemberTLSDNSRecord) HasID() bool { +func (o *RelationshipTLSDNSRecordsRequestDNSRecordsData) HasID() bool { if o != nil && o.ID != nil { return true } @@ -107,13 +107,13 @@ func (o *RelationshipMemberTLSDNSRecord) HasID() bool { } // SetID gets a reference to the given string and assigns it to the ID field. -func (o *RelationshipMemberTLSDNSRecord) SetID(v string) { +func (o *RelationshipTLSDNSRecordsRequestDNSRecordsData) 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 RelationshipMemberTLSDNSRecord) MarshalJSON() ([]byte, error) { +func (o RelationshipTLSDNSRecordsRequestDNSRecordsData) MarshalJSON() ([]byte, error) { toSerialize := map[string]any{} if o.Type != nil { toSerialize["type"] = o.Type @@ -131,11 +131,11 @@ func (o RelationshipMemberTLSDNSRecord) 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 *RelationshipMemberTLSDNSRecord) UnmarshalJSON(bytes []byte) (err error) { - varRelationshipMemberTLSDNSRecord := _RelationshipMemberTLSDNSRecord{} +func (o *RelationshipTLSDNSRecordsRequestDNSRecordsData) UnmarshalJSON(bytes []byte) (err error) { + varRelationshipTLSDNSRecordsRequestDNSRecordsData := _RelationshipTLSDNSRecordsRequestDNSRecordsData{} - if err = json.Unmarshal(bytes, &varRelationshipMemberTLSDNSRecord); err == nil { - *o = RelationshipMemberTLSDNSRecord(varRelationshipMemberTLSDNSRecord) + if err = json.Unmarshal(bytes, &varRelationshipTLSDNSRecordsRequestDNSRecordsData); err == nil { + *o = RelationshipTLSDNSRecordsRequestDNSRecordsData(varRelationshipTLSDNSRecordsRequestDNSRecordsData) } additionalProperties := make(map[string]any) @@ -149,48 +149,48 @@ func (o *RelationshipMemberTLSDNSRecord) UnmarshalJSON(bytes []byte) (err error) return err } -// NullableRelationshipMemberTLSDNSRecord is a helper abstraction for handling nullable relationshipmembertlsdnsrecord types. -type NullableRelationshipMemberTLSDNSRecord struct { - value *RelationshipMemberTLSDNSRecord +// NullableRelationshipTLSDNSRecordsRequestDNSRecordsData is a helper abstraction for handling nullable relationshiptlsdnsrecordsrequestdnsrecordsdata types. +type NullableRelationshipTLSDNSRecordsRequestDNSRecordsData struct { + value *RelationshipTLSDNSRecordsRequestDNSRecordsData isSet bool } // Get returns the value. -func (v NullableRelationshipMemberTLSDNSRecord) Get() *RelationshipMemberTLSDNSRecord { +func (v NullableRelationshipTLSDNSRecordsRequestDNSRecordsData) Get() *RelationshipTLSDNSRecordsRequestDNSRecordsData { return v.value } // Set modifies the value. -func (v *NullableRelationshipMemberTLSDNSRecord) Set(val *RelationshipMemberTLSDNSRecord) { +func (v *NullableRelationshipTLSDNSRecordsRequestDNSRecordsData) Set(val *RelationshipTLSDNSRecordsRequestDNSRecordsData) { v.value = val v.isSet = true } // IsSet indicates if the value was set. -func (v NullableRelationshipMemberTLSDNSRecord) IsSet() bool { +func (v NullableRelationshipTLSDNSRecordsRequestDNSRecordsData) IsSet() bool { return v.isSet } // Unset removes the value. -func (v *NullableRelationshipMemberTLSDNSRecord) Unset() { +func (v *NullableRelationshipTLSDNSRecordsRequestDNSRecordsData) Unset() { v.value = nil v.isSet = false } -// NewNullableRelationshipMemberTLSDNSRecord returns a pointer to a new instance of NullableRelationshipMemberTLSDNSRecord. -func NewNullableRelationshipMemberTLSDNSRecord(val *RelationshipMemberTLSDNSRecord) *NullableRelationshipMemberTLSDNSRecord { - return &NullableRelationshipMemberTLSDNSRecord{value: val, isSet: true} +// NewNullableRelationshipTLSDNSRecordsRequestDNSRecordsData returns a pointer to a new instance of NullableRelationshipTLSDNSRecordsRequestDNSRecordsData. +func NewNullableRelationshipTLSDNSRecordsRequestDNSRecordsData(val *RelationshipTLSDNSRecordsRequestDNSRecordsData) *NullableRelationshipTLSDNSRecordsRequestDNSRecordsData { + return &NullableRelationshipTLSDNSRecordsRequestDNSRecordsData{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 NullableRelationshipMemberTLSDNSRecord) MarshalJSON() ([]byte, error) { +func (v NullableRelationshipTLSDNSRecordsRequestDNSRecordsData) 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 *NullableRelationshipMemberTLSDNSRecord) UnmarshalJSON(src []byte) error { +func (v *NullableRelationshipTLSDNSRecordsRequestDNSRecordsData) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } diff --git a/fastly/model_relationship_tls_dns_records_response.go b/fastly/model_relationship_tls_dns_records_response.go new file mode 100644 index 00000000..2f3afb5c --- /dev/null +++ b/fastly/model_relationship_tls_dns_records_response.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://www.fastly.com/documentation/reference/api/) + +API version: 1.0.0 +Contact: oss@fastly.com +*/ + +// This code is auto-generated; DO NOT EDIT. + + +import ( + "encoding/json" +) + +// RelationshipTLSDNSRecordsResponse struct for RelationshipTLSDNSRecordsResponse +type RelationshipTLSDNSRecordsResponse struct { + DNSRecords *RelationshipTLSDNSRecordsResponseDNSRecords `json:"dns_records,omitempty"` + AdditionalProperties map[string]any +} + +type _RelationshipTLSDNSRecordsResponse RelationshipTLSDNSRecordsResponse + +// NewRelationshipTLSDNSRecordsResponse instantiates a new RelationshipTLSDNSRecordsResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRelationshipTLSDNSRecordsResponse() *RelationshipTLSDNSRecordsResponse { + this := RelationshipTLSDNSRecordsResponse{} + return &this +} + +// NewRelationshipTLSDNSRecordsResponseWithDefaults instantiates a new RelationshipTLSDNSRecordsResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRelationshipTLSDNSRecordsResponseWithDefaults() *RelationshipTLSDNSRecordsResponse { + this := RelationshipTLSDNSRecordsResponse{} + return &this +} + +// GetDNSRecords returns the DNSRecords field value if set, zero value otherwise. +func (o *RelationshipTLSDNSRecordsResponse) GetDNSRecords() RelationshipTLSDNSRecordsResponseDNSRecords { + if o == nil || o.DNSRecords == nil { + var ret RelationshipTLSDNSRecordsResponseDNSRecords + return ret + } + return *o.DNSRecords +} + +// GetDNSRecordsOk returns a tuple with the DNSRecords field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RelationshipTLSDNSRecordsResponse) GetDNSRecordsOk() (*RelationshipTLSDNSRecordsResponseDNSRecords, bool) { + if o == nil || o.DNSRecords == nil { + return nil, false + } + return o.DNSRecords, true +} + +// HasDNSRecords returns a boolean if a field has been set. +func (o *RelationshipTLSDNSRecordsResponse) HasDNSRecords() bool { + if o != nil && o.DNSRecords != nil { + return true + } + + return false +} + +// SetDNSRecords gets a reference to the given RelationshipTLSDNSRecordsResponseDNSRecords and assigns it to the DNSRecords field. +func (o *RelationshipTLSDNSRecordsResponse) SetDNSRecords(v RelationshipTLSDNSRecordsResponseDNSRecords) { + o.DNSRecords = &v +} + +// MarshalJSON implements the json.Marshaler interface. +// Marshaler is the interface implemented by types that can marshal themselves into valid JSON. +func (o RelationshipTLSDNSRecordsResponse) MarshalJSON() ([]byte, error) { + toSerialize := map[string]any{} + if o.DNSRecords != nil { + toSerialize["dns_records"] = o.DNSRecords + } + + 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 *RelationshipTLSDNSRecordsResponse) UnmarshalJSON(bytes []byte) (err error) { + varRelationshipTLSDNSRecordsResponse := _RelationshipTLSDNSRecordsResponse{} + + if err = json.Unmarshal(bytes, &varRelationshipTLSDNSRecordsResponse); err == nil { + *o = RelationshipTLSDNSRecordsResponse(varRelationshipTLSDNSRecordsResponse) + } + + additionalProperties := make(map[string]any) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "dns_records") + o.AdditionalProperties = additionalProperties + } + + return err +} + +// NullableRelationshipTLSDNSRecordsResponse is a helper abstraction for handling nullable relationshiptlsdnsrecordsresponse types. +type NullableRelationshipTLSDNSRecordsResponse struct { + value *RelationshipTLSDNSRecordsResponse + isSet bool +} + +// Get returns the value. +func (v NullableRelationshipTLSDNSRecordsResponse) Get() *RelationshipTLSDNSRecordsResponse { + return v.value +} + +// Set modifies the value. +func (v *NullableRelationshipTLSDNSRecordsResponse) Set(val *RelationshipTLSDNSRecordsResponse) { + v.value = val + v.isSet = true +} + +// IsSet indicates if the value was set. +func (v NullableRelationshipTLSDNSRecordsResponse) IsSet() bool { + return v.isSet +} + +// Unset removes the value. +func (v *NullableRelationshipTLSDNSRecordsResponse) Unset() { + v.value = nil + v.isSet = false +} + +// NewNullableRelationshipTLSDNSRecordsResponse returns a pointer to a new instance of NullableRelationshipTLSDNSRecordsResponse. +func NewNullableRelationshipTLSDNSRecordsResponse(val *RelationshipTLSDNSRecordsResponse) *NullableRelationshipTLSDNSRecordsResponse { + return &NullableRelationshipTLSDNSRecordsResponse{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 NullableRelationshipTLSDNSRecordsResponse) 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 *NullableRelationshipTLSDNSRecordsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/fastly/model_relationship_tls_dns_records_response_dns_records.go b/fastly/model_relationship_tls_dns_records_response_dns_records.go new file mode 100644 index 00000000..3cff70e4 --- /dev/null +++ b/fastly/model_relationship_tls_dns_records_response_dns_records.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://www.fastly.com/documentation/reference/api/) + +API version: 1.0.0 +Contact: oss@fastly.com +*/ + +// This code is auto-generated; DO NOT EDIT. + + +import ( + "encoding/json" +) + +// RelationshipTLSDNSRecordsResponseDNSRecords struct for RelationshipTLSDNSRecordsResponseDNSRecords +type RelationshipTLSDNSRecordsResponseDNSRecords struct { + Data []RelationshipTLSDNSRecordsResponseDNSRecordsData `json:"data,omitempty"` + AdditionalProperties map[string]any +} + +type _RelationshipTLSDNSRecordsResponseDNSRecords RelationshipTLSDNSRecordsResponseDNSRecords + +// NewRelationshipTLSDNSRecordsResponseDNSRecords instantiates a new RelationshipTLSDNSRecordsResponseDNSRecords object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRelationshipTLSDNSRecordsResponseDNSRecords() *RelationshipTLSDNSRecordsResponseDNSRecords { + this := RelationshipTLSDNSRecordsResponseDNSRecords{} + return &this +} + +// NewRelationshipTLSDNSRecordsResponseDNSRecordsWithDefaults instantiates a new RelationshipTLSDNSRecordsResponseDNSRecords object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRelationshipTLSDNSRecordsResponseDNSRecordsWithDefaults() *RelationshipTLSDNSRecordsResponseDNSRecords { + this := RelationshipTLSDNSRecordsResponseDNSRecords{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *RelationshipTLSDNSRecordsResponseDNSRecords) GetData() []RelationshipTLSDNSRecordsResponseDNSRecordsData { + if o == nil || o.Data == nil { + var ret []RelationshipTLSDNSRecordsResponseDNSRecordsData + 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 *RelationshipTLSDNSRecordsResponseDNSRecords) GetDataOk() ([]RelationshipTLSDNSRecordsResponseDNSRecordsData, 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 *RelationshipTLSDNSRecordsResponseDNSRecords) HasData() bool { + if o != nil && o.Data != nil { + return true + } + + return false +} + +// SetData gets a reference to the given []RelationshipTLSDNSRecordsResponseDNSRecordsData and assigns it to the Data field. +func (o *RelationshipTLSDNSRecordsResponseDNSRecords) SetData(v []RelationshipTLSDNSRecordsResponseDNSRecordsData) { + 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 RelationshipTLSDNSRecordsResponseDNSRecords) 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 *RelationshipTLSDNSRecordsResponseDNSRecords) UnmarshalJSON(bytes []byte) (err error) { + varRelationshipTLSDNSRecordsResponseDNSRecords := _RelationshipTLSDNSRecordsResponseDNSRecords{} + + if err = json.Unmarshal(bytes, &varRelationshipTLSDNSRecordsResponseDNSRecords); err == nil { + *o = RelationshipTLSDNSRecordsResponseDNSRecords(varRelationshipTLSDNSRecordsResponseDNSRecords) + } + + additionalProperties := make(map[string]any) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "data") + o.AdditionalProperties = additionalProperties + } + + return err +} + +// NullableRelationshipTLSDNSRecordsResponseDNSRecords is a helper abstraction for handling nullable relationshiptlsdnsrecordsresponsednsrecords types. +type NullableRelationshipTLSDNSRecordsResponseDNSRecords struct { + value *RelationshipTLSDNSRecordsResponseDNSRecords + isSet bool +} + +// Get returns the value. +func (v NullableRelationshipTLSDNSRecordsResponseDNSRecords) Get() *RelationshipTLSDNSRecordsResponseDNSRecords { + return v.value +} + +// Set modifies the value. +func (v *NullableRelationshipTLSDNSRecordsResponseDNSRecords) Set(val *RelationshipTLSDNSRecordsResponseDNSRecords) { + v.value = val + v.isSet = true +} + +// IsSet indicates if the value was set. +func (v NullableRelationshipTLSDNSRecordsResponseDNSRecords) IsSet() bool { + return v.isSet +} + +// Unset removes the value. +func (v *NullableRelationshipTLSDNSRecordsResponseDNSRecords) Unset() { + v.value = nil + v.isSet = false +} + +// NewNullableRelationshipTLSDNSRecordsResponseDNSRecords returns a pointer to a new instance of NullableRelationshipTLSDNSRecordsResponseDNSRecords. +func NewNullableRelationshipTLSDNSRecordsResponseDNSRecords(val *RelationshipTLSDNSRecordsResponseDNSRecords) *NullableRelationshipTLSDNSRecordsResponseDNSRecords { + return &NullableRelationshipTLSDNSRecordsResponseDNSRecords{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 NullableRelationshipTLSDNSRecordsResponseDNSRecords) 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 *NullableRelationshipTLSDNSRecordsResponseDNSRecords) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/fastly/model_relationship_tls_dns_records_response_dns_records_data.go b/fastly/model_relationship_tls_dns_records_response_dns_records_data.go new file mode 100644 index 00000000..67e43966 --- /dev/null +++ b/fastly/model_relationship_tls_dns_records_response_dns_records_data.go @@ -0,0 +1,196 @@ +// 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://www.fastly.com/documentation/reference/api/) + +API version: 1.0.0 +Contact: oss@fastly.com +*/ + +// This code is auto-generated; DO NOT EDIT. + + +import ( + "encoding/json" +) + +// RelationshipTLSDNSRecordsResponseDNSRecordsData struct for RelationshipTLSDNSRecordsResponseDNSRecordsData +type RelationshipTLSDNSRecordsResponseDNSRecordsData struct { + Type *TypeTLSDNSRecord `json:"type,omitempty"` + ID *string `json:"id,omitempty"` + AdditionalProperties map[string]any +} + +type _RelationshipTLSDNSRecordsResponseDNSRecordsData RelationshipTLSDNSRecordsResponseDNSRecordsData + +// NewRelationshipTLSDNSRecordsResponseDNSRecordsData instantiates a new RelationshipTLSDNSRecordsResponseDNSRecordsData object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRelationshipTLSDNSRecordsResponseDNSRecordsData() *RelationshipTLSDNSRecordsResponseDNSRecordsData { + this := RelationshipTLSDNSRecordsResponseDNSRecordsData{} + var resourceType TypeTLSDNSRecord = TYPETLSDNSRECORD_DNS_RECORD + this.Type = &resourceType + return &this +} + +// NewRelationshipTLSDNSRecordsResponseDNSRecordsDataWithDefaults instantiates a new RelationshipTLSDNSRecordsResponseDNSRecordsData object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRelationshipTLSDNSRecordsResponseDNSRecordsDataWithDefaults() *RelationshipTLSDNSRecordsResponseDNSRecordsData { + this := RelationshipTLSDNSRecordsResponseDNSRecordsData{} + var resourceType TypeTLSDNSRecord = TYPETLSDNSRECORD_DNS_RECORD + this.Type = &resourceType + return &this +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *RelationshipTLSDNSRecordsResponseDNSRecordsData) GetType() TypeTLSDNSRecord { + if o == nil || o.Type == nil { + var ret TypeTLSDNSRecord + 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 *RelationshipTLSDNSRecordsResponseDNSRecordsData) GetTypeOk() (*TypeTLSDNSRecord, 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 *RelationshipTLSDNSRecordsResponseDNSRecordsData) HasType() bool { + if o != nil && o.Type != nil { + return true + } + + return false +} + +// SetType gets a reference to the given TypeTLSDNSRecord and assigns it to the Type field. +func (o *RelationshipTLSDNSRecordsResponseDNSRecordsData) SetType(v TypeTLSDNSRecord) { + o.Type = &v +} + +// GetID returns the ID field value if set, zero value otherwise. +func (o *RelationshipTLSDNSRecordsResponseDNSRecordsData) 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 *RelationshipTLSDNSRecordsResponseDNSRecordsData) 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 *RelationshipTLSDNSRecordsResponseDNSRecordsData) 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 *RelationshipTLSDNSRecordsResponseDNSRecordsData) 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 RelationshipTLSDNSRecordsResponseDNSRecordsData) MarshalJSON() ([]byte, error) { + toSerialize := map[string]any{} + if o.Type != nil { + toSerialize["type"] = o.Type + } + 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 *RelationshipTLSDNSRecordsResponseDNSRecordsData) UnmarshalJSON(bytes []byte) (err error) { + varRelationshipTLSDNSRecordsResponseDNSRecordsData := _RelationshipTLSDNSRecordsResponseDNSRecordsData{} + + if err = json.Unmarshal(bytes, &varRelationshipTLSDNSRecordsResponseDNSRecordsData); err == nil { + *o = RelationshipTLSDNSRecordsResponseDNSRecordsData(varRelationshipTLSDNSRecordsResponseDNSRecordsData) + } + + additionalProperties := make(map[string]any) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "type") + delete(additionalProperties, "id") + o.AdditionalProperties = additionalProperties + } + + return err +} + +// NullableRelationshipTLSDNSRecordsResponseDNSRecordsData is a helper abstraction for handling nullable relationshiptlsdnsrecordsresponsednsrecordsdata types. +type NullableRelationshipTLSDNSRecordsResponseDNSRecordsData struct { + value *RelationshipTLSDNSRecordsResponseDNSRecordsData + isSet bool +} + +// Get returns the value. +func (v NullableRelationshipTLSDNSRecordsResponseDNSRecordsData) Get() *RelationshipTLSDNSRecordsResponseDNSRecordsData { + return v.value +} + +// Set modifies the value. +func (v *NullableRelationshipTLSDNSRecordsResponseDNSRecordsData) Set(val *RelationshipTLSDNSRecordsResponseDNSRecordsData) { + v.value = val + v.isSet = true +} + +// IsSet indicates if the value was set. +func (v NullableRelationshipTLSDNSRecordsResponseDNSRecordsData) IsSet() bool { + return v.isSet +} + +// Unset removes the value. +func (v *NullableRelationshipTLSDNSRecordsResponseDNSRecordsData) Unset() { + v.value = nil + v.isSet = false +} + +// NewNullableRelationshipTLSDNSRecordsResponseDNSRecordsData returns a pointer to a new instance of NullableRelationshipTLSDNSRecordsResponseDNSRecordsData. +func NewNullableRelationshipTLSDNSRecordsResponseDNSRecordsData(val *RelationshipTLSDNSRecordsResponseDNSRecordsData) *NullableRelationshipTLSDNSRecordsResponseDNSRecordsData { + return &NullableRelationshipTLSDNSRecordsResponseDNSRecordsData{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 NullableRelationshipTLSDNSRecordsResponseDNSRecordsData) 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 *NullableRelationshipTLSDNSRecordsResponseDNSRecordsData) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/fastly/model_relationships_for_tls_configuration.go b/fastly/model_relationships_for_tls_configuration.go index aa13c430..110c2652 100644 --- a/fastly/model_relationships_for_tls_configuration.go +++ b/fastly/model_relationships_for_tls_configuration.go @@ -21,7 +21,7 @@ import ( // RelationshipsForTLSConfiguration struct for RelationshipsForTLSConfiguration type RelationshipsForTLSConfiguration struct { RelationshipService *RelationshipService - RelationshipTLSDNSRecords *RelationshipTLSDNSRecords + RelationshipTLSDNSRecordsResponse *RelationshipTLSDNSRecordsResponse } // UnmarshalJSON implements the Unmarshaler interface. @@ -40,16 +40,16 @@ func (o *RelationshipsForTLSConfiguration) UnmarshalJSON(data []byte) error { o.RelationshipService = nil } - // try to unmarshal JSON data into RelationshipTLSDNSRecords - err = json.Unmarshal(data, &o.RelationshipTLSDNSRecords); + // try to unmarshal JSON data into RelationshipTLSDNSRecordsResponse + err = json.Unmarshal(data, &o.RelationshipTLSDNSRecordsResponse); if err == nil { - jsonRelationshipTLSDNSRecords, _ := json.Marshal(o.RelationshipTLSDNSRecords) - if string(jsonRelationshipTLSDNSRecords) != "{}" { // empty struct - return nil // data stored in o.RelationshipTLSDNSRecords, return on the first match + jsonRelationshipTLSDNSRecordsResponse, _ := json.Marshal(o.RelationshipTLSDNSRecordsResponse) + if string(jsonRelationshipTLSDNSRecordsResponse) != "{}" { // empty struct + return nil // data stored in o.RelationshipTLSDNSRecordsResponse, return on the first match } - o.RelationshipTLSDNSRecords = nil + o.RelationshipTLSDNSRecordsResponse = nil } else { - o.RelationshipTLSDNSRecords = nil + o.RelationshipTLSDNSRecordsResponse = nil } return fmt.Errorf("data failed to match schemas in anyOf(RelationshipsForTLSConfiguration)") @@ -62,8 +62,8 @@ func (o *RelationshipsForTLSConfiguration) MarshalJSON() ([]byte, error) { return json.Marshal(&o.RelationshipService) } - if o.RelationshipTLSDNSRecords != nil { - return json.Marshal(&o.RelationshipTLSDNSRecords) + if o.RelationshipTLSDNSRecordsResponse != nil { + return json.Marshal(&o.RelationshipTLSDNSRecordsResponse) } return nil, nil // no data in anyOf schemas diff --git a/fastly/model_results.go b/fastly/model_results.go index a77ad59a..be5a50d0 100644 --- a/fastly/model_results.go +++ b/fastly/model_results.go @@ -517,6 +517,8 @@ type Results struct { AllStatus4xx *int32 `json:"all_status_4xx,omitempty"` // Number of \"Server Error\" codes delivered for all sources. AllStatus5xx *int32 `json:"all_status_5xx,omitempty"` + // Origin Offload measures the ratio of bytes served to end users that were cached by Fastly, over the bytes served to end users, between 0 and 1. ((`edge_resp_body_bytes` + `edge_resp_header_bytes`) - (`origin_fetch_resp_body_bytes` + `origin_fetch_resp_header_bytes`)) / (`edge_resp_body_bytes` + `edge_resp_header_bytes`). + OriginOffload *float32 `json:"origin_offload,omitempty"` ServiceID *string `json:"service_id,omitempty"` // Timestamp for the start of the time period being reported StartTime *int32 `json:"start_time,omitempty"` @@ -8494,6 +8496,38 @@ func (o *Results) SetAllStatus5xx(v int32) { o.AllStatus5xx = &v } +// GetOriginOffload returns the OriginOffload field value if set, zero value otherwise. +func (o *Results) GetOriginOffload() float32 { + if o == nil || o.OriginOffload == nil { + var ret float32 + return ret + } + return *o.OriginOffload +} + +// GetOriginOffloadOk returns a tuple with the OriginOffload field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Results) GetOriginOffloadOk() (*float32, bool) { + if o == nil || o.OriginOffload == nil { + return nil, false + } + return o.OriginOffload, true +} + +// HasOriginOffload returns a boolean if a field has been set. +func (o *Results) HasOriginOffload() bool { + if o != nil && o.OriginOffload != nil { + return true + } + + return false +} + +// SetOriginOffload gets a reference to the given float32 and assigns it to the OriginOffload field. +func (o *Results) SetOriginOffload(v float32) { + o.OriginOffload = &v +} + // GetServiceID returns the ServiceID field value if set, zero value otherwise. func (o *Results) GetServiceID() string { if o == nil || o.ServiceID == nil { @@ -9306,6 +9340,9 @@ func (o Results) MarshalJSON() ([]byte, error) { if o.AllStatus5xx != nil { toSerialize["all_status_5xx"] = o.AllStatus5xx } + if o.OriginOffload != nil { + toSerialize["origin_offload"] = o.OriginOffload + } if o.ServiceID != nil { toSerialize["service_id"] = o.ServiceID } @@ -9580,6 +9617,7 @@ func (o *Results) UnmarshalJSON(bytes []byte) (err error) { delete(additionalProperties, "all_status_3xx") delete(additionalProperties, "all_status_4xx") delete(additionalProperties, "all_status_5xx") + delete(additionalProperties, "origin_offload") delete(additionalProperties, "service_id") delete(additionalProperties, "start_time") o.AdditionalProperties = additionalProperties diff --git a/fastly/model_serviceusagemetric.go b/fastly/model_serviceusagemetric.go new file mode 100644 index 00000000..80256648 --- /dev/null +++ b/fastly/model_serviceusagemetric.go @@ -0,0 +1,269 @@ +// 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://www.fastly.com/documentation/reference/api/) + +API version: 1.0.0 +Contact: oss@fastly.com +*/ + +// This code is auto-generated; DO NOT EDIT. + + +import ( + "encoding/json" +) + +// Serviceusagemetric struct for Serviceusagemetric +type Serviceusagemetric struct { + CustomerID *string `json:"customer_id,omitempty"` + // Service ID associated with the usage. + ServiceID *string `json:"service_id,omitempty"` + // Name of the service associated with the usage. + ServiceName *string `json:"service_name,omitempty"` + // The quantity of the usage for the billing period. Amount will be in the units provided in the parent object (e.g., a quantity of `1.3` with a unit of `gb` would have a usage amount of 1.3 gigabytes). + UsageUnits *float32 `json:"usage_units,omitempty"` + AdditionalProperties map[string]any +} + +type _Serviceusagemetric Serviceusagemetric + +// NewServiceusagemetric instantiates a new Serviceusagemetric object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewServiceusagemetric() *Serviceusagemetric { + this := Serviceusagemetric{} + return &this +} + +// NewServiceusagemetricWithDefaults instantiates a new Serviceusagemetric object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewServiceusagemetricWithDefaults() *Serviceusagemetric { + this := Serviceusagemetric{} + return &this +} + +// GetCustomerID returns the CustomerID field value if set, zero value otherwise. +func (o *Serviceusagemetric) GetCustomerID() string { + if o == nil || o.CustomerID == nil { + var ret string + return ret + } + return *o.CustomerID +} + +// GetCustomerIDOk returns a tuple with the CustomerID field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Serviceusagemetric) GetCustomerIDOk() (*string, bool) { + if o == nil || o.CustomerID == nil { + return nil, false + } + return o.CustomerID, true +} + +// HasCustomerID returns a boolean if a field has been set. +func (o *Serviceusagemetric) HasCustomerID() bool { + if o != nil && o.CustomerID != nil { + return true + } + + return false +} + +// SetCustomerID gets a reference to the given string and assigns it to the CustomerID field. +func (o *Serviceusagemetric) SetCustomerID(v string) { + o.CustomerID = &v +} + +// GetServiceID returns the ServiceID field value if set, zero value otherwise. +func (o *Serviceusagemetric) 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 *Serviceusagemetric) 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 *Serviceusagemetric) 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 *Serviceusagemetric) SetServiceID(v string) { + o.ServiceID = &v +} + +// GetServiceName returns the ServiceName field value if set, zero value otherwise. +func (o *Serviceusagemetric) GetServiceName() string { + if o == nil || o.ServiceName == nil { + var ret string + return ret + } + return *o.ServiceName +} + +// GetServiceNameOk returns a tuple with the ServiceName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Serviceusagemetric) GetServiceNameOk() (*string, bool) { + if o == nil || o.ServiceName == nil { + return nil, false + } + return o.ServiceName, true +} + +// HasServiceName returns a boolean if a field has been set. +func (o *Serviceusagemetric) HasServiceName() bool { + if o != nil && o.ServiceName != nil { + return true + } + + return false +} + +// SetServiceName gets a reference to the given string and assigns it to the ServiceName field. +func (o *Serviceusagemetric) SetServiceName(v string) { + o.ServiceName = &v +} + +// GetUsageUnits returns the UsageUnits field value if set, zero value otherwise. +func (o *Serviceusagemetric) GetUsageUnits() float32 { + if o == nil || o.UsageUnits == nil { + var ret float32 + return ret + } + return *o.UsageUnits +} + +// GetUsageUnitsOk returns a tuple with the UsageUnits field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Serviceusagemetric) GetUsageUnitsOk() (*float32, bool) { + if o == nil || o.UsageUnits == nil { + return nil, false + } + return o.UsageUnits, true +} + +// HasUsageUnits returns a boolean if a field has been set. +func (o *Serviceusagemetric) HasUsageUnits() bool { + if o != nil && o.UsageUnits != nil { + return true + } + + return false +} + +// SetUsageUnits gets a reference to the given float32 and assigns it to the UsageUnits field. +func (o *Serviceusagemetric) SetUsageUnits(v float32) { + o.UsageUnits = &v +} + +// MarshalJSON implements the json.Marshaler interface. +// Marshaler is the interface implemented by types that can marshal themselves into valid JSON. +func (o Serviceusagemetric) MarshalJSON() ([]byte, error) { + toSerialize := map[string]any{} + if o.CustomerID != nil { + toSerialize["customer_id"] = o.CustomerID + } + if o.ServiceID != nil { + toSerialize["service_id"] = o.ServiceID + } + if o.ServiceName != nil { + toSerialize["service_name"] = o.ServiceName + } + if o.UsageUnits != nil { + toSerialize["usage_units"] = o.UsageUnits + } + + 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 *Serviceusagemetric) UnmarshalJSON(bytes []byte) (err error) { + varServiceusagemetric := _Serviceusagemetric{} + + if err = json.Unmarshal(bytes, &varServiceusagemetric); err == nil { + *o = Serviceusagemetric(varServiceusagemetric) + } + + additionalProperties := make(map[string]any) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "customer_id") + delete(additionalProperties, "service_id") + delete(additionalProperties, "service_name") + delete(additionalProperties, "usage_units") + o.AdditionalProperties = additionalProperties + } + + return err +} + +// NullableServiceusagemetric is a helper abstraction for handling nullable serviceusagemetric types. +type NullableServiceusagemetric struct { + value *Serviceusagemetric + isSet bool +} + +// Get returns the value. +func (v NullableServiceusagemetric) Get() *Serviceusagemetric { + return v.value +} + +// Set modifies the value. +func (v *NullableServiceusagemetric) Set(val *Serviceusagemetric) { + v.value = val + v.isSet = true +} + +// IsSet indicates if the value was set. +func (v NullableServiceusagemetric) IsSet() bool { + return v.isSet +} + +// Unset removes the value. +func (v *NullableServiceusagemetric) Unset() { + v.value = nil + v.isSet = false +} + +// NewNullableServiceusagemetric returns a pointer to a new instance of NullableServiceusagemetric. +func NewNullableServiceusagemetric(val *Serviceusagemetric) *NullableServiceusagemetric { + return &NullableServiceusagemetric{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 NullableServiceusagemetric) 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 *NullableServiceusagemetric) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/fastly/model_serviceusagemetrics.go b/fastly/model_serviceusagemetrics.go new file mode 100644 index 00000000..5af3a2bf --- /dev/null +++ b/fastly/model_serviceusagemetrics.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://www.fastly.com/documentation/reference/api/) + +API version: 1.0.0 +Contact: oss@fastly.com +*/ + +// This code is auto-generated; DO NOT EDIT. + + +import ( + "encoding/json" +) + +// Serviceusagemetrics struct for Serviceusagemetrics +type Serviceusagemetrics struct { + Data *ServiceusagemetricsData `json:"data,omitempty"` + AdditionalProperties map[string]any +} + +type _Serviceusagemetrics Serviceusagemetrics + +// NewServiceusagemetrics instantiates a new Serviceusagemetrics object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewServiceusagemetrics() *Serviceusagemetrics { + this := Serviceusagemetrics{} + return &this +} + +// NewServiceusagemetricsWithDefaults instantiates a new Serviceusagemetrics object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewServiceusagemetricsWithDefaults() *Serviceusagemetrics { + this := Serviceusagemetrics{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *Serviceusagemetrics) GetData() ServiceusagemetricsData { + if o == nil || o.Data == nil { + var ret ServiceusagemetricsData + 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 *Serviceusagemetrics) GetDataOk() (*ServiceusagemetricsData, 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 *Serviceusagemetrics) HasData() bool { + if o != nil && o.Data != nil { + return true + } + + return false +} + +// SetData gets a reference to the given ServiceusagemetricsData and assigns it to the Data field. +func (o *Serviceusagemetrics) SetData(v ServiceusagemetricsData) { + 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 Serviceusagemetrics) 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 *Serviceusagemetrics) UnmarshalJSON(bytes []byte) (err error) { + varServiceusagemetrics := _Serviceusagemetrics{} + + if err = json.Unmarshal(bytes, &varServiceusagemetrics); err == nil { + *o = Serviceusagemetrics(varServiceusagemetrics) + } + + additionalProperties := make(map[string]any) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "data") + o.AdditionalProperties = additionalProperties + } + + return err +} + +// NullableServiceusagemetrics is a helper abstraction for handling nullable serviceusagemetrics types. +type NullableServiceusagemetrics struct { + value *Serviceusagemetrics + isSet bool +} + +// Get returns the value. +func (v NullableServiceusagemetrics) Get() *Serviceusagemetrics { + return v.value +} + +// Set modifies the value. +func (v *NullableServiceusagemetrics) Set(val *Serviceusagemetrics) { + v.value = val + v.isSet = true +} + +// IsSet indicates if the value was set. +func (v NullableServiceusagemetrics) IsSet() bool { + return v.isSet +} + +// Unset removes the value. +func (v *NullableServiceusagemetrics) Unset() { + v.value = nil + v.isSet = false +} + +// NewNullableServiceusagemetrics returns a pointer to a new instance of NullableServiceusagemetrics. +func NewNullableServiceusagemetrics(val *Serviceusagemetrics) *NullableServiceusagemetrics { + return &NullableServiceusagemetrics{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 NullableServiceusagemetrics) 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 *NullableServiceusagemetrics) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/fastly/model_serviceusagemetrics_data.go b/fastly/model_serviceusagemetrics_data.go new file mode 100644 index 00000000..d5843212 --- /dev/null +++ b/fastly/model_serviceusagemetrics_data.go @@ -0,0 +1,382 @@ +// 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://www.fastly.com/documentation/reference/api/) + +API version: 1.0.0 +Contact: oss@fastly.com +*/ + +// This code is auto-generated; DO NOT EDIT. + + +import ( + "encoding/json" + "time" +) + +// ServiceusagemetricsData struct for ServiceusagemetricsData +type ServiceusagemetricsData struct { + CustomerID *string `json:"customer_id,omitempty"` + // Date and time (in ISO 8601 format) for initiation point of a billing cycle, signifying the start of charges for a service or subscription. + StartTime *time.Time `json:"start_time,omitempty"` + // Date and time (in ISO 8601 format) for termination point of a billing cycle, signifying the end of charges for a service or subscription. + EndTime *time.Time `json:"end_time,omitempty"` + // The usage type identifier for the usage. This is a single, billable metric for the product. + UsageType *string `json:"usage_type,omitempty"` + // The unit for the usage as shown on an invoice. If there is no explicit unit, this field will be \"unit\" (e.g., a request with `product_id` of 'cdn_usage' and `usage_type` of 'North America Requests' has no unit, and will return \"unit\"). + Unit *string `json:"unit,omitempty"` + Details []Serviceusagemetric `json:"details,omitempty"` + Meta *Metadata `json:"meta,omitempty"` + AdditionalProperties map[string]any +} + +type _ServiceusagemetricsData ServiceusagemetricsData + +// NewServiceusagemetricsData instantiates a new ServiceusagemetricsData object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewServiceusagemetricsData() *ServiceusagemetricsData { + this := ServiceusagemetricsData{} + return &this +} + +// NewServiceusagemetricsDataWithDefaults instantiates a new ServiceusagemetricsData object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewServiceusagemetricsDataWithDefaults() *ServiceusagemetricsData { + this := ServiceusagemetricsData{} + return &this +} + +// GetCustomerID returns the CustomerID field value if set, zero value otherwise. +func (o *ServiceusagemetricsData) GetCustomerID() string { + if o == nil || o.CustomerID == nil { + var ret string + return ret + } + return *o.CustomerID +} + +// GetCustomerIDOk returns a tuple with the CustomerID field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ServiceusagemetricsData) GetCustomerIDOk() (*string, bool) { + if o == nil || o.CustomerID == nil { + return nil, false + } + return o.CustomerID, true +} + +// HasCustomerID returns a boolean if a field has been set. +func (o *ServiceusagemetricsData) HasCustomerID() bool { + if o != nil && o.CustomerID != nil { + return true + } + + return false +} + +// SetCustomerID gets a reference to the given string and assigns it to the CustomerID field. +func (o *ServiceusagemetricsData) SetCustomerID(v string) { + o.CustomerID = &v +} + +// GetStartTime returns the StartTime field value if set, zero value otherwise. +func (o *ServiceusagemetricsData) GetStartTime() time.Time { + if o == nil || o.StartTime == nil { + var ret time.Time + return ret + } + return *o.StartTime +} + +// GetStartTimeOk returns a tuple with the StartTime field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ServiceusagemetricsData) GetStartTimeOk() (*time.Time, bool) { + if o == nil || o.StartTime == nil { + return nil, false + } + return o.StartTime, true +} + +// HasStartTime returns a boolean if a field has been set. +func (o *ServiceusagemetricsData) HasStartTime() bool { + if o != nil && o.StartTime != nil { + return true + } + + return false +} + +// SetStartTime gets a reference to the given time.Time and assigns it to the StartTime field. +func (o *ServiceusagemetricsData) SetStartTime(v time.Time) { + o.StartTime = &v +} + +// GetEndTime returns the EndTime field value if set, zero value otherwise. +func (o *ServiceusagemetricsData) GetEndTime() time.Time { + if o == nil || o.EndTime == nil { + var ret time.Time + return ret + } + return *o.EndTime +} + +// GetEndTimeOk returns a tuple with the EndTime field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ServiceusagemetricsData) GetEndTimeOk() (*time.Time, bool) { + if o == nil || o.EndTime == nil { + return nil, false + } + return o.EndTime, true +} + +// HasEndTime returns a boolean if a field has been set. +func (o *ServiceusagemetricsData) HasEndTime() bool { + if o != nil && o.EndTime != nil { + return true + } + + return false +} + +// SetEndTime gets a reference to the given time.Time and assigns it to the EndTime field. +func (o *ServiceusagemetricsData) SetEndTime(v time.Time) { + o.EndTime = &v +} + +// GetUsageType returns the UsageType field value if set, zero value otherwise. +func (o *ServiceusagemetricsData) GetUsageType() string { + if o == nil || o.UsageType == nil { + var ret string + return ret + } + return *o.UsageType +} + +// GetUsageTypeOk returns a tuple with the UsageType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ServiceusagemetricsData) GetUsageTypeOk() (*string, bool) { + if o == nil || o.UsageType == nil { + return nil, false + } + return o.UsageType, true +} + +// HasUsageType returns a boolean if a field has been set. +func (o *ServiceusagemetricsData) HasUsageType() bool { + if o != nil && o.UsageType != nil { + return true + } + + return false +} + +// SetUsageType gets a reference to the given string and assigns it to the UsageType field. +func (o *ServiceusagemetricsData) SetUsageType(v string) { + o.UsageType = &v +} + +// GetUnit returns the Unit field value if set, zero value otherwise. +func (o *ServiceusagemetricsData) GetUnit() string { + if o == nil || o.Unit == nil { + var ret string + return ret + } + return *o.Unit +} + +// GetUnitOk returns a tuple with the Unit field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ServiceusagemetricsData) GetUnitOk() (*string, bool) { + if o == nil || o.Unit == nil { + return nil, false + } + return o.Unit, true +} + +// HasUnit returns a boolean if a field has been set. +func (o *ServiceusagemetricsData) HasUnit() bool { + if o != nil && o.Unit != nil { + return true + } + + return false +} + +// SetUnit gets a reference to the given string and assigns it to the Unit field. +func (o *ServiceusagemetricsData) SetUnit(v string) { + o.Unit = &v +} + +// GetDetails returns the Details field value if set, zero value otherwise. +func (o *ServiceusagemetricsData) GetDetails() []Serviceusagemetric { + if o == nil || o.Details == nil { + var ret []Serviceusagemetric + return ret + } + return o.Details +} + +// GetDetailsOk returns a tuple with the Details field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ServiceusagemetricsData) GetDetailsOk() ([]Serviceusagemetric, bool) { + if o == nil || o.Details == nil { + return nil, false + } + return o.Details, true +} + +// HasDetails returns a boolean if a field has been set. +func (o *ServiceusagemetricsData) HasDetails() bool { + if o != nil && o.Details != nil { + return true + } + + return false +} + +// SetDetails gets a reference to the given []Serviceusagemetric and assigns it to the Details field. +func (o *ServiceusagemetricsData) SetDetails(v []Serviceusagemetric) { + o.Details = v +} + +// GetMeta returns the Meta field value if set, zero value otherwise. +func (o *ServiceusagemetricsData) GetMeta() Metadata { + if o == nil || o.Meta == nil { + var ret Metadata + 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 *ServiceusagemetricsData) GetMetaOk() (*Metadata, 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 *ServiceusagemetricsData) HasMeta() bool { + if o != nil && o.Meta != nil { + return true + } + + return false +} + +// SetMeta gets a reference to the given Metadata and assigns it to the Meta field. +func (o *ServiceusagemetricsData) SetMeta(v Metadata) { + o.Meta = &v +} + +// MarshalJSON implements the json.Marshaler interface. +// Marshaler is the interface implemented by types that can marshal themselves into valid JSON. +func (o ServiceusagemetricsData) MarshalJSON() ([]byte, error) { + toSerialize := map[string]any{} + if o.CustomerID != nil { + toSerialize["customer_id"] = o.CustomerID + } + if o.StartTime != nil { + toSerialize["start_time"] = o.StartTime + } + if o.EndTime != nil { + toSerialize["end_time"] = o.EndTime + } + if o.UsageType != nil { + toSerialize["usage_type"] = o.UsageType + } + if o.Unit != nil { + toSerialize["unit"] = o.Unit + } + if o.Details != nil { + toSerialize["details"] = o.Details + } + if o.Meta != nil { + toSerialize["meta"] = o.Meta + } + + 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 *ServiceusagemetricsData) UnmarshalJSON(bytes []byte) (err error) { + varServiceusagemetricsData := _ServiceusagemetricsData{} + + if err = json.Unmarshal(bytes, &varServiceusagemetricsData); err == nil { + *o = ServiceusagemetricsData(varServiceusagemetricsData) + } + + additionalProperties := make(map[string]any) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "customer_id") + delete(additionalProperties, "start_time") + delete(additionalProperties, "end_time") + delete(additionalProperties, "usage_type") + delete(additionalProperties, "unit") + delete(additionalProperties, "details") + delete(additionalProperties, "meta") + o.AdditionalProperties = additionalProperties + } + + return err +} + +// NullableServiceusagemetricsData is a helper abstraction for handling nullable serviceusagemetricsdata types. +type NullableServiceusagemetricsData struct { + value *ServiceusagemetricsData + isSet bool +} + +// Get returns the value. +func (v NullableServiceusagemetricsData) Get() *ServiceusagemetricsData { + return v.value +} + +// Set modifies the value. +func (v *NullableServiceusagemetricsData) Set(val *ServiceusagemetricsData) { + v.value = val + v.isSet = true +} + +// IsSet indicates if the value was set. +func (v NullableServiceusagemetricsData) IsSet() bool { + return v.isSet +} + +// Unset removes the value. +func (v *NullableServiceusagemetricsData) Unset() { + v.value = nil + v.isSet = false +} + +// NewNullableServiceusagemetricsData returns a pointer to a new instance of NullableServiceusagemetricsData. +func NewNullableServiceusagemetricsData(val *ServiceusagemetricsData) *NullableServiceusagemetricsData { + return &NullableServiceusagemetricsData{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 NullableServiceusagemetricsData) 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 *NullableServiceusagemetricsData) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/fastly/model_serviceusagetype.go b/fastly/model_serviceusagetype.go new file mode 100644 index 00000000..bcfbb7d7 --- /dev/null +++ b/fastly/model_serviceusagetype.go @@ -0,0 +1,194 @@ +// 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://www.fastly.com/documentation/reference/api/) + +API version: 1.0.0 +Contact: oss@fastly.com +*/ + +// This code is auto-generated; DO NOT EDIT. + + +import ( + "encoding/json" +) + +// Serviceusagetype struct for Serviceusagetype +type Serviceusagetype struct { + // The product identifier associated with the usage type. This corresponds to a Fastly product offering. + ProductID *string `json:"product_id,omitempty"` + // Full name of the product usage type as it might appear on a customer's invoice. + Name *string `json:"name,omitempty"` + AdditionalProperties map[string]any +} + +type _Serviceusagetype Serviceusagetype + +// NewServiceusagetype instantiates a new Serviceusagetype object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewServiceusagetype() *Serviceusagetype { + this := Serviceusagetype{} + return &this +} + +// NewServiceusagetypeWithDefaults instantiates a new Serviceusagetype object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewServiceusagetypeWithDefaults() *Serviceusagetype { + this := Serviceusagetype{} + return &this +} + +// GetProductID returns the ProductID field value if set, zero value otherwise. +func (o *Serviceusagetype) GetProductID() string { + if o == nil || o.ProductID == nil { + var ret string + return ret + } + return *o.ProductID +} + +// GetProductIDOk returns a tuple with the ProductID field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Serviceusagetype) GetProductIDOk() (*string, bool) { + if o == nil || o.ProductID == nil { + return nil, false + } + return o.ProductID, true +} + +// HasProductID returns a boolean if a field has been set. +func (o *Serviceusagetype) HasProductID() bool { + if o != nil && o.ProductID != nil { + return true + } + + return false +} + +// SetProductID gets a reference to the given string and assigns it to the ProductID field. +func (o *Serviceusagetype) SetProductID(v string) { + o.ProductID = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *Serviceusagetype) 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 *Serviceusagetype) 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 *Serviceusagetype) 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 *Serviceusagetype) SetName(v string) { + o.Name = &v +} + +// MarshalJSON implements the json.Marshaler interface. +// Marshaler is the interface implemented by types that can marshal themselves into valid JSON. +func (o Serviceusagetype) MarshalJSON() ([]byte, error) { + toSerialize := map[string]any{} + if o.ProductID != nil { + toSerialize["product_id"] = o.ProductID + } + if o.Name != nil { + toSerialize["name"] = o.Name + } + + 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 *Serviceusagetype) UnmarshalJSON(bytes []byte) (err error) { + varServiceusagetype := _Serviceusagetype{} + + if err = json.Unmarshal(bytes, &varServiceusagetype); err == nil { + *o = Serviceusagetype(varServiceusagetype) + } + + additionalProperties := make(map[string]any) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "product_id") + delete(additionalProperties, "name") + o.AdditionalProperties = additionalProperties + } + + return err +} + +// NullableServiceusagetype is a helper abstraction for handling nullable serviceusagetype types. +type NullableServiceusagetype struct { + value *Serviceusagetype + isSet bool +} + +// Get returns the value. +func (v NullableServiceusagetype) Get() *Serviceusagetype { + return v.value +} + +// Set modifies the value. +func (v *NullableServiceusagetype) Set(val *Serviceusagetype) { + v.value = val + v.isSet = true +} + +// IsSet indicates if the value was set. +func (v NullableServiceusagetype) IsSet() bool { + return v.isSet +} + +// Unset removes the value. +func (v *NullableServiceusagetype) Unset() { + v.value = nil + v.isSet = false +} + +// NewNullableServiceusagetype returns a pointer to a new instance of NullableServiceusagetype. +func NewNullableServiceusagetype(val *Serviceusagetype) *NullableServiceusagetype { + return &NullableServiceusagetype{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 NullableServiceusagetype) 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 *NullableServiceusagetype) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/fastly/model_serviceusagetypes.go b/fastly/model_serviceusagetypes.go new file mode 100644 index 00000000..e1d80e50 --- /dev/null +++ b/fastly/model_serviceusagetypes.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://www.fastly.com/documentation/reference/api/) + +API version: 1.0.0 +Contact: oss@fastly.com +*/ + +// This code is auto-generated; DO NOT EDIT. + + +import ( + "encoding/json" +) + +// Serviceusagetypes struct for Serviceusagetypes +type Serviceusagetypes struct { + Data []Serviceusagetype `json:"data,omitempty"` + AdditionalProperties map[string]any +} + +type _Serviceusagetypes Serviceusagetypes + +// NewServiceusagetypes instantiates a new Serviceusagetypes object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewServiceusagetypes() *Serviceusagetypes { + this := Serviceusagetypes{} + return &this +} + +// NewServiceusagetypesWithDefaults instantiates a new Serviceusagetypes object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewServiceusagetypesWithDefaults() *Serviceusagetypes { + this := Serviceusagetypes{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *Serviceusagetypes) GetData() []Serviceusagetype { + if o == nil || o.Data == nil { + var ret []Serviceusagetype + 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 *Serviceusagetypes) GetDataOk() ([]Serviceusagetype, 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 *Serviceusagetypes) HasData() bool { + if o != nil && o.Data != nil { + return true + } + + return false +} + +// SetData gets a reference to the given []Serviceusagetype and assigns it to the Data field. +func (o *Serviceusagetypes) SetData(v []Serviceusagetype) { + 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 Serviceusagetypes) 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 *Serviceusagetypes) UnmarshalJSON(bytes []byte) (err error) { + varServiceusagetypes := _Serviceusagetypes{} + + if err = json.Unmarshal(bytes, &varServiceusagetypes); err == nil { + *o = Serviceusagetypes(varServiceusagetypes) + } + + additionalProperties := make(map[string]any) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "data") + o.AdditionalProperties = additionalProperties + } + + return err +} + +// NullableServiceusagetypes is a helper abstraction for handling nullable serviceusagetypes types. +type NullableServiceusagetypes struct { + value *Serviceusagetypes + isSet bool +} + +// Get returns the value. +func (v NullableServiceusagetypes) Get() *Serviceusagetypes { + return v.value +} + +// Set modifies the value. +func (v *NullableServiceusagetypes) Set(val *Serviceusagetypes) { + v.value = val + v.isSet = true +} + +// IsSet indicates if the value was set. +func (v NullableServiceusagetypes) IsSet() bool { + return v.isSet +} + +// Unset removes the value. +func (v *NullableServiceusagetypes) Unset() { + v.value = nil + v.isSet = false +} + +// NewNullableServiceusagetypes returns a pointer to a new instance of NullableServiceusagetypes. +func NewNullableServiceusagetypes(val *Serviceusagetypes) *NullableServiceusagetypes { + return &NullableServiceusagetypes{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 NullableServiceusagetypes) 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 *NullableServiceusagetypes) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/fastly/model_tls_certificate_blob_response.go b/fastly/model_tls_certificate_blob_response.go new file mode 100644 index 00000000..095ef036 --- /dev/null +++ b/fastly/model_tls_certificate_blob_response.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://www.fastly.com/documentation/reference/api/) + +API version: 1.0.0 +Contact: oss@fastly.com +*/ + +// This code is auto-generated; DO NOT EDIT. + + +import ( + "encoding/json" +) + +// TLSCertificateBlobResponse struct for TLSCertificateBlobResponse +type TLSCertificateBlobResponse struct { + // A certificate blob + CertBlob *string `json:"cert_blob,omitempty"` + AdditionalProperties map[string]any +} + +type _TLSCertificateBlobResponse TLSCertificateBlobResponse + +// NewTLSCertificateBlobResponse instantiates a new TLSCertificateBlobResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTLSCertificateBlobResponse() *TLSCertificateBlobResponse { + this := TLSCertificateBlobResponse{} + return &this +} + +// NewTLSCertificateBlobResponseWithDefaults instantiates a new TLSCertificateBlobResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTLSCertificateBlobResponseWithDefaults() *TLSCertificateBlobResponse { + this := TLSCertificateBlobResponse{} + return &this +} + +// GetCertBlob returns the CertBlob field value if set, zero value otherwise. +func (o *TLSCertificateBlobResponse) GetCertBlob() string { + if o == nil || o.CertBlob == nil { + var ret string + return ret + } + return *o.CertBlob +} + +// GetCertBlobOk returns a tuple with the CertBlob field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TLSCertificateBlobResponse) GetCertBlobOk() (*string, bool) { + if o == nil || o.CertBlob == nil { + return nil, false + } + return o.CertBlob, true +} + +// HasCertBlob returns a boolean if a field has been set. +func (o *TLSCertificateBlobResponse) HasCertBlob() bool { + if o != nil && o.CertBlob != nil { + return true + } + + return false +} + +// SetCertBlob gets a reference to the given string and assigns it to the CertBlob field. +func (o *TLSCertificateBlobResponse) SetCertBlob(v string) { + o.CertBlob = &v +} + +// MarshalJSON implements the json.Marshaler interface. +// Marshaler is the interface implemented by types that can marshal themselves into valid JSON. +func (o TLSCertificateBlobResponse) MarshalJSON() ([]byte, error) { + toSerialize := map[string]any{} + if o.CertBlob != nil { + toSerialize["cert_blob"] = o.CertBlob + } + + 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 *TLSCertificateBlobResponse) UnmarshalJSON(bytes []byte) (err error) { + varTLSCertificateBlobResponse := _TLSCertificateBlobResponse{} + + if err = json.Unmarshal(bytes, &varTLSCertificateBlobResponse); err == nil { + *o = TLSCertificateBlobResponse(varTLSCertificateBlobResponse) + } + + additionalProperties := make(map[string]any) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "cert_blob") + o.AdditionalProperties = additionalProperties + } + + return err +} + +// NullableTLSCertificateBlobResponse is a helper abstraction for handling nullable tlscertificateblobresponse types. +type NullableTLSCertificateBlobResponse struct { + value *TLSCertificateBlobResponse + isSet bool +} + +// Get returns the value. +func (v NullableTLSCertificateBlobResponse) Get() *TLSCertificateBlobResponse { + return v.value +} + +// Set modifies the value. +func (v *NullableTLSCertificateBlobResponse) Set(val *TLSCertificateBlobResponse) { + v.value = val + v.isSet = true +} + +// IsSet indicates if the value was set. +func (v NullableTLSCertificateBlobResponse) IsSet() bool { + return v.isSet +} + +// Unset removes the value. +func (v *NullableTLSCertificateBlobResponse) Unset() { + v.value = nil + v.isSet = false +} + +// NewNullableTLSCertificateBlobResponse returns a pointer to a new instance of NullableTLSCertificateBlobResponse. +func NewNullableTLSCertificateBlobResponse(val *TLSCertificateBlobResponse) *NullableTLSCertificateBlobResponse { + return &NullableTLSCertificateBlobResponse{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 NullableTLSCertificateBlobResponse) 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 *NullableTLSCertificateBlobResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/fastly/model_tls_dns_record.go b/fastly/model_tls_dns_record.go index 8e77b9c3..bf545c6c 100644 --- a/fastly/model_tls_dns_record.go +++ b/fastly/model_tls_dns_record.go @@ -19,9 +19,7 @@ import ( // TLSDNSRecord struct for TLSDNSRecord type TLSDNSRecord struct { - // The IP address or hostname of the DNS record. - ID *string `json:"id,omitempty"` - // Specifies the regions that will be used to route traffic. Select DNS Records with a `global` region to route traffic to the most performant point of presence (POP) worldwide (global pricing will apply). Select DNS records with a `us-eu` region to exclusively land traffic on North American and European POPs. + // Specifies the regions that will be used to route traffic. Select DNS records with a `global` region to route traffic to the most performant point of presence (POP) worldwide (global pricing will apply). Select DNS records with a `na/eu` region to exclusively land traffic on North American and European POPs. Region *string `json:"region,omitempty"` // The type of the DNS record. `A` specifies an IPv4 address to be used for an A record to be used for apex domains (e.g., `example.com`). `AAAA` specifies an IPv6 address for use in an A record for apex domains. `CNAME` specifies the hostname to be used for a CNAME record for subdomains or wildcard domains (e.g., `www.example.com` or `*.example.com`). RecordType *string `json:"record_type,omitempty"` @@ -47,38 +45,6 @@ func NewTLSDNSRecordWithDefaults() *TLSDNSRecord { return &this } -// GetID returns the ID field value if set, zero value otherwise. -func (o *TLSDNSRecord) 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 *TLSDNSRecord) 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 *TLSDNSRecord) 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 *TLSDNSRecord) SetID(v string) { - o.ID = &v -} - // GetRegion returns the Region field value if set, zero value otherwise. func (o *TLSDNSRecord) GetRegion() string { if o == nil || o.Region == nil { @@ -147,9 +113,6 @@ func (o *TLSDNSRecord) SetRecordType(v string) { // Marshaler is the interface implemented by types that can marshal themselves into valid JSON. func (o TLSDNSRecord) MarshalJSON() ([]byte, error) { toSerialize := map[string]any{} - if o.ID != nil { - toSerialize["id"] = o.ID - } if o.Region != nil { toSerialize["region"] = o.Region } @@ -176,7 +139,6 @@ func (o *TLSDNSRecord) UnmarshalJSON(bytes []byte) (err error) { additionalProperties := make(map[string]any) if err = json.Unmarshal(bytes, &additionalProperties); err == nil { - delete(additionalProperties, "id") delete(additionalProperties, "region") delete(additionalProperties, "record_type") o.AdditionalProperties = additionalProperties diff --git a/fastly/model_update_dashboard_request.go b/fastly/model_update_dashboard_request.go new file mode 100644 index 00000000..5792406b --- /dev/null +++ b/fastly/model_update_dashboard_request.go @@ -0,0 +1,233 @@ +// 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://www.fastly.com/documentation/reference/api/) + +API version: 1.0.0 +Contact: oss@fastly.com +*/ + +// This code is auto-generated; DO NOT EDIT. + + +import ( + "encoding/json" +) + +// UpdateDashboardRequest struct for UpdateDashboardRequest +type UpdateDashboardRequest struct { + // A human-readable name + Name *string `json:"name,omitempty"` + // A short description of the dashboard + Description *string `json:"description,omitempty"` + // A list of [dashboard items](#dashboard-item). + Items []DashboardItem `json:"items,omitempty"` + AdditionalProperties map[string]any +} + +type _UpdateDashboardRequest UpdateDashboardRequest + +// NewUpdateDashboardRequest instantiates a new UpdateDashboardRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUpdateDashboardRequest() *UpdateDashboardRequest { + this := UpdateDashboardRequest{} + return &this +} + +// NewUpdateDashboardRequestWithDefaults instantiates a new UpdateDashboardRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUpdateDashboardRequestWithDefaults() *UpdateDashboardRequest { + this := UpdateDashboardRequest{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *UpdateDashboardRequest) 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 *UpdateDashboardRequest) 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 *UpdateDashboardRequest) 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 *UpdateDashboardRequest) SetName(v string) { + o.Name = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *UpdateDashboardRequest) GetDescription() string { + if o == nil || o.Description == nil { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateDashboardRequest) GetDescriptionOk() (*string, bool) { + if o == nil || o.Description == nil { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *UpdateDashboardRequest) HasDescription() bool { + if o != nil && o.Description != nil { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *UpdateDashboardRequest) SetDescription(v string) { + o.Description = &v +} + +// GetItems returns the Items field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *UpdateDashboardRequest) GetItems() []DashboardItem { + if o == nil { + var ret []DashboardItem + return ret + } + return o.Items +} + +// GetItemsOk returns a tuple with the Items 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 *UpdateDashboardRequest) GetItemsOk() ([]DashboardItem, bool) { + if o == nil || o.Items == nil { + return nil, false + } + return o.Items, true +} + +// HasItems returns a boolean if a field has been set. +func (o *UpdateDashboardRequest) HasItems() bool { + if o != nil && o.Items != nil { + return true + } + + return false +} + +// SetItems gets a reference to the given []DashboardItem and assigns it to the Items field. +func (o *UpdateDashboardRequest) SetItems(v []DashboardItem) { + o.Items = v +} + +// MarshalJSON implements the json.Marshaler interface. +// Marshaler is the interface implemented by types that can marshal themselves into valid JSON. +func (o UpdateDashboardRequest) MarshalJSON() ([]byte, error) { + toSerialize := map[string]any{} + if o.Name != nil { + toSerialize["name"] = o.Name + } + if o.Description != nil { + toSerialize["description"] = o.Description + } + if o.Items != nil { + toSerialize["items"] = o.Items + } + + 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 *UpdateDashboardRequest) UnmarshalJSON(bytes []byte) (err error) { + varUpdateDashboardRequest := _UpdateDashboardRequest{} + + if err = json.Unmarshal(bytes, &varUpdateDashboardRequest); err == nil { + *o = UpdateDashboardRequest(varUpdateDashboardRequest) + } + + additionalProperties := make(map[string]any) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "name") + delete(additionalProperties, "description") + delete(additionalProperties, "items") + o.AdditionalProperties = additionalProperties + } + + return err +} + +// NullableUpdateDashboardRequest is a helper abstraction for handling nullable updatedashboardrequest types. +type NullableUpdateDashboardRequest struct { + value *UpdateDashboardRequest + isSet bool +} + +// Get returns the value. +func (v NullableUpdateDashboardRequest) Get() *UpdateDashboardRequest { + return v.value +} + +// Set modifies the value. +func (v *NullableUpdateDashboardRequest) Set(val *UpdateDashboardRequest) { + v.value = val + v.isSet = true +} + +// IsSet indicates if the value was set. +func (v NullableUpdateDashboardRequest) IsSet() bool { + return v.isSet +} + +// Unset removes the value. +func (v *NullableUpdateDashboardRequest) Unset() { + v.value = nil + v.isSet = false +} + +// NewNullableUpdateDashboardRequest returns a pointer to a new instance of NullableUpdateDashboardRequest. +func NewNullableUpdateDashboardRequest(val *UpdateDashboardRequest) *NullableUpdateDashboardRequest { + return &NullableUpdateDashboardRequest{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 NullableUpdateDashboardRequest) 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 *NullableUpdateDashboardRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/fastly/model_values.go b/fastly/model_values.go index 92ef90bf..0bd5c585 100644 --- a/fastly/model_values.go +++ b/fastly/model_values.go @@ -95,7 +95,7 @@ type Values struct { Bandwidth *int32 `json:"bandwidth,omitempty"` // Ratio of cache hits to cache misses at the edge, between 0 and 1 (`edge_hit_requests` / (`edge_hit_requests` + `edge_miss_requests`)). EdgeHitRatio *float32 `json:"edge_hit_ratio,omitempty"` - // Ratio of response bytes delivered from the edge compared to what is delivered from origin, between 0 and 1. (`edge_resp_body_bytes` + `edge_resp_header_bytes`) / (`origin_fetch_resp_body_bytes` + `origin_fetch_resp_header_bytes` + `edge_resp_body_bytes` + `edge_resp_header_bytes`). + // Origin Offload measures the ratio of bytes served to end users that were cached by Fastly, over the bytes served to end users, between 0 and 1. ((`edge_resp_body_bytes` + `edge_resp_header_bytes`) - (`origin_fetch_resp_body_bytes` + `origin_fetch_resp_header_bytes`)) / (`edge_resp_body_bytes` + `edge_resp_header_bytes`). Previously, Origin Offload used a different formula. [Learn more](https://www.fastly.com/documentation/reference/changes/2024/06/add-origin_offload-metric). OriginOffload *float32 `json:"origin_offload,omitempty"` // Number of responses received from origin with status code 200 (Success). OriginStatus200 *int32 `json:"origin_status_200,omitempty"` diff --git a/sig.json b/sig.json index 66147743..713aa7d4 100644 --- a/sig.json +++ b/sig.json @@ -1 +1 @@ -{"G": "5a2ccc65", "D": "f9e684d4"} +{"G": "01161630", "D": "e05af2db"}