github.com/hashicorp/hcp-sdk-go@v0.94.0/clients/cloud-vault-secrets/preview/2023-11-28/models/common_pagination_response.go (about)

     1  // Code generated by go-swagger; DO NOT EDIT.
     2  
     3  package models
     4  
     5  // This file was generated by the swagger tool.
     6  // Editing this file might prove futile when you re-run the swagger generate command
     7  
     8  import (
     9  	"context"
    10  
    11  	"github.com/go-openapi/strfmt"
    12  	"github.com/go-openapi/swag"
    13  )
    14  
    15  // CommonPaginationResponse PaginationResponse is the response holding the page tokens for a paginated
    16  // list response.
    17  //
    18  // swagger:model commonPaginationResponse
    19  type CommonPaginationResponse struct {
    20  
    21  	// This token allows you to get the next page of results for list requests.
    22  	// If the number of results is larger than `page_size`, use the
    23  	// `next_page_token` as a value for the query parameter `next_page_token` in
    24  	// the next request. The value will become empty when there are no more pages.
    25  	NextPageToken string `json:"next_page_token,omitempty"`
    26  
    27  	// This token allows you to get the previous page of results for list
    28  	// requests. If the number of results is larger than `page_size`, use the
    29  	// `previous_page_token` as a value for the query parameter
    30  	// `previous_page_token` in the next request. The value will become empty when
    31  	// there are no more pages.
    32  	PreviousPageToken string `json:"previous_page_token,omitempty"`
    33  }
    34  
    35  // Validate validates this common pagination response
    36  func (m *CommonPaginationResponse) Validate(formats strfmt.Registry) error {
    37  	return nil
    38  }
    39  
    40  // ContextValidate validates this common pagination response based on context it is used
    41  func (m *CommonPaginationResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
    42  	return nil
    43  }
    44  
    45  // MarshalBinary interface implementation
    46  func (m *CommonPaginationResponse) MarshalBinary() ([]byte, error) {
    47  	if m == nil {
    48  		return nil, nil
    49  	}
    50  	return swag.WriteJSON(m)
    51  }
    52  
    53  // UnmarshalBinary interface implementation
    54  func (m *CommonPaginationResponse) UnmarshalBinary(b []byte) error {
    55  	var res CommonPaginationResponse
    56  	if err := swag.ReadJSON(b, &res); err != nil {
    57  		return err
    58  	}
    59  	*m = res
    60  	return nil
    61  }