...

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

View as plain text