block_object_request_model.go raw

   1  // This file is auto-generated, don't edit it. Thanks.
   2  package client
   3  
   4  import (
   5  	"github.com/alibabacloud-go/tea/dara"
   6  )
   7  
   8  type iBlockObjectRequest interface {
   9  	dara.Model
  10  	String() string
  11  	GoString() string
  12  	SetContent(v []*string) *BlockObjectRequest
  13  	GetContent() []*string
  14  	SetExtension(v string) *BlockObjectRequest
  15  	GetExtension() *string
  16  	SetMaxage(v int32) *BlockObjectRequest
  17  	GetMaxage() *int32
  18  	SetSiteId(v int64) *BlockObjectRequest
  19  	GetSiteId() *int64
  20  	SetType(v string) *BlockObjectRequest
  21  	GetType() *string
  22  }
  23  
  24  type BlockObjectRequest struct {
  25  	// The content to block.
  26  	//
  27  	// This parameter is required.
  28  	Content []*string `json:"Content,omitempty" xml:"Content,omitempty" type:"Repeated"`
  29  	// The blocking period that you can extend. Set the value to 2year.
  30  	//
  31  	// example:
  32  	//
  33  	// 2year
  34  	Extension *string `json:"Extension,omitempty" xml:"Extension,omitempty"`
  35  	// The period of time during which the URL is blocked. Unit: seconds. Specify this parameter if Type is set to block.
  36  	//
  37  	// example:
  38  	//
  39  	// 864000
  40  	Maxage *int32 `json:"Maxage,omitempty" xml:"Maxage,omitempty"`
  41  	// The website ID, which can be obtained by calling the [ListSites](https://help.aliyun.com/document_detail/2850189.html) operation.
  42  	//
  43  	// This parameter is required.
  44  	//
  45  	// example:
  46  	//
  47  	// BlockObject
  48  	SiteId *int64 `json:"SiteId,omitempty" xml:"SiteId,omitempty"`
  49  	// The type. Valid values:
  50  	//
  51  	// 	- **block**
  52  	//
  53  	// 	- **unblock**
  54  	//
  55  	// This parameter is required.
  56  	//
  57  	// example:
  58  	//
  59  	// block
  60  	Type *string `json:"Type,omitempty" xml:"Type,omitempty"`
  61  }
  62  
  63  func (s BlockObjectRequest) String() string {
  64  	return dara.Prettify(s)
  65  }
  66  
  67  func (s BlockObjectRequest) GoString() string {
  68  	return s.String()
  69  }
  70  
  71  func (s *BlockObjectRequest) GetContent() []*string {
  72  	return s.Content
  73  }
  74  
  75  func (s *BlockObjectRequest) GetExtension() *string {
  76  	return s.Extension
  77  }
  78  
  79  func (s *BlockObjectRequest) GetMaxage() *int32 {
  80  	return s.Maxage
  81  }
  82  
  83  func (s *BlockObjectRequest) GetSiteId() *int64 {
  84  	return s.SiteId
  85  }
  86  
  87  func (s *BlockObjectRequest) GetType() *string {
  88  	return s.Type
  89  }
  90  
  91  func (s *BlockObjectRequest) SetContent(v []*string) *BlockObjectRequest {
  92  	s.Content = v
  93  	return s
  94  }
  95  
  96  func (s *BlockObjectRequest) SetExtension(v string) *BlockObjectRequest {
  97  	s.Extension = &v
  98  	return s
  99  }
 100  
 101  func (s *BlockObjectRequest) SetMaxage(v int32) *BlockObjectRequest {
 102  	s.Maxage = &v
 103  	return s
 104  }
 105  
 106  func (s *BlockObjectRequest) SetSiteId(v int64) *BlockObjectRequest {
 107  	s.SiteId = &v
 108  	return s
 109  }
 110  
 111  func (s *BlockObjectRequest) SetType(v string) *BlockObjectRequest {
 112  	s.Type = &v
 113  	return s
 114  }
 115  
 116  func (s *BlockObjectRequest) Validate() error {
 117  	return dara.Validate(s)
 118  }
 119