From 24b87dfacbd84f3b7501e9f4a581f5268e074ee0 Mon Sep 17 00:00:00 2001 From: "Cuong. Duong Manh" Date: Sat, 24 Aug 2024 23:05:13 +0700 Subject: [PATCH] [chore] add some field into the api create endpoint --- vngcloud/services/network/v1/endpoint_request.go | 15 +++++++++++++++ vngcloud/services/network/v1/irequest.go | 3 +++ 2 files changed, 18 insertions(+) diff --git a/vngcloud/services/network/v1/endpoint_request.go b/vngcloud/services/network/v1/endpoint_request.go index e2771d9..8236500 100644 --- a/vngcloud/services/network/v1/endpoint_request.go +++ b/vngcloud/services/network/v1/endpoint_request.go @@ -136,6 +136,21 @@ func (s *CreateEndpointRequest) WithDescription(pdesp string) ICreateEndpointReq return s } +func (s *CreateEndpointRequest) WithPoc(pyes bool) ICreateEndpointRequest { + s.ResourceInfo.IsPoc = pyes + return s +} + +func (s *CreateEndpointRequest) WithBuyMorePoc(pyes bool) ICreateEndpointRequest { + s.ResourceInfo.IsBuyMorePoc = pyes + return s +} + +func (s *CreateEndpointRequest) WithEnableAutoRenew(pyes bool) ICreateEndpointRequest { + s.ResourceInfo.IsEnableAutoRenew = pyes + return s +} + type DeleteEndpointByIdRequest struct { EndpointServiceUuid string `json:"endpointServiceUuid"` EndpointUuid string `json:"endpointUuid"` diff --git a/vngcloud/services/network/v1/irequest.go b/vngcloud/services/network/v1/irequest.go index 9869b5c..24aa0ba 100644 --- a/vngcloud/services/network/v1/irequest.go +++ b/vngcloud/services/network/v1/irequest.go @@ -16,6 +16,9 @@ type ICreateEndpointRequest interface { WithServiceUuid(pserviceUuid string) ICreateEndpointRequest WithCategoryUuid(pcategoryUuid string) ICreateEndpointRequest WithEndpointName(pendpointName string) ICreateEndpointRequest + WithPoc(pyes bool) ICreateEndpointRequest + WithBuyMorePoc(pyes bool) ICreateEndpointRequest + WithEnableAutoRenew(pyes bool) ICreateEndpointRequest AddUserAgent(pagent ...string) ICreateEndpointRequest }