github.com/cloudwan/edgelq-sdk@v1.15.4/devices/resources/v1/customized_image/customized_image.pb.validate.go (about)

     1  // Code generated by protoc-gen-goten-validate
     2  // File: edgelq/devices/proto/v1/customized_image.proto
     3  // DO NOT EDIT!!!
     4  
     5  package customized_image
     6  
     7  import (
     8  	"bytes"
     9  	"errors"
    10  	"fmt"
    11  	"net"
    12  	"net/url"
    13  	"regexp"
    14  	"strings"
    15  	"time"
    16  	"unicode/utf8"
    17  
    18  	gotenvalidate "github.com/cloudwan/goten-sdk/runtime/validate"
    19  )
    20  
    21  // proto imports
    22  import (
    23  	os_version "github.com/cloudwan/edgelq-sdk/devices/resources/v1/os_version"
    24  	project "github.com/cloudwan/edgelq-sdk/devices/resources/v1/project"
    25  	iam_service_account "github.com/cloudwan/edgelq-sdk/iam/resources/v1/service_account"
    26  	iam_service_account_key "github.com/cloudwan/edgelq-sdk/iam/resources/v1/service_account_key"
    27  	meta "github.com/cloudwan/goten-sdk/types/meta"
    28  )
    29  
    30  var (
    31  	_ = bytes.Equal
    32  	_ = errors.New
    33  	_ = fmt.Errorf
    34  	_ = net.ParseIP
    35  	_ = regexp.Match
    36  	_ = strings.Split
    37  	_ = time.Now
    38  	_ = utf8.RuneCountInString
    39  	_ = url.Parse
    40  	_ = gotenvalidate.NewValidationError
    41  )
    42  
    43  // make sure we're using proto imports
    44  var (
    45  	_ = &os_version.OsVersion{}
    46  	_ = &project.Project{}
    47  	_ = &iam_service_account.ServiceAccount{}
    48  	_ = &iam_service_account_key.ServiceAccountKey{}
    49  	_ = &meta.Meta{}
    50  )
    51  
    52  func (obj *CustomizedImage) GotenValidate() error {
    53  	if obj == nil {
    54  		return nil
    55  	}
    56  	if subobj, ok := interface{}(obj.Metadata).(gotenvalidate.Validator); ok {
    57  		if err := subobj.GotenValidate(); err != nil {
    58  			return gotenvalidate.NewValidationError("CustomizedImage", "metadata", obj.Metadata, "nested object validation failed", err)
    59  		}
    60  	}
    61  	if subobj, ok := interface{}(obj.Spec).(gotenvalidate.Validator); ok {
    62  		if err := subobj.GotenValidate(); err != nil {
    63  			return gotenvalidate.NewValidationError("CustomizedImage", "spec", obj.Spec, "nested object validation failed", err)
    64  		}
    65  	}
    66  	if subobj, ok := interface{}(obj.Status).(gotenvalidate.Validator); ok {
    67  		if err := subobj.GotenValidate(); err != nil {
    68  			return gotenvalidate.NewValidationError("CustomizedImage", "status", obj.Status, "nested object validation failed", err)
    69  		}
    70  	}
    71  	if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok {
    72  		return cvobj.GotenCustomValidate()
    73  	}
    74  	return nil
    75  }
    76  func (obj *CustomizedImage_Spec) GotenValidate() error {
    77  	if obj == nil {
    78  		return nil
    79  	}
    80  	if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok {
    81  		return cvobj.GotenCustomValidate()
    82  	}
    83  	return nil
    84  }
    85  func (obj *CustomizedImage_Status) GotenValidate() error {
    86  	if obj == nil {
    87  		return nil
    88  	}
    89  	if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok {
    90  		return cvobj.GotenCustomValidate()
    91  	}
    92  	return nil
    93  }