github.com/cilium/cilium@v1.16.2/api/v1/models/policy_trace_result.go (about)

     1  // Code generated by go-swagger; DO NOT EDIT.
     2  
     3  // Copyright Authors of Cilium
     4  // SPDX-License-Identifier: Apache-2.0
     5  
     6  package models
     7  
     8  // This file was generated by the swagger tool.
     9  // Editing this file might prove futile when you re-run the swagger generate command
    10  
    11  import (
    12  	"context"
    13  
    14  	"github.com/go-openapi/strfmt"
    15  	"github.com/go-openapi/swag"
    16  )
    17  
    18  // PolicyTraceResult Response to a policy resolution process
    19  //
    20  // swagger:model PolicyTraceResult
    21  type PolicyTraceResult struct {
    22  
    23  	// log
    24  	Log string `json:"log,omitempty"`
    25  
    26  	// verdict
    27  	Verdict string `json:"verdict,omitempty"`
    28  }
    29  
    30  // Validate validates this policy trace result
    31  func (m *PolicyTraceResult) Validate(formats strfmt.Registry) error {
    32  	return nil
    33  }
    34  
    35  // ContextValidate validates this policy trace result based on context it is used
    36  func (m *PolicyTraceResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
    37  	return nil
    38  }
    39  
    40  // MarshalBinary interface implementation
    41  func (m *PolicyTraceResult) MarshalBinary() ([]byte, error) {
    42  	if m == nil {
    43  		return nil, nil
    44  	}
    45  	return swag.WriteJSON(m)
    46  }
    47  
    48  // UnmarshalBinary interface implementation
    49  func (m *PolicyTraceResult) UnmarshalBinary(b []byte) error {
    50  	var res PolicyTraceResult
    51  	if err := swag.ReadJSON(b, &res); err != nil {
    52  		return err
    53  	}
    54  	*m = res
    55  	return nil
    56  }