...

Source file src/github.com/redhat-developer/odo/pkg/apiserver-gen/go/model__devstate_chart_get_200_response.go

Documentation: github.com/redhat-developer/odo/pkg/apiserver-gen/go

     1  /*
     2   * odo dev
     3   *
     4   * API interface for 'odo dev'
     5   *
     6   * API version: 0.1
     7   * Generated by: OpenAPI Generator (https://openapi-generator.tech)
     8   */
     9  
    10  package openapi
    11  
    12  type DevstateChartGet200Response struct {
    13  
    14  	// chart in mermaid format
    15  	Chart string `json:"chart"`
    16  }
    17  
    18  // AssertDevstateChartGet200ResponseRequired checks if the required fields are not zero-ed
    19  func AssertDevstateChartGet200ResponseRequired(obj DevstateChartGet200Response) error {
    20  	elements := map[string]interface{}{
    21  		"chart": obj.Chart,
    22  	}
    23  	for name, el := range elements {
    24  		if isZero := IsZeroValue(el); isZero {
    25  			return &RequiredError{Field: name}
    26  		}
    27  	}
    28  
    29  	return nil
    30  }
    31  
    32  // AssertRecurseDevstateChartGet200ResponseRequired recursively checks if required fields are not zero-ed in a nested slice.
    33  // Accepts only nested slice of DevstateChartGet200Response (e.g. [][]DevstateChartGet200Response), otherwise ErrTypeAssertionError is thrown.
    34  func AssertRecurseDevstateChartGet200ResponseRequired(objSlice interface{}) error {
    35  	return AssertRecurseInterfaceRequired(objSlice, func(obj interface{}) error {
    36  		aDevstateChartGet200Response, ok := obj.(DevstateChartGet200Response)
    37  		if !ok {
    38  			return ErrTypeAssertionError
    39  		}
    40  		return AssertDevstateChartGet200ResponseRequired(aDevstateChartGet200Response)
    41  	})
    42  }
    43  

View as plain text