regenerate
This commit is contained in:
parent
6beda2b1d3
commit
c181810c2c
|
@ -0,0 +1,295 @@
|
|||
// +-------------------------------------------------------------------------
|
||||
// | Copyright (C) 2016 Yunify, Inc.
|
||||
// +-------------------------------------------------------------------------
|
||||
// | Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// | you may not use this work except in compliance with the License.
|
||||
// | You may obtain a copy of the License in the LICENSE file, or 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 service
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"github.com/yunify/qingcloud-sdk-go/config"
|
||||
"github.com/yunify/qingcloud-sdk-go/request"
|
||||
"github.com/yunify/qingcloud-sdk-go/request/data"
|
||||
"github.com/yunify/qingcloud-sdk-go/request/errors"
|
||||
)
|
||||
|
||||
var _ fmt.State
|
||||
var _ time.Time
|
||||
|
||||
type AppService struct {
|
||||
Config *config.Config
|
||||
Properties *AppServiceProperties
|
||||
}
|
||||
|
||||
type AppServiceProperties struct {
|
||||
// QingCloud Zone ID
|
||||
Zone *string `json:"zone" name:"zone"` // Required
|
||||
}
|
||||
|
||||
func (s *QingCloudService) App(zone string) (*AppService, error) {
|
||||
properties := &AppServiceProperties{
|
||||
Zone: &zone,
|
||||
}
|
||||
|
||||
return &AppService{Config: s.Config, Properties: properties}, nil
|
||||
}
|
||||
|
||||
// Documentation URL: https://docs.qingcloud.com/api/bot/DeployAppVersion.html
|
||||
func (s *AppService) DeployAppVersion(i *DeployAppVersionInput) (*DeployAppVersionOutput, error) {
|
||||
if i == nil {
|
||||
i = &DeployAppVersionInput{}
|
||||
}
|
||||
o := &data.Operation{
|
||||
Config: s.Config,
|
||||
Properties: s.Properties,
|
||||
APIName: "DeployAppVersion",
|
||||
RequestMethod: "GET",
|
||||
}
|
||||
|
||||
x := &DeployAppVersionOutput{}
|
||||
r, err := request.New(o, i, x)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
err = r.Send()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return x, err
|
||||
}
|
||||
|
||||
type DeployAppVersionInput struct {
|
||||
AppID *string `json:"app_id" name:"app_id" location:"params"`
|
||||
AppType *string `json:"app_type" name:"app_type" location:"params"`
|
||||
ChargeMode *string `json:"charge_mode" name:"charge_mode" location:"params"`
|
||||
Conf *string `json:"conf" name:"conf" location:"params"`
|
||||
Debug *int `json:"debug" name:"debug" location:"params"`
|
||||
Owner *string `json:"owner" name:"owner" location:"params"`
|
||||
VersionID *string `json:"version_id" name:"version_id" location:"params"`
|
||||
}
|
||||
|
||||
func (v *DeployAppVersionInput) Validate() error {
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
type DeployAppVersionOutput struct {
|
||||
Message *string `json:"message" name:"message"`
|
||||
Action *string `json:"action" name:"action" location:"elements"`
|
||||
AppID *string `json:"app_id" name:"app_id" location:"elements"`
|
||||
AppVersion *string `json:"app_version" name:"app_version" location:"elements"`
|
||||
ClusterID *string `json:"cluster_id" name:"cluster_id" location:"elements"`
|
||||
ClusterName *string `json:"cluster_name" name:"cluster_name" location:"elements"`
|
||||
JobID *string `json:"job_id" name:"job_id" location:"elements"`
|
||||
NodeCount *int `json:"node_count" name:"node_count" location:"elements"`
|
||||
NodeIDs []*string `json:"node_ids" name:"node_ids" location:"elements"`
|
||||
RetCode *int `json:"ret_code" name:"ret_code" location:"elements"`
|
||||
VxNetID *string `json:"vxnet_id" name:"vxnet_id" location:"elements"`
|
||||
}
|
||||
|
||||
// Documentation URL: https://docs.qingcloud.com/api/bot/describe_app_version_attachments.html
|
||||
func (s *AppService) DescribeAppVersionAttachments(i *DescribeAppVersionAttachmentsInput) (*DescribeAppVersionAttachmentsOutput, error) {
|
||||
if i == nil {
|
||||
i = &DescribeAppVersionAttachmentsInput{}
|
||||
}
|
||||
o := &data.Operation{
|
||||
Config: s.Config,
|
||||
Properties: s.Properties,
|
||||
APIName: "DescribeAppVersionAttachments",
|
||||
RequestMethod: "GET",
|
||||
}
|
||||
|
||||
x := &DescribeAppVersionAttachmentsOutput{}
|
||||
r, err := request.New(o, i, x)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
err = r.Send()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return x, err
|
||||
}
|
||||
|
||||
type DescribeAppVersionAttachmentsInput struct {
|
||||
AttachmentIDs []*string `json:"attachment_ids" name:"attachment_ids" location:"params"`
|
||||
ContentKeys []*string `json:"content_keys" name:"content_keys" location:"params"`
|
||||
VersionID *string `json:"version_id" name:"version_id" location:"params"`
|
||||
}
|
||||
|
||||
func (v *DescribeAppVersionAttachmentsInput) Validate() error {
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
type DescribeAppVersionAttachmentsOutput struct {
|
||||
Message *string `json:"message" name:"message"`
|
||||
Action *string `json:"action" name:"action" location:"elements"`
|
||||
RetCode *int `json:"ret_code" name:"ret_code" location:"elements"`
|
||||
TotalCount *int `json:"total_count" name:"total_count" location:"elements"`
|
||||
VersionSet []*AppVersionAttachment `json:"version_set" name:"version_set" location:"elements"`
|
||||
}
|
||||
|
||||
// Documentation URL: https://docs.qingcloud.com/api/bot/describe_app_versions.html
|
||||
func (s *AppService) DescribeAppVersions(i *DescribeAppVersionsInput) (*DescribeAppVersionsOutput, error) {
|
||||
if i == nil {
|
||||
i = &DescribeAppVersionsInput{}
|
||||
}
|
||||
o := &data.Operation{
|
||||
Config: s.Config,
|
||||
Properties: s.Properties,
|
||||
APIName: "DescribeAppVersions",
|
||||
RequestMethod: "GET",
|
||||
}
|
||||
|
||||
x := &DescribeAppVersionsOutput{}
|
||||
r, err := request.New(o, i, x)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
err = r.Send()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return x, err
|
||||
}
|
||||
|
||||
type DescribeAppVersionsInput struct {
|
||||
AppIDs []*string `json:"app_ids" name:"app_ids" location:"params"`
|
||||
Limit *int `json:"limit" name:"limit" location:"params"`
|
||||
Name *string `json:"name" name:"name" location:"params"`
|
||||
Offset *int `json:"offset" name:"offset" location:"params"`
|
||||
Owner *string `json:"owner" name:"owner" location:"params"`
|
||||
Reverse *string `json:"reverse" name:"reverse" location:"params"`
|
||||
SortKey *string `json:"sort_key" name:"sort_key" location:"params"`
|
||||
Status []*string `json:"status" name:"status" location:"params"`
|
||||
Verbose *int `json:"verbose" name:"verbose" location:"params"`
|
||||
VersionIDs []*string `json:"version_ids" name:"version_ids" location:"params"`
|
||||
}
|
||||
|
||||
func (v *DescribeAppVersionsInput) Validate() error {
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
type DescribeAppVersionsOutput struct {
|
||||
Message *string `json:"message" name:"message"`
|
||||
Action *string `json:"action" name:"action" location:"elements"`
|
||||
RetCode *int `json:"ret_code" name:"ret_code" location:"elements"`
|
||||
TotalCount *int `json:"total_count" name:"total_count" location:"elements"`
|
||||
VersionSet []*AppVersion `json:"version_set" name:"version_set" location:"elements"`
|
||||
}
|
||||
|
||||
// Documentation URL: https://docs.qingcloud.com/api/bot/describe_apps.html
|
||||
func (s *AppService) DescribeApps(i *DescribeAppsInput) (*DescribeAppsOutput, error) {
|
||||
if i == nil {
|
||||
i = &DescribeAppsInput{}
|
||||
}
|
||||
o := &data.Operation{
|
||||
Config: s.Config,
|
||||
Properties: s.Properties,
|
||||
APIName: "DescribeApps",
|
||||
RequestMethod: "GET",
|
||||
}
|
||||
|
||||
x := &DescribeAppsOutput{}
|
||||
r, err := request.New(o, i, x)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
err = r.Send()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return x, err
|
||||
}
|
||||
|
||||
type DescribeAppsInput struct {
|
||||
App *string `json:"app" name:"app" location:"params"`
|
||||
AppName *string `json:"app_name" name:"app_name" location:"params"`
|
||||
AppType []*string `json:"app_type" name:"app_type" location:"params"`
|
||||
Category *string `json:"category" name:"category" location:"params"`
|
||||
Limit *int `json:"limit" name:"limit" location:"params"`
|
||||
Offset *int `json:"offset" name:"offset" location:"params"`
|
||||
SearchWord *string `json:"search_word" name:"search_word" location:"params"`
|
||||
Status []*string `json:"status" name:"status" location:"params"`
|
||||
Tags []*string `json:"tags" name:"tags" location:"params"`
|
||||
Verbose *int `json:"verbose" name:"verbose" location:"params"`
|
||||
Zones []*string `json:"zones" name:"zones" location:"params"`
|
||||
}
|
||||
|
||||
func (v *DescribeAppsInput) Validate() error {
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
type DescribeAppsOutput struct {
|
||||
Message *string `json:"message" name:"message"`
|
||||
Action *string `json:"action" name:"action" location:"elements"`
|
||||
AppSet []*App `json:"app_set" name:"app_set" location:"elements"`
|
||||
RetCode *int `json:"ret_code" name:"ret_code" location:"elements"`
|
||||
TotalCount *int `json:"total_count" name:"total_count" location:"elements"`
|
||||
}
|
||||
|
||||
// Documentation URL: https://docs.qingcloud.com/api/bot/describe_app_version_attachments.html
|
||||
func (s *AppService) GetGlobalUniqueId(i *GetGlobalUniqueIdInput) (*GetGlobalUniqueIdOutput, error) {
|
||||
if i == nil {
|
||||
i = &GetGlobalUniqueIdInput{}
|
||||
}
|
||||
o := &data.Operation{
|
||||
Config: s.Config,
|
||||
Properties: s.Properties,
|
||||
APIName: "GetGlobalUniqueId",
|
||||
RequestMethod: "GET",
|
||||
}
|
||||
|
||||
x := &GetGlobalUniqueIdOutput{}
|
||||
r, err := request.New(o, i, x)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
err = r.Send()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return x, err
|
||||
}
|
||||
|
||||
type GetGlobalUniqueIdInput struct {
|
||||
UserID *string `json:"user_id" name:"user_id" location:"params"`
|
||||
}
|
||||
|
||||
func (v *GetGlobalUniqueIdInput) Validate() error {
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
type GetGlobalUniqueIdOutput struct {
|
||||
Message *string `json:"message" name:"message"`
|
||||
Action *string `json:"action" name:"action" location:"elements"`
|
||||
RetCode *int `json:"ret_code" name:"ret_code" location:"elements"`
|
||||
UUID *string `json:"uuid" name:"uuid" location:"elements"`
|
||||
}
|
|
@ -23,6 +23,73 @@ import (
|
|||
"github.com/yunify/qingcloud-sdk-go/request/errors"
|
||||
)
|
||||
|
||||
type App struct {
|
||||
Abstraction *string `json:"abstraction" name:"abstraction"`
|
||||
AppContractStatus *string `json:"app_contract_status" name:"app_contract_status"`
|
||||
AppID *string `json:"app_id" name:"app_id"`
|
||||
AppInstanceID *string `json:"app_instance_id" name:"app_instance_id"`
|
||||
AppName *string `json:"app_name" name:"app_name"`
|
||||
AppType *string `json:"app_type" name:"app_type"`
|
||||
AuthLevel *int `json:"auth_level" name:"auth_level"`
|
||||
Category *string `json:"category" name:"category"`
|
||||
CompanyURL *string `json:"company_url" name:"company_url"`
|
||||
Contact *string `json:"contact" name:"contact"`
|
||||
CoverImg *string `json:"cover_img" name:"cover_img"`
|
||||
Description *string `json:"description" name:"description"`
|
||||
Icon *string `json:"icon" name:"icon"`
|
||||
Screenshots []*string `json:"screenshots" name:"screenshots"`
|
||||
Status *string `json:"status" name:"status"`
|
||||
Tags []*string `json:"tags" name:"tags"`
|
||||
TermsOfService *string `json:"terms_of_service" name:"terms_of_service"`
|
||||
TermsOfServiceLink *string `json:"terms_of_service_link" name:"terms_of_service_link"`
|
||||
URL *string `json:"url" name:"url"`
|
||||
UsageInstructions *string `json:"usage_instructions" name:"usage_instructions"`
|
||||
UsageInstructionsLink *string `json:"usage_instructions_link" name:"usage_instructions_link"`
|
||||
Visibility *string `json:"visibility" name:"visibility"`
|
||||
Zones []*string `json:"zones" name:"zones"`
|
||||
}
|
||||
|
||||
func (v *App) Validate() error {
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
type AppVersion struct {
|
||||
AppID *string `json:"app_id" name:"app_id"`
|
||||
CreateTime *time.Time `json:"create_time" name:"create_time" format:"ISO 8601"`
|
||||
Description *string `json:"description" name:"description"`
|
||||
Name *string `json:"name" name:"name"`
|
||||
ResourceKit *string `json:"resource_kit" name:"resource_kit"`
|
||||
Status *string `json:"status" name:"status"`
|
||||
StatusTime *time.Time `json:"status_time" name:"status_time" format:"ISO 8601"`
|
||||
VersionID *string `json:"version_id" name:"version_id"`
|
||||
}
|
||||
|
||||
func (v *AppVersion) Validate() error {
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
type AppVersionAttachment struct {
|
||||
AttachmentID *string `json:"attachment_id" name:"attachment_id"`
|
||||
AttachmentType *string `json:"attachment_type" name:"attachment_type"`
|
||||
Category *string `json:"category" name:"category"`
|
||||
CreateTime *time.Time `json:"create_time" name:"create_time" format:"ISO 8601"`
|
||||
Filename *string `json:"filename" name:"filename"`
|
||||
Filesize *int `json:"filesize" name:"filesize"`
|
||||
Name *string `json:"name" name:"name"`
|
||||
Owner *string `json:"owner" name:"owner"`
|
||||
ResourceID *string `json:"resource_id" name:"resource_id"`
|
||||
ResourceType *string `json:"resource_type" name:"resource_type"`
|
||||
StatusTime *time.Time `json:"status_time" name:"status_time" format:"ISO 8601"`
|
||||
SubCategory *string `json:"sub_category" name:"sub_category"`
|
||||
}
|
||||
|
||||
func (v *AppVersionAttachment) Validate() error {
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
type Cache struct {
|
||||
AutoBackupTime *int `json:"auto_backup_time" name:"auto_backup_time"`
|
||||
// CacheClass's available values: 0, 1
|
||||
|
|
Loading…
Reference in New Issue