| 1 | package azblobscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/ |
| 2 | |
| 3 | // Code generated by Microsoft (R) AutoRest Code Generator. |
| 4 | // Changes may cause incorrect behavior and will be lost if the code is regenerated. |
| 5 | |
| 6 | import ( |
| 7 | "fmtscip-go gomod github.com/golang/go/src go1.15 fmt/" |
| 8 | "github.com/Azure/azure-pipeline-go/pipelinescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/" |
| 9 | "reflectscip-go gomod github.com/golang/go/src go1.15 reflect/" |
| 10 | "regexpscip-go gomod github.com/golang/go/src go1.15 regexp/" |
| 11 | "stringsscip-go gomod github.com/golang/go/src go1.15 strings/" |
| 12 | ) |
| 13 | |
| 14 | // Constraint stores constraint name, target field name |
| 15 | // Rule and chain validations. |
| 16 | type constraintscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint# struct { |
| 17 | // Target field name for validation. |
| 18 | targetscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#target. string |
| 19 | |
| 20 | // Constraint name e.g. minLength, MaxLength, Pattern, etc. |
| 21 | namescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#name. string |
| 22 | |
| 23 | // Rule for constraint e.g. greater than 10, less than 5 etc. |
| 24 | rulescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#rule. interface{} |
| 25 | |
| 26 | // Chain validations for struct type |
| 27 | chainscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#chain. []constraintscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint# |
| 28 | } |
| 29 | |
| 30 | // Validation stores parameter-wise validation. |
| 31 | type validationscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validation# struct { |
| 32 | targetValuescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validation#targetValue. interface{} |
| 33 | constraintsscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validation#constraints. []constraintscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint# |
| 34 | } |
| 35 | |
| 36 | // Constraint list |
| 37 | const ( |
| 38 | emptyscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/empty. = "Empty" |
| 39 | nullscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/null. = "Null" |
| 40 | readOnlyscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/readOnly. = "ReadOnly" |
| 41 | patternscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/pattern. = "Pattern" |
| 42 | maxLengthscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/maxLength. = "MaxLength" |
| 43 | minLengthscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/minLength. = "MinLength" |
| 44 | maxItemsscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/maxItems. = "MaxItems" |
| 45 | minItemsscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/minItems. = "MinItems" |
| 46 | multipleOfscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/multipleOf. = "MultipleOf" |
| 47 | uniqueItemsscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/uniqueItems. = "UniqueItems" |
| 48 | inclusiveMaximumscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/inclusiveMaximum. = "InclusiveMaximum" |
| 49 | exclusiveMaximumscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/exclusiveMaximum. = "ExclusiveMaximum" |
| 50 | exclusiveMinimumscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/exclusiveMinimum. = "ExclusiveMinimum" |
| 51 | inclusiveMinimumscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/inclusiveMinimum. = "InclusiveMinimum" |
| 52 | ) |
| 53 | |
| 54 | // Validate method validates constraints on parameter |
| 55 | // passed in validation array. |
| 56 | func validatescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validate().(m []validationscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validation#) error { |
| 57 | for _, item := range m { |
| 58 | v := reflectscip-go gomod github.com/golang/go/src go1.15 reflect/.ValueOfscip-go gomod github.com/golang/go/src go1.15 reflect/ValueOf().(item.targetValuescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validation#targetValue.) |
| 59 | for _, constraint := range item.constraintsscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validation#constraints. { |
| 60 | var err error |
| 61 | switch v.Kindscip-go gomod github.com/golang/go/src go1.15 reflect/Value#Kind().() { |
| 62 | case reflectscip-go gomod github.com/golang/go/src go1.15 reflect/.Ptrscip-go gomod github.com/golang/go/src go1.15 reflect/Ptr.: |
| 63 | err = validatePtrscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validatePtr().(v, constraint) |
| 64 | case reflectscip-go gomod github.com/golang/go/src go1.15 reflect/.Stringscip-go gomod github.com/golang/go/src go1.15 reflect/String.: |
| 65 | err = validateStringscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validateString().(v, constraint) |
| 66 | case reflectscip-go gomod github.com/golang/go/src go1.15 reflect/.Structscip-go gomod github.com/golang/go/src go1.15 reflect/Struct.: |
| 67 | err = validateStructscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validateStruct().(v, constraint) |
| 68 | case reflectscip-go gomod github.com/golang/go/src go1.15 reflect/.Intscip-go gomod github.com/golang/go/src go1.15 reflect/Int., reflectscip-go gomod github.com/golang/go/src go1.15 reflect/.Int8scip-go gomod github.com/golang/go/src go1.15 reflect/Int8., reflectscip-go gomod github.com/golang/go/src go1.15 reflect/.Int16scip-go gomod github.com/golang/go/src go1.15 reflect/Int16., reflectscip-go gomod github.com/golang/go/src go1.15 reflect/.Int32scip-go gomod github.com/golang/go/src go1.15 reflect/Int32., reflectscip-go gomod github.com/golang/go/src go1.15 reflect/.Int64scip-go gomod github.com/golang/go/src go1.15 reflect/Int64.: |
| 69 | err = validateIntscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validateInt().(v, constraint) |
| 70 | case reflectscip-go gomod github.com/golang/go/src go1.15 reflect/.Float32scip-go gomod github.com/golang/go/src go1.15 reflect/Float32., reflectscip-go gomod github.com/golang/go/src go1.15 reflect/.Float64scip-go gomod github.com/golang/go/src go1.15 reflect/Float64.: |
| 71 | err = validateFloatscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validateFloat().(v, constraint) |
| 72 | case reflectscip-go gomod github.com/golang/go/src go1.15 reflect/.Arrayscip-go gomod github.com/golang/go/src go1.15 reflect/Array., reflectscip-go gomod github.com/golang/go/src go1.15 reflect/.Slicescip-go gomod github.com/golang/go/src go1.15 reflect/Slice., reflectscip-go gomod github.com/golang/go/src go1.15 reflect/.Mapscip-go gomod github.com/golang/go/src go1.15 reflect/Map.: |
| 73 | err = validateArrayMapscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validateArrayMap().(v, constraint) |
| 74 | default: |
| 75 | err = createErrorscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/createError().(v, constraint, fmtscip-go gomod github.com/golang/go/src go1.15 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.15 fmt/Sprintf().("unknown type %v", v.Kindscip-go gomod github.com/golang/go/src go1.15 reflect/Value#Kind().())) |
| 76 | } |
| 77 | if err != nil { |
| 78 | return err |
| 79 | } |
| 80 | } |
| 81 | } |
| 82 | return nil |
| 83 | } |
| 84 | |
| 85 | func validateStructscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validateStruct().(x reflectscip-go gomod github.com/golang/go/src go1.15 reflect/.Valuescip-go gomod github.com/golang/go/src go1.15 reflect/Value#, v constraintscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#, name ...string) error { |
| 86 | //Get field name from target name which is in format a.b.c |
| 87 | s := stringsscip-go gomod github.com/golang/go/src go1.15 strings/.Splitscip-go gomod github.com/golang/go/src go1.15 strings/Split().(v.targetscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#target., ".") |
| 88 | f := x.FieldByNamescip-go gomod github.com/golang/go/src go1.15 reflect/Value#FieldByName().(s[len(s)-1]) |
| 89 | if isZeroscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/isZero().(f) { |
| 90 | return createErrorscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/createError().(x, v, fmtscip-go gomod github.com/golang/go/src go1.15 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.15 fmt/Sprintf().("field %q doesn't exist", v.targetscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#target.)) |
| 91 | } |
| 92 | err := validatescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validate().([]validationscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validation#{ |
| 93 | { |
| 94 | targetValuescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validation#targetValue.: getInterfaceValuescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/getInterfaceValue().(f), |
| 95 | constraintsscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validation#constraints.: []constraintscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#{v}, |
| 96 | }, |
| 97 | }) |
| 98 | return err |
| 99 | } |
| 100 | |
| 101 | func validatePtrscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validatePtr().(x reflectscip-go gomod github.com/golang/go/src go1.15 reflect/.Valuescip-go gomod github.com/golang/go/src go1.15 reflect/Value#, v constraintscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#) error { |
| 102 | if v.namescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#name. == readOnlyscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/readOnly. { |
| 103 | if !x.IsNilscip-go gomod github.com/golang/go/src go1.15 reflect/Value#IsNil().() { |
| 104 | return createErrorscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/createError().(x.Elemscip-go gomod github.com/golang/go/src go1.15 reflect/Value#Elem().(), v, "readonly parameter; must send as nil or empty in request") |
| 105 | } |
| 106 | return nil |
| 107 | } |
| 108 | if x.IsNilscip-go gomod github.com/golang/go/src go1.15 reflect/Value#IsNil().() { |
| 109 | return checkNilscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/checkNil().(x, v) |
| 110 | } |
| 111 | if v.chainscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#chain. != nil { |
| 112 | return validatescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validate().([]validationscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validation#{ |
| 113 | { |
| 114 | targetValuescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validation#targetValue.: getInterfaceValuescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/getInterfaceValue().(x.Elemscip-go gomod github.com/golang/go/src go1.15 reflect/Value#Elem().()), |
| 115 | constraintsscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validation#constraints.: v.chainscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#chain., |
| 116 | }, |
| 117 | }) |
| 118 | } |
| 119 | return nil |
| 120 | } |
| 121 | |
| 122 | func validateIntscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validateInt().(x reflectscip-go gomod github.com/golang/go/src go1.15 reflect/.Valuescip-go gomod github.com/golang/go/src go1.15 reflect/Value#, v constraintscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#) error { |
| 123 | i := x.Intscip-go gomod github.com/golang/go/src go1.15 reflect/Value#Int().() |
| 124 | r, ok := v.rulescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#rule..(int) |
| 125 | if !ok { |
| 126 | return createErrorscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/createError().(x, v, fmtscip-go gomod github.com/golang/go/src go1.15 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.15 fmt/Sprintf().("rule must be integer value for %v constraint; got: %v", v.namescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#name., v.rulescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#rule.)) |
| 127 | } |
| 128 | switch v.namescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#name. { |
| 129 | case multipleOfscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/multipleOf.: |
| 130 | if i%int64(r) != 0 { |
| 131 | return createErrorscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/createError().(x, v, fmtscip-go gomod github.com/golang/go/src go1.15 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.15 fmt/Sprintf().("value must be a multiple of %v", r)) |
| 132 | } |
| 133 | case exclusiveMinimumscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/exclusiveMinimum.: |
| 134 | if i <= int64(r) { |
| 135 | return createErrorscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/createError().(x, v, fmtscip-go gomod github.com/golang/go/src go1.15 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.15 fmt/Sprintf().("value must be greater than %v", r)) |
| 136 | } |
| 137 | case exclusiveMaximumscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/exclusiveMaximum.: |
| 138 | if i >= int64(r) { |
| 139 | return createErrorscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/createError().(x, v, fmtscip-go gomod github.com/golang/go/src go1.15 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.15 fmt/Sprintf().("value must be less than %v", r)) |
| 140 | } |
| 141 | case inclusiveMinimumscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/inclusiveMinimum.: |
| 142 | if i < int64(r) { |
| 143 | return createErrorscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/createError().(x, v, fmtscip-go gomod github.com/golang/go/src go1.15 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.15 fmt/Sprintf().("value must be greater than or equal to %v", r)) |
| 144 | } |
| 145 | case inclusiveMaximumscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/inclusiveMaximum.: |
| 146 | if i > int64(r) { |
| 147 | return createErrorscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/createError().(x, v, fmtscip-go gomod github.com/golang/go/src go1.15 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.15 fmt/Sprintf().("value must be less than or equal to %v", r)) |
| 148 | } |
| 149 | default: |
| 150 | return createErrorscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/createError().(x, v, fmtscip-go gomod github.com/golang/go/src go1.15 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.15 fmt/Sprintf().("constraint %v is not applicable for type integer", v.namescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#name.)) |
| 151 | } |
| 152 | return nil |
| 153 | } |
| 154 | |
| 155 | func validateFloatscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validateFloat().(x reflectscip-go gomod github.com/golang/go/src go1.15 reflect/.Valuescip-go gomod github.com/golang/go/src go1.15 reflect/Value#, v constraintscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#) error { |
| 156 | f := x.Floatscip-go gomod github.com/golang/go/src go1.15 reflect/Value#Float().() |
| 157 | r, ok := v.rulescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#rule..(float64) |
| 158 | if !ok { |
| 159 | return createErrorscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/createError().(x, v, fmtscip-go gomod github.com/golang/go/src go1.15 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.15 fmt/Sprintf().("rule must be float value for %v constraint; got: %v", v.namescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#name., v.rulescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#rule.)) |
| 160 | } |
| 161 | switch v.namescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#name. { |
| 162 | case exclusiveMinimumscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/exclusiveMinimum.: |
| 163 | if f <= r { |
| 164 | return createErrorscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/createError().(x, v, fmtscip-go gomod github.com/golang/go/src go1.15 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.15 fmt/Sprintf().("value must be greater than %v", r)) |
| 165 | } |
| 166 | case exclusiveMaximumscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/exclusiveMaximum.: |
| 167 | if f >= r { |
| 168 | return createErrorscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/createError().(x, v, fmtscip-go gomod github.com/golang/go/src go1.15 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.15 fmt/Sprintf().("value must be less than %v", r)) |
| 169 | } |
| 170 | case inclusiveMinimumscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/inclusiveMinimum.: |
| 171 | if f < r { |
| 172 | return createErrorscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/createError().(x, v, fmtscip-go gomod github.com/golang/go/src go1.15 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.15 fmt/Sprintf().("value must be greater than or equal to %v", r)) |
| 173 | } |
| 174 | case inclusiveMaximumscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/inclusiveMaximum.: |
| 175 | if f > r { |
| 176 | return createErrorscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/createError().(x, v, fmtscip-go gomod github.com/golang/go/src go1.15 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.15 fmt/Sprintf().("value must be less than or equal to %v", r)) |
| 177 | } |
| 178 | default: |
| 179 | return createErrorscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/createError().(x, v, fmtscip-go gomod github.com/golang/go/src go1.15 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.15 fmt/Sprintf().("constraint %s is not applicable for type float", v.namescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#name.)) |
| 180 | } |
| 181 | return nil |
| 182 | } |
| 183 | |
| 184 | func validateStringscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validateString().(x reflectscip-go gomod github.com/golang/go/src go1.15 reflect/.Valuescip-go gomod github.com/golang/go/src go1.15 reflect/Value#, v constraintscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#) error { |
| 185 | s := x.Stringscip-go gomod github.com/golang/go/src go1.15 reflect/Value#String().() |
| 186 | switch v.namescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#name. { |
| 187 | case emptyscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/empty.: |
| 188 | if len(s) == 0 { |
| 189 | return checkEmptyscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/checkEmpty().(x, v) |
| 190 | } |
| 191 | case patternscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/pattern.: |
| 192 | reg, err := regexpscip-go gomod github.com/golang/go/src go1.15 regexp/.Compilescip-go gomod github.com/golang/go/src go1.15 regexp/Compile().(v.rulescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#rule..(string)) |
| 193 | if err != nil { |
| 194 | return createErrorscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/createError().(x, v, err.Error()) |
| 195 | } |
| 196 | if !reg.MatchStringscip-go gomod github.com/golang/go/src go1.15 regexp/Regexp#MatchString().(s) { |
| 197 | return createErrorscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/createError().(x, v, fmtscip-go gomod github.com/golang/go/src go1.15 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.15 fmt/Sprintf().("value doesn't match pattern %v", v.rulescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#rule.)) |
| 198 | } |
| 199 | case maxLengthscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/maxLength.: |
| 200 | if _, ok := v.rulescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#rule..(int); !ok { |
| 201 | return createErrorscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/createError().(x, v, fmtscip-go gomod github.com/golang/go/src go1.15 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.15 fmt/Sprintf().("rule must be integer value for %v constraint; got: %v", v.namescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#name., v.rulescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#rule.)) |
| 202 | } |
| 203 | if len(s) > v.rulescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#rule..(int) { |
| 204 | return createErrorscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/createError().(x, v, fmtscip-go gomod github.com/golang/go/src go1.15 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.15 fmt/Sprintf().("value length must be less than %v", v.rulescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#rule.)) |
| 205 | } |
| 206 | case minLengthscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/minLength.: |
| 207 | if _, ok := v.rulescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#rule..(int); !ok { |
| 208 | return createErrorscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/createError().(x, v, fmtscip-go gomod github.com/golang/go/src go1.15 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.15 fmt/Sprintf().("rule must be integer value for %v constraint; got: %v", v.namescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#name., v.rulescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#rule.)) |
| 209 | } |
| 210 | if len(s) < v.rulescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#rule..(int) { |
| 211 | return createErrorscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/createError().(x, v, fmtscip-go gomod github.com/golang/go/src go1.15 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.15 fmt/Sprintf().("value length must be greater than %v", v.rulescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#rule.)) |
| 212 | } |
| 213 | case readOnlyscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/readOnly.: |
| 214 | if len(s) > 0 { |
| 215 | return createErrorscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/createError().(reflectscip-go gomod github.com/golang/go/src go1.15 reflect/.ValueOfscip-go gomod github.com/golang/go/src go1.15 reflect/ValueOf().(s), v, "readonly parameter; must send as nil or empty in request") |
| 216 | } |
| 217 | default: |
| 218 | return createErrorscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/createError().(x, v, fmtscip-go gomod github.com/golang/go/src go1.15 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.15 fmt/Sprintf().("constraint %s is not applicable to string type", v.namescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#name.)) |
| 219 | } |
| 220 | if v.chainscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#chain. != nil { |
| 221 | return validatescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validate().([]validationscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validation#{ |
| 222 | { |
| 223 | targetValuescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validation#targetValue.: getInterfaceValuescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/getInterfaceValue().(x), |
| 224 | constraintsscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validation#constraints.: v.chainscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#chain., |
| 225 | }, |
| 226 | }) |
| 227 | } |
| 228 | return nil |
| 229 | } |
| 230 | |
| 231 | func validateArrayMapscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validateArrayMap().(x reflectscip-go gomod github.com/golang/go/src go1.15 reflect/.Valuescip-go gomod github.com/golang/go/src go1.15 reflect/Value#, v constraintscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#) error { |
| 232 | switch v.namescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#name. { |
| 233 | case nullscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/null.: |
| 234 | if x.IsNilscip-go gomod github.com/golang/go/src go1.15 reflect/Value#IsNil().() { |
| 235 | return checkNilscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/checkNil().(x, v) |
| 236 | } |
| 237 | case emptyscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/empty.: |
| 238 | if x.IsNilscip-go gomod github.com/golang/go/src go1.15 reflect/Value#IsNil().() || x.Lenscip-go gomod github.com/golang/go/src go1.15 reflect/Value#Len().() == 0 { |
| 239 | return checkEmptyscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/checkEmpty().(x, v) |
| 240 | } |
| 241 | case maxItemsscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/maxItems.: |
| 242 | if _, ok := v.rulescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#rule..(int); !ok { |
| 243 | return createErrorscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/createError().(x, v, fmtscip-go gomod github.com/golang/go/src go1.15 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.15 fmt/Sprintf().("rule must be integer for %v constraint; got: %v", v.namescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#name., v.rulescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#rule.)) |
| 244 | } |
| 245 | if x.Lenscip-go gomod github.com/golang/go/src go1.15 reflect/Value#Len().() > v.rulescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#rule..(int) { |
| 246 | return createErrorscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/createError().(x, v, fmtscip-go gomod github.com/golang/go/src go1.15 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.15 fmt/Sprintf().("maximum item limit is %v; got: %v", v.rulescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#rule., x.Lenscip-go gomod github.com/golang/go/src go1.15 reflect/Value#Len().())) |
| 247 | } |
| 248 | case minItemsscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/minItems.: |
| 249 | if _, ok := v.rulescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#rule..(int); !ok { |
| 250 | return createErrorscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/createError().(x, v, fmtscip-go gomod github.com/golang/go/src go1.15 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.15 fmt/Sprintf().("rule must be integer for %v constraint; got: %v", v.namescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#name., v.rulescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#rule.)) |
| 251 | } |
| 252 | if x.Lenscip-go gomod github.com/golang/go/src go1.15 reflect/Value#Len().() < v.rulescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#rule..(int) { |
| 253 | return createErrorscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/createError().(x, v, fmtscip-go gomod github.com/golang/go/src go1.15 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.15 fmt/Sprintf().("minimum item limit is %v; got: %v", v.rulescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#rule., x.Lenscip-go gomod github.com/golang/go/src go1.15 reflect/Value#Len().())) |
| 254 | } |
| 255 | case uniqueItemsscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/uniqueItems.: |
| 256 | if x.Kindscip-go gomod github.com/golang/go/src go1.15 reflect/Value#Kind().() == reflectscip-go gomod github.com/golang/go/src go1.15 reflect/.Arrayscip-go gomod github.com/golang/go/src go1.15 reflect/Array. || x.Kindscip-go gomod github.com/golang/go/src go1.15 reflect/Value#Kind().() == reflectscip-go gomod github.com/golang/go/src go1.15 reflect/.Slicescip-go gomod github.com/golang/go/src go1.15 reflect/Slice. { |
| 257 | if !checkForUniqueInArrayscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/checkForUniqueInArray().(x) { |
| 258 | return createErrorscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/createError().(x, v, fmtscip-go gomod github.com/golang/go/src go1.15 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.15 fmt/Sprintf().("all items in parameter %q must be unique; got:%v", v.targetscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#target., x)) |
| 259 | } |
| 260 | } else if x.Kindscip-go gomod github.com/golang/go/src go1.15 reflect/Value#Kind().() == reflectscip-go gomod github.com/golang/go/src go1.15 reflect/.Mapscip-go gomod github.com/golang/go/src go1.15 reflect/Map. { |
| 261 | if !checkForUniqueInMapscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/checkForUniqueInMap().(x) { |
| 262 | return createErrorscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/createError().(x, v, fmtscip-go gomod github.com/golang/go/src go1.15 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.15 fmt/Sprintf().("all items in parameter %q must be unique; got:%v", v.targetscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#target., x)) |
| 263 | } |
| 264 | } else { |
| 265 | return createErrorscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/createError().(x, v, fmtscip-go gomod github.com/golang/go/src go1.15 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.15 fmt/Sprintf().("type must be array, slice or map for constraint %v; got: %v", v.namescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#name., x.Kindscip-go gomod github.com/golang/go/src go1.15 reflect/Value#Kind().())) |
| 266 | } |
| 267 | case readOnlyscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/readOnly.: |
| 268 | if x.Lenscip-go gomod github.com/golang/go/src go1.15 reflect/Value#Len().() != 0 { |
| 269 | return createErrorscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/createError().(x, v, "readonly parameter; must send as nil or empty in request") |
| 270 | } |
| 271 | case patternscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/pattern.: |
| 272 | reg, err := regexpscip-go gomod github.com/golang/go/src go1.15 regexp/.Compilescip-go gomod github.com/golang/go/src go1.15 regexp/Compile().(v.rulescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#rule..(string)) |
| 273 | if err != nil { |
| 274 | return createErrorscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/createError().(x, v, err.Error()) |
| 275 | } |
| 276 | keys := x.MapKeysscip-go gomod github.com/golang/go/src go1.15 reflect/Value#MapKeys().() |
| 277 | for _, k := range keys { |
| 278 | if !reg.MatchStringscip-go gomod github.com/golang/go/src go1.15 regexp/Regexp#MatchString().(k.Stringscip-go gomod github.com/golang/go/src go1.15 reflect/Value#String().()) { |
| 279 | return createErrorscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/createError().(k, v, fmtscip-go gomod github.com/golang/go/src go1.15 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.15 fmt/Sprintf().("map key doesn't match pattern %v", v.rulescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#rule.)) |
| 280 | } |
| 281 | } |
| 282 | default: |
| 283 | return createErrorscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/createError().(x, v, fmtscip-go gomod github.com/golang/go/src go1.15 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.15 fmt/Sprintf().("constraint %v is not applicable to array, slice and map type", v.namescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#name.)) |
| 284 | } |
| 285 | if v.chainscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#chain. != nil { |
| 286 | return validatescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validate().([]validationscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validation#{ |
| 287 | { |
| 288 | targetValuescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validation#targetValue.: getInterfaceValuescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/getInterfaceValue().(x), |
| 289 | constraintsscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validation#constraints.: v.chainscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#chain., |
| 290 | }, |
| 291 | }) |
| 292 | } |
| 293 | return nil |
| 294 | } |
| 295 | |
| 296 | func checkNilscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/checkNil().(x reflectscip-go gomod github.com/golang/go/src go1.15 reflect/.Valuescip-go gomod github.com/golang/go/src go1.15 reflect/Value#, v constraintscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#) error { |
| 297 | if _, ok := v.rulescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#rule..(bool); !ok { |
| 298 | return createErrorscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/createError().(x, v, fmtscip-go gomod github.com/golang/go/src go1.15 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.15 fmt/Sprintf().("rule must be bool value for %v constraint; got: %v", v.namescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#name., v.rulescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#rule.)) |
| 299 | } |
| 300 | if v.rulescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#rule..(bool) { |
| 301 | return createErrorscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/createError().(x, v, "value can not be null; required parameter") |
| 302 | } |
| 303 | return nil |
| 304 | } |
| 305 | |
| 306 | func checkEmptyscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/checkEmpty().(x reflectscip-go gomod github.com/golang/go/src go1.15 reflect/.Valuescip-go gomod github.com/golang/go/src go1.15 reflect/Value#, v constraintscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#) error { |
| 307 | if _, ok := v.rulescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#rule..(bool); !ok { |
| 308 | return createErrorscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/createError().(x, v, fmtscip-go gomod github.com/golang/go/src go1.15 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.15 fmt/Sprintf().("rule must be bool value for %v constraint; got: %v", v.namescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#name., v.rulescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#rule.)) |
| 309 | } |
| 310 | if v.rulescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#rule..(bool) { |
| 311 | return createErrorscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/createError().(x, v, "value can not be null or empty; required parameter") |
| 312 | } |
| 313 | return nil |
| 314 | } |
| 315 | |
| 316 | func checkForUniqueInArrayscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/checkForUniqueInArray().(x reflectscip-go gomod github.com/golang/go/src go1.15 reflect/.Valuescip-go gomod github.com/golang/go/src go1.15 reflect/Value#) bool { |
| 317 | if x == reflectscip-go gomod github.com/golang/go/src go1.15 reflect/.Zeroscip-go gomod github.com/golang/go/src go1.15 reflect/Zero().(reflectscip-go gomod github.com/golang/go/src go1.15 reflect/.TypeOfscip-go gomod github.com/golang/go/src go1.15 reflect/TypeOf().(x)) || x.Lenscip-go gomod github.com/golang/go/src go1.15 reflect/Value#Len().() == 0 { |
| 318 | return false |
| 319 | } |
| 320 | arrOfInterface := make([]interface{}, x.Lenscip-go gomod github.com/golang/go/src go1.15 reflect/Value#Len().()) |
| 321 | for i := 0; i < x.Lenscip-go gomod github.com/golang/go/src go1.15 reflect/Value#Len().(); i++ { |
| 322 | arrOfInterface[i] = x.Indexscip-go gomod github.com/golang/go/src go1.15 reflect/Value#Index().(i).Interfacescip-go gomod github.com/golang/go/src go1.15 reflect/Value#Interface().() |
| 323 | } |
| 324 | m := make(map[interface{}]bool) |
| 325 | for _, val := range arrOfInterface { |
| 326 | if m[val] { |
| 327 | return false |
| 328 | } |
| 329 | m[val] = true |
| 330 | } |
| 331 | return true |
| 332 | } |
| 333 | |
| 334 | func checkForUniqueInMapscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/checkForUniqueInMap().(x reflectscip-go gomod github.com/golang/go/src go1.15 reflect/.Valuescip-go gomod github.com/golang/go/src go1.15 reflect/Value#) bool { |
| 335 | if x == reflectscip-go gomod github.com/golang/go/src go1.15 reflect/.Zeroscip-go gomod github.com/golang/go/src go1.15 reflect/Zero().(reflectscip-go gomod github.com/golang/go/src go1.15 reflect/.TypeOfscip-go gomod github.com/golang/go/src go1.15 reflect/TypeOf().(x)) || x.Lenscip-go gomod github.com/golang/go/src go1.15 reflect/Value#Len().() == 0 { |
| 336 | return false |
| 337 | } |
| 338 | mapOfInterface := make(map[interface{}]interface{}, x.Lenscip-go gomod github.com/golang/go/src go1.15 reflect/Value#Len().()) |
| 339 | keys := x.MapKeysscip-go gomod github.com/golang/go/src go1.15 reflect/Value#MapKeys().() |
| 340 | for _, k := range keys { |
| 341 | mapOfInterface[k.Interfacescip-go gomod github.com/golang/go/src go1.15 reflect/Value#Interface().()] = x.MapIndexscip-go gomod github.com/golang/go/src go1.15 reflect/Value#MapIndex().(k).Interfacescip-go gomod github.com/golang/go/src go1.15 reflect/Value#Interface().() |
| 342 | } |
| 343 | m := make(map[interface{}]bool) |
| 344 | for _, val := range mapOfInterface { |
| 345 | if m[val] { |
| 346 | return false |
| 347 | } |
| 348 | m[val] = true |
| 349 | } |
| 350 | return true |
| 351 | } |
| 352 | |
| 353 | func getInterfaceValuescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/getInterfaceValue().(x reflectscip-go gomod github.com/golang/go/src go1.15 reflect/.Valuescip-go gomod github.com/golang/go/src go1.15 reflect/Value#) interface{} { |
| 354 | if x.Kindscip-go gomod github.com/golang/go/src go1.15 reflect/Value#Kind().() == reflectscip-go gomod github.com/golang/go/src go1.15 reflect/.Invalidscip-go gomod github.com/golang/go/src go1.15 reflect/Invalid. { |
| 355 | return nil |
| 356 | } |
| 357 | return x.Interfacescip-go gomod github.com/golang/go/src go1.15 reflect/Value#Interface().() |
| 358 | } |
| 359 | |
| 360 | func isZeroscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/isZero().(x interface{}) bool { |
| 361 | return x == reflectscip-go gomod github.com/golang/go/src go1.15 reflect/.Zeroscip-go gomod github.com/golang/go/src go1.15 reflect/Zero().(reflectscip-go gomod github.com/golang/go/src go1.15 reflect/.TypeOfscip-go gomod github.com/golang/go/src go1.15 reflect/TypeOf().(x)).Interfacescip-go gomod github.com/golang/go/src go1.15 reflect/Value#Interface().() |
| 362 | } |
| 363 | |
| 364 | func createErrorscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/createError().(x reflectscip-go gomod github.com/golang/go/src go1.15 reflect/.Valuescip-go gomod github.com/golang/go/src go1.15 reflect/Value#, v constraintscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#, message string) error { |
| 365 | return pipelinescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/.NewErrorscip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/NewError().(nil, fmtscip-go gomod github.com/golang/go/src go1.15 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.15 fmt/Sprintf().("validation failed: parameter=%s constraint=%s value=%#v details: %s", |
| 366 | v.targetscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#target., v.namescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#name., getInterfaceValuescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/getInterfaceValue().(x), message)) |
| 367 | } |