// Copyright (c) 2017-2025 Tencent. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//    http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package v20220627

import (
    tcerr "github.com/tencentcloud/tencentcloud-sdk-go-intl-en/tencentcloud/common/errors"
    tchttp "github.com/tencentcloud/tencentcloud-sdk-go-intl-en/tencentcloud/common/http"
    "github.com/tencentcloud/tencentcloud-sdk-go-intl-en/tencentcloud/common/json"
)

// Predefined struct for user
type DescribeProductsRequestParams struct {
	// Number of returned results, defaults to 20, maximum value is 100.
	Limit *int64 `json:"Limit,omitnil,omitempty" name:"Limit"`

	// Offset. default value: 0.
	Offset *int64 `json:"Offset,omitnil,omitempty" name:"Offset"`
}

type DescribeProductsRequest struct {
	*tchttp.BaseRequest
	
	// Number of returned results, defaults to 20, maximum value is 100.
	Limit *int64 `json:"Limit,omitnil,omitempty" name:"Limit"`

	// Offset. default value: 0.
	Offset *int64 `json:"Offset,omitnil,omitempty" name:"Offset"`
}

func (r *DescribeProductsRequest) ToJsonString() string {
    b, _ := json.Marshal(r)
    return string(b)
}

// FromJsonString It is highly **NOT** recommended to use this function
// because it has no param check, nor strict type check
func (r *DescribeProductsRequest) FromJsonString(s string) error {
	f := make(map[string]interface{})
	if err := json.Unmarshal([]byte(s), &f); err != nil {
		return err
	}
	delete(f, "Limit")
	delete(f, "Offset")
	if len(f) > 0 {
		return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeProductsRequest has unknown keys!", "")
	}
	return json.Unmarshal([]byte(s), &r)
}

// Predefined struct for user
type DescribeProductsResponseParams struct {
	// Product detailed information list.
	Products []*RegionProduct `json:"Products,omitnil,omitempty" name:"Products"`

	// Total number of products
	TotalCount *int64 `json:"TotalCount,omitnil,omitempty" name:"TotalCount"`

	// The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
	RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"`
}

type DescribeProductsResponse struct {
	*tchttp.BaseResponse
	Response *DescribeProductsResponseParams `json:"Response"`
}

func (r *DescribeProductsResponse) ToJsonString() string {
    b, _ := json.Marshal(r)
    return string(b)
}

// FromJsonString It is highly **NOT** recommended to use this function
// because it has no param check, nor strict type check
func (r *DescribeProductsResponse) FromJsonString(s string) error {
	return json.Unmarshal([]byte(s), &r)
}

// Predefined struct for user
type DescribeRegionsRequestParams struct {
	// Name of the product to be queried, such as cvm. for specific value, query the DescribeProducts api.
	Product *string `json:"Product,omitnil,omitempty" name:"Product"`

	// Not passed or 0 means no query [optional business allowlist], 1 means query [optional business allowlist]. if this parameter is set to 1, the allowlist will only be queried when no business allowlist is found.
	Scene *int64 `json:"Scene,omitnil,omitempty" name:"Scene"`
}

type DescribeRegionsRequest struct {
	*tchttp.BaseRequest
	
	// Name of the product to be queried, such as cvm. for specific value, query the DescribeProducts api.
	Product *string `json:"Product,omitnil,omitempty" name:"Product"`

	// Not passed or 0 means no query [optional business allowlist], 1 means query [optional business allowlist]. if this parameter is set to 1, the allowlist will only be queried when no business allowlist is found.
	Scene *int64 `json:"Scene,omitnil,omitempty" name:"Scene"`
}

func (r *DescribeRegionsRequest) ToJsonString() string {
    b, _ := json.Marshal(r)
    return string(b)
}

// FromJsonString It is highly **NOT** recommended to use this function
// because it has no param check, nor strict type check
func (r *DescribeRegionsRequest) FromJsonString(s string) error {
	f := make(map[string]interface{})
	if err := json.Unmarshal([]byte(s), &f); err != nil {
		return err
	}
	delete(f, "Product")
	delete(f, "Scene")
	if len(f) > 0 {
		return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeRegionsRequest has unknown keys!", "")
	}
	return json.Unmarshal([]byte(s), &r)
}

// Predefined struct for user
type DescribeRegionsResponseParams struct {
	// Number of Regions
	TotalCount *uint64 `json:"TotalCount,omitnil,omitempty" name:"TotalCount"`

	// List Information of Region
	RegionSet []*RegionInfo `json:"RegionSet,omitnil,omitempty" name:"RegionSet"`

	// The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
	RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"`
}

type DescribeRegionsResponse struct {
	*tchttp.BaseResponse
	Response *DescribeRegionsResponseParams `json:"Response"`
}

func (r *DescribeRegionsResponse) ToJsonString() string {
    b, _ := json.Marshal(r)
    return string(b)
}

// FromJsonString It is highly **NOT** recommended to use this function
// because it has no param check, nor strict type check
func (r *DescribeRegionsResponse) FromJsonString(s string) error {
	return json.Unmarshal([]byte(s), &r)
}

// Predefined struct for user
type DescribeZonesRequestParams struct {
	// Name of the product to be queried, such as cvm. for specific value, query the DescribeProducts api.
	Product *string `json:"Product,omitnil,omitempty" name:"Product"`

	// No input or 0 means no query [optional business allowlist], 1 means query [optional business allowlist]. if this parameter is set to 1, the allowlist will only be queried when no result is found in the business allowlist.
	Scene *int64 `json:"Scene,omitnil,omitempty" name:"Scene"`
}

type DescribeZonesRequest struct {
	*tchttp.BaseRequest
	
	// Name of the product to be queried, such as cvm. for specific value, query the DescribeProducts api.
	Product *string `json:"Product,omitnil,omitempty" name:"Product"`

	// No input or 0 means no query [optional business allowlist], 1 means query [optional business allowlist]. if this parameter is set to 1, the allowlist will only be queried when no result is found in the business allowlist.
	Scene *int64 `json:"Scene,omitnil,omitempty" name:"Scene"`
}

func (r *DescribeZonesRequest) ToJsonString() string {
    b, _ := json.Marshal(r)
    return string(b)
}

// FromJsonString It is highly **NOT** recommended to use this function
// because it has no param check, nor strict type check
func (r *DescribeZonesRequest) FromJsonString(s string) error {
	f := make(map[string]interface{})
	if err := json.Unmarshal([]byte(s), &f); err != nil {
		return err
	}
	delete(f, "Product")
	delete(f, "Scene")
	if len(f) > 0 {
		return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeZonesRequest has unknown keys!", "")
	}
	return json.Unmarshal([]byte(s), &r)
}

// Predefined struct for user
type DescribeZonesResponseParams struct {
	// Number of availability zones.
	TotalCount *uint64 `json:"TotalCount,omitnil,omitempty" name:"TotalCount"`

	// Availability zone list information.
	ZoneSet []*ZoneInfo `json:"ZoneSet,omitnil,omitempty" name:"ZoneSet"`

	// The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
	RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"`
}

type DescribeZonesResponse struct {
	*tchttp.BaseResponse
	Response *DescribeZonesResponseParams `json:"Response"`
}

func (r *DescribeZonesResponse) ToJsonString() string {
    b, _ := json.Marshal(r)
    return string(b)
}

// FromJsonString It is highly **NOT** recommended to use this function
// because it has no param check, nor strict type check
func (r *DescribeZonesResponse) FromJsonString(s string) error {
	return json.Unmarshal([]byte(s), &r)
}

type RegionInfo struct {
	// Region name, such as ap-guangzhou.
	Region *string `json:"Region,omitnil,omitempty" name:"Region"`

	// Region description, for example, South China (Guangzhou).
	RegionName *string `json:"RegionName,omitnil,omitempty" name:"RegionName"`

	// Whether the region is in an available state.
	RegionState *string `json:"RegionState,omitnil,omitempty" name:"RegionState"`

	// Console type. defaults to null when called via api.
	// Note: This field may return null, indicating that no valid values can be obtained.
	RegionTypeMC *int64 `json:"RegionTypeMC,omitnil,omitempty" name:"RegionTypeMC"`

	// Region for different languages.
	// Note: This field may return null, indicating that no valid values can be obtained.
	LocationMC *string `json:"LocationMC,omitnil,omitempty" name:"LocationMC"`

	// Region description on console display.
	// Note: This field may return null, indicating that no valid values can be obtained.
	RegionNameMC *string `json:"RegionNameMC,omitnil,omitempty" name:"RegionNameMC"`

	// 1
	// Note: This field may return null, indicating that no valid values can be obtained.
	RegionIdMC *string `json:"RegionIdMC,omitnil,omitempty" name:"RegionIdMC"`
}

type RegionProduct struct {
	// Product name, for example cvm.
	Name *string `json:"Name,omitnil,omitempty" name:"Name"`
}

type ZoneInfo struct {
	// Availability zone name, for example, ap-guangzhou-3.
	// 
	// The names of availability zones across the network are as follows:.
	// <li> ap-chongqing-1 </li>
	// <li> ap-seoul-1 </li>
	// <li> ap-seoul-2 </li>
	// <li> ap-chengdu-1 </li>
	// <li> ap-chengdu-2 </li>
	// <li> ap-hongkong-1 </li>
	// <li> ap-hongkong-2 </li>
	// <li> ap-shenzhen-fsi-1 </li>
	// <li> ap-shenzhen-fsi-2 </li>
	// <li> ap-shenzhen-fsi-3 </li>
	// <Li> ap-guangzhou-1 (sold-out)</li>
	// <li> ap-guangzhou-3 </li>
	// <li> ap-guangzhou-4 </li>
	// <li> ap-guangzhou-6 </li>
	// <li> ap-tokyo-1 </li>
	// <li> ap-singapore-1 </li>
	// <li> ap-singapore-2 </li>
	// <li> ap-shanghai-fsi-1 </li>
	// <li> ap-shanghai-fsi-2 </li>
	// <li> ap-shanghai-fsi-3 </li>
	// <li> ap-bangkok-1 </li>
	// <Li> ap-shanghai-1 (resource out of stock) </li>.
	// <li> ap-shanghai-2 </li>
	// <li> ap-shanghai-3 </li>
	// <li> ap-shanghai-4 </li>
	// <li> ap-shanghai-5 </li>
	// <li> ap-mumbai-1 </li>
	// <li> ap-mumbai-2 </li>
	// <li> ap-beijing-1 </li>
	// <li> ap-beijing-2 </li>
	// <li> ap-beijing-3 </li>
	// <li> ap-beijing-4 </li>
	// <li> ap-beijing-5 </li>
	// <li> na-siliconvalley-1 </li>
	// <li> na-siliconvalley-2 </li>
	// <li> eu-frankfurt-1 </li>
	// <li> na-ashburn-1 </li>
	// <li> na-ashburn-2 </li>
	// <li> ap-nanjing-1 </li>
	// <li> ap-nanjing-2 </li>
	Zone *string `json:"Zone,omitnil,omitempty" name:"Zone"`

	// Availability zone description, such as Guangzhou Zone 3.
	ZoneName *string `json:"ZoneName,omitnil,omitempty" name:"ZoneName"`

	// AZ ID
	ZoneId *string `json:"ZoneId,omitnil,omitempty" name:"ZoneId"`

	// Availability zone status, including AVAILABLE and UNAVAILABLE. AVAILABLE indicates available, and UNAVAILABLE indicates unavailable.
	ZoneState *string `json:"ZoneState,omitnil,omitempty" name:"ZoneState"`

	// Parent zone.
	// Note: This field may return null, indicating that no valid values can be obtained.
	ParentZone *string `json:"ParentZone,omitnil,omitempty" name:"ParentZone"`

	// Parent availability zone ID.
	// Note: This field may return null, indicating that no valid values can be obtained.
	ParentZoneId *string `json:"ParentZoneId,omitnil,omitempty" name:"ParentZoneId"`

	// Describes the parent availability zone.
	// Note: This field may return null, indicating that no valid values can be obtained.
	ParentZoneName *string `json:"ParentZoneName,omitnil,omitempty" name:"ParentZoneName"`

	// zone type.
	// Note: This field may return null, indicating that no valid values can be obtained.
	ZoneType *string `json:"ZoneType,omitnil,omitempty" name:"ZoneType"`

	// Console type.
	// Note: This field may return null, indicating that no valid values can be obtained.
	MachineRoomTypeMC *string `json:"MachineRoomTypeMC,omitnil,omitempty" name:"MachineRoomTypeMC"`

	// Same as ZoneId. suitable for console invocation.
	// Note: This field may return null, indicating that no valid values can be obtained.
	ZoneIdMC *string `json:"ZoneIdMC,omitnil,omitempty" name:"ZoneIdMC"`
}