github.com/sap/cf-mta-plugin@v2.6.3+incompatible/clients/models/metadata.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  	strfmt "github.com/go-openapi/strfmt"
    10  
    11  	"github.com/go-openapi/swag"
    12  )
    13  
    14  // Metadata metadata
    15  // swagger:model Metadata
    16  
    17  type Metadata struct {
    18  
    19  	// id
    20  	ID string `json:"id,omitempty"`
    21  
    22  	// namespace
    23  	// Read Only: true
    24  	Namespace string `json:"namespace,omitempty"`
    25  
    26  	// version
    27  	Version string `json:"version,omitempty"`
    28  }
    29  
    30  /* polymorph Metadata id false */
    31  
    32  /* polymorph Metadata version false */
    33  
    34  // Validate validates this metadata
    35  func (m *Metadata) Validate(formats strfmt.Registry) error {
    36  	return nil
    37  }
    38  
    39  // MarshalBinary interface implementation
    40  func (m *Metadata) MarshalBinary() ([]byte, error) {
    41  	if m == nil {
    42  		return nil, nil
    43  	}
    44  	return swag.WriteJSON(m)
    45  }
    46  
    47  // UnmarshalBinary interface implementation
    48  func (m *Metadata) UnmarshalBinary(b []byte) error {
    49  	var res Metadata
    50  	if err := swag.ReadJSON(b, &res); err != nil {
    51  		return err
    52  	}
    53  	*m = res
    54  	return nil
    55  }