diff --git a/provider.go b/provider.go index 8246dd4..aaf7ac8 100644 --- a/provider.go +++ b/provider.go @@ -5,8 +5,9 @@ import ( "slices" "time" - "github.com/libdns/huaweicloud/sdk/services/dns/v2/model" "github.com/libdns/libdns" + + "github.com/libdns/huaweicloud/sdk/services/dns/v2/model" ) // Provider facilitates DNS record manipulation with Huawei Cloud diff --git a/sdk/core/auth/basic/basic_icredential.go b/sdk/core/auth/basic/basic_icredential.go index c6fe147..43322d7 100644 --- a/sdk/core/auth/basic/basic_icredential.go +++ b/sdk/core/auth/basic/basic_icredential.go @@ -21,6 +21,11 @@ package basic import ( "fmt" + "io/ioutil" + "os" + "strings" + "time" + "github.com/libdns/huaweicloud/sdk/core/auth" "github.com/libdns/huaweicloud/sdk/core/auth/cache" "github.com/libdns/huaweicloud/sdk/core/auth/internal" @@ -28,10 +33,6 @@ import ( "github.com/libdns/huaweicloud/sdk/core/impl" "github.com/libdns/huaweicloud/sdk/core/request" "github.com/libdns/huaweicloud/sdk/core/sdkerr" - "io/ioutil" - "os" - "strings" - "time" ) const ( @@ -320,15 +321,6 @@ func (builder *CredentialsBuilder) WithIdTokenFile(idTokenFile string) *Credenti return builder } -// Deprecated: This function may panic under certain circumstances. Use SafeBuild instead. -func (builder *CredentialsBuilder) Build() *Credentials { - credentials, err := builder.SafeBuild() - if err != nil { - panic(err) - } - return credentials -} - func (builder *CredentialsBuilder) SafeBuild() (*Credentials, error) { if builder.errMap != nil && len(builder.errMap) != 0 { errMsg := "build credentials failed: " diff --git a/sdk/core/auth/derived_icredential.go b/sdk/core/auth/derived_icredential.go index 242c5c6..f477735 100644 --- a/sdk/core/auth/derived_icredential.go +++ b/sdk/core/auth/derived_icredential.go @@ -20,9 +20,10 @@ package auth import ( - "github.com/libdns/huaweicloud/sdk/core/request" "regexp" "strings" + + "github.com/libdns/huaweicloud/sdk/core/request" ) const DefaultEndpointReg = "^[a-z][a-z0-9-]+(\\.[a-z]{2,}-[a-z]+-\\d{1,2})?\\.(my)?(huaweicloud|myhwclouds).(com|cn)" diff --git a/sdk/core/auth/global/global_icredential.go b/sdk/core/auth/global/global_icredential.go index 1f09e61..dc73a6d 100644 --- a/sdk/core/auth/global/global_icredential.go +++ b/sdk/core/auth/global/global_icredential.go @@ -21,6 +21,10 @@ package global import ( "fmt" + "io/ioutil" + "os" + "time" + "github.com/libdns/huaweicloud/sdk/core/auth" "github.com/libdns/huaweicloud/sdk/core/auth/cache" "github.com/libdns/huaweicloud/sdk/core/auth/internal" @@ -28,9 +32,6 @@ import ( "github.com/libdns/huaweicloud/sdk/core/impl" "github.com/libdns/huaweicloud/sdk/core/request" "github.com/libdns/huaweicloud/sdk/core/sdkerr" - "io/ioutil" - "os" - "time" ) const ( @@ -311,15 +312,6 @@ func (builder *CredentialsBuilder) WithIdTokenFile(idTokenFile string) *Credenti return builder } -// Deprecated: This function may panic under certain circumstances. Use SafeBuild instead. -func (builder *CredentialsBuilder) Build() *Credentials { - credentials, err := builder.SafeBuild() - if err != nil { - panic(err) - } - return credentials -} - func (builder *CredentialsBuilder) SafeBuild() (*Credentials, error) { if builder.errMap != nil && len(builder.errMap) != 0 { errMsg := "build credentials failed: " diff --git a/sdk/core/auth/internal/iam_service.go b/sdk/core/auth/internal/iam_service.go index dfe9f08..59d149b 100644 --- a/sdk/core/auth/internal/iam_service.go +++ b/sdk/core/auth/internal/iam_service.go @@ -21,15 +21,16 @@ package internal import ( "errors" + "os" + "reflect" + "strings" + "github.com/libdns/huaweicloud/sdk/core/config" "github.com/libdns/huaweicloud/sdk/core/impl" "github.com/libdns/huaweicloud/sdk/core/request" "github.com/libdns/huaweicloud/sdk/core/response" "github.com/libdns/huaweicloud/sdk/core/sdkerr" "github.com/libdns/huaweicloud/sdk/core/utils" - "os" - "reflect" - "strings" ) const ( diff --git a/sdk/core/auth/internal/metadata.go b/sdk/core/auth/internal/metadata.go index 7c7b2ea..8733191 100644 --- a/sdk/core/auth/internal/metadata.go +++ b/sdk/core/auth/internal/metadata.go @@ -20,11 +20,12 @@ package internal import ( - "github.com/libdns/huaweicloud/sdk/core/sdkerr" - "github.com/libdns/huaweicloud/sdk/core/utils" "io/ioutil" "net/http" "time" + + "github.com/libdns/huaweicloud/sdk/core/sdkerr" + "github.com/libdns/huaweicloud/sdk/core/utils" ) type GetTemporaryCredentialFromMetadataResponse struct { diff --git a/sdk/core/auth/provider/credential_provider.go b/sdk/core/auth/provider/credential_provider.go index ef92c51..0fa5d10 100644 --- a/sdk/core/auth/provider/credential_provider.go +++ b/sdk/core/auth/provider/credential_provider.go @@ -21,9 +21,10 @@ package provider import ( "fmt" + "reflect" + "github.com/libdns/huaweicloud/sdk/core/auth" "github.com/libdns/huaweicloud/sdk/core/sdkerr" - "reflect" ) const ( diff --git a/sdk/core/auth/provider/env_provider.go b/sdk/core/auth/provider/env_provider.go index 52f5ee2..81f2cab 100644 --- a/sdk/core/auth/provider/env_provider.go +++ b/sdk/core/auth/provider/env_provider.go @@ -20,12 +20,13 @@ package provider import ( + "os" + "strings" + "github.com/libdns/huaweicloud/sdk/core/auth" "github.com/libdns/huaweicloud/sdk/core/auth/basic" "github.com/libdns/huaweicloud/sdk/core/auth/global" "github.com/libdns/huaweicloud/sdk/core/sdkerr" - "os" - "strings" ) const ( @@ -70,14 +71,14 @@ func (p *EnvCredentialProvider) GetCredentials() (auth.ICredential, error) { if err != nil { return nil, err } - return builder.Build(), nil + return builder.SafeBuild() } else if strings.HasPrefix(p.credentialType, globalCredentialType) { builder := global.NewCredentialsBuilder().WithDomainId(os.Getenv(domainIdEnvName)) err := fillCommonAttrs(builder, getCommonAttrsFromEnv()) if err != nil { return nil, err } - return builder.Build(), nil + return builder.SafeBuild() } return nil, sdkerr.NewCredentialsTypeError("unsupported credential type: " + p.credentialType) diff --git a/sdk/core/auth/provider/metadata_provider.go b/sdk/core/auth/provider/metadata_provider.go index 706e906..443dc96 100644 --- a/sdk/core/auth/provider/metadata_provider.go +++ b/sdk/core/auth/provider/metadata_provider.go @@ -20,11 +20,12 @@ package provider import ( + "strings" + "github.com/libdns/huaweicloud/sdk/core/auth" "github.com/libdns/huaweicloud/sdk/core/auth/basic" "github.com/libdns/huaweicloud/sdk/core/auth/global" "github.com/libdns/huaweicloud/sdk/core/sdkerr" - "strings" ) type MetadataCredentialProvider struct { @@ -54,18 +55,22 @@ func (p *MetadataCredentialProvider) GetCredentials() (auth.ICredential, error) } if strings.HasPrefix(p.credentialType, basicCredentialType) { - credentials := basic.NewCredentialsBuilder().Build() - err := credentials.UpdateSecurityTokenFromMetadata() + credentials, err := basic.NewCredentialsBuilder().SafeBuild() if err != nil { return nil, err } + if err = credentials.UpdateSecurityTokenFromMetadata(); err != nil { + return nil, err + } return credentials, nil } else if strings.HasPrefix(p.credentialType, globalCredentialType) { - credentials := global.NewCredentialsBuilder().Build() - err := credentials.UpdateSecurityTokenFromMetadata() + credentials, err := global.NewCredentialsBuilder().SafeBuild() if err != nil { return nil, err } + if err = credentials.UpdateSecurityTokenFromMetadata(); err != nil { + return nil, err + } return credentials, nil } diff --git a/sdk/core/auth/provider/profile_provider.go b/sdk/core/auth/provider/profile_provider.go index 2787f09..6bf5cb4 100644 --- a/sdk/core/auth/provider/profile_provider.go +++ b/sdk/core/auth/provider/profile_provider.go @@ -21,8 +21,9 @@ package provider import ( "errors" - "github.com/libdns/huaweicloud/sdk/core/auth" "strings" + + "github.com/libdns/huaweicloud/sdk/core/auth" ) const ( diff --git a/sdk/core/auth/provider/provider_chain.go b/sdk/core/auth/provider/provider_chain.go index ced5ff2..8374f9e 100644 --- a/sdk/core/auth/provider/provider_chain.go +++ b/sdk/core/auth/provider/provider_chain.go @@ -20,9 +20,10 @@ package provider import ( + "strings" + "github.com/libdns/huaweicloud/sdk/core/auth" "github.com/libdns/huaweicloud/sdk/core/sdkerr" - "strings" ) type CredentialProviderChain struct { diff --git a/sdk/core/auth/signer/derived_signer.go b/sdk/core/auth/signer/derived_signer.go index fe77e43..775e44e 100644 --- a/sdk/core/auth/signer/derived_signer.go +++ b/sdk/core/auth/signer/derived_signer.go @@ -24,11 +24,13 @@ import ( "encoding/hex" "errors" "fmt" - "github.com/libdns/huaweicloud/sdk/core/request" - "golang.org/x/crypto/hkdf" "io" "strings" "time" + + "golang.org/x/crypto/hkdf" + + "github.com/libdns/huaweicloud/sdk/core/request" ) const ( diff --git a/sdk/core/auth/signer/iaksksigner.go b/sdk/core/auth/signer/iaksksigner.go index fe17ac8..5b50830 100644 --- a/sdk/core/auth/signer/iaksksigner.go +++ b/sdk/core/auth/signer/iaksksigner.go @@ -21,6 +21,7 @@ package signer import ( "errors" + "github.com/libdns/huaweicloud/sdk/core/auth/signer/algorithm" "github.com/libdns/huaweicloud/sdk/core/request" ) diff --git a/sdk/core/auth/signer/p256_sha256_signer.go b/sdk/core/auth/signer/p256_sha256_signer.go index 652faaa..c5c4313 100644 --- a/sdk/core/auth/signer/p256_sha256_signer.go +++ b/sdk/core/auth/signer/p256_sha256_signer.go @@ -25,8 +25,9 @@ import ( "crypto/elliptic" "encoding/hex" "errors" - "github.com/libdns/huaweicloud/sdk/core/request" "math/big" + + "github.com/libdns/huaweicloud/sdk/core/request" ) const ( diff --git a/sdk/core/auth/signer/signer.go b/sdk/core/auth/signer/signer.go index db5b902..aafc057 100644 --- a/sdk/core/auth/signer/signer.go +++ b/sdk/core/auth/signer/signer.go @@ -9,12 +9,13 @@ import ( "encoding/hex" "errors" "fmt" - "github.com/libdns/huaweicloud/sdk/core/request" "net/url" "reflect" "sort" "strings" "time" + + "github.com/libdns/huaweicloud/sdk/core/request" ) const ( diff --git a/sdk/core/config/http_config.go b/sdk/core/config/http_config.go index 24bd805..2b58b2a 100644 --- a/sdk/core/config/http_config.go +++ b/sdk/core/config/http_config.go @@ -22,11 +22,12 @@ package config import ( "context" "fmt" - "github.com/libdns/huaweicloud/sdk/core/auth/signer/algorithm" - "github.com/libdns/huaweicloud/sdk/core/httphandler" "net" "net/http" "time" + + "github.com/libdns/huaweicloud/sdk/core/auth/signer/algorithm" + "github.com/libdns/huaweicloud/sdk/core/httphandler" ) const ( diff --git a/sdk/core/def/multipart.go b/sdk/core/def/multipart.go index bcfb0d6..f19b3be 100644 --- a/sdk/core/def/multipart.go +++ b/sdk/core/def/multipart.go @@ -22,13 +22,14 @@ package def import ( "errors" "fmt" - "github.com/libdns/huaweicloud/sdk/core/converter" "io" "mime/multipart" "net/textproto" "os" "path/filepath" "strings" + + "github.com/libdns/huaweicloud/sdk/core/converter" ) var quoteEscape = strings.NewReplacer("\\", "\\\\", `"`, "\\\"") diff --git a/sdk/core/hc_http_client.go b/sdk/core/hc_http_client.go index 891c8a1..f10662d 100644 --- a/sdk/core/hc_http_client.go +++ b/sdk/core/hc_http_client.go @@ -24,6 +24,12 @@ import ( "encoding/xml" "errors" "fmt" + "net" + "net/url" + "reflect" + "strings" + "sync/atomic" + "github.com/libdns/huaweicloud/sdk/core/auth" "github.com/libdns/huaweicloud/sdk/core/converter" "github.com/libdns/huaweicloud/sdk/core/def" @@ -34,11 +40,6 @@ import ( "github.com/libdns/huaweicloud/sdk/core/response" "github.com/libdns/huaweicloud/sdk/core/sdkerr" "github.com/libdns/huaweicloud/sdk/core/utils" - "net" - "net/url" - "reflect" - "strings" - "sync/atomic" ) const ( @@ -85,11 +86,6 @@ func (hc *HcHttpClient) GetCredential() auth.ICredential { return hc.credential } -// Deprecated: This function will be removed in the future version. Use WithExtraHeaders instead. -func (hc *HcHttpClient) PreInvoke(headers map[string]string) *HcHttpClient { - return hc.WithExtraHeaders(headers) -} - func (hc *HcHttpClient) Sync(req interface{}, reqDef *def.HttpRequestDef) (interface{}, error) { exg := &exchange.SdkExchange{ ApiReference: &exchange.ApiReference{}, diff --git a/sdk/core/hc_http_client_builder.go b/sdk/core/hc_http_client_builder.go index 32484fb..3c6c31f 100644 --- a/sdk/core/hc_http_client_builder.go +++ b/sdk/core/hc_http_client_builder.go @@ -21,14 +21,15 @@ package core import ( "fmt" + "reflect" + "strings" + "github.com/libdns/huaweicloud/sdk/core/auth" "github.com/libdns/huaweicloud/sdk/core/auth/provider" "github.com/libdns/huaweicloud/sdk/core/config" "github.com/libdns/huaweicloud/sdk/core/impl" "github.com/libdns/huaweicloud/sdk/core/region" "github.com/libdns/huaweicloud/sdk/core/sdkerr" - "reflect" - "strings" ) type HcHttpClientBuilder struct { @@ -59,11 +60,6 @@ func (builder *HcHttpClientBuilder) WithDerivedAuthServiceName(derivedAuthServic return builder } -// Deprecated: As of 0.1.27, because of the support of the multi-endpoint feature, use WithEndpoints instead -func (builder *HcHttpClientBuilder) WithEndpoint(endpoint string) *HcHttpClientBuilder { - return builder.WithEndpoints([]string{endpoint}) -} - func (builder *HcHttpClientBuilder) WithEndpoints(endpoints []string) *HcHttpClientBuilder { builder.endpoints = endpoints return builder @@ -89,8 +85,7 @@ func (builder *HcHttpClientBuilder) WithErrorHandler(errorHandler sdkerr.ErrorHa return builder } -// Deprecated: This function may panic under certain circumstances. Use SafeBuild instead. -func (builder *HcHttpClientBuilder) Build() *HcHttpClient { +func (builder *HcHttpClientBuilder) SafeBuild() (client *HcHttpClient, err error) { if builder.httpConfig == nil { builder.httpConfig = config.DefaultHttpConfig() } @@ -101,7 +96,7 @@ func (builder *HcHttpClientBuilder) Build() *HcHttpClient { p := provider.DefaultCredentialProviderChain(builder.CredentialsType[0]) credentials, err := p.GetCredentials() if err != nil { - panic(err) + return nil, err } builder.credentials = credentials } @@ -119,7 +114,7 @@ func (builder *HcHttpClientBuilder) Build() *HcHttpClient { } } if !match { - panic(fmt.Errorf("need credential type is %s, actually is %s", builder.CredentialsType, givenCredentialsType)) + return nil, fmt.Errorf("need credential type is %s, actually is %s", builder.CredentialsType, givenCredentialsType) } if builder.region != nil { @@ -141,15 +136,5 @@ func (builder *HcHttpClientBuilder) Build() *HcHttpClient { WithEndpoints(builder.endpoints). WithCredential(builder.credentials). WithErrorHandler(builder.errorHandler) - return hcHttpClient -} - -func (builder *HcHttpClientBuilder) SafeBuild() (client *HcHttpClient, err error) { - defer func() { - if r := recover(); r != nil { - err = fmt.Errorf("%v", r) - } - }() - client = builder.Build() - return + return hcHttpClient, nil } diff --git a/sdk/core/impl/default_http_client.go b/sdk/core/impl/default_http_client.go index 596cd2a..d347cfa 100644 --- a/sdk/core/impl/default_http_client.go +++ b/sdk/core/impl/default_http_client.go @@ -22,18 +22,19 @@ package impl import ( "bytes" "crypto/tls" - "github.com/libdns/huaweicloud/sdk/core/config" - "github.com/libdns/huaweicloud/sdk/core/exchange" - "github.com/libdns/huaweicloud/sdk/core/httphandler" - "github.com/libdns/huaweicloud/sdk/core/progress" - "github.com/libdns/huaweicloud/sdk/core/request" - "github.com/libdns/huaweicloud/sdk/core/response" "io/ioutil" "net/http" "net/url" "strconv" "strings" "time" + + "github.com/libdns/huaweicloud/sdk/core/config" + "github.com/libdns/huaweicloud/sdk/core/exchange" + "github.com/libdns/huaweicloud/sdk/core/httphandler" + "github.com/libdns/huaweicloud/sdk/core/progress" + "github.com/libdns/huaweicloud/sdk/core/request" + "github.com/libdns/huaweicloud/sdk/core/response" ) type DefaultHttpClient struct { diff --git a/sdk/core/invoker/invoker.go b/sdk/core/invoker/invoker.go index 90e208f..a8cb0bc 100644 --- a/sdk/core/invoker/invoker.go +++ b/sdk/core/invoker/invoker.go @@ -67,11 +67,6 @@ func (b *BaseInvoker) ReplaceCredentialWhen(fun func(auth.ICredential) auth.ICre return b } -// Deprecated: This function will be removed in the future version, use AddHeaders instead. -func (b *BaseInvoker) AddHeader(headers map[string]string) *BaseInvoker { - return b.AddHeaders(headers) -} - func (b *BaseInvoker) AddHeaders(headers map[string]string) *BaseInvoker { if headers != nil { for k, v := range headers { diff --git a/sdk/core/region/region.go b/sdk/core/region/region.go index 7467387..95bacce 100644 --- a/sdk/core/region/region.go +++ b/sdk/core/region/region.go @@ -31,11 +31,6 @@ func NewRegion(id string, endpoints ...string) *Region { } } -// Deprecated: As of 0.1.27, because of the support of the multi-endpoint feature, use WithEndpointsOverride instead -func (r *Region) WithEndpointOverride(endpoint string) *Region { - return r.WithEndpointsOverride([]string{endpoint}) -} - func (r *Region) WithEndpointsOverride(endpoints []string) *Region { r.Endpoints = endpoints return r diff --git a/sdk/core/request/default_http_request.go b/sdk/core/request/default_http_request.go index 7e4bf1d..3148111 100644 --- a/sdk/core/request/default_http_request.go +++ b/sdk/core/request/default_http_request.go @@ -25,9 +25,6 @@ import ( "encoding/xml" "errors" "fmt" - "github.com/libdns/huaweicloud/sdk/core/auth/signer/algorithm" - "github.com/libdns/huaweicloud/sdk/core/converter" - "github.com/libdns/huaweicloud/sdk/core/progress" "io" "mime/multipart" "net/http" @@ -37,7 +34,10 @@ import ( "strconv" "strings" + "github.com/libdns/huaweicloud/sdk/core/auth/signer/algorithm" + "github.com/libdns/huaweicloud/sdk/core/converter" "github.com/libdns/huaweicloud/sdk/core/def" + "github.com/libdns/huaweicloud/sdk/core/progress" ) type DefaultHttpRequest struct { diff --git a/sdk/core/request/http_request_builder.go b/sdk/core/request/http_request_builder.go index 4467b89..45605cd 100644 --- a/sdk/core/request/http_request_builder.go +++ b/sdk/core/request/http_request_builder.go @@ -20,11 +20,12 @@ package request import ( + "reflect" + "strings" + "github.com/libdns/huaweicloud/sdk/core/auth/signer/algorithm" "github.com/libdns/huaweicloud/sdk/core/def" "github.com/libdns/huaweicloud/sdk/core/progress" - "reflect" - "strings" ) type HttpRequestBuilder struct { diff --git a/sdk/core/sdkerr/errors.go b/sdk/core/sdkerr/errors.go index 5bd204a..7e3a017 100644 --- a/sdk/core/sdkerr/errors.go +++ b/sdk/core/sdkerr/errors.go @@ -21,7 +21,7 @@ package sdkerr import ( "fmt" - "io/ioutil" + "io" "net/http" "github.com/libdns/huaweicloud/sdk/core/utils" @@ -110,7 +110,7 @@ func NewServiceResponseError(resp *http.Response) *ServiceResponseError { sr := &ServiceResponseError{} defer resp.Body.Close() - data, err := ioutil.ReadAll(resp.Body) + data, err := io.ReadAll(resp.Body) if err != nil { sr.ErrorMessage = err.Error() return sr diff --git a/sdk/core/sdktime/sdk_time.go b/sdk/core/sdktime/sdk_time.go index 6310270..62c5831 100644 --- a/sdk/core/sdktime/sdk_time.go +++ b/sdk/core/sdktime/sdk_time.go @@ -69,11 +69,11 @@ func (t *SdkTime) UnmarshalJSON(data []byte) error { return err } -func (t SdkTime) MarshalJSON() ([]byte, error) { +func (t *SdkTime) MarshalJSON() ([]byte, error) { rs := []byte(fmt.Sprintf(`"%s"`, t.String())) return rs, nil } -func (t SdkTime) String() string { - return time.Time(t).Format(`2006-01-02T15:04:05Z`) +func (t *SdkTime) String() string { + return time.Time(*t).Format(`2006-01-02T15:04:05Z`) } diff --git a/sdk/services/dns/v2/dns_client.go b/sdk/services/dns/v2/dns_client.go index c22e603..fb0c464 100644 --- a/sdk/services/dns/v2/dns_client.go +++ b/sdk/services/dns/v2/dns_client.go @@ -2,7 +2,6 @@ package v2 import ( httpclient "github.com/libdns/huaweicloud/sdk/core" - "github.com/libdns/huaweicloud/sdk/core/invoker" "github.com/libdns/huaweicloud/sdk/services/dns/v2/model" ) @@ -19,428 +18,21 @@ func DnsClientBuilder() *httpclient.HcHttpClientBuilder { return builder } -// CreateCustomLine 创建单个自定义线路 -// -// 创建单个自定义线路 -// -// Please refer to HUAWEI cloud API Explorer for details. -func (c *DnsClient) CreateCustomLine(request *model.CreateCustomLineRequest) (*model.CreateCustomLineResponse, error) { - requestDef := GenReqDefForCreateCustomLine() - - if resp, err := c.HcClient.Sync(request, requestDef); err != nil { - return nil, err - } else { - return resp.(*model.CreateCustomLineResponse), nil - } -} - -// CreateCustomLineInvoker 创建单个自定义线路 -func (c *DnsClient) CreateCustomLineInvoker(request *model.CreateCustomLineRequest) *CreateCustomLineInvoker { - requestDef := GenReqDefForCreateCustomLine() - return &CreateCustomLineInvoker{invoker.NewBaseInvoker(c.HcClient, request, requestDef)} -} - -// CreateLineGroup 创建线路分组 -// -// 创建一个线路分组。 该接口部分区域未上线、如需使用请提交工单申请开通。 -// -// Please refer to HUAWEI cloud API Explorer for details. -func (c *DnsClient) CreateLineGroup(request *model.CreateLineGroupRequest) (*model.CreateLineGroupResponse, error) { - requestDef := GenReqDefForCreateLineGroup() - - if resp, err := c.HcClient.Sync(request, requestDef); err != nil { - return nil, err - } else { - return resp.(*model.CreateLineGroupResponse), nil - } -} - -// CreateLineGroupInvoker 创建线路分组 -func (c *DnsClient) CreateLineGroupInvoker(request *model.CreateLineGroupRequest) *CreateLineGroupInvoker { - requestDef := GenReqDefForCreateLineGroup() - return &CreateLineGroupInvoker{invoker.NewBaseInvoker(c.HcClient, request, requestDef)} -} - -// DeleteCustomLine 删除单个自定义线路 -// -// 删除单个自定义线路 -// -// Please refer to HUAWEI cloud API Explorer for details. -func (c *DnsClient) DeleteCustomLine(request *model.DeleteCustomLineRequest) (*model.DeleteCustomLineResponse, error) { - requestDef := GenReqDefForDeleteCustomLine() - - if resp, err := c.HcClient.Sync(request, requestDef); err != nil { - return nil, err - } else { - return resp.(*model.DeleteCustomLineResponse), nil - } -} - -// DeleteCustomLineInvoker 删除单个自定义线路 -func (c *DnsClient) DeleteCustomLineInvoker(request *model.DeleteCustomLineRequest) *DeleteCustomLineInvoker { - requestDef := GenReqDefForDeleteCustomLine() - return &DeleteCustomLineInvoker{invoker.NewBaseInvoker(c.HcClient, request, requestDef)} -} - -// DeleteLineGroup 删除线路分组 -// -// 删除单个线路分组。该接口部分区域未上线、如需使用请提交工单申请开通。 -// -// Please refer to HUAWEI cloud API Explorer for details. -func (c *DnsClient) DeleteLineGroup(request *model.DeleteLineGroupRequest) (*model.DeleteLineGroupResponse, error) { - requestDef := GenReqDefForDeleteLineGroup() - - if resp, err := c.HcClient.Sync(request, requestDef); err != nil { - return nil, err - } else { - return resp.(*model.DeleteLineGroupResponse), nil - } -} - -// DeleteLineGroupInvoker 删除线路分组 -func (c *DnsClient) DeleteLineGroupInvoker(request *model.DeleteLineGroupRequest) *DeleteLineGroupInvoker { - requestDef := GenReqDefForDeleteLineGroup() - return &DeleteLineGroupInvoker{invoker.NewBaseInvoker(c.HcClient, request, requestDef)} -} - -// ListApiVersions 查询所有的云解析服务API版本号 -// -// 查询所有的云解析服务API版本号列表 -// -// Please refer to HUAWEI cloud API Explorer for details. -func (c *DnsClient) ListApiVersions(request *model.ListApiVersionsRequest) (*model.ListApiVersionsResponse, error) { - requestDef := GenReqDefForListApiVersions() - - if resp, err := c.HcClient.Sync(request, requestDef); err != nil { - return nil, err - } else { - return resp.(*model.ListApiVersionsResponse), nil - } -} - -// ListApiVersionsInvoker 查询所有的云解析服务API版本号 -func (c *DnsClient) ListApiVersionsInvoker(request *model.ListApiVersionsRequest) *ListApiVersionsInvoker { - requestDef := GenReqDefForListApiVersions() - return &ListApiVersionsInvoker{invoker.NewBaseInvoker(c.HcClient, request, requestDef)} -} - -// ListCustomLine 查询自定义线路 -// -// 查询自定义线路 -// -// Please refer to HUAWEI cloud API Explorer for details. -func (c *DnsClient) ListCustomLine(request *model.ListCustomLineRequest) (*model.ListCustomLineResponse, error) { - requestDef := GenReqDefForListCustomLine() - - if resp, err := c.HcClient.Sync(request, requestDef); err != nil { - return nil, err - } else { - return resp.(*model.ListCustomLineResponse), nil - } -} - -// ListCustomLineInvoker 查询自定义线路 -func (c *DnsClient) ListCustomLineInvoker(request *model.ListCustomLineRequest) *ListCustomLineInvoker { - requestDef := GenReqDefForListCustomLine() - return &ListCustomLineInvoker{invoker.NewBaseInvoker(c.HcClient, request, requestDef)} -} - -// ListLineGroups 查询线路分组列表 -// -// 查询线路分组列表。该接口部分区域未上线、如需使用请提交工单申请开通。 -// -// Please refer to HUAWEI cloud API Explorer for details. -func (c *DnsClient) ListLineGroups(request *model.ListLineGroupsRequest) (*model.ListLineGroupsResponse, error) { - requestDef := GenReqDefForListLineGroups() - - if resp, err := c.HcClient.Sync(request, requestDef); err != nil { - return nil, err - } else { - return resp.(*model.ListLineGroupsResponse), nil - } -} - -// ListLineGroupsInvoker 查询线路分组列表 -func (c *DnsClient) ListLineGroupsInvoker(request *model.ListLineGroupsRequest) *ListLineGroupsInvoker { - requestDef := GenReqDefForListLineGroups() - return &ListLineGroupsInvoker{invoker.NewBaseInvoker(c.HcClient, request, requestDef)} -} - -// ListNameServers 查询名称服务器列表 -// -// 查询名称服务器列表 -// -// Please refer to HUAWEI cloud API Explorer for details. -func (c *DnsClient) ListNameServers(request *model.ListNameServersRequest) (*model.ListNameServersResponse, error) { - requestDef := GenReqDefForListNameServers() - - if resp, err := c.HcClient.Sync(request, requestDef); err != nil { - return nil, err - } else { - return resp.(*model.ListNameServersResponse), nil - } -} - -// ListNameServersInvoker 查询名称服务器列表 -func (c *DnsClient) ListNameServersInvoker(request *model.ListNameServersRequest) *ListNameServersInvoker { - requestDef := GenReqDefForListNameServers() - return &ListNameServersInvoker{invoker.NewBaseInvoker(c.HcClient, request, requestDef)} -} - -// ShowApiInfo 查询指定的云解析服务API版本号 -// -// 查询指定的云解析服务API版本号 -// -// Please refer to HUAWEI cloud API Explorer for details. -func (c *DnsClient) ShowApiInfo(request *model.ShowApiInfoRequest) (*model.ShowApiInfoResponse, error) { - requestDef := GenReqDefForShowApiInfo() - - if resp, err := c.HcClient.Sync(request, requestDef); err != nil { - return nil, err - } else { - return resp.(*model.ShowApiInfoResponse), nil - } -} - -// ShowApiInfoInvoker 查询指定的云解析服务API版本号 -func (c *DnsClient) ShowApiInfoInvoker(request *model.ShowApiInfoRequest) *ShowApiInfoInvoker { - requestDef := GenReqDefForShowApiInfo() - return &ShowApiInfoInvoker{invoker.NewBaseInvoker(c.HcClient, request, requestDef)} -} - -// ShowDomainQuota 查询租户配额 -// -// 查询单租户在DNS服务下的资源配额,包括公网zone配额、内网zone配额、Record Set配额、PTR Record配额、入站终端节点配额、出站终端节点配额、自定义线路配额、线路分组配额等。 -// -// Please refer to HUAWEI cloud API Explorer for details. -func (c *DnsClient) ShowDomainQuota(request *model.ShowDomainQuotaRequest) (*model.ShowDomainQuotaResponse, error) { - requestDef := GenReqDefForShowDomainQuota() - - if resp, err := c.HcClient.Sync(request, requestDef); err != nil { - return nil, err - } else { - return resp.(*model.ShowDomainQuotaResponse), nil - } -} - -// ShowDomainQuotaInvoker 查询租户配额 -func (c *DnsClient) ShowDomainQuotaInvoker(request *model.ShowDomainQuotaRequest) *ShowDomainQuotaInvoker { - requestDef := GenReqDefForShowDomainQuota() - return &ShowDomainQuotaInvoker{invoker.NewBaseInvoker(c.HcClient, request, requestDef)} -} - -// ShowLineGroup 查询线路分组 -// -// 查询线路分组。该接口部分区域未上线、如需使用请提交工单申请开通。 -// -// Please refer to HUAWEI cloud API Explorer for details. -func (c *DnsClient) ShowLineGroup(request *model.ShowLineGroupRequest) (*model.ShowLineGroupResponse, error) { - requestDef := GenReqDefForShowLineGroup() - - if resp, err := c.HcClient.Sync(request, requestDef); err != nil { - return nil, err - } else { - return resp.(*model.ShowLineGroupResponse), nil - } -} - -// ShowLineGroupInvoker 查询线路分组 -func (c *DnsClient) ShowLineGroupInvoker(request *model.ShowLineGroupRequest) *ShowLineGroupInvoker { - requestDef := GenReqDefForShowLineGroup() - return &ShowLineGroupInvoker{invoker.NewBaseInvoker(c.HcClient, request, requestDef)} -} - -// UpdateCustomLine 更新单个自定义线路 -// -// 更新单个自定义线路 -// -// Please refer to HUAWEI cloud API Explorer for details. -func (c *DnsClient) UpdateCustomLine(request *model.UpdateCustomLineRequest) (*model.UpdateCustomLineResponse, error) { - requestDef := GenReqDefForUpdateCustomLine() - - if resp, err := c.HcClient.Sync(request, requestDef); err != nil { - return nil, err - } else { - return resp.(*model.UpdateCustomLineResponse), nil - } -} - -// UpdateCustomLineInvoker 更新单个自定义线路 -func (c *DnsClient) UpdateCustomLineInvoker(request *model.UpdateCustomLineRequest) *UpdateCustomLineInvoker { - requestDef := GenReqDefForUpdateCustomLine() - return &UpdateCustomLineInvoker{invoker.NewBaseInvoker(c.HcClient, request, requestDef)} -} - -// UpdateLineGroups 更新线路分组 -// -// 更新单个线路分组。该接口部分区域未上线、如需使用请提交工单申请开通。 -// -// Please refer to HUAWEI cloud API Explorer for details. -func (c *DnsClient) UpdateLineGroups(request *model.UpdateLineGroupsRequest) (*model.UpdateLineGroupsResponse, error) { - requestDef := GenReqDefForUpdateLineGroups() - - if resp, err := c.HcClient.Sync(request, requestDef); err != nil { - return nil, err - } else { - return resp.(*model.UpdateLineGroupsResponse), nil - } -} - -// UpdateLineGroupsInvoker 更新线路分组 -func (c *DnsClient) UpdateLineGroupsInvoker(request *model.UpdateLineGroupsRequest) *UpdateLineGroupsInvoker { - requestDef := GenReqDefForUpdateLineGroups() - return &UpdateLineGroupsInvoker{invoker.NewBaseInvoker(c.HcClient, request, requestDef)} -} - -// CreateEipRecordSet 设置弹性IP的PTR记录 -// -// 设置弹性IP的PTR记录 -// -// Please refer to HUAWEI cloud API Explorer for details. -func (c *DnsClient) CreateEipRecordSet(request *model.CreateEipRecordSetRequest) (*model.CreateEipRecordSetResponse, error) { - requestDef := GenReqDefForCreateEipRecordSet() - - if resp, err := c.HcClient.Sync(request, requestDef); err != nil { - return nil, err - } else { - return resp.(*model.CreateEipRecordSetResponse), nil - } -} - -// CreateEipRecordSetInvoker 设置弹性IP的PTR记录 -func (c *DnsClient) CreateEipRecordSetInvoker(request *model.CreateEipRecordSetRequest) *CreateEipRecordSetInvoker { - requestDef := GenReqDefForCreateEipRecordSet() - return &CreateEipRecordSetInvoker{invoker.NewBaseInvoker(c.HcClient, request, requestDef)} -} - -// ListPtrRecords 查询租户弹性IP的PTR记录列表 -// -// 查询租户弹性IP的PTR记录列表 -// -// Please refer to HUAWEI cloud API Explorer for details. -func (c *DnsClient) ListPtrRecords(request *model.ListPtrRecordsRequest) (*model.ListPtrRecordsResponse, error) { - requestDef := GenReqDefForListPtrRecords() - - if resp, err := c.HcClient.Sync(request, requestDef); err != nil { - return nil, err - } else { - return resp.(*model.ListPtrRecordsResponse), nil - } -} - -// ListPtrRecordsInvoker 查询租户弹性IP的PTR记录列表 -func (c *DnsClient) ListPtrRecordsInvoker(request *model.ListPtrRecordsRequest) *ListPtrRecordsInvoker { - requestDef := GenReqDefForListPtrRecords() - return &ListPtrRecordsInvoker{invoker.NewBaseInvoker(c.HcClient, request, requestDef)} -} - -// RestorePtrRecord 将弹性IP的PTR记录恢复为默认值 -// -// 将弹性IP的PTR记录恢复为默认值 -// -// Please refer to HUAWEI cloud API Explorer for details. -func (c *DnsClient) RestorePtrRecord(request *model.RestorePtrRecordRequest) (*model.RestorePtrRecordResponse, error) { - requestDef := GenReqDefForRestorePtrRecord() - - if resp, err := c.HcClient.Sync(request, requestDef); err != nil { - return nil, err - } else { - return resp.(*model.RestorePtrRecordResponse), nil - } -} - -// RestorePtrRecordInvoker 将弹性IP的PTR记录恢复为默认值 -func (c *DnsClient) RestorePtrRecordInvoker(request *model.RestorePtrRecordRequest) *RestorePtrRecordInvoker { - requestDef := GenReqDefForRestorePtrRecord() - return &RestorePtrRecordInvoker{invoker.NewBaseInvoker(c.HcClient, request, requestDef)} -} - -// ShowPtrRecordSet 查询单个弹性IP的PTR记录 -// -// 查询单个弹性IP的PTR记录 -// -// Please refer to HUAWEI cloud API Explorer for details. -func (c *DnsClient) ShowPtrRecordSet(request *model.ShowPtrRecordSetRequest) (*model.ShowPtrRecordSetResponse, error) { - requestDef := GenReqDefForShowPtrRecordSet() - - if resp, err := c.HcClient.Sync(request, requestDef); err != nil { - return nil, err - } else { - return resp.(*model.ShowPtrRecordSetResponse), nil - } -} - -// ShowPtrRecordSetInvoker 查询单个弹性IP的PTR记录 -func (c *DnsClient) ShowPtrRecordSetInvoker(request *model.ShowPtrRecordSetRequest) *ShowPtrRecordSetInvoker { - requestDef := GenReqDefForShowPtrRecordSet() - return &ShowPtrRecordSetInvoker{invoker.NewBaseInvoker(c.HcClient, request, requestDef)} -} - -// UpdatePtrRecord 修改弹性IP的PTR记录 -// -// 修改弹性IP的PTR记录 -// -// Please refer to HUAWEI cloud API Explorer for details. -func (c *DnsClient) UpdatePtrRecord(request *model.UpdatePtrRecordRequest) (*model.UpdatePtrRecordResponse, error) { - requestDef := GenReqDefForUpdatePtrRecord() - - if resp, err := c.HcClient.Sync(request, requestDef); err != nil { - return nil, err - } else { - return resp.(*model.UpdatePtrRecordResponse), nil - } -} - -// UpdatePtrRecordInvoker 修改弹性IP的PTR记录 -func (c *DnsClient) UpdatePtrRecordInvoker(request *model.UpdatePtrRecordRequest) *UpdatePtrRecordInvoker { - requestDef := GenReqDefForUpdatePtrRecord() - return &UpdatePtrRecordInvoker{invoker.NewBaseInvoker(c.HcClient, request, requestDef)} -} - -// BatchDeleteRecordSetWithLine 批量删除某个Zone下的Record Set资源 -// -// 批量删除某个Zone下的Record Set资源,当删除的资源不存在时,则默认删除成功。 -// 响应结果中只包含本次实际删除的资源。 -// -// Please refer to HUAWEI cloud API Explorer for details. -func (c *DnsClient) BatchDeleteRecordSetWithLine(request *model.BatchDeleteRecordSetWithLineRequest) (*model.BatchDeleteRecordSetWithLineResponse, error) { - requestDef := GenReqDefForBatchDeleteRecordSetWithLine() - - if resp, err := c.HcClient.Sync(request, requestDef); err != nil { - return nil, err - } else { - return resp.(*model.BatchDeleteRecordSetWithLineResponse), nil - } -} - -// BatchDeleteRecordSetWithLineInvoker 批量删除某个Zone下的Record Set资源 -func (c *DnsClient) BatchDeleteRecordSetWithLineInvoker(request *model.BatchDeleteRecordSetWithLineRequest) *BatchDeleteRecordSetWithLineInvoker { - requestDef := GenReqDefForBatchDeleteRecordSetWithLine() - return &BatchDeleteRecordSetWithLineInvoker{invoker.NewBaseInvoker(c.HcClient, request, requestDef)} -} - -// BatchUpdateRecordSetWithLine 批量修改RecordSet +// ListRecordSetsByZone 查询单个Zone下Record Set列表 // -// 批量修改RecordSet。属于原子性操作,请求Record Set将全部完成修改,或不做任何修改。 -// 仅公网Zone支持。 +// 查询单个Zone下Record Set列表 // // Please refer to HUAWEI cloud API Explorer for details. -func (c *DnsClient) BatchUpdateRecordSetWithLine(request *model.BatchUpdateRecordSetWithLineRequest) (*model.BatchUpdateRecordSetWithLineResponse, error) { - requestDef := GenReqDefForBatchUpdateRecordSetWithLine() +func (c *DnsClient) ListRecordSetsByZone(request *model.ListRecordSetsByZoneRequest) (*model.ListRecordSetsByZoneResponse, error) { + requestDef := GenReqDefForListRecordSetsByZone() if resp, err := c.HcClient.Sync(request, requestDef); err != nil { return nil, err } else { - return resp.(*model.BatchUpdateRecordSetWithLineResponse), nil + return resp.(*model.ListRecordSetsByZoneResponse), nil } } -// BatchUpdateRecordSetWithLineInvoker 批量修改RecordSet -func (c *DnsClient) BatchUpdateRecordSetWithLineInvoker(request *model.BatchUpdateRecordSetWithLineRequest) *BatchUpdateRecordSetWithLineInvoker { - requestDef := GenReqDefForBatchUpdateRecordSetWithLine() - return &BatchUpdateRecordSetWithLineInvoker{invoker.NewBaseInvoker(c.HcClient, request, requestDef)} -} - // CreateRecordSet 创建单个Record Set // // 创建单个Record Set @@ -456,722 +48,32 @@ func (c *DnsClient) CreateRecordSet(request *model.CreateRecordSetRequest) (*mod } } -// CreateRecordSetInvoker 创建单个Record Set -func (c *DnsClient) CreateRecordSetInvoker(request *model.CreateRecordSetRequest) *CreateRecordSetInvoker { - requestDef := GenReqDefForCreateRecordSet() - return &CreateRecordSetInvoker{invoker.NewBaseInvoker(c.HcClient, request, requestDef)} -} - -// CreateRecordSetWithBatchLines 批量线路创建RecordSet +// UpdateRecordSet 修改单个Record Set // -// 批量线路创建RecordSet。属于原子性操作,如果存在一个参数校验不通过,则创建失败。仅公网Zone支持。 +// 修改单个Record Set // // Please refer to HUAWEI cloud API Explorer for details. -func (c *DnsClient) CreateRecordSetWithBatchLines(request *model.CreateRecordSetWithBatchLinesRequest) (*model.CreateRecordSetWithBatchLinesResponse, error) { - requestDef := GenReqDefForCreateRecordSetWithBatchLines() +func (c *DnsClient) UpdateRecordSet(request *model.UpdateRecordSetRequest) (*model.UpdateRecordSetResponse, error) { + requestDef := GenReqDefForUpdateRecordSet() if resp, err := c.HcClient.Sync(request, requestDef); err != nil { return nil, err } else { - return resp.(*model.CreateRecordSetWithBatchLinesResponse), nil + return resp.(*model.UpdateRecordSetResponse), nil } } -// CreateRecordSetWithBatchLinesInvoker 批量线路创建RecordSet -func (c *DnsClient) CreateRecordSetWithBatchLinesInvoker(request *model.CreateRecordSetWithBatchLinesRequest) *CreateRecordSetWithBatchLinesInvoker { - requestDef := GenReqDefForCreateRecordSetWithBatchLines() - return &CreateRecordSetWithBatchLinesInvoker{invoker.NewBaseInvoker(c.HcClient, request, requestDef)} -} - -// CreateRecordSetWithLine 创建单个Record Set +// DeleteRecordSet 删除单个Record Set // -// 创建单个Record Set,仅适用于公网DNS +// 删除单个Record Set。删除有添加智能解析的记录集时,需要用Record Set多线路管理模块中删除接口进行删除。 // // Please refer to HUAWEI cloud API Explorer for details. -func (c *DnsClient) CreateRecordSetWithLine(request *model.CreateRecordSetWithLineRequest) (*model.CreateRecordSetWithLineResponse, error) { - requestDef := GenReqDefForCreateRecordSetWithLine() +func (c *DnsClient) DeleteRecordSet(request *model.DeleteRecordSetRequest) (*model.DeleteRecordSetResponse, error) { + requestDef := GenReqDefForDeleteRecordSet() if resp, err := c.HcClient.Sync(request, requestDef); err != nil { return nil, err } else { - return resp.(*model.CreateRecordSetWithLineResponse), nil + return resp.(*model.DeleteRecordSetResponse), nil } } - -// CreateRecordSetWithLineInvoker 创建单个Record Set -func (c *DnsClient) CreateRecordSetWithLineInvoker(request *model.CreateRecordSetWithLineRequest) *CreateRecordSetWithLineInvoker { - requestDef := GenReqDefForCreateRecordSetWithLine() - return &CreateRecordSetWithLineInvoker{invoker.NewBaseInvoker(c.HcClient, request, requestDef)} -} - -// DeleteRecordSet 删除单个Record Set -// -// 删除单个Record Set。删除有添加智能解析的记录集时,需要用Record Set多线路管理模块中删除接口进行删除。 -// -// Please refer to HUAWEI cloud API Explorer for details. -func (c *DnsClient) DeleteRecordSet(request *model.DeleteRecordSetRequest) (*model.DeleteRecordSetResponse, error) { - requestDef := GenReqDefForDeleteRecordSet() - - if resp, err := c.HcClient.Sync(request, requestDef); err != nil { - return nil, err - } else { - return resp.(*model.DeleteRecordSetResponse), nil - } -} - -// DeleteRecordSetInvoker 删除单个Record Set -func (c *DnsClient) DeleteRecordSetInvoker(request *model.DeleteRecordSetRequest) *DeleteRecordSetInvoker { - requestDef := GenReqDefForDeleteRecordSet() - return &DeleteRecordSetInvoker{invoker.NewBaseInvoker(c.HcClient, request, requestDef)} -} - -// DeleteRecordSets 删除单个Record Set -// -// 删除单个Record Set -// -// Please refer to HUAWEI cloud API Explorer for details. -func (c *DnsClient) DeleteRecordSets(request *model.DeleteRecordSetsRequest) (*model.DeleteRecordSetsResponse, error) { - requestDef := GenReqDefForDeleteRecordSets() - - if resp, err := c.HcClient.Sync(request, requestDef); err != nil { - return nil, err - } else { - return resp.(*model.DeleteRecordSetsResponse), nil - } -} - -// DeleteRecordSetsInvoker 删除单个Record Set -func (c *DnsClient) DeleteRecordSetsInvoker(request *model.DeleteRecordSetsRequest) *DeleteRecordSetsInvoker { - requestDef := GenReqDefForDeleteRecordSets() - return &DeleteRecordSetsInvoker{invoker.NewBaseInvoker(c.HcClient, request, requestDef)} -} - -// ListRecordSets 查询租户Record Set资源列表 -// -// 查询租户Record Set资源列表 -// -// Please refer to HUAWEI cloud API Explorer for details. -func (c *DnsClient) ListRecordSets(request *model.ListRecordSetsRequest) (*model.ListRecordSetsResponse, error) { - requestDef := GenReqDefForListRecordSets() - - if resp, err := c.HcClient.Sync(request, requestDef); err != nil { - return nil, err - } else { - return resp.(*model.ListRecordSetsResponse), nil - } -} - -// ListRecordSetsInvoker 查询租户Record Set资源列表 -func (c *DnsClient) ListRecordSetsInvoker(request *model.ListRecordSetsRequest) *ListRecordSetsInvoker { - requestDef := GenReqDefForListRecordSets() - return &ListRecordSetsInvoker{invoker.NewBaseInvoker(c.HcClient, request, requestDef)} -} - -// ListRecordSetsByZone 查询单个Zone下Record Set列表 -// -// 查询单个Zone下Record Set列表 -// -// Please refer to HUAWEI cloud API Explorer for details. -func (c *DnsClient) ListRecordSetsByZone(request *model.ListRecordSetsByZoneRequest) (*model.ListRecordSetsByZoneResponse, error) { - requestDef := GenReqDefForListRecordSetsByZone() - - if resp, err := c.HcClient.Sync(request, requestDef); err != nil { - return nil, err - } else { - return resp.(*model.ListRecordSetsByZoneResponse), nil - } -} - -// ListRecordSetsByZoneInvoker 查询单个Zone下Record Set列表 -func (c *DnsClient) ListRecordSetsByZoneInvoker(request *model.ListRecordSetsByZoneRequest) *ListRecordSetsByZoneInvoker { - requestDef := GenReqDefForListRecordSetsByZone() - return &ListRecordSetsByZoneInvoker{invoker.NewBaseInvoker(c.HcClient, request, requestDef)} -} - -// ListRecordSetsWithLine 查询租户Record Set资源列表 -// -// 查询租户Record Set资源列表 -// -// Please refer to HUAWEI cloud API Explorer for details. -func (c *DnsClient) ListRecordSetsWithLine(request *model.ListRecordSetsWithLineRequest) (*model.ListRecordSetsWithLineResponse, error) { - requestDef := GenReqDefForListRecordSetsWithLine() - - if resp, err := c.HcClient.Sync(request, requestDef); err != nil { - return nil, err - } else { - return resp.(*model.ListRecordSetsWithLineResponse), nil - } -} - -// ListRecordSetsWithLineInvoker 查询租户Record Set资源列表 -func (c *DnsClient) ListRecordSetsWithLineInvoker(request *model.ListRecordSetsWithLineRequest) *ListRecordSetsWithLineInvoker { - requestDef := GenReqDefForListRecordSetsWithLine() - return &ListRecordSetsWithLineInvoker{invoker.NewBaseInvoker(c.HcClient, request, requestDef)} -} - -// SetRecordSetsStatus 设置Record Set状态 -// -// 设置Record Set状态 -// -// Please refer to HUAWEI cloud API Explorer for details. -func (c *DnsClient) SetRecordSetsStatus(request *model.SetRecordSetsStatusRequest) (*model.SetRecordSetsStatusResponse, error) { - requestDef := GenReqDefForSetRecordSetsStatus() - - if resp, err := c.HcClient.Sync(request, requestDef); err != nil { - return nil, err - } else { - return resp.(*model.SetRecordSetsStatusResponse), nil - } -} - -// SetRecordSetsStatusInvoker 设置Record Set状态 -func (c *DnsClient) SetRecordSetsStatusInvoker(request *model.SetRecordSetsStatusRequest) *SetRecordSetsStatusInvoker { - requestDef := GenReqDefForSetRecordSetsStatus() - return &SetRecordSetsStatusInvoker{invoker.NewBaseInvoker(c.HcClient, request, requestDef)} -} - -// ShowRecordSet 查询单个Record Set -// -// 查询单个Record Set。 -// -// Please refer to HUAWEI cloud API Explorer for details. -func (c *DnsClient) ShowRecordSet(request *model.ShowRecordSetRequest) (*model.ShowRecordSetResponse, error) { - requestDef := GenReqDefForShowRecordSet() - - if resp, err := c.HcClient.Sync(request, requestDef); err != nil { - return nil, err - } else { - return resp.(*model.ShowRecordSetResponse), nil - } -} - -// ShowRecordSetInvoker 查询单个Record Set -func (c *DnsClient) ShowRecordSetInvoker(request *model.ShowRecordSetRequest) *ShowRecordSetInvoker { - requestDef := GenReqDefForShowRecordSet() - return &ShowRecordSetInvoker{invoker.NewBaseInvoker(c.HcClient, request, requestDef)} -} - -// ShowRecordSetByZone 查询单个Zone下Record Set列表 -// -// 查询单个Zone下Record Set列表 -// -// Please refer to HUAWEI cloud API Explorer for details. -func (c *DnsClient) ShowRecordSetByZone(request *model.ShowRecordSetByZoneRequest) (*model.ShowRecordSetByZoneResponse, error) { - requestDef := GenReqDefForShowRecordSetByZone() - - if resp, err := c.HcClient.Sync(request, requestDef); err != nil { - return nil, err - } else { - return resp.(*model.ShowRecordSetByZoneResponse), nil - } -} - -// ShowRecordSetByZoneInvoker 查询单个Zone下Record Set列表 -func (c *DnsClient) ShowRecordSetByZoneInvoker(request *model.ShowRecordSetByZoneRequest) *ShowRecordSetByZoneInvoker { - requestDef := GenReqDefForShowRecordSetByZone() - return &ShowRecordSetByZoneInvoker{invoker.NewBaseInvoker(c.HcClient, request, requestDef)} -} - -// ShowRecordSetWithLine 查询单个Record Set -// -// 查询单个Record Set,仅适用于公网DNS -// -// Please refer to HUAWEI cloud API Explorer for details. -func (c *DnsClient) ShowRecordSetWithLine(request *model.ShowRecordSetWithLineRequest) (*model.ShowRecordSetWithLineResponse, error) { - requestDef := GenReqDefForShowRecordSetWithLine() - - if resp, err := c.HcClient.Sync(request, requestDef); err != nil { - return nil, err - } else { - return resp.(*model.ShowRecordSetWithLineResponse), nil - } -} - -// ShowRecordSetWithLineInvoker 查询单个Record Set -func (c *DnsClient) ShowRecordSetWithLineInvoker(request *model.ShowRecordSetWithLineRequest) *ShowRecordSetWithLineInvoker { - requestDef := GenReqDefForShowRecordSetWithLine() - return &ShowRecordSetWithLineInvoker{invoker.NewBaseInvoker(c.HcClient, request, requestDef)} -} - -// UpdateRecordSet 修改单个Record Set -// -// 修改单个Record Set -// -// Please refer to HUAWEI cloud API Explorer for details. -func (c *DnsClient) UpdateRecordSet(request *model.UpdateRecordSetRequest) (*model.UpdateRecordSetResponse, error) { - requestDef := GenReqDefForUpdateRecordSet() - - if resp, err := c.HcClient.Sync(request, requestDef); err != nil { - return nil, err - } else { - return resp.(*model.UpdateRecordSetResponse), nil - } -} - -// UpdateRecordSetInvoker 修改单个Record Set -func (c *DnsClient) UpdateRecordSetInvoker(request *model.UpdateRecordSetRequest) *UpdateRecordSetInvoker { - requestDef := GenReqDefForUpdateRecordSet() - return &UpdateRecordSetInvoker{invoker.NewBaseInvoker(c.HcClient, request, requestDef)} -} - -// UpdateRecordSets 修改单个Record Set -// -// 修改单个Record Set -// -// Please refer to HUAWEI cloud API Explorer for details. -func (c *DnsClient) UpdateRecordSets(request *model.UpdateRecordSetsRequest) (*model.UpdateRecordSetsResponse, error) { - requestDef := GenReqDefForUpdateRecordSets() - - if resp, err := c.HcClient.Sync(request, requestDef); err != nil { - return nil, err - } else { - return resp.(*model.UpdateRecordSetsResponse), nil - } -} - -// UpdateRecordSetsInvoker 修改单个Record Set -func (c *DnsClient) UpdateRecordSetsInvoker(request *model.UpdateRecordSetsRequest) *UpdateRecordSetsInvoker { - requestDef := GenReqDefForUpdateRecordSets() - return &UpdateRecordSetsInvoker{invoker.NewBaseInvoker(c.HcClient, request, requestDef)} -} - -// BatchCreateTag 为指定实例批量添加或删除标签 -// -// 为指定实例批量添加或删除标签 -// -// Please refer to HUAWEI cloud API Explorer for details. -func (c *DnsClient) BatchCreateTag(request *model.BatchCreateTagRequest) (*model.BatchCreateTagResponse, error) { - requestDef := GenReqDefForBatchCreateTag() - - if resp, err := c.HcClient.Sync(request, requestDef); err != nil { - return nil, err - } else { - return resp.(*model.BatchCreateTagResponse), nil - } -} - -// BatchCreateTagInvoker 为指定实例批量添加或删除标签 -func (c *DnsClient) BatchCreateTagInvoker(request *model.BatchCreateTagRequest) *BatchCreateTagInvoker { - requestDef := GenReqDefForBatchCreateTag() - return &BatchCreateTagInvoker{invoker.NewBaseInvoker(c.HcClient, request, requestDef)} -} - -// CreateTag 为指定实例添加标签 -// -// 为指定实例添加标签 -// -// Please refer to HUAWEI cloud API Explorer for details. -func (c *DnsClient) CreateTag(request *model.CreateTagRequest) (*model.CreateTagResponse, error) { - requestDef := GenReqDefForCreateTag() - - if resp, err := c.HcClient.Sync(request, requestDef); err != nil { - return nil, err - } else { - return resp.(*model.CreateTagResponse), nil - } -} - -// CreateTagInvoker 为指定实例添加标签 -func (c *DnsClient) CreateTagInvoker(request *model.CreateTagRequest) *CreateTagInvoker { - requestDef := GenReqDefForCreateTag() - return &CreateTagInvoker{invoker.NewBaseInvoker(c.HcClient, request, requestDef)} -} - -// DeleteTag 删除资源标签 -// -// 删除资源标签 -// -// Please refer to HUAWEI cloud API Explorer for details. -func (c *DnsClient) DeleteTag(request *model.DeleteTagRequest) (*model.DeleteTagResponse, error) { - requestDef := GenReqDefForDeleteTag() - - if resp, err := c.HcClient.Sync(request, requestDef); err != nil { - return nil, err - } else { - return resp.(*model.DeleteTagResponse), nil - } -} - -// DeleteTagInvoker 删除资源标签 -func (c *DnsClient) DeleteTagInvoker(request *model.DeleteTagRequest) *DeleteTagInvoker { - requestDef := GenReqDefForDeleteTag() - return &DeleteTagInvoker{invoker.NewBaseInvoker(c.HcClient, request, requestDef)} -} - -// ListTag 使用标签查询资源实例 -// -// 使用标签查询资源实例 -// -// Please refer to HUAWEI cloud API Explorer for details. -func (c *DnsClient) ListTag(request *model.ListTagRequest) (*model.ListTagResponse, error) { - requestDef := GenReqDefForListTag() - - if resp, err := c.HcClient.Sync(request, requestDef); err != nil { - return nil, err - } else { - return resp.(*model.ListTagResponse), nil - } -} - -// ListTagInvoker 使用标签查询资源实例 -func (c *DnsClient) ListTagInvoker(request *model.ListTagRequest) *ListTagInvoker { - requestDef := GenReqDefForListTag() - return &ListTagInvoker{invoker.NewBaseInvoker(c.HcClient, request, requestDef)} -} - -// ListTags 查询指定实例类型的所有标签集合 -// -// 查询指定实例类型的所有标签集合 -// -// Please refer to HUAWEI cloud API Explorer for details. -func (c *DnsClient) ListTags(request *model.ListTagsRequest) (*model.ListTagsResponse, error) { - requestDef := GenReqDefForListTags() - - if resp, err := c.HcClient.Sync(request, requestDef); err != nil { - return nil, err - } else { - return resp.(*model.ListTagsResponse), nil - } -} - -// ListTagsInvoker 查询指定实例类型的所有标签集合 -func (c *DnsClient) ListTagsInvoker(request *model.ListTagsRequest) *ListTagsInvoker { - requestDef := GenReqDefForListTags() - return &ListTagsInvoker{invoker.NewBaseInvoker(c.HcClient, request, requestDef)} -} - -// ShowResourceTag 查询指定实例的标签信息 -// -// 查询指定实例的标签信息 -// -// Please refer to HUAWEI cloud API Explorer for details. -func (c *DnsClient) ShowResourceTag(request *model.ShowResourceTagRequest) (*model.ShowResourceTagResponse, error) { - requestDef := GenReqDefForShowResourceTag() - - if resp, err := c.HcClient.Sync(request, requestDef); err != nil { - return nil, err - } else { - return resp.(*model.ShowResourceTagResponse), nil - } -} - -// ShowResourceTagInvoker 查询指定实例的标签信息 -func (c *DnsClient) ShowResourceTagInvoker(request *model.ShowResourceTagRequest) *ShowResourceTagInvoker { - requestDef := GenReqDefForShowResourceTag() - return &ShowResourceTagInvoker{invoker.NewBaseInvoker(c.HcClient, request, requestDef)} -} - -// AssociateRouter 在内网Zone上关联VPC -// -// 在内网Zone上关联VPC -// -// Please refer to HUAWEI cloud API Explorer for details. -func (c *DnsClient) AssociateRouter(request *model.AssociateRouterRequest) (*model.AssociateRouterResponse, error) { - requestDef := GenReqDefForAssociateRouter() - - if resp, err := c.HcClient.Sync(request, requestDef); err != nil { - return nil, err - } else { - return resp.(*model.AssociateRouterResponse), nil - } -} - -// AssociateRouterInvoker 在内网Zone上关联VPC -func (c *DnsClient) AssociateRouterInvoker(request *model.AssociateRouterRequest) *AssociateRouterInvoker { - requestDef := GenReqDefForAssociateRouter() - return &AssociateRouterInvoker{invoker.NewBaseInvoker(c.HcClient, request, requestDef)} -} - -// CreatePrivateZone 创建单个内网Zone -// -// 创建单个内网Zone -// -// Please refer to HUAWEI cloud API Explorer for details. -func (c *DnsClient) CreatePrivateZone(request *model.CreatePrivateZoneRequest) (*model.CreatePrivateZoneResponse, error) { - requestDef := GenReqDefForCreatePrivateZone() - - if resp, err := c.HcClient.Sync(request, requestDef); err != nil { - return nil, err - } else { - return resp.(*model.CreatePrivateZoneResponse), nil - } -} - -// CreatePrivateZoneInvoker 创建单个内网Zone -func (c *DnsClient) CreatePrivateZoneInvoker(request *model.CreatePrivateZoneRequest) *CreatePrivateZoneInvoker { - requestDef := GenReqDefForCreatePrivateZone() - return &CreatePrivateZoneInvoker{invoker.NewBaseInvoker(c.HcClient, request, requestDef)} -} - -// CreatePublicZone 创建单个公网Zone -// -// 创建单个公网Zone -// -// Please refer to HUAWEI cloud API Explorer for details. -func (c *DnsClient) CreatePublicZone(request *model.CreatePublicZoneRequest) (*model.CreatePublicZoneResponse, error) { - requestDef := GenReqDefForCreatePublicZone() - - if resp, err := c.HcClient.Sync(request, requestDef); err != nil { - return nil, err - } else { - return resp.(*model.CreatePublicZoneResponse), nil - } -} - -// CreatePublicZoneInvoker 创建单个公网Zone -func (c *DnsClient) CreatePublicZoneInvoker(request *model.CreatePublicZoneRequest) *CreatePublicZoneInvoker { - requestDef := GenReqDefForCreatePublicZone() - return &CreatePublicZoneInvoker{invoker.NewBaseInvoker(c.HcClient, request, requestDef)} -} - -// DeletePrivateZone 删除单个内网Zone -// -// 删除单个内网Zone -// -// Please refer to HUAWEI cloud API Explorer for details. -func (c *DnsClient) DeletePrivateZone(request *model.DeletePrivateZoneRequest) (*model.DeletePrivateZoneResponse, error) { - requestDef := GenReqDefForDeletePrivateZone() - - if resp, err := c.HcClient.Sync(request, requestDef); err != nil { - return nil, err - } else { - return resp.(*model.DeletePrivateZoneResponse), nil - } -} - -// DeletePrivateZoneInvoker 删除单个内网Zone -func (c *DnsClient) DeletePrivateZoneInvoker(request *model.DeletePrivateZoneRequest) *DeletePrivateZoneInvoker { - requestDef := GenReqDefForDeletePrivateZone() - return &DeletePrivateZoneInvoker{invoker.NewBaseInvoker(c.HcClient, request, requestDef)} -} - -// DeletePublicZone 删除单个公网Zone -// -// 删除单个公网Zone -// -// Please refer to HUAWEI cloud API Explorer for details. -func (c *DnsClient) DeletePublicZone(request *model.DeletePublicZoneRequest) (*model.DeletePublicZoneResponse, error) { - requestDef := GenReqDefForDeletePublicZone() - - if resp, err := c.HcClient.Sync(request, requestDef); err != nil { - return nil, err - } else { - return resp.(*model.DeletePublicZoneResponse), nil - } -} - -// DeletePublicZoneInvoker 删除单个公网Zone -func (c *DnsClient) DeletePublicZoneInvoker(request *model.DeletePublicZoneRequest) *DeletePublicZoneInvoker { - requestDef := GenReqDefForDeletePublicZone() - return &DeletePublicZoneInvoker{invoker.NewBaseInvoker(c.HcClient, request, requestDef)} -} - -// DisassociateRouter 在内网Zone上解关联VPC -// -// 在内网Zone上解关联VPC -// -// Please refer to HUAWEI cloud API Explorer for details. -func (c *DnsClient) DisassociateRouter(request *model.DisassociateRouterRequest) (*model.DisassociateRouterResponse, error) { - requestDef := GenReqDefForDisassociateRouter() - - if resp, err := c.HcClient.Sync(request, requestDef); err != nil { - return nil, err - } else { - return resp.(*model.DisassociateRouterResponse), nil - } -} - -// DisassociateRouterInvoker 在内网Zone上解关联VPC -func (c *DnsClient) DisassociateRouterInvoker(request *model.DisassociateRouterRequest) *DisassociateRouterInvoker { - requestDef := GenReqDefForDisassociateRouter() - return &DisassociateRouterInvoker{invoker.NewBaseInvoker(c.HcClient, request, requestDef)} -} - -// ListPrivateZones 查询内网Zone列表 -// -// 查询内网Zone列表 -// -// Please refer to HUAWEI cloud API Explorer for details. -func (c *DnsClient) ListPrivateZones(request *model.ListPrivateZonesRequest) (*model.ListPrivateZonesResponse, error) { - requestDef := GenReqDefForListPrivateZones() - - if resp, err := c.HcClient.Sync(request, requestDef); err != nil { - return nil, err - } else { - return resp.(*model.ListPrivateZonesResponse), nil - } -} - -// ListPrivateZonesInvoker 查询内网Zone列表 -func (c *DnsClient) ListPrivateZonesInvoker(request *model.ListPrivateZonesRequest) *ListPrivateZonesInvoker { - requestDef := GenReqDefForListPrivateZones() - return &ListPrivateZonesInvoker{invoker.NewBaseInvoker(c.HcClient, request, requestDef)} -} - -// ListPublicZones 查询公网Zone列表 -// -// 查询公网Zone列表 -// -// Please refer to HUAWEI cloud API Explorer for details. -func (c *DnsClient) ListPublicZones(request *model.ListPublicZonesRequest) (*model.ListPublicZonesResponse, error) { - requestDef := GenReqDefForListPublicZones() - - if resp, err := c.HcClient.Sync(request, requestDef); err != nil { - return nil, err - } else { - return resp.(*model.ListPublicZonesResponse), nil - } -} - -// ListPublicZonesInvoker 查询公网Zone列表 -func (c *DnsClient) ListPublicZonesInvoker(request *model.ListPublicZonesRequest) *ListPublicZonesInvoker { - requestDef := GenReqDefForListPublicZones() - return &ListPublicZonesInvoker{invoker.NewBaseInvoker(c.HcClient, request, requestDef)} -} - -// ShowPrivateZone 查询单个内网Zone -// -// 查询单个内网Zone -// -// Please refer to HUAWEI cloud API Explorer for details. -func (c *DnsClient) ShowPrivateZone(request *model.ShowPrivateZoneRequest) (*model.ShowPrivateZoneResponse, error) { - requestDef := GenReqDefForShowPrivateZone() - - if resp, err := c.HcClient.Sync(request, requestDef); err != nil { - return nil, err - } else { - return resp.(*model.ShowPrivateZoneResponse), nil - } -} - -// ShowPrivateZoneInvoker 查询单个内网Zone -func (c *DnsClient) ShowPrivateZoneInvoker(request *model.ShowPrivateZoneRequest) *ShowPrivateZoneInvoker { - requestDef := GenReqDefForShowPrivateZone() - return &ShowPrivateZoneInvoker{invoker.NewBaseInvoker(c.HcClient, request, requestDef)} -} - -// ShowPrivateZoneNameServer 查询单个内网Zone的名称服务器 -// -// 查询单个内网Zone的名称服务器 -// -// Please refer to HUAWEI cloud API Explorer for details. -func (c *DnsClient) ShowPrivateZoneNameServer(request *model.ShowPrivateZoneNameServerRequest) (*model.ShowPrivateZoneNameServerResponse, error) { - requestDef := GenReqDefForShowPrivateZoneNameServer() - - if resp, err := c.HcClient.Sync(request, requestDef); err != nil { - return nil, err - } else { - return resp.(*model.ShowPrivateZoneNameServerResponse), nil - } -} - -// ShowPrivateZoneNameServerInvoker 查询单个内网Zone的名称服务器 -func (c *DnsClient) ShowPrivateZoneNameServerInvoker(request *model.ShowPrivateZoneNameServerRequest) *ShowPrivateZoneNameServerInvoker { - requestDef := GenReqDefForShowPrivateZoneNameServer() - return &ShowPrivateZoneNameServerInvoker{invoker.NewBaseInvoker(c.HcClient, request, requestDef)} -} - -// ShowPublicZone 查询单个公网Zone -// -// 查询单个公网Zone -// -// Please refer to HUAWEI cloud API Explorer for details. -func (c *DnsClient) ShowPublicZone(request *model.ShowPublicZoneRequest) (*model.ShowPublicZoneResponse, error) { - requestDef := GenReqDefForShowPublicZone() - - if resp, err := c.HcClient.Sync(request, requestDef); err != nil { - return nil, err - } else { - return resp.(*model.ShowPublicZoneResponse), nil - } -} - -// ShowPublicZoneInvoker 查询单个公网Zone -func (c *DnsClient) ShowPublicZoneInvoker(request *model.ShowPublicZoneRequest) *ShowPublicZoneInvoker { - requestDef := GenReqDefForShowPublicZone() - return &ShowPublicZoneInvoker{invoker.NewBaseInvoker(c.HcClient, request, requestDef)} -} - -// ShowPublicZoneNameServer 查询单个公网Zone的名称服务器 -// -// 查询单个公网Zone的名称服务器 -// -// Please refer to HUAWEI cloud API Explorer for details. -func (c *DnsClient) ShowPublicZoneNameServer(request *model.ShowPublicZoneNameServerRequest) (*model.ShowPublicZoneNameServerResponse, error) { - requestDef := GenReqDefForShowPublicZoneNameServer() - - if resp, err := c.HcClient.Sync(request, requestDef); err != nil { - return nil, err - } else { - return resp.(*model.ShowPublicZoneNameServerResponse), nil - } -} - -// ShowPublicZoneNameServerInvoker 查询单个公网Zone的名称服务器 -func (c *DnsClient) ShowPublicZoneNameServerInvoker(request *model.ShowPublicZoneNameServerRequest) *ShowPublicZoneNameServerInvoker { - requestDef := GenReqDefForShowPublicZoneNameServer() - return &ShowPublicZoneNameServerInvoker{invoker.NewBaseInvoker(c.HcClient, request, requestDef)} -} - -// UpdatePrivateZone 修改单个内网Zone -// -// 修改单个内网Zone -// -// Please refer to HUAWEI cloud API Explorer for details. -func (c *DnsClient) UpdatePrivateZone(request *model.UpdatePrivateZoneRequest) (*model.UpdatePrivateZoneResponse, error) { - requestDef := GenReqDefForUpdatePrivateZone() - - if resp, err := c.HcClient.Sync(request, requestDef); err != nil { - return nil, err - } else { - return resp.(*model.UpdatePrivateZoneResponse), nil - } -} - -// UpdatePrivateZoneInvoker 修改单个内网Zone -func (c *DnsClient) UpdatePrivateZoneInvoker(request *model.UpdatePrivateZoneRequest) *UpdatePrivateZoneInvoker { - requestDef := GenReqDefForUpdatePrivateZone() - return &UpdatePrivateZoneInvoker{invoker.NewBaseInvoker(c.HcClient, request, requestDef)} -} - -// UpdatePublicZone 修改单个公网Zone -// -// 修改单个公网Zone -// -// Please refer to HUAWEI cloud API Explorer for details. -func (c *DnsClient) UpdatePublicZone(request *model.UpdatePublicZoneRequest) (*model.UpdatePublicZoneResponse, error) { - requestDef := GenReqDefForUpdatePublicZone() - - if resp, err := c.HcClient.Sync(request, requestDef); err != nil { - return nil, err - } else { - return resp.(*model.UpdatePublicZoneResponse), nil - } -} - -// UpdatePublicZoneInvoker 修改单个公网Zone -func (c *DnsClient) UpdatePublicZoneInvoker(request *model.UpdatePublicZoneRequest) *UpdatePublicZoneInvoker { - requestDef := GenReqDefForUpdatePublicZone() - return &UpdatePublicZoneInvoker{invoker.NewBaseInvoker(c.HcClient, request, requestDef)} -} - -// UpdatePublicZoneStatus 设置单个公网Zone状态 -// -// 设置单个公网Zone状态,支持暂停、启用Zone -// -// Please refer to HUAWEI cloud API Explorer for details. -func (c *DnsClient) UpdatePublicZoneStatus(request *model.UpdatePublicZoneStatusRequest) (*model.UpdatePublicZoneStatusResponse, error) { - requestDef := GenReqDefForUpdatePublicZoneStatus() - - if resp, err := c.HcClient.Sync(request, requestDef); err != nil { - return nil, err - } else { - return resp.(*model.UpdatePublicZoneStatusResponse), nil - } -} - -// UpdatePublicZoneStatusInvoker 设置单个公网Zone状态 -func (c *DnsClient) UpdatePublicZoneStatusInvoker(request *model.UpdatePublicZoneStatusRequest) *UpdatePublicZoneStatusInvoker { - requestDef := GenReqDefForUpdatePublicZoneStatus() - return &UpdatePublicZoneStatusInvoker{invoker.NewBaseInvoker(c.HcClient, request, requestDef)} -} diff --git a/sdk/services/dns/v2/dns_invoker.go b/sdk/services/dns/v2/dns_invoker.go deleted file mode 100644 index 6a9485f..0000000 --- a/sdk/services/dns/v2/dns_invoker.go +++ /dev/null @@ -1,886 +0,0 @@ -package v2 - -import ( - "github.com/libdns/huaweicloud/sdk/core/invoker" - "github.com/libdns/huaweicloud/sdk/services/dns/v2/model" -) - -type CreateCustomLineInvoker struct { - *invoker.BaseInvoker -} - -func (i *CreateCustomLineInvoker) GetBaseInvoker() *invoker.BaseInvoker { - return i.BaseInvoker -} - -func (i *CreateCustomLineInvoker) Invoke() (*model.CreateCustomLineResponse, error) { - if result, err := i.BaseInvoker.Invoke(); err != nil { - return nil, err - } else { - return result.(*model.CreateCustomLineResponse), nil - } -} - -type CreateLineGroupInvoker struct { - *invoker.BaseInvoker -} - -func (i *CreateLineGroupInvoker) GetBaseInvoker() *invoker.BaseInvoker { - return i.BaseInvoker -} - -func (i *CreateLineGroupInvoker) Invoke() (*model.CreateLineGroupResponse, error) { - if result, err := i.BaseInvoker.Invoke(); err != nil { - return nil, err - } else { - return result.(*model.CreateLineGroupResponse), nil - } -} - -type DeleteCustomLineInvoker struct { - *invoker.BaseInvoker -} - -func (i *DeleteCustomLineInvoker) GetBaseInvoker() *invoker.BaseInvoker { - return i.BaseInvoker -} - -func (i *DeleteCustomLineInvoker) Invoke() (*model.DeleteCustomLineResponse, error) { - if result, err := i.BaseInvoker.Invoke(); err != nil { - return nil, err - } else { - return result.(*model.DeleteCustomLineResponse), nil - } -} - -type DeleteLineGroupInvoker struct { - *invoker.BaseInvoker -} - -func (i *DeleteLineGroupInvoker) GetBaseInvoker() *invoker.BaseInvoker { - return i.BaseInvoker -} - -func (i *DeleteLineGroupInvoker) Invoke() (*model.DeleteLineGroupResponse, error) { - if result, err := i.BaseInvoker.Invoke(); err != nil { - return nil, err - } else { - return result.(*model.DeleteLineGroupResponse), nil - } -} - -type ListApiVersionsInvoker struct { - *invoker.BaseInvoker -} - -func (i *ListApiVersionsInvoker) GetBaseInvoker() *invoker.BaseInvoker { - return i.BaseInvoker -} - -func (i *ListApiVersionsInvoker) Invoke() (*model.ListApiVersionsResponse, error) { - if result, err := i.BaseInvoker.Invoke(); err != nil { - return nil, err - } else { - return result.(*model.ListApiVersionsResponse), nil - } -} - -type ListCustomLineInvoker struct { - *invoker.BaseInvoker -} - -func (i *ListCustomLineInvoker) GetBaseInvoker() *invoker.BaseInvoker { - return i.BaseInvoker -} - -func (i *ListCustomLineInvoker) Invoke() (*model.ListCustomLineResponse, error) { - if result, err := i.BaseInvoker.Invoke(); err != nil { - return nil, err - } else { - return result.(*model.ListCustomLineResponse), nil - } -} - -type ListLineGroupsInvoker struct { - *invoker.BaseInvoker -} - -func (i *ListLineGroupsInvoker) GetBaseInvoker() *invoker.BaseInvoker { - return i.BaseInvoker -} - -func (i *ListLineGroupsInvoker) Invoke() (*model.ListLineGroupsResponse, error) { - if result, err := i.BaseInvoker.Invoke(); err != nil { - return nil, err - } else { - return result.(*model.ListLineGroupsResponse), nil - } -} - -type ListNameServersInvoker struct { - *invoker.BaseInvoker -} - -func (i *ListNameServersInvoker) GetBaseInvoker() *invoker.BaseInvoker { - return i.BaseInvoker -} - -func (i *ListNameServersInvoker) Invoke() (*model.ListNameServersResponse, error) { - if result, err := i.BaseInvoker.Invoke(); err != nil { - return nil, err - } else { - return result.(*model.ListNameServersResponse), nil - } -} - -type ShowApiInfoInvoker struct { - *invoker.BaseInvoker -} - -func (i *ShowApiInfoInvoker) GetBaseInvoker() *invoker.BaseInvoker { - return i.BaseInvoker -} - -func (i *ShowApiInfoInvoker) Invoke() (*model.ShowApiInfoResponse, error) { - if result, err := i.BaseInvoker.Invoke(); err != nil { - return nil, err - } else { - return result.(*model.ShowApiInfoResponse), nil - } -} - -type ShowDomainQuotaInvoker struct { - *invoker.BaseInvoker -} - -func (i *ShowDomainQuotaInvoker) GetBaseInvoker() *invoker.BaseInvoker { - return i.BaseInvoker -} - -func (i *ShowDomainQuotaInvoker) Invoke() (*model.ShowDomainQuotaResponse, error) { - if result, err := i.BaseInvoker.Invoke(); err != nil { - return nil, err - } else { - return result.(*model.ShowDomainQuotaResponse), nil - } -} - -type ShowLineGroupInvoker struct { - *invoker.BaseInvoker -} - -func (i *ShowLineGroupInvoker) GetBaseInvoker() *invoker.BaseInvoker { - return i.BaseInvoker -} - -func (i *ShowLineGroupInvoker) Invoke() (*model.ShowLineGroupResponse, error) { - if result, err := i.BaseInvoker.Invoke(); err != nil { - return nil, err - } else { - return result.(*model.ShowLineGroupResponse), nil - } -} - -type UpdateCustomLineInvoker struct { - *invoker.BaseInvoker -} - -func (i *UpdateCustomLineInvoker) GetBaseInvoker() *invoker.BaseInvoker { - return i.BaseInvoker -} - -func (i *UpdateCustomLineInvoker) Invoke() (*model.UpdateCustomLineResponse, error) { - if result, err := i.BaseInvoker.Invoke(); err != nil { - return nil, err - } else { - return result.(*model.UpdateCustomLineResponse), nil - } -} - -type UpdateLineGroupsInvoker struct { - *invoker.BaseInvoker -} - -func (i *UpdateLineGroupsInvoker) GetBaseInvoker() *invoker.BaseInvoker { - return i.BaseInvoker -} - -func (i *UpdateLineGroupsInvoker) Invoke() (*model.UpdateLineGroupsResponse, error) { - if result, err := i.BaseInvoker.Invoke(); err != nil { - return nil, err - } else { - return result.(*model.UpdateLineGroupsResponse), nil - } -} - -type CreateEipRecordSetInvoker struct { - *invoker.BaseInvoker -} - -func (i *CreateEipRecordSetInvoker) GetBaseInvoker() *invoker.BaseInvoker { - return i.BaseInvoker -} - -func (i *CreateEipRecordSetInvoker) Invoke() (*model.CreateEipRecordSetResponse, error) { - if result, err := i.BaseInvoker.Invoke(); err != nil { - return nil, err - } else { - return result.(*model.CreateEipRecordSetResponse), nil - } -} - -type ListPtrRecordsInvoker struct { - *invoker.BaseInvoker -} - -func (i *ListPtrRecordsInvoker) GetBaseInvoker() *invoker.BaseInvoker { - return i.BaseInvoker -} - -func (i *ListPtrRecordsInvoker) Invoke() (*model.ListPtrRecordsResponse, error) { - if result, err := i.BaseInvoker.Invoke(); err != nil { - return nil, err - } else { - return result.(*model.ListPtrRecordsResponse), nil - } -} - -type RestorePtrRecordInvoker struct { - *invoker.BaseInvoker -} - -func (i *RestorePtrRecordInvoker) GetBaseInvoker() *invoker.BaseInvoker { - return i.BaseInvoker -} - -func (i *RestorePtrRecordInvoker) Invoke() (*model.RestorePtrRecordResponse, error) { - if result, err := i.BaseInvoker.Invoke(); err != nil { - return nil, err - } else { - return result.(*model.RestorePtrRecordResponse), nil - } -} - -type ShowPtrRecordSetInvoker struct { - *invoker.BaseInvoker -} - -func (i *ShowPtrRecordSetInvoker) GetBaseInvoker() *invoker.BaseInvoker { - return i.BaseInvoker -} - -func (i *ShowPtrRecordSetInvoker) Invoke() (*model.ShowPtrRecordSetResponse, error) { - if result, err := i.BaseInvoker.Invoke(); err != nil { - return nil, err - } else { - return result.(*model.ShowPtrRecordSetResponse), nil - } -} - -type UpdatePtrRecordInvoker struct { - *invoker.BaseInvoker -} - -func (i *UpdatePtrRecordInvoker) GetBaseInvoker() *invoker.BaseInvoker { - return i.BaseInvoker -} - -func (i *UpdatePtrRecordInvoker) Invoke() (*model.UpdatePtrRecordResponse, error) { - if result, err := i.BaseInvoker.Invoke(); err != nil { - return nil, err - } else { - return result.(*model.UpdatePtrRecordResponse), nil - } -} - -type BatchDeleteRecordSetWithLineInvoker struct { - *invoker.BaseInvoker -} - -func (i *BatchDeleteRecordSetWithLineInvoker) GetBaseInvoker() *invoker.BaseInvoker { - return i.BaseInvoker -} - -func (i *BatchDeleteRecordSetWithLineInvoker) Invoke() (*model.BatchDeleteRecordSetWithLineResponse, error) { - if result, err := i.BaseInvoker.Invoke(); err != nil { - return nil, err - } else { - return result.(*model.BatchDeleteRecordSetWithLineResponse), nil - } -} - -type BatchUpdateRecordSetWithLineInvoker struct { - *invoker.BaseInvoker -} - -func (i *BatchUpdateRecordSetWithLineInvoker) GetBaseInvoker() *invoker.BaseInvoker { - return i.BaseInvoker -} - -func (i *BatchUpdateRecordSetWithLineInvoker) Invoke() (*model.BatchUpdateRecordSetWithLineResponse, error) { - if result, err := i.BaseInvoker.Invoke(); err != nil { - return nil, err - } else { - return result.(*model.BatchUpdateRecordSetWithLineResponse), nil - } -} - -type CreateRecordSetInvoker struct { - *invoker.BaseInvoker -} - -func (i *CreateRecordSetInvoker) GetBaseInvoker() *invoker.BaseInvoker { - return i.BaseInvoker -} - -func (i *CreateRecordSetInvoker) Invoke() (*model.CreateRecordSetResponse, error) { - if result, err := i.BaseInvoker.Invoke(); err != nil { - return nil, err - } else { - return result.(*model.CreateRecordSetResponse), nil - } -} - -type CreateRecordSetWithBatchLinesInvoker struct { - *invoker.BaseInvoker -} - -func (i *CreateRecordSetWithBatchLinesInvoker) GetBaseInvoker() *invoker.BaseInvoker { - return i.BaseInvoker -} - -func (i *CreateRecordSetWithBatchLinesInvoker) Invoke() (*model.CreateRecordSetWithBatchLinesResponse, error) { - if result, err := i.BaseInvoker.Invoke(); err != nil { - return nil, err - } else { - return result.(*model.CreateRecordSetWithBatchLinesResponse), nil - } -} - -type CreateRecordSetWithLineInvoker struct { - *invoker.BaseInvoker -} - -func (i *CreateRecordSetWithLineInvoker) GetBaseInvoker() *invoker.BaseInvoker { - return i.BaseInvoker -} - -func (i *CreateRecordSetWithLineInvoker) Invoke() (*model.CreateRecordSetWithLineResponse, error) { - if result, err := i.BaseInvoker.Invoke(); err != nil { - return nil, err - } else { - return result.(*model.CreateRecordSetWithLineResponse), nil - } -} - -type DeleteRecordSetInvoker struct { - *invoker.BaseInvoker -} - -func (i *DeleteRecordSetInvoker) GetBaseInvoker() *invoker.BaseInvoker { - return i.BaseInvoker -} - -func (i *DeleteRecordSetInvoker) Invoke() (*model.DeleteRecordSetResponse, error) { - if result, err := i.BaseInvoker.Invoke(); err != nil { - return nil, err - } else { - return result.(*model.DeleteRecordSetResponse), nil - } -} - -type DeleteRecordSetsInvoker struct { - *invoker.BaseInvoker -} - -func (i *DeleteRecordSetsInvoker) GetBaseInvoker() *invoker.BaseInvoker { - return i.BaseInvoker -} - -func (i *DeleteRecordSetsInvoker) Invoke() (*model.DeleteRecordSetsResponse, error) { - if result, err := i.BaseInvoker.Invoke(); err != nil { - return nil, err - } else { - return result.(*model.DeleteRecordSetsResponse), nil - } -} - -type ListRecordSetsInvoker struct { - *invoker.BaseInvoker -} - -func (i *ListRecordSetsInvoker) GetBaseInvoker() *invoker.BaseInvoker { - return i.BaseInvoker -} - -func (i *ListRecordSetsInvoker) Invoke() (*model.ListRecordSetsResponse, error) { - if result, err := i.BaseInvoker.Invoke(); err != nil { - return nil, err - } else { - return result.(*model.ListRecordSetsResponse), nil - } -} - -type ListRecordSetsByZoneInvoker struct { - *invoker.BaseInvoker -} - -func (i *ListRecordSetsByZoneInvoker) GetBaseInvoker() *invoker.BaseInvoker { - return i.BaseInvoker -} - -func (i *ListRecordSetsByZoneInvoker) Invoke() (*model.ListRecordSetsByZoneResponse, error) { - if result, err := i.BaseInvoker.Invoke(); err != nil { - return nil, err - } else { - return result.(*model.ListRecordSetsByZoneResponse), nil - } -} - -type ListRecordSetsWithLineInvoker struct { - *invoker.BaseInvoker -} - -func (i *ListRecordSetsWithLineInvoker) GetBaseInvoker() *invoker.BaseInvoker { - return i.BaseInvoker -} - -func (i *ListRecordSetsWithLineInvoker) Invoke() (*model.ListRecordSetsWithLineResponse, error) { - if result, err := i.BaseInvoker.Invoke(); err != nil { - return nil, err - } else { - return result.(*model.ListRecordSetsWithLineResponse), nil - } -} - -type SetRecordSetsStatusInvoker struct { - *invoker.BaseInvoker -} - -func (i *SetRecordSetsStatusInvoker) GetBaseInvoker() *invoker.BaseInvoker { - return i.BaseInvoker -} - -func (i *SetRecordSetsStatusInvoker) Invoke() (*model.SetRecordSetsStatusResponse, error) { - if result, err := i.BaseInvoker.Invoke(); err != nil { - return nil, err - } else { - return result.(*model.SetRecordSetsStatusResponse), nil - } -} - -type ShowRecordSetInvoker struct { - *invoker.BaseInvoker -} - -func (i *ShowRecordSetInvoker) GetBaseInvoker() *invoker.BaseInvoker { - return i.BaseInvoker -} - -func (i *ShowRecordSetInvoker) Invoke() (*model.ShowRecordSetResponse, error) { - if result, err := i.BaseInvoker.Invoke(); err != nil { - return nil, err - } else { - return result.(*model.ShowRecordSetResponse), nil - } -} - -type ShowRecordSetByZoneInvoker struct { - *invoker.BaseInvoker -} - -func (i *ShowRecordSetByZoneInvoker) GetBaseInvoker() *invoker.BaseInvoker { - return i.BaseInvoker -} - -func (i *ShowRecordSetByZoneInvoker) Invoke() (*model.ShowRecordSetByZoneResponse, error) { - if result, err := i.BaseInvoker.Invoke(); err != nil { - return nil, err - } else { - return result.(*model.ShowRecordSetByZoneResponse), nil - } -} - -type ShowRecordSetWithLineInvoker struct { - *invoker.BaseInvoker -} - -func (i *ShowRecordSetWithLineInvoker) GetBaseInvoker() *invoker.BaseInvoker { - return i.BaseInvoker -} - -func (i *ShowRecordSetWithLineInvoker) Invoke() (*model.ShowRecordSetWithLineResponse, error) { - if result, err := i.BaseInvoker.Invoke(); err != nil { - return nil, err - } else { - return result.(*model.ShowRecordSetWithLineResponse), nil - } -} - -type UpdateRecordSetInvoker struct { - *invoker.BaseInvoker -} - -func (i *UpdateRecordSetInvoker) GetBaseInvoker() *invoker.BaseInvoker { - return i.BaseInvoker -} - -func (i *UpdateRecordSetInvoker) Invoke() (*model.UpdateRecordSetResponse, error) { - if result, err := i.BaseInvoker.Invoke(); err != nil { - return nil, err - } else { - return result.(*model.UpdateRecordSetResponse), nil - } -} - -type UpdateRecordSetsInvoker struct { - *invoker.BaseInvoker -} - -func (i *UpdateRecordSetsInvoker) GetBaseInvoker() *invoker.BaseInvoker { - return i.BaseInvoker -} - -func (i *UpdateRecordSetsInvoker) Invoke() (*model.UpdateRecordSetsResponse, error) { - if result, err := i.BaseInvoker.Invoke(); err != nil { - return nil, err - } else { - return result.(*model.UpdateRecordSetsResponse), nil - } -} - -type BatchCreateTagInvoker struct { - *invoker.BaseInvoker -} - -func (i *BatchCreateTagInvoker) GetBaseInvoker() *invoker.BaseInvoker { - return i.BaseInvoker -} - -func (i *BatchCreateTagInvoker) Invoke() (*model.BatchCreateTagResponse, error) { - if result, err := i.BaseInvoker.Invoke(); err != nil { - return nil, err - } else { - return result.(*model.BatchCreateTagResponse), nil - } -} - -type CreateTagInvoker struct { - *invoker.BaseInvoker -} - -func (i *CreateTagInvoker) GetBaseInvoker() *invoker.BaseInvoker { - return i.BaseInvoker -} - -func (i *CreateTagInvoker) Invoke() (*model.CreateTagResponse, error) { - if result, err := i.BaseInvoker.Invoke(); err != nil { - return nil, err - } else { - return result.(*model.CreateTagResponse), nil - } -} - -type DeleteTagInvoker struct { - *invoker.BaseInvoker -} - -func (i *DeleteTagInvoker) GetBaseInvoker() *invoker.BaseInvoker { - return i.BaseInvoker -} - -func (i *DeleteTagInvoker) Invoke() (*model.DeleteTagResponse, error) { - if result, err := i.BaseInvoker.Invoke(); err != nil { - return nil, err - } else { - return result.(*model.DeleteTagResponse), nil - } -} - -type ListTagInvoker struct { - *invoker.BaseInvoker -} - -func (i *ListTagInvoker) GetBaseInvoker() *invoker.BaseInvoker { - return i.BaseInvoker -} - -func (i *ListTagInvoker) Invoke() (*model.ListTagResponse, error) { - if result, err := i.BaseInvoker.Invoke(); err != nil { - return nil, err - } else { - return result.(*model.ListTagResponse), nil - } -} - -type ListTagsInvoker struct { - *invoker.BaseInvoker -} - -func (i *ListTagsInvoker) GetBaseInvoker() *invoker.BaseInvoker { - return i.BaseInvoker -} - -func (i *ListTagsInvoker) Invoke() (*model.ListTagsResponse, error) { - if result, err := i.BaseInvoker.Invoke(); err != nil { - return nil, err - } else { - return result.(*model.ListTagsResponse), nil - } -} - -type ShowResourceTagInvoker struct { - *invoker.BaseInvoker -} - -func (i *ShowResourceTagInvoker) GetBaseInvoker() *invoker.BaseInvoker { - return i.BaseInvoker -} - -func (i *ShowResourceTagInvoker) Invoke() (*model.ShowResourceTagResponse, error) { - if result, err := i.BaseInvoker.Invoke(); err != nil { - return nil, err - } else { - return result.(*model.ShowResourceTagResponse), nil - } -} - -type AssociateRouterInvoker struct { - *invoker.BaseInvoker -} - -func (i *AssociateRouterInvoker) GetBaseInvoker() *invoker.BaseInvoker { - return i.BaseInvoker -} - -func (i *AssociateRouterInvoker) Invoke() (*model.AssociateRouterResponse, error) { - if result, err := i.BaseInvoker.Invoke(); err != nil { - return nil, err - } else { - return result.(*model.AssociateRouterResponse), nil - } -} - -type CreatePrivateZoneInvoker struct { - *invoker.BaseInvoker -} - -func (i *CreatePrivateZoneInvoker) GetBaseInvoker() *invoker.BaseInvoker { - return i.BaseInvoker -} - -func (i *CreatePrivateZoneInvoker) Invoke() (*model.CreatePrivateZoneResponse, error) { - if result, err := i.BaseInvoker.Invoke(); err != nil { - return nil, err - } else { - return result.(*model.CreatePrivateZoneResponse), nil - } -} - -type CreatePublicZoneInvoker struct { - *invoker.BaseInvoker -} - -func (i *CreatePublicZoneInvoker) GetBaseInvoker() *invoker.BaseInvoker { - return i.BaseInvoker -} - -func (i *CreatePublicZoneInvoker) Invoke() (*model.CreatePublicZoneResponse, error) { - if result, err := i.BaseInvoker.Invoke(); err != nil { - return nil, err - } else { - return result.(*model.CreatePublicZoneResponse), nil - } -} - -type DeletePrivateZoneInvoker struct { - *invoker.BaseInvoker -} - -func (i *DeletePrivateZoneInvoker) GetBaseInvoker() *invoker.BaseInvoker { - return i.BaseInvoker -} - -func (i *DeletePrivateZoneInvoker) Invoke() (*model.DeletePrivateZoneResponse, error) { - if result, err := i.BaseInvoker.Invoke(); err != nil { - return nil, err - } else { - return result.(*model.DeletePrivateZoneResponse), nil - } -} - -type DeletePublicZoneInvoker struct { - *invoker.BaseInvoker -} - -func (i *DeletePublicZoneInvoker) GetBaseInvoker() *invoker.BaseInvoker { - return i.BaseInvoker -} - -func (i *DeletePublicZoneInvoker) Invoke() (*model.DeletePublicZoneResponse, error) { - if result, err := i.BaseInvoker.Invoke(); err != nil { - return nil, err - } else { - return result.(*model.DeletePublicZoneResponse), nil - } -} - -type DisassociateRouterInvoker struct { - *invoker.BaseInvoker -} - -func (i *DisassociateRouterInvoker) GetBaseInvoker() *invoker.BaseInvoker { - return i.BaseInvoker -} - -func (i *DisassociateRouterInvoker) Invoke() (*model.DisassociateRouterResponse, error) { - if result, err := i.BaseInvoker.Invoke(); err != nil { - return nil, err - } else { - return result.(*model.DisassociateRouterResponse), nil - } -} - -type ListPrivateZonesInvoker struct { - *invoker.BaseInvoker -} - -func (i *ListPrivateZonesInvoker) GetBaseInvoker() *invoker.BaseInvoker { - return i.BaseInvoker -} - -func (i *ListPrivateZonesInvoker) Invoke() (*model.ListPrivateZonesResponse, error) { - if result, err := i.BaseInvoker.Invoke(); err != nil { - return nil, err - } else { - return result.(*model.ListPrivateZonesResponse), nil - } -} - -type ListPublicZonesInvoker struct { - *invoker.BaseInvoker -} - -func (i *ListPublicZonesInvoker) GetBaseInvoker() *invoker.BaseInvoker { - return i.BaseInvoker -} - -func (i *ListPublicZonesInvoker) Invoke() (*model.ListPublicZonesResponse, error) { - if result, err := i.BaseInvoker.Invoke(); err != nil { - return nil, err - } else { - return result.(*model.ListPublicZonesResponse), nil - } -} - -type ShowPrivateZoneInvoker struct { - *invoker.BaseInvoker -} - -func (i *ShowPrivateZoneInvoker) GetBaseInvoker() *invoker.BaseInvoker { - return i.BaseInvoker -} - -func (i *ShowPrivateZoneInvoker) Invoke() (*model.ShowPrivateZoneResponse, error) { - if result, err := i.BaseInvoker.Invoke(); err != nil { - return nil, err - } else { - return result.(*model.ShowPrivateZoneResponse), nil - } -} - -type ShowPrivateZoneNameServerInvoker struct { - *invoker.BaseInvoker -} - -func (i *ShowPrivateZoneNameServerInvoker) GetBaseInvoker() *invoker.BaseInvoker { - return i.BaseInvoker -} - -func (i *ShowPrivateZoneNameServerInvoker) Invoke() (*model.ShowPrivateZoneNameServerResponse, error) { - if result, err := i.BaseInvoker.Invoke(); err != nil { - return nil, err - } else { - return result.(*model.ShowPrivateZoneNameServerResponse), nil - } -} - -type ShowPublicZoneInvoker struct { - *invoker.BaseInvoker -} - -func (i *ShowPublicZoneInvoker) GetBaseInvoker() *invoker.BaseInvoker { - return i.BaseInvoker -} - -func (i *ShowPublicZoneInvoker) Invoke() (*model.ShowPublicZoneResponse, error) { - if result, err := i.BaseInvoker.Invoke(); err != nil { - return nil, err - } else { - return result.(*model.ShowPublicZoneResponse), nil - } -} - -type ShowPublicZoneNameServerInvoker struct { - *invoker.BaseInvoker -} - -func (i *ShowPublicZoneNameServerInvoker) GetBaseInvoker() *invoker.BaseInvoker { - return i.BaseInvoker -} - -func (i *ShowPublicZoneNameServerInvoker) Invoke() (*model.ShowPublicZoneNameServerResponse, error) { - if result, err := i.BaseInvoker.Invoke(); err != nil { - return nil, err - } else { - return result.(*model.ShowPublicZoneNameServerResponse), nil - } -} - -type UpdatePrivateZoneInvoker struct { - *invoker.BaseInvoker -} - -func (i *UpdatePrivateZoneInvoker) GetBaseInvoker() *invoker.BaseInvoker { - return i.BaseInvoker -} - -func (i *UpdatePrivateZoneInvoker) Invoke() (*model.UpdatePrivateZoneResponse, error) { - if result, err := i.BaseInvoker.Invoke(); err != nil { - return nil, err - } else { - return result.(*model.UpdatePrivateZoneResponse), nil - } -} - -type UpdatePublicZoneInvoker struct { - *invoker.BaseInvoker -} - -func (i *UpdatePublicZoneInvoker) GetBaseInvoker() *invoker.BaseInvoker { - return i.BaseInvoker -} - -func (i *UpdatePublicZoneInvoker) Invoke() (*model.UpdatePublicZoneResponse, error) { - if result, err := i.BaseInvoker.Invoke(); err != nil { - return nil, err - } else { - return result.(*model.UpdatePublicZoneResponse), nil - } -} - -type UpdatePublicZoneStatusInvoker struct { - *invoker.BaseInvoker -} - -func (i *UpdatePublicZoneStatusInvoker) GetBaseInvoker() *invoker.BaseInvoker { - return i.BaseInvoker -} - -func (i *UpdatePublicZoneStatusInvoker) Invoke() (*model.UpdatePublicZoneStatusResponse, error) { - if result, err := i.BaseInvoker.Invoke(); err != nil { - return nil, err - } else { - return result.(*model.UpdatePublicZoneStatusResponse), nil - } -} diff --git a/sdk/services/dns/v2/dns_meta.go b/sdk/services/dns/v2/dns_meta.go index d8d462d..9b96f06 100644 --- a/sdk/services/dns/v2/dns_meta.go +++ b/sdk/services/dns/v2/dns_meta.go @@ -1,1024 +1,17 @@ package v2 import ( - "github.com/libdns/huaweicloud/sdk/core/def" - - "github.com/libdns/huaweicloud/sdk/services/dns/v2/model" - "net/http" -) - -func GenReqDefForCreateCustomLine() *def.HttpRequestDef { - reqDefBuilder := def.NewHttpRequestDefBuilder(). - WithMethod(http.MethodPost). - WithPath("/v2.1/customlines"). - WithResponse(new(model.CreateCustomLineResponse)). - WithContentType("application/json") - - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("Body"). - WithLocationType(def.Body)) - - requestDef := reqDefBuilder.Build() - return requestDef -} - -func GenReqDefForCreateLineGroup() *def.HttpRequestDef { - reqDefBuilder := def.NewHttpRequestDefBuilder(). - WithMethod(http.MethodPost). - WithPath("/v2.1/linegroups"). - WithResponse(new(model.CreateLineGroupResponse)). - WithContentType("application/json") - - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("Body"). - WithLocationType(def.Body)) - - requestDef := reqDefBuilder.Build() - return requestDef -} - -func GenReqDefForDeleteCustomLine() *def.HttpRequestDef { - reqDefBuilder := def.NewHttpRequestDefBuilder(). - WithMethod(http.MethodDelete). - WithPath("/v2.1/customlines/{line_id}"). - WithResponse(new(model.DeleteCustomLineResponse)). - WithContentType("application/json") - - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("LineId"). - WithJsonTag("line_id"). - WithLocationType(def.Path)) - - requestDef := reqDefBuilder.Build() - return requestDef -} - -func GenReqDefForDeleteLineGroup() *def.HttpRequestDef { - reqDefBuilder := def.NewHttpRequestDefBuilder(). - WithMethod(http.MethodDelete). - WithPath("/v2.1/linegroups/{linegroup_id}"). - WithResponse(new(model.DeleteLineGroupResponse)). - WithContentType("application/json") - - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("LinegroupId"). - WithJsonTag("linegroup_id"). - WithLocationType(def.Path)) - - requestDef := reqDefBuilder.Build() - return requestDef -} - -func GenReqDefForListApiVersions() *def.HttpRequestDef { - reqDefBuilder := def.NewHttpRequestDefBuilder(). - WithMethod(http.MethodGet). - WithPath("/"). - WithResponse(new(model.ListApiVersionsResponse)). - WithContentType("application/json") - - requestDef := reqDefBuilder.Build() - return requestDef -} - -func GenReqDefForListCustomLine() *def.HttpRequestDef { - reqDefBuilder := def.NewHttpRequestDefBuilder(). - WithMethod(http.MethodGet). - WithPath("/v2.1/customlines"). - WithResponse(new(model.ListCustomLineResponse)). - WithContentType("application/json") - - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("LineId"). - WithJsonTag("line_id"). - WithLocationType(def.Query)) - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("Name"). - WithJsonTag("name"). - WithLocationType(def.Query)) - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("Limit"). - WithJsonTag("limit"). - WithLocationType(def.Query)) - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("Offset"). - WithJsonTag("offset"). - WithLocationType(def.Query)) - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("ShowDetail"). - WithJsonTag("show_detail"). - WithLocationType(def.Query)) - - requestDef := reqDefBuilder.Build() - return requestDef -} - -func GenReqDefForListLineGroups() *def.HttpRequestDef { - reqDefBuilder := def.NewHttpRequestDefBuilder(). - WithMethod(http.MethodGet). - WithPath("/v2.1/linegroups"). - WithResponse(new(model.ListLineGroupsResponse)). - WithContentType("application/json") - - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("LineId"). - WithJsonTag("line_id"). - WithLocationType(def.Query)) - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("Name"). - WithJsonTag("name"). - WithLocationType(def.Query)) - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("Limit"). - WithJsonTag("limit"). - WithLocationType(def.Query)) - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("Offset"). - WithJsonTag("offset"). - WithLocationType(def.Query)) - - requestDef := reqDefBuilder.Build() - return requestDef -} - -func GenReqDefForListNameServers() *def.HttpRequestDef { - reqDefBuilder := def.NewHttpRequestDefBuilder(). - WithMethod(http.MethodGet). - WithPath("/v2/nameservers"). - WithResponse(new(model.ListNameServersResponse)). - WithContentType("application/json") - - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("Type"). - WithJsonTag("type"). - WithLocationType(def.Query)) - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("Region"). - WithJsonTag("region"). - WithLocationType(def.Query)) - - requestDef := reqDefBuilder.Build() - return requestDef -} - -func GenReqDefForShowApiInfo() *def.HttpRequestDef { - reqDefBuilder := def.NewHttpRequestDefBuilder(). - WithMethod(http.MethodGet). - WithPath("/{version}"). - WithResponse(new(model.ShowApiInfoResponse)). - WithContentType("application/json") - - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("Version"). - WithJsonTag("version"). - WithLocationType(def.Path)) - - requestDef := reqDefBuilder.Build() - return requestDef -} - -func GenReqDefForShowDomainQuota() *def.HttpRequestDef { - reqDefBuilder := def.NewHttpRequestDefBuilder(). - WithMethod(http.MethodGet). - WithPath("/v2/quotamg/dns/quotas"). - WithResponse(new(model.ShowDomainQuotaResponse)). - WithContentType("application/json") - - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("DomainId"). - WithJsonTag("domain_id"). - WithLocationType(def.Query)) - - requestDef := reqDefBuilder.Build() - return requestDef -} - -func GenReqDefForShowLineGroup() *def.HttpRequestDef { - reqDefBuilder := def.NewHttpRequestDefBuilder(). - WithMethod(http.MethodGet). - WithPath("/v2.1/linegroups/{linegroup_id}"). - WithResponse(new(model.ShowLineGroupResponse)). - WithContentType("application/json") - - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("LinegroupId"). - WithJsonTag("linegroup_id"). - WithLocationType(def.Path)) - - requestDef := reqDefBuilder.Build() - return requestDef -} - -func GenReqDefForUpdateCustomLine() *def.HttpRequestDef { - reqDefBuilder := def.NewHttpRequestDefBuilder(). - WithMethod(http.MethodPut). - WithPath("/v2.1/customlines/{line_id}"). - WithResponse(new(model.UpdateCustomLineResponse)). - WithContentType("application/json") - - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("LineId"). - WithJsonTag("line_id"). - WithLocationType(def.Path)) - - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("Body"). - WithLocationType(def.Body)) - - requestDef := reqDefBuilder.Build() - return requestDef -} - -func GenReqDefForUpdateLineGroups() *def.HttpRequestDef { - reqDefBuilder := def.NewHttpRequestDefBuilder(). - WithMethod(http.MethodPut). - WithPath("/v2.1/linegroups/{linegroup_id}"). - WithResponse(new(model.UpdateLineGroupsResponse)). - WithContentType("application/json") - - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("LinegroupId"). - WithJsonTag("linegroup_id"). - WithLocationType(def.Path)) - - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("Body"). - WithLocationType(def.Body)) - - requestDef := reqDefBuilder.Build() - return requestDef -} - -func GenReqDefForCreateEipRecordSet() *def.HttpRequestDef { - reqDefBuilder := def.NewHttpRequestDefBuilder(). - WithMethod(http.MethodPatch). - WithPath("/v2/reverse/floatingips/{region}:{floatingip_id}"). - WithResponse(new(model.CreateEipRecordSetResponse)). - WithContentType("application/json") - - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("Region"). - WithJsonTag("region"). - WithLocationType(def.Path)) - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("FloatingipId"). - WithJsonTag("floatingip_id"). - WithLocationType(def.Path)) - - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("Body"). - WithLocationType(def.Body)) - - requestDef := reqDefBuilder.Build() - return requestDef -} - -func GenReqDefForListPtrRecords() *def.HttpRequestDef { - reqDefBuilder := def.NewHttpRequestDefBuilder(). - WithMethod(http.MethodGet). - WithPath("/v2/reverse/floatingips"). - WithResponse(new(model.ListPtrRecordsResponse)). - WithContentType("application/json") - - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("Marker"). - WithJsonTag("marker"). - WithLocationType(def.Query)) - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("Limit"). - WithJsonTag("limit"). - WithLocationType(def.Query)) - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("Offset"). - WithJsonTag("offset"). - WithLocationType(def.Query)) - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("EnterpriseProjectId"). - WithJsonTag("enterprise_project_id"). - WithLocationType(def.Query)) - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("Tags"). - WithJsonTag("tags"). - WithLocationType(def.Query)) - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("Status"). - WithJsonTag("status"). - WithLocationType(def.Query)) - - requestDef := reqDefBuilder.Build() - return requestDef -} - -func GenReqDefForRestorePtrRecord() *def.HttpRequestDef { - reqDefBuilder := def.NewHttpRequestDefBuilder(). - WithMethod(http.MethodPatch). - WithPath("/v2/reverse/floatingips/{region}:{floatingip_id}"). - WithResponse(new(model.RestorePtrRecordResponse)). - WithContentType("application/json") - - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("Region"). - WithJsonTag("region"). - WithLocationType(def.Path)) - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("FloatingipId"). - WithJsonTag("floatingip_id"). - WithLocationType(def.Path)) - - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("Body"). - WithLocationType(def.Body)) - - requestDef := reqDefBuilder.Build() - return requestDef -} - -func GenReqDefForShowPtrRecordSet() *def.HttpRequestDef { - reqDefBuilder := def.NewHttpRequestDefBuilder(). - WithMethod(http.MethodGet). - WithPath("/v2/reverse/floatingips/{region}:{floatingip_id}"). - WithResponse(new(model.ShowPtrRecordSetResponse)). - WithContentType("application/json") - - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("Region"). - WithJsonTag("region"). - WithLocationType(def.Path)) - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("FloatingipId"). - WithJsonTag("floatingip_id"). - WithLocationType(def.Path)) - - requestDef := reqDefBuilder.Build() - return requestDef -} - -func GenReqDefForUpdatePtrRecord() *def.HttpRequestDef { - reqDefBuilder := def.NewHttpRequestDefBuilder(). - WithMethod(http.MethodPatch). - WithPath("/v2/reverse/floatingips/{region}:{floatingip_id}"). - WithResponse(new(model.UpdatePtrRecordResponse)). - WithContentType("application/json") - - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("Region"). - WithJsonTag("region"). - WithLocationType(def.Path)) - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("FloatingipId"). - WithJsonTag("floatingip_id"). - WithLocationType(def.Path)) - - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("Body"). - WithLocationType(def.Body)) - - requestDef := reqDefBuilder.Build() - return requestDef -} - -func GenReqDefForBatchDeleteRecordSetWithLine() *def.HttpRequestDef { - reqDefBuilder := def.NewHttpRequestDefBuilder(). - WithMethod(http.MethodDelete). - WithPath("/v2.1/zones/{zone_id}/recordsets"). - WithResponse(new(model.BatchDeleteRecordSetWithLineResponse)). - WithContentType("application/json") - - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("ZoneId"). - WithJsonTag("zone_id"). - WithLocationType(def.Path)) - - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("Body"). - WithLocationType(def.Body)) - - requestDef := reqDefBuilder.Build() - return requestDef -} - -func GenReqDefForBatchUpdateRecordSetWithLine() *def.HttpRequestDef { - reqDefBuilder := def.NewHttpRequestDefBuilder(). - WithMethod(http.MethodPut). - WithPath("/v2.1/zones/{zone_id}/recordsets"). - WithResponse(new(model.BatchUpdateRecordSetWithLineResponse)). - WithContentType("application/json") - - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("ZoneId"). - WithJsonTag("zone_id"). - WithLocationType(def.Path)) - - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("Body"). - WithLocationType(def.Body)) - - requestDef := reqDefBuilder.Build() - return requestDef -} - -func GenReqDefForCreateRecordSet() *def.HttpRequestDef { - reqDefBuilder := def.NewHttpRequestDefBuilder(). - WithMethod(http.MethodPost). - WithPath("/v2/zones/{zone_id}/recordsets"). - WithResponse(new(model.CreateRecordSetResponse)). - WithContentType("application/json") - - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("ZoneId"). - WithJsonTag("zone_id"). - WithLocationType(def.Path)) - - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("Body"). - WithLocationType(def.Body)) - - requestDef := reqDefBuilder.Build() - return requestDef -} - -func GenReqDefForCreateRecordSetWithBatchLines() *def.HttpRequestDef { - reqDefBuilder := def.NewHttpRequestDefBuilder(). - WithMethod(http.MethodPost). - WithPath("/v2.1/zones/{zone_id}/recordsets/batch/lines"). - WithResponse(new(model.CreateRecordSetWithBatchLinesResponse)). - WithContentType("application/json") - - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("ZoneId"). - WithJsonTag("zone_id"). - WithLocationType(def.Path)) - - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("Body"). - WithLocationType(def.Body)) - - requestDef := reqDefBuilder.Build() - return requestDef -} - -func GenReqDefForCreateRecordSetWithLine() *def.HttpRequestDef { - reqDefBuilder := def.NewHttpRequestDefBuilder(). - WithMethod(http.MethodPost). - WithPath("/v2.1/zones/{zone_id}/recordsets"). - WithResponse(new(model.CreateRecordSetWithLineResponse)). - WithContentType("application/json") - - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("ZoneId"). - WithJsonTag("zone_id"). - WithLocationType(def.Path)) - - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("Body"). - WithLocationType(def.Body)) - - requestDef := reqDefBuilder.Build() - return requestDef -} - -func GenReqDefForDeleteRecordSet() *def.HttpRequestDef { - reqDefBuilder := def.NewHttpRequestDefBuilder(). - WithMethod(http.MethodDelete). - WithPath("/v2/zones/{zone_id}/recordsets/{recordset_id}"). - WithResponse(new(model.DeleteRecordSetResponse)). - WithContentType("application/json") - - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("ZoneId"). - WithJsonTag("zone_id"). - WithLocationType(def.Path)) - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("RecordsetId"). - WithJsonTag("recordset_id"). - WithLocationType(def.Path)) - - requestDef := reqDefBuilder.Build() - return requestDef -} - -func GenReqDefForDeleteRecordSets() *def.HttpRequestDef { - reqDefBuilder := def.NewHttpRequestDefBuilder(). - WithMethod(http.MethodDelete). - WithPath("/v2.1/zones/{zone_id}/recordsets/{recordset_id}"). - WithResponse(new(model.DeleteRecordSetsResponse)). - WithContentType("application/json") - - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("ZoneId"). - WithJsonTag("zone_id"). - WithLocationType(def.Path)) - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("RecordsetId"). - WithJsonTag("recordset_id"). - WithLocationType(def.Path)) - - requestDef := reqDefBuilder.Build() - return requestDef -} - -func GenReqDefForListRecordSets() *def.HttpRequestDef { - reqDefBuilder := def.NewHttpRequestDefBuilder(). - WithMethod(http.MethodGet). - WithPath("/v2/recordsets"). - WithResponse(new(model.ListRecordSetsResponse)). - WithContentType("application/json") - - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("ZoneType"). - WithJsonTag("zone_type"). - WithLocationType(def.Query)) - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("Marker"). - WithJsonTag("marker"). - WithLocationType(def.Query)) - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("SearchMode"). - WithJsonTag("search_mode"). - WithLocationType(def.Query)) - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("Limit"). - WithJsonTag("limit"). - WithLocationType(def.Query)) - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("Offset"). - WithJsonTag("offset"). - WithLocationType(def.Query)) - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("Tags"). - WithJsonTag("tags"). - WithLocationType(def.Query)) - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("Status"). - WithJsonTag("status"). - WithLocationType(def.Query)) - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("Type"). - WithJsonTag("type"). - WithLocationType(def.Query)) - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("Name"). - WithJsonTag("name"). - WithLocationType(def.Query)) - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("Id"). - WithJsonTag("id"). - WithLocationType(def.Query)) - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("Records"). - WithJsonTag("records"). - WithLocationType(def.Query)) - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("SortKey"). - WithJsonTag("sort_key"). - WithLocationType(def.Query)) - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("SortDir"). - WithJsonTag("sort_dir"). - WithLocationType(def.Query)) - - requestDef := reqDefBuilder.Build() - return requestDef -} - -func GenReqDefForListRecordSetsByZone() *def.HttpRequestDef { - reqDefBuilder := def.NewHttpRequestDefBuilder(). - WithMethod(http.MethodGet). - WithPath("/v2/zones/{zone_id}/recordsets"). - WithResponse(new(model.ListRecordSetsByZoneResponse)). - WithContentType("application/json") - - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("ZoneId"). - WithJsonTag("zone_id"). - WithLocationType(def.Path)) - - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("SearchMode"). - WithJsonTag("search_mode"). - WithLocationType(def.Query)) - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("Marker"). - WithJsonTag("marker"). - WithLocationType(def.Query)) - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("Limit"). - WithJsonTag("limit"). - WithLocationType(def.Query)) - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("Offset"). - WithJsonTag("offset"). - WithLocationType(def.Query)) - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("Tags"). - WithJsonTag("tags"). - WithLocationType(def.Query)) - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("Status"). - WithJsonTag("status"). - WithLocationType(def.Query)) - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("Type"). - WithJsonTag("type"). - WithLocationType(def.Query)) - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("Name"). - WithJsonTag("name"). - WithLocationType(def.Query)) - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("Id"). - WithJsonTag("id"). - WithLocationType(def.Query)) - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("SortKey"). - WithJsonTag("sort_key"). - WithLocationType(def.Query)) - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("SortDir"). - WithJsonTag("sort_dir"). - WithLocationType(def.Query)) - - requestDef := reqDefBuilder.Build() - return requestDef -} - -func GenReqDefForListRecordSetsWithLine() *def.HttpRequestDef { - reqDefBuilder := def.NewHttpRequestDefBuilder(). - WithMethod(http.MethodGet). - WithPath("/v2.1/recordsets"). - WithResponse(new(model.ListRecordSetsWithLineResponse)). - WithContentType("application/json") - - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("ZoneType"). - WithJsonTag("zone_type"). - WithLocationType(def.Query)) - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("Marker"). - WithJsonTag("marker"). - WithLocationType(def.Query)) - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("Limit"). - WithJsonTag("limit"). - WithLocationType(def.Query)) - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("Offset"). - WithJsonTag("offset"). - WithLocationType(def.Query)) - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("LineId"). - WithJsonTag("line_id"). - WithLocationType(def.Query)) - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("Tags"). - WithJsonTag("tags"). - WithLocationType(def.Query)) - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("Status"). - WithJsonTag("status"). - WithLocationType(def.Query)) - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("Type"). - WithJsonTag("type"). - WithLocationType(def.Query)) - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("Name"). - WithJsonTag("name"). - WithLocationType(def.Query)) - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("Id"). - WithJsonTag("id"). - WithLocationType(def.Query)) - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("Records"). - WithJsonTag("records"). - WithLocationType(def.Query)) - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("SortKey"). - WithJsonTag("sort_key"). - WithLocationType(def.Query)) - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("SortDir"). - WithJsonTag("sort_dir"). - WithLocationType(def.Query)) - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("HealthCheckId"). - WithJsonTag("health_check_id"). - WithLocationType(def.Query)) - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("SearchMode"). - WithJsonTag("search_mode"). - WithLocationType(def.Query)) - - requestDef := reqDefBuilder.Build() - return requestDef -} - -func GenReqDefForSetRecordSetsStatus() *def.HttpRequestDef { - reqDefBuilder := def.NewHttpRequestDefBuilder(). - WithMethod(http.MethodPut). - WithPath("/v2.1/recordsets/{recordset_id}/statuses/set"). - WithResponse(new(model.SetRecordSetsStatusResponse)). - WithContentType("application/json") - - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("RecordsetId"). - WithJsonTag("recordset_id"). - WithLocationType(def.Path)) - - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("Body"). - WithLocationType(def.Body)) - - requestDef := reqDefBuilder.Build() - return requestDef -} - -func GenReqDefForShowRecordSet() *def.HttpRequestDef { - reqDefBuilder := def.NewHttpRequestDefBuilder(). - WithMethod(http.MethodGet). - WithPath("/v2/zones/{zone_id}/recordsets/{recordset_id}"). - WithResponse(new(model.ShowRecordSetResponse)). - WithContentType("application/json") - - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("ZoneId"). - WithJsonTag("zone_id"). - WithLocationType(def.Path)) - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("RecordsetId"). - WithJsonTag("recordset_id"). - WithLocationType(def.Path)) - - requestDef := reqDefBuilder.Build() - return requestDef -} - -func GenReqDefForShowRecordSetByZone() *def.HttpRequestDef { - reqDefBuilder := def.NewHttpRequestDefBuilder(). - WithMethod(http.MethodGet). - WithPath("/v2.1/zones/{zone_id}/recordsets"). - WithResponse(new(model.ShowRecordSetByZoneResponse)). - WithContentType("application/json") - - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("ZoneId"). - WithJsonTag("zone_id"). - WithLocationType(def.Path)) - - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("Marker"). - WithJsonTag("marker"). - WithLocationType(def.Query)) - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("Limit"). - WithJsonTag("limit"). - WithLocationType(def.Query)) - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("Offset"). - WithJsonTag("offset"). - WithLocationType(def.Query)) - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("LineId"). - WithJsonTag("line_id"). - WithLocationType(def.Query)) - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("Tags"). - WithJsonTag("tags"). - WithLocationType(def.Query)) - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("Status"). - WithJsonTag("status"). - WithLocationType(def.Query)) - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("Type"). - WithJsonTag("type"). - WithLocationType(def.Query)) - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("Name"). - WithJsonTag("name"). - WithLocationType(def.Query)) - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("Id"). - WithJsonTag("id"). - WithLocationType(def.Query)) - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("SortKey"). - WithJsonTag("sort_key"). - WithLocationType(def.Query)) - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("SortDir"). - WithJsonTag("sort_dir"). - WithLocationType(def.Query)) - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("SearchMode"). - WithJsonTag("search_mode"). - WithLocationType(def.Query)) - - requestDef := reqDefBuilder.Build() - return requestDef -} - -func GenReqDefForShowRecordSetWithLine() *def.HttpRequestDef { - reqDefBuilder := def.NewHttpRequestDefBuilder(). - WithMethod(http.MethodGet). - WithPath("/v2.1/zones/{zone_id}/recordsets/{recordset_id}"). - WithResponse(new(model.ShowRecordSetWithLineResponse)). - WithContentType("application/json") - - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("ZoneId"). - WithJsonTag("zone_id"). - WithLocationType(def.Path)) - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("RecordsetId"). - WithJsonTag("recordset_id"). - WithLocationType(def.Path)) - - requestDef := reqDefBuilder.Build() - return requestDef -} - -func GenReqDefForUpdateRecordSet() *def.HttpRequestDef { - reqDefBuilder := def.NewHttpRequestDefBuilder(). - WithMethod(http.MethodPut). - WithPath("/v2/zones/{zone_id}/recordsets/{recordset_id}"). - WithResponse(new(model.UpdateRecordSetResponse)). - WithContentType("application/json") - - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("ZoneId"). - WithJsonTag("zone_id"). - WithLocationType(def.Path)) - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("RecordsetId"). - WithJsonTag("recordset_id"). - WithLocationType(def.Path)) - - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("Body"). - WithLocationType(def.Body)) - - requestDef := reqDefBuilder.Build() - return requestDef -} - -func GenReqDefForUpdateRecordSets() *def.HttpRequestDef { - reqDefBuilder := def.NewHttpRequestDefBuilder(). - WithMethod(http.MethodPut). - WithPath("/v2.1/zones/{zone_id}/recordsets/{recordset_id}"). - WithResponse(new(model.UpdateRecordSetsResponse)). - WithContentType("application/json") - - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("ZoneId"). - WithJsonTag("zone_id"). - WithLocationType(def.Path)) - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("RecordsetId"). - WithJsonTag("recordset_id"). - WithLocationType(def.Path)) - - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("Body"). - WithLocationType(def.Body)) - - requestDef := reqDefBuilder.Build() - return requestDef -} - -func GenReqDefForBatchCreateTag() *def.HttpRequestDef { - reqDefBuilder := def.NewHttpRequestDefBuilder(). - WithMethod(http.MethodPost). - WithPath("/v2/{project_id}/{resource_type}/{resource_id}/tags/action"). - WithResponse(new(model.BatchCreateTagResponse)). - WithContentType("application/json") - - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("ResourceType"). - WithJsonTag("resource_type"). - WithLocationType(def.Path)) - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("ResourceId"). - WithJsonTag("resource_id"). - WithLocationType(def.Path)) - - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("Body"). - WithLocationType(def.Body)) - - requestDef := reqDefBuilder.Build() - return requestDef -} - -func GenReqDefForCreateTag() *def.HttpRequestDef { - reqDefBuilder := def.NewHttpRequestDefBuilder(). - WithMethod(http.MethodPost). - WithPath("/v2/{project_id}/{resource_type}/{resource_id}/tags"). - WithResponse(new(model.CreateTagResponse)). - WithContentType("application/json") - - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("ResourceType"). - WithJsonTag("resource_type"). - WithLocationType(def.Path)) - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("ResourceId"). - WithJsonTag("resource_id"). - WithLocationType(def.Path)) - - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("Body"). - WithLocationType(def.Body)) - - requestDef := reqDefBuilder.Build() - return requestDef -} - -func GenReqDefForDeleteTag() *def.HttpRequestDef { - reqDefBuilder := def.NewHttpRequestDefBuilder(). - WithMethod(http.MethodDelete). - WithPath("/v2/{project_id}/{resource_type}/{resource_id}/tags/{key}"). - WithResponse(new(model.DeleteTagResponse)). - WithContentType("application/json") - - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("ResourceType"). - WithJsonTag("resource_type"). - WithLocationType(def.Path)) - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("ResourceId"). - WithJsonTag("resource_id"). - WithLocationType(def.Path)) - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("Key"). - WithJsonTag("key"). - WithLocationType(def.Path)) - - requestDef := reqDefBuilder.Build() - return requestDef -} - -func GenReqDefForListTag() *def.HttpRequestDef { - reqDefBuilder := def.NewHttpRequestDefBuilder(). - WithMethod(http.MethodPost). - WithPath("/v2/{project_id}/{resource_type}/resource_instances/action"). - WithResponse(new(model.ListTagResponse)). - WithContentType("application/json") - - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("ResourceType"). - WithJsonTag("resource_type"). - WithLocationType(def.Path)) - - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("Body"). - WithLocationType(def.Body)) - - requestDef := reqDefBuilder.Build() - return requestDef -} - -func GenReqDefForListTags() *def.HttpRequestDef { - reqDefBuilder := def.NewHttpRequestDefBuilder(). - WithMethod(http.MethodGet). - WithPath("/v2/{project_id}/{resource_type}/tags"). - WithResponse(new(model.ListTagsResponse)). - WithContentType("application/json") - - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("ResourceType"). - WithJsonTag("resource_type"). - WithLocationType(def.Path)) - - requestDef := reqDefBuilder.Build() - return requestDef -} - -func GenReqDefForShowResourceTag() *def.HttpRequestDef { - reqDefBuilder := def.NewHttpRequestDefBuilder(). - WithMethod(http.MethodGet). - WithPath("/v2/{project_id}/{resource_type}/{resource_id}/tags"). - WithResponse(new(model.ShowResourceTagResponse)). - WithContentType("application/json") - - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("ResourceType"). - WithJsonTag("resource_type"). - WithLocationType(def.Path)) - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("ResourceId"). - WithJsonTag("resource_id"). - WithLocationType(def.Path)) + "net/http" - requestDef := reqDefBuilder.Build() - return requestDef -} + "github.com/libdns/huaweicloud/sdk/core/def" + "github.com/libdns/huaweicloud/sdk/services/dns/v2/model" +) -func GenReqDefForAssociateRouter() *def.HttpRequestDef { +func GenReqDefForCreateRecordSet() *def.HttpRequestDef { reqDefBuilder := def.NewHttpRequestDefBuilder(). WithMethod(http.MethodPost). - WithPath("/v2/zones/{zone_id}/associaterouter"). - WithResponse(new(model.AssociateRouterResponse)). + WithPath("/v2/zones/{zone_id}/recordsets"). + WithResponse(new(model.CreateRecordSetResponse)). WithContentType("application/json") reqDefBuilder.WithRequestField(def.NewFieldDef(). @@ -1034,73 +27,31 @@ func GenReqDefForAssociateRouter() *def.HttpRequestDef { return requestDef } -func GenReqDefForCreatePrivateZone() *def.HttpRequestDef { - reqDefBuilder := def.NewHttpRequestDefBuilder(). - WithMethod(http.MethodPost). - WithPath("/v2/zones"). - WithResponse(new(model.CreatePrivateZoneResponse)). - WithContentType("application/json") - - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("Body"). - WithLocationType(def.Body)) - - requestDef := reqDefBuilder.Build() - return requestDef -} - -func GenReqDefForCreatePublicZone() *def.HttpRequestDef { - reqDefBuilder := def.NewHttpRequestDefBuilder(). - WithMethod(http.MethodPost). - WithPath("/v2/zones"). - WithResponse(new(model.CreatePublicZoneResponse)). - WithContentType("application/json") - - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("Body"). - WithLocationType(def.Body)) - - requestDef := reqDefBuilder.Build() - return requestDef -} - -func GenReqDefForDeletePrivateZone() *def.HttpRequestDef { +func GenReqDefForDeleteRecordSet() *def.HttpRequestDef { reqDefBuilder := def.NewHttpRequestDefBuilder(). WithMethod(http.MethodDelete). - WithPath("/v2/zones/{zone_id}"). - WithResponse(new(model.DeletePrivateZoneResponse)). + WithPath("/v2/zones/{zone_id}/recordsets/{recordset_id}"). + WithResponse(new(model.DeleteRecordSetResponse)). WithContentType("application/json") reqDefBuilder.WithRequestField(def.NewFieldDef(). WithName("ZoneId"). WithJsonTag("zone_id"). WithLocationType(def.Path)) - - requestDef := reqDefBuilder.Build() - return requestDef -} - -func GenReqDefForDeletePublicZone() *def.HttpRequestDef { - reqDefBuilder := def.NewHttpRequestDefBuilder(). - WithMethod(http.MethodDelete). - WithPath("/v2/zones/{zone_id}"). - WithResponse(new(model.DeletePublicZoneResponse)). - WithContentType("application/json") - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("ZoneId"). - WithJsonTag("zone_id"). + WithName("RecordsetId"). + WithJsonTag("recordset_id"). WithLocationType(def.Path)) requestDef := reqDefBuilder.Build() return requestDef } -func GenReqDefForDisassociateRouter() *def.HttpRequestDef { +func GenReqDefForListRecordSetsByZone() *def.HttpRequestDef { reqDefBuilder := def.NewHttpRequestDefBuilder(). - WithMethod(http.MethodPost). - WithPath("/v2/zones/{zone_id}/disassociaterouter"). - WithResponse(new(model.DisassociateRouterResponse)). + WithMethod(http.MethodGet). + WithPath("/v2/zones/{zone_id}/recordsets"). + WithResponse(new(model.ListRecordSetsByZoneResponse)). WithContentType("application/json") reqDefBuilder.WithRequestField(def.NewFieldDef(). @@ -1109,32 +60,17 @@ func GenReqDefForDisassociateRouter() *def.HttpRequestDef { WithLocationType(def.Path)) reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("Body"). - WithLocationType(def.Body)) - - requestDef := reqDefBuilder.Build() - return requestDef -} - -func GenReqDefForListPrivateZones() *def.HttpRequestDef { - reqDefBuilder := def.NewHttpRequestDefBuilder(). - WithMethod(http.MethodGet). - WithPath("/v2/zones"). - WithResponse(new(model.ListPrivateZonesResponse)). - WithContentType("application/json") - + WithName("SearchMode"). + WithJsonTag("search_mode"). + WithLocationType(def.Query)) reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("Type"). - WithJsonTag("type"). + WithName("Marker"). + WithJsonTag("marker"). WithLocationType(def.Query)) reqDefBuilder.WithRequestField(def.NewFieldDef(). WithName("Limit"). WithJsonTag("limit"). WithLocationType(def.Query)) - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("Marker"). - WithJsonTag("marker"). - WithLocationType(def.Query)) reqDefBuilder.WithRequestField(def.NewFieldDef(). WithName("Offset"). WithJsonTag("offset"). @@ -1143,189 +79,49 @@ func GenReqDefForListPrivateZones() *def.HttpRequestDef { WithName("Tags"). WithJsonTag("tags"). WithLocationType(def.Query)) - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("Name"). - WithJsonTag("name"). - WithLocationType(def.Query)) reqDefBuilder.WithRequestField(def.NewFieldDef(). WithName("Status"). WithJsonTag("status"). WithLocationType(def.Query)) - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("SearchMode"). - WithJsonTag("search_mode"). - WithLocationType(def.Query)) - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("EnterpriseProjectId"). - WithJsonTag("enterprise_project_id"). - WithLocationType(def.Query)) - - requestDef := reqDefBuilder.Build() - return requestDef -} - -func GenReqDefForListPublicZones() *def.HttpRequestDef { - reqDefBuilder := def.NewHttpRequestDefBuilder(). - WithMethod(http.MethodGet). - WithPath("/v2/zones"). - WithResponse(new(model.ListPublicZonesResponse)). - WithContentType("application/json") - reqDefBuilder.WithRequestField(def.NewFieldDef(). WithName("Type"). WithJsonTag("type"). WithLocationType(def.Query)) - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("Limit"). - WithJsonTag("limit"). - WithLocationType(def.Query)) - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("Marker"). - WithJsonTag("marker"). - WithLocationType(def.Query)) - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("Offset"). - WithJsonTag("offset"). - WithLocationType(def.Query)) - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("Tags"). - WithJsonTag("tags"). - WithLocationType(def.Query)) reqDefBuilder.WithRequestField(def.NewFieldDef(). WithName("Name"). WithJsonTag("name"). WithLocationType(def.Query)) reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("Status"). - WithJsonTag("status"). + WithName("Id"). + WithJsonTag("id"). WithLocationType(def.Query)) reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("SearchMode"). - WithJsonTag("search_mode"). + WithName("SortKey"). + WithJsonTag("sort_key"). WithLocationType(def.Query)) reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("EnterpriseProjectId"). - WithJsonTag("enterprise_project_id"). + WithName("SortDir"). + WithJsonTag("sort_dir"). WithLocationType(def.Query)) requestDef := reqDefBuilder.Build() return requestDef } -func GenReqDefForShowPrivateZone() *def.HttpRequestDef { - reqDefBuilder := def.NewHttpRequestDefBuilder(). - WithMethod(http.MethodGet). - WithPath("/v2/zones/{zone_id}"). - WithResponse(new(model.ShowPrivateZoneResponse)). - WithContentType("application/json") - - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("ZoneId"). - WithJsonTag("zone_id"). - WithLocationType(def.Path)) - - requestDef := reqDefBuilder.Build() - return requestDef -} - -func GenReqDefForShowPrivateZoneNameServer() *def.HttpRequestDef { - reqDefBuilder := def.NewHttpRequestDefBuilder(). - WithMethod(http.MethodGet). - WithPath("/v2/zones/{zone_id}/nameservers"). - WithResponse(new(model.ShowPrivateZoneNameServerResponse)). - WithContentType("application/json") - - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("ZoneId"). - WithJsonTag("zone_id"). - WithLocationType(def.Path)) - - requestDef := reqDefBuilder.Build() - return requestDef -} - -func GenReqDefForShowPublicZone() *def.HttpRequestDef { - reqDefBuilder := def.NewHttpRequestDefBuilder(). - WithMethod(http.MethodGet). - WithPath("/v2/zones/{zone_id}"). - WithResponse(new(model.ShowPublicZoneResponse)). - WithContentType("application/json") - - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("ZoneId"). - WithJsonTag("zone_id"). - WithLocationType(def.Path)) - - requestDef := reqDefBuilder.Build() - return requestDef -} - -func GenReqDefForShowPublicZoneNameServer() *def.HttpRequestDef { - reqDefBuilder := def.NewHttpRequestDefBuilder(). - WithMethod(http.MethodGet). - WithPath("/v2/zones/{zone_id}/nameservers"). - WithResponse(new(model.ShowPublicZoneNameServerResponse)). - WithContentType("application/json") - - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("ZoneId"). - WithJsonTag("zone_id"). - WithLocationType(def.Path)) - - requestDef := reqDefBuilder.Build() - return requestDef -} - -func GenReqDefForUpdatePrivateZone() *def.HttpRequestDef { - reqDefBuilder := def.NewHttpRequestDefBuilder(). - WithMethod(http.MethodPatch). - WithPath("/v2/zones/{zone_id}"). - WithResponse(new(model.UpdatePrivateZoneResponse)). - WithContentType("application/json") - - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("ZoneId"). - WithJsonTag("zone_id"). - WithLocationType(def.Path)) - - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("Body"). - WithLocationType(def.Body)) - - requestDef := reqDefBuilder.Build() - return requestDef -} - -func GenReqDefForUpdatePublicZone() *def.HttpRequestDef { +func GenReqDefForUpdateRecordSet() *def.HttpRequestDef { reqDefBuilder := def.NewHttpRequestDefBuilder(). - WithMethod(http.MethodPatch). - WithPath("/v2/zones/{zone_id}"). - WithResponse(new(model.UpdatePublicZoneResponse)). + WithMethod(http.MethodPut). + WithPath("/v2/zones/{zone_id}/recordsets/{recordset_id}"). + WithResponse(new(model.UpdateRecordSetResponse)). WithContentType("application/json") reqDefBuilder.WithRequestField(def.NewFieldDef(). WithName("ZoneId"). WithJsonTag("zone_id"). WithLocationType(def.Path)) - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("Body"). - WithLocationType(def.Body)) - - requestDef := reqDefBuilder.Build() - return requestDef -} - -func GenReqDefForUpdatePublicZoneStatus() *def.HttpRequestDef { - reqDefBuilder := def.NewHttpRequestDefBuilder(). - WithMethod(http.MethodPut). - WithPath("/v2/zones/{zone_id}/statuses"). - WithResponse(new(model.UpdatePublicZoneStatusResponse)). - WithContentType("application/json") - - reqDefBuilder.WithRequestField(def.NewFieldDef(). - WithName("ZoneId"). - WithJsonTag("zone_id"). + WithName("RecordsetId"). + WithJsonTag("recordset_id"). WithLocationType(def.Path)) reqDefBuilder.WithRequestField(def.NewFieldDef(). diff --git a/sdk/services/dns/v2/model/model_alias_target.go b/sdk/services/dns/v2/model/model_alias_target.go deleted file mode 100644 index 2b44e33..0000000 --- a/sdk/services/dns/v2/model/model_alias_target.go +++ /dev/null @@ -1,26 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -// AliasTarget 别名记录。 -type AliasTarget struct { - - // 资源服务类型,支持别名记录的服务。取值: cloudsite:云速建站 waf:Web应用防火墙 - ResourceType *string `json:"resource_type,omitempty"` - - // 对应服务下的域名,由各服务提供。 - ResourceDomainName *string `json:"resource_domain_name,omitempty"` -} - -func (o AliasTarget) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "AliasTarget struct{}" - } - - return strings.Join([]string{"AliasTarget", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_associate_router_request.go b/sdk/services/dns/v2/model/model_associate_router_request.go deleted file mode 100644 index 548662a..0000000 --- a/sdk/services/dns/v2/model/model_associate_router_request.go +++ /dev/null @@ -1,25 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -// AssociateRouterRequest Request Object -type AssociateRouterRequest struct { - - // 关联VPC的Zone ID。 - ZoneId string `json:"zone_id"` - - Body *AssociateRouterRequestBody `json:"body,omitempty"` -} - -func (o AssociateRouterRequest) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "AssociateRouterRequest struct{}" - } - - return strings.Join([]string{"AssociateRouterRequest", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_associate_router_request_body.go b/sdk/services/dns/v2/model/model_associate_router_request_body.go deleted file mode 100644 index cef11cb..0000000 --- a/sdk/services/dns/v2/model/model_associate_router_request_body.go +++ /dev/null @@ -1,20 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -type AssociateRouterRequestBody struct { - Router *Router `json:"router"` -} - -func (o AssociateRouterRequestBody) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "AssociateRouterRequestBody struct{}" - } - - return strings.Join([]string{"AssociateRouterRequestBody", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_associate_router_response.go b/sdk/services/dns/v2/model/model_associate_router_response.go deleted file mode 100644 index 5ea9a21..0000000 --- a/sdk/services/dns/v2/model/model_associate_router_response.go +++ /dev/null @@ -1,30 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -// AssociateRouterResponse Response Object -type AssociateRouterResponse struct { - - // 关联VPC的ID。 - RouterId *string `json:"router_id,omitempty"` - - // 关联VPC所在的region。 - RouterRegion *string `json:"router_region,omitempty"` - - // 资源状态。 - Status *string `json:"status,omitempty"` - HttpStatusCode int `json:"-"` -} - -func (o AssociateRouterResponse) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "AssociateRouterResponse struct{}" - } - - return strings.Join([]string{"AssociateRouterResponse", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_batch_create_record_set_with_line.go b/sdk/services/dns/v2/model/model_batch_create_record_set_with_line.go deleted file mode 100644 index 7201aaf..0000000 --- a/sdk/services/dns/v2/model/model_batch_create_record_set_with_line.go +++ /dev/null @@ -1,31 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -type BatchCreateRecordSetWithLine struct { - - // 解析线路ID。 - Line string `json:"line"` - - // Record Set的有效缓存时间,以秒为单位。 取值范围:300-2147483647。 默认值为300s。 - Ttl *int32 `json:"ttl,omitempty"` - - // 解析记录的权重,默认为1。 当weight=null时,表示该解析记录不设置权重。 当weight=0,表示备用域名解析记录。 当weight>0,表示主用域名解析记录。 取值范围:0~100 在相同域名、类型、线路下的解析记录,规则如下: 全部设置权重,或全部不设置权重。 当不设置权重时,只能创建一个解析记录。 当设置权重时,最多能创建20个解析记录。 - Weight *int32 `json:"weight,omitempty"` - - // 解析记录的值。不同类型解析记录对应的值的规则不同。 - Records []string `json:"records"` -} - -func (o BatchCreateRecordSetWithLine) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "BatchCreateRecordSetWithLine struct{}" - } - - return strings.Join([]string{"BatchCreateRecordSetWithLine", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_batch_create_tag_request.go b/sdk/services/dns/v2/model/model_batch_create_tag_request.go deleted file mode 100644 index 8d02615..0000000 --- a/sdk/services/dns/v2/model/model_batch_create_tag_request.go +++ /dev/null @@ -1,28 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -// BatchCreateTagRequest Request Object -type BatchCreateTagRequest struct { - - // 资源的类型:DNS-public_zone,DNS-private_zone,DNS-public_recordset,DNS-private_recordset,DNS-ptr_record。 - ResourceType string `json:"resource_type"` - - // 资源id。 - ResourceId string `json:"resource_id"` - - Body *BatchHandTags `json:"body,omitempty"` -} - -func (o BatchCreateTagRequest) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "BatchCreateTagRequest struct{}" - } - - return strings.Join([]string{"BatchCreateTagRequest", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_batch_create_tag_response.go b/sdk/services/dns/v2/model/model_batch_create_tag_response.go deleted file mode 100644 index 9a2cf24..0000000 --- a/sdk/services/dns/v2/model/model_batch_create_tag_response.go +++ /dev/null @@ -1,21 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -// BatchCreateTagResponse Response Object -type BatchCreateTagResponse struct { - HttpStatusCode int `json:"-"` -} - -func (o BatchCreateTagResponse) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "BatchCreateTagResponse struct{}" - } - - return strings.Join([]string{"BatchCreateTagResponse", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_batch_delete_record_set_with_line_request.go b/sdk/services/dns/v2/model/model_batch_delete_record_set_with_line_request.go deleted file mode 100644 index ed42e9d..0000000 --- a/sdk/services/dns/v2/model/model_batch_delete_record_set_with_line_request.go +++ /dev/null @@ -1,25 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -// BatchDeleteRecordSetWithLineRequest Request Object -type BatchDeleteRecordSetWithLineRequest struct { - - // 所属zone的ID。 - ZoneId string `json:"zone_id"` - - Body *BatchDeleteRecordSetWithLineRequestBody `json:"body,omitempty"` -} - -func (o BatchDeleteRecordSetWithLineRequest) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "BatchDeleteRecordSetWithLineRequest struct{}" - } - - return strings.Join([]string{"BatchDeleteRecordSetWithLineRequest", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_batch_delete_record_set_with_line_request_body.go b/sdk/services/dns/v2/model/model_batch_delete_record_set_with_line_request_body.go deleted file mode 100644 index baf5954..0000000 --- a/sdk/services/dns/v2/model/model_batch_delete_record_set_with_line_request_body.go +++ /dev/null @@ -1,22 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -type BatchDeleteRecordSetWithLineRequestBody struct { - - // Record Set ID列表。最多支持100个。 - RecordsetIds []string `json:"recordset_ids"` -} - -func (o BatchDeleteRecordSetWithLineRequestBody) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "BatchDeleteRecordSetWithLineRequestBody struct{}" - } - - return strings.Join([]string{"BatchDeleteRecordSetWithLineRequestBody", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_batch_delete_record_set_with_line_response.go b/sdk/services/dns/v2/model/model_batch_delete_record_set_with_line_response.go deleted file mode 100644 index 68e05a8..0000000 --- a/sdk/services/dns/v2/model/model_batch_delete_record_set_with_line_response.go +++ /dev/null @@ -1,27 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -// BatchDeleteRecordSetWithLineResponse Response Object -type BatchDeleteRecordSetWithLineResponse struct { - Links *PageLink `json:"links,omitempty"` - - // recordset的列表信息。 - Recordsets *[]QueryRecordSetWithLineResp `json:"recordsets,omitempty"` - - Metadata *Metadata `json:"metadata,omitempty"` - HttpStatusCode int `json:"-"` -} - -func (o BatchDeleteRecordSetWithLineResponse) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "BatchDeleteRecordSetWithLineResponse struct{}" - } - - return strings.Join([]string{"BatchDeleteRecordSetWithLineResponse", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_batch_hand_tags.go b/sdk/services/dns/v2/model/model_batch_hand_tags.go deleted file mode 100644 index 7727550..0000000 --- a/sdk/services/dns/v2/model/model_batch_hand_tags.go +++ /dev/null @@ -1,25 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -type BatchHandTags struct { - - // 标签列表。删除时tags结构体不能缺失。 - Tags []Tag `json:"tags"` - - // 操作标识(区分大小写):create(创建)、delete(删除)。 - Action string `json:"action"` -} - -func (o BatchHandTags) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "BatchHandTags struct{}" - } - - return strings.Join([]string{"BatchHandTags", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_batch_update_record_set.go b/sdk/services/dns/v2/model/model_batch_update_record_set.go deleted file mode 100644 index 516e580..0000000 --- a/sdk/services/dns/v2/model/model_batch_update_record_set.go +++ /dev/null @@ -1,34 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -type BatchUpdateRecordSet struct { - - // RecordSet资源ID。 - Id string `json:"id"` - - // RecordSet资源描述。 - Description *string `json:"description,omitempty"` - - // Record Set的有效缓存时间,以秒为单位。 取值范围:300-2147483647。 默认值为300s。 - Ttl *int32 `json:"ttl,omitempty"` - - // 解析记录的权重,默认为null。 当weight=null时,表示该解析记录不设置权重。 当weight=0,表示备用域名解析记录。 当weight>0,表示主用域名解析记录。 取值范围:0~100 在相同域名、类型、线路下的解析记录,规则如下: 全部设置权重,或全部不设置权重。 当不设置权重时,只能创建一个解析记录。 当设置权重时,最多能创建20个解析记录。 - Weight *int32 `json:"weight,omitempty"` - - // 解析记录的值。不同类型解析记录对应的值的规则不同。 - Records []string `json:"records"` -} - -func (o BatchUpdateRecordSet) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "BatchUpdateRecordSet struct{}" - } - - return strings.Join([]string{"BatchUpdateRecordSet", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_batch_update_record_set_with_line_req.go b/sdk/services/dns/v2/model/model_batch_update_record_set_with_line_req.go deleted file mode 100644 index 1ca5223..0000000 --- a/sdk/services/dns/v2/model/model_batch_update_record_set_with_line_req.go +++ /dev/null @@ -1,22 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -type BatchUpdateRecordSetWithLineReq struct { - - // RecordSet 列表。 - Recordsets []BatchUpdateRecordSet `json:"recordsets"` -} - -func (o BatchUpdateRecordSetWithLineReq) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "BatchUpdateRecordSetWithLineReq struct{}" - } - - return strings.Join([]string{"BatchUpdateRecordSetWithLineReq", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_batch_update_record_set_with_line_request.go b/sdk/services/dns/v2/model/model_batch_update_record_set_with_line_request.go deleted file mode 100644 index c99410e..0000000 --- a/sdk/services/dns/v2/model/model_batch_update_record_set_with_line_request.go +++ /dev/null @@ -1,25 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -// BatchUpdateRecordSetWithLineRequest Request Object -type BatchUpdateRecordSetWithLineRequest struct { - - // 所属zone的ID。 - ZoneId string `json:"zone_id"` - - Body *BatchUpdateRecordSetWithLineReq `json:"body,omitempty"` -} - -func (o BatchUpdateRecordSetWithLineRequest) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "BatchUpdateRecordSetWithLineRequest struct{}" - } - - return strings.Join([]string{"BatchUpdateRecordSetWithLineRequest", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_batch_update_record_set_with_line_response.go b/sdk/services/dns/v2/model/model_batch_update_record_set_with_line_response.go deleted file mode 100644 index 9b26359..0000000 --- a/sdk/services/dns/v2/model/model_batch_update_record_set_with_line_response.go +++ /dev/null @@ -1,27 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -// BatchUpdateRecordSetWithLineResponse Response Object -type BatchUpdateRecordSetWithLineResponse struct { - Links *PageLink `json:"links,omitempty"` - - // recordset的列表信息。 - Recordsets *[]QueryRecordSetWithLineResp `json:"recordsets,omitempty"` - - Metadata *Metadata `json:"metadata,omitempty"` - HttpStatusCode int `json:"-"` -} - -func (o BatchUpdateRecordSetWithLineResponse) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "BatchUpdateRecordSetWithLineResponse struct{}" - } - - return strings.Join([]string{"BatchUpdateRecordSetWithLineResponse", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_create_custom_line_request.go b/sdk/services/dns/v2/model/model_create_custom_line_request.go deleted file mode 100644 index 371341e..0000000 --- a/sdk/services/dns/v2/model/model_create_custom_line_request.go +++ /dev/null @@ -1,21 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -// CreateCustomLineRequest Request Object -type CreateCustomLineRequest struct { - Body *CreateCustomLines `json:"body,omitempty"` -} - -func (o CreateCustomLineRequest) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "CreateCustomLineRequest struct{}" - } - - return strings.Join([]string{"CreateCustomLineRequest", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_create_custom_line_response.go b/sdk/services/dns/v2/model/model_create_custom_line_response.go deleted file mode 100644 index b8e70f4..0000000 --- a/sdk/services/dns/v2/model/model_create_custom_line_response.go +++ /dev/null @@ -1,42 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -// CreateCustomLineResponse Response Object -type CreateCustomLineResponse struct { - - // 解析线路ID。 - LineId *string `json:"line_id,omitempty"` - - // 解析线路名称。 - Name *string `json:"name,omitempty"` - - // IP地址段。 - IpSegments *[]string `json:"ip_segments,omitempty"` - - // 创建时间。 - CreatedAt *string `json:"created_at,omitempty"` - - // 更新时间。 - UpdatedAt *string `json:"updated_at,omitempty"` - - // 资源状态。 - Status *string `json:"status,omitempty"` - - // 自定义线路的描述信息。 - Description *string `json:"description,omitempty"` - HttpStatusCode int `json:"-"` -} - -func (o CreateCustomLineResponse) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "CreateCustomLineResponse struct{}" - } - - return strings.Join([]string{"CreateCustomLineResponse", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_create_custom_lines.go b/sdk/services/dns/v2/model/model_create_custom_lines.go deleted file mode 100644 index c91a036..0000000 --- a/sdk/services/dns/v2/model/model_create_custom_lines.go +++ /dev/null @@ -1,28 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -type CreateCustomLines struct { - - // 解析线路名称。 长度限制为1-80个字符,只允许包含中文、字母、数字、'-'、'_'、'.'字符。 租户内,解析线路名称是唯一的。 - Name string `json:"name"` - - // IP地址段。 以“-”分隔,小IP地址在前,大IP地址在后。IP段之间不能有交叉。当只有一个IP时,填写IP1-IP1。 目前只支持IPV4。 最多支持50个。 - IpSegments []string `json:"ip_segments"` - - // 自定义线路的描述信息。长度不超过255个字符。 默认值为空。 - Description *string `json:"description,omitempty"` -} - -func (o CreateCustomLines) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "CreateCustomLines struct{}" - } - - return strings.Join([]string{"CreateCustomLines", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_create_eip_record_set_request.go b/sdk/services/dns/v2/model/model_create_eip_record_set_request.go deleted file mode 100644 index a0897af..0000000 --- a/sdk/services/dns/v2/model/model_create_eip_record_set_request.go +++ /dev/null @@ -1,28 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -// CreateEipRecordSetRequest Request Object -type CreateEipRecordSetRequest struct { - - // 租户的区域信息。 - Region string `json:"region"` - - // 弹性公网IP(EIP)的ID。 - FloatingipId string `json:"floatingip_id"` - - Body *CreatePtrReq `json:"body,omitempty"` -} - -func (o CreateEipRecordSetRequest) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "CreateEipRecordSetRequest struct{}" - } - - return strings.Join([]string{"CreateEipRecordSetRequest", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_create_eip_record_set_response.go b/sdk/services/dns/v2/model/model_create_eip_record_set_response.go deleted file mode 100644 index d4dfa6e..0000000 --- a/sdk/services/dns/v2/model/model_create_eip_record_set_response.go +++ /dev/null @@ -1,47 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -// CreateEipRecordSetResponse Response Object -type CreateEipRecordSetResponse struct { - - // PTR记录的ID,格式形如{region}:{floatingip_id}。 - Id *string `json:"id,omitempty"` - - // PTR记录对应的域名。 - Ptrdname *string `json:"ptrdname,omitempty"` - - // 对PTR记录的描述。 - Description *string `json:"description,omitempty"` - - // PTR记录在本地DNS服务器的缓存时间,缓存时间越长更新生效越慢,以秒为单位。 - Ttl *int32 `json:"ttl,omitempty"` - - // 弹性IP的IP地址。 - Address *string `json:"address,omitempty"` - - // 资源状态。 - Status *string `json:"status,omitempty"` - - // 对该资源的当前操作。取值范围:CREATE,UPDATE,DELETE,NONE CREATE:表示创建,UPDATE:表示更新,DELETE:表示删除,NONE:表示无操作 - Action *string `json:"action,omitempty"` - - Links *PageLink `json:"links,omitempty"` - - // 反向解析关联的企业项目ID,长度不超过36个字符。 - EnterpriseProjectId *string `json:"enterprise_project_id,omitempty"` - HttpStatusCode int `json:"-"` -} - -func (o CreateEipRecordSetResponse) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "CreateEipRecordSetResponse struct{}" - } - - return strings.Join([]string{"CreateEipRecordSetResponse", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_create_line_group_request.go b/sdk/services/dns/v2/model/model_create_line_group_request.go deleted file mode 100644 index 86fb4ae..0000000 --- a/sdk/services/dns/v2/model/model_create_line_group_request.go +++ /dev/null @@ -1,21 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -// CreateLineGroupRequest Request Object -type CreateLineGroupRequest struct { - Body *CreateLineGroupsReq `json:"body,omitempty"` -} - -func (o CreateLineGroupRequest) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "CreateLineGroupRequest struct{}" - } - - return strings.Join([]string{"CreateLineGroupRequest", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_create_line_group_response.go b/sdk/services/dns/v2/model/model_create_line_group_response.go deleted file mode 100644 index 45fc671..0000000 --- a/sdk/services/dns/v2/model/model_create_line_group_response.go +++ /dev/null @@ -1,42 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -// CreateLineGroupResponse Response Object -type CreateLineGroupResponse struct { - - // 线路分组名称。 - Name *string `json:"name,omitempty"` - - // 线路分组包含的线路列表。 解析线路ID。 - Lines *[]string `json:"lines,omitempty"` - - // 资源状态。 取值范围:PENDING_CREATE,ACTIVE,PENDING_DELETE,PENDING_UPDATE,ERROR,FREEZE,DISABLE。 - Status *string `json:"status,omitempty"` - - // 线路分组的描述信息 - Description *string `json:"description,omitempty"` - - // 线路分组的id。 - LineId *string `json:"line_id,omitempty"` - - // 创建时间。 格式:yyyy-MM-dd'T'HH:mm:ss.SSS。 - CreatedAt *string `json:"created_at,omitempty"` - - // 更新时间。 格式:yyyy-MM-dd'T'HH:mm:ss.SSS。 - UpdatedAt *string `json:"updated_at,omitempty"` - HttpStatusCode int `json:"-"` -} - -func (o CreateLineGroupResponse) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "CreateLineGroupResponse struct{}" - } - - return strings.Join([]string{"CreateLineGroupResponse", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_create_line_groups_req.go b/sdk/services/dns/v2/model/model_create_line_groups_req.go deleted file mode 100644 index ff19faa..0000000 --- a/sdk/services/dns/v2/model/model_create_line_groups_req.go +++ /dev/null @@ -1,28 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -type CreateLineGroupsReq struct { - - // 线路分组名称。 不能与自定义线路名称、预制线路名称重复。 取值范围:1-64个字符,支持数字、字母、中文、_(下划线)、-(中划线)、.(点)。 - Name string `json:"name"` - - // 线路分组的描述信息。 长度不超过255个字符。默认值为空。 - Description *string `json:"description,omitempty"` - - // 线路分组包含的线路列表。最少为2个线路。 解析线路ID。 - Lines []string `json:"lines"` -} - -func (o CreateLineGroupsReq) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "CreateLineGroupsReq struct{}" - } - - return strings.Join([]string{"CreateLineGroupsReq", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_create_line_groups_resp.go b/sdk/services/dns/v2/model/model_create_line_groups_resp.go deleted file mode 100644 index 0f6be55..0000000 --- a/sdk/services/dns/v2/model/model_create_line_groups_resp.go +++ /dev/null @@ -1,40 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -type CreateLineGroupsResp struct { - - // 线路分组名称。 - Name *string `json:"name,omitempty"` - - // 线路分组包含的线路列表。 解析线路ID。 - Lines *[]string `json:"lines,omitempty"` - - // 资源状态。 取值范围:PENDING_CREATE,ACTIVE,PENDING_DELETE,PENDING_UPDATE,ERROR,FREEZE,DISABLE。 - Status *string `json:"status,omitempty"` - - // 线路分组的描述信息 - Description *string `json:"description,omitempty"` - - // 线路分组的id。 - LineId *string `json:"line_id,omitempty"` - - // 创建时间。 格式:yyyy-MM-dd'T'HH:mm:ss.SSS。 - CreatedAt *string `json:"created_at,omitempty"` - - // 更新时间。 格式:yyyy-MM-dd'T'HH:mm:ss.SSS。 - UpdatedAt *string `json:"updated_at,omitempty"` -} - -func (o CreateLineGroupsResp) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "CreateLineGroupsResp struct{}" - } - - return strings.Join([]string{"CreateLineGroupsResp", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_create_private_zone_req.go b/sdk/services/dns/v2/model/model_create_private_zone_req.go deleted file mode 100644 index 5d0ab5d..0000000 --- a/sdk/services/dns/v2/model/model_create_private_zone_req.go +++ /dev/null @@ -1,45 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -type CreatePrivateZoneReq struct { - - // 待创建的域名。 - Name string `json:"name"` - - // 域名的描述信息。 - Description *string `json:"description,omitempty"` - - // 域名类型。取值:private。 - ZoneType string `json:"zone_type"` - - // 管理该zone的管理员邮箱。 - Email *string `json:"email,omitempty"` - - // 用于填写默认生成的SOA记录中有效缓存时间,以秒为单位。 - Ttl *int32 `json:"ttl,omitempty"` - - Router *Router `json:"router"` - - // 内网Zone的子域名递归解析代理模式。 取值范围: AUTHORITY:当前Zone未开启递归解析代理 RECURSIVE:当前Zone已开启递归解析代理 - ProxyPattern *string `json:"proxy_pattern,omitempty"` - - // 资源标签。 - Tags *[]Tag `json:"tags,omitempty"` - - // 域名关联的企业项目ID,长度不超过36个字符。 默认值为0。 - EnterpriseProjectId *string `json:"enterprise_project_id,omitempty"` -} - -func (o CreatePrivateZoneReq) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "CreatePrivateZoneReq struct{}" - } - - return strings.Join([]string{"CreatePrivateZoneReq", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_create_private_zone_request.go b/sdk/services/dns/v2/model/model_create_private_zone_request.go deleted file mode 100644 index a86fbe3..0000000 --- a/sdk/services/dns/v2/model/model_create_private_zone_request.go +++ /dev/null @@ -1,21 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -// CreatePrivateZoneRequest Request Object -type CreatePrivateZoneRequest struct { - Body *CreatePrivateZoneReq `json:"body,omitempty"` -} - -func (o CreatePrivateZoneRequest) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "CreatePrivateZoneRequest struct{}" - } - - return strings.Join([]string{"CreatePrivateZoneRequest", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_create_private_zone_response.go b/sdk/services/dns/v2/model/model_create_private_zone_response.go deleted file mode 100644 index f7ed15f..0000000 --- a/sdk/services/dns/v2/model/model_create_private_zone_response.go +++ /dev/null @@ -1,70 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -// CreatePrivateZoneResponse Response Object -type CreatePrivateZoneResponse struct { - - // zone的ID,uuid形式的一个资源标识。 - Id *string `json:"id,omitempty"` - - // zone名称。 - Name *string `json:"name,omitempty"` - - // 对zone的描述信息。 - Description *string `json:"description,omitempty"` - - // 管理该zone的管理员邮箱。 - Email *string `json:"email,omitempty"` - - // zone类型,内网(private)。 - ZoneType *string `json:"zone_type,omitempty"` - - // 该zone下SOA记录中的ttl值。 - Ttl *int32 `json:"ttl,omitempty"` - - // 该zone下SOA记录中用于标识zone文件变更的序列值,用于主从节点同步。 该参数暂未使用。 - Serial *int32 `json:"serial,omitempty"` - - // 资源状态。 - Status *string `json:"status,omitempty"` - - // 该zone下的recordset个数。 - RecordNum *int32 `json:"record_num,omitempty"` - - // 内网Zone的子域名递归解析代理模式。 取值范围: AUTHORITY:当前Zone未开启递归解析代理 RECURSIVE:当前Zone已开启递归解析代理 - ProxyPattern *string `json:"proxy_pattern,omitempty"` - - // 托管该zone的pool,由系统分配。 - PoolId *string `json:"pool_id,omitempty"` - - // zone所属的项目ID。 - ProjectId *string `json:"project_id,omitempty"` - - // 创建时间。 采用UTC时间格式,格式为:YYYY-MM-DDTHH:MM:SSZ - CreatedAt *string `json:"created_at,omitempty"` - - // 更新时间。 采用UTC时间格式,格式为:YYYY-MM-DDTHH:MM:SSZ - UpdatedAt *string `json:"updated_at,omitempty"` - - Links *PageLink `json:"links,omitempty"` - - // 主从模式中,从DNS服务器获取DNS信息。 - Masters *[]string `json:"masters,omitempty"` - - Router *RouterWithStatus `json:"router,omitempty"` - HttpStatusCode int `json:"-"` -} - -func (o CreatePrivateZoneResponse) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "CreatePrivateZoneResponse struct{}" - } - - return strings.Join([]string{"CreatePrivateZoneResponse", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_create_ptr_req.go b/sdk/services/dns/v2/model/model_create_ptr_req.go deleted file mode 100644 index 347bdfc..0000000 --- a/sdk/services/dns/v2/model/model_create_ptr_req.go +++ /dev/null @@ -1,34 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -type CreatePtrReq struct { - - // PTR记录对应的域名。 - Ptrdname string `json:"ptrdname"` - - // 对PTR记录的描述。 - Description *string `json:"description,omitempty"` - - // PTR记录在本地DNS服务器的缓存时间,缓存时间越长更新生效越慢,以秒为单位。取值范围:1~2147483647 - Ttl *int32 `json:"ttl,omitempty"` - - // 反向解析关联的企业项目ID,长度不超过36个字符。 - EnterpriseProjectId *string `json:"enterprise_project_id,omitempty"` - - // 资源标签。 - Tags *[]Tag `json:"tags,omitempty"` -} - -func (o CreatePtrReq) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "CreatePtrReq struct{}" - } - - return strings.Join([]string{"CreatePtrReq", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_create_public_zone_req.go b/sdk/services/dns/v2/model/model_create_public_zone_req.go deleted file mode 100644 index d4cd981..0000000 --- a/sdk/services/dns/v2/model/model_create_public_zone_req.go +++ /dev/null @@ -1,41 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -// CreatePublicZoneReq 创建公网zone请求 -type CreatePublicZoneReq struct { - - // Zone名称 - Name string `json:"name"` - - // 描述 - Description *string `json:"description,omitempty"` - - // Zone类型,取值public。 - ZoneType *string `json:"zone_type,omitempty"` - - // 管理该zone的管理员邮箱 - Email *string `json:"email,omitempty"` - - // 用于填写默认生成的SOA记录中有效缓存时间,以秒为单位. - Ttl *int32 `json:"ttl,omitempty"` - - // 域名关联的企业项目ID,长度不超过36个字符. - EnterpriseProjectId *string `json:"enterprise_project_id,omitempty"` - - // 资源标签。 - Tags *[]Tag `json:"tags,omitempty"` -} - -func (o CreatePublicZoneReq) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "CreatePublicZoneReq struct{}" - } - - return strings.Join([]string{"CreatePublicZoneReq", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_create_public_zone_request.go b/sdk/services/dns/v2/model/model_create_public_zone_request.go deleted file mode 100644 index 7ec1167..0000000 --- a/sdk/services/dns/v2/model/model_create_public_zone_request.go +++ /dev/null @@ -1,21 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -// CreatePublicZoneRequest Request Object -type CreatePublicZoneRequest struct { - Body *CreatePublicZoneReq `json:"body,omitempty"` -} - -func (o CreatePublicZoneRequest) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "CreatePublicZoneRequest struct{}" - } - - return strings.Join([]string{"CreatePublicZoneRequest", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_create_public_zone_response.go b/sdk/services/dns/v2/model/model_create_public_zone_response.go deleted file mode 100644 index e8d8517..0000000 --- a/sdk/services/dns/v2/model/model_create_public_zone_response.go +++ /dev/null @@ -1,68 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -// CreatePublicZoneResponse Response Object -type CreatePublicZoneResponse struct { - - // zone的ID,uuid形式的一个资源标识。 - Id *string `json:"id,omitempty"` - - // zone名称。 - Name *string `json:"name,omitempty"` - - // 对zone的描述信息。 - Description *string `json:"description,omitempty"` - - // 管理该zone的管理员邮箱。 - Email *string `json:"email,omitempty"` - - // zone类型,公网(public)。 - ZoneType *string `json:"zone_type,omitempty"` - - // 该zone下SOA记录中的ttl值。 - Ttl *int32 `json:"ttl,omitempty"` - - // 该zone下SOA记录中用于标识zone文件变更的序列值,用于主从节点同步。 - Serial *int32 `json:"serial,omitempty"` - - // 资源状态。 - Status *string `json:"status,omitempty"` - - // 该zone下的recordset个数。 - RecordNum *int32 `json:"record_num,omitempty"` - - // 托管该zone的pool,由系统分配。 - PoolId *string `json:"pool_id,omitempty"` - - // zone所属的项目ID。 - ProjectId *string `json:"project_id,omitempty"` - - // 创建时间。 采用UTC时间格式,格式为:YYYY-MM-DDTHH:MM:SSZ - CreatedAt *string `json:"created_at,omitempty"` - - // 更新时间。 采用UTC时间格式,格式为:YYYY-MM-DDTHH:MM:SSZ - UpdatedAt *string `json:"updated_at,omitempty"` - - Links *PageLink `json:"links,omitempty"` - - // 域名关联的企业项目ID,长度不超过36个字符。 - EnterpriseProjectId *string `json:"enterprise_project_id,omitempty"` - - // 主从模式中,从DNS服务器获取DNS信息。 目前暂未使用。 - Masters *[]string `json:"masters,omitempty"` - HttpStatusCode int `json:"-"` -} - -func (o CreatePublicZoneResponse) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "CreatePublicZoneResponse struct{}" - } - - return strings.Join([]string{"CreatePublicZoneResponse", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_create_r_set_batch_lines_req.go b/sdk/services/dns/v2/model/model_create_r_set_batch_lines_req.go deleted file mode 100644 index c2e1acf..0000000 --- a/sdk/services/dns/v2/model/model_create_r_set_batch_lines_req.go +++ /dev/null @@ -1,31 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -type CreateRSetBatchLinesReq struct { - - // 后缀需以Zone Name结束且为FQDN(即以“.”号结束的完整主机名)。 - Name string `json:"name"` - - // 可选配置,对域名的描述。 长度不超过255个字符。 - Description *string `json:"description,omitempty"` - - // Record Set的类型。 取值范围:A,AAAA,MX,CNAME,TXT,NS,SRV,CAA。 - Type string `json:"type"` - - // 解析线路域名参数。最多支持50个。 - Lines []BatchCreateRecordSetWithLine `json:"lines"` -} - -func (o CreateRSetBatchLinesReq) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "CreateRSetBatchLinesReq struct{}" - } - - return strings.Join([]string{"CreateRSetBatchLinesReq", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_create_record_set_request.go b/sdk/services/dns/v2/model/model_create_record_set_request.go index d5e89f8..654d6f8 100644 --- a/sdk/services/dns/v2/model/model_create_record_set_request.go +++ b/sdk/services/dns/v2/model/model_create_record_set_request.go @@ -1,9 +1,9 @@ package model import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - "strings" + + "github.com/libdns/huaweicloud/sdk/core/utils" ) // CreateRecordSetRequest Request Object diff --git a/sdk/services/dns/v2/model/model_create_record_set_request_body.go b/sdk/services/dns/v2/model/model_create_record_set_request_body.go index c9c28a9..b24349d 100644 --- a/sdk/services/dns/v2/model/model_create_record_set_request_body.go +++ b/sdk/services/dns/v2/model/model_create_record_set_request_body.go @@ -1,9 +1,9 @@ package model import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - "strings" + + "github.com/libdns/huaweicloud/sdk/core/utils" ) type CreateRecordSetRequestBody struct { diff --git a/sdk/services/dns/v2/model/model_create_record_set_response.go b/sdk/services/dns/v2/model/model_create_record_set_response.go index bfac0a5..c019d39 100644 --- a/sdk/services/dns/v2/model/model_create_record_set_response.go +++ b/sdk/services/dns/v2/model/model_create_record_set_response.go @@ -1,9 +1,9 @@ package model import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - "strings" + + "github.com/libdns/huaweicloud/sdk/core/utils" ) // CreateRecordSetResponse Response Object diff --git a/sdk/services/dns/v2/model/model_create_record_set_with_batch_lines_request.go b/sdk/services/dns/v2/model/model_create_record_set_with_batch_lines_request.go deleted file mode 100644 index 7a14e3b..0000000 --- a/sdk/services/dns/v2/model/model_create_record_set_with_batch_lines_request.go +++ /dev/null @@ -1,25 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -// CreateRecordSetWithBatchLinesRequest Request Object -type CreateRecordSetWithBatchLinesRequest struct { - - // 所属Zone的ID。 - ZoneId string `json:"zone_id"` - - Body *CreateRSetBatchLinesReq `json:"body,omitempty"` -} - -func (o CreateRecordSetWithBatchLinesRequest) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "CreateRecordSetWithBatchLinesRequest struct{}" - } - - return strings.Join([]string{"CreateRecordSetWithBatchLinesRequest", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_create_record_set_with_batch_lines_response.go b/sdk/services/dns/v2/model/model_create_record_set_with_batch_lines_response.go deleted file mode 100644 index 814e6e0..0000000 --- a/sdk/services/dns/v2/model/model_create_record_set_with_batch_lines_response.go +++ /dev/null @@ -1,27 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -// CreateRecordSetWithBatchLinesResponse Response Object -type CreateRecordSetWithBatchLinesResponse struct { - Links *PageLink `json:"links,omitempty"` - - // recordset的列表信息。 - Recordsets *[]QueryRecordSetWithLineResp `json:"recordsets,omitempty"` - - Metadata *Metadata `json:"metadata,omitempty"` - HttpStatusCode int `json:"-"` -} - -func (o CreateRecordSetWithBatchLinesResponse) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "CreateRecordSetWithBatchLinesResponse struct{}" - } - - return strings.Join([]string{"CreateRecordSetWithBatchLinesResponse", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_create_record_set_with_line_request.go b/sdk/services/dns/v2/model/model_create_record_set_with_line_request.go deleted file mode 100644 index b4f7d97..0000000 --- a/sdk/services/dns/v2/model/model_create_record_set_with_line_request.go +++ /dev/null @@ -1,25 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -// CreateRecordSetWithLineRequest Request Object -type CreateRecordSetWithLineRequest struct { - - // 所属zone的ID。 - ZoneId string `json:"zone_id"` - - Body *CreateRecordSetWithLineRequestBody `json:"body,omitempty"` -} - -func (o CreateRecordSetWithLineRequest) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "CreateRecordSetWithLineRequest struct{}" - } - - return strings.Join([]string{"CreateRecordSetWithLineRequest", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_create_record_set_with_line_request_body.go b/sdk/services/dns/v2/model/model_create_record_set_with_line_request_body.go deleted file mode 100644 index 5e517fa..0000000 --- a/sdk/services/dns/v2/model/model_create_record_set_with_line_request_body.go +++ /dev/null @@ -1,48 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -type CreateRecordSetWithLineRequestBody struct { - - // 域名,后缀需以zone name结束且为FQDN(即以“.”号结束的完整主机名)。 - Name string `json:"name"` - - // 可选配置,对域名的描述。 - Description *string `json:"description,omitempty"` - - // Record Set的类型。 - Type string `json:"type"` - - // 解析记录的状态。默认值为ENABLE。 - Status *string `json:"status,omitempty"` - - // 解析记录在本地DNS服务器的缓存时间,缓存时间越长更新生效越慢,以秒为单位。 - Ttl *int32 `json:"ttl,omitempty"` - - // 解析记录的值。不同类型解析记录对应的值的规则不同。 - Records *[]string `json:"records,omitempty"` - - // 解析线路ID - Line *string `json:"line,omitempty"` - - // 资源标签 - Tags *[]Tag `json:"tags,omitempty"` - - // 解析记录的权重。 - Weight *int32 `json:"weight,omitempty"` - - AliasTarget *AliasTarget `json:"alias_target,omitempty"` -} - -func (o CreateRecordSetWithLineRequestBody) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "CreateRecordSetWithLineRequestBody struct{}" - } - - return strings.Join([]string{"CreateRecordSetWithLineRequestBody", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_create_record_set_with_line_response.go b/sdk/services/dns/v2/model/model_create_record_set_with_line_response.go deleted file mode 100644 index 73abb6c..0000000 --- a/sdk/services/dns/v2/model/model_create_record_set_with_line_response.go +++ /dev/null @@ -1,73 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -// CreateRecordSetWithLineResponse Response Object -type CreateRecordSetWithLineResponse struct { - - // Record Set的ID。 - Id *string `json:"id,omitempty"` - - // Record Set的名称。 - Name *string `json:"name,omitempty"` - - // Record Set的描述信息。 - Description *string `json:"description,omitempty"` - - // 托管该记录的zone_id。 - ZoneId *string `json:"zone_id,omitempty"` - - // 托管该记录的zone_name。 - ZoneName *string `json:"zone_name,omitempty"` - - // 记录类型。 取值范围:A、AAAA、MX、CNAME、TXT、NS、SRV、CAA。 - Type *string `json:"type,omitempty"` - - // 解析记录在本地DNS服务器的缓存时间,缓存时间越长更新生效越慢,以秒为单位。 - Ttl *int32 `json:"ttl,omitempty"` - - // 域名解析后的值。 - Records *[]string `json:"records,omitempty"` - - // 创建时间。 - CreatedAt *string `json:"created_at,omitempty"` - - // 更新时间。 - UpdatedAt *string `json:"updated_at,omitempty"` - - // 资源状态。 - Status *string `json:"status,omitempty"` - - // 标识是否由系统默认生成,系统默认生成的Record Set不能删除。 - Default *bool `json:"default,omitempty"` - - // 该Record Set所属的项目ID。 - ProjectId *string `json:"project_id,omitempty"` - - Links *PageLink `json:"links,omitempty"` - - // 解析线路ID。 - Line *string `json:"line,omitempty"` - - // 解析记录的权重。 - Weight *int32 `json:"weight,omitempty"` - - // 健康检查ID。 - HealthCheckId *string `json:"health_check_id,omitempty"` - - AliasTarget *AliasTarget `json:"alias_target,omitempty"` - HttpStatusCode int `json:"-"` -} - -func (o CreateRecordSetWithLineResponse) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "CreateRecordSetWithLineResponse struct{}" - } - - return strings.Join([]string{"CreateRecordSetWithLineResponse", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_create_tag_req.go b/sdk/services/dns/v2/model/model_create_tag_req.go deleted file mode 100644 index 27e85ba..0000000 --- a/sdk/services/dns/v2/model/model_create_tag_req.go +++ /dev/null @@ -1,20 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -type CreateTagReq struct { - Tag *Tag `json:"tag"` -} - -func (o CreateTagReq) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "CreateTagReq struct{}" - } - - return strings.Join([]string{"CreateTagReq", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_create_tag_request.go b/sdk/services/dns/v2/model/model_create_tag_request.go deleted file mode 100644 index 6c0c28b..0000000 --- a/sdk/services/dns/v2/model/model_create_tag_request.go +++ /dev/null @@ -1,28 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -// CreateTagRequest Request Object -type CreateTagRequest struct { - - // 资源的类型:DNS-public_zone,DNS-private_zone,DNS-public_recordset,DNS-private_recordset,DNS-ptr_record。 - ResourceType string `json:"resource_type"` - - // 资源id。 - ResourceId string `json:"resource_id"` - - Body *CreateTagReq `json:"body,omitempty"` -} - -func (o CreateTagRequest) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "CreateTagRequest struct{}" - } - - return strings.Join([]string{"CreateTagRequest", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_create_tag_response.go b/sdk/services/dns/v2/model/model_create_tag_response.go deleted file mode 100644 index adf859a..0000000 --- a/sdk/services/dns/v2/model/model_create_tag_response.go +++ /dev/null @@ -1,21 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -// CreateTagResponse Response Object -type CreateTagResponse struct { - HttpStatusCode int `json:"-"` -} - -func (o CreateTagResponse) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "CreateTagResponse struct{}" - } - - return strings.Join([]string{"CreateTagResponse", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_delete_custom_line_request.go b/sdk/services/dns/v2/model/model_delete_custom_line_request.go deleted file mode 100644 index 1d3c098..0000000 --- a/sdk/services/dns/v2/model/model_delete_custom_line_request.go +++ /dev/null @@ -1,23 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -// DeleteCustomLineRequest Request Object -type DeleteCustomLineRequest struct { - - // 解析线路ID。 - LineId string `json:"line_id"` -} - -func (o DeleteCustomLineRequest) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "DeleteCustomLineRequest struct{}" - } - - return strings.Join([]string{"DeleteCustomLineRequest", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_delete_custom_line_response.go b/sdk/services/dns/v2/model/model_delete_custom_line_response.go deleted file mode 100644 index 12d5597..0000000 --- a/sdk/services/dns/v2/model/model_delete_custom_line_response.go +++ /dev/null @@ -1,42 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -// DeleteCustomLineResponse Response Object -type DeleteCustomLineResponse struct { - - // 解析线路ID。 - LineId *string `json:"line_id,omitempty"` - - // 解析线路名称。 - Name *string `json:"name,omitempty"` - - // IP地址段。 - IpSegments *[]string `json:"ip_segments,omitempty"` - - // 创建时间。 - CreatedAt *string `json:"created_at,omitempty"` - - // 更新时间。 - UpdatedAt *string `json:"updated_at,omitempty"` - - // 资源状态。 - Status *string `json:"status,omitempty"` - - // 自定义线路的描述信息。 - Description *string `json:"description,omitempty"` - HttpStatusCode int `json:"-"` -} - -func (o DeleteCustomLineResponse) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "DeleteCustomLineResponse struct{}" - } - - return strings.Join([]string{"DeleteCustomLineResponse", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_delete_line_group_request.go b/sdk/services/dns/v2/model/model_delete_line_group_request.go deleted file mode 100644 index c6d9fb7..0000000 --- a/sdk/services/dns/v2/model/model_delete_line_group_request.go +++ /dev/null @@ -1,23 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -// DeleteLineGroupRequest Request Object -type DeleteLineGroupRequest struct { - - // 线路分组ID。 - LinegroupId string `json:"linegroup_id"` -} - -func (o DeleteLineGroupRequest) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "DeleteLineGroupRequest struct{}" - } - - return strings.Join([]string{"DeleteLineGroupRequest", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_delete_line_group_response.go b/sdk/services/dns/v2/model/model_delete_line_group_response.go deleted file mode 100644 index 7cafcc6..0000000 --- a/sdk/services/dns/v2/model/model_delete_line_group_response.go +++ /dev/null @@ -1,42 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -// DeleteLineGroupResponse Response Object -type DeleteLineGroupResponse struct { - - // 线路分组名称。 - Name *string `json:"name,omitempty"` - - // 线路分组包含的线路列表。 解析线路ID。 - Lines *[]string `json:"lines,omitempty"` - - // 资源状态。 取值范围:PENDING_CREATE,ACTIVE,PENDING_DELETE,PENDING_UPDATE,ERROR,FREEZE,DISABLE。 - Status *string `json:"status,omitempty"` - - // 线路分组的描述信息 - Description *string `json:"description,omitempty"` - - // 线路分组的id。 - LineId *string `json:"line_id,omitempty"` - - // 创建时间。 格式:yyyy-MM-dd'T'HH:mm:ss.SSS。 - CreatedAt *string `json:"created_at,omitempty"` - - // 更新时间。 格式:yyyy-MM-dd'T'HH:mm:ss.SSS。 - UpdatedAt *string `json:"updated_at,omitempty"` - HttpStatusCode int `json:"-"` -} - -func (o DeleteLineGroupResponse) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "DeleteLineGroupResponse struct{}" - } - - return strings.Join([]string{"DeleteLineGroupResponse", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_delete_private_zone_request.go b/sdk/services/dns/v2/model/model_delete_private_zone_request.go deleted file mode 100644 index 5172874..0000000 --- a/sdk/services/dns/v2/model/model_delete_private_zone_request.go +++ /dev/null @@ -1,23 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -// DeletePrivateZoneRequest Request Object -type DeletePrivateZoneRequest struct { - - // 待删除zone的ID。 - ZoneId string `json:"zone_id"` -} - -func (o DeletePrivateZoneRequest) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "DeletePrivateZoneRequest struct{}" - } - - return strings.Join([]string{"DeletePrivateZoneRequest", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_delete_private_zone_response.go b/sdk/services/dns/v2/model/model_delete_private_zone_response.go deleted file mode 100644 index a41953b..0000000 --- a/sdk/services/dns/v2/model/model_delete_private_zone_response.go +++ /dev/null @@ -1,68 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -// DeletePrivateZoneResponse Response Object -type DeletePrivateZoneResponse struct { - - // zone的ID,uuid形式的一个资源标识。 - Id *string `json:"id,omitempty"` - - // zone名称。 - Name *string `json:"name,omitempty"` - - // 对zone的描述信息。 - Description *string `json:"description,omitempty"` - - // 管理该zone的管理员邮箱。 - Email *string `json:"email,omitempty"` - - // zone类型,内网(private)。 - ZoneType *string `json:"zone_type,omitempty"` - - // 该zone下SOA记录中的ttl值。 - Ttl *int32 `json:"ttl,omitempty"` - - // 该zone下SOA记录中用于标识zone文件变更的序列值,用于主从节点同步。 - Serial *int32 `json:"serial,omitempty"` - - // 资源状态 - Status *string `json:"status,omitempty"` - - // 该zone下的recordset个数。 - RecordNum *int32 `json:"record_num,omitempty"` - - // 托管该zone的pool,由系统分配。 - PoolId *string `json:"pool_id,omitempty"` - - // zone所属的项目ID。 - ProjectId *string `json:"project_id,omitempty"` - - // 创建时间。 - CreatedAt *string `json:"created_at,omitempty"` - - // 更新时间。 - UpdatedAt *string `json:"updated_at,omitempty"` - - Links *PageLink `json:"links,omitempty"` - - // 主从模式中,从DNS服务器获取DNS信息。 - Masters *[]string `json:"masters,omitempty"` - - // 与该zone关联的Router(VPC)列表。 - Routers *[]RouterWithStatus `json:"routers,omitempty"` - HttpStatusCode int `json:"-"` -} - -func (o DeletePrivateZoneResponse) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "DeletePrivateZoneResponse struct{}" - } - - return strings.Join([]string{"DeletePrivateZoneResponse", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_delete_public_zone_request.go b/sdk/services/dns/v2/model/model_delete_public_zone_request.go deleted file mode 100644 index 433037f..0000000 --- a/sdk/services/dns/v2/model/model_delete_public_zone_request.go +++ /dev/null @@ -1,23 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -// DeletePublicZoneRequest Request Object -type DeletePublicZoneRequest struct { - - // 待删除zone的ID - ZoneId string `json:"zone_id"` -} - -func (o DeletePublicZoneRequest) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "DeletePublicZoneRequest struct{}" - } - - return strings.Join([]string{"DeletePublicZoneRequest", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_delete_public_zone_response.go b/sdk/services/dns/v2/model/model_delete_public_zone_response.go deleted file mode 100644 index ba31c8a..0000000 --- a/sdk/services/dns/v2/model/model_delete_public_zone_response.go +++ /dev/null @@ -1,65 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -// DeletePublicZoneResponse Response Object -type DeletePublicZoneResponse struct { - - // Zone的ID - Id *string `json:"id,omitempty"` - - // zone名称 - Name *string `json:"name,omitempty"` - - // 对zone的描述信息 - Description *string `json:"description,omitempty"` - - // 管理该zone的管理员邮箱 - Email *string `json:"email,omitempty"` - - // zone类型,公网(public) - ZoneType *string `json:"zone_type,omitempty"` - - // 该zone下SOA记录中的ttl值 - Ttl *int32 `json:"ttl,omitempty"` - - // 该zone下SOA记录中用于标识zone文件变更的序列值,用于主从节点同步 - Serial *int32 `json:"serial,omitempty"` - - // 资源状态 - Status *string `json:"status,omitempty"` - - // 该zone下的recordset个数 - RecordNum *int32 `json:"record_num,omitempty"` - - // 托管该zone的pool,由系统分配 - PoolId *string `json:"pool_id,omitempty"` - - // zone所属的项目ID - ProjectId *string `json:"project_id,omitempty"` - - // 创建时间 - CreatedAt *string `json:"created_at,omitempty"` - - // 更新时间 - UpdatedAt *string `json:"updated_at,omitempty"` - - // 主从模式中,从DNS服务器获取DNS信息 - Masters *[]string `json:"masters,omitempty"` - - Links *PageLink `json:"links,omitempty"` - HttpStatusCode int `json:"-"` -} - -func (o DeletePublicZoneResponse) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "DeletePublicZoneResponse struct{}" - } - - return strings.Join([]string{"DeletePublicZoneResponse", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_delete_record_set_request.go b/sdk/services/dns/v2/model/model_delete_record_set_request.go index 3670f31..ffec5e0 100644 --- a/sdk/services/dns/v2/model/model_delete_record_set_request.go +++ b/sdk/services/dns/v2/model/model_delete_record_set_request.go @@ -1,9 +1,9 @@ package model import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - "strings" + + "github.com/libdns/huaweicloud/sdk/core/utils" ) // DeleteRecordSetRequest Request Object diff --git a/sdk/services/dns/v2/model/model_delete_record_set_response.go b/sdk/services/dns/v2/model/model_delete_record_set_response.go index c2d439f..7e4322a 100644 --- a/sdk/services/dns/v2/model/model_delete_record_set_response.go +++ b/sdk/services/dns/v2/model/model_delete_record_set_response.go @@ -1,9 +1,9 @@ package model import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - "strings" + + "github.com/libdns/huaweicloud/sdk/core/utils" ) // DeleteRecordSetResponse Response Object diff --git a/sdk/services/dns/v2/model/model_delete_record_sets_request.go b/sdk/services/dns/v2/model/model_delete_record_sets_request.go deleted file mode 100644 index ac5e6eb..0000000 --- a/sdk/services/dns/v2/model/model_delete_record_sets_request.go +++ /dev/null @@ -1,26 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -// DeleteRecordSetsRequest Request Object -type DeleteRecordSetsRequest struct { - - // Record Set所属的zone_id。 - ZoneId string `json:"zone_id"` - - // Record Set的id信息。 - RecordsetId string `json:"recordset_id"` -} - -func (o DeleteRecordSetsRequest) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "DeleteRecordSetsRequest struct{}" - } - - return strings.Join([]string{"DeleteRecordSetsRequest", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_delete_record_sets_response.go b/sdk/services/dns/v2/model/model_delete_record_sets_response.go deleted file mode 100644 index be2434c..0000000 --- a/sdk/services/dns/v2/model/model_delete_record_sets_response.go +++ /dev/null @@ -1,73 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -// DeleteRecordSetsResponse Response Object -type DeleteRecordSetsResponse struct { - - // Record Set的ID。 - Id *string `json:"id,omitempty"` - - // Record Set的名称。 - Name *string `json:"name,omitempty"` - - // Record Set的描述信息。 - Description *string `json:"description,omitempty"` - - // 托管该记录的zone_id。 - ZoneId *string `json:"zone_id,omitempty"` - - // 托管该记录的zone_name。 - ZoneName *string `json:"zone_name,omitempty"` - - // 记录类型。 - Type *string `json:"type,omitempty"` - - // 解析记录在本地DNS服务器的缓存时间,缓存时间越长更新生效越慢,以秒为单位。 - Ttl *int32 `json:"ttl,omitempty"` - - // 域名解析后的值。 - Records *[]string `json:"records,omitempty"` - - // 创建时间。 - CreatedAt *string `json:"created_at,omitempty"` - - // 更新时间。 - UpdatedAt *string `json:"updated_at,omitempty"` - - // 资源状态。 - Status *string `json:"status,omitempty"` - - // 标识是否由系统默认生成,系统默认生成的Record Set不能删除。 - Default *bool `json:"default,omitempty"` - - // 该Record Set所属的项目ID。 - ProjectId *string `json:"project_id,omitempty"` - - Links *PageLink `json:"links,omitempty"` - - // 解析线路ID。 - Line *string `json:"line,omitempty"` - - // 解析记录的权重。 - Weight *int32 `json:"weight,omitempty"` - - // 健康检查ID。 - HealthCheckId *string `json:"health_check_id,omitempty"` - - AliasTarget *AliasTarget `json:"alias_target,omitempty"` - HttpStatusCode int `json:"-"` -} - -func (o DeleteRecordSetsResponse) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "DeleteRecordSetsResponse struct{}" - } - - return strings.Join([]string{"DeleteRecordSetsResponse", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_delete_tag_request.go b/sdk/services/dns/v2/model/model_delete_tag_request.go deleted file mode 100644 index e19ac66..0000000 --- a/sdk/services/dns/v2/model/model_delete_tag_request.go +++ /dev/null @@ -1,29 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -// DeleteTagRequest Request Object -type DeleteTagRequest struct { - - // 资源的类型:DNS-public_zone,DNS-private_zone,DNS-public_recordset,DNS-private_recordset,DNS-ptr_record。 - ResourceType string `json:"resource_type"` - - // 资源id。 - ResourceId string `json:"resource_id"` - - // 标签key。 标签key不能为空或者空字符串。 - Key string `json:"key"` -} - -func (o DeleteTagRequest) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "DeleteTagRequest struct{}" - } - - return strings.Join([]string{"DeleteTagRequest", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_delete_tag_response.go b/sdk/services/dns/v2/model/model_delete_tag_response.go deleted file mode 100644 index 5538bd8..0000000 --- a/sdk/services/dns/v2/model/model_delete_tag_response.go +++ /dev/null @@ -1,21 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -// DeleteTagResponse Response Object -type DeleteTagResponse struct { - HttpStatusCode int `json:"-"` -} - -func (o DeleteTagResponse) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "DeleteTagResponse struct{}" - } - - return strings.Join([]string{"DeleteTagResponse", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_disassociate_router_request.go b/sdk/services/dns/v2/model/model_disassociate_router_request.go deleted file mode 100644 index 253389b..0000000 --- a/sdk/services/dns/v2/model/model_disassociate_router_request.go +++ /dev/null @@ -1,25 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -// DisassociateRouterRequest Request Object -type DisassociateRouterRequest struct { - - // 待解关联zone的ID。 - ZoneId string `json:"zone_id"` - - Body *DisassociaterouterRequestBody `json:"body,omitempty"` -} - -func (o DisassociateRouterRequest) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "DisassociateRouterRequest struct{}" - } - - return strings.Join([]string{"DisassociateRouterRequest", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_disassociate_router_response.go b/sdk/services/dns/v2/model/model_disassociate_router_response.go deleted file mode 100644 index 5da5080..0000000 --- a/sdk/services/dns/v2/model/model_disassociate_router_response.go +++ /dev/null @@ -1,30 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -// DisassociateRouterResponse Response Object -type DisassociateRouterResponse struct { - - // 关联VPC的ID。 - RouterId *string `json:"router_id,omitempty"` - - // 关联VPC所在的region。 - RouterRegion *string `json:"router_region,omitempty"` - - // 资源状态。 - Status *string `json:"status,omitempty"` - HttpStatusCode int `json:"-"` -} - -func (o DisassociateRouterResponse) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "DisassociateRouterResponse struct{}" - } - - return strings.Join([]string{"DisassociateRouterResponse", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_disassociaterouter_request_body.go b/sdk/services/dns/v2/model/model_disassociaterouter_request_body.go deleted file mode 100644 index e9208e6..0000000 --- a/sdk/services/dns/v2/model/model_disassociaterouter_request_body.go +++ /dev/null @@ -1,20 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -type DisassociaterouterRequestBody struct { - Router *Router `json:"router"` -} - -func (o DisassociaterouterRequestBody) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "DisassociaterouterRequestBody struct{}" - } - - return strings.Join([]string{"DisassociaterouterRequestBody", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_domain_quota_response_quotas.go b/sdk/services/dns/v2/model/model_domain_quota_response_quotas.go deleted file mode 100644 index b8d21fc..0000000 --- a/sdk/services/dns/v2/model/model_domain_quota_response_quotas.go +++ /dev/null @@ -1,31 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -type DomainQuotaResponseQuotas struct { - - // 资源类型。 - QuotaKey string `json:"quota_key"` - - // 资源配额的最大值。 - QuotaLimit int32 `json:"quota_limit"` - - // 配额已使用数量。 - Used int32 `json:"used"` - - // 配额统计单位,取固定值“count”。 - Unit string `json:"unit"` -} - -func (o DomainQuotaResponseQuotas) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "DomainQuotaResponseQuotas struct{}" - } - - return strings.Join([]string{"DomainQuotaResponseQuotas", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_line.go b/sdk/services/dns/v2/model/model_line.go deleted file mode 100644 index be0529d..0000000 --- a/sdk/services/dns/v2/model/model_line.go +++ /dev/null @@ -1,40 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -type Line struct { - - // 解析线路ID。 - LineId *string `json:"line_id,omitempty"` - - // 解析线路名称。 - Name *string `json:"name,omitempty"` - - // IP地址段。 - IpSegments *[]string `json:"ip_segments,omitempty"` - - // 创建时间。 - CreatedAt *string `json:"created_at,omitempty"` - - // 更新时间。 - UpdatedAt *string `json:"updated_at,omitempty"` - - // 资源状态。 - Status *string `json:"status,omitempty"` - - // 自定义线路的描述信息。 - Description *string `json:"description,omitempty"` -} - -func (o Line) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "Line struct{}" - } - - return strings.Join([]string{"Line", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_links_item.go b/sdk/services/dns/v2/model/model_links_item.go deleted file mode 100644 index 035c6bb..0000000 --- a/sdk/services/dns/v2/model/model_links_item.go +++ /dev/null @@ -1,26 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -// LinksItem 指向当前资源或者其他资源的链接。当查询需要分页时,需要包含一个next链接指向下一页。 -type LinksItem struct { - - // 对应快捷链接。 - Href string `json:"href"` - - // 快捷链接标记名称。 - Rel string `json:"rel"` -} - -func (o LinksItem) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "LinksItem struct{}" - } - - return strings.Join([]string{"LinksItem", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_list_api_versions_item.go b/sdk/services/dns/v2/model/model_list_api_versions_item.go deleted file mode 100644 index c23b739..0000000 --- a/sdk/services/dns/v2/model/model_list_api_versions_item.go +++ /dev/null @@ -1,28 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -type ListApiVersionsItem struct { - - // 版本状态,包含: CURRENT:表示该版本为主推版本。 SUPPORTED:表示为老版本,但是现在还在继续支持。 DEPRECATED:表示为废弃版本,存在后续删除的可能。 - Status *string `json:"status,omitempty"` - - // 版本号。 - Id *string `json:"id,omitempty"` - - // 指向当前版本的url。 - Links *[]LinksItem `json:"links,omitempty"` -} - -func (o ListApiVersionsItem) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "ListApiVersionsItem struct{}" - } - - return strings.Join([]string{"ListApiVersionsItem", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_list_api_versions_request.go b/sdk/services/dns/v2/model/model_list_api_versions_request.go deleted file mode 100644 index 5d64ebf..0000000 --- a/sdk/services/dns/v2/model/model_list_api_versions_request.go +++ /dev/null @@ -1,20 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -// ListApiVersionsRequest Request Object -type ListApiVersionsRequest struct { -} - -func (o ListApiVersionsRequest) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "ListApiVersionsRequest struct{}" - } - - return strings.Join([]string{"ListApiVersionsRequest", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_list_api_versions_response.go b/sdk/services/dns/v2/model/model_list_api_versions_response.go deleted file mode 100644 index df3853c..0000000 --- a/sdk/services/dns/v2/model/model_list_api_versions_response.go +++ /dev/null @@ -1,22 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -// ListApiVersionsResponse Response Object -type ListApiVersionsResponse struct { - Versions *ValuesItem `json:"versions,omitempty"` - HttpStatusCode int `json:"-"` -} - -func (o ListApiVersionsResponse) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "ListApiVersionsResponse struct{}" - } - - return strings.Join([]string{"ListApiVersionsResponse", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_list_custom_line_request.go b/sdk/services/dns/v2/model/model_list_custom_line_request.go deleted file mode 100644 index b498b9f..0000000 --- a/sdk/services/dns/v2/model/model_list_custom_line_request.go +++ /dev/null @@ -1,35 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -// ListCustomLineRequest Request Object -type ListCustomLineRequest struct { - - // 解析线路ID。 - LineId *string `json:"line_id,omitempty"` - - // 解析线路名称。 - Name *string `json:"name,omitempty"` - - // 每页返回的资源个数。 取值范围:0~500 取值一般为10,20,50。默认值为500。 - Limit *int32 `json:"limit,omitempty"` - - // 分页查询起始偏移量,表示从偏移量的下一个资源开始查询。 取值范围:0~2147483647 默认值为0。 当前设置marker不为空时,以marker为分页起始标识。 - Offset *int32 `json:"offset,omitempty"` - - // 是否查询详细信息。 取值范围: true:是,查询详细信息。 false:否,不查询详细信息。 默认为true。 - ShowDetail *bool `json:"show_detail,omitempty"` -} - -func (o ListCustomLineRequest) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "ListCustomLineRequest struct{}" - } - - return strings.Join([]string{"ListCustomLineRequest", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_list_custom_line_response.go b/sdk/services/dns/v2/model/model_list_custom_line_response.go deleted file mode 100644 index 197788c..0000000 --- a/sdk/services/dns/v2/model/model_list_custom_line_response.go +++ /dev/null @@ -1,26 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -// ListCustomLineResponse Response Object -type ListCustomLineResponse struct { - - // 线路列表。 - Lines *[]Line `json:"lines,omitempty"` - - Metadata *Metadata `json:"metadata,omitempty"` - HttpStatusCode int `json:"-"` -} - -func (o ListCustomLineResponse) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "ListCustomLineResponse struct{}" - } - - return strings.Join([]string{"ListCustomLineResponse", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_list_line_groups_request.go b/sdk/services/dns/v2/model/model_list_line_groups_request.go deleted file mode 100644 index 240d16d..0000000 --- a/sdk/services/dns/v2/model/model_list_line_groups_request.go +++ /dev/null @@ -1,32 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -// ListLineGroupsRequest Request Object -type ListLineGroupsRequest struct { - - // 线路分组ID。 模糊匹配。 - LineId *string `json:"line_id,omitempty"` - - // 线路分组名称。 模糊匹配。 - Name *string `json:"name,omitempty"` - - // 每页返回的资源个数。 当查询详细信息时:取值范围:0~100取值一般为10,20,50默认为100。 当查询概要信息时:取值范围:0~3000默认为3000。 - Limit *int32 `json:"limit,omitempty"` - - // 分页查询起始偏移量,表示从偏移量的下一个资源开始查询。 取值范围:0~2147483647 默认值为0。 当前设置marker不为空时,以marker为分页起始标识。 - Offset *int32 `json:"offset,omitempty"` -} - -func (o ListLineGroupsRequest) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "ListLineGroupsRequest struct{}" - } - - return strings.Join([]string{"ListLineGroupsRequest", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_list_line_groups_response.go b/sdk/services/dns/v2/model/model_list_line_groups_response.go deleted file mode 100644 index e5470d8..0000000 --- a/sdk/services/dns/v2/model/model_list_line_groups_response.go +++ /dev/null @@ -1,26 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -// ListLineGroupsResponse Response Object -type ListLineGroupsResponse struct { - - // 列表对象。 - Linegroups *[]CreateLineGroupsResp `json:"linegroups,omitempty"` - - Metadata *Metadata `json:"metadata,omitempty"` - HttpStatusCode int `json:"-"` -} - -func (o ListLineGroupsResponse) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "ListLineGroupsResponse struct{}" - } - - return strings.Join([]string{"ListLineGroupsResponse", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_list_name_servers_request.go b/sdk/services/dns/v2/model/model_list_name_servers_request.go deleted file mode 100644 index 50928b0..0000000 --- a/sdk/services/dns/v2/model/model_list_name_servers_request.go +++ /dev/null @@ -1,26 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -// ListNameServersRequest Request Object -type ListNameServersRequest struct { - - // 待查询名称服务器的类型。 取值范围: public, private。 如果为空,表示查询所有类型的名称服务器。 如果为public,表示查询公网的名称服务器。 如果为private,表示查询内网的名称服务器。 搜索模式精确搜索。 默认值为空。 - Type *string `json:"type,omitempty"` - - // 待查询的region ID。 当查询公网的名称服务器时,此处不填。 搜索模式精确搜索。 默认值为空。 - Region *string `json:"region,omitempty"` -} - -func (o ListNameServersRequest) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "ListNameServersRequest struct{}" - } - - return strings.Join([]string{"ListNameServersRequest", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_list_name_servers_response.go b/sdk/services/dns/v2/model/model_list_name_servers_response.go deleted file mode 100644 index 3ab5134..0000000 --- a/sdk/services/dns/v2/model/model_list_name_servers_response.go +++ /dev/null @@ -1,24 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -// ListNameServersResponse Response Object -type ListNameServersResponse struct { - - // name server列表对象。 - Nameservers *[]NameServersResp `json:"nameservers,omitempty"` - HttpStatusCode int `json:"-"` -} - -func (o ListNameServersResponse) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "ListNameServersResponse struct{}" - } - - return strings.Join([]string{"ListNameServersResponse", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_list_private_zones_request.go b/sdk/services/dns/v2/model/model_list_private_zones_request.go deleted file mode 100644 index c63185f..0000000 --- a/sdk/services/dns/v2/model/model_list_private_zones_request.go +++ /dev/null @@ -1,47 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -// ListPrivateZonesRequest Request Object -type ListPrivateZonesRequest struct { - - // 待查询的zone的类型。 取值范围:private。 - Type string `json:"type"` - - // 每页返回的资源个数。 取值范围:0~500 取值一般为10,20,50。默认值为500。 - Limit *int32 `json:"limit,omitempty"` - - // 分页查询起始的资源ID,为空时为查询第一页。 默认值为空。 - Marker *string `json:"marker,omitempty"` - - // 分页查询起始偏移量,表示从偏移量的下一个资源开始查询。 取值范围:0~2147483647 默认值为0。 当前设置marker不为空时,以marker为分页起始标识。 - Offset *int32 `json:"offset,omitempty"` - - // 资源标签。 - Tags *string `json:"tags,omitempty"` - - // zone名称。 - Name *string `json:"name,omitempty"` - - // 资源状态。 - Status *string `json:"status,omitempty"` - - // 查询条件搜索模式。 取值范围: like:模糊搜索 equal:精确搜索 - SearchMode *string `json:"search_mode,omitempty"` - - // 域名关联的企业项目ID,长度不超过36个字符。 默认值为0。 - EnterpriseProjectId *string `json:"enterprise_project_id,omitempty"` -} - -func (o ListPrivateZonesRequest) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "ListPrivateZonesRequest struct{}" - } - - return strings.Join([]string{"ListPrivateZonesRequest", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_list_private_zones_response.go b/sdk/services/dns/v2/model/model_list_private_zones_response.go deleted file mode 100644 index 4071918..0000000 --- a/sdk/services/dns/v2/model/model_list_private_zones_response.go +++ /dev/null @@ -1,27 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -// ListPrivateZonesResponse Response Object -type ListPrivateZonesResponse struct { - Links *PageLink `json:"links,omitempty"` - - Metadata *Metadata `json:"metadata,omitempty"` - - // zone列表信息。 - Zones *[]PrivateZoneResp `json:"zones,omitempty"` - HttpStatusCode int `json:"-"` -} - -func (o ListPrivateZonesResponse) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "ListPrivateZonesResponse struct{}" - } - - return strings.Join([]string{"ListPrivateZonesResponse", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_list_ptr_records_floating_resp.go b/sdk/services/dns/v2/model/model_list_ptr_records_floating_resp.go deleted file mode 100644 index 5193ed2..0000000 --- a/sdk/services/dns/v2/model/model_list_ptr_records_floating_resp.go +++ /dev/null @@ -1,48 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -type ListPtrRecordsFloatingResp struct { - - // PTR记录的ID,格式形如{region}:{floatingip_id}。 - Id *string `json:"id,omitempty"` - - // PTR记录对应的域名。 - Ptrdname *string `json:"ptrdname,omitempty"` - - // 对PTR记录的描述。 - Description *string `json:"description,omitempty"` - - // PTR记录在本地DNS服务器的缓存时间,缓存时间越长更新生效越慢,以秒为单位。 - Ttl *int32 `json:"ttl,omitempty"` - - // 弹性IP的IP地址。 - Address *string `json:"address,omitempty"` - - // 资源状态。 - Status *string `json:"status,omitempty"` - - // 对该资源的当前操作。 取值范围:CREATE,UPDATE,DELETE,NONE。 CREATE:表示创建,UPDATE:表示更新,DELETE:表示删除,NONE:表示无操作 - Action *string `json:"action,omitempty"` - - Links *PageLink `json:"links,omitempty"` - - // 资源标签。 - Tags *[]Tag `json:"tags,omitempty"` - - // 反向解析关联的企业项目ID,长度不超过36个字符。 - EnterpriseProjectId *string `json:"enterprise_project_id,omitempty"` -} - -func (o ListPtrRecordsFloatingResp) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "ListPtrRecordsFloatingResp struct{}" - } - - return strings.Join([]string{"ListPtrRecordsFloatingResp", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_list_ptr_records_request.go b/sdk/services/dns/v2/model/model_list_ptr_records_request.go deleted file mode 100644 index e988579..0000000 --- a/sdk/services/dns/v2/model/model_list_ptr_records_request.go +++ /dev/null @@ -1,38 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -// ListPtrRecordsRequest Request Object -type ListPtrRecordsRequest struct { - - // 分页查询起始的资源ID,为空时为查询第一页。 默认值为空。 - Marker *string `json:"marker,omitempty"` - - // 每页返回的资源个数。 取值范围:0~500 取值一般为10,20,50。默认值为500。 - Limit *int32 `json:"limit,omitempty"` - - // 分页查询起始偏移量,表示从偏移量的下一个资源开始查询。 取值范围:0~2147483647 默认值为0。 当前设置marker不为空时,以marker为分页起始标识。 - Offset *int32 `json:"offset,omitempty"` - - // 反向解析关联的企业项目ID,长度不超过36个字符。 默认值为0。 - EnterpriseProjectId *string `json:"enterprise_project_id,omitempty"` - - // 资源标签。 取值格式:key1,value1|key2,value2 多个标签之间用\"|\"分开,每个标签的键值用英文逗号\",\"相隔。 - Tags *string `json:"tags,omitempty"` - - // 资源状态。 - Status *string `json:"status,omitempty"` -} - -func (o ListPtrRecordsRequest) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "ListPtrRecordsRequest struct{}" - } - - return strings.Join([]string{"ListPtrRecordsRequest", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_list_ptr_records_response.go b/sdk/services/dns/v2/model/model_list_ptr_records_response.go deleted file mode 100644 index 144c4c6..0000000 --- a/sdk/services/dns/v2/model/model_list_ptr_records_response.go +++ /dev/null @@ -1,27 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -// ListPtrRecordsResponse Response Object -type ListPtrRecordsResponse struct { - Links *PageLink `json:"links,omitempty"` - - Metadata *Metadata `json:"metadata,omitempty"` - - // 弹性IP的PTR记录ID列表信息。 - Floatingips *[]ListPtrRecordsFloatingResp `json:"floatingips,omitempty"` - HttpStatusCode int `json:"-"` -} - -func (o ListPtrRecordsResponse) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "ListPtrRecordsResponse struct{}" - } - - return strings.Join([]string{"ListPtrRecordsResponse", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_list_public_zones_request.go b/sdk/services/dns/v2/model/model_list_public_zones_request.go deleted file mode 100644 index 8df4a3f..0000000 --- a/sdk/services/dns/v2/model/model_list_public_zones_request.go +++ /dev/null @@ -1,47 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -// ListPublicZonesRequest Request Object -type ListPublicZonesRequest struct { - - // 待查询的zone的类型。 取值范围:public 搜索模式默认为模糊搜索。 默认值为空。 - Type *string `json:"type,omitempty"` - - // 每页返回的资源个数。 取值范围:0~500 取值一般为10,20,50。默认值为500。 - Limit *int32 `json:"limit,omitempty"` - - // 分页查询起始的资源ID,为空时为查询第一页。 默认值为空。 - Marker *string `json:"marker,omitempty"` - - // 分页查询起始偏移量,表示从偏移量的下一个资源开始查询。 取值范围:0~2147483647 默认值为0。 当前设置marker不为空时,以marker为分页起始标识。 - Offset *int32 `json:"offset,omitempty"` - - // 资源标签。 取值格式:key1,value1|key2,value2 多个标签之间用\"|\"分开,每个标签的键值用英文逗号\",\"相隔。 多个标签之间为“与”的关系。 关于资源标签,请参见添加资源标签。 搜索模式为精确搜索。如果资源标签值value是以*开头时,则按照*后面的值全模糊匹配。 默认值为空。 - Tags *string `json:"tags,omitempty"` - - // zone名称。 搜索模式默认为模糊搜索。 - Name *string `json:"name,omitempty"` - - // 资源状态。 - Status *string `json:"status,omitempty"` - - // 查询条件搜索模式。 取值范围: like:模糊搜索 equal:精确搜索 - SearchMode *string `json:"search_mode,omitempty"` - - // 域名关联的企业项目ID,长度不超过36个字符。 默认值为0。 - EnterpriseProjectId *string `json:"enterprise_project_id,omitempty"` -} - -func (o ListPublicZonesRequest) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "ListPublicZonesRequest struct{}" - } - - return strings.Join([]string{"ListPublicZonesRequest", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_list_public_zones_response.go b/sdk/services/dns/v2/model/model_list_public_zones_response.go deleted file mode 100644 index 78713aa..0000000 --- a/sdk/services/dns/v2/model/model_list_public_zones_response.go +++ /dev/null @@ -1,27 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -// ListPublicZonesResponse Response Object -type ListPublicZonesResponse struct { - Links *PageLink `json:"links,omitempty"` - - // 查询公网Zone的列表响应。 - Zones *[]PublicZoneResp `json:"zones,omitempty"` - - Metadata *Metadata `json:"metadata,omitempty"` - HttpStatusCode int `json:"-"` -} - -func (o ListPublicZonesResponse) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "ListPublicZonesResponse struct{}" - } - - return strings.Join([]string{"ListPublicZonesResponse", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_list_record_sets.go b/sdk/services/dns/v2/model/model_list_record_sets.go index cbf5f48..20a4b1f 100644 --- a/sdk/services/dns/v2/model/model_list_record_sets.go +++ b/sdk/services/dns/v2/model/model_list_record_sets.go @@ -1,9 +1,9 @@ package model import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - "strings" + + "github.com/libdns/huaweicloud/sdk/core/utils" ) type ListRecordSets struct { diff --git a/sdk/services/dns/v2/model/model_list_record_sets_by_zone_request.go b/sdk/services/dns/v2/model/model_list_record_sets_by_zone_request.go index 0bf8f3e..2ec712b 100644 --- a/sdk/services/dns/v2/model/model_list_record_sets_by_zone_request.go +++ b/sdk/services/dns/v2/model/model_list_record_sets_by_zone_request.go @@ -1,9 +1,9 @@ package model import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - "strings" + + "github.com/libdns/huaweicloud/sdk/core/utils" ) // ListRecordSetsByZoneRequest Request Object diff --git a/sdk/services/dns/v2/model/model_list_record_sets_by_zone_response.go b/sdk/services/dns/v2/model/model_list_record_sets_by_zone_response.go index 490b6b7..531ab8a 100644 --- a/sdk/services/dns/v2/model/model_list_record_sets_by_zone_response.go +++ b/sdk/services/dns/v2/model/model_list_record_sets_by_zone_response.go @@ -1,9 +1,9 @@ package model import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - "strings" + + "github.com/libdns/huaweicloud/sdk/core/utils" ) // ListRecordSetsByZoneResponse Response Object diff --git a/sdk/services/dns/v2/model/model_list_record_sets_request.go b/sdk/services/dns/v2/model/model_list_record_sets_request.go deleted file mode 100644 index d9cab04..0000000 --- a/sdk/services/dns/v2/model/model_list_record_sets_request.go +++ /dev/null @@ -1,59 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -// ListRecordSetsRequest Request Object -type ListRecordSetsRequest struct { - - // 待查询的Record Set的域名类型。 取值范围:public、private 如果为空,表示查询公网类型的Record Set。 如果为public,表示查询公网类型的Record Set。 如果为private,表示查询内网类型的Record Set。 搜索模式默认为模糊搜索。 默认值为public。 - ZoneType *string `json:"zone_type,omitempty"` - - // 分页查询起始的资源ID,为空时为查询第一页。 默认值为空。 - Marker *string `json:"marker,omitempty"` - - // 查询条件搜索模式。 取值范围: like:模糊搜索 equal:精确搜索 - SearchMode *string `json:"search_mode,omitempty"` - - // 每页返回的资源个数。 取值范围:0~500 取值一般为10,20,50。默认值为500。 - Limit *int32 `json:"limit,omitempty"` - - // 分页查询起始偏移量,表示从偏移量的下一个资源开始查询。 取值范围:0~2147483647 默认值为0。 当前设置marker不为空时,以marker为分页起始标识。 - Offset *int32 `json:"offset,omitempty"` - - // 资源标签。 取值格式:key1,value1|key2,value2 多个标签之间用\"|\"分开,每个标签的键值用英文逗号\",\"相隔。 - Tags *string `json:"tags,omitempty"` - - // 待查询的Record Set的状态。 取值范围:ACTIVE、ERROR、DISABLE、FREEZE、PENDING_CREATE、PENDING_UPDATE、PENDING_DELETE - Status *string `json:"status,omitempty"` - - // 待查询的Record Set的记录集类型。 公网域名场景的记录类型: A、AAAA、MX、CNAME、TXT、NS、SRV、CAA。 内网域名场景的记录类型: A、AAAA、MX、CNAME、TXT、SRV。 - Type *string `json:"type,omitempty"` - - // 待查询的Record Set的域名中包含此name。 搜索模式默认为模糊搜索。 默认值为空。 - Name *string `json:"name,omitempty"` - - // 待查询的Record Set的id包含此id。 搜索模式默认为模糊搜索。 默认值为空。 - Id *string `json:"id,omitempty"` - - // 待查询的Record Set的值中包含此records。 搜索模式默认为模糊搜索。 默认值为空。 - Records *string `json:"records,omitempty"` - - // 查询结果中Record Set列表的排序字段。 取值范围: name:域名 type:记录集类型 默认值为空,表示不排序。 - SortKey *string `json:"sort_key,omitempty"` - - // 查询结果中Record Set列表的排序方式。 取值范围: desc:降序排序 asc:升序排序 默认值为空,表示不排序。 - SortDir *string `json:"sort_dir,omitempty"` -} - -func (o ListRecordSetsRequest) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "ListRecordSetsRequest struct{}" - } - - return strings.Join([]string{"ListRecordSetsRequest", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_list_record_sets_response.go b/sdk/services/dns/v2/model/model_list_record_sets_response.go deleted file mode 100644 index 838b152..0000000 --- a/sdk/services/dns/v2/model/model_list_record_sets_response.go +++ /dev/null @@ -1,27 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -// ListRecordSetsResponse Response Object -type ListRecordSetsResponse struct { - Links *PageLink `json:"links,omitempty"` - - // recordset列表对象。 - Recordsets *[]ListRecordSetsWithTags `json:"recordsets,omitempty"` - - Metadata *Metadata `json:"metadata,omitempty"` - HttpStatusCode int `json:"-"` -} - -func (o ListRecordSetsResponse) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "ListRecordSetsResponse struct{}" - } - - return strings.Join([]string{"ListRecordSetsResponse", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_list_record_sets_with_line_request.go b/sdk/services/dns/v2/model/model_list_record_sets_with_line_request.go deleted file mode 100644 index e0b51b4..0000000 --- a/sdk/services/dns/v2/model/model_list_record_sets_with_line_request.go +++ /dev/null @@ -1,65 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -// ListRecordSetsWithLineRequest Request Object -type ListRecordSetsWithLineRequest struct { - - // 待查询的Record Set的域名类型。 取值范围:public 搜索模式默认为模糊搜索。 默认值为public。 - ZoneType *string `json:"zone_type,omitempty"` - - // 分页查询起始的资源ID,为空时为查询第一页。 默认值为空。 - Marker *string `json:"marker,omitempty"` - - // 每页返回的资源个数。 取值范围:0~500 取值一般为10,20,50。默认值为500。 - Limit *int32 `json:"limit,omitempty"` - - // 分页查询起始偏移量,表示从偏移量的下一个资源开始查询。 取值范围:0~2147483647 默认值为0。 当前设置marker不为空时,以marker为分页起始标识。 - Offset *int32 `json:"offset,omitempty"` - - // 解析线路ID。 - LineId *string `json:"line_id,omitempty"` - - // 资源标签。 取值格式:key1,value1|key2,value2 多个标签之间用\"|\"分开,每个标签的键值用英文逗号\",\"相隔。 - Tags *string `json:"tags,omitempty"` - - // 待查询的Record Set的状态。 取值范围:ACTIVE、ERROR、DISABLE、FREEZE、PENDING_CREATE、PENDING_UPDATE、PENDING_DELETE - Status *string `json:"status,omitempty"` - - // 待查询的Record Set的记录集类型。 取值范围:A、CNAME、MX、AAAA、TXT、SRV、NS、CAA - Type *string `json:"type,omitempty"` - - // 待查询的Record Set的域名中包含此name。 搜索模式默认为模糊搜索。 默认值为空。 - Name *string `json:"name,omitempty"` - - // 待查询的Record Set的id包含此id。 搜索模式默认为模糊搜索。 默认值为空。 - Id *string `json:"id,omitempty"` - - // 待查询的Record Set的值中包含此records。 搜索模式默认为模糊搜索。 默认值为空。 - Records *string `json:"records,omitempty"` - - // 查询结果中Record Set列表的排序字段。 取值范围: name:域名 type:记录集类型 默认值为空,表示不排序。 - SortKey *string `json:"sort_key,omitempty"` - - // 查询结果中Record Set列表的排序方式。 取值范围: desc:降序排序 asc:升序排序 默认值为空,表示不排序。 - SortDir *string `json:"sort_dir,omitempty"` - - // 健康检查ID。 搜索模式默认为模糊搜索。 默认值为空。 - HealthCheckId *string `json:"health_check_id,omitempty"` - - // 查询条件搜索模式。 取值范围: like:模糊搜索 equal:精确搜索 - SearchMode *string `json:"search_mode,omitempty"` -} - -func (o ListRecordSetsWithLineRequest) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "ListRecordSetsWithLineRequest struct{}" - } - - return strings.Join([]string{"ListRecordSetsWithLineRequest", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_list_record_sets_with_line_response.go b/sdk/services/dns/v2/model/model_list_record_sets_with_line_response.go deleted file mode 100644 index 9e6ed41..0000000 --- a/sdk/services/dns/v2/model/model_list_record_sets_with_line_response.go +++ /dev/null @@ -1,27 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -// ListRecordSetsWithLineResponse Response Object -type ListRecordSetsWithLineResponse struct { - Links *PageLink `json:"links,omitempty"` - - // recordset列表信息。 - Recordsets *[]QueryRecordSetWithLineAndTagsResp `json:"recordsets,omitempty"` - - Metadata *Metadata `json:"metadata,omitempty"` - HttpStatusCode int `json:"-"` -} - -func (o ListRecordSetsWithLineResponse) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "ListRecordSetsWithLineResponse struct{}" - } - - return strings.Join([]string{"ListRecordSetsWithLineResponse", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_list_record_sets_with_tags.go b/sdk/services/dns/v2/model/model_list_record_sets_with_tags.go deleted file mode 100644 index fef5062..0000000 --- a/sdk/services/dns/v2/model/model_list_record_sets_with_tags.go +++ /dev/null @@ -1,63 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -type ListRecordSetsWithTags struct { - - // Record Set的ID。 - Id *string `json:"id,omitempty"` - - // Record Set的名称。 - Name *string `json:"name,omitempty"` - - // Record Set的描述信息。 - Description *string `json:"description,omitempty"` - - // 托管该记录的zone_id。 - ZoneId *string `json:"zone_id,omitempty"` - - // 托管该记录的zone_name。 - ZoneName *string `json:"zone_name,omitempty"` - - // 记录类型。 - Type *string `json:"type,omitempty"` - - // 解析记录在本地DNS服务器的缓存时间,缓存时间越长更新生效越慢,以秒为单位。 - Ttl *int32 `json:"ttl,omitempty"` - - // 域名解析后的值。 - Records *[]string `json:"records,omitempty"` - - // 创建时间。 - CreateAt *string `json:"create_at,omitempty"` - - // 更新时间。 - UpdateAt *string `json:"update_at,omitempty"` - - // 资源状态。 - Status *string `json:"status,omitempty"` - - // 标识是否由系统默认生成,系统默认生成的Record Set不能删除。 - Default *bool `json:"default,omitempty"` - - // 该Record Set所属的项目ID。 - ProjectId *string `json:"project_id,omitempty"` - - Links *PageLink `json:"links,omitempty"` - - // 资源标签。 - Tags *[]Tag `json:"tags,omitempty"` -} - -func (o ListRecordSetsWithTags) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "ListRecordSetsWithTags struct{}" - } - - return strings.Join([]string{"ListRecordSetsWithTags", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_list_tag_req.go b/sdk/services/dns/v2/model/model_list_tag_req.go deleted file mode 100644 index edc8e75..0000000 --- a/sdk/services/dns/v2/model/model_list_tag_req.go +++ /dev/null @@ -1,43 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -type ListTagReq struct { - - // 包含标签。 最多包含10个key,每个key下面的value最多10个,结构体不能缺失,key不能为空或者空字符串。Key不能重复,同一个key中values不能重复。 - Tags *[]TagValues `json:"tags,omitempty"` - - // 最多包含10个key,每个key下面的value最多10个,结构体不能缺失,key不能为空或者空字符串。Key不能重复,同一个key中values不能重复。 - TagsAny *[]TagValues `json:"tags_any,omitempty"` - - // 最多包含10个key,每个key下面的value最多10个,结构体不能缺失,key不能为空或者空字符串。Key不能重复,同一个key中values不能重复。 - NotTags *[]TagValues `json:"not_tags,omitempty"` - - // 最多包含10个key,每个key下面的value最多10个,结构体不能缺失,key不能为空或者空字符串。Key不能重复,同一个key中values不能重复。 - NotTagsAny *[]TagValues `json:"not_tags_any,omitempty"` - - // 每页返回的资源个数。 取值范围:1~1000 参数取值说明: 如果action为filter时,默认为1000。 如果action为count时,无此参数。 - Limit *int32 `json:"limit,omitempty"` - - // 分页查询起始偏移量,表示从偏移量的下一个资源开始查询。 取值范围:0~2147483647 默认值为0。 参数取值说明: 查询第一页数据时,不需要传入此参数。 查询后续页码数据时,将查询前一页数据时响应体中的值带入此参数。 如果action为filter时,默认为0,必须为数字,不能为负数。 如果action为count时,无此参数。 - Offset *int32 `json:"offset,omitempty"` - - // 操作标识(区分大小写)。 取值范围: filter:分页过滤查询 count:查询总条数 - Action string `json:"action"` - - // key为要匹配的字段,value为匹配的值。 如果value为空字符串则精确匹配,否则模糊匹配。 - Matches *[]Match `json:"matches,omitempty"` -} - -func (o ListTagReq) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "ListTagReq struct{}" - } - - return strings.Join([]string{"ListTagReq", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_list_tag_request.go b/sdk/services/dns/v2/model/model_list_tag_request.go deleted file mode 100644 index 56fa405..0000000 --- a/sdk/services/dns/v2/model/model_list_tag_request.go +++ /dev/null @@ -1,25 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -// ListTagRequest Request Object -type ListTagRequest struct { - - // 资源的类型:DNS-public_zone,DNS-private_zone,DNS-public_recordset,DNS-private_recordset,DNS-ptr_record。 - ResourceType string `json:"resource_type"` - - Body *ListTagReq `json:"body,omitempty"` -} - -func (o ListTagRequest) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "ListTagRequest struct{}" - } - - return strings.Join([]string{"ListTagRequest", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_list_tag_response.go b/sdk/services/dns/v2/model/model_list_tag_response.go deleted file mode 100644 index a9b900c..0000000 --- a/sdk/services/dns/v2/model/model_list_tag_response.go +++ /dev/null @@ -1,27 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -// ListTagResponse Response Object -type ListTagResponse struct { - - // 标签资源信息列表。 - Resources *[]ResourceItem `json:"resources,omitempty"` - - // 资源总数。 - TotalCount *int32 `json:"total_count,omitempty"` - HttpStatusCode int `json:"-"` -} - -func (o ListTagResponse) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "ListTagResponse struct{}" - } - - return strings.Join([]string{"ListTagResponse", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_list_tags_request.go b/sdk/services/dns/v2/model/model_list_tags_request.go deleted file mode 100644 index 241e818..0000000 --- a/sdk/services/dns/v2/model/model_list_tags_request.go +++ /dev/null @@ -1,23 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -// ListTagsRequest Request Object -type ListTagsRequest struct { - - // 资源的类型:DNS-public_zone,DNS-private_zone,DNS-public_recordset,DNS-private_recordset,DNS-ptr_record。 - ResourceType string `json:"resource_type"` -} - -func (o ListTagsRequest) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "ListTagsRequest struct{}" - } - - return strings.Join([]string{"ListTagsRequest", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_list_tags_response.go b/sdk/services/dns/v2/model/model_list_tags_response.go deleted file mode 100644 index e70d01e..0000000 --- a/sdk/services/dns/v2/model/model_list_tags_response.go +++ /dev/null @@ -1,24 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -// ListTagsResponse Response Object -type ListTagsResponse struct { - - // 标签列表。 - Tags *[]TagValues `json:"tags,omitempty"` - HttpStatusCode int `json:"-"` -} - -func (o ListTagsResponse) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "ListTagsResponse struct{}" - } - - return strings.Join([]string{"ListTagsResponse", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_match.go b/sdk/services/dns/v2/model/model_match.go deleted file mode 100644 index ee3ed22..0000000 --- a/sdk/services/dns/v2/model/model_match.go +++ /dev/null @@ -1,25 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -type Match struct { - - // 键。当前值限定为resource_name。 - Key string `json:"key"` - - // 值。每个值最大长度255个unicode字符。不能包含“_”,“%”特殊字符。 - Value *string `json:"value,omitempty"` -} - -func (o Match) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "Match struct{}" - } - - return strings.Join([]string{"Match", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_metadata.go b/sdk/services/dns/v2/model/model_metadata.go index 00e883c..d578c39 100644 --- a/sdk/services/dns/v2/model/model_metadata.go +++ b/sdk/services/dns/v2/model/model_metadata.go @@ -1,9 +1,9 @@ package model import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - "strings" + + "github.com/libdns/huaweicloud/sdk/core/utils" ) // Metadata 返回满足过滤条件的资源总数。 diff --git a/sdk/services/dns/v2/model/model_name_servers_resp.go b/sdk/services/dns/v2/model/model_name_servers_resp.go deleted file mode 100644 index b1735e0..0000000 --- a/sdk/services/dns/v2/model/model_name_servers_resp.go +++ /dev/null @@ -1,28 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -type NameServersResp struct { - - // 待查询名称服务器的类型。 取值范围: public, private。 如果为空,表示查询所有类型的名称服务器。 如果为public,表示查询公网的名称服务器。 如果为private,表示查询内网的名称服务器。 - Type *string `json:"type,omitempty"` - - // 待查询的region ID。 当查询公网的名称服务器时,此处不填。 - Region *string `json:"region,omitempty"` - - // 名称服务器列表。 - NsRecords *[]NsRecords `json:"ns_records,omitempty"` -} - -func (o NameServersResp) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "NameServersResp struct{}" - } - - return strings.Join([]string{"NameServersResp", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_nameserver.go b/sdk/services/dns/v2/model/model_nameserver.go deleted file mode 100644 index 07cc201..0000000 --- a/sdk/services/dns/v2/model/model_nameserver.go +++ /dev/null @@ -1,25 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -type Nameserver struct { - - // 主机名。 - Hostname *string `json:"hostname,omitempty"` - - // 优先级。 - Priority *int32 `json:"priority,omitempty"` -} - -func (o Nameserver) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "Nameserver struct{}" - } - - return strings.Join([]string{"Nameserver", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_ns_records.go b/sdk/services/dns/v2/model/model_ns_records.go deleted file mode 100644 index 8adf679..0000000 --- a/sdk/services/dns/v2/model/model_ns_records.go +++ /dev/null @@ -1,28 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -type NsRecords struct { - - // 主机名。 当为内网名称服务器时,此值为空。 - Hostname *string `json:"hostname,omitempty"` - - // 名称服务器地址。 当为公网名称服务器时,此值为空。 - Address *string `json:"address,omitempty"` - - // 优先级。 示例: 如果priority的值为“1”,表示会第一个采用该域名服务器进行解析。 - Priority *int32 `json:"priority,omitempty"` -} - -func (o NsRecords) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "NsRecords struct{}" - } - - return strings.Join([]string{"NsRecords", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_page_link.go b/sdk/services/dns/v2/model/model_page_link.go index 541baf9..ce2914e 100644 --- a/sdk/services/dns/v2/model/model_page_link.go +++ b/sdk/services/dns/v2/model/model_page_link.go @@ -1,9 +1,9 @@ package model import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - "strings" + + "github.com/libdns/huaweicloud/sdk/core/utils" ) // PageLink 指向当前资源或者其他资源的链接。当查询需要分页时,需要包含一个next链接指向下一页。 diff --git a/sdk/services/dns/v2/model/model_private_name_server.go b/sdk/services/dns/v2/model/model_private_name_server.go deleted file mode 100644 index c3ea675..0000000 --- a/sdk/services/dns/v2/model/model_private_name_server.go +++ /dev/null @@ -1,25 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -type PrivateNameServer struct { - - // 优先级。如果priority的值为“1”,表示会第一个采用该域名服务器进行解析。 - Priority *int32 `json:"priority,omitempty"` - - // DNS服务器地址。 - Address *string `json:"address,omitempty"` -} - -func (o PrivateNameServer) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "PrivateNameServer struct{}" - } - - return strings.Join([]string{"PrivateNameServer", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_private_zone_resp.go b/sdk/services/dns/v2/model/model_private_zone_resp.go deleted file mode 100644 index 7f4f2bd..0000000 --- a/sdk/services/dns/v2/model/model_private_zone_resp.go +++ /dev/null @@ -1,75 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -type PrivateZoneResp struct { - - // zone的ID,uuid形式的一个资源标识。 - Id *string `json:"id,omitempty"` - - // zone名称。 - Name *string `json:"name,omitempty"` - - // 对zone的描述信息。 - Description *string `json:"description,omitempty"` - - // 管理该zone的管理员邮箱。 - Email *string `json:"email,omitempty"` - - // zone类型,内网(private)。 - ZoneType *string `json:"zone_type,omitempty"` - - // 该zone下SOA记录中的ttl值。 - Ttl *int32 `json:"ttl,omitempty"` - - // 该zone下SOA记录中用于标识zone文件变更的序列值,用于主从节点同步。 - Serial *int32 `json:"serial,omitempty"` - - // 资源状态。 - Status *string `json:"status,omitempty"` - - // 该zone下的recordset个数。 - RecordNum *int32 `json:"record_num,omitempty"` - - // 内网Zone的子域名递归解析代理模式。 取值范围: AUTHORITY:当前Zone未开启递归解析代理 RECURSIVE:当前Zone已开启递归解析代理 - ProxyPattern *string `json:"proxy_pattern,omitempty"` - - // 托管该zone的pool,由系统分配。 - PoolId *string `json:"pool_id,omitempty"` - - // zone所属的项目ID。 - ProjectId *string `json:"project_id,omitempty"` - - // 创建时间。 - CreatedAt *string `json:"created_at,omitempty"` - - // 更新时间。 - UpdatedAt *string `json:"updated_at,omitempty"` - - Links *PageLink `json:"links,omitempty"` - - // 资源标签。 - Tags *[]Tag `json:"tags,omitempty"` - - // 主从模式中,从DNS服务器获取DNS信息。 - Masters *[]string `json:"masters,omitempty"` - - // 与该zone关联的Router(VPC)列表。 - Routers *[]RouterWithStatus `json:"routers,omitempty"` - - // 域名关联的企业项目ID,长度不超过36个字符。 - EnterpriseProjectId *string `json:"enterprise_project_id,omitempty"` -} - -func (o PrivateZoneResp) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "PrivateZoneResp struct{}" - } - - return strings.Join([]string{"PrivateZoneResp", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_public_zone_resp.go b/sdk/services/dns/v2/model/model_public_zone_resp.go deleted file mode 100644 index 9880dc9..0000000 --- a/sdk/services/dns/v2/model/model_public_zone_resp.go +++ /dev/null @@ -1,69 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -type PublicZoneResp struct { - - // zone的ID,uuid形式的一个资源标识。 - Id *string `json:"id,omitempty"` - - // zone名称。 - Name *string `json:"name,omitempty"` - - // 对zone的描述信息。 - Description *string `json:"description,omitempty"` - - // 管理该zone的管理员邮箱。 - Email *string `json:"email,omitempty"` - - // zone类型,公网(public)。 - ZoneType *string `json:"zone_type,omitempty"` - - // 该zone下SOA记录中的ttl值。 - Ttl *int32 `json:"ttl,omitempty"` - - // 该zone下SOA记录中用于标识zone文件变更的序列值,用于主从节点同步。 - Serial *int32 `json:"serial,omitempty"` - - // 资源状态。 - Status *string `json:"status,omitempty"` - - // 该zone下的recordset个数。 - RecordNum *int32 `json:"record_num,omitempty"` - - // 托管该zone的pool,由系统分配。 - PoolId *string `json:"pool_id,omitempty"` - - // zone所属的项目ID。 - ProjectId *string `json:"project_id,omitempty"` - - // 创建时间。 - CreatedAt *string `json:"created_at,omitempty"` - - // 更新时间。 - UpdatedAt *string `json:"updated_at,omitempty"` - - Links *PageLink `json:"links,omitempty"` - - // 资源标签。 - Tags *[]Tag `json:"tags,omitempty"` - - // 主从模式中,从DNS服务器获取DNS信息。 - Masters *[]string `json:"masters,omitempty"` - - // 域名关联的企业项目ID,长度不超过36个字符。 - EnterpriseProjectId *string `json:"enterprise_project_id,omitempty"` -} - -func (o PublicZoneResp) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "PublicZoneResp struct{}" - } - - return strings.Join([]string{"PublicZoneResp", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_query_record_set_with_line_and_tags_resp.go b/sdk/services/dns/v2/model/model_query_record_set_with_line_and_tags_resp.go deleted file mode 100644 index d5e9ff6..0000000 --- a/sdk/services/dns/v2/model/model_query_record_set_with_line_and_tags_resp.go +++ /dev/null @@ -1,74 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -type QueryRecordSetWithLineAndTagsResp struct { - - // Record Set的ID。 - Id *string `json:"id,omitempty"` - - // Record Set的名称。 - Name *string `json:"name,omitempty"` - - // Record Set的描述信息。 - Description *string `json:"description,omitempty"` - - // 托管该记录的zone_id。 - ZoneId *string `json:"zone_id,omitempty"` - - // 托管该记录的zone_name。 - ZoneName *string `json:"zone_name,omitempty"` - - // 记录类型。 - Type *string `json:"type,omitempty"` - - // 解析记录在本地DNS服务器的缓存时间,缓存时间越长更新生效越慢,以秒为单位。 - Ttl *int32 `json:"ttl,omitempty"` - - // 域名解析后的值。 - Records *[]string `json:"records,omitempty"` - - // 创建时间。 - CreatedAt *string `json:"created_at,omitempty"` - - // 更新时间。 - UpdatedAt *string `json:"updated_at,omitempty"` - - // 资源状态。 - Status *string `json:"status,omitempty"` - - // 标识是否由系统默认生成,系统默认生成的Record Set不能删除。 - Default *bool `json:"default,omitempty"` - - // 该Record Set所属的项目ID。 - ProjectId *string `json:"project_id,omitempty"` - - Links *PageLink `json:"links,omitempty"` - - // 资源标签。 - Tags *[]Tag `json:"tags,omitempty"` - - // 解析线路ID。 - Line *string `json:"line,omitempty"` - - // 解析记录的权重。 - Weight *int32 `json:"weight,omitempty"` - - // 健康检查ID。 - HealthCheckId *string `json:"health_check_id,omitempty"` - - AliasTarget *AliasTarget `json:"alias_target,omitempty"` -} - -func (o QueryRecordSetWithLineAndTagsResp) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "QueryRecordSetWithLineAndTagsResp struct{}" - } - - return strings.Join([]string{"QueryRecordSetWithLineAndTagsResp", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_query_record_set_with_line_resp.go b/sdk/services/dns/v2/model/model_query_record_set_with_line_resp.go deleted file mode 100644 index e537d01..0000000 --- a/sdk/services/dns/v2/model/model_query_record_set_with_line_resp.go +++ /dev/null @@ -1,74 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -type QueryRecordSetWithLineResp struct { - - // Record Set的ID。 - Id *string `json:"id,omitempty"` - - // Record Set的名称。 - Name *string `json:"name,omitempty"` - - // Record Set的描述信息。 - Description *string `json:"description,omitempty"` - - // 托管该记录的zone_id。 - ZoneId *string `json:"zone_id,omitempty"` - - // 托管该记录的zone_name。 - ZoneName *string `json:"zone_name,omitempty"` - - // 记录类型。 - Type *string `json:"type,omitempty"` - - // 解析记录在本地DNS服务器的缓存时间,缓存时间越长更新生效越慢,以秒为单位。 - Ttl *int32 `json:"ttl,omitempty"` - - // 域名解析后的值。 - Records *[]string `json:"records,omitempty"` - - // 创建时间。 - CreatedAt *string `json:"created_at,omitempty"` - - // 更新时间。 - UpdatedAt *string `json:"updated_at,omitempty"` - - // 资源状态。 - Status *string `json:"status,omitempty"` - - // 标识是否由系统默认生成,系统默认生成的Record Set不能删除。 - Default *bool `json:"default,omitempty"` - - // 该Record Set所属的项目ID。 - ProjectId *string `json:"project_id,omitempty"` - - Links *PageLink `json:"links,omitempty"` - - // 解析线路ID。 - Line *string `json:"line,omitempty"` - - // 解析记录的权重。 - Weight *int32 `json:"weight,omitempty"` - - // 健康检查ID。 - HealthCheckId *string `json:"health_check_id,omitempty"` - - AliasTarget *AliasTarget `json:"alias_target,omitempty"` - - // 规格,默认规格,保留字段。 - Bundle *string `json:"bundle,omitempty"` -} - -func (o QueryRecordSetWithLineResp) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "QueryRecordSetWithLineResp struct{}" - } - - return strings.Join([]string{"QueryRecordSetWithLineResp", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_resource_item.go b/sdk/services/dns/v2/model/model_resource_item.go deleted file mode 100644 index 74b5454..0000000 --- a/sdk/services/dns/v2/model/model_resource_item.go +++ /dev/null @@ -1,31 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -type ResourceItem struct { - - // 资源ID - ResourceId *string `json:"resource_id,omitempty"` - - // 资源详情。资源对象,用于扩展,默认为空。 - ResourceDetail *interface{} `json:"resource_detail,omitempty"` - - // 标签列表,没有标签默认为空数组。 - Tags *[]Tag `json:"tags,omitempty"` - - // 资源名称,没有默认为空字符串 - ResourceName *string `json:"resource_name,omitempty"` -} - -func (o ResourceItem) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "ResourceItem struct{}" - } - - return strings.Join([]string{"ResourceItem", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_restore_ptr_record_request.go b/sdk/services/dns/v2/model/model_restore_ptr_record_request.go deleted file mode 100644 index 8d8b6f5..0000000 --- a/sdk/services/dns/v2/model/model_restore_ptr_record_request.go +++ /dev/null @@ -1,28 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -// RestorePtrRecordRequest Request Object -type RestorePtrRecordRequest struct { - - // 域名所属的区域。 - Region string `json:"region"` - - // 弹性公网IP(EIP)的ID。 - FloatingipId string `json:"floatingip_id"` - - Body *RestorePtrReq `json:"body,omitempty"` -} - -func (o RestorePtrRecordRequest) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "RestorePtrRecordRequest struct{}" - } - - return strings.Join([]string{"RestorePtrRecordRequest", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_restore_ptr_record_response.go b/sdk/services/dns/v2/model/model_restore_ptr_record_response.go deleted file mode 100644 index 79c1c0d..0000000 --- a/sdk/services/dns/v2/model/model_restore_ptr_record_response.go +++ /dev/null @@ -1,21 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -// RestorePtrRecordResponse Response Object -type RestorePtrRecordResponse struct { - HttpStatusCode int `json:"-"` -} - -func (o RestorePtrRecordResponse) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "RestorePtrRecordResponse struct{}" - } - - return strings.Join([]string{"RestorePtrRecordResponse", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_restore_ptr_req.go b/sdk/services/dns/v2/model/model_restore_ptr_req.go deleted file mode 100644 index c7c459d..0000000 --- a/sdk/services/dns/v2/model/model_restore_ptr_req.go +++ /dev/null @@ -1,22 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -type RestorePtrReq struct { - - // PTR记录对应的域名。 此处值为null。 - Ptrdname *interface{} `json:"ptrdname"` -} - -func (o RestorePtrReq) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "RestorePtrReq struct{}" - } - - return strings.Join([]string{"RestorePtrReq", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_router.go b/sdk/services/dns/v2/model/model_router.go deleted file mode 100644 index c5fb51c..0000000 --- a/sdk/services/dns/v2/model/model_router.go +++ /dev/null @@ -1,28 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -type Router struct { - - // 关联VPC的ID。 - RouterId string `json:"router_id"` - - // 关联VPC所在的region。 - RouterRegion *string `json:"router_region,omitempty"` - - // 资源状态。 - Status *string `json:"status,omitempty"` -} - -func (o Router) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "Router struct{}" - } - - return strings.Join([]string{"Router", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_router_with_status.go b/sdk/services/dns/v2/model/model_router_with_status.go deleted file mode 100644 index dcfe969..0000000 --- a/sdk/services/dns/v2/model/model_router_with_status.go +++ /dev/null @@ -1,28 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -type RouterWithStatus struct { - - // 资源状态。 - Status *string `json:"status,omitempty"` - - // 关联VPC的ID。 - RouterId *string `json:"router_id,omitempty"` - - // 关联VPC所在的region。 - RouterRegion *string `json:"router_region,omitempty"` -} - -func (o RouterWithStatus) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "RouterWithStatus struct{}" - } - - return strings.Join([]string{"RouterWithStatus", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_set_record_sets_status_req.go b/sdk/services/dns/v2/model/model_set_record_sets_status_req.go deleted file mode 100644 index 4e0ae6e..0000000 --- a/sdk/services/dns/v2/model/model_set_record_sets_status_req.go +++ /dev/null @@ -1,22 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -type SetRecordSetsStatusReq struct { - - // 解析记录状态。 取值范围: ENABLE:启用解析 DISABLE:暂停解析。 - Status string `json:"status"` -} - -func (o SetRecordSetsStatusReq) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "SetRecordSetsStatusReq struct{}" - } - - return strings.Join([]string{"SetRecordSetsStatusReq", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_set_record_sets_status_request.go b/sdk/services/dns/v2/model/model_set_record_sets_status_request.go deleted file mode 100644 index 4056063..0000000 --- a/sdk/services/dns/v2/model/model_set_record_sets_status_request.go +++ /dev/null @@ -1,25 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -// SetRecordSetsStatusRequest Request Object -type SetRecordSetsStatusRequest struct { - - // 待设置Record Set的ID信息。 - RecordsetId string `json:"recordset_id"` - - Body *SetRecordSetsStatusReq `json:"body,omitempty"` -} - -func (o SetRecordSetsStatusRequest) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "SetRecordSetsStatusRequest struct{}" - } - - return strings.Join([]string{"SetRecordSetsStatusRequest", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_set_record_sets_status_response.go b/sdk/services/dns/v2/model/model_set_record_sets_status_response.go deleted file mode 100644 index d6853f0..0000000 --- a/sdk/services/dns/v2/model/model_set_record_sets_status_response.go +++ /dev/null @@ -1,76 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -// SetRecordSetsStatusResponse Response Object -type SetRecordSetsStatusResponse struct { - - // Record Set的ID。 - Id *string `json:"id,omitempty"` - - // Record Set的名称。 - Name *string `json:"name,omitempty"` - - // Record Set的描述信息。 - Description *string `json:"description,omitempty"` - - // 托管该记录的zone_id。 - ZoneId *string `json:"zone_id,omitempty"` - - // 托管该记录的zone_name。 - ZoneName *string `json:"zone_name,omitempty"` - - // 记录类型。 - Type *string `json:"type,omitempty"` - - // 解析记录在本地DNS服务器的缓存时间,缓存时间越长更新生效越慢,以秒为单位。 - Ttl *int32 `json:"ttl,omitempty"` - - // 域名解析后的值。 - Records *[]string `json:"records,omitempty"` - - // 创建时间。 - CreatedAt *string `json:"created_at,omitempty"` - - // 更新时间。 - UpdatedAt *string `json:"updated_at,omitempty"` - - // 资源状态。 - Status *string `json:"status,omitempty"` - - // 标识是否由系统默认生成,系统默认生成的Record Set不能删除。 - Default *bool `json:"default,omitempty"` - - // 该Record Set所属的项目ID。 - ProjectId *string `json:"project_id,omitempty"` - - Links *PageLink `json:"links,omitempty"` - - // 解析线路ID。 - Line *string `json:"line,omitempty"` - - // 解析记录的权重。 - Weight *int32 `json:"weight,omitempty"` - - // 健康检查ID。 - HealthCheckId *string `json:"health_check_id,omitempty"` - - AliasTarget *AliasTarget `json:"alias_target,omitempty"` - - // 规格,默认规格,保留字段。 - Bundle *string `json:"bundle,omitempty"` - HttpStatusCode int `json:"-"` -} - -func (o SetRecordSetsStatusResponse) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "SetRecordSetsStatusResponse struct{}" - } - - return strings.Join([]string{"SetRecordSetsStatusResponse", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_show_api_info_request.go b/sdk/services/dns/v2/model/model_show_api_info_request.go deleted file mode 100644 index fedad8a..0000000 --- a/sdk/services/dns/v2/model/model_show_api_info_request.go +++ /dev/null @@ -1,23 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -// ShowApiInfoRequest Request Object -type ShowApiInfoRequest struct { - - // 待查询版本号。以v开头,如v2。 - Version string `json:"version"` -} - -func (o ShowApiInfoRequest) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "ShowApiInfoRequest struct{}" - } - - return strings.Join([]string{"ShowApiInfoRequest", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_show_api_info_response.go b/sdk/services/dns/v2/model/model_show_api_info_response.go deleted file mode 100644 index 0e463b5..0000000 --- a/sdk/services/dns/v2/model/model_show_api_info_response.go +++ /dev/null @@ -1,22 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -// ShowApiInfoResponse Response Object -type ShowApiInfoResponse struct { - Version *VersionItem `json:"version,omitempty"` - HttpStatusCode int `json:"-"` -} - -func (o ShowApiInfoResponse) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "ShowApiInfoResponse struct{}" - } - - return strings.Join([]string{"ShowApiInfoResponse", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_show_domain_quota_request.go b/sdk/services/dns/v2/model/model_show_domain_quota_request.go deleted file mode 100644 index 4585cbf..0000000 --- a/sdk/services/dns/v2/model/model_show_domain_quota_request.go +++ /dev/null @@ -1,23 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -// ShowDomainQuotaRequest Request Object -type ShowDomainQuotaRequest struct { - - // 租户ID。 - DomainId string `json:"domain_id"` -} - -func (o ShowDomainQuotaRequest) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "ShowDomainQuotaRequest struct{}" - } - - return strings.Join([]string{"ShowDomainQuotaRequest", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_show_domain_quota_response.go b/sdk/services/dns/v2/model/model_show_domain_quota_response.go deleted file mode 100644 index 5717866..0000000 --- a/sdk/services/dns/v2/model/model_show_domain_quota_response.go +++ /dev/null @@ -1,24 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -// ShowDomainQuotaResponse Response Object -type ShowDomainQuotaResponse struct { - - // 配额项数据。 - Quotas *[]DomainQuotaResponseQuotas `json:"quotas,omitempty"` - HttpStatusCode int `json:"-"` -} - -func (o ShowDomainQuotaResponse) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "ShowDomainQuotaResponse struct{}" - } - - return strings.Join([]string{"ShowDomainQuotaResponse", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_show_line_group_request.go b/sdk/services/dns/v2/model/model_show_line_group_request.go deleted file mode 100644 index 0867b05..0000000 --- a/sdk/services/dns/v2/model/model_show_line_group_request.go +++ /dev/null @@ -1,23 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -// ShowLineGroupRequest Request Object -type ShowLineGroupRequest struct { - - // 待查询的线路分组ID。 - LinegroupId string `json:"linegroup_id"` -} - -func (o ShowLineGroupRequest) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "ShowLineGroupRequest struct{}" - } - - return strings.Join([]string{"ShowLineGroupRequest", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_show_line_group_response.go b/sdk/services/dns/v2/model/model_show_line_group_response.go deleted file mode 100644 index 6e8ea0f..0000000 --- a/sdk/services/dns/v2/model/model_show_line_group_response.go +++ /dev/null @@ -1,42 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -// ShowLineGroupResponse Response Object -type ShowLineGroupResponse struct { - - // 线路分组名称。 - Name *string `json:"name,omitempty"` - - // 线路分组包含的线路列表。 解析线路ID。 - Lines *[]string `json:"lines,omitempty"` - - // 资源状态。 取值范围:PENDING_CREATE,ACTIVE,PENDING_DELETE,PENDING_UPDATE,ERROR,FREEZE,DISABLE。 - Status *string `json:"status,omitempty"` - - // 线路分组的描述信息 - Description *string `json:"description,omitempty"` - - // 线路分组的id。 - LineId *string `json:"line_id,omitempty"` - - // 创建时间。 格式:yyyy-MM-dd'T'HH:mm:ss.SSS。 - CreatedAt *string `json:"created_at,omitempty"` - - // 更新时间。 格式:yyyy-MM-dd'T'HH:mm:ss.SSS。 - UpdatedAt *string `json:"updated_at,omitempty"` - HttpStatusCode int `json:"-"` -} - -func (o ShowLineGroupResponse) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "ShowLineGroupResponse struct{}" - } - - return strings.Join([]string{"ShowLineGroupResponse", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_show_private_zone_name_server_request.go b/sdk/services/dns/v2/model/model_show_private_zone_name_server_request.go deleted file mode 100644 index ac87211..0000000 --- a/sdk/services/dns/v2/model/model_show_private_zone_name_server_request.go +++ /dev/null @@ -1,23 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -// ShowPrivateZoneNameServerRequest Request Object -type ShowPrivateZoneNameServerRequest struct { - - // 待查询内网zone的ID。 - ZoneId string `json:"zone_id"` -} - -func (o ShowPrivateZoneNameServerRequest) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "ShowPrivateZoneNameServerRequest struct{}" - } - - return strings.Join([]string{"ShowPrivateZoneNameServerRequest", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_show_private_zone_name_server_response.go b/sdk/services/dns/v2/model/model_show_private_zone_name_server_response.go deleted file mode 100644 index 4c015c8..0000000 --- a/sdk/services/dns/v2/model/model_show_private_zone_name_server_response.go +++ /dev/null @@ -1,24 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -// ShowPrivateZoneNameServerResponse Response Object -type ShowPrivateZoneNameServerResponse struct { - - // 名称服务器列表信息。 - Nameservers *[]PrivateNameServer `json:"nameservers,omitempty"` - HttpStatusCode int `json:"-"` -} - -func (o ShowPrivateZoneNameServerResponse) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "ShowPrivateZoneNameServerResponse struct{}" - } - - return strings.Join([]string{"ShowPrivateZoneNameServerResponse", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_show_private_zone_request.go b/sdk/services/dns/v2/model/model_show_private_zone_request.go deleted file mode 100644 index ce20941..0000000 --- a/sdk/services/dns/v2/model/model_show_private_zone_request.go +++ /dev/null @@ -1,23 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -// ShowPrivateZoneRequest Request Object -type ShowPrivateZoneRequest struct { - - // 待查询zone的ID。 - ZoneId string `json:"zone_id"` -} - -func (o ShowPrivateZoneRequest) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "ShowPrivateZoneRequest struct{}" - } - - return strings.Join([]string{"ShowPrivateZoneRequest", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_show_private_zone_response.go b/sdk/services/dns/v2/model/model_show_private_zone_response.go deleted file mode 100644 index 68fef8c..0000000 --- a/sdk/services/dns/v2/model/model_show_private_zone_response.go +++ /dev/null @@ -1,74 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -// ShowPrivateZoneResponse Response Object -type ShowPrivateZoneResponse struct { - - // zone的ID,uuid形式的一个资源标识。 - Id *string `json:"id,omitempty"` - - // zone名称。 - Name *string `json:"name,omitempty"` - - // 对zone的描述信息。 - Description *string `json:"description,omitempty"` - - // 管理该zone的管理员邮箱。 - Email *string `json:"email,omitempty"` - - // zone类型,内网(private)。 - ZoneType *string `json:"zone_type,omitempty"` - - // 该zone下SOA记录中的ttl值。 - Ttl *int32 `json:"ttl,omitempty"` - - // 该zone下SOA记录中用于标识zone文件变更的序列值,用于主从节点同步。 - Serial *int32 `json:"serial,omitempty"` - - // 资源状态。 - Status *string `json:"status,omitempty"` - - // 该zone下的recordset个数。 - RecordNum *int32 `json:"record_num,omitempty"` - - // 托管该zone的pool,由系统分配。 - PoolId *string `json:"pool_id,omitempty"` - - // zone所属的项目ID。 - ProjectId *string `json:"project_id,omitempty"` - - // 创建时间。 - CreatedAt *string `json:"created_at,omitempty"` - - // 更新时间。 - UpdatedAt *string `json:"updated_at,omitempty"` - - Links *PageLink `json:"links,omitempty"` - - // 主从模式中,从DNS服务器获取DNS信息。 - Masters *[]string `json:"masters,omitempty"` - - // 与该zone关联的Router(VPC)列表。 - Routers *[]Router `json:"routers,omitempty"` - - // 内网Zone的子域名递归解析代理模式。 取值范围: AUTHORITY:当前Zone未开启递归解析代理 RECURSIVE:当前Zone已开启递归解析代理 - ProxyPattern *string `json:"proxy_pattern,omitempty"` - - // 域名关联的企业项目ID,长度不超过36个字符。 - EnterpriseProjectId *string `json:"enterprise_project_id,omitempty"` - HttpStatusCode int `json:"-"` -} - -func (o ShowPrivateZoneResponse) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "ShowPrivateZoneResponse struct{}" - } - - return strings.Join([]string{"ShowPrivateZoneResponse", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_show_ptr_record_set_request.go b/sdk/services/dns/v2/model/model_show_ptr_record_set_request.go deleted file mode 100644 index 075c58c..0000000 --- a/sdk/services/dns/v2/model/model_show_ptr_record_set_request.go +++ /dev/null @@ -1,26 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -// ShowPtrRecordSetRequest Request Object -type ShowPtrRecordSetRequest struct { - - // 租户的区域信息。 - Region string `json:"region"` - - // 弹性公网IP(EIP)的ID。 - FloatingipId string `json:"floatingip_id"` -} - -func (o ShowPtrRecordSetRequest) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "ShowPtrRecordSetRequest struct{}" - } - - return strings.Join([]string{"ShowPtrRecordSetRequest", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_show_ptr_record_set_response.go b/sdk/services/dns/v2/model/model_show_ptr_record_set_response.go deleted file mode 100644 index 49815d7..0000000 --- a/sdk/services/dns/v2/model/model_show_ptr_record_set_response.go +++ /dev/null @@ -1,47 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -// ShowPtrRecordSetResponse Response Object -type ShowPtrRecordSetResponse struct { - - // PTR记录的ID,格式形如{region}:{floatingip_id}。 - Id *string `json:"id,omitempty"` - - // PTR记录对应的域名。 - Ptrdname *string `json:"ptrdname,omitempty"` - - // 对PTR记录的描述。 - Description *string `json:"description,omitempty"` - - // PTR记录在本地DNS服务器的缓存时间,缓存时间越长更新生效越慢,以秒为单位。 - Ttl *int32 `json:"ttl,omitempty"` - - // 弹性IP的IP地址。 - Address *string `json:"address,omitempty"` - - // 资源状态。 - Status *string `json:"status,omitempty"` - - // 对该资源的当前操作。取值范围:CREATE,UPDATE,DELETE,NONE CREATE:表示创建,UPDATE:表示更新,DELETE:表示删除,NONE:表示无操作 - Action *string `json:"action,omitempty"` - - Links *PageLink `json:"links,omitempty"` - - // 反向解析关联的企业项目ID,长度不超过36个字符。 - EnterpriseProjectId *string `json:"enterprise_project_id,omitempty"` - HttpStatusCode int `json:"-"` -} - -func (o ShowPtrRecordSetResponse) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "ShowPtrRecordSetResponse struct{}" - } - - return strings.Join([]string{"ShowPtrRecordSetResponse", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_show_public_zone_name_server_request.go b/sdk/services/dns/v2/model/model_show_public_zone_name_server_request.go deleted file mode 100644 index 81e400d..0000000 --- a/sdk/services/dns/v2/model/model_show_public_zone_name_server_request.go +++ /dev/null @@ -1,23 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -// ShowPublicZoneNameServerRequest Request Object -type ShowPublicZoneNameServerRequest struct { - - // 待查询zone的ID。 可以通过查询公网Zone列表获取。 - ZoneId string `json:"zone_id"` -} - -func (o ShowPublicZoneNameServerRequest) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "ShowPublicZoneNameServerRequest struct{}" - } - - return strings.Join([]string{"ShowPublicZoneNameServerRequest", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_show_public_zone_name_server_response.go b/sdk/services/dns/v2/model/model_show_public_zone_name_server_response.go deleted file mode 100644 index 8f42168..0000000 --- a/sdk/services/dns/v2/model/model_show_public_zone_name_server_response.go +++ /dev/null @@ -1,24 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -// ShowPublicZoneNameServerResponse Response Object -type ShowPublicZoneNameServerResponse struct { - - // 查询单个公网Zone的名称服务器响应。 - Nameservers *[]Nameserver `json:"nameservers,omitempty"` - HttpStatusCode int `json:"-"` -} - -func (o ShowPublicZoneNameServerResponse) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "ShowPublicZoneNameServerResponse struct{}" - } - - return strings.Join([]string{"ShowPublicZoneNameServerResponse", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_show_public_zone_request.go b/sdk/services/dns/v2/model/model_show_public_zone_request.go deleted file mode 100644 index db3f661..0000000 --- a/sdk/services/dns/v2/model/model_show_public_zone_request.go +++ /dev/null @@ -1,23 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -// ShowPublicZoneRequest Request Object -type ShowPublicZoneRequest struct { - - // 待查询zone的ID。 - ZoneId string `json:"zone_id"` -} - -func (o ShowPublicZoneRequest) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "ShowPublicZoneRequest struct{}" - } - - return strings.Join([]string{"ShowPublicZoneRequest", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_show_public_zone_response.go b/sdk/services/dns/v2/model/model_show_public_zone_response.go deleted file mode 100644 index 367d194..0000000 --- a/sdk/services/dns/v2/model/model_show_public_zone_response.go +++ /dev/null @@ -1,68 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -// ShowPublicZoneResponse Response Object -type ShowPublicZoneResponse struct { - - // Zone的ID - Id *string `json:"id,omitempty"` - - // zone名称 - Name *string `json:"name,omitempty"` - - // 对zone的描述信息 - Description *string `json:"description,omitempty"` - - // 管理该zone的管理员邮箱 - Email *string `json:"email,omitempty"` - - // zone类型,公网(public)。 - ZoneType *string `json:"zone_type,omitempty"` - - // 该zone下SOA记录中的ttl值 - Ttl *int32 `json:"ttl,omitempty"` - - // 该zone下SOA记录中用于标识zone文件变更的序列值,用于主从节点同步 - Serial *int32 `json:"serial,omitempty"` - - // 资源状态 - Status *string `json:"status,omitempty"` - - // 该zone下的recordset个数 - RecordNum *int32 `json:"record_num,omitempty"` - - // 托管该zone的pool,由系统分配 - PoolId *string `json:"pool_id,omitempty"` - - // 创建时间 - CreatedAt *string `json:"created_at,omitempty"` - - // 更新时间 - UpdatedAt *string `json:"updated_at,omitempty"` - - // 域名关联的企业项目ID,长度不超过36个字符 - EnterpriseProjectId *string `json:"enterprise_project_id,omitempty"` - - // 主从模式中,从DNS服务器获取DNS信息 - Masters *[]string `json:"masters,omitempty"` - - Links *PageLink `json:"links,omitempty"` - - // zone所属的项目ID。 - ProjectId *string `json:"project_id,omitempty"` - HttpStatusCode int `json:"-"` -} - -func (o ShowPublicZoneResponse) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "ShowPublicZoneResponse struct{}" - } - - return strings.Join([]string{"ShowPublicZoneResponse", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_show_record_set_by_zone_request.go b/sdk/services/dns/v2/model/model_show_record_set_by_zone_request.go deleted file mode 100644 index 64d7248..0000000 --- a/sdk/services/dns/v2/model/model_show_record_set_by_zone_request.go +++ /dev/null @@ -1,59 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -// ShowRecordSetByZoneRequest Request Object -type ShowRecordSetByZoneRequest struct { - - // 所属zone的ID。 - ZoneId string `json:"zone_id"` - - // 分页查询起始的资源ID,为空时为查询第一页。 默认值为空。 - Marker *string `json:"marker,omitempty"` - - // 每页返回的资源个数。 取值范围:0~500 取值一般为10,20,50。默认值为500。 - Limit *int32 `json:"limit,omitempty"` - - // 分页查询起始偏移量,表示从偏移量的下一个资源开始查询。 取值范围:0~2147483647 默认值为0。 当前设置marker不为空时,以marker为分页起始标识。 - Offset *int32 `json:"offset,omitempty"` - - // 解析线路ID。 - LineId *string `json:"line_id,omitempty"` - - // 资源标签。 取值格式:key1,value1|key2,value2 多个标签之间用\"|\"分开,每个标签的键值用英文逗号\",\"相隔。 - Tags *string `json:"tags,omitempty"` - - // 待查询的Record Set的状态。 取值范围:ACTIVE、ERROR、DISABLE、FREEZE、PENDING_CREATE、PENDING_UPDATE、PENDING_DELETE - Status *string `json:"status,omitempty"` - - // 待查询的Record Set的记录集类型。 公网域名场景的记录类型: A、AAAA、MX、CNAME、TXT、NS、SRV、CAA。 内网域名场景的记录类型: A、AAAA、MX、CNAME、TXT、SRV。 - Type *string `json:"type,omitempty"` - - // 待查询的Record Set的域名中包含此name。 搜索模式默认为模糊搜索。 默认值为空。 - Name *string `json:"name,omitempty"` - - // 待查询的Record Set的id包含此id。 搜索模式默认为模糊搜索。 默认值为空。 - Id *string `json:"id,omitempty"` - - // 查询结果中Record Set列表的排序字段。 取值范围: name:域名 type:记录集类型 默认值为空,表示不排序。 - SortKey *string `json:"sort_key,omitempty"` - - // 查询结果中Record Set列表的排序方式。 取值范围: desc:降序排序 asc:升序排序 默认值为空,表示不排序。 - SortDir *string `json:"sort_dir,omitempty"` - - // 查询条件搜索模式。 取值范围: like:模糊搜索 equal:精确搜索 - SearchMode *string `json:"search_mode,omitempty"` -} - -func (o ShowRecordSetByZoneRequest) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "ShowRecordSetByZoneRequest struct{}" - } - - return strings.Join([]string{"ShowRecordSetByZoneRequest", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_show_record_set_by_zone_resp.go b/sdk/services/dns/v2/model/model_show_record_set_by_zone_resp.go deleted file mode 100644 index 0f075f3..0000000 --- a/sdk/services/dns/v2/model/model_show_record_set_by_zone_resp.go +++ /dev/null @@ -1,71 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -type ShowRecordSetByZoneResp struct { - - // Record Set的ID。 - Id *string `json:"id,omitempty"` - - // Record Set的名称。 - Name *string `json:"name,omitempty"` - - // Record Set的描述信息。 - Description *string `json:"description,omitempty"` - - // 托管该记录的zone_id。 - ZoneId *string `json:"zone_id,omitempty"` - - // 托管该记录的zone_name。 - ZoneName *string `json:"zone_name,omitempty"` - - // 记录类型。 取值范围:A、AAAA、MX、CNAME、TXT、NS、SRV、CAA。 - Type *string `json:"type,omitempty"` - - // 解析记录在本地DNS服务器的缓存时间,缓存时间越长更新生效越慢,以秒为单位。 - Ttl *int32 `json:"ttl,omitempty"` - - // 域名解析后的值。 - Records *[]string `json:"records,omitempty"` - - // 创建时间。 - CreateAt *string `json:"create_at,omitempty"` - - // 更新时间。 - UpdateAt *string `json:"update_at,omitempty"` - - // 资源状态。 - Status *string `json:"status,omitempty"` - - // 标识是否由系统默认生成,系统默认生成的Record Set不能删除。 - Default *bool `json:"default,omitempty"` - - // 该Record Set所属的项目ID。 - ProjectId *string `json:"project_id,omitempty"` - - Links *PageLink `json:"links,omitempty"` - - // 解析线路ID。 - Line *string `json:"line,omitempty"` - - // 解析记录的权重。 - Weight *int32 `json:"weight,omitempty"` - - // 健康检查ID。 - HealthCheckId *string `json:"health_check_id,omitempty"` - - AliasTarget *AliasTarget `json:"alias_target,omitempty"` -} - -func (o ShowRecordSetByZoneResp) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "ShowRecordSetByZoneResp struct{}" - } - - return strings.Join([]string{"ShowRecordSetByZoneResp", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_show_record_set_by_zone_response.go b/sdk/services/dns/v2/model/model_show_record_set_by_zone_response.go deleted file mode 100644 index 304efc2..0000000 --- a/sdk/services/dns/v2/model/model_show_record_set_by_zone_response.go +++ /dev/null @@ -1,27 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -// ShowRecordSetByZoneResponse Response Object -type ShowRecordSetByZoneResponse struct { - Links *PageLink `json:"links,omitempty"` - - // recordset列表。 - Recordsets *[]ShowRecordSetByZoneResp `json:"recordsets,omitempty"` - - Metadata *Metadata `json:"metadata,omitempty"` - HttpStatusCode int `json:"-"` -} - -func (o ShowRecordSetByZoneResponse) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "ShowRecordSetByZoneResponse struct{}" - } - - return strings.Join([]string{"ShowRecordSetByZoneResponse", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_show_record_set_request.go b/sdk/services/dns/v2/model/model_show_record_set_request.go deleted file mode 100644 index 3e86d72..0000000 --- a/sdk/services/dns/v2/model/model_show_record_set_request.go +++ /dev/null @@ -1,26 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -// ShowRecordSetRequest Request Object -type ShowRecordSetRequest struct { - - // 所属zone的ID。 - ZoneId string `json:"zone_id"` - - // 待查询recordset的ID信息。 - RecordsetId string `json:"recordset_id"` -} - -func (o ShowRecordSetRequest) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "ShowRecordSetRequest struct{}" - } - - return strings.Join([]string{"ShowRecordSetRequest", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_show_record_set_response.go b/sdk/services/dns/v2/model/model_show_record_set_response.go deleted file mode 100644 index 116d055..0000000 --- a/sdk/services/dns/v2/model/model_show_record_set_response.go +++ /dev/null @@ -1,65 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -// ShowRecordSetResponse Response Object -type ShowRecordSetResponse struct { - - // Record Set的ID。 - Id *string `json:"id,omitempty"` - - // Record Set的名称。 - Name *string `json:"name,omitempty"` - - // Record Set的描述信息。 - Description *string `json:"description,omitempty"` - - // 托管该记录的zone_id。 - ZoneId *string `json:"zone_id,omitempty"` - - // 托管该记录的zone_name。 - ZoneName *string `json:"zone_name,omitempty"` - - // 记录类型。 - Type *string `json:"type,omitempty"` - - // 解析记录在本地DNS服务器的缓存时间,缓存时间越长更新生效越慢,以秒为单位。 - Ttl *int32 `json:"ttl,omitempty"` - - // 域名解析后的值。 - Records *[]string `json:"records,omitempty"` - - // 创建时间。 - CreateAt *string `json:"create_at,omitempty"` - - // 更新时间。 - UpdateAt *string `json:"update_at,omitempty"` - - // 资源状态。 - Status *string `json:"status,omitempty"` - - // 标识是否由系统默认生成,系统默认生成的Record Set不能删除。 - Default *bool `json:"default,omitempty"` - - // 该Record Set所属的项目ID。 - ProjectId *string `json:"project_id,omitempty"` - - Links *PageLink `json:"links,omitempty"` - - // 规格,默认规格,保留字段。 - Bundle *string `json:"bundle,omitempty"` - HttpStatusCode int `json:"-"` -} - -func (o ShowRecordSetResponse) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "ShowRecordSetResponse struct{}" - } - - return strings.Join([]string{"ShowRecordSetResponse", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_show_record_set_with_line_request.go b/sdk/services/dns/v2/model/model_show_record_set_with_line_request.go deleted file mode 100644 index 91967aa..0000000 --- a/sdk/services/dns/v2/model/model_show_record_set_with_line_request.go +++ /dev/null @@ -1,26 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -// ShowRecordSetWithLineRequest Request Object -type ShowRecordSetWithLineRequest struct { - - // 所属zone的ID。 - ZoneId string `json:"zone_id"` - - // 待查询recordset的ID信息。 - RecordsetId string `json:"recordset_id"` -} - -func (o ShowRecordSetWithLineRequest) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "ShowRecordSetWithLineRequest struct{}" - } - - return strings.Join([]string{"ShowRecordSetWithLineRequest", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_show_record_set_with_line_response.go b/sdk/services/dns/v2/model/model_show_record_set_with_line_response.go deleted file mode 100644 index 58130e8..0000000 --- a/sdk/services/dns/v2/model/model_show_record_set_with_line_response.go +++ /dev/null @@ -1,76 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -// ShowRecordSetWithLineResponse Response Object -type ShowRecordSetWithLineResponse struct { - - // Record Set的ID。 - Id *string `json:"id,omitempty"` - - // Record Set的名称。 - Name *string `json:"name,omitempty"` - - // Record Set的描述信息。 - Description *string `json:"description,omitempty"` - - // 托管该记录的zone_id。 - ZoneId *string `json:"zone_id,omitempty"` - - // 托管该记录的zone_name。 - ZoneName *string `json:"zone_name,omitempty"` - - // 记录类型。 - Type *string `json:"type,omitempty"` - - // 解析记录在本地DNS服务器的缓存时间,缓存时间越长更新生效越慢,以秒为单位。 - Ttl *int32 `json:"ttl,omitempty"` - - // 域名解析后的值。 - Records *[]string `json:"records,omitempty"` - - // 创建时间。 - CreatedAt *string `json:"created_at,omitempty"` - - // 更新时间。 - UpdatedAt *string `json:"updated_at,omitempty"` - - // 资源状态。 - Status *string `json:"status,omitempty"` - - // 标识是否由系统默认生成,系统默认生成的Record Set不能删除。 - Default *bool `json:"default,omitempty"` - - // 该Record Set所属的项目ID。 - ProjectId *string `json:"project_id,omitempty"` - - Links *PageLink `json:"links,omitempty"` - - // 解析线路ID。 - Line *string `json:"line,omitempty"` - - // 解析记录的权重。 - Weight *int32 `json:"weight,omitempty"` - - // 健康检查ID。 - HealthCheckId *string `json:"health_check_id,omitempty"` - - AliasTarget *AliasTarget `json:"alias_target,omitempty"` - - // 规格,默认规格,保留字段。 - Bundle *string `json:"bundle,omitempty"` - HttpStatusCode int `json:"-"` -} - -func (o ShowRecordSetWithLineResponse) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "ShowRecordSetWithLineResponse struct{}" - } - - return strings.Join([]string{"ShowRecordSetWithLineResponse", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_show_resource_tag_request.go b/sdk/services/dns/v2/model/model_show_resource_tag_request.go deleted file mode 100644 index 48cafbd..0000000 --- a/sdk/services/dns/v2/model/model_show_resource_tag_request.go +++ /dev/null @@ -1,26 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -// ShowResourceTagRequest Request Object -type ShowResourceTagRequest struct { - - // 资源的类型:DNS-public_zone,DNS-private_zone,DNS-public_recordset,DNS-private_recordset,DNS-ptr_record。 - ResourceType string `json:"resource_type"` - - // 资源id。 - ResourceId string `json:"resource_id"` -} - -func (o ShowResourceTagRequest) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "ShowResourceTagRequest struct{}" - } - - return strings.Join([]string{"ShowResourceTagRequest", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_show_resource_tag_response.go b/sdk/services/dns/v2/model/model_show_resource_tag_response.go deleted file mode 100644 index 8f08c80..0000000 --- a/sdk/services/dns/v2/model/model_show_resource_tag_response.go +++ /dev/null @@ -1,24 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -// ShowResourceTagResponse Response Object -type ShowResourceTagResponse struct { - - // 指定实例的标签列表。 - Tags *[]Tag `json:"tags,omitempty"` - HttpStatusCode int `json:"-"` -} - -func (o ShowResourceTagResponse) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "ShowResourceTagResponse struct{}" - } - - return strings.Join([]string{"ShowResourceTagResponse", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_tag.go b/sdk/services/dns/v2/model/model_tag.go index c88d096..74da803 100644 --- a/sdk/services/dns/v2/model/model_tag.go +++ b/sdk/services/dns/v2/model/model_tag.go @@ -1,9 +1,9 @@ package model import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - "strings" + + "github.com/libdns/huaweicloud/sdk/core/utils" ) type Tag struct { diff --git a/sdk/services/dns/v2/model/model_tag_values.go b/sdk/services/dns/v2/model/model_tag_values.go deleted file mode 100644 index 1bfcad9..0000000 --- a/sdk/services/dns/v2/model/model_tag_values.go +++ /dev/null @@ -1,25 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -type TagValues struct { - - // 键。最大长度36个unicode字符。 key不能为空。(搜索时不对此参数做校验) - Key *string `json:"key,omitempty"` - - // 值列表。每个值最大长度43个unicode字符。*为系统保留字符。如果里面的value是以*开头时,表示按照*后面的值全模糊匹配。如果values缺失,则表示匹配任意值。value之间为或的关系。 - Values *[]string `json:"values,omitempty"` -} - -func (o TagValues) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "TagValues struct{}" - } - - return strings.Join([]string{"TagValues", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_update_custom_line_request.go b/sdk/services/dns/v2/model/model_update_custom_line_request.go deleted file mode 100644 index d264831..0000000 --- a/sdk/services/dns/v2/model/model_update_custom_line_request.go +++ /dev/null @@ -1,25 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -// UpdateCustomLineRequest Request Object -type UpdateCustomLineRequest struct { - - // 解析线路ID。 - LineId string `json:"line_id"` - - Body *UpdateCustomsLineReq `json:"body,omitempty"` -} - -func (o UpdateCustomLineRequest) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "UpdateCustomLineRequest struct{}" - } - - return strings.Join([]string{"UpdateCustomLineRequest", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_update_custom_line_response.go b/sdk/services/dns/v2/model/model_update_custom_line_response.go deleted file mode 100644 index 6f57584..0000000 --- a/sdk/services/dns/v2/model/model_update_custom_line_response.go +++ /dev/null @@ -1,42 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -// UpdateCustomLineResponse Response Object -type UpdateCustomLineResponse struct { - - // 解析线路ID。 - LineId *string `json:"line_id,omitempty"` - - // 解析线路名称。 - Name *string `json:"name,omitempty"` - - // IP地址段。 - IpSegments *[]string `json:"ip_segments,omitempty"` - - // 创建时间。 - CreatedAt *string `json:"created_at,omitempty"` - - // 更新时间。 - UpdatedAt *string `json:"updated_at,omitempty"` - - // 资源状态。 - Status *string `json:"status,omitempty"` - - // 自定义线路的描述信息。 - Description *string `json:"description,omitempty"` - HttpStatusCode int `json:"-"` -} - -func (o UpdateCustomLineResponse) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "UpdateCustomLineResponse struct{}" - } - - return strings.Join([]string{"UpdateCustomLineResponse", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_update_customs_line_req.go b/sdk/services/dns/v2/model/model_update_customs_line_req.go deleted file mode 100644 index c271a6d..0000000 --- a/sdk/services/dns/v2/model/model_update_customs_line_req.go +++ /dev/null @@ -1,28 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -type UpdateCustomsLineReq struct { - - // 解析线路名称。 - Name *string `json:"name,omitempty"` - - // P地址段。 以“-”分隔,小IP地址在前,大IP地址在后。IP段之间不能有交叉。当只有一个IP时,填写IP1-IP1。 目前只支持IPV4。 - IpSegments *[]string `json:"ip_segments,omitempty"` - - // 自定义线路的描述信息。长度不超过255个字符。 - Description *string `json:"description,omitempty"` -} - -func (o UpdateCustomsLineReq) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "UpdateCustomsLineReq struct{}" - } - - return strings.Join([]string{"UpdateCustomsLineReq", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_update_line_groups_body.go b/sdk/services/dns/v2/model/model_update_line_groups_body.go deleted file mode 100644 index c246eb1..0000000 --- a/sdk/services/dns/v2/model/model_update_line_groups_body.go +++ /dev/null @@ -1,28 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -type UpdateLineGroupsBody struct { - - // 线路分组名称。 不能与自定义线路名称、预制线路名称重复。 取值范围:1-64个字符,支持数字、字母、中文、_(下划线)、-(中划线)、.(点)。 - Name string `json:"name"` - - // 线路分组的描述信息。长度不超过255个字符。默认值为空。 - Description *string `json:"description,omitempty"` - - // 线路列表。 - Lines []string `json:"lines"` -} - -func (o UpdateLineGroupsBody) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "UpdateLineGroupsBody struct{}" - } - - return strings.Join([]string{"UpdateLineGroupsBody", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_update_line_groups_request.go b/sdk/services/dns/v2/model/model_update_line_groups_request.go deleted file mode 100644 index 43cf7f5..0000000 --- a/sdk/services/dns/v2/model/model_update_line_groups_request.go +++ /dev/null @@ -1,25 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -// UpdateLineGroupsRequest Request Object -type UpdateLineGroupsRequest struct { - - // 待更新的线路分组ID。 - LinegroupId string `json:"linegroup_id"` - - Body *UpdateLineGroupsBody `json:"body,omitempty"` -} - -func (o UpdateLineGroupsRequest) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "UpdateLineGroupsRequest struct{}" - } - - return strings.Join([]string{"UpdateLineGroupsRequest", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_update_line_groups_response.go b/sdk/services/dns/v2/model/model_update_line_groups_response.go deleted file mode 100644 index 9edfe06..0000000 --- a/sdk/services/dns/v2/model/model_update_line_groups_response.go +++ /dev/null @@ -1,42 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -// UpdateLineGroupsResponse Response Object -type UpdateLineGroupsResponse struct { - - // 线路分组名称。 - Name *string `json:"name,omitempty"` - - // 线路分组包含的线路列表。 解析线路ID。 - Lines *[]string `json:"lines,omitempty"` - - // 资源状态。 取值范围:PENDING_CREATE,ACTIVE,PENDING_DELETE,PENDING_UPDATE,ERROR,FREEZE,DISABLE。 - Status *string `json:"status,omitempty"` - - // 线路分组的描述信息 - Description *string `json:"description,omitempty"` - - // 线路分组的id。 - LineId *string `json:"line_id,omitempty"` - - // 创建时间。 格式:yyyy-MM-dd'T'HH:mm:ss.SSS。 - CreatedAt *string `json:"created_at,omitempty"` - - // 更新时间。 格式:yyyy-MM-dd'T'HH:mm:ss.SSS。 - UpdatedAt *string `json:"updated_at,omitempty"` - HttpStatusCode int `json:"-"` -} - -func (o UpdateLineGroupsResponse) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "UpdateLineGroupsResponse struct{}" - } - - return strings.Join([]string{"UpdateLineGroupsResponse", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_update_private_zone_info_req.go b/sdk/services/dns/v2/model/model_update_private_zone_info_req.go deleted file mode 100644 index 31e5f68..0000000 --- a/sdk/services/dns/v2/model/model_update_private_zone_info_req.go +++ /dev/null @@ -1,28 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -type UpdatePrivateZoneInfoReq struct { - - // 域名的描述信息。长度不超过255个字符。 - Description *string `json:"description,omitempty"` - - // 管理该zone的管理员邮箱。 - Email *string `json:"email,omitempty"` - - // 用于填写默认生成的SOA记录中有效缓存时间,以秒为单位。 - Ttl *int32 `json:"ttl,omitempty"` -} - -func (o UpdatePrivateZoneInfoReq) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "UpdatePrivateZoneInfoReq struct{}" - } - - return strings.Join([]string{"UpdatePrivateZoneInfoReq", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_update_private_zone_request.go b/sdk/services/dns/v2/model/model_update_private_zone_request.go deleted file mode 100644 index a541478..0000000 --- a/sdk/services/dns/v2/model/model_update_private_zone_request.go +++ /dev/null @@ -1,25 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -// UpdatePrivateZoneRequest Request Object -type UpdatePrivateZoneRequest struct { - - // 待修改Zone的ID。 - ZoneId string `json:"zone_id"` - - Body *UpdatePrivateZoneInfoReq `json:"body,omitempty"` -} - -func (o UpdatePrivateZoneRequest) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "UpdatePrivateZoneRequest struct{}" - } - - return strings.Join([]string{"UpdatePrivateZoneRequest", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_update_private_zone_response.go b/sdk/services/dns/v2/model/model_update_private_zone_response.go deleted file mode 100644 index 54c30db..0000000 --- a/sdk/services/dns/v2/model/model_update_private_zone_response.go +++ /dev/null @@ -1,68 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -// UpdatePrivateZoneResponse Response Object -type UpdatePrivateZoneResponse struct { - - // zone的ID,uuid形式的一个资源标识。 - Id *string `json:"id,omitempty"` - - // zone名称。 - Name *string `json:"name,omitempty"` - - // 对zone的描述信息。 - Description *string `json:"description,omitempty"` - - // 管理该zone的管理员邮箱。 - Email *string `json:"email,omitempty"` - - // zone类型,内网(private)。 - ZoneType *string `json:"zone_type,omitempty"` - - // 该zone下SOA记录中的ttl值。 - Ttl *int32 `json:"ttl,omitempty"` - - // 该zone下SOA记录中用于标识zone文件变更的序列值,用于主从节点同步。 - Serial *int32 `json:"serial,omitempty"` - - // 资源状态。 - Status *string `json:"status,omitempty"` - - // 该zone下的recordset个数。 - RecordNum *int32 `json:"record_num,omitempty"` - - // 托管该zone的pool,由系统分配。 - PoolId *string `json:"pool_id,omitempty"` - - // zone所属的项目ID。 - ProjectId *string `json:"project_id,omitempty"` - - // 创建时间。 - CreatedAt *string `json:"created_at,omitempty"` - - // 更新时间。 - UpdatedAt *string `json:"updated_at,omitempty"` - - Links *PageLink `json:"links,omitempty"` - - // 主从模式中,从DNS服务器获取DNS信息。 - Masters *[]string `json:"masters,omitempty"` - - // 与该zone关联的Router(VPC)列表。 - Routers *[]RouterWithStatus `json:"routers,omitempty"` - HttpStatusCode int `json:"-"` -} - -func (o UpdatePrivateZoneResponse) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "UpdatePrivateZoneResponse struct{}" - } - - return strings.Join([]string{"UpdatePrivateZoneResponse", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_update_ptr_record_request.go b/sdk/services/dns/v2/model/model_update_ptr_record_request.go deleted file mode 100644 index 80f2350..0000000 --- a/sdk/services/dns/v2/model/model_update_ptr_record_request.go +++ /dev/null @@ -1,28 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -// UpdatePtrRecordRequest Request Object -type UpdatePtrRecordRequest struct { - - // 域名所属的区域。 - Region string `json:"region"` - - // 弹性公网IP(EIP)的ID。 - FloatingipId string `json:"floatingip_id"` - - Body *UpdatePtrReq `json:"body,omitempty"` -} - -func (o UpdatePtrRecordRequest) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "UpdatePtrRecordRequest struct{}" - } - - return strings.Join([]string{"UpdatePtrRecordRequest", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_update_ptr_record_response.go b/sdk/services/dns/v2/model/model_update_ptr_record_response.go deleted file mode 100644 index f29c020..0000000 --- a/sdk/services/dns/v2/model/model_update_ptr_record_response.go +++ /dev/null @@ -1,44 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -// UpdatePtrRecordResponse Response Object -type UpdatePtrRecordResponse struct { - - // PTR记录的ID,格式形如{region}:{floatingip_id}。 - Id *string `json:"id,omitempty"` - - // PTR记录对应的域名。 - Ptrdname *string `json:"ptrdname,omitempty"` - - // 对PTR记录的描述。 - Description *string `json:"description,omitempty"` - - // PTR记录在本地DNS服务器的缓存时间,缓存时间越长更新生效越慢,以秒为单位。 - Ttl *int32 `json:"ttl,omitempty"` - - // 弹性IP的IP地址。 - Address *string `json:"address,omitempty"` - - // 资源状态。 - Status *string `json:"status,omitempty"` - - // 对该资源的当前操作。 取值范围: CREATE:表示创建 UPDATE:表示更新 DELETE:表示删除 NONE:表示无操作 - Action *string `json:"action,omitempty"` - - Links *PageLink `json:"links,omitempty"` - HttpStatusCode int `json:"-"` -} - -func (o UpdatePtrRecordResponse) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "UpdatePtrRecordResponse struct{}" - } - - return strings.Join([]string{"UpdatePtrRecordResponse", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_update_ptr_req.go b/sdk/services/dns/v2/model/model_update_ptr_req.go deleted file mode 100644 index 60e73ce..0000000 --- a/sdk/services/dns/v2/model/model_update_ptr_req.go +++ /dev/null @@ -1,31 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -type UpdatePtrReq struct { - - // PTR记录对应的域名。 - Ptrdname string `json:"ptrdname"` - - // 对PTR记录的描述。 - Description *string `json:"description,omitempty"` - - // PTR记录在本地DNS服务器的缓存时间,缓存时间越长更新生效越慢,以秒为单位。 - Ttl *int32 `json:"ttl,omitempty"` - - // 资源标签。 - Tags *[]Tag `json:"tags,omitempty"` -} - -func (o UpdatePtrReq) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "UpdatePtrReq struct{}" - } - - return strings.Join([]string{"UpdatePtrReq", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_update_public_zone_info.go b/sdk/services/dns/v2/model/model_update_public_zone_info.go deleted file mode 100644 index 81d4261..0000000 --- a/sdk/services/dns/v2/model/model_update_public_zone_info.go +++ /dev/null @@ -1,28 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -type UpdatePublicZoneInfo struct { - - // 域名的描述信息。长度不超过255个字符。 - Description *string `json:"description,omitempty"` - - // 管理该zone的管理员邮箱。 如果为空,表示维持原值。 默认值为空。 - Email *string `json:"email,omitempty"` - - // 用于填写默认生成的SOA记录中有效缓存时间,以秒为单位。 - Ttl *int32 `json:"ttl,omitempty"` -} - -func (o UpdatePublicZoneInfo) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "UpdatePublicZoneInfo struct{}" - } - - return strings.Join([]string{"UpdatePublicZoneInfo", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_update_public_zone_request.go b/sdk/services/dns/v2/model/model_update_public_zone_request.go deleted file mode 100644 index a1f4a47..0000000 --- a/sdk/services/dns/v2/model/model_update_public_zone_request.go +++ /dev/null @@ -1,25 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -// UpdatePublicZoneRequest Request Object -type UpdatePublicZoneRequest struct { - - // 待修改zone的ID - ZoneId string `json:"zone_id"` - - Body *UpdatePublicZoneInfo `json:"body,omitempty"` -} - -func (o UpdatePublicZoneRequest) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "UpdatePublicZoneRequest struct{}" - } - - return strings.Join([]string{"UpdatePublicZoneRequest", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_update_public_zone_response.go b/sdk/services/dns/v2/model/model_update_public_zone_response.go deleted file mode 100644 index d879e32..0000000 --- a/sdk/services/dns/v2/model/model_update_public_zone_response.go +++ /dev/null @@ -1,65 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -// UpdatePublicZoneResponse Response Object -type UpdatePublicZoneResponse struct { - - // zone的ID,uuid形式的一个资源标识。 - Id *string `json:"id,omitempty"` - - // zone名称。 - Name *string `json:"name,omitempty"` - - // 对zone的描述信息。 - Description *string `json:"description,omitempty"` - - // 管理该zone的管理员邮箱。 - Email *string `json:"email,omitempty"` - - // zone类型,公网(public)。 - ZoneType *string `json:"zone_type,omitempty"` - - // 该zone下SOA记录中的ttl值。 - Ttl *int32 `json:"ttl,omitempty"` - - // 该zone下SOA记录中用于标识zone文件变更的序列值,用于主从节点同步。 该参数暂未使用。 - Serial *int32 `json:"serial,omitempty"` - - // 资源状态。 - Status *string `json:"status,omitempty"` - - // 该zone下的recordset个数。 - RecordNum *int32 `json:"record_num,omitempty"` - - // 托管该zone的pool,由系统分配。 - PoolId *string `json:"pool_id,omitempty"` - - // zone所属的项目ID。 - ProjectId *string `json:"project_id,omitempty"` - - // 创建时间。 采用UTC时间格式,格式为:YYYY-MM-DDTHH:MM:SSZ - CreatedAt *string `json:"created_at,omitempty"` - - // 更新时间。 采用UTC时间格式,格式为:YYYY-MM-DDTHH:MM:SSZ - UpdatedAt *string `json:"updated_at,omitempty"` - - Links *PageLink `json:"links,omitempty"` - - // 主从模式中,从DNS服务器获取DNS信息。 目前暂未使用。 - Masters *[]string `json:"masters,omitempty"` - HttpStatusCode int `json:"-"` -} - -func (o UpdatePublicZoneResponse) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "UpdatePublicZoneResponse struct{}" - } - - return strings.Join([]string{"UpdatePublicZoneResponse", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_update_public_zone_status_request.go b/sdk/services/dns/v2/model/model_update_public_zone_status_request.go deleted file mode 100644 index 4c45549..0000000 --- a/sdk/services/dns/v2/model/model_update_public_zone_status_request.go +++ /dev/null @@ -1,25 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -// UpdatePublicZoneStatusRequest Request Object -type UpdatePublicZoneStatusRequest struct { - - // 待设置状态Zone的ID - ZoneId string `json:"zone_id"` - - Body *UpdatePublicZoneStatusRequestBody `json:"body,omitempty"` -} - -func (o UpdatePublicZoneStatusRequest) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "UpdatePublicZoneStatusRequest struct{}" - } - - return strings.Join([]string{"UpdatePublicZoneStatusRequest", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_update_public_zone_status_request_body.go b/sdk/services/dns/v2/model/model_update_public_zone_status_request_body.go deleted file mode 100644 index 004c391..0000000 --- a/sdk/services/dns/v2/model/model_update_public_zone_status_request_body.go +++ /dev/null @@ -1,22 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -type UpdatePublicZoneStatusRequestBody struct { - - // Zone状态。 取值范围: ENABLE:启用解析 DISABLE:暂停解析 - Status string `json:"status"` -} - -func (o UpdatePublicZoneStatusRequestBody) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "UpdatePublicZoneStatusRequestBody struct{}" - } - - return strings.Join([]string{"UpdatePublicZoneStatusRequestBody", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_update_public_zone_status_response.go b/sdk/services/dns/v2/model/model_update_public_zone_status_response.go deleted file mode 100644 index 0e09a69..0000000 --- a/sdk/services/dns/v2/model/model_update_public_zone_status_response.go +++ /dev/null @@ -1,65 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -// UpdatePublicZoneStatusResponse Response Object -type UpdatePublicZoneStatusResponse struct { - - // zone的ID,uuid形式的一个资源标识。 - Id *string `json:"id,omitempty"` - - // zone名称。 - Name *string `json:"name,omitempty"` - - // 对zone的描述信息。 - Description *string `json:"description,omitempty"` - - // 管理该zone的管理员邮箱。 - Email *string `json:"email,omitempty"` - - // zone类型,公网(public)。 - ZoneType *string `json:"zone_type,omitempty"` - - // 该zone下SOA记录中的ttl值。 - Ttl *int32 `json:"ttl,omitempty"` - - // 该zone下SOA记录中用于标识zone文件变更的序列值,用于主从节点同步。 - Serial *int32 `json:"serial,omitempty"` - - // 资源状态。 - Status *string `json:"status,omitempty"` - - // 该zone下的recordset个数。 - RecordNum *int32 `json:"record_num,omitempty"` - - // 托管该zone的pool,由系统分配。 - PoolId *string `json:"pool_id,omitempty"` - - // zone所属的项目ID。 - ProjectId *string `json:"project_id,omitempty"` - - // 创建时间。 - CreatedAt *string `json:"created_at,omitempty"` - - // 更新时间。 - UpdatedAt *string `json:"updated_at,omitempty"` - - Links *PageLink `json:"links,omitempty"` - - // 主从模式中,从DNS服务器获取DNS信息。目前暂未使用。 - Masters *[]string `json:"masters,omitempty"` - HttpStatusCode int `json:"-"` -} - -func (o UpdatePublicZoneStatusResponse) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "UpdatePublicZoneStatusResponse struct{}" - } - - return strings.Join([]string{"UpdatePublicZoneStatusResponse", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_update_record_set_req.go b/sdk/services/dns/v2/model/model_update_record_set_req.go index ed726f4..f7c1ea5 100644 --- a/sdk/services/dns/v2/model/model_update_record_set_req.go +++ b/sdk/services/dns/v2/model/model_update_record_set_req.go @@ -1,9 +1,9 @@ package model import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - "strings" + + "github.com/libdns/huaweicloud/sdk/core/utils" ) type UpdateRecordSetReq struct { diff --git a/sdk/services/dns/v2/model/model_update_record_set_request.go b/sdk/services/dns/v2/model/model_update_record_set_request.go index 8f47b39..dad6cb1 100644 --- a/sdk/services/dns/v2/model/model_update_record_set_request.go +++ b/sdk/services/dns/v2/model/model_update_record_set_request.go @@ -1,9 +1,9 @@ package model import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - "strings" + + "github.com/libdns/huaweicloud/sdk/core/utils" ) // UpdateRecordSetRequest Request Object diff --git a/sdk/services/dns/v2/model/model_update_record_set_response.go b/sdk/services/dns/v2/model/model_update_record_set_response.go index ce172c2..488d4f1 100644 --- a/sdk/services/dns/v2/model/model_update_record_set_response.go +++ b/sdk/services/dns/v2/model/model_update_record_set_response.go @@ -1,9 +1,9 @@ package model import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - "strings" + + "github.com/libdns/huaweicloud/sdk/core/utils" ) // UpdateRecordSetResponse Response Object diff --git a/sdk/services/dns/v2/model/model_update_record_sets_req.go b/sdk/services/dns/v2/model/model_update_record_sets_req.go deleted file mode 100644 index 777ea93..0000000 --- a/sdk/services/dns/v2/model/model_update_record_sets_req.go +++ /dev/null @@ -1,37 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -type UpdateRecordSetsReq struct { - - // 域名,后缀需以zone name结束且为FQDN(即以“.”号结束的完整主机名)。 - Name string `json:"name"` - - // 可选配置,对域名的描述。 长度不超过255个字符。 如果为空,表示维持原值。 默认值为空。 - Description *string `json:"description,omitempty"` - - // Record Set的类型。 取值范围:A、AAAA、MX、CNAME、TXT、NS、SRV、CAA。 - Type string `json:"type"` - - // 解析记录在本地DNS服务器的缓存时间,缓存时间越长更新生效越慢,以秒为单位。 - Ttl *int32 `json:"ttl,omitempty"` - - // 解析记录的值。不同类型解析记录对应的值的规则不同。 - Records *[]string `json:"records,omitempty"` - - // 解析记录的权重。 当weight不填时,表示该解析记录将保持原有设置的权重。 当weight=0,表示该解析记录为备用域名解析记录。 当weight>0,表示该解析记录为主用域名解析记录。 取值范围:0~100 默认值为空。 - Weight *int32 `json:"weight,omitempty"` -} - -func (o UpdateRecordSetsReq) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "UpdateRecordSetsReq struct{}" - } - - return strings.Join([]string{"UpdateRecordSetsReq", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_update_record_sets_request.go b/sdk/services/dns/v2/model/model_update_record_sets_request.go deleted file mode 100644 index e3892d7..0000000 --- a/sdk/services/dns/v2/model/model_update_record_sets_request.go +++ /dev/null @@ -1,28 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -// UpdateRecordSetsRequest Request Object -type UpdateRecordSetsRequest struct { - - // 所属zone的ID。 - ZoneId string `json:"zone_id"` - - // 待查询recordset的ID信息。 - RecordsetId string `json:"recordset_id"` - - Body *UpdateRecordSetsReq `json:"body,omitempty"` -} - -func (o UpdateRecordSetsRequest) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "UpdateRecordSetsRequest struct{}" - } - - return strings.Join([]string{"UpdateRecordSetsRequest", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_update_record_sets_response.go b/sdk/services/dns/v2/model/model_update_record_sets_response.go deleted file mode 100644 index da24b41..0000000 --- a/sdk/services/dns/v2/model/model_update_record_sets_response.go +++ /dev/null @@ -1,73 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -// UpdateRecordSetsResponse Response Object -type UpdateRecordSetsResponse struct { - - // Record Set的ID。 - Id *string `json:"id,omitempty"` - - // Record Set的名称。 - Name *string `json:"name,omitempty"` - - // Record Set的描述信息。 - Description *string `json:"description,omitempty"` - - // 托管该记录的zone_id。 - ZoneId *string `json:"zone_id,omitempty"` - - // 托管该记录的zone_name。 - ZoneName *string `json:"zone_name,omitempty"` - - // 记录类型。 公网支持修改类型: A、AAAA、MX、CNAME、TXT、NS、SRV、CAA 内网支持修改类型: A、AAAA、MX、CNAME、TXT、SRV - Type *string `json:"type,omitempty"` - - // 解析记录在本地DNS服务器的缓存时间,缓存时间越长更新生效越慢,以秒为单位。 - Ttl *int32 `json:"ttl,omitempty"` - - // 域名解析后的值。 - Records *[]string `json:"records,omitempty"` - - // 创建时间。 - CreatedAt *string `json:"created_at,omitempty"` - - // 更新时间。 - UpdatedAt *string `json:"updated_at,omitempty"` - - // 资源状态。 - Status *string `json:"status,omitempty"` - - // 标识是否由系统默认生成,系统默认生成的Record Set不能删除。 - Default *bool `json:"default,omitempty"` - - // 该Record Set所属的项目ID。 - ProjectId *string `json:"project_id,omitempty"` - - Links *PageLink `json:"links,omitempty"` - - // 解析线路ID。 - Line *string `json:"line,omitempty"` - - // 解析记录的权重。 - Weight *int32 `json:"weight,omitempty"` - - // 健康检查ID。 - HealthCheckId *string `json:"health_check_id,omitempty"` - - AliasTarget *AliasTarget `json:"alias_target,omitempty"` - HttpStatusCode int `json:"-"` -} - -func (o UpdateRecordSetsResponse) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "UpdateRecordSetsResponse struct{}" - } - - return strings.Join([]string{"UpdateRecordSetsResponse", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_values_item.go b/sdk/services/dns/v2/model/model_values_item.go deleted file mode 100644 index bcacd31..0000000 --- a/sdk/services/dns/v2/model/model_values_item.go +++ /dev/null @@ -1,23 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -// ValuesItem 版本对象。 -type ValuesItem struct { - - // 所有版本列表。 - Values *[]ListApiVersionsItem `json:"values,omitempty"` -} - -func (o ValuesItem) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "ValuesItem struct{}" - } - - return strings.Join([]string{"ValuesItem", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/model/model_version_item.go b/sdk/services/dns/v2/model/model_version_item.go deleted file mode 100644 index a19ddc7..0000000 --- a/sdk/services/dns/v2/model/model_version_item.go +++ /dev/null @@ -1,37 +0,0 @@ -package model - -import ( - "github.com/libdns/huaweicloud/sdk/core/utils" - - "strings" -) - -type VersionItem struct { - - // 版本ID(版本号),如v2。 - Id *string `json:"id,omitempty"` - - // 版本状态,为如下3种: CURRENT:表示该版本为主推版本。 SUPPORTED:表示为老版本,但是现在还继续支持。 DEPRECATED:表示为废弃版本,存在后续删除的可能。 - Status *string `json:"status,omitempty"` - - // API的URL地址。 - Links *[]LinksItem `json:"links,omitempty"` - - // 版本发布时间。 - Updated *string `json:"updated,omitempty"` - - // 支持的最大微版本号。若该版本API不支持微版本,则为空。 - Version *string `json:"version,omitempty"` - - // 支持的最小微版本号。若该版本API不支持微版本,则为空。 - MinVersion *string `json:"min_version,omitempty"` -} - -func (o VersionItem) String() string { - data, err := utils.Marshal(o) - if err != nil { - return "VersionItem struct{}" - } - - return strings.Join([]string{"VersionItem", string(data)}, " ") -} diff --git a/sdk/services/dns/v2/region/region.go b/sdk/services/dns/v2/region/region.go index 3e0faf8..e3d0fb0 100644 --- a/sdk/services/dns/v2/region/region.go +++ b/sdk/services/dns/v2/region/region.go @@ -2,9 +2,10 @@ package region import ( "fmt" - "github.com/libdns/huaweicloud/sdk/core/region" "sort" "strings" + + "github.com/libdns/huaweicloud/sdk/core/region" ) var ( @@ -88,28 +89,18 @@ func getRegionIds() []string { } func SafeValueOf(regionId string) (region *region.Region, err error) { - defer func() { - if r := recover(); r != nil { - err = fmt.Errorf("%v", r) - } - }() - region = ValueOf(regionId) - return region, err -} - -// Deprecated: This function may panic under certain circumstances. Use SafeValueOf instead. -func ValueOf(regionId string) *region.Region { if regionId == "" { - panic("unexpected empty parameter: regionId") + return nil, fmt.Errorf("unexpected empty parameter: regionId") } reg := provider.GetRegion(regionId) if reg != nil { - return reg + return reg, nil } if _, ok := staticFields[regionId]; ok { - return staticFields[regionId] + return staticFields[regionId], nil } - panic(fmt.Sprintf("region id '%s' is not in the following supported regions of service 'DNS': [%s]", regionId, strings.Join(getRegionIds(), ", "))) + + return nil, fmt.Errorf("region id '%s' is not in the following supported regions of service 'DNS': [%s]", regionId, strings.Join(getRegionIds(), ", ")) }