github.com/cloudwan/edgelq-sdk@v1.15.4/limits/client/v1alpha2/plan_assignment_request/plan_assignment_request_custom.pb.validate.go (about)

     1  // Code generated by protoc-gen-goten-validate
     2  // File: edgelq/limits/proto/v1alpha2/plan_assignment_request_custom.proto
     3  // DO NOT EDIT!!!
     4  
     5  package plan_assignment_request_client
     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  	iam_organization "github.com/cloudwan/edgelq-sdk/iam/resources/v1alpha2/organization"
    24  	iam_project "github.com/cloudwan/edgelq-sdk/iam/resources/v1alpha2/project"
    25  	accepted_plan "github.com/cloudwan/edgelq-sdk/limits/resources/v1alpha2/accepted_plan"
    26  	plan_assignment_request "github.com/cloudwan/edgelq-sdk/limits/resources/v1alpha2/plan_assignment_request"
    27  	view "github.com/cloudwan/goten-sdk/types/view"
    28  	fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb"
    29  )
    30  
    31  var (
    32  	_ = bytes.Equal
    33  	_ = errors.New
    34  	_ = fmt.Errorf
    35  	_ = net.ParseIP
    36  	_ = regexp.Match
    37  	_ = strings.Split
    38  	_ = time.Now
    39  	_ = utf8.RuneCountInString
    40  	_ = url.Parse
    41  	_ = gotenvalidate.NewValidationError
    42  )
    43  
    44  // make sure we're using proto imports
    45  var (
    46  	_ = &iam_organization.Organization{}
    47  	_ = &iam_project.Project{}
    48  	_ = &accepted_plan.AcceptedPlan{}
    49  	_ = &plan_assignment_request.PlanAssignmentRequest{}
    50  	_ = &fieldmaskpb.FieldMask{}
    51  	_ = view.View(0)
    52  )
    53  
    54  func (obj *ListApproverPlanAssignmentRequestsRequest) GotenValidate() error {
    55  	if obj == nil {
    56  		return nil
    57  	}
    58  	if !(obj.PageSize >= 0) {
    59  		return gotenvalidate.NewValidationError("ListApproverPlanAssignmentRequestsRequest", "pageSize", obj.PageSize, "field must be greater or equal to 0", nil)
    60  	}
    61  	if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok {
    62  		return cvobj.GotenCustomValidate()
    63  	}
    64  	return nil
    65  }
    66  func (obj *AcceptPlanAssignmentRequest) GotenValidate() error {
    67  	if obj == nil {
    68  		return nil
    69  	}
    70  	if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok {
    71  		return cvobj.GotenCustomValidate()
    72  	}
    73  	return nil
    74  }
    75  func (obj *AcceptPlanAssignmentResponse) GotenValidate() error {
    76  	if obj == nil {
    77  		return nil
    78  	}
    79  	if subobj, ok := interface{}(obj.AcceptedPlan).(gotenvalidate.Validator); ok {
    80  		if err := subobj.GotenValidate(); err != nil {
    81  			return gotenvalidate.NewValidationError("AcceptPlanAssignmentResponse", "acceptedPlan", obj.AcceptedPlan, "nested object validation failed", err)
    82  		}
    83  	}
    84  	if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok {
    85  		return cvobj.GotenCustomValidate()
    86  	}
    87  	return nil
    88  }
    89  func (obj *DeclinePlanAssignmentRequest) GotenValidate() error {
    90  	if obj == nil {
    91  		return nil
    92  	}
    93  	if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok {
    94  		return cvobj.GotenCustomValidate()
    95  	}
    96  	return nil
    97  }
    98  func (obj *DeclinePlanAssignmentResponse) GotenValidate() error {
    99  	if obj == nil {
   100  		return nil
   101  	}
   102  	if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok {
   103  		return cvobj.GotenCustomValidate()
   104  	}
   105  	return nil
   106  }