From 969388be5ddb4f4d2d57c632e5be6a22baf5d3a6 Mon Sep 17 00:00:00 2001 From: sdk-team Date: Fri, 28 May 2021 08:49:29 +0000 Subject: [PATCH] Generated 2018-05-11 for sgw. --- ChangeLog.txt | 4 + .../create_elastic_gateway_private_zone.go | 104 ++++++++++++++++ services/sgw/create_gateway_file_share.go | 8 +- .../delete_elastic_gateway_private_zone.go | 104 ++++++++++++++++ services/sgw/delete_gateway.go | 2 + services/sgw/describe_gateway.go | 1 + .../sgw/describe_gateway_capacity_limit.go | 8 +- services/sgw/describe_gateway_file_shares.go | 4 +- services/sgw/describe_gateway_nfs_clients.go | 112 +++++++++++++++++ services/sgw/describe_oss_bucket_info.go | 1 + services/sgw/disable_gateway_nfs_version.go | 105 ++++++++++++++++ services/sgw/enable_gateway_ipv6.go | 104 ++++++++++++++++ .../modify_gateway_file_share_watermark.go | 106 ++++++++++++++++ services/sgw/open_sgw_service.go | 99 +++++++++++++++ services/sgw/struct_cache.go | 23 ++-- services/sgw/struct_client_info.go | 24 ++++ services/sgw/struct_client_info_list.go | 21 ++++ services/sgw/struct_file_share.go | 113 +++++++++--------- services/sgw/struct_gateway.go | 1 + services/sgw/trigger_gateway_remote_sync.go | 106 ++++++++++++++++ services/sgw/update_gateway_file_share.go | 7 +- 21 files changed, 980 insertions(+), 77 deletions(-) create mode 100644 services/sgw/create_elastic_gateway_private_zone.go create mode 100644 services/sgw/delete_elastic_gateway_private_zone.go create mode 100644 services/sgw/describe_gateway_nfs_clients.go create mode 100644 services/sgw/disable_gateway_nfs_version.go create mode 100644 services/sgw/enable_gateway_ipv6.go create mode 100644 services/sgw/modify_gateway_file_share_watermark.go create mode 100644 services/sgw/open_sgw_service.go create mode 100644 services/sgw/struct_client_info.go create mode 100644 services/sgw/struct_client_info_list.go create mode 100644 services/sgw/trigger_gateway_remote_sync.go diff --git a/ChangeLog.txt b/ChangeLog.txt index 3e1c9aaa7c..e662474f70 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,3 +1,7 @@ +2021-05-28 Version: v1.61.1116 +- Generated 2018-05-11 for `sgw`. +- Add TriggerRemoteSync api. + 2021-05-28 Version: v1.61.1115 - Generated 2017-06-01 for `hitsdb`. - Create Lindorm Open api. diff --git a/services/sgw/create_elastic_gateway_private_zone.go b/services/sgw/create_elastic_gateway_private_zone.go new file mode 100644 index 0000000000..1fe15b31ea --- /dev/null +++ b/services/sgw/create_elastic_gateway_private_zone.go @@ -0,0 +1,104 @@ +package sgw + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" +) + +// CreateElasticGatewayPrivateZone invokes the sgw.CreateElasticGatewayPrivateZone API synchronously +func (client *Client) CreateElasticGatewayPrivateZone(request *CreateElasticGatewayPrivateZoneRequest) (response *CreateElasticGatewayPrivateZoneResponse, err error) { + response = CreateCreateElasticGatewayPrivateZoneResponse() + err = client.DoAction(request, response) + return +} + +// CreateElasticGatewayPrivateZoneWithChan invokes the sgw.CreateElasticGatewayPrivateZone API asynchronously +func (client *Client) CreateElasticGatewayPrivateZoneWithChan(request *CreateElasticGatewayPrivateZoneRequest) (<-chan *CreateElasticGatewayPrivateZoneResponse, <-chan error) { + responseChan := make(chan *CreateElasticGatewayPrivateZoneResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.CreateElasticGatewayPrivateZone(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// CreateElasticGatewayPrivateZoneWithCallback invokes the sgw.CreateElasticGatewayPrivateZone API asynchronously +func (client *Client) CreateElasticGatewayPrivateZoneWithCallback(request *CreateElasticGatewayPrivateZoneRequest, callback func(response *CreateElasticGatewayPrivateZoneResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *CreateElasticGatewayPrivateZoneResponse + var err error + defer close(result) + response, err = client.CreateElasticGatewayPrivateZone(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// CreateElasticGatewayPrivateZoneRequest is the request struct for api CreateElasticGatewayPrivateZone +type CreateElasticGatewayPrivateZoneRequest struct { + *requests.RpcRequest + SecurityToken string `position:"Query" name:"SecurityToken"` + GatewayId string `position:"Query" name:"GatewayId"` +} + +// CreateElasticGatewayPrivateZoneResponse is the response struct for api CreateElasticGatewayPrivateZone +type CreateElasticGatewayPrivateZoneResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + Success bool `json:"Success" xml:"Success"` + Code string `json:"Code" xml:"Code"` + Message string `json:"Message" xml:"Message"` + TaskId string `json:"TaskId" xml:"TaskId"` +} + +// CreateCreateElasticGatewayPrivateZoneRequest creates a request to invoke CreateElasticGatewayPrivateZone API +func CreateCreateElasticGatewayPrivateZoneRequest() (request *CreateElasticGatewayPrivateZoneRequest) { + request = &CreateElasticGatewayPrivateZoneRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("sgw", "2018-05-11", "CreateElasticGatewayPrivateZone", "hcs_sgw", "openAPI") + request.Method = requests.POST + return +} + +// CreateCreateElasticGatewayPrivateZoneResponse creates a response to parse from CreateElasticGatewayPrivateZone response +func CreateCreateElasticGatewayPrivateZoneResponse() (response *CreateElasticGatewayPrivateZoneResponse) { + response = &CreateElasticGatewayPrivateZoneResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/sgw/create_gateway_file_share.go b/services/sgw/create_gateway_file_share.go index a82c568190..3f25046218 100644 --- a/services/sgw/create_gateway_file_share.go +++ b/services/sgw/create_gateway_file_share.go @@ -74,6 +74,7 @@ type CreateGatewayFileShareRequest struct { InPlace requests.Boolean `position:"Query" name:"InPlace"` OssEndpoint string `position:"Query" name:"OssEndpoint"` ReadWriteClientList string `position:"Query" name:"ReadWriteClientList"` + BypassCacheRead requests.Boolean `position:"Query" name:"BypassCacheRead"` BackendLimit requests.Integer `position:"Query" name:"BackendLimit"` Squash string `position:"Query" name:"Squash"` ReadOnlyClientList string `position:"Query" name:"ReadOnlyClientList"` @@ -101,6 +102,7 @@ type CreateGatewayFileShareRequest struct { ReadWriteUserList string `position:"Query" name:"ReadWriteUserList"` PollingInterval requests.Integer `position:"Query" name:"PollingInterval"` Enabled requests.Boolean `position:"Query" name:"Enabled"` + ServerSideAlgorithm string `position:"Query" name:"ServerSideAlgorithm"` ServerSideCmk string `position:"Query" name:"ServerSideCmk"` ServerSideEncryption requests.Boolean `position:"Query" name:"ServerSideEncryption"` IgnoreDelete requests.Boolean `position:"Query" name:"IgnoreDelete"` @@ -115,11 +117,11 @@ type CreateGatewayFileShareRequest struct { // CreateGatewayFileShareResponse is the response struct for api CreateGatewayFileShare type CreateGatewayFileShareResponse struct { *responses.BaseResponse + TaskId string `json:"TaskId" xml:"TaskId"` + Message string `json:"Message" xml:"Message"` RequestId string `json:"RequestId" xml:"RequestId"` - Success bool `json:"Success" xml:"Success"` Code string `json:"Code" xml:"Code"` - Message string `json:"Message" xml:"Message"` - TaskId string `json:"TaskId" xml:"TaskId"` + Success bool `json:"Success" xml:"Success"` } // CreateCreateGatewayFileShareRequest creates a request to invoke CreateGatewayFileShare API diff --git a/services/sgw/delete_elastic_gateway_private_zone.go b/services/sgw/delete_elastic_gateway_private_zone.go new file mode 100644 index 0000000000..f762380ce1 --- /dev/null +++ b/services/sgw/delete_elastic_gateway_private_zone.go @@ -0,0 +1,104 @@ +package sgw + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" +) + +// DeleteElasticGatewayPrivateZone invokes the sgw.DeleteElasticGatewayPrivateZone API synchronously +func (client *Client) DeleteElasticGatewayPrivateZone(request *DeleteElasticGatewayPrivateZoneRequest) (response *DeleteElasticGatewayPrivateZoneResponse, err error) { + response = CreateDeleteElasticGatewayPrivateZoneResponse() + err = client.DoAction(request, response) + return +} + +// DeleteElasticGatewayPrivateZoneWithChan invokes the sgw.DeleteElasticGatewayPrivateZone API asynchronously +func (client *Client) DeleteElasticGatewayPrivateZoneWithChan(request *DeleteElasticGatewayPrivateZoneRequest) (<-chan *DeleteElasticGatewayPrivateZoneResponse, <-chan error) { + responseChan := make(chan *DeleteElasticGatewayPrivateZoneResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.DeleteElasticGatewayPrivateZone(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// DeleteElasticGatewayPrivateZoneWithCallback invokes the sgw.DeleteElasticGatewayPrivateZone API asynchronously +func (client *Client) DeleteElasticGatewayPrivateZoneWithCallback(request *DeleteElasticGatewayPrivateZoneRequest, callback func(response *DeleteElasticGatewayPrivateZoneResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *DeleteElasticGatewayPrivateZoneResponse + var err error + defer close(result) + response, err = client.DeleteElasticGatewayPrivateZone(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// DeleteElasticGatewayPrivateZoneRequest is the request struct for api DeleteElasticGatewayPrivateZone +type DeleteElasticGatewayPrivateZoneRequest struct { + *requests.RpcRequest + SecurityToken string `position:"Query" name:"SecurityToken"` + GatewayId string `position:"Query" name:"GatewayId"` +} + +// DeleteElasticGatewayPrivateZoneResponse is the response struct for api DeleteElasticGatewayPrivateZone +type DeleteElasticGatewayPrivateZoneResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + Success bool `json:"Success" xml:"Success"` + Code string `json:"Code" xml:"Code"` + Message string `json:"Message" xml:"Message"` + TaskId string `json:"TaskId" xml:"TaskId"` +} + +// CreateDeleteElasticGatewayPrivateZoneRequest creates a request to invoke DeleteElasticGatewayPrivateZone API +func CreateDeleteElasticGatewayPrivateZoneRequest() (request *DeleteElasticGatewayPrivateZoneRequest) { + request = &DeleteElasticGatewayPrivateZoneRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("sgw", "2018-05-11", "DeleteElasticGatewayPrivateZone", "hcs_sgw", "openAPI") + request.Method = requests.POST + return +} + +// CreateDeleteElasticGatewayPrivateZoneResponse creates a response to parse from DeleteElasticGatewayPrivateZone response +func CreateDeleteElasticGatewayPrivateZoneResponse() (response *DeleteElasticGatewayPrivateZoneResponse) { + response = &DeleteElasticGatewayPrivateZoneResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/sgw/delete_gateway.go b/services/sgw/delete_gateway.go index cd41bfaeb0..b9ff8d8223 100644 --- a/services/sgw/delete_gateway.go +++ b/services/sgw/delete_gateway.go @@ -71,8 +71,10 @@ func (client *Client) DeleteGatewayWithCallback(request *DeleteGatewayRequest, c // DeleteGatewayRequest is the request struct for api DeleteGateway type DeleteGatewayRequest struct { *requests.RpcRequest + ReasonDetail string `position:"Query" name:"ReasonDetail"` SecurityToken string `position:"Query" name:"SecurityToken"` GatewayId string `position:"Query" name:"GatewayId"` + ReasonType string `position:"Query" name:"ReasonType"` } // DeleteGatewayResponse is the response struct for api DeleteGateway diff --git a/services/sgw/describe_gateway.go b/services/sgw/describe_gateway.go index a2f95dbe40..35001523b6 100644 --- a/services/sgw/describe_gateway.go +++ b/services/sgw/describe_gateway.go @@ -117,6 +117,7 @@ type DescribeGatewayResponse struct { DataLoadType string `json:"DataLoadType" xml:"DataLoadType"` DataLoadInterval int `json:"DataLoadInterval" xml:"DataLoadInterval"` LastErrorKey string `json:"LastErrorKey" xml:"LastErrorKey"` + InnerIpv6Ip string `json:"InnerIpv6Ip" xml:"InnerIpv6Ip"` ElasticNodes ElasticNodesInDescribeGateway `json:"ElasticNodes" xml:"ElasticNodes"` } diff --git a/services/sgw/describe_gateway_capacity_limit.go b/services/sgw/describe_gateway_capacity_limit.go index 04e23e8a96..a936597c97 100644 --- a/services/sgw/describe_gateway_capacity_limit.go +++ b/services/sgw/describe_gateway_capacity_limit.go @@ -79,13 +79,13 @@ type DescribeGatewayCapacityLimitRequest struct { // DescribeGatewayCapacityLimitResponse is the response struct for api DescribeGatewayCapacityLimit type DescribeGatewayCapacityLimitResponse struct { *responses.BaseResponse + FileSystemSizeInTB int64 `json:"FileSystemSizeInTB" xml:"FileSystemSizeInTB"` RequestId string `json:"RequestId" xml:"RequestId"` - Success bool `json:"Success" xml:"Success"` - Code string `json:"Code" xml:"Code"` Message string `json:"Message" xml:"Message"` - FileNumber int64 `json:"FileNumber" xml:"FileNumber"` - FileSystemSizeInTB int64 `json:"FileSystemSizeInTB" xml:"FileSystemSizeInTB"` IsMetadataSeparate bool `json:"IsMetadataSeparate" xml:"IsMetadataSeparate"` + FileNumber int64 `json:"FileNumber" xml:"FileNumber"` + Code string `json:"Code" xml:"Code"` + Success bool `json:"Success" xml:"Success"` } // CreateDescribeGatewayCapacityLimitRequest creates a request to invoke DescribeGatewayCapacityLimit API diff --git a/services/sgw/describe_gateway_file_shares.go b/services/sgw/describe_gateway_file_shares.go index 8abf1dc5c1..101a4436cf 100644 --- a/services/sgw/describe_gateway_file_shares.go +++ b/services/sgw/describe_gateway_file_shares.go @@ -80,10 +80,10 @@ type DescribeGatewayFileSharesRequest struct { // DescribeGatewayFileSharesResponse is the response struct for api DescribeGatewayFileShares type DescribeGatewayFileSharesResponse struct { *responses.BaseResponse + Message string `json:"Message" xml:"Message"` RequestId string `json:"RequestId" xml:"RequestId"` - Success bool `json:"Success" xml:"Success"` Code string `json:"Code" xml:"Code"` - Message string `json:"Message" xml:"Message"` + Success bool `json:"Success" xml:"Success"` FileShares FileShares `json:"FileShares" xml:"FileShares"` } diff --git a/services/sgw/describe_gateway_nfs_clients.go b/services/sgw/describe_gateway_nfs_clients.go new file mode 100644 index 0000000000..3d2ab03c81 --- /dev/null +++ b/services/sgw/describe_gateway_nfs_clients.go @@ -0,0 +1,112 @@ +package sgw + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" +) + +// DescribeGatewayNFSClients invokes the sgw.DescribeGatewayNFSClients API synchronously +func (client *Client) DescribeGatewayNFSClients(request *DescribeGatewayNFSClientsRequest) (response *DescribeGatewayNFSClientsResponse, err error) { + response = CreateDescribeGatewayNFSClientsResponse() + err = client.DoAction(request, response) + return +} + +// DescribeGatewayNFSClientsWithChan invokes the sgw.DescribeGatewayNFSClients API asynchronously +func (client *Client) DescribeGatewayNFSClientsWithChan(request *DescribeGatewayNFSClientsRequest) (<-chan *DescribeGatewayNFSClientsResponse, <-chan error) { + responseChan := make(chan *DescribeGatewayNFSClientsResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.DescribeGatewayNFSClients(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// DescribeGatewayNFSClientsWithCallback invokes the sgw.DescribeGatewayNFSClients API asynchronously +func (client *Client) DescribeGatewayNFSClientsWithCallback(request *DescribeGatewayNFSClientsRequest, callback func(response *DescribeGatewayNFSClientsResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *DescribeGatewayNFSClientsResponse + var err error + defer close(result) + response, err = client.DescribeGatewayNFSClients(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// DescribeGatewayNFSClientsRequest is the request struct for api DescribeGatewayNFSClients +type DescribeGatewayNFSClientsRequest struct { + *requests.RpcRequest + PageNumber requests.Integer `position:"Query" name:"PageNumber"` + SecurityToken string `position:"Query" name:"SecurityToken"` + PageSize requests.Integer `position:"Query" name:"PageSize"` + GatewayId string `position:"Query" name:"GatewayId"` +} + +// DescribeGatewayNFSClientsResponse is the response struct for api DescribeGatewayNFSClients +type DescribeGatewayNFSClientsResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + Success bool `json:"Success" xml:"Success"` + Code string `json:"Code" xml:"Code"` + Message string `json:"Message" xml:"Message"` + TotalCount int `json:"TotalCount" xml:"TotalCount"` + PageNumber int `json:"PageNumber" xml:"PageNumber"` + PageSize int `json:"PageSize" xml:"PageSize"` + Version3Enabled bool `json:"Version3Enabled" xml:"Version3Enabled"` + Version40Enabled bool `json:"Version40Enabled" xml:"Version40Enabled"` + Version41Enabled bool `json:"Version41Enabled" xml:"Version41Enabled"` + ClientInfoList ClientInfoList `json:"ClientInfoList" xml:"ClientInfoList"` +} + +// CreateDescribeGatewayNFSClientsRequest creates a request to invoke DescribeGatewayNFSClients API +func CreateDescribeGatewayNFSClientsRequest() (request *DescribeGatewayNFSClientsRequest) { + request = &DescribeGatewayNFSClientsRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("sgw", "2018-05-11", "DescribeGatewayNFSClients", "hcs_sgw", "openAPI") + request.Method = requests.POST + return +} + +// CreateDescribeGatewayNFSClientsResponse creates a response to parse from DescribeGatewayNFSClients response +func CreateDescribeGatewayNFSClientsResponse() (response *DescribeGatewayNFSClientsResponse) { + response = &DescribeGatewayNFSClientsResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/sgw/describe_oss_bucket_info.go b/services/sgw/describe_oss_bucket_info.go index bb866b2698..4355025eb8 100644 --- a/services/sgw/describe_oss_bucket_info.go +++ b/services/sgw/describe_oss_bucket_info.go @@ -91,6 +91,7 @@ type DescribeOssBucketInfoResponse struct { IsSupportServerSideEncryption bool `json:"IsSupportServerSideEncryption" xml:"IsSupportServerSideEncryption"` IsFresh bool `json:"IsFresh" xml:"IsFresh"` StorageSize int64 `json:"StorageSize" xml:"StorageSize"` + IsVersioning bool `json:"IsVersioning" xml:"IsVersioning"` } // CreateDescribeOssBucketInfoRequest creates a request to invoke DescribeOssBucketInfo API diff --git a/services/sgw/disable_gateway_nfs_version.go b/services/sgw/disable_gateway_nfs_version.go new file mode 100644 index 0000000000..df9355ba44 --- /dev/null +++ b/services/sgw/disable_gateway_nfs_version.go @@ -0,0 +1,105 @@ +package sgw + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" +) + +// DisableGatewayNFSVersion invokes the sgw.DisableGatewayNFSVersion API synchronously +func (client *Client) DisableGatewayNFSVersion(request *DisableGatewayNFSVersionRequest) (response *DisableGatewayNFSVersionResponse, err error) { + response = CreateDisableGatewayNFSVersionResponse() + err = client.DoAction(request, response) + return +} + +// DisableGatewayNFSVersionWithChan invokes the sgw.DisableGatewayNFSVersion API asynchronously +func (client *Client) DisableGatewayNFSVersionWithChan(request *DisableGatewayNFSVersionRequest) (<-chan *DisableGatewayNFSVersionResponse, <-chan error) { + responseChan := make(chan *DisableGatewayNFSVersionResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.DisableGatewayNFSVersion(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// DisableGatewayNFSVersionWithCallback invokes the sgw.DisableGatewayNFSVersion API asynchronously +func (client *Client) DisableGatewayNFSVersionWithCallback(request *DisableGatewayNFSVersionRequest, callback func(response *DisableGatewayNFSVersionResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *DisableGatewayNFSVersionResponse + var err error + defer close(result) + response, err = client.DisableGatewayNFSVersion(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// DisableGatewayNFSVersionRequest is the request struct for api DisableGatewayNFSVersion +type DisableGatewayNFSVersionRequest struct { + *requests.RpcRequest + NFSVersion string `position:"Query" name:"NFSVersion"` + SecurityToken string `position:"Query" name:"SecurityToken"` + GatewayId string `position:"Query" name:"GatewayId"` +} + +// DisableGatewayNFSVersionResponse is the response struct for api DisableGatewayNFSVersion +type DisableGatewayNFSVersionResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + Success bool `json:"Success" xml:"Success"` + Code string `json:"Code" xml:"Code"` + Message string `json:"Message" xml:"Message"` + TaskId string `json:"TaskId" xml:"TaskId"` +} + +// CreateDisableGatewayNFSVersionRequest creates a request to invoke DisableGatewayNFSVersion API +func CreateDisableGatewayNFSVersionRequest() (request *DisableGatewayNFSVersionRequest) { + request = &DisableGatewayNFSVersionRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("sgw", "2018-05-11", "DisableGatewayNFSVersion", "hcs_sgw", "openAPI") + request.Method = requests.POST + return +} + +// CreateDisableGatewayNFSVersionResponse creates a response to parse from DisableGatewayNFSVersion response +func CreateDisableGatewayNFSVersionResponse() (response *DisableGatewayNFSVersionResponse) { + response = &DisableGatewayNFSVersionResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/sgw/enable_gateway_ipv6.go b/services/sgw/enable_gateway_ipv6.go new file mode 100644 index 0000000000..facd4e6722 --- /dev/null +++ b/services/sgw/enable_gateway_ipv6.go @@ -0,0 +1,104 @@ +package sgw + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" +) + +// EnableGatewayIpv6 invokes the sgw.EnableGatewayIpv6 API synchronously +func (client *Client) EnableGatewayIpv6(request *EnableGatewayIpv6Request) (response *EnableGatewayIpv6Response, err error) { + response = CreateEnableGatewayIpv6Response() + err = client.DoAction(request, response) + return +} + +// EnableGatewayIpv6WithChan invokes the sgw.EnableGatewayIpv6 API asynchronously +func (client *Client) EnableGatewayIpv6WithChan(request *EnableGatewayIpv6Request) (<-chan *EnableGatewayIpv6Response, <-chan error) { + responseChan := make(chan *EnableGatewayIpv6Response, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.EnableGatewayIpv6(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// EnableGatewayIpv6WithCallback invokes the sgw.EnableGatewayIpv6 API asynchronously +func (client *Client) EnableGatewayIpv6WithCallback(request *EnableGatewayIpv6Request, callback func(response *EnableGatewayIpv6Response, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *EnableGatewayIpv6Response + var err error + defer close(result) + response, err = client.EnableGatewayIpv6(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// EnableGatewayIpv6Request is the request struct for api EnableGatewayIpv6 +type EnableGatewayIpv6Request struct { + *requests.RpcRequest + SecurityToken string `position:"Query" name:"SecurityToken"` + GatewayId string `position:"Query" name:"GatewayId"` +} + +// EnableGatewayIpv6Response is the response struct for api EnableGatewayIpv6 +type EnableGatewayIpv6Response struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + Success bool `json:"Success" xml:"Success"` + Code string `json:"Code" xml:"Code"` + Message string `json:"Message" xml:"Message"` + TaskId string `json:"TaskId" xml:"TaskId"` +} + +// CreateEnableGatewayIpv6Request creates a request to invoke EnableGatewayIpv6 API +func CreateEnableGatewayIpv6Request() (request *EnableGatewayIpv6Request) { + request = &EnableGatewayIpv6Request{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("sgw", "2018-05-11", "EnableGatewayIpv6", "hcs_sgw", "openAPI") + request.Method = requests.POST + return +} + +// CreateEnableGatewayIpv6Response creates a response to parse from EnableGatewayIpv6 response +func CreateEnableGatewayIpv6Response() (response *EnableGatewayIpv6Response) { + response = &EnableGatewayIpv6Response{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/sgw/modify_gateway_file_share_watermark.go b/services/sgw/modify_gateway_file_share_watermark.go new file mode 100644 index 0000000000..0a0c50747a --- /dev/null +++ b/services/sgw/modify_gateway_file_share_watermark.go @@ -0,0 +1,106 @@ +package sgw + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" +) + +// ModifyGatewayFileShareWatermark invokes the sgw.ModifyGatewayFileShareWatermark API synchronously +func (client *Client) ModifyGatewayFileShareWatermark(request *ModifyGatewayFileShareWatermarkRequest) (response *ModifyGatewayFileShareWatermarkResponse, err error) { + response = CreateModifyGatewayFileShareWatermarkResponse() + err = client.DoAction(request, response) + return +} + +// ModifyGatewayFileShareWatermarkWithChan invokes the sgw.ModifyGatewayFileShareWatermark API asynchronously +func (client *Client) ModifyGatewayFileShareWatermarkWithChan(request *ModifyGatewayFileShareWatermarkRequest) (<-chan *ModifyGatewayFileShareWatermarkResponse, <-chan error) { + responseChan := make(chan *ModifyGatewayFileShareWatermarkResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.ModifyGatewayFileShareWatermark(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// ModifyGatewayFileShareWatermarkWithCallback invokes the sgw.ModifyGatewayFileShareWatermark API asynchronously +func (client *Client) ModifyGatewayFileShareWatermarkWithCallback(request *ModifyGatewayFileShareWatermarkRequest, callback func(response *ModifyGatewayFileShareWatermarkResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *ModifyGatewayFileShareWatermarkResponse + var err error + defer close(result) + response, err = client.ModifyGatewayFileShareWatermark(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// ModifyGatewayFileShareWatermarkRequest is the request struct for api ModifyGatewayFileShareWatermark +type ModifyGatewayFileShareWatermarkRequest struct { + *requests.RpcRequest + Watermark requests.Integer `position:"Query" name:"Watermark"` + SecurityToken string `position:"Query" name:"SecurityToken"` + IndexId string `position:"Query" name:"IndexId"` + GatewayId string `position:"Query" name:"GatewayId"` +} + +// ModifyGatewayFileShareWatermarkResponse is the response struct for api ModifyGatewayFileShareWatermark +type ModifyGatewayFileShareWatermarkResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + Success bool `json:"Success" xml:"Success"` + Code string `json:"Code" xml:"Code"` + Message string `json:"Message" xml:"Message"` + TaskId string `json:"TaskId" xml:"TaskId"` +} + +// CreateModifyGatewayFileShareWatermarkRequest creates a request to invoke ModifyGatewayFileShareWatermark API +func CreateModifyGatewayFileShareWatermarkRequest() (request *ModifyGatewayFileShareWatermarkRequest) { + request = &ModifyGatewayFileShareWatermarkRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("sgw", "2018-05-11", "ModifyGatewayFileShareWatermark", "hcs_sgw", "openAPI") + request.Method = requests.POST + return +} + +// CreateModifyGatewayFileShareWatermarkResponse creates a response to parse from ModifyGatewayFileShareWatermark response +func CreateModifyGatewayFileShareWatermarkResponse() (response *ModifyGatewayFileShareWatermarkResponse) { + response = &ModifyGatewayFileShareWatermarkResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/sgw/open_sgw_service.go b/services/sgw/open_sgw_service.go new file mode 100644 index 0000000000..b4294100ea --- /dev/null +++ b/services/sgw/open_sgw_service.go @@ -0,0 +1,99 @@ +package sgw + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" +) + +// OpenSgwService invokes the sgw.OpenSgwService API synchronously +func (client *Client) OpenSgwService(request *OpenSgwServiceRequest) (response *OpenSgwServiceResponse, err error) { + response = CreateOpenSgwServiceResponse() + err = client.DoAction(request, response) + return +} + +// OpenSgwServiceWithChan invokes the sgw.OpenSgwService API asynchronously +func (client *Client) OpenSgwServiceWithChan(request *OpenSgwServiceRequest) (<-chan *OpenSgwServiceResponse, <-chan error) { + responseChan := make(chan *OpenSgwServiceResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.OpenSgwService(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// OpenSgwServiceWithCallback invokes the sgw.OpenSgwService API asynchronously +func (client *Client) OpenSgwServiceWithCallback(request *OpenSgwServiceRequest, callback func(response *OpenSgwServiceResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *OpenSgwServiceResponse + var err error + defer close(result) + response, err = client.OpenSgwService(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// OpenSgwServiceRequest is the request struct for api OpenSgwService +type OpenSgwServiceRequest struct { + *requests.RpcRequest +} + +// OpenSgwServiceResponse is the response struct for api OpenSgwService +type OpenSgwServiceResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + OrderId string `json:"OrderId" xml:"OrderId"` +} + +// CreateOpenSgwServiceRequest creates a request to invoke OpenSgwService API +func CreateOpenSgwServiceRequest() (request *OpenSgwServiceRequest) { + request = &OpenSgwServiceRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("sgw", "2018-05-11", "OpenSgwService", "hcs_sgw", "openAPI") + request.Method = requests.POST + return +} + +// CreateOpenSgwServiceResponse creates a response to parse from OpenSgwService response +func CreateOpenSgwServiceResponse() (response *OpenSgwServiceResponse) { + response = &OpenSgwServiceResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/sgw/struct_cache.go b/services/sgw/struct_cache.go index a93bf08585..cd4f54500a 100644 --- a/services/sgw/struct_cache.go +++ b/services/sgw/struct_cache.go @@ -17,15 +17,16 @@ package sgw // Cache is a nested struct in sgw response type Cache struct { - SizeInGB int64 `json:"SizeInGB" xml:"SizeInGB"` - Iops int64 `json:"Iops" xml:"Iops"` - CacheId string `json:"CacheId" xml:"CacheId"` - CacheType string `json:"CacheType" xml:"CacheType"` - IsUsed bool `json:"IsUsed" xml:"IsUsed"` - LocalFilePath string `json:"LocalFilePath" xml:"LocalFilePath"` - RenewURL string `json:"RenewURL" xml:"RenewURL"` - ExpiredTime int64 `json:"ExpiredTime" xml:"ExpiredTime"` - ExpireStatus int `json:"ExpireStatus" xml:"ExpireStatus"` - PerformanceLevel string `json:"PerformanceLevel" xml:"PerformanceLevel"` - BuyURL string `json:"BuyURL" xml:"BuyURL"` + SizeInGB int64 `json:"SizeInGB" xml:"SizeInGB"` + Iops int64 `json:"Iops" xml:"Iops"` + CacheId string `json:"CacheId" xml:"CacheId"` + CacheType string `json:"CacheType" xml:"CacheType"` + IsUsed bool `json:"IsUsed" xml:"IsUsed"` + LocalFilePath string `json:"LocalFilePath" xml:"LocalFilePath"` + RenewURL string `json:"RenewURL" xml:"RenewURL"` + ExpiredTime int64 `json:"ExpiredTime" xml:"ExpiredTime"` + ExpireStatus int `json:"ExpireStatus" xml:"ExpireStatus"` + PerformanceLevel string `json:"PerformanceLevel" xml:"PerformanceLevel"` + BuyURL string `json:"BuyURL" xml:"BuyURL"` + SubscriptionInstanceId string `json:"SubscriptionInstanceId" xml:"SubscriptionInstanceId"` } diff --git a/services/sgw/struct_client_info.go b/services/sgw/struct_client_info.go new file mode 100644 index 0000000000..2f56a761ee --- /dev/null +++ b/services/sgw/struct_client_info.go @@ -0,0 +1,24 @@ +package sgw + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// ClientInfo is a nested struct in sgw response +type ClientInfo struct { + ClientIpAddr string `json:"ClientIpAddr" xml:"ClientIpAddr"` + HasNFSv3 bool `json:"HasNFSv3" xml:"HasNFSv3"` + HasNFSv40 bool `json:"HasNFSv40" xml:"HasNFSv40"` + HasNFSv41 bool `json:"HasNFSv41" xml:"HasNFSv41"` +} diff --git a/services/sgw/struct_client_info_list.go b/services/sgw/struct_client_info_list.go new file mode 100644 index 0000000000..c9569f8ee0 --- /dev/null +++ b/services/sgw/struct_client_info_list.go @@ -0,0 +1,21 @@ +package sgw + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// ClientInfoList is a nested struct in sgw response +type ClientInfoList struct { + ClientInfo []ClientInfo `json:"ClientInfo" xml:"ClientInfo"` +} diff --git a/services/sgw/struct_file_share.go b/services/sgw/struct_file_share.go index 7fa86a3f88..0f3ca919c8 100644 --- a/services/sgw/struct_file_share.go +++ b/services/sgw/struct_file_share.go @@ -17,69 +17,74 @@ package sgw // FileShare is a nested struct in sgw response type FileShare struct { - Name string `json:"Name" xml:"Name"` - DiskId string `json:"DiskId" xml:"DiskId"` - DiskType string `json:"DiskType" xml:"DiskType"` - Protocol string `json:"Protocol" xml:"Protocol"` - Size int64 `json:"Size" xml:"Size"` - Enabled bool `json:"Enabled" xml:"Enabled"` - State string `json:"State" xml:"State"` - TotalUpload int64 `json:"TotalUpload" xml:"TotalUpload"` - TotalDownload int64 `json:"TotalDownload" xml:"TotalDownload"` - OssBucketName string `json:"OssBucketName" xml:"OssBucketName"` - OssEndpoint string `json:"OssEndpoint" xml:"OssEndpoint"` - OssBucketSsl bool `json:"OssBucketSsl" xml:"OssBucketSsl"` - LocalPath string `json:"LocalPath" xml:"LocalPath"` - CacheMode string `json:"CacheMode" xml:"CacheMode"` - Address string `json:"Address" xml:"Address"` SerialNumber string `json:"SerialNumber" xml:"SerialNumber"` + ClientSideCmk string `json:"ClientSideCmk" xml:"ClientSideCmk"` + PartialSyncPaths string `json:"PartialSyncPaths" xml:"PartialSyncPaths"` + PathPrefix string `json:"PathPrefix" xml:"PathPrefix"` + BucketsStub bool `json:"BucketsStub" xml:"BucketsStub"` + UploadQueue int64 `json:"UploadQueue" xml:"UploadQueue"` + DiskId string `json:"DiskId" xml:"DiskId"` + OssUsed int64 `json:"OssUsed" xml:"OssUsed"` + DownloadQueue int64 `json:"DownloadQueue" xml:"DownloadQueue"` + ActiveMessages int64 `json:"ActiveMessages" xml:"ActiveMessages"` IndexId string `json:"IndexId" xml:"IndexId"` - RemoteSync bool `json:"RemoteSync" xml:"RemoteSync"` - PollingInterval int `json:"PollingInterval" xml:"PollingInterval"` - IgnoreDelete bool `json:"IgnoreDelete" xml:"IgnoreDelete"` + MnsHealth string `json:"MnsHealth" xml:"MnsHealth"` + AccessBasedEnumeration bool `json:"AccessBasedEnumeration" xml:"AccessBasedEnumeration"` + DownloadRate int64 `json:"DownloadRate" xml:"DownloadRate"` FeLimit int `json:"FeLimit" xml:"FeLimit"` - BeLimit int `json:"BeLimit" xml:"BeLimit"` + SupportArchive bool `json:"SupportArchive" xml:"SupportArchive"` + OssEndpoint string `json:"OssEndpoint" xml:"OssEndpoint"` + OssHealth string `json:"OssHealth" xml:"OssHealth"` + OutRate int64 `json:"OutRate" xml:"OutRate"` + ServerSideCmk string `json:"ServerSideCmk" xml:"ServerSideCmk"` + RwClientList string `json:"RwClientList" xml:"RwClientList"` + State string `json:"State" xml:"State"` + Protocol string `json:"Protocol" xml:"Protocol"` + OssBucketSsl bool `json:"OssBucketSsl" xml:"OssBucketSsl"` + DownloadLimit int `json:"DownloadLimit" xml:"DownloadLimit"` InPlace bool `json:"InPlace" xml:"InPlace"` - Browsable bool `json:"Browsable" xml:"Browsable"` + RemoteSync bool `json:"RemoteSync" xml:"RemoteSync"` + FileNumLimit int64 `json:"FileNumLimit" xml:"FileNumLimit"` Squash string `json:"Squash" xml:"Squash"` - RwUserList string `json:"RwUserList" xml:"RwUserList"` - RoUserList string `json:"RoUserList" xml:"RoUserList"` - RwClientList string `json:"RwClientList" xml:"RwClientList"` - RoClientList string `json:"RoClientList" xml:"RoClientList"` - OssUsed int64 `json:"OssUsed" xml:"OssUsed"` - Used int64 `json:"Used" xml:"Used"` - InRate int64 `json:"InRate" xml:"InRate"` - OutRate int64 `json:"OutRate" xml:"OutRate"` - LagPeriod int64 `json:"LagPeriod" xml:"LagPeriod"` - DirectIO bool `json:"DirectIO" xml:"DirectIO"` NfsFullPath string `json:"NfsFullPath" xml:"NfsFullPath"` - FileNumLimit int64 `json:"FileNumLimit" xml:"FileNumLimit"` - FsSizeLimit int64 `json:"FsSizeLimit" xml:"FsSizeLimit"` + RemainingMetaSpace int64 `json:"RemainingMetaSpace" xml:"RemainingMetaSpace"` + TransferAcceleration bool `json:"TransferAcceleration" xml:"TransferAcceleration"` + Size int64 `json:"Size" xml:"Size"` ServerSideEncryption bool `json:"ServerSideEncryption" xml:"ServerSideEncryption"` - ServerSideCmk string `json:"ServerSideCmk" xml:"ServerSideCmk"` + WindowsAcl bool `json:"WindowsAcl" xml:"WindowsAcl"` + RemoteSyncDownload bool `json:"RemoteSyncDownload" xml:"RemoteSyncDownload"` ClientSideEncryption bool `json:"ClientSideEncryption" xml:"ClientSideEncryption"` - ClientSideCmk string `json:"ClientSideCmk" xml:"ClientSideCmk"` + BucketInfos string `json:"BucketInfos" xml:"BucketInfos"` + NfsV4Optimization bool `json:"NfsV4Optimization" xml:"NfsV4Optimization"` + TotalUpload int64 `json:"TotalUpload" xml:"TotalUpload"` + DiskType string `json:"DiskType" xml:"DiskType"` + Used int64 `json:"Used" xml:"Used"` + IgnoreDelete bool `json:"IgnoreDelete" xml:"IgnoreDelete"` + RoUserList string `json:"RoUserList" xml:"RoUserList"` + FsSizeLimit int64 `json:"FsSizeLimit" xml:"FsSizeLimit"` + TotalDownload int64 `json:"TotalDownload" xml:"TotalDownload"` + Enabled bool `json:"Enabled" xml:"Enabled"` + HighWatermark int `json:"HighWatermark" xml:"HighWatermark"` KmsRotatePeriod string `json:"KmsRotatePeriod" xml:"KmsRotatePeriod"` - OssHealth string `json:"OssHealth" xml:"OssHealth"` - PathPrefix string `json:"PathPrefix" xml:"PathPrefix"` - FastReclaim bool `json:"FastReclaim" xml:"FastReclaim"` - SupportArchive bool `json:"SupportArchive" xml:"SupportArchive"` - RemainingMetaSpace int64 `json:"RemainingMetaSpace" xml:"RemainingMetaSpace"` - MnsHealth string `json:"MnsHealth" xml:"MnsHealth"` + Address string `json:"Address" xml:"Address"` + PollingInterval int `json:"PollingInterval" xml:"PollingInterval"` + Name string `json:"Name" xml:"Name"` + OssBucketName string `json:"OssBucketName" xml:"OssBucketName"` ExpressSyncId string `json:"ExpressSyncId" xml:"ExpressSyncId"` - WindowsAcl bool `json:"WindowsAcl" xml:"WindowsAcl"` - AccessBasedEnumeration bool `json:"AccessBasedEnumeration" xml:"AccessBasedEnumeration"` - NfsV4Optimization bool `json:"NfsV4Optimization" xml:"NfsV4Optimization"` - BucketsStub bool `json:"BucketsStub" xml:"BucketsStub"` - BucketInfos string `json:"BucketInfos" xml:"BucketInfos"` - ObsoleteBuckets string `json:"ObsoleteBuckets" xml:"ObsoleteBuckets"` - TransferAcceleration bool `json:"TransferAcceleration" xml:"TransferAcceleration"` - DownloadLimit int `json:"DownloadLimit" xml:"DownloadLimit"` - RemoteSyncDownload bool `json:"RemoteSyncDownload" xml:"RemoteSyncDownload"` - PartialSyncPaths string `json:"PartialSyncPaths" xml:"PartialSyncPaths"` + LagPeriod int64 `json:"LagPeriod" xml:"LagPeriod"` + DirectIO bool `json:"DirectIO" xml:"DirectIO"` + CacheMode string `json:"CacheMode" xml:"CacheMode"` + InRate int64 `json:"InRate" xml:"InRate"` + LowWatermark int `json:"LowWatermark" xml:"LowWatermark"` SyncProgress int `json:"SyncProgress" xml:"SyncProgress"` - UploadQueue int64 `json:"UploadQueue" xml:"UploadQueue"` - DownloadQueue int64 `json:"DownloadQueue" xml:"DownloadQueue"` - DownloadRate int64 `json:"DownloadRate" xml:"DownloadRate"` - ActiveMessages int64 `json:"ActiveMessages" xml:"ActiveMessages"` + ServerSideAlgorithm string `json:"ServerSideAlgorithm" xml:"ServerSideAlgorithm"` + ObsoleteBuckets string `json:"ObsoleteBuckets" xml:"ObsoleteBuckets"` + BeLimit int `json:"BeLimit" xml:"BeLimit"` + LocalPath string `json:"LocalPath" xml:"LocalPath"` + RoClientList string `json:"RoClientList" xml:"RoClientList"` + RwUserList string `json:"RwUserList" xml:"RwUserList"` + FastReclaim bool `json:"FastReclaim" xml:"FastReclaim"` + Browsable bool `json:"Browsable" xml:"Browsable"` + Throttling bool `json:"Throttling" xml:"Throttling"` + BypassCacheRead bool `json:"BypassCacheRead" xml:"BypassCacheRead"` } diff --git a/services/sgw/struct_gateway.go b/services/sgw/struct_gateway.go index f26d5447e0..bd0b556ff9 100644 --- a/services/sgw/struct_gateway.go +++ b/services/sgw/struct_gateway.go @@ -44,6 +44,7 @@ type Gateway struct { VSwitchId string `json:"VSwitchId" xml:"VSwitchId"` Ip string `json:"Ip" xml:"Ip"` GatewayId string `json:"GatewayId" xml:"GatewayId"` + InnerIpv6Ip string `json:"InnerIpv6Ip" xml:"InnerIpv6Ip"` Location string `json:"Location" xml:"Location"` IsReleaseAfterExpiration bool `json:"IsReleaseAfterExpiration" xml:"IsReleaseAfterExpiration"` EcsInstanceId string `json:"EcsInstanceId" xml:"EcsInstanceId"` diff --git a/services/sgw/trigger_gateway_remote_sync.go b/services/sgw/trigger_gateway_remote_sync.go new file mode 100644 index 0000000000..347600f7b8 --- /dev/null +++ b/services/sgw/trigger_gateway_remote_sync.go @@ -0,0 +1,106 @@ +package sgw + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" +) + +// TriggerGatewayRemoteSync invokes the sgw.TriggerGatewayRemoteSync API synchronously +func (client *Client) TriggerGatewayRemoteSync(request *TriggerGatewayRemoteSyncRequest) (response *TriggerGatewayRemoteSyncResponse, err error) { + response = CreateTriggerGatewayRemoteSyncResponse() + err = client.DoAction(request, response) + return +} + +// TriggerGatewayRemoteSyncWithChan invokes the sgw.TriggerGatewayRemoteSync API asynchronously +func (client *Client) TriggerGatewayRemoteSyncWithChan(request *TriggerGatewayRemoteSyncRequest) (<-chan *TriggerGatewayRemoteSyncResponse, <-chan error) { + responseChan := make(chan *TriggerGatewayRemoteSyncResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.TriggerGatewayRemoteSync(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// TriggerGatewayRemoteSyncWithCallback invokes the sgw.TriggerGatewayRemoteSync API asynchronously +func (client *Client) TriggerGatewayRemoteSyncWithCallback(request *TriggerGatewayRemoteSyncRequest, callback func(response *TriggerGatewayRemoteSyncResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *TriggerGatewayRemoteSyncResponse + var err error + defer close(result) + response, err = client.TriggerGatewayRemoteSync(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// TriggerGatewayRemoteSyncRequest is the request struct for api TriggerGatewayRemoteSync +type TriggerGatewayRemoteSyncRequest struct { + *requests.RpcRequest + Path string `position:"Query" name:"Path"` + SecurityToken string `position:"Query" name:"SecurityToken"` + IndexId string `position:"Query" name:"IndexId"` + GatewayId string `position:"Query" name:"GatewayId"` +} + +// TriggerGatewayRemoteSyncResponse is the response struct for api TriggerGatewayRemoteSync +type TriggerGatewayRemoteSyncResponse struct { + *responses.BaseResponse + Code string `json:"Code" xml:"Code"` + Message string `json:"Message" xml:"Message"` + RequestId string `json:"RequestId" xml:"RequestId"` + TaskId string `json:"TaskId" xml:"TaskId"` + Success bool `json:"Success" xml:"Success"` +} + +// CreateTriggerGatewayRemoteSyncRequest creates a request to invoke TriggerGatewayRemoteSync API +func CreateTriggerGatewayRemoteSyncRequest() (request *TriggerGatewayRemoteSyncRequest) { + request = &TriggerGatewayRemoteSyncRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("sgw", "2018-05-11", "TriggerGatewayRemoteSync", "hcs_sgw", "openAPI") + request.Method = requests.POST + return +} + +// CreateTriggerGatewayRemoteSyncResponse creates a response to parse from TriggerGatewayRemoteSync response +func CreateTriggerGatewayRemoteSyncResponse() (response *TriggerGatewayRemoteSyncResponse) { + response = &TriggerGatewayRemoteSyncResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/sgw/update_gateway_file_share.go b/services/sgw/update_gateway_file_share.go index 113f1dcefd..4cd9d57430 100644 --- a/services/sgw/update_gateway_file_share.go +++ b/services/sgw/update_gateway_file_share.go @@ -77,6 +77,7 @@ type UpdateGatewayFileShareRequest struct { ReadWriteUserList string `position:"Query" name:"ReadWriteUserList"` PollingInterval requests.Integer `position:"Query" name:"PollingInterval"` ReadWriteClientList string `position:"Query" name:"ReadWriteClientList"` + BypassCacheRead requests.Boolean `position:"Query" name:"BypassCacheRead"` BackendLimit requests.Integer `position:"Query" name:"BackendLimit"` Squash string `position:"Query" name:"Squash"` ReadOnlyClientList string `position:"Query" name:"ReadOnlyClientList"` @@ -107,11 +108,11 @@ type UpdateGatewayFileShareRequest struct { // UpdateGatewayFileShareResponse is the response struct for api UpdateGatewayFileShare type UpdateGatewayFileShareResponse struct { *responses.BaseResponse + TaskId string `json:"TaskId" xml:"TaskId"` + Message string `json:"Message" xml:"Message"` RequestId string `json:"RequestId" xml:"RequestId"` - Success bool `json:"Success" xml:"Success"` Code string `json:"Code" xml:"Code"` - Message string `json:"Message" xml:"Message"` - TaskId string `json:"TaskId" xml:"TaskId"` + Success bool `json:"Success" xml:"Success"` } // CreateUpdateGatewayFileShareRequest creates a request to invoke UpdateGatewayFileShare API