<commit_before>package cloudflare

import (
	"context"
	"encoding/json"
	"fmt"
	"net/http"
)

type TotalTLS struct {
	Enabled              bool   `json:"enabled,omitempty"`
	CertificateAuthority string `json:"certificate_authority,omitempty"`
	ValidityDays         int    `json:"validity_days,omitempty"`
}

type TotalTLSResponse struct {
	Response
	Result TotalTLS `json:"result"`
}

// TotalTLSGet Get Total TLS Settings for a Zone.
//
// API Reference: https://api.cloudflare.com/#total-tls-total-tls-settings-details
func (api *API) TotalTLSGet(ctx context.Context, rc *ResourceContainer) (TotalTLS, error) {
	if rc.Identifier == "" {
		return TotalTLS{}, ErrMissingZoneID
	}
	uri := fmt.Sprintf("/zones/%s/acm/total_tls", rc.Identifier)
	res, err := api.makeRequestContext(ctx, http.MethodGet, uri, nil)
	if err != nil {
		return TotalTLS{}, err
	}

	var r TotalTLSResponse
	err = json.Unmarshal(res, &r)
	if err != nil {
		return TotalTLS{}, err
	}

	return r.Result, nil
}

// TotalTLSSet Set Total TLS Settings or disable the feature for a Zone.
//
// API Reference: https://api.cloudflare.com/#total-tls-enable-or-disable-total-tls
func (api *API) TotalTLSSet(ctx context.Context, rc *ResourceContainer, params TotalTLS) (TotalTLS, error) {
	if rc.Identifier == "" {
		return TotalTLS{}, ErrMissingZoneID
	}
	uri := fmt.Sprintf("/zones/%s/acm/total_tls", rc.Identifier)
	res, err := api.makeRequestContext(ctx, http.MethodPost, uri, params)
	if err != nil {
		return TotalTLS{}, err
	}

	var r TotalTLSResponse
	err = json.Unmarshal(res, &r)
	if err != nil {
		return TotalTLS{}, err
	}

	return r.Result, nil
}<commit_msg>update method names to be <verb><noun> format<commit_after>package cloudflare

import (
	"context"
	"encoding/json"
	"fmt"
	"net/http"
)

type TotalTLS struct {
	Enabled              *bool  `json:"enabled,omitempty"`
	CertificateAuthority string `json:"certificate_authority,omitempty"`
	ValidityDays         int    `json:"validity_days,omitempty"`
}

type TotalTLSResponse struct {
	Response
	Result TotalTLS `json:"result"`
}

// GetTotalTLS Get Total TLS Settings for a Zone.
//
// API Reference: https://api.cloudflare.com/#total-tls-total-tls-settings-details
func (api *API) GetTotalTLS(ctx context.Context, rc *ResourceContainer) (TotalTLS, error) {
	if rc.Identifier == "" {
		return TotalTLS{}, ErrMissingZoneID
	}
	uri := fmt.Sprintf("/zones/%s/acm/total_tls", rc.Identifier)
	res, err := api.makeRequestContext(ctx, http.MethodGet, uri, nil)
	if err != nil {
		return TotalTLS{}, err
	}

	var r TotalTLSResponse
	err = json.Unmarshal(res, &r)
	if err != nil {
		return TotalTLS{}, err
	}

	return r.Result, nil
}

// SetTotalTLS Set Total TLS Settings or disable the feature for a Zone.
//
// API Reference: https://api.cloudflare.com/#total-tls-enable-or-disable-total-tls
func (api *API) SetTotalTLS(ctx context.Context, rc *ResourceContainer, params TotalTLS) (TotalTLS, error) {
	if rc.Identifier == "" {
		return TotalTLS{}, ErrMissingZoneID
	}
	uri := fmt.Sprintf("/zones/%s/acm/total_tls", rc.Identifier)
	res, err := api.makeRequestContext(ctx, http.MethodPost, uri, params)
	if err != nil {
		return TotalTLS{}, err
	}

	var r TotalTLSResponse
	err = json.Unmarshal(res, &r)
	if err != nil {
		return TotalTLS{}, err
	}

	return r.Result, nil
}
{'fraction_non_alphanumeric': 0.13622572815533981, 'fraction_numerical': 0.0, 'mean_word_length': 4.072307692307692, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6290601', 'n_tokens_mistral': 1121, 'n_tokens_neox': 1079, 'n_words': 290}