From 3609f34cd2254fce04015bc75704036502f2d4de Mon Sep 17 00:00:00 2001 From: github-actions Date: Wed, 21 Jun 2023 10:14:59 +0000 Subject: [PATCH] Generated v1.0.0-beta.12 --- CHANGELOG.md | 7 + README.md | 2 +- ...nshipTlsConfigurationForTlsSubscription.md | 54 ++++++ docs/RelationshipsForTlsActivation.md | 52 ++++++ docs/RelationshipsForTlsSubscription.md | 78 ++++++--- fastly/configuration.go | 2 +- fastly/model_relationship_common_name.go | 2 +- ...odel_relationship_mutual_authentication.go | 2 +- fastly/model_relationship_tls_certificate.go | 2 +- .../model_relationship_tls_configuration.go | 2 +- ..._tls_configuration_for_tls_subscription.go | 155 ++++++++++++++++++ fastly/model_relationship_tls_domain.go | 2 +- .../model_relationships_for_tls_activation.go | 74 +++++++++ ...odel_relationships_for_tls_subscription.go | 20 +-- sig.json | 2 +- 15 files changed, 412 insertions(+), 44 deletions(-) create mode 100644 docs/RelationshipTlsConfigurationForTlsSubscription.md create mode 100644 fastly/model_relationship_tls_configuration_for_tls_subscription.go diff --git a/CHANGELOG.md b/CHANGELOG.md index fefe82c6..3f2a4043 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [v1.0.0-beta.12](https://github.com/fastly/fastly-go/releases/tag/v1.0.0-beta.12) (2023-06-21) + +**Bug fixes:** + +- fix(tls_activation): add tls_configuration and tls_domains. +- fix(tls_subscription): add tls_configuration and common name. + ## [v1.0.0-beta.11](https://github.com/fastly/fastly-go/releases/tag/v1.0.0-beta.11) (2023-06-20) **Enhancements:** diff --git a/README.md b/README.md index 7c2e5fc8..30834409 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ Add the following to your project's `go.mod`: ```go.mod require ( - github.com/fastly/fastly-go v1.0.0-beta.11 + github.com/fastly/fastly-go v1.0.0-beta.12 ) ``` diff --git a/docs/RelationshipTlsConfigurationForTlsSubscription.md b/docs/RelationshipTlsConfigurationForTlsSubscription.md new file mode 100644 index 00000000..a0b76733 --- /dev/null +++ b/docs/RelationshipTlsConfigurationForTlsSubscription.md @@ -0,0 +1,54 @@ +# RelationshipTLSConfigurationForTLSSubscription + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**TLSConfiguration** | Pointer to [**RelationshipTLSConfigurationTLSConfiguration**](RelationshipTLSConfigurationTLSConfiguration.md) | | [optional] + +## Methods + +### NewRelationshipTLSConfigurationForTLSSubscription + +`func NewRelationshipTLSConfigurationForTLSSubscription() *RelationshipTLSConfigurationForTLSSubscription` + +NewRelationshipTLSConfigurationForTLSSubscription instantiates a new RelationshipTLSConfigurationForTLSSubscription object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewRelationshipTLSConfigurationForTLSSubscriptionWithDefaults + +`func NewRelationshipTLSConfigurationForTLSSubscriptionWithDefaults() *RelationshipTLSConfigurationForTLSSubscription` + +NewRelationshipTLSConfigurationForTLSSubscriptionWithDefaults instantiates a new RelationshipTLSConfigurationForTLSSubscription object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetTLSConfiguration + +`func (o *RelationshipTLSConfigurationForTLSSubscription) GetTLSConfiguration() RelationshipTLSConfigurationTLSConfiguration` + +GetTLSConfiguration returns the TLSConfiguration field if non-nil, zero value otherwise. + +### GetTLSConfigurationOk + +`func (o *RelationshipTLSConfigurationForTLSSubscription) GetTLSConfigurationOk() (*RelationshipTLSConfigurationTLSConfiguration, bool)` + +GetTLSConfigurationOk returns a tuple with the TLSConfiguration field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTLSConfiguration + +`func (o *RelationshipTLSConfigurationForTLSSubscription) SetTLSConfiguration(v RelationshipTLSConfigurationTLSConfiguration)` + +SetTLSConfiguration sets TLSConfiguration field to given value. + +### HasTLSConfiguration + +`func (o *RelationshipTLSConfigurationForTLSSubscription) HasTLSConfiguration() bool` + +HasTLSConfiguration 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/RelationshipsForTlsActivation.md b/docs/RelationshipsForTlsActivation.md index a7652bad..189e3794 100644 --- a/docs/RelationshipsForTlsActivation.md +++ b/docs/RelationshipsForTlsActivation.md @@ -5,6 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **TLSCertificate** | Pointer to [**RelationshipTLSCertificateTLSCertificate**](RelationshipTLSCertificateTLSCertificate.md) | | [optional] +**TLSConfiguration** | Pointer to [**RelationshipTLSConfigurationTLSConfiguration**](RelationshipTLSConfigurationTLSConfiguration.md) | | [optional] +**TLSDomain** | Pointer to [**RelationshipTLSDomainTLSDomain**](RelationshipTLSDomainTLSDomain.md) | | [optional] ## Methods @@ -50,5 +52,55 @@ SetTLSCertificate sets TLSCertificate field to given value. HasTLSCertificate returns a boolean if a field has been set. +### GetTLSConfiguration + +`func (o *RelationshipsForTLSActivation) GetTLSConfiguration() RelationshipTLSConfigurationTLSConfiguration` + +GetTLSConfiguration returns the TLSConfiguration field if non-nil, zero value otherwise. + +### GetTLSConfigurationOk + +`func (o *RelationshipsForTLSActivation) GetTLSConfigurationOk() (*RelationshipTLSConfigurationTLSConfiguration, bool)` + +GetTLSConfigurationOk returns a tuple with the TLSConfiguration field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTLSConfiguration + +`func (o *RelationshipsForTLSActivation) SetTLSConfiguration(v RelationshipTLSConfigurationTLSConfiguration)` + +SetTLSConfiguration sets TLSConfiguration field to given value. + +### HasTLSConfiguration + +`func (o *RelationshipsForTLSActivation) HasTLSConfiguration() bool` + +HasTLSConfiguration returns a boolean if a field has been set. + +### GetTLSDomain + +`func (o *RelationshipsForTLSActivation) GetTLSDomain() RelationshipTLSDomainTLSDomain` + +GetTLSDomain returns the TLSDomain field if non-nil, zero value otherwise. + +### GetTLSDomainOk + +`func (o *RelationshipsForTLSActivation) GetTLSDomainOk() (*RelationshipTLSDomainTLSDomain, bool)` + +GetTLSDomainOk returns a tuple with the TLSDomain field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTLSDomain + +`func (o *RelationshipsForTLSActivation) SetTLSDomain(v RelationshipTLSDomainTLSDomain)` + +SetTLSDomain sets TLSDomain field to given value. + +### HasTLSDomain + +`func (o *RelationshipsForTLSActivation) HasTLSDomain() bool` + +HasTLSDomain 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/RelationshipsForTlsSubscription.md b/docs/RelationshipsForTlsSubscription.md index 33002e8f..9e210ca3 100644 --- a/docs/RelationshipsForTlsSubscription.md +++ b/docs/RelationshipsForTlsSubscription.md @@ -4,9 +4,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**TLSConfiguration** | Pointer to [**RelationshipTLSConfigurationTLSConfiguration**](RelationshipTLSConfigurationTLSConfiguration.md) | | [optional] +**CommonName** | Pointer to [**RelationshipMemberTLSDomain**](RelationshipMemberTLSDomain.md) | | [optional] **TLSDomains** | Pointer to [**RelationshipTLSDomainsTLSDomains**](RelationshipTLSDomainsTLSDomains.md) | | [optional] **TLSCertificates** | Pointer to [**RelationshipTLSCertificatesTLSCertificates**](RelationshipTLSCertificatesTLSCertificates.md) | | [optional] -**TLSConfiguration** | Pointer to [**RelationshipTLSConfigurationTLSConfiguration**](RelationshipTLSConfigurationTLSConfiguration.md) | | [optional] ## Methods @@ -27,6 +28,56 @@ NewRelationshipsForTLSSubscriptionWithDefaults instantiates a new RelationshipsF This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set +### GetTLSConfiguration + +`func (o *RelationshipsForTLSSubscription) GetTLSConfiguration() RelationshipTLSConfigurationTLSConfiguration` + +GetTLSConfiguration returns the TLSConfiguration field if non-nil, zero value otherwise. + +### GetTLSConfigurationOk + +`func (o *RelationshipsForTLSSubscription) GetTLSConfigurationOk() (*RelationshipTLSConfigurationTLSConfiguration, bool)` + +GetTLSConfigurationOk returns a tuple with the TLSConfiguration field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTLSConfiguration + +`func (o *RelationshipsForTLSSubscription) SetTLSConfiguration(v RelationshipTLSConfigurationTLSConfiguration)` + +SetTLSConfiguration sets TLSConfiguration field to given value. + +### HasTLSConfiguration + +`func (o *RelationshipsForTLSSubscription) HasTLSConfiguration() bool` + +HasTLSConfiguration returns a boolean if a field has been set. + +### GetCommonName + +`func (o *RelationshipsForTLSSubscription) GetCommonName() RelationshipMemberTLSDomain` + +GetCommonName returns the CommonName field if non-nil, zero value otherwise. + +### GetCommonNameOk + +`func (o *RelationshipsForTLSSubscription) GetCommonNameOk() (*RelationshipMemberTLSDomain, bool)` + +GetCommonNameOk returns a tuple with the CommonName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCommonName + +`func (o *RelationshipsForTLSSubscription) SetCommonName(v RelationshipMemberTLSDomain)` + +SetCommonName sets CommonName field to given value. + +### HasCommonName + +`func (o *RelationshipsForTLSSubscription) HasCommonName() bool` + +HasCommonName returns a boolean if a field has been set. + ### GetTLSDomains `func (o *RelationshipsForTLSSubscription) GetTLSDomains() RelationshipTLSDomainsTLSDomains` @@ -77,30 +128,5 @@ SetTLSCertificates sets TLSCertificates field to given value. HasTLSCertificates returns a boolean if a field has been set. -### GetTLSConfiguration - -`func (o *RelationshipsForTLSSubscription) GetTLSConfiguration() RelationshipTLSConfigurationTLSConfiguration` - -GetTLSConfiguration returns the TLSConfiguration field if non-nil, zero value otherwise. - -### GetTLSConfigurationOk - -`func (o *RelationshipsForTLSSubscription) GetTLSConfigurationOk() (*RelationshipTLSConfigurationTLSConfiguration, bool)` - -GetTLSConfigurationOk returns a tuple with the TLSConfiguration field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetTLSConfiguration - -`func (o *RelationshipsForTLSSubscription) SetTLSConfiguration(v RelationshipTLSConfigurationTLSConfiguration)` - -SetTLSConfiguration sets TLSConfiguration field to given value. - -### HasTLSConfiguration - -`func (o *RelationshipsForTLSSubscription) HasTLSConfiguration() bool` - -HasTLSConfiguration returns a boolean if a field has been set. - [Back to API list](../README.md#documentation-for-api-endpoints) | [Back to README](../README.md) diff --git a/fastly/configuration.go b/fastly/configuration.go index ec1d1eb7..1677081d 100644 --- a/fastly/configuration.go +++ b/fastly/configuration.go @@ -105,7 +105,7 @@ type Configuration struct { func NewConfiguration() *Configuration { cfg := &Configuration{ DefaultHeader: make(map[string]string), - UserAgent: "fastly-go/v1.0.0-beta.11", + UserAgent: "fastly-go/v1.0.0-beta.12", Debug: false, Servers: ServerConfigurations{ { diff --git a/fastly/model_relationship_common_name.go b/fastly/model_relationship_common_name.go index 343b257f..b53a1cb6 100644 --- a/fastly/model_relationship_common_name.go +++ b/fastly/model_relationship_common_name.go @@ -17,7 +17,7 @@ import ( "encoding/json" ) -// RelationshipCommonName struct for RelationshipCommonName +// RelationshipCommonName The common name associated with the subscription generated by Fastly TLS. Optional. If you do not pass a common name on create, we will default to the first TLS domain included. If provided, the domain chosen as the common name must be included in TLS domains. type RelationshipCommonName struct { CommonName *RelationshipMemberTLSDomain `json:"common_name,omitempty"` AdditionalProperties map[string]any diff --git a/fastly/model_relationship_mutual_authentication.go b/fastly/model_relationship_mutual_authentication.go index 11ec287d..0edda796 100644 --- a/fastly/model_relationship_mutual_authentication.go +++ b/fastly/model_relationship_mutual_authentication.go @@ -17,7 +17,7 @@ import ( "encoding/json" ) -// RelationshipMutualAuthentication struct for RelationshipMutualAuthentication +// RelationshipMutualAuthentication The [Mutual Authentication](/reference/api/tls/mutual-tls/authentication/) for client-to-server authentication. Optional. type RelationshipMutualAuthentication struct { MutualAuthentication *RelationshipMutualAuthenticationMutualAuthentication `json:"mutual_authentication,omitempty"` AdditionalProperties map[string]any diff --git a/fastly/model_relationship_tls_certificate.go b/fastly/model_relationship_tls_certificate.go index 47268028..d59c7aa0 100644 --- a/fastly/model_relationship_tls_certificate.go +++ b/fastly/model_relationship_tls_certificate.go @@ -17,7 +17,7 @@ import ( "encoding/json" ) -// RelationshipTLSCertificate struct for RelationshipTLSCertificate +// RelationshipTLSCertificate The [TLS certificate](/reference/api/tls/custom-certs/certificates/) being used to terminate TLS traffic for a domain. Required. type RelationshipTLSCertificate struct { TLSCertificate *RelationshipTLSCertificateTLSCertificate `json:"tls_certificate,omitempty"` AdditionalProperties map[string]any diff --git a/fastly/model_relationship_tls_configuration.go b/fastly/model_relationship_tls_configuration.go index ed746087..9a87a9d1 100644 --- a/fastly/model_relationship_tls_configuration.go +++ b/fastly/model_relationship_tls_configuration.go @@ -17,7 +17,7 @@ import ( "encoding/json" ) -// RelationshipTLSConfiguration struct for RelationshipTLSConfiguration +// RelationshipTLSConfiguration The [TLS configuration](/reference/api/tls/custom-certs/configuration/) being used to terminate TLS traffic. Optional. type RelationshipTLSConfiguration struct { TLSConfiguration *RelationshipTLSConfigurationTLSConfiguration `json:"tls_configuration,omitempty"` AdditionalProperties map[string]any diff --git a/fastly/model_relationship_tls_configuration_for_tls_subscription.go b/fastly/model_relationship_tls_configuration_for_tls_subscription.go new file mode 100644 index 00000000..d0f21ee5 --- /dev/null +++ b/fastly/model_relationship_tls_configuration_for_tls_subscription.go @@ -0,0 +1,155 @@ +// Package fastly is an API client library for interacting with most facets of the Fastly API. +package fastly + +/* +Fastly API + +Via the Fastly API you can perform any of the operations that are possible within the management console, including creating services, domains, and backends, configuring rules or uploading your own application code, as well as account operations such as user administration and billing reports. The API is organized into collections of endpoints that allow manipulation of objects related to Fastly services and accounts. For the most accurate and up-to-date API reference content, visit our [Developer Hub](https://developer.fastly.com/reference/api/) + +API version: 1.0.0 +Contact: oss@fastly.com +*/ + +// This code is auto-generated; DO NOT EDIT. + + +import ( + "encoding/json" +) + +// RelationshipTLSConfigurationForTLSSubscription The unique identifier for the set of TLS configuration options that apply to the enabled domains on this subscription. Write-only on create. +type RelationshipTLSConfigurationForTLSSubscription struct { + TLSConfiguration *RelationshipTLSConfigurationTLSConfiguration `json:"tls_configuration,omitempty"` + AdditionalProperties map[string]any +} + +type _RelationshipTLSConfigurationForTLSSubscription RelationshipTLSConfigurationForTLSSubscription + +// NewRelationshipTLSConfigurationForTLSSubscription instantiates a new RelationshipTLSConfigurationForTLSSubscription object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRelationshipTLSConfigurationForTLSSubscription() *RelationshipTLSConfigurationForTLSSubscription { + this := RelationshipTLSConfigurationForTLSSubscription{} + return &this +} + +// NewRelationshipTLSConfigurationForTLSSubscriptionWithDefaults instantiates a new RelationshipTLSConfigurationForTLSSubscription object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRelationshipTLSConfigurationForTLSSubscriptionWithDefaults() *RelationshipTLSConfigurationForTLSSubscription { + this := RelationshipTLSConfigurationForTLSSubscription{} + return &this +} + +// GetTLSConfiguration returns the TLSConfiguration field value if set, zero value otherwise. +func (o *RelationshipTLSConfigurationForTLSSubscription) GetTLSConfiguration() RelationshipTLSConfigurationTLSConfiguration { + if o == nil || o.TLSConfiguration == nil { + var ret RelationshipTLSConfigurationTLSConfiguration + return ret + } + return *o.TLSConfiguration +} + +// GetTLSConfigurationOk returns a tuple with the TLSConfiguration field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RelationshipTLSConfigurationForTLSSubscription) GetTLSConfigurationOk() (*RelationshipTLSConfigurationTLSConfiguration, bool) { + if o == nil || o.TLSConfiguration == nil { + return nil, false + } + return o.TLSConfiguration, true +} + +// HasTLSConfiguration returns a boolean if a field has been set. +func (o *RelationshipTLSConfigurationForTLSSubscription) HasTLSConfiguration() bool { + if o != nil && o.TLSConfiguration != nil { + return true + } + + return false +} + +// SetTLSConfiguration gets a reference to the given RelationshipTLSConfigurationTLSConfiguration and assigns it to the TLSConfiguration field. +func (o *RelationshipTLSConfigurationForTLSSubscription) SetTLSConfiguration(v RelationshipTLSConfigurationTLSConfiguration) { + o.TLSConfiguration = &v +} + +// MarshalJSON implements the json.Marshaler interface. +// Marshaler is the interface implemented by types that can marshal themselves into valid JSON. +func (o RelationshipTLSConfigurationForTLSSubscription) MarshalJSON() ([]byte, error) { + toSerialize := map[string]any{} + if o.TLSConfiguration != nil { + toSerialize["tls_configuration"] = o.TLSConfiguration + } + + 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 *RelationshipTLSConfigurationForTLSSubscription) UnmarshalJSON(bytes []byte) (err error) { + varRelationshipTLSConfigurationForTLSSubscription := _RelationshipTLSConfigurationForTLSSubscription{} + + if err = json.Unmarshal(bytes, &varRelationshipTLSConfigurationForTLSSubscription); err == nil { + *o = RelationshipTLSConfigurationForTLSSubscription(varRelationshipTLSConfigurationForTLSSubscription) + } + + additionalProperties := make(map[string]any) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "tls_configuration") + o.AdditionalProperties = additionalProperties + } + + return err +} + +// NullableRelationshipTLSConfigurationForTLSSubscription is a helper abstraction for handling nullable relationshiptlsconfigurationfortlssubscription types. +type NullableRelationshipTLSConfigurationForTLSSubscription struct { + value *RelationshipTLSConfigurationForTLSSubscription + isSet bool +} + +// Get returns the value. +func (v NullableRelationshipTLSConfigurationForTLSSubscription) Get() *RelationshipTLSConfigurationForTLSSubscription { + return v.value +} + +// Set modifies the value. +func (v *NullableRelationshipTLSConfigurationForTLSSubscription) Set(val *RelationshipTLSConfigurationForTLSSubscription) { + v.value = val + v.isSet = true +} + +// IsSet indicates if the value was set. +func (v NullableRelationshipTLSConfigurationForTLSSubscription) IsSet() bool { + return v.isSet +} + +// Unset removes the value. +func (v *NullableRelationshipTLSConfigurationForTLSSubscription) Unset() { + v.value = nil + v.isSet = false +} + +// NewNullableRelationshipTLSConfigurationForTLSSubscription returns a pointer to a new instance of NullableRelationshipTLSConfigurationForTLSSubscription. +func NewNullableRelationshipTLSConfigurationForTLSSubscription(val *RelationshipTLSConfigurationForTLSSubscription) *NullableRelationshipTLSConfigurationForTLSSubscription { + return &NullableRelationshipTLSConfigurationForTLSSubscription{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 NullableRelationshipTLSConfigurationForTLSSubscription) 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 *NullableRelationshipTLSConfigurationForTLSSubscription) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/fastly/model_relationship_tls_domain.go b/fastly/model_relationship_tls_domain.go index e1cfc825..bad97f40 100644 --- a/fastly/model_relationship_tls_domain.go +++ b/fastly/model_relationship_tls_domain.go @@ -17,7 +17,7 @@ import ( "encoding/json" ) -// RelationshipTLSDomain struct for RelationshipTLSDomain +// RelationshipTLSDomain The [TLS domain](/reference/api/tls/custom-certs/domains/) being enabled for TLS traffic. Required. type RelationshipTLSDomain struct { TLSDomain *RelationshipTLSDomainTLSDomain `json:"tls_domain,omitempty"` AdditionalProperties map[string]any diff --git a/fastly/model_relationships_for_tls_activation.go b/fastly/model_relationships_for_tls_activation.go index 9edb125c..9518805f 100644 --- a/fastly/model_relationships_for_tls_activation.go +++ b/fastly/model_relationships_for_tls_activation.go @@ -20,6 +20,8 @@ import ( // RelationshipsForTLSActivation struct for RelationshipsForTLSActivation type RelationshipsForTLSActivation struct { TLSCertificate *RelationshipTLSCertificateTLSCertificate `json:"tls_certificate,omitempty"` + TLSConfiguration *RelationshipTLSConfigurationTLSConfiguration `json:"tls_configuration,omitempty"` + TLSDomain *RelationshipTLSDomainTLSDomain `json:"tls_domain,omitempty"` AdditionalProperties map[string]any } @@ -74,6 +76,70 @@ func (o *RelationshipsForTLSActivation) SetTLSCertificate(v RelationshipTLSCerti o.TLSCertificate = &v } +// GetTLSConfiguration returns the TLSConfiguration field value if set, zero value otherwise. +func (o *RelationshipsForTLSActivation) GetTLSConfiguration() RelationshipTLSConfigurationTLSConfiguration { + if o == nil || o.TLSConfiguration == nil { + var ret RelationshipTLSConfigurationTLSConfiguration + return ret + } + return *o.TLSConfiguration +} + +// GetTLSConfigurationOk returns a tuple with the TLSConfiguration field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RelationshipsForTLSActivation) GetTLSConfigurationOk() (*RelationshipTLSConfigurationTLSConfiguration, bool) { + if o == nil || o.TLSConfiguration == nil { + return nil, false + } + return o.TLSConfiguration, true +} + +// HasTLSConfiguration returns a boolean if a field has been set. +func (o *RelationshipsForTLSActivation) HasTLSConfiguration() bool { + if o != nil && o.TLSConfiguration != nil { + return true + } + + return false +} + +// SetTLSConfiguration gets a reference to the given RelationshipTLSConfigurationTLSConfiguration and assigns it to the TLSConfiguration field. +func (o *RelationshipsForTLSActivation) SetTLSConfiguration(v RelationshipTLSConfigurationTLSConfiguration) { + o.TLSConfiguration = &v +} + +// GetTLSDomain returns the TLSDomain field value if set, zero value otherwise. +func (o *RelationshipsForTLSActivation) GetTLSDomain() RelationshipTLSDomainTLSDomain { + if o == nil || o.TLSDomain == nil { + var ret RelationshipTLSDomainTLSDomain + return ret + } + return *o.TLSDomain +} + +// GetTLSDomainOk returns a tuple with the TLSDomain field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RelationshipsForTLSActivation) GetTLSDomainOk() (*RelationshipTLSDomainTLSDomain, bool) { + if o == nil || o.TLSDomain == nil { + return nil, false + } + return o.TLSDomain, true +} + +// HasTLSDomain returns a boolean if a field has been set. +func (o *RelationshipsForTLSActivation) HasTLSDomain() bool { + if o != nil && o.TLSDomain != nil { + return true + } + + return false +} + +// SetTLSDomain gets a reference to the given RelationshipTLSDomainTLSDomain and assigns it to the TLSDomain field. +func (o *RelationshipsForTLSActivation) SetTLSDomain(v RelationshipTLSDomainTLSDomain) { + o.TLSDomain = &v +} + // MarshalJSON implements the json.Marshaler interface. // Marshaler is the interface implemented by types that can marshal themselves into valid JSON. func (o RelationshipsForTLSActivation) MarshalJSON() ([]byte, error) { @@ -81,6 +147,12 @@ func (o RelationshipsForTLSActivation) MarshalJSON() ([]byte, error) { if o.TLSCertificate != nil { toSerialize["tls_certificate"] = o.TLSCertificate } + if o.TLSConfiguration != nil { + toSerialize["tls_configuration"] = o.TLSConfiguration + } + if o.TLSDomain != nil { + toSerialize["tls_domain"] = o.TLSDomain + } for key, value := range o.AdditionalProperties { toSerialize[key] = value @@ -102,6 +174,8 @@ func (o *RelationshipsForTLSActivation) UnmarshalJSON(bytes []byte) (err error) if err = json.Unmarshal(bytes, &additionalProperties); err == nil { delete(additionalProperties, "tls_certificate") + delete(additionalProperties, "tls_configuration") + delete(additionalProperties, "tls_domain") o.AdditionalProperties = additionalProperties } diff --git a/fastly/model_relationships_for_tls_subscription.go b/fastly/model_relationships_for_tls_subscription.go index 19f31965..05a8fb31 100644 --- a/fastly/model_relationships_for_tls_subscription.go +++ b/fastly/model_relationships_for_tls_subscription.go @@ -22,7 +22,7 @@ import ( type RelationshipsForTLSSubscription struct { RelationshipCommonName *RelationshipCommonName RelationshipTLSCertificates *RelationshipTLSCertificates - RelationshipTLSConfiguration *RelationshipTLSConfiguration + RelationshipTLSConfigurationForTLSSubscription *RelationshipTLSConfigurationForTLSSubscription RelationshipTLSDomains *RelationshipTLSDomains } @@ -54,16 +54,16 @@ func (o *RelationshipsForTLSSubscription) UnmarshalJSON(data []byte) error { o.RelationshipTLSCertificates = nil } - // try to unmarshal JSON data into RelationshipTLSConfiguration - err = json.Unmarshal(data, &o.RelationshipTLSConfiguration); + // try to unmarshal JSON data into RelationshipTLSConfigurationForTLSSubscription + err = json.Unmarshal(data, &o.RelationshipTLSConfigurationForTLSSubscription); if err == nil { - jsonRelationshipTLSConfiguration, _ := json.Marshal(o.RelationshipTLSConfiguration) - if string(jsonRelationshipTLSConfiguration) != "{}" { // empty struct - return nil // data stored in o.RelationshipTLSConfiguration, return on the first match + jsonRelationshipTLSConfigurationForTLSSubscription, _ := json.Marshal(o.RelationshipTLSConfigurationForTLSSubscription) + if string(jsonRelationshipTLSConfigurationForTLSSubscription) != "{}" { // empty struct + return nil // data stored in o.RelationshipTLSConfigurationForTLSSubscription, return on the first match } - o.RelationshipTLSConfiguration = nil + o.RelationshipTLSConfigurationForTLSSubscription = nil } else { - o.RelationshipTLSConfiguration = nil + o.RelationshipTLSConfigurationForTLSSubscription = nil } // try to unmarshal JSON data into RelationshipTLSDomains @@ -92,8 +92,8 @@ func (o *RelationshipsForTLSSubscription) MarshalJSON() ([]byte, error) { return json.Marshal(&o.RelationshipTLSCertificates) } - if o.RelationshipTLSConfiguration != nil { - return json.Marshal(&o.RelationshipTLSConfiguration) + if o.RelationshipTLSConfigurationForTLSSubscription != nil { + return json.Marshal(&o.RelationshipTLSConfigurationForTLSSubscription) } if o.RelationshipTLSDomains != nil { diff --git a/sig.json b/sig.json index fbc684b3..68fdbf8e 100644 --- a/sig.json +++ b/sig.json @@ -1 +1 @@ -{"G": "845b9d6b", "D": "303ffd8e"} +{"G": "7a7ec0a2", "D": "a64b7e5f"}