// 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 v20241204

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"
)

type Alarm struct {
	// Alarm rule ID.
	Id *int64 `json:"Id,omitnil,omitempty" name:"Id"`

	// Alarm rule name.
	Name *string `json:"Name,omitnil,omitempty" name:"Name"`

	// Product ID
	ProductId *uint64 `json:"ProductId,omitnil,omitempty" name:"ProductId"`

	// Quota ID.
	QuotaId *uint64 `json:"QuotaId,omitnil,omitempty" name:"QuotaId"`

	// Alarm condition.
	Metrics *int64 `json:"Metrics,omitnil,omitempty" name:"Metrics"`

	// Alarm frequency.
	Frequency *int64 `json:"Frequency,omitnil,omitempty" name:"Frequency"`

	// Specifies the Alarm threshold. valid values: 0-100.
	Threshold *int64 `json:"Threshold,omitnil,omitempty" name:"Threshold"`

	// Creator UIN
	OwnerUin *int64 `json:"OwnerUin,omitnil,omitempty" name:"OwnerUin"`

	// Specifies the uin of the rule owner.
	MemberUin *int64 `json:"MemberUin,omitnil,omitempty" name:"MemberUin"`

	// Specifies the quota name.
	QuotaName *string `json:"QuotaName,omitnil,omitempty" name:"QuotaName"`

	// Product name
	ProductName *string `json:"ProductName,omitnil,omitempty" name:"ProductName"`

	// Whether to delete. 1: not deleted.
	// 2: delete.
	Status *uint64 `json:"Status,omitnil,omitempty" name:"Status"`
}

// Predefined struct for user
type CreateAlarmRequestParams struct {
	// Alarm rule name. specifies the name of the Alarm rule
	Name *string `json:"Name,omitnil,omitempty" name:"Name"`

	// Product ID.
	ProductId *int64 `json:"ProductId,omitnil,omitempty" name:"ProductId"`

	// Quota ID.
	QuotaId *int64 `json:"QuotaId,omitnil,omitempty" name:"QuotaId"`

	// Alert metrics 1: quota usage 2: quota usage rate 3: remaining quota 4: remaining quota rate.
	Metrics *int64 `json:"Metrics,omitnil,omitempty" name:"Metrics"`

	// Specifies the Alarm threshold. value range: 0-100.
	Threshold *int64 `json:"Threshold,omitnil,omitempty" name:"Threshold"`

	// Alarm frequency.
	Frequency *int64 `json:"Frequency,omitnil,omitempty" name:"Frequency"`

	//   Member UIN.
	MemberUin *int64 `json:"MemberUin,omitnil,omitempty" name:"MemberUin"`
}

type CreateAlarmRequest struct {
	*tchttp.BaseRequest
	
	// Alarm rule name. specifies the name of the Alarm rule
	Name *string `json:"Name,omitnil,omitempty" name:"Name"`

	// Product ID.
	ProductId *int64 `json:"ProductId,omitnil,omitempty" name:"ProductId"`

	// Quota ID.
	QuotaId *int64 `json:"QuotaId,omitnil,omitempty" name:"QuotaId"`

	// Alert metrics 1: quota usage 2: quota usage rate 3: remaining quota 4: remaining quota rate.
	Metrics *int64 `json:"Metrics,omitnil,omitempty" name:"Metrics"`

	// Specifies the Alarm threshold. value range: 0-100.
	Threshold *int64 `json:"Threshold,omitnil,omitempty" name:"Threshold"`

	// Alarm frequency.
	Frequency *int64 `json:"Frequency,omitnil,omitempty" name:"Frequency"`

	//   Member UIN.
	MemberUin *int64 `json:"MemberUin,omitnil,omitempty" name:"MemberUin"`
}

func (r *CreateAlarmRequest) 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 *CreateAlarmRequest) FromJsonString(s string) error {
	f := make(map[string]interface{})
	if err := json.Unmarshal([]byte(s), &f); err != nil {
		return err
	}
	delete(f, "Name")
	delete(f, "ProductId")
	delete(f, "QuotaId")
	delete(f, "Metrics")
	delete(f, "Threshold")
	delete(f, "Frequency")
	delete(f, "MemberUin")
	if len(f) > 0 {
		return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateAlarmRequest has unknown keys!", "")
	}
	return json.Unmarshal([]byte(s), &r)
}

// Predefined struct for user
type CreateAlarmResponseParams struct {
	// 1001
	AlarmId *int64 `json:"AlarmId,omitnil,omitempty" name:"AlarmId"`

	// 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 CreateAlarmResponse struct {
	*tchttp.BaseResponse
	Response *CreateAlarmResponseParams `json:"Response"`
}

func (r *CreateAlarmResponse) 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 *CreateAlarmResponse) FromJsonString(s string) error {
	return json.Unmarshal([]byte(s), &r)
}

// Predefined struct for user
type DeleteAlarmRequestParams struct {
	// Rule ID
	Id *int64 `json:"Id,omitnil,omitempty" name:"Id"`

	// Specifies the member uin of the rule owner.
	MemberUin *int64 `json:"MemberUin,omitnil,omitempty" name:"MemberUin"`
}

type DeleteAlarmRequest struct {
	*tchttp.BaseRequest
	
	// Rule ID
	Id *int64 `json:"Id,omitnil,omitempty" name:"Id"`

	// Specifies the member uin of the rule owner.
	MemberUin *int64 `json:"MemberUin,omitnil,omitempty" name:"MemberUin"`
}

func (r *DeleteAlarmRequest) 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 *DeleteAlarmRequest) FromJsonString(s string) error {
	f := make(map[string]interface{})
	if err := json.Unmarshal([]byte(s), &f); err != nil {
		return err
	}
	delete(f, "Id")
	delete(f, "MemberUin")
	if len(f) > 0 {
		return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeleteAlarmRequest has unknown keys!", "")
	}
	return json.Unmarshal([]byte(s), &r)
}

// Predefined struct for user
type DeleteAlarmResponseParams struct {
	// 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 DeleteAlarmResponse struct {
	*tchttp.BaseResponse
	Response *DeleteAlarmResponseParams `json:"Response"`
}

func (r *DeleteAlarmResponse) 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 *DeleteAlarmResponse) FromJsonString(s string) error {
	return json.Unmarshal([]byte(s), &r)
}

// Predefined struct for user
type DescribeAggregateUserQuotasRequestParams struct {
	// Member account. Can be empty. If empty, query the current account list.
	MemberUins []*int64 `json:"MemberUins,omitnil,omitempty" name:"MemberUins"`

	// limit
	Limit *int64 `json:"Limit,omitnil,omitempty" name:"Limit"`

	// offset
	Offset *int64 `json:"Offset,omitnil,omitempty" name:"Offset"`

	// Filter
	Filter []*Filter `json:"Filter,omitnil,omitempty" name:"Filter"`

	// sort
	Sort []*Sort `json:"Sort,omitnil,omitempty" name:"Sort"`

	// Product ID
	ProductId *int64 `json:"ProductId,omitnil,omitempty" name:"ProductId"`

	// Quota dimension
	QuotaDimensions []*QuotaDimension `json:"QuotaDimensions,omitnil,omitempty" name:"QuotaDimensions"`
}

type DescribeAggregateUserQuotasRequest struct {
	*tchttp.BaseRequest
	
	// Member account. Can be empty. If empty, query the current account list.
	MemberUins []*int64 `json:"MemberUins,omitnil,omitempty" name:"MemberUins"`

	// limit
	Limit *int64 `json:"Limit,omitnil,omitempty" name:"Limit"`

	// offset
	Offset *int64 `json:"Offset,omitnil,omitempty" name:"Offset"`

	// Filter
	Filter []*Filter `json:"Filter,omitnil,omitempty" name:"Filter"`

	// sort
	Sort []*Sort `json:"Sort,omitnil,omitempty" name:"Sort"`

	// Product ID
	ProductId *int64 `json:"ProductId,omitnil,omitempty" name:"ProductId"`

	// Quota dimension
	QuotaDimensions []*QuotaDimension `json:"QuotaDimensions,omitnil,omitempty" name:"QuotaDimensions"`
}

func (r *DescribeAggregateUserQuotasRequest) 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 *DescribeAggregateUserQuotasRequest) FromJsonString(s string) error {
	f := make(map[string]interface{})
	if err := json.Unmarshal([]byte(s), &f); err != nil {
		return err
	}
	delete(f, "MemberUins")
	delete(f, "Limit")
	delete(f, "Offset")
	delete(f, "Filter")
	delete(f, "Sort")
	delete(f, "ProductId")
	delete(f, "QuotaDimensions")
	if len(f) > 0 {
		return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeAggregateUserQuotasRequest has unknown keys!", "")
	}
	return json.Unmarshal([]byte(s), &r)
}

// Predefined struct for user
type DescribeAggregateUserQuotasResponseParams struct {
	// Quota Id
	OwnerUin *int64 `json:"OwnerUin,omitnil,omitempty" name:"OwnerUin"`

	// quota name
	Count *int64 `json:"Count,omitnil,omitempty" name:"Count"`

	// Quota dimension
	// Note: This field may return null, indicating that no valid values can be obtained.
	Data []*UserQuota `json:"Data,omitnil,omitempty" name:"Data"`

	// 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 DescribeAggregateUserQuotasResponse struct {
	*tchttp.BaseResponse
	Response *DescribeAggregateUserQuotasResponseParams `json:"Response"`
}

func (r *DescribeAggregateUserQuotasResponse) 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 *DescribeAggregateUserQuotasResponse) FromJsonString(s string) error {
	return json.Unmarshal([]byte(s), &r)
}

// Predefined struct for user
type DescribeAlarmsRequestParams struct {
	// Number of items per page. maximum 100.
	Limit *int64 `json:"Limit,omitnil,omitempty" name:"Limit"`

	// Offset.
	Offset *int64 `json:"Offset,omitnil,omitempty" name:"Offset"`

	// Product ID.
	ProductId *int64 `json:"ProductId,omitnil,omitempty" name:"ProductId"`

	// Quota ID.
	QuotaId *int64 `json:"QuotaId,omitnil,omitempty" name:"QuotaId"`

	// Alarm, quota name.
	Content *string `json:"Content,omitnil,omitempty" name:"Content"`

	// Member uins.
	MemberUins []*int64 `json:"MemberUins,omitnil,omitempty" name:"MemberUins"`

	// AlAlarm metric.
	Metrics *int64 `json:"Metrics,omitnil,omitempty" name:"Metrics"`

	// Rule ID
	Id *uint64 `json:"Id,omitnil,omitempty" name:"Id"`
}

type DescribeAlarmsRequest struct {
	*tchttp.BaseRequest
	
	// Number of items per page. maximum 100.
	Limit *int64 `json:"Limit,omitnil,omitempty" name:"Limit"`

	// Offset.
	Offset *int64 `json:"Offset,omitnil,omitempty" name:"Offset"`

	// Product ID.
	ProductId *int64 `json:"ProductId,omitnil,omitempty" name:"ProductId"`

	// Quota ID.
	QuotaId *int64 `json:"QuotaId,omitnil,omitempty" name:"QuotaId"`

	// Alarm, quota name.
	Content *string `json:"Content,omitnil,omitempty" name:"Content"`

	// Member uins.
	MemberUins []*int64 `json:"MemberUins,omitnil,omitempty" name:"MemberUins"`

	// AlAlarm metric.
	Metrics *int64 `json:"Metrics,omitnil,omitempty" name:"Metrics"`

	// Rule ID
	Id *uint64 `json:"Id,omitnil,omitempty" name:"Id"`
}

func (r *DescribeAlarmsRequest) 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 *DescribeAlarmsRequest) 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")
	delete(f, "ProductId")
	delete(f, "QuotaId")
	delete(f, "Content")
	delete(f, "MemberUins")
	delete(f, "Metrics")
	delete(f, "Id")
	if len(f) > 0 {
		return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeAlarmsRequest has unknown keys!", "")
	}
	return json.Unmarshal([]byte(s), &r)
}

// Predefined struct for user
type DescribeAlarmsResponseParams struct {
	// Total number.
	Count *int64 `json:"Count,omitnil,omitempty" name:"Count"`

	// List of rules
	Data []*Alarm `json:"Data,omitnil,omitempty" name:"Data"`

	// 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 DescribeAlarmsResponse struct {
	*tchttp.BaseResponse
	Response *DescribeAlarmsResponseParams `json:"Response"`
}

func (r *DescribeAlarmsResponse) 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 *DescribeAlarmsResponse) FromJsonString(s string) error {
	return json.Unmarshal([]byte(s), &r)
}

// Predefined struct for user
type DescribeUserQuotaRequestParams struct {
	// Product name
	ProductName *string `json:"ProductName,omitnil,omitempty" name:"ProductName"`

	// Quota id
	QuotaId *Sort `json:"QuotaId,omitnil,omitempty" name:"QuotaId"`

	// Quota ID of each product
	QuotaInstanceId *string `json:"QuotaInstanceId,omitnil,omitempty" name:"QuotaInstanceId"`
}

type DescribeUserQuotaRequest struct {
	*tchttp.BaseRequest
	
	// Product name
	ProductName *string `json:"ProductName,omitnil,omitempty" name:"ProductName"`

	// Quota id
	QuotaId *Sort `json:"QuotaId,omitnil,omitempty" name:"QuotaId"`

	// Quota ID of each product
	QuotaInstanceId *string `json:"QuotaInstanceId,omitnil,omitempty" name:"QuotaInstanceId"`
}

func (r *DescribeUserQuotaRequest) 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 *DescribeUserQuotaRequest) FromJsonString(s string) error {
	f := make(map[string]interface{})
	if err := json.Unmarshal([]byte(s), &f); err != nil {
		return err
	}
	delete(f, "ProductName")
	delete(f, "QuotaId")
	delete(f, "QuotaInstanceId")
	if len(f) > 0 {
		return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeUserQuotaRequest has unknown keys!", "")
	}
	return json.Unmarshal([]byte(s), &r)
}

// Predefined struct for user
type DescribeUserQuotaResponseParams struct {
	// Quota Id
	QuotaId *int64 `json:"QuotaId,omitnil,omitempty" name:"QuotaId"`

	// quota name
	QuotaName *string `json:"QuotaName,omitnil,omitempty" name:"QuotaName"`

	// Product name
	ProductName *string `json:"ProductName,omitnil,omitempty" name:"ProductName"`

	// Quota unit
	QuotaUnit *string `json:"QuotaUnit,omitnil,omitempty" name:"QuotaUnit"`

	// User Quota
	TotalQuota *int64 `json:"TotalQuota,omitnil,omitempty" name:"TotalQuota"`

	// Quota usage
	TotalUsage *int64 `json:"TotalUsage,omitnil,omitempty" name:"TotalUsage"`

	// Quota description
	QuotaDescription *string `json:"QuotaDescription,omitnil,omitempty" name:"QuotaDescription"`

	// 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 DescribeUserQuotaResponse struct {
	*tchttp.BaseResponse
	Response *DescribeUserQuotaResponseParams `json:"Response"`
}

func (r *DescribeUserQuotaResponse) 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 *DescribeUserQuotaResponse) FromJsonString(s string) error {
	return json.Unmarshal([]byte(s), &r)
}

// Predefined struct for user
type EnableAlarmRequestParams struct {
	// Rule ID
	Id *int64 `json:"Id,omitnil,omitempty" name:"Id"`

	// Specifies the member uin of the rule owner.
	MemberUin *int64 `json:"MemberUin,omitnil,omitempty" name:"MemberUin"`
}

type EnableAlarmRequest struct {
	*tchttp.BaseRequest
	
	// Rule ID
	Id *int64 `json:"Id,omitnil,omitempty" name:"Id"`

	// Specifies the member uin of the rule owner.
	MemberUin *int64 `json:"MemberUin,omitnil,omitempty" name:"MemberUin"`
}

func (r *EnableAlarmRequest) 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 *EnableAlarmRequest) FromJsonString(s string) error {
	f := make(map[string]interface{})
	if err := json.Unmarshal([]byte(s), &f); err != nil {
		return err
	}
	delete(f, "Id")
	delete(f, "MemberUin")
	if len(f) > 0 {
		return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "EnableAlarmRequest has unknown keys!", "")
	}
	return json.Unmarshal([]byte(s), &r)
}

// Predefined struct for user
type EnableAlarmResponseParams struct {
	// 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 EnableAlarmResponse struct {
	*tchttp.BaseResponse
	Response *EnableAlarmResponseParams `json:"Response"`
}

func (r *EnableAlarmResponse) 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 *EnableAlarmResponse) FromJsonString(s string) error {
	return json.Unmarshal([]byte(s), &r)
}

type Filter struct {
	// Filter name
	Name *string `json:"Name,omitnil,omitempty" name:"Name"`

	// Values after filtering
	Value *string `json:"Value,omitnil,omitempty" name:"Value"`
}

type QuotaDimension struct {
	// Quota dimension
	// Note: This field may return null, indicating that no valid values can be obtained.
	DimensionName *string `json:"DimensionName,omitnil,omitempty" name:"DimensionName"`

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

type Sort struct {
	// Ascending Descending Order
	Type *string `json:"Type,omitnil,omitempty" name:"Type"`

	// Field
	Field *string `json:"Field,omitnil,omitempty" name:"Field"`
}

// Predefined struct for user
type UpdateAlarmRequestParams struct {
	// ID
	Id *int64 `json:"Id,omitnil,omitempty" name:"Id"`

	// Alarm rule name.
	Name *string `json:"Name,omitnil,omitempty" name:"Name"`

	// Product ID.
	ProductId *int64 `json:"ProductId,omitnil,omitempty" name:"ProductId"`

	// Quota ID.
	QuotaId *int64 `json:"QuotaId,omitnil,omitempty" name:"QuotaId"`

	// 1: quota usage 2: quota usage rate 3: remaining quota 4: remaining quota rate.
	Metrics *int64 `json:"Metrics,omitnil,omitempty" name:"Metrics"`

	// Specifies the Alarm threshold. valid values: 0-100.
	Threshold *int64 `json:"Threshold,omitnil,omitempty" name:"Threshold"`

	// Alarm frequency.
	Frequency *int64 `json:"Frequency,omitnil,omitempty" name:"Frequency"`

	// Specifies the uin of the rule owner.
	// Operates non-group account rules. this parameter can be omitted.
	// Operates the organization account rule. specifies the uin of all users under the current rule.
	MemberUin *int64 `json:"MemberUin,omitnil,omitempty" name:"MemberUin"`
}

type UpdateAlarmRequest struct {
	*tchttp.BaseRequest
	
	// ID
	Id *int64 `json:"Id,omitnil,omitempty" name:"Id"`

	// Alarm rule name.
	Name *string `json:"Name,omitnil,omitempty" name:"Name"`

	// Product ID.
	ProductId *int64 `json:"ProductId,omitnil,omitempty" name:"ProductId"`

	// Quota ID.
	QuotaId *int64 `json:"QuotaId,omitnil,omitempty" name:"QuotaId"`

	// 1: quota usage 2: quota usage rate 3: remaining quota 4: remaining quota rate.
	Metrics *int64 `json:"Metrics,omitnil,omitempty" name:"Metrics"`

	// Specifies the Alarm threshold. valid values: 0-100.
	Threshold *int64 `json:"Threshold,omitnil,omitempty" name:"Threshold"`

	// Alarm frequency.
	Frequency *int64 `json:"Frequency,omitnil,omitempty" name:"Frequency"`

	// Specifies the uin of the rule owner.
	// Operates non-group account rules. this parameter can be omitted.
	// Operates the organization account rule. specifies the uin of all users under the current rule.
	MemberUin *int64 `json:"MemberUin,omitnil,omitempty" name:"MemberUin"`
}

func (r *UpdateAlarmRequest) 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 *UpdateAlarmRequest) FromJsonString(s string) error {
	f := make(map[string]interface{})
	if err := json.Unmarshal([]byte(s), &f); err != nil {
		return err
	}
	delete(f, "Id")
	delete(f, "Name")
	delete(f, "ProductId")
	delete(f, "QuotaId")
	delete(f, "Metrics")
	delete(f, "Threshold")
	delete(f, "Frequency")
	delete(f, "MemberUin")
	if len(f) > 0 {
		return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "UpdateAlarmRequest has unknown keys!", "")
	}
	return json.Unmarshal([]byte(s), &r)
}

// Predefined struct for user
type UpdateAlarmResponseParams struct {
	// 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 UpdateAlarmResponse struct {
	*tchttp.BaseResponse
	Response *UpdateAlarmResponseParams `json:"Response"`
}

func (r *UpdateAlarmResponse) 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 *UpdateAlarmResponse) FromJsonString(s string) error {
	return json.Unmarshal([]byte(s), &r)
}

type UserQuota struct {
	// uin
	MemberUin *int64 `json:"MemberUin,omitnil,omitempty" name:"MemberUin"`

	// Account nickname
	MemberName *string `json:"MemberName,omitnil,omitempty" name:"MemberName"`

	// Quota Instance ID
	QuotaInstanceId *string `json:"QuotaInstanceId,omitnil,omitempty" name:"QuotaInstanceId"`

	// Quota ID
	QuotaId *int64 `json:"QuotaId,omitnil,omitempty" name:"QuotaId"`

	// quota name
	QuotaName *string `json:"QuotaName,omitnil,omitempty" name:"QuotaName"`

	// Product name
	ProductName *string `json:"ProductName,omitnil,omitempty" name:"ProductName"`

	// Quota unit
	QuotaUnit *string `json:"QuotaUnit,omitnil,omitempty" name:"QuotaUnit"`

	// Quota application method, enumeration value: 1: Can apply, 2: Ticket application, 3: Cannot apply.
	ApplyType *int64 `json:"ApplyType,omitnil,omitempty" name:"ApplyType"`

	// User Total Quota
	TotalQuota *int64 `json:"TotalQuota,omitnil,omitempty" name:"TotalQuota"`

	// Total usage of user quota
	TotalUsage *int64 `json:"TotalUsage,omitnil,omitempty" name:"TotalUsage"`

	// Quota description
	QuotaDescription *string `json:"QuotaDescription,omitnil,omitempty" name:"QuotaDescription"`

	// Quota Dimension Value
	// Note: This field may return null, indicating that no valid values can be obtained.
	QuotaDimensions []*QuotaDimension `json:"QuotaDimensions,omitnil,omitempty" name:"QuotaDimensions"`

	// Status 5 Pending Approval
	Status *int64 `json:"Status,omitnil,omitempty" name:"Status"`
}