...

Source file src/github.com/redhat-developer/odo/pkg/apiserver-gen/go/model__devstate_quantity_valid_post_request.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 DevstateQuantityValidPostRequest struct {
    13  	Quantity string `json:"quantity"`
    14  }
    15  
    16  // AssertDevstateQuantityValidPostRequestRequired checks if the required fields are not zero-ed
    17  func AssertDevstateQuantityValidPostRequestRequired(obj DevstateQuantityValidPostRequest) error {
    18  	elements := map[string]interface{}{
    19  		"quantity": obj.Quantity,
    20  	}
    21  	for name, el := range elements {
    22  		if isZero := IsZeroValue(el); isZero {
    23  			return &RequiredError{Field: name}
    24  		}
    25  	}
    26  
    27  	return nil
    28  }
    29  
    30  // AssertRecurseDevstateQuantityValidPostRequestRequired recursively checks if required fields are not zero-ed in a nested slice.
    31  // Accepts only nested slice of DevstateQuantityValidPostRequest (e.g. [][]DevstateQuantityValidPostRequest), otherwise ErrTypeAssertionError is thrown.
    32  func AssertRecurseDevstateQuantityValidPostRequestRequired(objSlice interface{}) error {
    33  	return AssertRecurseInterfaceRequired(objSlice, func(obj interface{}) error {
    34  		aDevstateQuantityValidPostRequest, ok := obj.(DevstateQuantityValidPostRequest)
    35  		if !ok {
    36  			return ErrTypeAssertionError
    37  		}
    38  		return AssertDevstateQuantityValidPostRequestRequired(aDevstateQuantityValidPostRequest)
    39  	})
    40  }
    41  

View as plain text