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

     1  // Code generated by protoc-gen-goten-validate
     2  // File: edgelq/limits/proto/v1/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/v1/organization"
    24  	iam_project "github.com/cloudwan/edgelq-sdk/iam/resources/v1/project"
    25  	accepted_plan "github.com/cloudwan/edgelq-sdk/limits/resources/v1/accepted_plan"
    26  	plan_assignment_request "github.com/cloudwan/edgelq-sdk/limits/resources/v1/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 *AcceptPlanAssignmentRequest) GotenValidate() error {
    55  	if obj == nil {
    56  		return nil
    57  	}
    58  	if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok {
    59  		return cvobj.GotenCustomValidate()
    60  	}
    61  	return nil
    62  }
    63  func (obj *AcceptPlanAssignmentResponse) GotenValidate() error {
    64  	if obj == nil {
    65  		return nil
    66  	}
    67  	if subobj, ok := interface{}(obj.AcceptedPlan).(gotenvalidate.Validator); ok {
    68  		if err := subobj.GotenValidate(); err != nil {
    69  			return gotenvalidate.NewValidationError("AcceptPlanAssignmentResponse", "acceptedPlan", obj.AcceptedPlan, "nested object validation failed", err)
    70  		}
    71  	}
    72  	if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok {
    73  		return cvobj.GotenCustomValidate()
    74  	}
    75  	return nil
    76  }
    77  func (obj *DeclinePlanAssignmentRequest) GotenValidate() error {
    78  	if obj == nil {
    79  		return nil
    80  	}
    81  	if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok {
    82  		return cvobj.GotenCustomValidate()
    83  	}
    84  	return nil
    85  }
    86  func (obj *DeclinePlanAssignmentResponse) GotenValidate() error {
    87  	if obj == nil {
    88  		return nil
    89  	}
    90  	if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok {
    91  		return cvobj.GotenCustomValidate()
    92  	}
    93  	return nil
    94  }
    95  func (obj *ListApproverPlanAssignmentRequestsRequest) GotenValidate() error {
    96  	if obj == nil {
    97  		return nil
    98  	}
    99  	if !(obj.PageSize >= 0) {
   100  		return gotenvalidate.NewValidationError("ListApproverPlanAssignmentRequestsRequest", "pageSize", obj.PageSize, "field must be greater or equal to 0", nil)
   101  	}
   102  	if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok {
   103  		return cvobj.GotenCustomValidate()
   104  	}
   105  	return nil
   106  }