github.com/minio/console@v1.3.0/models/max_share_link_exp_response.go (about)

     1  // Code generated by go-swagger; DO NOT EDIT.
     2  
     3  // This file is part of MinIO Console Server
     4  // Copyright (c) 2023 MinIO, Inc.
     5  //
     6  // This program is free software: you can redistribute it and/or modify
     7  // it under the terms of the GNU Affero General Public License as published by
     8  // the Free Software Foundation, either version 3 of the License, or
     9  // (at your option) any later version.
    10  //
    11  // This program is distributed in the hope that it will be useful,
    12  // but WITHOUT ANY WARRANTY; without even the implied warranty of
    13  // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    14  // GNU Affero General Public License for more details.
    15  //
    16  // You should have received a copy of the GNU Affero General Public License
    17  // along with this program.  If not, see <http://www.gnu.org/licenses/>.
    18  //
    19  
    20  package models
    21  
    22  // This file was generated by the swagger tool.
    23  // Editing this file might prove futile when you re-run the swagger generate command
    24  
    25  import (
    26  	"context"
    27  
    28  	"github.com/go-openapi/errors"
    29  	"github.com/go-openapi/strfmt"
    30  	"github.com/go-openapi/swag"
    31  	"github.com/go-openapi/validate"
    32  )
    33  
    34  // MaxShareLinkExpResponse max share link exp response
    35  //
    36  // swagger:model maxShareLinkExpResponse
    37  type MaxShareLinkExpResponse struct {
    38  
    39  	// exp
    40  	// Required: true
    41  	Exp *int64 `json:"exp"`
    42  }
    43  
    44  // Validate validates this max share link exp response
    45  func (m *MaxShareLinkExpResponse) Validate(formats strfmt.Registry) error {
    46  	var res []error
    47  
    48  	if err := m.validateExp(formats); err != nil {
    49  		res = append(res, err)
    50  	}
    51  
    52  	if len(res) > 0 {
    53  		return errors.CompositeValidationError(res...)
    54  	}
    55  	return nil
    56  }
    57  
    58  func (m *MaxShareLinkExpResponse) validateExp(formats strfmt.Registry) error {
    59  
    60  	if err := validate.Required("exp", "body", m.Exp); err != nil {
    61  		return err
    62  	}
    63  
    64  	return nil
    65  }
    66  
    67  // ContextValidate validates this max share link exp response based on context it is used
    68  func (m *MaxShareLinkExpResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
    69  	return nil
    70  }
    71  
    72  // MarshalBinary interface implementation
    73  func (m *MaxShareLinkExpResponse) MarshalBinary() ([]byte, error) {
    74  	if m == nil {
    75  		return nil, nil
    76  	}
    77  	return swag.WriteJSON(m)
    78  }
    79  
    80  // UnmarshalBinary interface implementation
    81  func (m *MaxShareLinkExpResponse) UnmarshalBinary(b []byte) error {
    82  	var res MaxShareLinkExpResponse
    83  	if err := swag.ReadJSON(b, &res); err != nil {
    84  		return err
    85  	}
    86  	*m = res
    87  	return nil
    88  }